void (@NotNull PsiMethodCallExpression expression) { super.visitMethodCallExpression(expression); final PsiReferenceExpression methodExpression = expression.getMethodExpression(); @NonNls final String name = methodExpression.getReferenceName(); if (HardcodedMethodConstants.TO_STRING.equals(name)) { if (!expression.getArgumentList().isEmpty()) { return; } final PsiExpression qualifier = methodExpression.getQualifierExpression(); checkExpression(qualifier); } else if ("append".equals(name)) { final PsiExpression qualifier = methodExpression.getQualifierExpression(); if (!TypeUtils.expressionHasTypeOrSubtype(qualifier, CommonClassNames.JAVA_LANG_ABSTRACT_STRING_BUILDER)) { return; } final PsiExpressionList argumentList = expression.getArgumentList(); final PsiExpression[] arguments = argumentList.getExpressions(); if (arguments.length != 1) { return; } final PsiExpression argument = arguments[0]; checkExpression(argument); } else if ("valueOf".equals(name)) { final PsiExpression qualifierExpression = methodExpression.getQualifierExpression(); if (!(qualifierExpression instanceof PsiReferenceExpression referenceExpression)) { return; } final String canonicalText = referenceExpression.getCanonicalText(); if (!CommonClassNames.JAVA_LANG_STRING.equals(canonicalText)) { return; } final PsiExpressionList argumentList = expression.getArgumentList(); final PsiExpression[] arguments = argumentList.getExpressions(); if (arguments.length != 1) { return; } final PsiExpression argument = arguments[0]; checkExpression(argument); } }