String op = argv[0]; SortedBugCollection origCollection = readCollection(argv[1], project); SortedBugCollection newCollection = readCollection(argv[2], new Project());
String op = argv[argCount++]; SortedBugCollection origCollection = readCollection(argv[argCount++], project); SortedBugCollection newCollection = readCollection(argv[argCount++], new Project());
	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" +			        "   -added      Output added bugs (in new results but not in old results)\n" +			        "   -new        Synonym for -added\n" +			        "   -removed    Output removed bugs (in old results but not in new results)\n" +			        "   -fixed      Synonym for -removed\n" +			        "   -retained   Output retained bugs (in both old and new results)");			System.exit(1);		}		Project project = new Project();		String op = argv[0];		SortedBugCollection origCollection = readCollection(argv[1], project);		SortedBugCollection newCollection = readCollection(argv[2], new Project());		SortedBugCollection result = null;		BugHistory bugHistory = new BugHistory(origCollection, newCollection); 		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);		} else if (op.equals("-retained")) {			result = bugHistory.performSetOperation(RETAINED_WARNINGS);		} else			throw new IllegalArgumentException("Unknown operation: " + op);		result.writeXML(System.out, project);	}