PsiExpression (PsiExpression expression, @NotNull TypeEvaluator evaluator) { final JavaCodeStyleManager codeStyleManager = JavaCodeStyleManager.getInstance(expression.getProject()); String varA = suggestName("a", codeStyleManager, expression); String varB = suggestName("b", codeStyleManager, expression); setReplaceByString("$it$.reduce((" + varA + ", " + varB + ") -> " + varB + ")"); return super.replace(expression, evaluator); }