code: protected List<String> trim(List<String> comments) {
          List<String> trimComments = new ArrayList<>();
          int n = 0;
          boolean tryRemoveWhitespace = true;
          while (tryRemoveWhitespace) {
              boolean allLinesAreShorter = true;
              for (String comment : comments) {
                  if (comment.length() <= n) {
                      continue;
                  }
                  if (comment.charAt(n) != ' ') {
                      tryRemoveWhitespace = false;
                  }
                  allLinesAreShorter = false;
              }
              if (allLinesAreShorter) {
                  break;
              }
              if (tryRemoveWhitespace) {
                  n++;
              }
          }
          for (String comment : comments) {
              if (comment.length() > n) {
                  String substring = comment.substring(n);
                  trimComments.add(substring);
              } else {
                  trimComments.add("");
              }
          }
          return trimComments;
      }
docs: Remove common leading whitespaces from all strings in the list.
  Returns new list instance.