public class NullDerefAndRedundantComparisonFinder
extends java.lang.Object
IsNullValueAnalysis
Constructor and Description |
---|
NullDerefAndRedundantComparisonFinder(ClassContext classContext,
org.apache.bcel.classfile.Method method,
NullDerefAndRedundantComparisonCollector collector)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
checkEdges(CFG cfg,
java.util.Map<ValueNumber,NullValueUnconditionalDeref> nullValueGuaranteedDerefMap,
java.util.Map<ValueNumber,java.util.SortedSet<Location>> bugEdgeLocationMap) |
void |
execute() |
static BugAnnotation |
findAnnotationFromValueNumber(org.apache.bcel.classfile.Method method,
Location location,
ValueNumber valueNumber,
ValueNumberFrame vnaFrame)
|
static FieldAnnotation |
findFieldAnnotationFromValueNumber(org.apache.bcel.classfile.Method method,
Location location,
ValueNumber valueNumber,
ValueNumberFrame vnaFrame)
|
static LocalVariableAnnotation |
findLocalAnnotationFromValueNumber(org.apache.bcel.classfile.Method method,
Location location,
ValueNumber valueNumber,
ValueNumberFrame vnaFrame)
|
java.util.Map<ValueNumber,java.util.Set<Location>> |
findNullAssignments(java.util.Set<LocationWhereValueBecomesNull> locationWhereValueBecomesNullSet) |
static XField |
findXFieldFromValueNumber(org.apache.bcel.classfile.Method method,
Location location,
ValueNumber valueNumber,
ValueNumberFrame vnaFrame)
Deprecated.
|
void |
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) |
public NullDerefAndRedundantComparisonFinder(ClassContext classContext, org.apache.bcel.classfile.Method method, NullDerefAndRedundantComparisonCollector collector)
classContext
- the ClassContextmethod
- the method to analyzecollector
- the NullDerefAndRedundantComparisonCollector used to report
null derefs and redundant null comparisonspublic void execute()
public java.util.Map<ValueNumber,java.util.Set<Location>> findNullAssignments(java.util.Set<LocationWhereValueBecomesNull> locationWhereValueBecomesNullSet)
public void 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) throws CFGBuilderException, DataflowAnalysisException
public void checkEdges(CFG cfg, java.util.Map<ValueNumber,NullValueUnconditionalDeref> nullValueGuaranteedDerefMap, java.util.Map<ValueNumber,java.util.SortedSet<Location>> bugEdgeLocationMap) throws DataflowAnalysisException
DataflowAnalysisException
@Deprecated public static XField findXFieldFromValueNumber(org.apache.bcel.classfile.Method method, Location location, ValueNumber valueNumber, ValueNumberFrame vnaFrame)
ValueNumberSourceInfo.findXFieldFromValueNumber(Method,Location,ValueNumber,ValueNumberFrame)
instead@Deprecated public static FieldAnnotation findFieldAnnotationFromValueNumber(org.apache.bcel.classfile.Method method, Location location, ValueNumber valueNumber, ValueNumberFrame vnaFrame)
@Deprecated public static LocalVariableAnnotation findLocalAnnotationFromValueNumber(org.apache.bcel.classfile.Method method, Location location, ValueNumber valueNumber, ValueNumberFrame vnaFrame)
@Deprecated public static BugAnnotation findAnnotationFromValueNumber(org.apache.bcel.classfile.Method method, Location location, ValueNumber valueNumber, ValueNumberFrame vnaFrame)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.