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.ba |
A bytecode analysis framework for BCEL, providing CFG construction,
generic dataflow analysis, and a variety of specific dataflow analyses.
|
edu.umd.cs.findbugs.ba.deref | |
edu.umd.cs.findbugs.ba.jsr305 |
Support for analyzing code containing JSR-305 type qualifier annotations.
|
edu.umd.cs.findbugs.ba.npe | |
edu.umd.cs.findbugs.ba.type | |
edu.umd.cs.findbugs.ba.vna | |
edu.umd.cs.findbugs.classfile.engine.bcel |
Support for analyses based on the BCEL bytecode framework.
|
edu.umd.cs.findbugs.detect | |
edu.umd.cs.findbugs.props |
Modifier and Type | Method and Description |
---|---|
Location |
ResourceCreationPoint.getLocation()
Get the location where the resource is created.
|
Location |
CallSite.getLocation()
Get the Location (basic block and instruction) where the call site is
located.
|
Modifier and Type | Method and Description |
---|---|
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 |
ResourceCollection.addCreatedResource(Location location,
Resource resource)
Add a resource created within the analyzed method.
|
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(ClassContext classContext,
org.apache.bcel.classfile.Method method,
Location location)
Add source line annotation for given Location in a method.
|
BugInstance |
BugInstance.addSourceLine(MethodDescriptor methodDescriptor,
Location location)
Add source line annotation for given Location in a method.
|
static SourceLineAnnotation |
SourceLineAnnotation.fromVisitedInstruction(ClassContext classContext,
org.apache.bcel.classfile.Method method,
Location loc)
Create from Method and Location in a visited class.
|
static SourceLineAnnotation |
SourceLineAnnotation.fromVisitedInstruction(MethodDescriptor methodDescriptor,
Location location)
Create from MethodDescriptor and Location of visited instruction.
|
Resource |
ResourceCollection.getCreatedResource(Location location)
Get the resource that is created at given location.
|
static LocalVariableAnnotation |
LocalVariableAnnotation.getLocalVariableAnnotation(org.apache.bcel.classfile.Method method,
Location location,
org.apache.bcel.generic.IndexedInstruction ins) |
static BugAnnotation |
BugInstance.getSomeSource(ClassContext classContext,
org.apache.bcel.classfile.Method method,
Location location,
OpcodeStack stack,
int stackPos) |
static BugAnnotation |
BugInstance.getSourceForStackValue(ClassContext classContext,
org.apache.bcel.classfile.Method method,
Location location,
int depth) |
static BugAnnotation |
BugInstance.getSourceForTopStackValue(ClassContext classContext,
org.apache.bcel.classfile.Method method,
Location location) |
Constructor and Description |
---|
ResourceCreationPoint(Location location,
java.lang.String resourceClass)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Location |
CFG.getExceptionThrowerLocation(Edge exceptionEdge)
Get the Location where exception(s) thrown on given exception edge are
thrown.
|
static Location |
Location.getFirstLocation(BasicBlock basicBlock) |
static Location |
Location.getLastLocation(BasicBlock basicBlock) |
Location |
AbstractFrameModelingVisitor.getLocation()
Get the Location.
|
Location |
CompactLocationNumbering.getLocation(int number)
Get the Location given its number.
|
Location |
CFG.getLocationAtEntry()
Get the Location representing the entry to the CFG.
|
Location |
CFG.getPreviousLocation(Location loc) |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<Location> |
CFG.getLocationsContainingInstructionWithOffset(int offset)
Get a Collection of Locations which specify the instruction at given
bytecode offset.
|
java.util.Iterator<Location> |
CFG.locationIterator()
Get an Iterator over the Locations in the control flow graph.
|
java.lang.Iterable<Location> |
CFG.locations()
Get an Iterator over the Locations in the control flow graph.
|
java.util.Collection<Location> |
CFG.orderedLocations()
Returns a collection of locations, ordered according to the compareTo
ordering over locations.
|
Modifier and Type | Method and Description |
---|---|
int |
Location.compareTo(Location other) |
Fact |
DataflowAnalysis.getFactAfterLocation(Location location)
Get the dataflow fact representing the point just after given Location.
|
Fact |
Dataflow.getFactAfterLocation(Location location)
Get the dataflow fact representing the point just after given Location.
|
Fact |
BasicAbstractDataflowAnalysis.getFactAfterLocation(Location location)
Get the dataflow fact representing the point just after given Location.
|
Fact |
AbstractDataflowAnalysis.getFactAfterLocation(Location location)
Get the dataflow fact representing the point just after given Location.
|
LockSet |
LockChecker.getFactAtLocation(Location location)
Get LockSet at given Location.
|
Fact |
DataflowAnalysis.getFactAtLocation(Location location)
Get dataflow fact at (just before) given Location.
|
Fact |
Dataflow.getFactAtLocation(Location location)
Get dataflow fact at (just before) given Location.
|
Fact |
BasicAbstractDataflowAnalysis.getFactAtLocation(Location location)
Get dataflow fact at (just before) given Location.
|
Fact |
AbstractDataflowAnalysis.getFactAtLocation(Location location)
Get the dataflow fact representing the point just before given Location.
|
int |
CompactLocationNumbering.getNumber(Location location)
Get the number of given Location, which will be a non-negative integer in
the range 0..getSize() - 1.
|
Location |
CFG.getPreviousLocation(Location loc) |
void |
AbstractFrameModelingVisitor.setFrameAndLocation(FrameType frame,
Location location)
Set the frame and Location for the instruction about to be modeled.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<Location> |
UnconditionalValueDerefSet.getDerefLocationSet(ValueNumber vn)
Get the set of dereference Locations for given value number.
|
java.util.Set<Location> |
UnconditionalValueDerefSet.getUnconditionalDerefLocationSet(ValueNumber vn)
Get the set of Locations where given value is guaranteed to be
dereferenced.
|
Modifier and Type | Method and Description |
---|---|
void |
UnconditionalValueDerefSet.addDeref(ValueNumber vn,
Location location)
Mark a value as being dereferenced at given Location.
|
static java.util.Set<ValueNumber> |
UnconditionalValueDerefAnalysis.checkAllNonNullParams(Location location,
ValueNumberFrame vnaFrame,
org.apache.bcel.generic.ConstantPoolGen constantPool,
org.apache.bcel.classfile.Method method,
IsNullValueDataflow invDataflow,
TypeDataflow typeDataflow) |
static java.util.Set<ValueNumber> |
UnconditionalValueDerefAnalysis.checkNonNullParams(Location location,
ValueNumberFrame vnaFrame,
org.apache.bcel.generic.ConstantPoolGen constantPool,
org.apache.bcel.classfile.Method method,
IsNullValueFrame invFrame) |
static java.util.Set<ValueNumber> |
UnconditionalValueDerefAnalysis.checkUnconditionalDerefDatabase(Location location,
ValueNumberFrame vnaFrame,
org.apache.bcel.generic.ConstantPoolGen constantPool,
IsNullValueFrame invFrame,
TypeDataflow typeDataflow) |
void |
UnconditionalValueDerefSet.cleanDerefSet(Location location,
ValueNumberFrame vnaFrame) |
static boolean |
UnconditionalValueDerefAnalysis.reportPotentialDereference(Location location,
IsNullValueFrame invFrame) |
Modifier and Type | Method and Description |
---|---|
void |
UnconditionalValueDerefSet.setDerefSet(ValueNumber vn,
java.util.Set<Location> derefSet)
Set a value as being unconditionally dereferenced at the given set of
locations.
|
Modifier and Type | Method and Description |
---|---|
Location |
SourceSinkInfo.getLocation() |
Modifier and Type | Method and Description |
---|---|
java.util.Set<SourceSinkInfo> |
TypeQualifierDataflowAnalysis.getSourceSinkInfoSet(Location location)
Get the set of SourceSinkInfo objects representing sources/sinks at a
given Location.
|
Constructor and Description |
---|
SourceSinkInfo(SourceSinkType type,
Location location,
ValueNumber vn,
javax.annotation.meta.When when)
Constructor.
|
Modifier and Type | Field and Description |
---|---|
Location |
RedundantBranch.location |
Modifier and Type | Method and Description |
---|---|
Location |
LocationWhereValueBecomesNull.getLocation() |
Location |
IsNullValue.getLocationOfKaBoom() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<ValueNumber,java.util.Set<Location>> |
NullDerefAndRedundantComparisonFinder.findNullAssignments(java.util.Set<LocationWhereValueBecomesNull> locationWhereValueBecomesNullSet) |
java.util.Set<Location> |
NullValueUnconditionalDeref.getDerefLocationSet() |
Modifier and Type | Method and Description |
---|---|
void |
UsagesRequiringNonNullValues.add(Location loc,
ValueNumber vn,
PointerUsageRequiringNonNullValue usage) |
static BugAnnotation |
NullDerefAndRedundantComparisonFinder.findAnnotationFromValueNumber(org.apache.bcel.classfile.Method method,
Location location,
ValueNumber valueNumber,
ValueNumberFrame vnaFrame)
|
static FieldAnnotation |
NullDerefAndRedundantComparisonFinder.findFieldAnnotationFromValueNumber(org.apache.bcel.classfile.Method method,
Location location,
ValueNumber valueNumber,
ValueNumberFrame vnaFrame)
|
static LocalVariableAnnotation |
NullDerefAndRedundantComparisonFinder.findLocalAnnotationFromValueNumber(org.apache.bcel.classfile.Method method,
Location location,
ValueNumber valueNumber,
ValueNumberFrame vnaFrame)
|
static XField |
NullDerefAndRedundantComparisonFinder.findXFieldFromValueNumber(org.apache.bcel.classfile.Method method,
Location location,
ValueNumber valueNumber,
ValueNumberFrame vnaFrame)
Deprecated.
|
void |
NullDerefAndRedundantComparisonCollector.foundNullDeref(Location location,
ValueNumber valueNumber,
IsNullValue refValue,
ValueNumberFrame vnaFrame)
|
void |
NullDerefAndRedundantComparisonCollector.foundNullDeref(Location location,
ValueNumber valueNumber,
IsNullValue refValue,
ValueNumberFrame vnaFrame,
boolean isConsistent)
Subclasses should override this method to capture locations where a null
pointer is dereferenced.
|
void |
NullDerefAndRedundantComparisonCollector.foundRedundantNullCheck(Location location,
RedundantBranch redundantBranch)
Subclasses should override this method to capture locations where a
redundant null comparison is performed.
|
PointerUsageRequiringNonNullValue |
UsagesRequiringNonNullValues.get(Location loc,
ValueNumber vn,
ValueNumberDataflow vnaDataflow) |
static IsNullValue |
IsNullValue.noKaboomNonNullValue(Location ins)
Get the instance representing a value known to be non-null because a NPE
would have occurred if it were null.
|
Modifier and Type | Method and Description |
---|---|
void |
NullValueUnconditionalDeref.add(IsNullValue isNullValue,
java.util.Set<Location> unconditionalDerefLocationSet) |
void |
NullDerefAndRedundantComparisonFinder.checkEdges(CFG cfg,
java.util.Map<ValueNumber,NullValueUnconditionalDeref> nullValueGuaranteedDerefMap,
java.util.Map<ValueNumber,java.util.SortedSet<Location>> bugEdgeLocationMap) |
void |
NullDerefAndRedundantComparisonCollector.foundGuaranteedNullDeref(java.util.Set<Location> assignedNullLocationSet,
java.util.Set<Location> derefLocationSet,
java.util.SortedSet<Location> doomedLocations,
ValueNumberDataflow vna,
ValueNumber refValue,
BugAnnotation variableAnnotation,
NullValueUnconditionalDeref deref,
boolean npeIfStatementCovered)
Subclasses should override this method to capture values assigned null
(or that become null through a comparison and branch) that are guaranteed
to reach a dereference (ignoring implicit exception paths).
|
void |
NullDerefAndRedundantComparisonCollector.foundGuaranteedNullDeref(java.util.Set<Location> assignedNullLocationSet,
java.util.Set<Location> derefLocationSet,
java.util.SortedSet<Location> doomedLocations,
ValueNumberDataflow vna,
ValueNumber refValue,
BugAnnotation variableAnnotation,
NullValueUnconditionalDeref deref,
boolean npeIfStatementCovered)
Subclasses should override this method to capture values assigned null
(or that become null through a comparison and branch) that are guaranteed
to reach a dereference (ignoring implicit exception paths).
|
void |
NullDerefAndRedundantComparisonCollector.foundGuaranteedNullDeref(java.util.Set<Location> assignedNullLocationSet,
java.util.Set<Location> derefLocationSet,
java.util.SortedSet<Location> doomedLocations,
ValueNumberDataflow vna,
ValueNumber refValue,
BugAnnotation variableAnnotation,
NullValueUnconditionalDeref deref,
boolean npeIfStatementCovered)
Subclasses should override this method to capture values assigned null
(or that become null through a comparison and branch) that are guaranteed
to reach a dereference (ignoring implicit exception paths).
|
void |
NullDerefAndRedundantComparisonFinder.reportBugs(java.util.Map<ValueNumber,NullValueUnconditionalDeref> nullValueGuaranteedDerefMap,
java.util.HashSet<ValueNumber> npeIfStatementCovered,
java.util.Map<ValueNumber,java.util.SortedSet<Location>> bugLocationMap,
java.util.Map<ValueNumber,java.util.Set<Location>> nullValueAssignmentMap) |
void |
NullDerefAndRedundantComparisonFinder.reportBugs(java.util.Map<ValueNumber,NullValueUnconditionalDeref> nullValueGuaranteedDerefMap,
java.util.HashSet<ValueNumber> npeIfStatementCovered,
java.util.Map<ValueNumber,java.util.SortedSet<Location>> bugLocationMap,
java.util.Map<ValueNumber,java.util.Set<Location>> nullValueAssignmentMap) |
Constructor and Description |
---|
LocationWhereValueBecomesNull(Location location,
ValueNumber valueNumber)
Constructor.
|
RedundantBranch(Location location,
int lineNumber,
IsNullValue firstValue)
Constructor.
|
RedundantBranch(Location location,
int lineNumber,
IsNullValue firstValue,
IsNullValue secondValue)
Constructor.
|
Modifier and Type | Field and Description |
---|---|
Location |
TypeDataflow.LocationAndFactPair.location |
Modifier and Type | Method and Description |
---|---|
static BugAnnotation |
ValueNumberSourceInfo.findAnnotationFromValueNumber(org.apache.bcel.classfile.Method method,
Location location,
ValueNumber valueNumber,
ValueNumberFrame vnaFrame,
java.lang.String partialRole) |
static FieldAnnotation |
ValueNumberSourceInfo.findFieldAnnotationFromValueNumber(org.apache.bcel.classfile.Method method,
Location location,
ValueNumber valueNumber,
ValueNumberFrame vnaFrame) |
static LocalVariableAnnotation |
ValueNumberSourceInfo.findLocalAnnotationFromValueNumber(org.apache.bcel.classfile.Method method,
Location location,
ValueNumber valueNumber,
ValueNumberFrame vnaFrame) |
static BugAnnotation |
ValueNumberSourceInfo.findRequiredAnnotationFromValueNumber(org.apache.bcel.classfile.Method method,
Location location,
ValueNumber valueNumber,
ValueNumberFrame vnaFrame,
java.lang.String partialRole) |
static XField |
ValueNumberSourceInfo.findXFieldFromValueNumber(org.apache.bcel.classfile.Method method,
Location location,
ValueNumber valueNumber,
ValueNumberFrame vnaFrame) |
ValueNumberFrame |
ValueNumberAnalysis.getFactAfterLocation(Location location) |
ValueNumberFrame |
ValueNumberAnalysis.getFactAtLocation(Location location) |
static BugAnnotation |
ValueNumberSourceInfo.getFromValueNumber(ClassContext classContext,
org.apache.bcel.classfile.Method method,
Location location,
int stackPos) |
Modifier and Type | Method and Description |
---|---|
Location |
ValueRangeAnalysisFactory.RedundantCondition.getDeadCodeLocation() |
Location |
ValueRangeAnalysisFactory.RedundantCondition.getLiveCodeLocation() |
Location |
ValueRangeAnalysisFactory.RedundantCondition.getLocation() |
Constructor and Description |
---|
ValueRangeAnalysisFactory.RedundantCondition(Location location,
java.lang.String trueCondition,
boolean hasDeadCode,
Location deadCodeLocation,
Location liveCodeLocation,
java.lang.String signature,
boolean byType,
java.lang.Number number,
boolean border) |
Modifier and Type | Field and Description |
---|---|
Location |
StreamEscape.target |
Modifier and Type | Method and Description |
---|---|
Location |
Stream.getOpenLocation() |
Modifier and Type | Method and Description |
---|---|
void |
StreamResourceTracker.addStreamEscape(Stream source,
Location target)
Indicate that a stream escapes at the given target Location.
|
void |
StreamResourceTracker.addStreamOpenLocation(Location streamOpenLocation,
Stream stream)
Indicate that a stream is constructed at this Location.
|
static boolean |
FindNullDeref.catchesNull(org.apache.bcel.classfile.ConstantPool constantPool,
org.apache.bcel.classfile.Code code,
Location location) |
Stream |
StreamFactory.createStream(Location location,
org.apache.bcel.generic.ObjectType type,
org.apache.bcel.generic.ConstantPoolGen cpg,
RepositoryLookupFailureCallback lookupFailureCallback)
Determine if a Stream is created at given location.
|
Stream |
StaticFieldLoadStreamFactory.createStream(Location location,
org.apache.bcel.generic.ObjectType type,
org.apache.bcel.generic.ConstantPoolGen cpg,
RepositoryLookupFailureCallback lookupFailureCallback) |
Stream |
MethodReturnValueStreamFactory.createStream(Location location,
org.apache.bcel.generic.ObjectType type,
org.apache.bcel.generic.ConstantPoolGen cpg,
RepositoryLookupFailureCallback lookupFailureCallback) |
Stream |
InstanceFieldLoadStreamFactory.createStream(Location location,
org.apache.bcel.generic.ObjectType type,
org.apache.bcel.generic.ConstantPoolGen cpg,
RepositoryLookupFailureCallback lookupFailureCallback) |
Stream |
IOStreamFactory.createStream(Location location,
org.apache.bcel.generic.ObjectType type,
org.apache.bcel.generic.ConstantPoolGen cpg,
RepositoryLookupFailureCallback lookupFailureCallback) |
Stream |
AnyMethodReturnValueStreamFactory.createStream(Location location,
org.apache.bcel.generic.ObjectType type,
org.apache.bcel.generic.ConstantPoolGen cpg,
RepositoryLookupFailureCallback lookupFailureCallback) |
void |
NoiseNullDeref.foundNullDeref(Location location,
ValueNumber valueNumber,
IsNullValue refValue,
ValueNumberFrame vnaFrame)
Deprecated.
|
void |
FindNullDeref.foundNullDeref(Location location,
ValueNumber valueNumber,
IsNullValue refValue,
ValueNumberFrame vnaFrame)
Deprecated.
|
void |
NoiseNullDeref.foundNullDeref(Location location,
ValueNumber valueNumber,
IsNullValue refValue,
ValueNumberFrame vnaFrame,
boolean isConsistent) |
void |
FindNullDeref.foundNullDeref(Location location,
ValueNumber valueNumber,
IsNullValue refValue,
ValueNumberFrame vnaFrame,
boolean isConsistent) |
void |
NoiseNullDeref.foundRedundantNullCheck(Location location,
RedundantBranch redundantBranch) |
void |
FindNullDeref.foundRedundantNullCheck(Location location,
RedundantBranch redundantBranch) |
void |
Stream.setOpenLocation(Location openLocation) |
void |
FindTwoLockWait.visitLocation(ClassContext classContext,
Location location,
org.apache.bcel.generic.MethodGen methodGen,
LockDataflow dataflow) |
Modifier and Type | Method and Description |
---|---|
void |
NoiseNullDeref.foundGuaranteedNullDeref(java.util.Set<Location> assignedNullLocationSet,
java.util.Set<Location> derefLocationSet,
java.util.SortedSet<Location> doomedLocations,
ValueNumberDataflow vna,
ValueNumber refValue,
BugAnnotation variableAnnotation,
NullValueUnconditionalDeref deref,
boolean npeIfStatementCovered) |
void |
NoiseNullDeref.foundGuaranteedNullDeref(java.util.Set<Location> assignedNullLocationSet,
java.util.Set<Location> derefLocationSet,
java.util.SortedSet<Location> doomedLocations,
ValueNumberDataflow vna,
ValueNumber refValue,
BugAnnotation variableAnnotation,
NullValueUnconditionalDeref deref,
boolean npeIfStatementCovered) |
void |
NoiseNullDeref.foundGuaranteedNullDeref(java.util.Set<Location> assignedNullLocationSet,
java.util.Set<Location> derefLocationSet,
java.util.SortedSet<Location> doomedLocations,
ValueNumberDataflow vna,
ValueNumber refValue,
BugAnnotation variableAnnotation,
NullValueUnconditionalDeref deref,
boolean npeIfStatementCovered) |
void |
FindNullDeref.foundGuaranteedNullDeref(java.util.Set<Location> assignedNullLocationSet,
java.util.Set<Location> derefLocationSet,
java.util.SortedSet<Location> doomedLocations,
ValueNumberDataflow vna,
ValueNumber refValue,
BugAnnotation variableAnnotation,
NullValueUnconditionalDeref deref,
boolean npeIfStatementCovered) |
void |
FindNullDeref.foundGuaranteedNullDeref(java.util.Set<Location> assignedNullLocationSet,
java.util.Set<Location> derefLocationSet,
java.util.SortedSet<Location> doomedLocations,
ValueNumberDataflow vna,
ValueNumber refValue,
BugAnnotation variableAnnotation,
NullValueUnconditionalDeref deref,
boolean npeIfStatementCovered) |
void |
FindNullDeref.foundGuaranteedNullDeref(java.util.Set<Location> assignedNullLocationSet,
java.util.Set<Location> derefLocationSet,
java.util.SortedSet<Location> doomedLocations,
ValueNumberDataflow vna,
ValueNumber refValue,
BugAnnotation variableAnnotation,
NullValueUnconditionalDeref deref,
boolean npeIfStatementCovered) |
Constructor and Description |
---|
Stream(Location location,
java.lang.String streamClass,
java.lang.String streamBase)
Constructor.
|
StreamEscape(Stream source,
Location target)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
WarningPropertyUtil.addPropertiesForDataMining(WarningPropertySet<WarningProperty> propertySet,
ClassContext classContext,
org.apache.bcel.classfile.Method method,
Location location)
Add all relevant general warning properties to the given property set for
the given Location.
|
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.