Iterator<BugPattern> it = patterns.iterator(); while (it.hasNext()) { BugPattern pattern = it.next();
for (BugPattern pattern : patterns) {
	private void viewDetectorDetails(DetectorFactory factory) {		String detailHTML = factory.getDetailHTML();		if (detailHTML == null) {			detectorDescription.setText("");		} else {			detectorDescription.setContentType("text/html");			detectorDescription.setText(detailHTML);			StringBuffer toolTip = new StringBuffer(100);			toolTip.append("<html><body><b>");			toolTip.append(factory.getFullName());			toolTip.append("</b><br><br><table border='1' width='100%'><tr><th>");			toolTip.append(L10N.getLocalString("msg.bugpatternsreported_txt", "Bug Patterns Reported"));			toolTip.append("</th></tr>");						Collection<BugPattern> patterns = factory.getReportedBugPatterns();			Iterator<BugPattern> it = patterns.iterator();			while (it.hasNext()) {				BugPattern pattern = it.next();				toolTip.append("<tr><td align='center'>");				toolTip.append("[");				toolTip.append(pattern.getAbbrev());				toolTip.append("] ");				toolTip.append(pattern.getType());				toolTip.append("</td></tr>");			}			toolTip.append("</body></html>");			detectorDescription.setToolTipText(toolTip.toString());		}	}