edu.umd.cs.findbugs
Class MergeResults
java.lang.Object
edu.umd.cs.findbugs.MergeResults
public class MergeResults
- extends java.lang.Object
Merge a saved results file (containing annotations) with a new results file.
This is useful when re-running FindBugs after changing the detectors
(e.g., to fix false positives). All of the annotations from the original
run for bugs still present in the new run are preserved in the output file
(whose bugs are identical to the new run). Note that some annotations
can be lost, if those bugs are not present in the new run.
- Author:
- David Hovemeyer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VERSION_INSENSITIVE
private static final boolean VERSION_INSENSITIVE
UPDATE_CATEGORIES
private static final boolean UPDATE_CATEGORIES
origCollection
private SortedBugCollection origCollection
newCollection
private SortedBugCollection newCollection
project
private Project project
numPreserved
private int numPreserved
numAlreadyAnnotated
private int numAlreadyAnnotated
numLost
private int numLost
numLostWithAnnotations
private int numLostWithAnnotations
MergeResults
public MergeResults(java.lang.String origFilename,
java.lang.String newFilename)
throws java.io.IOException,
org.dom4j.DocumentException
- Throws:
java.io.IOException
org.dom4j.DocumentException
MergeResults
public MergeResults(SortedBugCollection origCollection,
SortedBugCollection newCollection,
Project project)
getOrigCollection
public SortedBugCollection getOrigCollection()
getNewCollection
public SortedBugCollection getNewCollection()
getProject
public Project getProject()
getNumPreserved
public int getNumPreserved()
getNumAlreadyAnnotated
public int getNumAlreadyAnnotated()
getNumLost
public int getNumLost()
getNumLostWithAnnotations
public int getNumLostWithAnnotations()
preserveUnconditionally
protected boolean preserveUnconditionally(BugInstance bugInstance)
lostWithAnnotation
protected void lostWithAnnotation(BugInstance bugInstance)
main
public static void main(java.lang.String[] argv)
throws java.lang.Exception
- Throws:
java.lang.Exception
execute
public void execute()
createSet
private static java.util.SortedSet<BugInstance> createSet(BugCollection bugCollection)