@Nullable
  private static GrExpression getAnchorForArgument(GrExpression[] oldArgs, boolean isVarArg, PsiParameterList parameterList) {
    if (!isVarArg) return ArrayUtil.getLastElement(oldArgs);

    final PsiParameter[] parameters = parameterList.getParameters();
    if (parameters.length > oldArgs.length) return ArrayUtil.getLastElement(oldArgs);

    final int lastNonVararg = parameters.length - 2;
    return lastNonVararg >= 0 ? oldArgs[lastNonVararg] : null;
  }
@Nullable
  private static GrExpression getAnchorForArgument(GrExpression[] oldArgs, boolean isVarArg, PsiParameterList parameterList)