for (Iterator<String> i = bugTypeSet.iterator(); i.hasNext();) { String bugType = i.next();
for (String bugType : bugTypeSet) {
	private void writeBugPatterns() throws IOException {		// Find bug types reported		Set<String> bugTypeSet = new HashSet<String>();		for (Iterator<BugInstance> i = getBugCollection().iterator(); i.hasNext();) {			BugInstance bugInstance = i.next();			BugPattern bugPattern = bugInstance.getBugPattern();			if (bugPattern != null) {				bugTypeSet.add(bugPattern.getType());			}		}		// Emit element describing each reported bug pattern		for (Iterator<String> i = bugTypeSet.iterator(); i.hasNext();) {			String bugType = i.next();			BugPattern bugPattern = I18N.instance().lookupBugPattern(bugType);			if (bugPattern == null)				continue;						XMLAttributeList attributeList = new XMLAttributeList();			attributeList.addAttribute("type", bugType);			attributeList.addAttribute("abbrev", bugPattern.getAbbrev());			attributeList.addAttribute("category", bugPattern.getCategory());						xmlOutput.openTag("BugPattern", attributeList);						xmlOutput.openTag("ShortDescription");			xmlOutput.writeText(bugPattern.getShortDescription());			xmlOutput.closeTag("ShortDescription");						xmlOutput.openTag("Details");			xmlOutput.writeCDATA(bugPattern.getDetailText());			xmlOutput.closeTag("Details");						xmlOutput.closeTag("BugPattern");		}	}