From: Correlating automatic static analysis and mutation testing: towards incremental strategies
# | W | Subtype | Priority | Category | Description |
---|---|---|---|---|---|
1 | QF | QF_QUESTIONABLE_FOR_LOOP | 2 | STYLE | Complicated, subtle or wrong increment in for-loop |
2 | RE | RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION | 1 | CORRECTNESS | Invalid syntax for regular expression |
3 | UM | UM_UNNECESSARY_MATH | 3 | PERFORMANCE | Method calls static Math class method on a constant value |
4 | QBA | QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT | 1 | CORRECTNESS | Method assigns boolean literal in boolean expression |
5 | INT | INT_VACUOUS_COMPARISON | 2 | STYLE | Vacuous comparison of integer value |
6 | INT | INT_VACUOUS_BIT_OPERATION | 2 | STYLE | Vacuous bit mask operation on integer value |
7 | INT | INT_BAD_REM_BY_1 | 1 | STYLE | Integer remainder modulo 1 |
8 | INT | INT_BAD_COMPARISON_WITH_SIGNED_BYTE | 3 | CORRECTNESS | Bad comparison of signed byte |
9 | INT | INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE | 1 | CORRECTNESS | Bad comparison of nonnegative value with negative constant |
10 | BIT | BIT_ADD_OF_SIGNED_BYTE | 2 | CORRECTNESS | Bitwise add of signed byte value |
11 | BIT | BIT_SIGNED_CHECK | 3 | BAD_PRACTICE | Check for sign of bitwise operation |
12 | BIT | BIT_AND | 1 | CORRECTNESS | Incompatible bit masks |
13 | BIT | BIT_IOR | 1 | CORRECTNESS | Incompatible bit masks |
14 | BIT | BIT_AND_ZZ | 1 | CORRECTNESS | Check to see if ((...) & 0) ==0 |
15 | Dm | DM_DEFAULT_ENCODING | 1 | I18N | Reliance on default encoding |
16 | Dm | DM_CONVERT_CASE | 3 | I18N | Consider using Locale parameterized version of invoked method |
17 | Dm | DM_STRING_VOID_CTOR | 2 | PERFORMANCE | Method invokes inefficient new String() constructor |
18 | Dm | DMI_BLOCKING_METHODS_ON_URL | 1 | PERFORMANCE | The equals and hashCode methods of URL are blocking |
19 | Dm | DMI_COLLECTION_OF_URLS | 1 | PERFORMANCE | Maps and sets of URLs can be performance hogs |
20 | Dm | DM_GC | 1 | PERFORMANCE | Explicit garbage collection; extremely dubious except in benchmarking code |
21 | Dm | DM_STRING_CTOR | 2 | PERFORMANCE | Method invokes inefficient new String(String) constructor |
22 | Dm | DM_BOOLEAN_CTOR | 2 | PERFORMANCE | Method invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead |
23 | Dm | DM_STRING_TOSTRING | 3 | PERFORMANCE | Method invokes toString() method on a String |
24 | Dm | DM_NEXTINT_VIA_NEXTDOUBLE | 2 | PERFORMANCE | Use the nextInt method of Random rather than nextDouble to generate a random integer |
25 | Dm | DM_EXIT | 3 | BAD_PRACTICE | Method invokes System.exit(...) |
26 | ES | ES_COMPARING_PARAMETER_STRING_WITH_EQ | 1 | BAD_PRACTICE | Comparison of String parameter using == or != |
27 | ES | ES_COMPARING_STRINGS_WITH_EQ | 2 | BAD_PRACTICE | Comparison of String objects using == or!= |