void () { PsiTreeUtil.findChildrenOfType(getFile(), PsiCallExpression.class) .stream() .filter(PsiElement::isValid) .map(PsiCall::getArgumentList) .filter(Objects::nonNull) .filter(argList -> argList.getExpressionCount() > 1) .limit(20) .forEach(argList -> { if (!argList.isValid()) return; PsiExpression arg = argList.getExpressions()[1]; if (!arg.isValid()) return; arg.delete(); }); }