result.retainAll(origCollection.getCollection());
if (DEBUG) System.out.println(result.size() + " instances initially");  List<BugInstance> retained = new LinkedList<BugInstance>(); for (Iterator<BugInstance> i = origCollection.iterator(); i.hasNext();) { BugInstance origBugInstance = i.next(); if (result.contains(origBugInstance)) { retained.add(origBugInstance); } } result.clear(); result.addAll(retained); if (DEBUG) System.out.println(result.size() + " after retaining new instances");
		public SortedBugCollection perform(Set<BugInstance> result,				SortedBugCollection origCollection, SortedBugCollection newCollection) {			result.addAll(newCollection.getCollection());			result.retainAll(origCollection.getCollection());			return newCollection;		}