/** * Add BugCategory elements. * * @param bugCategorySet * all bug categories referenced in the BugCollection */ 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); } } } }
if (bc.getDetailText() == null) { bc.setDetailText(details); if (DEBUG) { System.out.println("rejected details [" + details + "] for category " + key + ": [" + bc.getDetailText() + ']');
/** * Add BugCategory elements. * * @param bugCategorySet * all bug categories referenced in the BugCollection */ 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); } } } }
if (bc.getDetailText() == null) { bc.setDetailText(details); if (DEBUG) { System.out.println("rejected details [" + details + "] for category " + key + ": [" + bc.getDetailText() + ']');