Class MineBugHistory
java.lang.Object
edu.umd.cs.findbugs.workflow.MineBugHistory
Mine historical information from a BugCollection. The BugCollection should be
built using UpdateBugCollection to record the history of analyzing all
versions over time.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int(package private) static final int(package private) SortedBugCollection(package private) final SimpleDateFormat(package private) static final int(package private) boolean(package private) static final int(package private) boolean(package private) static final int(package private) static final int(package private) static final int(package private) Map<Long, AppVersion> (package private) boolean(package private) static final int(package private) MineBugHistory.Version[]private static final int(package private) boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(PrintStream out) voiddumpNoTabs(PrintStream out) This implementation of dump() tries to better align columns (when viewed with a fixed-width font) by padding with spaces instead of using tabs.voiddumpOriginal(PrintStream out) This is how dump() was implemented up to and including version 0.9.5.voiddumpSummary(PrintStream out) voiddumpXml(PrintStream out) This is how dump() was implemented up to and including version 0.9.5.execute()private intgetKey(boolean activePrevious, boolean activeCurrent) Get key used to classify the presence and/or absence of a BugInstance in successive versions in the history.static voidprivate static voidpad(int width, PrintStream out) emitwidthspace characters tooutprivate static voidprint(int width, boolean alignRight, PrintStream out, Object obj) equivalent to out.print(obj) except it may be padded on the left or rightvoidsetBugCollection(SortedBugCollection bugCollection) voidsetFormatDates(boolean value) voidvoidvoidsetXml()
-
Field Details
-
WIDTH
private static final int WIDTH- See Also:
-
ADDED
static final int ADDED- See Also:
-
NEWCODE
static final int NEWCODE- See Also:
-
REMOVED
static final int REMOVED- See Also:
-
REMOVEDCODE
static final int REMOVEDCODE- See Also:
-
RETAINED
static final int RETAINED- See Also:
-
DEAD
static final int DEAD- See Also:
-
ACTIVE_NOW
static final int ACTIVE_NOW- See Also:
-
TUPLE_SIZE
static final int TUPLE_SIZE- See Also:
-
dateFormat
-
bugCollection
SortedBugCollection bugCollection -
versionList
MineBugHistory.Version[] versionList -
sequenceToAppVersionMap
Map<Long, AppVersion> sequenceToAppVersionMap -
formatDates
boolean formatDates -
noTabs
boolean noTabs -
summary
boolean summary -
xml
boolean xml
-
-
Constructor Details
-
MineBugHistory
public MineBugHistory() -
MineBugHistory
-
-
Method Details
-
setBugCollection
-
setFormatDates
public void setFormatDates(boolean value) -
setNoTabs
public void setNoTabs() -
setXml
public void setXml() -
setSummary
public void setSummary() -
execute
-
dump
-
dumpSummary
-
dumpOriginal
This is how dump() was implemented up to and including version 0.9.5. -
pad
emitwidthspace characters toout -
print
equivalent to out.print(obj) except it may be padded on the left or right- Parameters:
width- padding will occur if the stringified oxj is shorter than thisalignRight- true to pad on the left, false to pad on the rightout- the PrintStream printed toobj- the value to print (may be an auto-boxed primitive)
-
dumpNoTabs
This implementation of dump() tries to better align columns (when viewed with a fixed-width font) by padding with spaces instead of using tabs. Also, timestamps are formatted more tersely (-formatDates option). The bad news is that it requires a minimum of 112 columns.- See Also:
-
dumpXml
This is how dump() was implemented up to and including version 0.9.5. -
getKey
private int getKey(boolean activePrevious, boolean activeCurrent) Get key used to classify the presence and/or absence of a BugInstance in successive versions in the history.- Parameters:
activePrevious- true if the bug was active in the previous version, false if notactiveCurrent- true if the bug is active in the current version, false if not- Returns:
- the key: one of ADDED, RETAINED, REMOVED, and DEAD
-
main
-