Package | Description |
---|---|
edu.umd.cs.findbugs |
Main package for the FindBugs application - contains the engine class
(
FindBugs ), the object model classes for bug
instances (BugInstance ,
BugAnnotation ), and other miscellany. |
edu.umd.cs.findbugs.bugReporter | |
edu.umd.cs.findbugs.config | |
edu.umd.cs.findbugs.detect | |
edu.umd.cs.findbugs.filter | |
edu.umd.cs.findbugs.props |
Modifier and Type | Method and Description |
---|---|
BugInstance |
BugInstance.add(BugAnnotation annotation) |
BugInstance |
BugInstance.addAnnotations(java.util.Collection<? extends BugAnnotation> annotationCollection)
Add a Collection of BugAnnotations.
|
BugInstance |
BugInstance.addCalledMethod(org.apache.bcel.generic.ConstantPoolGen cpg,
org.apache.bcel.generic.InvokeInstruction inv)
Add a method annotation for the method which is called by given
instruction.
|
BugInstance |
BugInstance.addCalledMethod(DismantleBytecode visitor)
Add a method annotation for the method which has been called by the
method currently being visited by given visitor.
|
BugInstance |
BugInstance.addCalledMethod(org.apache.bcel.generic.MethodGen methodGen,
org.apache.bcel.generic.InvokeInstruction inv)
Add a method annotation for the method which is called by given
instruction.
|
BugInstance |
BugInstance.addCalledMethod(java.lang.String className,
java.lang.String methodName,
java.lang.String methodSig,
boolean isStatic)
Add a method annotation.
|
BugInstance |
BugInstance.addCalledMethod(XMethod m) |
BugInstance |
BugInstance.addClass(ClassDescriptor classDescriptor)
Add a class annotation.
|
BugInstance |
BugInstance.addClass(org.objectweb.asm.tree.ClassNode classNode)
Add a class annotation for the classNode.
|
BugInstance |
BugInstance.addClass(org.apache.bcel.classfile.JavaClass jclass)
Add a class annotation.
|
BugInstance |
BugInstance.addClass(PreorderVisitor visitor)
Add a class annotation for the class that the visitor is currently
visiting.
|
BugInstance |
BugInstance.addClass(java.lang.String className)
Add a class annotation.
|
BugInstance |
BugInstance.addClass(java.lang.String className,
java.lang.String sourceFileName)
Add a class annotation.
|
BugInstance |
BugInstance.addClassAndMethod(org.apache.bcel.classfile.JavaClass javaClass,
org.apache.bcel.classfile.Method method)
Add class and method annotations for given class and method.
|
BugInstance |
BugInstance.addClassAndMethod(MethodAnnotation methodAnnotation)
Add class and method annotations for given method.
|
BugInstance |
BugInstance.addClassAndMethod(MethodDescriptor methodDescriptor) |
BugInstance |
BugInstance.addClassAndMethod(org.apache.bcel.generic.MethodGen methodGen,
java.lang.String sourceFile)
Add class and method annotations for given method.
|
BugInstance |
BugInstance.addClassAndMethod(PreorderVisitor visitor)
Add a class annotation and a method annotation for the class and method
which the given visitor is currently visiting.
|
BugInstance |
BugInstance.addClassAndMethod(XMethod xMethod) |
BugInstance |
BugInstance.addEqualsMethodUsed(ClassDescriptor expectedClass) |
BugInstance |
BugInstance.addEqualsMethodUsed(java.util.Collection<XMethod> equalsMethods) |
BugInstance |
BugInstance.addField(FieldAnnotation fieldAnnotation)
Add a field annotation
|
BugInstance |
BugInstance.addField(FieldDescriptor fieldDescriptor)
Add a field annotation for a FieldDescriptor.
|
BugInstance |
BugInstance.addField(FieldVariable field)
Add a field annotation for a FieldVariable matched in a ByteCodePattern.
|
BugInstance |
BugInstance.addField(PreorderVisitor visitor) |
BugInstance |
BugInstance.addField(java.lang.String className,
java.lang.String fieldName,
java.lang.String fieldSig,
boolean isStatic)
Add a field annotation.
|
BugInstance |
BugInstance.addField(java.lang.String className,
java.lang.String fieldName,
java.lang.String fieldSig,
int accessFlags)
Add a field annotation.
|
BugInstance |
BugInstance.addField(XField xfield)
Add a field annotation for an XField.
|
BugInstance |
BugInstance.addFieldOrMethodValueSource(OpcodeStack.Item item) |
BugInstance |
BugInstance.addFoundAndExpectedType(java.lang.String foundType,
java.lang.String expectedType) |
BugInstance |
BugInstance.addFoundAndExpectedType(org.apache.bcel.generic.Type foundType,
org.apache.bcel.generic.Type expectedType) |
BugInstance |
BugInstance.addInt(int value)
Add an integer annotation.
|
BugInstance |
BugInstance.addMethod(JavaClassAndMethod classAndMethod)
Add a method annotation.
|
BugInstance |
BugInstance.addMethod(org.apache.bcel.classfile.JavaClass javaClass,
org.apache.bcel.classfile.Method method)
Add a method annotation.
|
BugInstance |
BugInstance.addMethod(MethodAnnotation methodAnnotation)
Add a method annotation.
|
BugInstance |
BugInstance.addMethod(MethodDescriptor method)
Add a MethodAnnotation from an MethodDescriptor.
|
BugInstance |
BugInstance.addMethod(org.apache.bcel.generic.MethodGen methodGen,
java.lang.String sourceFile)
Add a method annotation.
|
BugInstance |
BugInstance.addMethod(PreorderVisitor visitor)
Add a method annotation for the method which the given visitor is
currently visiting.
|
BugInstance |
BugInstance.addMethod(java.lang.String className,
java.lang.String methodName,
java.lang.String methodSig,
boolean isStatic)
Add a method annotation.
|
BugInstance |
BugInstance.addMethod(java.lang.String className,
java.lang.String methodName,
java.lang.String methodSig,
int accessFlags)
Add a method annotation.
|
BugInstance |
BugInstance.addMethod(XMethod xmethod)
Add a MethodAnnotation from an XMethod.
|
BugInstance |
BugInstance.addOptionalAnnotation(BugAnnotation annotation) |
BugInstance |
BugInstance.addOptionalAnnotation(BugAnnotation annotation,
java.lang.String role) |
BugInstance |
BugInstance.addOptionalField(XField xfield)
Add a field annotation for an XField.
|
BugInstance |
BugInstance.addOptionalLocalVariable(DismantleBytecode dbc,
OpcodeStack.Item item)
Local variable adders
|
BugInstance |
BugInstance.addOptionalUniqueAnnotations(BugAnnotation... annotations) |
BugInstance |
BugInstance.addOptionalUniqueAnnotationsWithFallback(BugAnnotation fallback,
BugAnnotation... annotations) |
BugInstance |
BugInstance.addParameterAnnotation(int index,
java.lang.String role)
Add an annotation about a parameter
|
BugInstance |
BugInstance.addReferencedField(DismantleBytecode visitor)
Add a field annotation for the field which has just been accessed by the
method currently being visited by given visitor.
|
BugInstance |
BugInstance.addReferencedField(FieldAnnotation fa)
Add a field annotation for the field referenced by the FieldAnnotation
parameter
|
BugInstance |
BugInstance.addSomeSourceForTopTwoStackValues(ClassContext classContext,
org.apache.bcel.classfile.Method method,
Location location) |
BugInstance |
BugInstance.addSourceForTopStackValue(ClassContext classContext,
org.apache.bcel.classfile.Method method,
Location location) |
BugInstance |
BugInstance.addSourceLine(BytecodeScanningDetector visitor)
Add a source line annotation for instruction currently being visited by
given visitor.
|
BugInstance |
BugInstance.addSourceLine(BytecodeScanningDetector visitor,
int pc)
Add a source line annotation for instruction whose PC is given in the
method that the given visitor is currently visiting.
|
BugInstance |
BugInstance.addSourceLine(ClassContext classContext,
org.apache.bcel.generic.MethodGen methodGen,
java.lang.String sourceFile,
org.apache.bcel.generic.InstructionHandle handle)
Add a source line annotation for the given instruction in the given
method.
|
BugInstance |
BugInstance.addSourceLine(ClassContext classContext,
org.apache.bcel.generic.MethodGen methodGen,
java.lang.String sourceFile,
org.apache.bcel.generic.InstructionHandle start,
org.apache.bcel.generic.InstructionHandle end)
Add a source line annotation describing a range of instructions.
|
BugInstance |
BugInstance.addSourceLine(ClassContext classContext,
org.apache.bcel.classfile.Method method,
org.apache.bcel.generic.InstructionHandle handle)
Add source line annotation for given Location in a method.
|
BugInstance |
BugInstance.addSourceLine(ClassContext classContext,
org.apache.bcel.classfile.Method method,
Location location)
Add source line annotation for given Location in a method.
|
BugInstance |
BugInstance.addSourceLine(ClassContext classContext,
PreorderVisitor visitor,
int pc)
Add a source line annotation for instruction whose PC is given in the
method that the given visitor is currently visiting.
|
BugInstance |
BugInstance.addSourceLine(MethodDescriptor methodDescriptor,
Location location)
Add source line annotation for given Location in a method.
|
BugInstance |
BugInstance.addSourceLine(SourceLineAnnotation sourceLine)
Add a source line annotation.
|
BugInstance |
BugInstance.addSourceLineRange(BytecodeScanningDetector visitor,
int startPC,
int endPC)
Add a source line annotation describing the source line numbers for a
range of instructions in the method being visited by the given visitor.
|
BugInstance |
BugInstance.addSourceLineRange(ClassContext classContext,
PreorderVisitor visitor,
int startPC,
int endPC)
Add a source line annotation describing the source line numbers for a
range of instructions in the method being visited by the given visitor.
|
BugInstance |
BugInstance.addString(char c)
Add a String annotation.
|
BugInstance |
BugInstance.addString(java.lang.String value)
Add a String annotation.
|
BugInstance |
BugInstance.addSuperclass(PreorderVisitor visitor)
Add a class annotation for the superclass of the class the visitor is
currently visiting.
|
BugInstance |
BugInstance.addType(ClassDescriptor c) |
BugInstance |
BugInstance.addType(java.lang.String typeDescriptor)
Add a type annotation.
|
BugInstance |
BugInstance.addType(org.apache.bcel.generic.Type type) |
BugInstance |
BugInstance.addTypeOfNamedClass(java.lang.String typeName) |
BugInstance |
BugInstance.addUnknownSourceLine(java.lang.String className,
java.lang.String sourceFile)
Add a non-specific source line annotation.
|
BugInstance |
BugInstance.addValueSource(OpcodeStack.Item item,
DismantleBytecode dbc) |
BugInstance |
BugInstance.addValueSource(OpcodeStack.Item item,
org.apache.bcel.classfile.Method method,
int pc) |
BugInstance |
BugInstance.addVisitedField(PreorderVisitor visitor)
Add a field annotation for the field which is being visited by given
visitor.
|
BugInstance |
BugInstance.describe(java.lang.String description)
Add a description to the most recently added bug annotation.
|
BugInstance |
SortedBugCollection.findBug(java.lang.String instanceHash,
java.lang.String bugType,
int lineNumber) |
BugInstance |
BugCollection.findBug(java.lang.String instanceHash,
java.lang.String bugType,
int lineNumber) |
BugInstance |
SortedBugCollection.getMatching(BugInstance bugInstance) |
BugInstance |
SortedBugCollection.lookupFromUniqueId(java.lang.String uniqueId)
Deprecated.
|
BugInstance |
BugCollection.lookupFromUniqueId(java.lang.String uniqueId)
Deprecated.
|
BugInstance |
BugInstance.lowerPriorityIfDeprecated() |
static BugInstance |
Obfuscate.obfuscate(BugInstance b) |
BugInstance |
BugInstance.setProperty(java.lang.String name,
java.lang.String value)
Set value of given property.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<BugInstance> |
SortedBugCollection.getCollection() |
java.util.Collection<BugInstance> |
BugCollection.getCollection()
Return the Collection storing the BugInstance objects.
|
java.util.Iterator<BugInstance> |
SortedBugCollection.iterator() |
java.util.Iterator<BugInstance> |
BugCollection.iterator()
Return an Iterator over all the BugInstance objects in the BugCollection.
|
java.lang.Iterable<? extends BugInstance> |
BugAccumulator.uniqueBugs() |
Modifier and Type | Method and Description |
---|---|
void |
BugAccumulator.accumulateBug(BugInstance bug,
BytecodeScanningDetector visitor)
Accumulate a warning at source location currently being visited by given
BytecodeScanningDetector.
|
void |
BugAccumulator.accumulateBug(BugInstance bug,
ClassContext classContext,
org.apache.bcel.generic.MethodGen methodGen,
java.lang.String sourceFile,
Location location) |
void |
BugAccumulator.accumulateBug(BugInstance bug,
ClassContext classContext,
org.apache.bcel.classfile.Method method,
Location location) |
void |
BugAccumulator.accumulateBug(BugInstance bug,
SourceLineAnnotation sourceLine)
Accumulate a warning at given source location.
|
boolean |
SortedBugCollection.add(BugInstance bugInstance)
Add a BugInstance to this BugCollection.
|
boolean |
BugCollection.add(BugInstance bugInstance)
Add a BugInstance to this BugCollection.
|
boolean |
SortedBugCollection.add(BugInstance bugInstance,
boolean updateActiveTime) |
boolean |
BugCollection.add(BugInstance bugInstance,
boolean updateActiveTime)
Add a BugInstance to this BugCollection.
|
void |
ProjectStats.addBug(BugInstance bug)
Called when a bug is reported.
|
void |
PackageStats.addError(BugInstance bug) |
protected void |
TextUIBugReporter.checkBugInstance(BugInstance bugInstance)
For debugging: check a BugInstance to make sure it is valid.
|
int |
SloppyBugComparator.compare(BugInstance lhs,
BugInstance rhs) |
int |
WarningComparator.compare(BugInstance lhs,
BugInstance rhs) |
int |
FuzzyBugComparator.compare(BugInstance lhs,
BugInstance rhs) |
int |
SortedBugCollection.BugInstanceComparator.compare(BugInstance lhs,
BugInstance rhs) |
int |
SortedBugCollection.MultiversionBugInstanceComparator.compare(BugInstance lhs,
BugInstance rhs) |
int |
VersionInsensitiveBugComparator.compare(BugInstance lhs,
BugInstance rhs) |
int |
BugInstance.compareTo(BugInstance other) |
boolean |
SortedBugCollection.contains(BugInstance bugInstance) |
void |
ProjectPackagePrefixes.countBug(BugInstance b) |
protected abstract void |
AbstractBugReporter.doReportBug(BugInstance bugInstance)
Subclasses must override this.
|
protected void |
PrintingBugReporter.doReportBug(BugInstance bugInstance) |
protected void |
EmacsBugReporter.doReportBug(BugInstance bugInstance) |
void |
SortingBugReporter.doReportBug(BugInstance bugInstance) |
void |
XDocsBugReporter.doReportBug(BugInstance bugInstance) |
void |
BugCollectionBugReporter.doReportBug(BugInstance bugInstance) |
static int |
BugRanker.findRank(BugInstance bug) |
BugInstance |
SortedBugCollection.getMatching(BugInstance bugInstance) |
java.lang.Iterable<? extends SourceLineAnnotation> |
BugAccumulator.locations(BugInstance bug) |
boolean |
SuppressionMatcher.match(BugInstance b) |
boolean |
WarningSuppressor.match(BugInstance bugInstance) |
boolean |
FieldWarningSuppressor.match(BugInstance bugInstance) |
boolean |
ClassWarningSuppressor.match(BugInstance bugInstance) |
boolean |
MethodWarningSuppressor.match(BugInstance bugInstance) |
boolean |
PackageWarningSuppressor.match(BugInstance bugInstance) |
boolean |
ParameterWarningSuppressor.match(BugInstance bugInstance) |
protected void |
AbstractBugReporter.notifyObservers(BugInstance bugInstance)
This should be called when a bug is reported by a subclass.
|
static BugInstance |
Obfuscate.obfuscate(BugInstance b) |
protected void |
EmacsBugReporter.printBug(BugInstance bugInstance) |
protected void |
XDocsBugReporter.printBug(BugInstance bugInstance) |
protected void |
TextUIBugReporter.printBug(BugInstance bugInstance)
Print bug in one-line format.
|
boolean |
SortedBugCollection.remove(BugInstance bugInstance) |
void |
AbstractBugReporter.reportBug(BugInstance bugInstance) |
void |
DelegatingBugReporter.reportBug(BugInstance bugInstance) |
void |
BugReporter.reportBug(BugInstance bugInstance)
Report a bug.
|
void |
FilterBugReporter.reportBug(BugInstance bugInstance) |
void |
BugReporterObserver.reportBug(BugInstance bugInstance)
Called when a BugReporter reports a bug.
|
void |
CategoryFilteringBugReporter.reportBug(BugInstance bugInstance) |
void |
ExcludingHashesBugReporter.reportBug(BugInstance bugInstance) |
void |
BugAccumulator.reportBug(BugInstance bug,
edu.umd.cs.findbugs.BugAccumulator.Data d) |
void |
BugInstance.setHistory(BugInstance from) |
void |
XDocsBugReporter.toElement(BugInstance bugInstance) |
Modifier and Type | Method and Description |
---|---|
void |
SortedBugCollection.addAll(java.util.Collection<BugInstance> collection)
Add a Collection of BugInstances to this BugCollection object.
|
void |
SortedBugCollection.addAll(java.util.Collection<BugInstance> collection,
boolean updateActiveTime)
Add a Collection of BugInstances to this BugCollection object.
|
static void |
SortedBugCollection.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.
|
static void |
SortedBugCollection.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.
|
Constructor and Description |
---|
SortedBugCollection(java.util.Comparator<BugInstance> comparator)
Constructor.
|
SortedBugCollection(ProjectStats projectStats,
java.util.Comparator<BugInstance> comparator)
Constructor.
|
SortedBugCollection(ProjectStats projectStats,
java.util.Comparator<BugInstance> comparator,
Project project) |
Modifier and Type | Method and Description |
---|---|
void |
MaxRankDecorator.reportBug(BugInstance bugInstance) |
void |
SuppressionDecorator.reportBug(BugInstance bugInstance) |
Modifier and Type | Method and Description |
---|---|
boolean |
ProjectFilterSettings.displayWarning(BugInstance bugInstance)
Return whether or not a warning should be displayed, according to the
project filter settings.
|
Modifier and Type | Method and Description |
---|---|
BugInstance |
CheckExpectedWarnings.makeWarning(java.lang.String bugPattern,
java.lang.Object descriptor,
int priority,
ClassDescriptor cd)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
TrainUnconditionalDerefParams.reportBug(BugInstance bug) |
protected void |
NoteUnconditionalParamDerefs.reportBug(BugInstance bug) |
void |
FindBugsSummaryStats.reportBug(BugInstance bug) |
protected abstract void |
BuildUnconditionalParamDerefDatabase.reportBug(BugInstance bug) |
Modifier and Type | Method and Description |
---|---|
void |
CheckExpectedWarnings.checkAnnotation(java.lang.String bugCode,
java.util.Collection<BugInstance> warnings,
boolean expectWarnings,
int priority,
java.lang.Integer rank,
java.lang.Integer num,
java.lang.Object methodDescriptor,
int minPriority,
ClassDescriptor cd)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
OrMatcher.match(BugInstance bugInstance) |
boolean |
SourceMatcher.match(BugInstance bugInstance) |
boolean |
LocalMatcher.match(BugInstance bugInstance) |
boolean |
LastVersionMatcher.match(BugInstance bugInstance) |
boolean |
FirstVersionMatcher.match(BugInstance bugInstance) |
boolean |
PriorityMatcher.match(BugInstance bugInstance) |
boolean |
MethodMatcher.match(BugInstance bugInstance) |
boolean |
BugMatcher.match(BugInstance bugInstance) |
boolean |
ClassMatcher.match(BugInstance bugInstance) |
boolean |
FieldMatcher.match(BugInstance bugInstance) |
boolean |
TypeMatcher.match(BugInstance bugInstance) |
boolean |
AndMatcher.match(BugInstance bugInstance) |
boolean |
NotMatcher.match(BugInstance bugInstance) |
boolean |
Filter.match(BugInstance bugInstance) |
boolean |
RankMatcher.match(BugInstance bugInstance) |
boolean |
ConfidenceMatcher.match(BugInstance bugInstance) |
boolean |
Matcher.match(BugInstance bugInstance)
Determine whether or not the given BugInstance has the feature this
Matcher tests for.
|
Modifier and Type | Method and Description |
---|---|
void |
WarningPropertySet.decorateBugInstance(BugInstance bugInstance)
Decorate given BugInstance with properties.
|
SpotBugs is licensed under the LGPL.