Package edu.umd.cs.findbugs
Class SortedBugCollection
- java.lang.Object
-
- edu.umd.cs.findbugs.SortedBugCollection
-
- All Implemented Interfaces:
BugCollection,java.lang.Iterable<BugInstance>
public class SortedBugCollection extends java.lang.Object implements BugCollection
An implementation ofBugCollectionthat keeps the BugInstances sorted by class (using the native comparison ordering of BugInstance's compareTo() method as a tie-breaker).- See Also:
BugInstance
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classSortedBugCollection.BoundedLinkedHashSetstatic classSortedBugCollection.BugInstanceComparatorstatic classSortedBugCollection.MultiversionBugInstanceComparator
-
Field Summary
Fields Modifier and Type Field Description (package private) longanalysisTimestamp(package private) java.lang.StringanalysisVersionprivate booleanapplySuppressionsprivate java.util.List<AppVersion>appVersionListprivate java.util.TreeSet<BugInstance>bugSet(package private) booleanbugsPopulatedprivate java.util.Map<java.lang.String,ClassFeatureSet>classFeatureSetMapprivate java.util.Comparator<BugInstance>comparator(package private) java.lang.StringdataSource(package private) booleanearlyStatsprivate java.util.LinkedHashSet<AnalysisError>errorListprivate booleanminimalXMLprivate java.util.TreeSet<java.lang.String>missingClassSetprivate booleanpreciseHashOccurrenceNumbersAvailable(package private) Projectprojectprivate ProjectStatsprojectStatsprivate java.lang.StringreleaseNameRelease name of the analyzed application.private static booleanREPORT_SUMMARY_HTMLprivate longsequenceSequence number of the most-recently analyzed version of the code.private java.lang.StringsummaryHTML(package private) longtimeFinishedLoadingprivate longtimestampCurrent timestamp for the code being analyzed(package private) longtimeStartedLoadingprivate booleanwithMessages-
Fields inherited from interface edu.umd.cs.findbugs.BugCollection
ANALYSIS_ERROR_ELEMENT_NAME, APP_CLASS_ELEMENT_NAME, CLASS_HASHES_ELEMENT_NAME, ERROR_ELEMENT_NAME, ERROR_EXCEPTION_ELEMENT_NAME, ERROR_MESSAGE_ELEMENT_NAME, ERROR_STACK_TRACE_ELEMENT_NAME, ERRORS_ELEMENT_NAME, HISTORY_ELEMENT_NAME, MISSING_CLASS_ELEMENT_NAME, PROJECT_ELEMENT_NAME, ROOT_ELEMENT_NAME, SRCMAP_ELEMENT_NAME, SUMMARY_HTML_ELEMENT_NAME
-
-
Constructor Summary
Constructors Constructor Description SortedBugCollection()Constructor.SortedBugCollection(Project project)SortedBugCollection(ProjectStats projectStats)Constructor.SortedBugCollection(ProjectStats projectStats, Project project)SortedBugCollection(ProjectStats projectStats, java.util.Comparator<BugInstance> comparator)Constructor.SortedBugCollection(ProjectStats projectStats, java.util.Comparator<BugInstance> comparator, Project project)SortedBugCollection(java.io.File f)SortedBugCollection(java.util.Comparator<BugInstance> comparator)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanadd(BugInstance bugInstance)Add a BugInstance to this BugCollection.booleanadd(BugInstance bugInstance, boolean updateActiveTime)Add a BugInstance to this BugCollection.voidaddAll(java.util.Collection<BugInstance> collection)Add a Collection of BugInstances to this BugCollection object.voidaddAll(java.util.Collection<BugInstance> collection, boolean updateActiveTime)Add a Collection of BugInstances to this BugCollection object.voidaddAppVersion(AppVersion appVersion)Add an AppVersion representing a version of the analyzed application.voidaddError(AnalysisError error)Add an analysis error.voidaddError(java.lang.String message)Add an analysis error.voidaddError(java.lang.String message, java.lang.Throwable exception)voidaddMissingClass(java.lang.String className)Add a missing class message.java.util.Iterator<AppVersion>appVersionIterator()Get an Iterator over AppVersions defined in the collection.voidbugsPopulated()private static voidcheckInputStream(java.io.InputStream in)java.util.Iterator<ClassFeatureSet>classFeatureSetIterator()voidclearAppVersions()Clear all AppVersions representing previously-analyzed versions of the application.voidclearBugInstances()voidclearClassFeatures()voidclearErrors()voidclearMissingClasses()static voidcloneAll(java.util.Collection<BugInstance> dest, java.util.Collection<BugInstance> source)Clone all of the BugInstance objects in the source Collection and add them to the destination Collection.(package private) intcommonPrefix(java.lang.String s1, java.lang.String s2)voidcomputeBugHashes()booleancontains(BugInstance bugInstance)SortedBugCollectioncreateEmptyCollectionWithMetadata()Create a new empty BugCollection with the same metadata as this one.private voiddoReadXML(java.io.InputStream in, java.io.File base)private voiddoReadXML(java.io.Reader reader, java.io.File base)SortedBugCollectionduplicate()private voidemitErrors(XMLOutput xmlOutput)BugInstancefindBug(java.lang.String instanceHash, java.lang.String bugType, int lineNumber)longgetAnalysisTimestamp()Get the timestamp for when the analysis was performed.java.lang.StringgetAnalysisVersion()AppVersiongetAppVersionFromSequenceNumber(long target)Gets the AppVersion corresponding to the given sequence number.ClassFeatureSetgetClassFeatureSet(java.lang.String className)java.util.Collection<BugInstance>getCollection()Return the Collection storing the BugInstance objects.AppVersiongetCurrentAppVersion()Get the current AppVersion.java.lang.StringgetDataSource()java.util.Collection<? extends AnalysisError>getErrors()BugInstancegetMatching(BugInstance bugInstance)ProjectgetProject()ProjectStatsgetProjectStats()Get the project stats.java.lang.StringgetReleaseName()Get the current release name.longgetSequenceNumber()Get the sequence number of the BugCollection.java.lang.StringgetSummaryHTML()longgetTimeFinishedLoading()longgetTimestamp()Get the timestamp for the analyzed code (when it was compiled)longgetTimeStartedLoading()booleangetWithMessages()Return whether textual messages will be added to any generated XMLbooleanhasDeadBugs()private voidinvalidateHashes()booleanisApplySuppressions()booleanisMultiversion()Returns whether this bug collection contains results from multiple analysis runs, either of different version of the software or from different versions of FindBugs.java.util.Iterator<BugInstance>iterator()Return an Iterator over all the BugInstance objects in the BugCollection.BugInstancelookupFromUniqueId(java.lang.String uniqueId)Deprecated.java.util.Iterator<java.lang.String>missingClassIterator()private static java.io.IOExceptionnewIOException(java.lang.Object file, java.io.IOException e)java.io.InputStreamprogessMonitoredInputStream(java.io.File f, java.lang.String msg)java.io.InputStreamprogessMonitoredInputStream(java.net.URLConnection c, java.lang.String msg)java.io.InputStreamprogressMonitoredInputStream(java.io.InputStream in, int length, java.lang.String msg)voidreadXML(java.io.File file)Read XML data from given file into this object, populating given Project as a side effect.voidreadXML(java.io.InputStream in)Read XML data from given input stream into this object, populating the Project as a side effect.voidreadXML(java.io.InputStream in, java.io.File base)Read XML data from given input stream into this object, populating the Project as a side effect.voidreadXML(java.io.Reader reader)Read XML data from given reader into this object, populating the Project as a side effect.voidreadXML(java.lang.String fileName)Read XML data from given file into this object, populating given Project as a side effect.voidreadXML(java.net.URL u)booleanremove(BugInstance bugInstance)voidsetAnalysisTimestamp(long timestamp)Set the timestamp for when the analysis was performed.voidsetAnalysisVersion(java.lang.String version)Set the version of FindBugs used to perform the analysisvoidsetApplySuppressions(boolean applySuppressions)voidsetClassFeatureSet(ClassFeatureSet classFeatureSet)voidsetMinimalXML(boolean minimalXML)Set whether we should minimize XMLvoidsetReleaseName(java.lang.String releaseName)Set the current release name.voidsetSequenceNumber(long sequence)Set the sequence number of the BugCollection.voidsetTimestamp(long timestamp)Get the timestamp for the analyzed code (when it was compiled)voidsetWithMessages(boolean withMessages)Set whether textual messages should be added to any generated XMLorg.dom4j.DocumenttoDocument()Convert the BugCollection into a dom4j Document object.java.lang.StringtoString()voidtrimAppVersions(long numberToRetain)java.io.InputStreamwrapGzip(java.io.InputStream in, java.lang.Object source)private voidwriteBugCategories(XMLOutput xmlOutput)private voidwriteBugCodes(XMLOutput xmlOutput)private voidwriteBugPatterns(XMLOutput xmlOutput)voidwriteEpilogue(XMLOutput xmlOutput)voidwritePrologue(XMLOutput xmlOutput)voidwriteXML(XMLOutput xmlOutput)Write the BugCollection to an XMLOutput object.voidwriteXML(java.io.File file)Write this BugCollection to a file as XML.voidwriteXML(java.io.OutputStream out)Write the BugCollection to given output stream as XML using a UTF8 encoding.voidwriteXML(java.io.Writer out)Write the BugCollection to given output stream as XML.voidwriteXML(java.lang.String fileName)Write this BugCollection to a file as XML.
-
-
-
Field Detail
-
REPORT_SUMMARY_HTML
private static final boolean REPORT_SUMMARY_HTML
-
analysisTimestamp
long analysisTimestamp
-
analysisVersion
java.lang.String analysisVersion
-
earlyStats
boolean earlyStats
-
bugsPopulated
boolean bugsPopulated
-
withMessages
private boolean withMessages
-
minimalXML
private boolean minimalXML
-
applySuppressions
private boolean applySuppressions
-
timeStartedLoading
long timeStartedLoading
-
timeFinishedLoading
long timeFinishedLoading
-
dataSource
java.lang.String dataSource
-
comparator
private final java.util.Comparator<BugInstance> comparator
-
bugSet
private final java.util.TreeSet<BugInstance> bugSet
-
errorList
private final java.util.LinkedHashSet<AnalysisError> errorList
-
missingClassSet
private final java.util.TreeSet<java.lang.String> missingClassSet
-
summaryHTML
@CheckForNull private java.lang.String summaryHTML
-
project
final Project project
-
projectStats
private final ProjectStats projectStats
-
classFeatureSetMap
private final java.util.Map<java.lang.String,ClassFeatureSet> classFeatureSetMap
-
appVersionList
private final java.util.List<AppVersion> appVersionList
-
preciseHashOccurrenceNumbersAvailable
private boolean preciseHashOccurrenceNumbersAvailable
-
sequence
private long sequence
Sequence number of the most-recently analyzed version of the code.
-
releaseName
private java.lang.String releaseName
Release name of the analyzed application.
-
timestamp
private long timestamp
Current timestamp for the code being analyzed
-
-
Constructor Detail
-
SortedBugCollection
public SortedBugCollection(Project project)
-
SortedBugCollection
public SortedBugCollection(java.io.File f) throws java.io.IOException, org.dom4j.DocumentException- Throws:
java.io.IOExceptionorg.dom4j.DocumentException
-
SortedBugCollection
public SortedBugCollection()
Constructor. Creates an empty object.
-
SortedBugCollection
public SortedBugCollection(java.util.Comparator<BugInstance> comparator)
Constructor. Creates an empty object.
-
SortedBugCollection
public SortedBugCollection(ProjectStats projectStats)
Constructor. Creates an empty object given an existing ProjectStats.- Parameters:
projectStats- the ProjectStats
-
SortedBugCollection
public SortedBugCollection(ProjectStats projectStats, Project project)
-
SortedBugCollection
public SortedBugCollection(ProjectStats projectStats, java.util.Comparator<BugInstance> comparator)
Constructor. Creates an empty object given an existing ProjectStats.- Parameters:
projectStats- the ProjectStatscomparator- to use for sorting bug instances
-
SortedBugCollection
public SortedBugCollection(ProjectStats projectStats, java.util.Comparator<BugInstance> comparator, Project project)
-
-
Method Detail
-
getTimeStartedLoading
public long getTimeStartedLoading()
-
getTimeFinishedLoading
public long getTimeFinishedLoading()
-
getDataSource
public java.lang.String getDataSource()
-
getProject
public Project getProject()
- Specified by:
getProjectin interfaceBugCollection
-
isApplySuppressions
public boolean isApplySuppressions()
- Specified by:
isApplySuppressionsin interfaceBugCollection
-
setApplySuppressions
public void setApplySuppressions(boolean applySuppressions)
- Specified by:
setApplySuppressionsin interfaceBugCollection
-
getAnalysisTimestamp
public long getAnalysisTimestamp()
Description copied from interface:BugCollectionGet the timestamp for when the analysis was performed.- Specified by:
getAnalysisTimestampin interfaceBugCollection
-
setAnalysisTimestamp
public void setAnalysisTimestamp(long timestamp)
Description copied from interface:BugCollectionSet the timestamp for when the analysis was performed.- Specified by:
setAnalysisTimestampin interfaceBugCollection- Parameters:
timestamp- the analysis timestamp.
-
addAll
public void addAll(java.util.Collection<BugInstance> collection)
Add a Collection of BugInstances to this BugCollection object. This just calls add(BugInstance) for each instance in the input collection.- Parameters:
collection- the Collection of BugInstances to add
-
addAll
public void addAll(java.util.Collection<BugInstance> collection, boolean updateActiveTime)
Add a Collection of BugInstances to this BugCollection object.- Parameters:
collection- the Collection of BugInstances to addupdateActiveTime- true if active time of added BugInstances should be updated to match collection: false if not
-
add
public boolean add(BugInstance bugInstance)
Add a BugInstance to this BugCollection. This just calls add(bugInstance, true).- Specified by:
addin interfaceBugCollection- Parameters:
bugInstance- the BugInstance- Returns:
- true if the BugInstance was added, or false if a matching BugInstance was already in the BugCollection
-
addError
public void addError(java.lang.String message)
Add an analysis error.- Specified by:
addErrorin interfaceBugCollection- Parameters:
message- the error message
-
getCurrentAppVersion
public AppVersion getCurrentAppVersion()
Get the current AppVersion.- Specified by:
getCurrentAppVersionin interfaceBugCollection
-
readXML
public void readXML(java.lang.String fileName) throws java.io.IOException, org.dom4j.DocumentExceptionRead XML data from given file into this object, populating given Project as a side effect.- Specified by:
readXMLin interfaceBugCollection- Parameters:
fileName- name of the file to read- Throws:
java.io.IOExceptionorg.dom4j.DocumentException
-
readXML
public void readXML(java.io.File file) throws java.io.IOException, org.dom4j.DocumentExceptionRead XML data from given file into this object, populating given Project as a side effect.- Parameters:
file- the file- Throws:
java.io.IOExceptionorg.dom4j.DocumentException
-
newIOException
private static java.io.IOException newIOException(java.lang.Object file, java.io.IOException e)
-
readXML
public void readXML(java.net.URL u) throws java.io.IOException, org.dom4j.DocumentException- Throws:
java.io.IOExceptionorg.dom4j.DocumentException
-
readXML
public void readXML(@WillClose java.io.InputStream in, java.io.File base) throws java.io.IOException, org.dom4j.DocumentExceptionRead XML data from given input stream into this object, populating the Project as a side effect. An attempt will be made to close the input stream (even if an exception is thrown).- Parameters:
in- the InputStream- Throws:
java.io.IOExceptionorg.dom4j.DocumentException
-
readXML
public void readXML(@WillClose java.io.InputStream in) throws java.io.IOException, org.dom4j.DocumentExceptionDescription copied from interface:BugCollectionRead XML data from given input stream into this object, populating the Project as a side effect. An attempt will be made to close the input stream (even if an exception is thrown).- Specified by:
readXMLin interfaceBugCollection- Parameters:
in- the InputStream- Throws:
java.io.IOExceptionorg.dom4j.DocumentException
-
readXML
public void readXML(@WillClose java.io.Reader reader) throws java.io.IOException, org.dom4j.DocumentExceptionDescription copied from interface:BugCollectionRead XML data from given reader into this object, populating the Project as a side effect. An attempt will be made to close the reader (even if an exception is thrown).- Specified by:
readXMLin interfaceBugCollection- Parameters:
reader- the Reader- Throws:
java.io.IOExceptionorg.dom4j.DocumentException
-
doReadXML
private void doReadXML(@WillClose java.io.InputStream in, @CheckForNull java.io.File base) throws java.io.IOException, org.dom4j.DocumentException- Throws:
java.io.IOExceptionorg.dom4j.DocumentException
-
doReadXML
private void doReadXML(@WillClose java.io.Reader reader, @CheckForNull java.io.File base) throws java.io.IOException, org.dom4j.DocumentException- Throws:
java.io.IOExceptionorg.dom4j.DocumentException
-
writeXML
public void writeXML(java.io.OutputStream out) throws java.io.IOExceptionDescription copied from interface:BugCollectionWrite the BugCollection to given output stream as XML using a UTF8 encoding. The output stream will be closed, even if an exception is thrown.- Specified by:
writeXMLin interfaceBugCollection- Parameters:
out- the OutputStream to write to- Throws:
java.io.IOException
-
writeXML
public void writeXML(java.lang.String fileName) throws java.io.IOExceptionWrite this BugCollection to a file as XML.- Specified by:
writeXMLin interfaceBugCollection- Parameters:
fileName- the file to write to- Throws:
java.io.IOException
-
writeXML
public void writeXML(java.io.File file) throws java.io.IOExceptionWrite this BugCollection to a file as XML.- Parameters:
file- the file to write to- Throws:
java.io.IOException
-
toDocument
public org.dom4j.Document toDocument()
Convert the BugCollection into a dom4j Document object.- Specified by:
toDocumentin interfaceBugCollection- Returns:
- the Document representing the BugCollection as a dom4j tree
-
writeXML
public void writeXML(@WillClose java.io.Writer out) throws java.io.IOExceptionWrite the BugCollection to given output stream as XML. The output stream will be closed, even if an exception is thrown.- Specified by:
writeXMLin interfaceBugCollection- Parameters:
out- the OutputStream to write to- Throws:
java.io.IOException
-
writePrologue
public void writePrologue(XMLOutput xmlOutput) throws java.io.IOException
- Specified by:
writeProloguein interfaceBugCollection- Throws:
java.io.IOException
-
computeBugHashes
public void computeBugHashes()
-
writeXML
public void writeXML(@WillClose XMLOutput xmlOutput) throws java.io.IOExceptionWrite the BugCollection to an XMLOutput object. The finish() method of the XMLOutput object is guaranteed to be called.To write the SummaryHTML element, set property findbugs.report.SummaryHTML to "true".
- Specified by:
writeXMLin interfaceBugCollection- Parameters:
xmlOutput- the XMLOutput object- Throws:
java.io.IOException
-
commonPrefix
int commonPrefix(java.lang.String s1, java.lang.String s2)
-
writeEpilogue
public void writeEpilogue(XMLOutput xmlOutput) throws java.io.IOException
- Specified by:
writeEpiloguein interfaceBugCollection- Throws:
java.io.IOException
-
writeBugPatterns
private void writeBugPatterns(XMLOutput xmlOutput) throws java.io.IOException
- Throws:
java.io.IOException
-
writeBugCodes
private void writeBugCodes(XMLOutput xmlOutput) throws java.io.IOException
- Throws:
java.io.IOException
-
writeBugCategories
private void writeBugCategories(XMLOutput xmlOutput) throws java.io.IOException
- Throws:
java.io.IOException
-
emitErrors
private void emitErrors(XMLOutput xmlOutput) throws java.io.IOException
- Throws:
java.io.IOException
-
checkInputStream
private static void checkInputStream(@WillNotClose java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
cloneAll
public static void cloneAll(java.util.Collection<BugInstance> dest, java.util.Collection<BugInstance> source)
Clone all of the BugInstance objects in the source Collection and add them to the destination Collection.- Parameters:
dest- the destination Collectionsource- the source Collection
-
add
public boolean add(BugInstance bugInstance, boolean updateActiveTime)
Description copied from interface:BugCollectionAdd a BugInstance to this BugCollection.- Specified by:
addin interfaceBugCollection- Parameters:
bugInstance- the BugInstanceupdateActiveTime- true if the warning's active time should be updated to include the collection's current time- Returns:
- true if the BugInstance was added, or false if a matching BugInstance was already in the BugCollection
-
invalidateHashes
private void invalidateHashes()
-
remove
public boolean remove(BugInstance bugInstance)
-
iterator
public java.util.Iterator<BugInstance> iterator()
Description copied from interface:BugCollectionReturn an Iterator over all the BugInstance objects in the BugCollection.- Specified by:
iteratorin interfaceBugCollection- Specified by:
iteratorin interfacejava.lang.Iterable<BugInstance>
-
getCollection
public java.util.Collection<BugInstance> getCollection()
Description copied from interface:BugCollectionReturn the Collection storing the BugInstance objects.- Specified by:
getCollectionin interfaceBugCollection
-
addError
public void addError(java.lang.String message, java.lang.Throwable exception)
-
addError
public void addError(AnalysisError error)
Description copied from interface:BugCollectionAdd an analysis error.- Specified by:
addErrorin interfaceBugCollection- Parameters:
error- the AnalysisError object to add
-
clearErrors
public void clearErrors()
-
addMissingClass
public void addMissingClass(java.lang.String className)
Description copied from interface:BugCollectionAdd a missing class message.- Specified by:
addMissingClassin interfaceBugCollection- Parameters:
className- the missing class message
-
getErrors
public java.util.Collection<? extends AnalysisError> getErrors()
-
missingClassIterator
public java.util.Iterator<java.lang.String> missingClassIterator()
-
contains
public boolean contains(BugInstance bugInstance)
-
getMatching
public BugInstance getMatching(BugInstance bugInstance)
-
getSummaryHTML
public java.lang.String getSummaryHTML() throws java.io.IOException- Throws:
java.io.IOException
-
getProjectStats
public ProjectStats getProjectStats()
Description copied from interface:BugCollectionGet the project stats.- Specified by:
getProjectStatsin interfaceBugCollection
-
lookupFromUniqueId
@Deprecated public BugInstance lookupFromUniqueId(java.lang.String uniqueId)
Deprecated.Description copied from interface:BugCollectionLook up a BugInstance by its unique id.- Specified by:
lookupFromUniqueIdin interfaceBugCollection- Parameters:
uniqueId- the BugInstance's unique id.- Returns:
- the BugInstance with the given unique id, or null if there is no such BugInstance This is deprecated; uniqueIDs are not persistent.
-
isMultiversion
public boolean isMultiversion()
Returns whether this bug collection contains results from multiple analysis runs, either of different version of the software or from different versions of FindBugs.- Specified by:
isMultiversionin interfaceBugCollection
-
hasDeadBugs
public boolean hasDeadBugs()
- Specified by:
hasDeadBugsin interfaceBugCollection
-
getSequenceNumber
public long getSequenceNumber()
Description copied from interface:BugCollectionGet the sequence number of the BugCollection. This value represents the number of times the user has analyzed a different version of the application and updated the historical bug collection using the UpdateBugCollection class.- Specified by:
getSequenceNumberin interfaceBugCollection- Returns:
- the sequence number
-
setSequenceNumber
public void setSequenceNumber(long sequence)
Description copied from interface:BugCollectionSet the sequence number of the BugCollection.- Specified by:
setSequenceNumberin interfaceBugCollection- Parameters:
sequence- the sequence number- See Also:
BugCollection.getSequenceNumber()
-
duplicate
public SortedBugCollection duplicate()
-
createEmptyCollectionWithMetadata
public SortedBugCollection createEmptyCollectionWithMetadata()
Description copied from interface:BugCollectionCreate a new empty BugCollection with the same metadata as this one.- Specified by:
createEmptyCollectionWithMetadatain interfaceBugCollection- Returns:
- a new empty BugCollection with the same metadata as this one
-
clearBugInstances
public void clearBugInstances()
-
clearMissingClasses
public void clearMissingClasses()
- Specified by:
clearMissingClassesin interfaceBugCollection
-
getReleaseName
public java.lang.String getReleaseName()
Description copied from interface:BugCollectionGet the current release name.- Specified by:
getReleaseNamein interfaceBugCollection- Returns:
- current release name
-
setReleaseName
public void setReleaseName(java.lang.String releaseName)
Description copied from interface:BugCollectionSet the current release name.- Specified by:
setReleaseNamein interfaceBugCollection- Parameters:
releaseName- the current release name
-
appVersionIterator
public java.util.Iterator<AppVersion> appVersionIterator()
Description copied from interface:BugCollectionGet an Iterator over AppVersions defined in the collection.- Specified by:
appVersionIteratorin interfaceBugCollection
-
addAppVersion
public void addAppVersion(AppVersion appVersion)
Description copied from interface:BugCollectionAdd an AppVersion representing a version of the analyzed application.- Specified by:
addAppVersionin interfaceBugCollection- Parameters:
appVersion- the AppVersion
-
clearAppVersions
public void clearAppVersions()
Description copied from interface:BugCollectionClear all AppVersions representing previously-analyzed versions of the application.- Specified by:
clearAppVersionsin interfaceBugCollection
-
trimAppVersions
public void trimAppVersions(long numberToRetain)
-
setTimestamp
public void setTimestamp(long timestamp)
Description copied from interface:BugCollectionGet the timestamp for the analyzed code (when it was compiled)- Specified by:
setTimestampin interfaceBugCollection- Parameters:
timestamp- the timestamp.
-
getTimestamp
public long getTimestamp()
Description copied from interface:BugCollectionGet the timestamp for the analyzed code (when it was compiled)- Specified by:
getTimestampin interfaceBugCollection
-
getClassFeatureSet
public ClassFeatureSet getClassFeatureSet(java.lang.String className)
-
setClassFeatureSet
public void setClassFeatureSet(ClassFeatureSet classFeatureSet)
- Specified by:
setClassFeatureSetin interfaceBugCollection
-
classFeatureSetIterator
public java.util.Iterator<ClassFeatureSet> classFeatureSetIterator()
-
clearClassFeatures
public void clearClassFeatures()
- Specified by:
clearClassFeaturesin interfaceBugCollection
-
setWithMessages
public void setWithMessages(boolean withMessages)
Description copied from interface:BugCollectionSet whether textual messages should be added to any generated XML- Specified by:
setWithMessagesin interfaceBugCollection
-
getWithMessages
public boolean getWithMessages()
Description copied from interface:BugCollectionReturn whether textual messages will be added to any generated XML- Specified by:
getWithMessagesin interfaceBugCollection
-
getAppVersionFromSequenceNumber
public AppVersion getAppVersionFromSequenceNumber(long target)
Description copied from interface:BugCollectionGets the AppVersion corresponding to the given sequence number.- Specified by:
getAppVersionFromSequenceNumberin interfaceBugCollection
-
findBug
public BugInstance findBug(java.lang.String instanceHash, java.lang.String bugType, int lineNumber)
- Specified by:
findBugin interfaceBugCollection
-
setAnalysisVersion
public void setAnalysisVersion(java.lang.String version)
Description copied from interface:BugCollectionSet the version of FindBugs used to perform the analysis- Specified by:
setAnalysisVersionin interfaceBugCollection- Parameters:
version- the analysis version.
-
getAnalysisVersion
public java.lang.String getAnalysisVersion()
-
progessMonitoredInputStream
public java.io.InputStream progessMonitoredInputStream(java.io.File f, java.lang.String msg) throws java.io.IOException- Throws:
java.io.IOException
-
progessMonitoredInputStream
public java.io.InputStream progessMonitoredInputStream(java.net.URLConnection c, java.lang.String msg) throws java.io.IOException- Throws:
java.io.IOException
-
progressMonitoredInputStream
public java.io.InputStream progressMonitoredInputStream(java.io.InputStream in, int length, java.lang.String msg)
-
wrapGzip
public java.io.InputStream wrapGzip(java.io.InputStream in, java.lang.Object source)
-
setMinimalXML
public void setMinimalXML(boolean minimalXML)
Description copied from interface:BugCollectionSet whether we should minimize XML- Specified by:
setMinimalXMLin interfaceBugCollection
-
bugsPopulated
public void bugsPopulated()
- Specified by:
bugsPopulatedin interfaceBugCollection
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-