code: private String removeHeaderComments(String fileContent, SortedSet<Comment> comments) {
          String headerlessFileContent = fileContent;
          for (Comment comment : comments) {
              String commentValue = comment.getValue();
              if (headerlessFileContent.startsWith(commentValue)) {
                  headerlessFileContent = headerlessFileContent.replace(commentValue, EMPTY_STRING);
                  // remove all leading white spaces and new line characters
                  while (StringUtils.isNotBlank(headerlessFileContent) && Character.isWhitespace(headerlessFileContent.charAt(0))) {
                      headerlessFileContent = headerlessFileContent.substring(1);
                  }
              } else {
                  // finished removing all header comments
                  break;
              }
          }
          return headerlessFileContent;
      }
docs: Go over each comment and remove from content until reaching the beginning of the actual code.