The base domain that is shared by all domains that are used to perform abstract interpretations of methods.
The base domain that is shared by all domains that are used to perform abstract interpretations of methods where methods are potentially called.
Wrapper around several analyses that analyze the control- and data-flow to identify various issues in the source code of projects.
Wrapper around several analyses that analyze the control- and data-flow to identify various issues in the source code of projects.
The analyses are designed such that they try to avoid to report false positives to facilitate usage of the BugPicker. However, given that we analyze Java bytecode, some findings may be the result of the compilation scheme employed by the compiler and, hence, cannot be resolved at the source code level. This is in particular true for finally blocks in Java programs. In this case compilers typically include the same block two (or more) times in the code. Furthermore, Java reflection and reflection-like mechanisms are also a source of false positives.
This is the fall back domain that is used to perform an abstract interpretation of a method without invoking called methods.
The domain that is used to identify the issues.
This analysis reports anonymous inner classes that do not use their reference to the
parent class and as such could be made static
in order to save some memory and
to improve overall comprehension.
This analysis reports anonymous inner classes that do not use their reference to the
parent class and as such could be made static
in order to save some memory and
to improve overall comprehension.
Since anonymous inner classes cannot be declared static
, they must be refactored to
named inner classes first.
Common constants and helper methods related to the configuration of the BugPicker and generating reports.
Identifies cases where the collections API is not used as intended.
This analysis reports classes that have some equals()
method(s), but not
equals(Object)
.
This analysis reports classes that have some equals()
method(s), but not
equals(Object)
. This is bad practice and can lead to unexpected behavior, because
without an equals(Object)
method, Object.equals(Object)
is not properly overridden.
However, the relevance is determined by the presence of a hashCode method.
Identifies dead edges in code.
Identifies accesses to local reference variables that are once done in a guarded context (w.r.t.
Identifies accesses to local reference variables that are once done in a guarded context (w.r.t. its nullness property; guarded by an if instruction) and that are also done in an unguarded context.
This is only a very shallow analysis that is subject to false positives; to filter potential false positives we filter all those issues where we can identify a control and data-dependency to a derived value. E.g.,
def printSize(f : File) : Unit = { val name = if(f eq null) null else f.getName if(name == null) throw new NullPointerException; // here... f is not null; because if f is null at the beginning, name would be null to // and the method call would have returned abnormally (raised a NullPointerException). println(f.size) }
This analysis reports calls to java.lang.System/Runtime.gc()
that seem to be made
manually in code outside the core of the JRE.
This analysis reports calls to java.lang.System/Runtime.gc()
that seem to be made
manually in code outside the core of the JRE.
Manual invocations of garbage collection are usually unnecessary and can lead to performance problems. This heuristic tries to detect such cases.
This analysis identifies those instructions (except of ATHROW) that always lead to an exception.
Identifies fields (static or instance) that are not used and which are also not useable.
Identifies unused local variables in non-synthetic methods.
Identifies unused methods and constructors using the given call graph.
Identifies computations that are useless (i.e., computations that could be done in the source code.)
Identifies computations of primitive values that lead to the same result as a previous computation.
Identifies computations of primitive values that lead to the same result as a previous computation. Such computations (which could be a constant expression) are generally useless and hinder code comprehension.
Common constants and helper methods used by the BugPicker's analyses.