if (op.equals("-new")) { newBugs.removeAll(oldBugs); result.addAll(newBugs); } else if (op.equals("-fixed")) { oldBugs.removeAll(newBugs); result.addAll(oldBugs);
if (op.equals("-new") || op.equals("-added")) { result = bugHistory.performSetOperation(ADDED_WARNINGS); } else if (op.equals("-fixed") || op.equals("-removed")) { result = bugHistory.performSetOperation(REMOVED_WARNINGS);
	public static void main(String[] argv) throws Exception {		if (argv.length != 3) {			System.err.println("Usage: " + BugHistory.class.getName() +			        " <operation> <old results> <new results>\n" +			        "Operations:\n" +			        "   -new        Output new bugs (in new results but not in old results)\n" +			        "   -fixed      Output fixed bugs (in old results but not in new results)\n" +			        "   -retained   Output retained bugs (in both old and new results)");			System.exit(1);		}		Project project = new Project();		String op = argv[0];		TreeSet<BugInstance> oldBugs = readSet(argv[1], project);		TreeSet<BugInstance> newBugs = readSet(argv[2], new Project());		SortedBugCollection result = new SortedBugCollection();		if (op.equals("-new")) {			newBugs.removeAll(oldBugs);			result.addAll(newBugs);		} else if (op.equals("-fixed")) {			oldBugs.removeAll(newBugs);			result.addAll(oldBugs);		} else if (op.equals("-retained")) {			oldBugs.retainAll(newBugs);			result.addAll(oldBugs);		} else			throw new IllegalArgumentException("Unknown operation: " + op);		result.writeXML(System.out, project);	}