Summary

Inspectors

Severity 1

Inspector Description Violations
Java Inspector 002 Empty catch block. 5
Java Inspector 006 Missing default case for switch statement 7
Java Inspector 031 Switch statement case without 'break' 12
Java Inspector 039 Avoid "for", "do", "while", "if" and "if ... else" statements with empty bodies 13
Java Inspector 048 Copyrights information should be present in each file. 342
Java Inspector 058 Make inner classes "private" 10
Java Inspector 070-B Keep code understandable. Cyclomatic complexity shall be below 20. 13
Java Inspector 086 Use equals() instead of == or != to compare objects. 44

Severity 2

Inspector Description Violations
Java Inspector 011 For statement requires initialization clause (1st argument) 1
Java Inspector 012 For statement requires condition clause (2nd argument)" 1
Java Inspector 015 Do not change parameter value. For comprehensibility, formal parameters should be final 48
Java Inspector 018 Avoid empty try block or finally block. 1
Java Inspector 035 Method is too long 3
Java Inspector 037 Avoid using "public static final" array fields 1
Java Inspector 043 Call 'wait ()' only inside a "while" loop 4
Java Inspector 044 Use 'wait ()' and 'notifyAll ()' instead of polling loops 1
Java Inspector 045 Too many exceptions (more than 3) listed in throws clause 8
Java Inspector 049 Use a Collection instead of arrays Object[] 144
Java Inspector 059 Synchronize at the block level rather than the method level 1
Java Inspector 062 Unnecessary cast or instanceof. 69
Java Inspector 068 Do not use System.out and System.err to output logging messages. Use loggers instead. 51
Java Inspector 070-A Keep code understandable. Cyclomatic complexity shall be below 12. 48
Java Inspector 073 [java.lang.StringBuffer] In Java 5 use StringBuilder instead of StringBuffer if access is single-threaded, e.g. StringBuffer is used as a local variable . 34
Java Inspector 075 Do not change value of for loop variable. 1
Java Inspector 077 To reduce probability of NullPointerException, use "string literal".equals(variable) instead of variable.equals("string literal"). 5
Java Inspector 078 Do not hide inherited fields. 1
Java Inspector 081 Avoid static collections, they can grow in size over time. 18
Java Inspector 082 Parenthesis are redundant. 171
Java Inspector 083 Do not use printStackTrace() for exception logging. 18
Java Inspector 085 Do not declare runtime exceptions in the throws clause. 46
Java Inspector 087 Chain exceptions. If exception is thrown from an exception handler (wrapping exceptions), pass the cause exception to the new exception constructor. 8
Java Inspector 089 Inspects correctness of Javadoc comments. 3309
Java Inspector 092 Override both equals() and hashCode(). Overriding of only one of these methods may cause unpredictable behavior of HashXXX collections. 1
Java Inspector 093 Do not instantiate Boolean, use Boolean.TRUE and Boolean.FALSE. 2

Severity 3

Inspector Description Violations
Java Inspector 003 do, while, if, and for statements need a brace enclosed block 154
Java Inspector 005 Classes, interfaces, methods, and variables should be named according to Sun's naming conventions. 236
Java Inspector 016 Sun coding standards - class modifiers should be in order (public protected private abstract static final strictfp) 6
Java Inspector 024 Avoid hardwired character literals 517
Java Inspector 025 Avoid hardwired numeric literals. Allowed literals: [1, -1, 0] 215
Java Inspector 026 Avoid hardwired string literals. Allowed literals: [] 1251
Java Inspector 027 More than one statement per line 42
Java Inspector 040 Avoid using method parameter names that conflict with class member names 31
Java Inspector 042 Do not use 'notify ()'; use 'notifyAll ()' instead 1
Java Inspector 046 Empty statements 21
Java Inspector 047 No need to provide (public, abstract, ) modifiers for interface methods 20
Java Inspector 051 It is good practice to call in any case super() in a constructor. 265
Java Inspector 054 Discourage usage of instance variables like a, j by enforcing minimal variable name length (3). 13
Java Inspector 090 Unnecessary else part in if. The main part terminates control flow (return, break, throw, or continue). 55

Metrics

Name Measurements Total Min Avg Max Deviation
Code length 2278 18131.0 1.0 7.959174714661984 288.0 9.016412842879856
Cyclomatic complexity 2534 5594.0 1.0 2.207576953433307 85.0 1.7558781087722806