void () { PsiTreeUtil.findChildrenOfType(getFile(), PsiMethodCallExpression.class).stream() .filter(PsiElement::isValid) .filter(call -> call.getArgumentList().getExpressionCount() > 1) .forEach(call -> call.getArgumentList().add( JavaPsiFacade.getElementFactory(getFile().getProject()).createExpressionFromText("null", call))); }