PsiExpression (PsiExpression expression, @NotNull TypeEvaluator evaluator) { final PsiMethodCallExpression methodCallExpression = (PsiMethodCallExpression)expression; final PsiExpression qualifier = methodCallExpression.getMethodExpression().getQualifierExpression(); LOG.assertTrue(qualifier != null); final PsiClassType qualifierType = (PsiClassType)qualifier.getType(); LOG.assertTrue(qualifierType != null); final PsiType[] parameters = qualifierType.getParameters(); final JavaCodeStyleManager codeStyleManager = JavaCodeStyleManager.getInstance(expression.getProject()); final SuggestedNameInfo suggestedNameInfo = codeStyleManager .suggestVariableName(VariableKind.LOCAL_VARIABLE, null, null, parameters.length == 1 ? parameters[0] : null, false); final String suggestedName = codeStyleManager.suggestUniqueVariableName(suggestedNameInfo, expression, false).names[0]; setReplaceByString("$it$.anyMatch(" + suggestedName + " -> java.util.Objects.equals(" + suggestedName + ", $o$))"); return super.replace(expression, evaluator); }