code: private String formatArgs(String format, Object... args) {
      if (format != null) {
        return String.format(format, args);
      } else {
        StringBuilder sb = new StringBuilder();
        for (int i = 0, N = args.length; i < N; i++) {
          if (i != 0) {
            sb.append(", ");
          }
          sb.append(args[i]);
        }
        return sb.toString();
      }
    }
docs: Format a string with arguments.
  
  @param format the format string, null if just to concat the arguments
  @param args   the arguments
  @return the formatted string