@@ -0,0 +1,1800 @@
+/*%0A * FindBugs - Find Bugs in Java programs%0A * Copyright (C) 2003-2007 University of Maryland%0A * %0A * This library is free software; you can redistribute it and/or%0A * modify it under the terms of the GNU Lesser General Public%0A * License as published by the Free Software Foundation; either%0A * version 2.1 of the License, or (at your option) any later version.%0A * %0A * This library is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU%0A * Lesser General Public License for more details.%0A * %0A * You should have received a copy of the GNU Lesser General Public%0A * License along with this library; if not, write to the Free Software%0A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA%0A */%0A%0Apackage edu.umd.cs.findbugs;%0A%0Aimport java.io.IOException;%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0Aimport org.dom4j.DocumentException;%0A%0A/**%0A * @author pugh%0A */%0Apublic class ExcludingHashesBugReporter extends DelegatingBugReporter %7B%0A%09%0A%09Set%3CString%3E excludedHashes = new HashSet%3CString%3E();%0A%09/**%0A     * @param delegate%0A%09 * @throws DocumentException %0A%09 * @throws IOException %0A     */%0A    public ExcludingHashesBugReporter(BugReporter delegate, String baseline) throws IOException, DocumentException %7B%0A%09    super(delegate);%0A%09%09Project project = new Project();%0A%09%09BugCollection origCollection;%0A%09%09origCollection = new SortedBugCollection();%0A%09%09origCollection.readXML(baseline, project);%0A%09%09for(BugInstance b : origCollection.getCollection())%0A%09%09%09excludedHashes.add(b.getInstanceHash());%0A    %7D%0A%09@Override%0A%09public void reportBug(BugInstance bugInstance) %7B%0A%09%09if (!excludedHashes.contains(bugInstance.getInstanceHash()))%0A%09%09%09%09getDelegate().reportBug(bugInstance);%0A%09%7D%0A%7D%0A

Add delegating bug reporter that filters out bugs that match a known instance hash