Type | Description |
---|---|
BAD_COPY_PASTE |
This checker finds many instances where a code was copied and pasted. However, because of incomplete change, it unintentionally left some portions of the copy unchanged. |
CAST_AFTER_CHECK |
This checker finds situations of attempting a cast to the wrong type. |
CONFUSING_INDENTATION |
This checker finds many cases where the indentation structure of the code does not match the syntactic nesting. The cases detected are the code with indentation of if/else/for/while scope, however it is actually out of the scope. |
HANDLE_LEAK |
This checker finds situations where a disposable object is lost without disposal, because local variables that held their value went out of scope or were re-assigned. |
INFINITE_LOOP |
A loop may never terminate if its control variable is not properly updated by mistake. Such mistake may lead to system hang. In order to prevent such a mistake, |
INVARIANT_RESULT |
This checker reports a suspicious expression where the result of operation is always a constant regardless of the value of its variable operands. |
NO_BASE_CALL |
This checker finds situations where a method is overriden and the overriding method should call the superclass. |
NO_CAST.INTEGER_DIVISION |
This checker finds code with an unexpected loss of arithmetic precision due to the use of integer division. |
NO_CAST.INTEGER_OVERFLOW |
This checker finds situation where the value of an arithmetic expression might overflow before the result is widened to a larger data type. |
NO_LOCK.STAT |
This checker tries to detect inconsistent usage of concurrent access locks to protect variables across each translation unit. It throws warnings when access to a certain memory region is protected by a mutex in some but not all cases - which most likely indicates a forgotten lock that may cause race condition bugs. This checker relies on statistical analysis to find some suspicious cases. |
NON_STATIC_GUARDING_STATIC |
This checker finds many instances where a non-static field is locked to guard a static field. |
NRE.DEREF_AFTER_NULL |
This checker finds situations where first, a pointer is compared to |
NRE.DEREF_OF_NULL |
This checker finds situations where a pointer is dereferenced, but can only have |
NRE.NULL_AFTER_DEREF |
Checking against NULL before dereference is recommended to avoid system crash due to NULL pointer dereference (NPD). However, a pointer is sometimes checked against NULL after it is already dereferenced. |
SIMILAR_BRANCHES |
This checker finds conditional statements and expressions that execute identical code in different condition. Detected cases are in following categories:
|
UNREACHABLE_CODE |
This checker finds source code that can't be executed, because the program is terminated on all paths leading to that code. |
UNUSED_VALUE |
If the return value of a function is assigned to a variable, it is an evidence that this value will be used later. Therefore, it may indicate a typographical or copy-and-paste error if this varaible is never accessed after assigned. |
WRONG_ARGUMENTS_ORDER |
This checker finds cases where the arguments to a function are provided in an incorrect order. |
WRONG_SEMICOLON |
Check for instances where an extraneous semicolon alters the logic of the code. |