Iterator<BugInstance> i = origCollection.iterator();
Iterator<BugInstance> i = origSet.iterator();
	public static void main(String[] argv) throws Exception {		if (argv.length != 3) {			System.err.println("Usage: " + MergeResults.class.getName() + " <orig results> <new results> <output file>");			System.exit(1);		}		DetectorFactoryCollection.instance(); // as a side effect, loads detector plugins		String origResultsFile = argv[0];		String newResultsFile = argv[1];		String outputFile = argv[2];		Project project = new Project();		SortedBugCollection origCollection = new SortedBugCollection();		SortedBugCollection newCollection = new SortedBugCollection();		origCollection.readXML(origResultsFile, new Project());		newCollection.readXML(newResultsFile, project);		int numPreserved = 0;		int numLost = 0;		int numLostWithAnnotations = 0;		Iterator<BugInstance> i = origCollection.iterator();		while (i.hasNext()) {			BugInstance orig = i.next();			if (newCollection.contains(orig)) {				BugInstance matching = newCollection.getMatching(orig);				matching.setAnnotationText(orig.getAnnotationText());				numPreserved++;			} else {				numLost++;				if (!orig.getAnnotationText().equals("")) {					System.out.println("Losing a bug with an annotation:");					System.out.println(orig.getMessage());					SourceLineAnnotation srcLine = orig.getPrimarySourceLineAnnotation();					if (srcLine != null)						System.out.println("\t" + srcLine.toString());					System.out.println(orig.getAnnotationText());					numLostWithAnnotations++;				}			}		}		System.out.println(numPreserved + " preserved, " +			numLost + " lost (" + numLostWithAnnotations + " lost with annotations)");		newCollection.writeXML(outputFile, project);	}