void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { final PsiIdentifier name = (PsiIdentifier)element; final PsiReferenceExpression expression = (PsiReferenceExpression)name.getParent(); assert expression != null; final PsiMethodCallExpression call = (PsiMethodCallExpression)expression.getParent(); final PsiExpression qualifier = expression.getQualifierExpression(); assert qualifier != null; CommentTracker commentTracker = new CommentTracker(); final String qualifierText = commentTracker.text(qualifier); assert call != null; final PsiExpressionList argumentList = call.getArgumentList(); final PsiExpression[] arguments = argumentList.getExpressions(); final String argumentText = commentTracker.text(arguments[0]); @NonNls final StringBuilder newExpressionText = new StringBuilder(); if (deepEquals) { newExpressionText.append("java.util.Arrays.deepEquals("); } else { newExpressionText.append("java.util.Arrays.equals("); } newExpressionText.append(qualifierText); newExpressionText.append(", "); newExpressionText.append(argumentText); newExpressionText.append(')'); PsiReplacementUtil.replaceExpressionAndShorten(call, newExpressionText.toString(), commentTracker); }