PsiExpression (@NotNull CommentTracker tracker, @NotNull PsiExpression expression, @NotNull Project project, @NotNull PsiReferenceExpression nullableReference, @NotNull PsiElement context) { boolean isSimple = ExpressionUtils.isSafelyRecomputableExpression(expression); String expr = tracker.text(expression); if (!isSimple) { expr = "()->" + expr; } String varName = nullableReference.getText(); String requireCallText = CommonClassNames.JAVA_UTIL_OBJECTS + "." + getMethod(expression) + "(" + varName + "," + expr + ")"; PsiElementFactory factory = JavaPsiFacade.getElementFactory(project); return factory.createExpressionFromText(requireCallText, context); }