private static void replaceWithLogCall(@NotNull PsiMethodCallExpression callExpression,
                                         @NotNull String logName,
                                         @NotNull String logMethodName) {
    PsiExpression[] expressions = callExpression.getArgumentList().getExpressions();
    if(expressions.length != 1) {
      return;
    }

    PsiExpression expression = expressions[0];

    String arguments = getArguments(expression);

    String text = logName + "." + logMethodName + "(" + arguments + ")";

    CommentTracker tracker = new CommentTracker();
    PsiElement newElement = tracker.replace(callExpression, text);

    if (!(newElement instanceof PsiMethodCallExpression newCall)) {
      return;
    }
    StringConcatenationArgumentToLogCallInspection.LogConcatenationContext context =
      StringConcatenationArgumentToLogCallInspection.getLogConcatenationContext(newCall.getArgumentList().getExpressions());

    if (context == null) {
      return;
    }

    PsiUpdateModCommandQuickFix fix = StringConcatenationArgumentToLogCallInspection.getQuickFix(context.problemType(), context.argument());
    if (fix instanceof StringConcatenationArgumentToLogCallInspection.EvaluatedStringFix evaluatedStringFix) {
      evaluatedStringFix.fix(newCall);
    }
  }
private static void replaceWithLogCall(@NotNull PsiMethodCallExpression callExpression,
                                         @NotNull String logName,
                                         @NotNull String logMethodName)