CTPath

Severity

Blocker 15
Critical 50
Major 7,718
Minor 7,894
Info 398

Rule

"equals(Object obj)" and "hashCode()" should be overridden in pairs 10
Throwable and Error should not be caught 3
Jump statements should not occur in "finally" blocks 1
super.finalize() should be called at the end of Object.finalize() implementations 1
Throwable.printStackTrace(...) should not be called 26
Exit methods should not be called 10
"equals(Object obj)" should be overridden along with the "compareTo(T obj)" method 6
Switch cases should end with an unconditional "break" statement 4
Execution of the Garbage Collector should be triggered only by the JVM 2
Methods named "equals" should override Object.equals(Object) 1
The Object.finalize() method should not be overriden 1
Control structures should use curly braces 1,316
Class variable fields should not have public accessibility 952
Local variable and method parameter names should comply with a naming convention 510
Branches should have sufficient coverage by unit tests 396
Useless parentheses around expressions should be removed to prevent any misunderstanding 395
Sections of code should not be "commented out" 385
Field names should comply with a naming convention 385
Statements should be on separate lines 358
Declarations should use Java collection interfaces such as "List" rather than specific implementation classes such as "LinkedList" 289
Methods should not be too complex 257
Package names should comply with a naming convention 175
Exception handlers should preserve the original exceptions 160
Generic exceptions should never be thrown 147
A close curly brace should be located at the beginning of a line 138
Nested code blocks should not be used 118
Strings literals should be placed on the left side when checking for equality 111
"FIXME" tags should be handled 95
Method parameters, caught exceptions and foreach variables should not be reassigned 95
"switch case" clauses should not have too many lines 92
Unused local variables should be removed 90
Local variables should not shadow class fields 88
Collapsible "if" statements should be merged 80
Collection.isEmpty() should be used to test for emptiness 78
Standard outputs should not be used directly to log anything 78
Close curly brace and the next "else", "catch" and "finally" keywords should be located on the same line 76
Source files should not have any duplicated blocks 72
Method names should comply with a naming convention 72
Loops should not contain more than a single "break" or "continue" statement 68
Methods should not be empty 54
Unused "private" fields should be removed 53
Loggers should be "private static final" and should share a naming convention 50
Empty arrays and collections should be returned instead of null 49
Unused method parameters should be removed 40
"switch" statements should end with "default" clauses 39
Utility classes should not have public constructors 33
Expressions should not be too complex 24
Nested blocks of code should not be left empty 23
Labels should not be used 21
Classes that override "clone" should be "Cloneable" and call "super.clone()" 20
"public static" fields should be constant 20
Exception classes should be immutable 19
Empty statements should be removed 18
Classes should not be too complex 16
Public methods should throw at most one checked exception 16
Octal values should not be used 16
Methods should not have too many parameters 16
Constant names should comply with a naming convention 14
Type parameter names should comply with a naming convention 13
Deprecated elements should have both the annotation and the Javadoc tag 12
Generic wildcard types should not be used in return parameters 12
Synchronized classes Vector, Hashtable, Stack and StringBuffer should not be used 11
Public constants and fields initialized at declaration should be "static final" rather than merely "final" 10
Lambdas and anonymous classes should not have too many lines 9
An open curly brace should be located at the end of a line 8
Try-catch blocks should not be nested 7
A field should not duplicate the name of its containing class 6
"for" loop stop conditions should be invariant 4
Case insensitive string comparisons should be made without intermediate upper or lower casing 2
Return of boolean expressions should not be wrapped into an "if-then-else" statement 2
Classes from "sun.*" packages should not be used 1
Class names should comply with a naming convention 1
IP addresses should not be hardcoded 1
"Object.finalize()" should remain protected (versus public) when overriding 1
Long suffix "L" should be upper case 1
Magic numbers should not be used 5,496
Comments should not be located at the end of lines of code 672
The members of an interface declaration or class should appear in a pre-defined order 651
Control flow statements "if", "for", "while", "switch" and "try" should not be nested too deeply 327
String literals should not be duplicated 228
Useless imports should be removed 189
Tabulation characters should not be used 169
Local Variables should not be declared and then immediately returned or thrown 70
Modifiers should be declared in the correct order 40
Array designators "[]" should be on the type, not the variable 38
Boolean literals should not be redundant 7
"switch" statements should have at least 3 "case" clauses 4
Constants should not be defined in interfaces 2
Overriding methods should do more than simply call the same method in the super class 1
"TODO" tags should be handled 386
Deprecated code should be removed eventually 12
Zoom   src/main/java/org/opentripplanner/graph_builder/module/ned 30
Zoom   src/test/java/org/opentripplanner/graph_builder/module/osm 8
Zoom   src/main/java/org/opentripplanner/api/resource 8
Zoom   src/main/java/org/opentripplanner/openstreetmap/impl 7
Zoom   src/main/java/org/opentripplanner/routing/core 5
Zoom   src/main/java/org/opentripplanner/osm 5
Zoom   src/main/java/org/opentripplanner/api/param 4
Zoom   src/main/java/org/opentripplanner/util 4
Zoom   src/main/java/org/opentripplanner/customize 4
Zoom   src/main/java/org/opentripplanner/routing/graph 4
Zoom   src/main/java/org/opentripplanner/graph_builder/module 4
Zoom   src/main/java/org/opentripplanner/graph_builder/model 4
Zoom   src/main/java/org/opentripplanner/graph_builder 3
Zoom   src/main/java/org/opentripplanner/graph_builder/module/shapefile 3
Zoom   src/main/java/org/opentripplanner/analyst/batch 3
Zoom   src/test/java/org/opentripplanner/routing/edgetype 3
Zoom   src/main/java/org/opentripplanner/profile 3
Zoom   src/main/java/com/conveyal/gtfs 3
Zoom   src/main/java/org/opentripplanner/scripting/impl 3
Zoom   src/main/java/org/opentripplanner/util/xml 3
Zoom   src/main/java/org/opentripplanner/scripting/api 2
Zoom   src/main/java/org/opentripplanner/routing/pathparser 2
Zoom   src/main/java/org/opentripplanner/routing/automata 2
Zoom   src/main/java/org/opentripplanner/routing/impl 2
Zoom   src/main/java/org/opentripplanner/analyst/request 2
Zoom   src/main/java/org/opentripplanner/reflect 2
Zoom   src/main/java/org/opentripplanner/common/geometry 2
Zoom   src/test/java/org/opentripplanner/analyst/batch 2
Zoom   src/main/java/org/opentripplanner/routing/edgetype/factory 2
Zoom   src/main/java/org/opentripplanner/routing/edgetype 2
Zoom   src/test/java/org/opentripplanner/geocoder/yahoo 1
Zoom   src/main/java/org/opentripplanner/api/common 1
Zoom   src/main/java/org/opentripplanner/updater/bike_rental 1
Zoom   src/test/java/org/opentripplanner/geocoder/google 1
Zoom   src/main/java/org/opentripplanner/routing/bike_rental 1
Zoom   src/test/java/org/opentripplanner/geocoder/bano 1
Zoom   src/main/java/org/opentripplanner/graph_builder/module/osm 1
Zoom   src/test/java/org/opentripplanner/updater/stoptime 1
Zoom   src/main/java/org/opentripplanner/updater/alerts 1
Zoom   src/main/java/org/opentripplanner/common/model 1
Zoom   src/main/java/org/opentripplanner/updater 1
Zoom   src/main/java/org/opentripplanner/analyst 1
Zoom   src/main/java/org/opentripplanner/standalone 1
Zoom   src/main/java/org/opentripplanner/common 1
Zoom   src/test/java/org/opentripplanner 1
Zoom   src/test/java/org/opentripplanner/routing/core 1