code: public static StringBuilder appendProblems(Object object, StringBuilder builder) {
          if (object instanceof CompilationProblem[]) {
              final CompilationProblem[] problem = (CompilationProblem[]) object;
              for (CompilationProblem aProblem : problem) {
                  builder.append("\t")
                         .append(aProblem)
                         .append("\n");
              }
          } else if (object != null) {
              builder.append(object);
          }
          return builder;
      }
docs: Appends compilation problems to builder if object is an array of {@link CompilationProblem}
  or object itself if not
  
  @param object  object with compilation results
  @param builder message builder
  @return builder