docs: private void addBugCategories(Set<String> bugCategorySet) {
          Element root = document.getRootElement();
          for (String category : bugCategorySet) {
              Element element = root.addElement("BugCategory");
              element.addAttribute("category", category);
              Element description = element.addElement("Description");
              description.setText(I18N.instance().getBugCategoryDescription(category));
  
              BugCategory bc = DetectorFactoryCollection.instance().getBugCategory(category);
              if (bc != null) { // shouldn't be null
                  String s = bc.getAbbrev();
                  if (s != null) {
                      Element abbrev = element.addElement("Abbreviation");
                      abbrev.setText(s);
                  }
                  s = bc.getDetailText();
                  if (s != null) {
                      Element details = element.addElement("Details");
                      details.setText(s);
                  }
              }
          }
      }