void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiMethodCallExpression call = PsiTreeUtil.getNonStrictParentOfType(element, PsiMethodCallExpression.class); if (call == null) return; PsiExpression qualifier = ExpressionUtils.getEffectiveQualifier(call.getMethodExpression()); if (qualifier == null) return; CommentTracker ct = new CommentTracker(); switch (myFixType) { case REPLACE_WITH_QUALIFIER -> { PsiExpression result = (PsiExpression)ct.replaceAndRestoreComments(call, qualifier); if (result.getParent() instanceof PsiExpressionStatement expr) { extractSideEffects(result, expr); } } case REPLACE_WITH_ARGUMENTS -> { PsiExpressionList list = tryCast(PsiUtil.skipParenthesizedExprUp(call.getParent()), PsiExpressionList.class); if (list == null) return; for (PsiExpression arg : call.getArgumentList().getExpressions()) { list.add(ct.markUnchanged(arg)); } ct.replaceAndRestoreComments(call, qualifier); } } }