edu.umd.cs.findbugs
Class MergeResults

java.lang.Object
  extended by 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

Field Summary
private  SortedBugCollection newCollection
           
private  int numAlreadyAnnotated
           
private  int numLost
           
private  int numLostWithAnnotations
           
private  int numPreserved
           
private  SortedBugCollection origCollection
           
private  Project project
           
private static boolean UPDATE_CATEGORIES
           
private static boolean VERSION_INSENSITIVE
           
 
Constructor Summary
MergeResults(SortedBugCollection origCollection, SortedBugCollection newCollection, Project project)
           
MergeResults(java.lang.String origFilename, java.lang.String newFilename)
           
 
Method Summary
private static java.util.SortedSet<BugInstance> createSet(BugCollection bugCollection)
           
 void execute()
           
 SortedBugCollection getNewCollection()
           
 int getNumAlreadyAnnotated()
           
 int getNumLost()
           
 int getNumLostWithAnnotations()
           
 int getNumPreserved()
           
 SortedBugCollection getOrigCollection()
           
 Project getProject()
           
protected  void lostWithAnnotation(BugInstance bugInstance)
           
static void main(java.lang.String[] argv)
           
protected  boolean preserveUnconditionally(BugInstance bugInstance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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)
Method Detail

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)