XMLAttributeList attributeList = new XMLAttributeList();
attributeList.addAttribute("type", bugType);
attributeList.addAttribute("abbrev", bugPattern.getAbbrev());
attributeList.addAttribute("category", bugPattern.getCategory());
if (bugPattern.getCWEid() != 0) {
attributeList.addAttribute("cweid", Integer.toString(bugPattern.getCWEid()));
}
xmlOutput.openTag("BugPattern", attributeList);
xmlOutput.openTag("ShortDescription");
xmlOutput.writeText(bugPattern.getShortDescription());