Package

org.opalj.bugpicker.core

analyses

Permalink

package analyses

Common constants and helper methods used by the BugPicker's analyses.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. analyses
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class AnalysisParameters(maxEvalTime: Milliseconds = DefaultMaxEvalTime, maxEvalFactor: Double = DefaultMaxEvalFactor, maxCardinalityOfIntegerRanges: Long = ..., maxCardinalityOfLongSets: Int = DefaultMaxCardinalityOfLongSets, maxCallChainLength: Int = DefaultMaxCallChainLength, fixpointAnalyses: Seq[String] = DefaultFixpointAnalyses) extends Product with Serializable

    Permalink
  2. trait BaseBugPickerAnalysisDomain extends CorrelationalDomain with TheProject with TheMethod with DefaultDomainValueBinding with ThrowAllPotentialExceptionsConfiguration with RefinedTypeLevelFieldAccessInstructions with TypeLevelInvokeInstructions with RefinedTypeLevelInvokeInstructions with SpecialMethodsHandling with DefaultIntegerRangeValues with DefaultLongSetValues with LongSetValuesShiftOperators with DefaultTypeLevelFloatValues with DefaultTypeLevelDoubleValues with ConcretePrimitiveValuesConversions with NullPropertyRefinement with MaxArrayLengthRefinement with DefaultHandlingOfMethodResults with IgnoreSynchronization

    Permalink

    The base domain that is shared by all domains that are used to perform abstract interpretations of methods.

  3. trait BasePerformInvocationBugPickerAnalysisDomain extends BaseBugPickerAnalysisDomain with PerformInvocationsWithRecursionDetection with PerformInvocationsWithBasicVirtualMethodCallResolution with DefaultClassValuesBinding

    Permalink

    The base domain that is shared by all domains that are used to perform abstract interpretations of methods where methods are potentially called.

  4. class BugPickerAnalysis extends Analysis[URL, BugPickerResults]

    Permalink

    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.

    Precision

    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.

  5. type BugPickerResults = (Nanoseconds, Iterable[Issue], Iterable[AnalysisException])

    Permalink
  6. class FallbackBugPickerAnalysisDomain extends BaseBugPickerAnalysisDomain with DefaultClassValuesBinding with RecordAllThrownExceptions with RecordCFG with RecordDefUse

    Permalink

    This is the fall back domain that is used to perform an abstract interpretation of a method without invoking called methods.

  7. class InvocationBugPickerAnalysisDomain extends BasePerformInvocationBugPickerAnalysisDomain with RecordMethodCallResults with RecordLastReturnedValues with RecordAllThrownExceptions with ChildPerformInvocationsWithRecursionDetection

    Permalink
  8. class RootBugPickerAnalysisDomain extends BasePerformInvocationBugPickerAnalysisDomain with TheAI[BaseBugPickerAnalysisDomain] with TheMemoryLayout with RecordAllThrownExceptions with RecordCFG with RecordDefUse

    Permalink

    The domain that is used to identify the issues.

Value Members

  1. object AnonymousInnerClassShouldBeStatic

    Permalink

    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.

  2. final val AssertionError: ObjectType

    Permalink
  3. object BugPickerAnalysis

    Permalink

    Common constants and helper methods related to the configuration of the BugPicker and generating reports.

  4. object CollectionsUsage

    Permalink

    Identifies cases where the collections API is not used as intended.

  5. object CovariantEquals

    Permalink

    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.

  6. object DeadEdgesAnalysis

    Permalink

    Identifies dead edges in code.

  7. object GuardedAndUnguardedAccessAnalysis

    Permalink

    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)
    }
  8. object ManualGarbageCollection

    Permalink

    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.

  9. final val ObjectEqualsMethodDescriptor: MethodDescriptor

    Permalink
  10. final val ObjectHashCodeMethodDescriptor: MethodDescriptor

    Permalink
  11. object ThrowsExceptionAnalysis

    Permalink

    This analysis identifies those instructions (except of ATHROW) that always lead to an exception.

  12. object UnusedFields

    Permalink

    Identifies fields (static or instance) that are not used and which are also not useable.

  13. object UnusedLocalVariables

    Permalink

    Identifies unused local variables in non-synthetic methods.

  14. object UnusedMethodsAnalysis

    Permalink

    Identifies unused methods and constructors using the given call graph.

  15. object UselessComputationsAnalysis

    Permalink

    Identifies computations that are useless (i.e., computations that could be done in the source code.)

  16. object UselessReComputationsAnalysis

    Permalink

    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.

Inherited from AnyRef

Inherited from Any

Ungrouped