boolean (PsiElement element) { if (!(element instanceof PsiMethodCallExpression methodCallExpression)) { return false; } if (STRING_JOINER_ADD.test(methodCallExpression)) return true; final PsiReferenceExpression methodExpression = methodCallExpression.getMethodExpression(); @NonNls final String methodName = methodExpression.getReferenceName(); if (!"append".equals(methodName)) { return false; } final PsiExpressionList argumentList = methodCallExpression.getArgumentList(); final PsiExpression[] arguments = argumentList.getExpressions(); if (arguments.length == 3) { return (arguments[0].getType() instanceof PsiArrayType || TypeUtils.isJavaLangString(arguments[0].getType())) && PsiTypes.intType().equals(arguments[1].getType()) && PsiTypes.intType().equals(arguments[2].getType()); } return arguments.length == 1; }