PMD Results

The following document contains the results of PMD 5.3.5.

Files

org/opentrafficsim/graphs/ContourPlot.java

Violation Line
Avoid empty catch blocks 201204

org/opentrafficsim/graphs/DataSampler.java

Violation Line
Avoid empty if statements 7173

org/opentrafficsim/graphs/TrajectoryPlot.java

Violation Line
Avoid empty catch blocks 255258

org/opentrafficsim/road/gtu/generator/AbstractGTUGenerator.java

Violation Line
Avoid unused imports such as 'org.opentrafficsim.road.gtu.lane.perception.LanePerception' 32
Useless parentheses. 257
Useless parentheses. 257
Useless parentheses. 258
Useless parentheses. 258
These nested if statements could be combined 328348
These nested if statements could be combined 389409

org/opentrafficsim/road/gtu/generator/LaneBasedGTUGenerator.java

Violation Line
Avoid unused constructor parameters such as 'network'. 108
Avoid modifiers which are implied by the context 327328

org/opentrafficsim/road/gtu/generator/ListGTUGenerator.java

Violation Line
Avoid unused constructor parameters such as 'position'. 102
Avoid unused constructor parameters such as 'direction'. 102

org/opentrafficsim/road/gtu/generator/SpaceChecker.java

Violation Line
Avoid modifiers which are implied by the context 24

org/opentrafficsim/road/gtu/lane/AbstractLaneBasedGTU.java

Violation Line
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 632
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 648
Avoid empty catch blocks 857860
Avoid empty catch blocks 872875

org/opentrafficsim/road/gtu/lane/LaneBasedGTUCharacteristics.java

Violation Line
Avoid unused imports such as 'org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalPlanner' 7

org/opentrafficsim/road/gtu/lane/perception/LaneStructure.java

Violation Line
Avoid unused private fields such as 'lookAhead'. 95

org/opentrafficsim/road/gtu/lane/perception/categories/DefaultSimplePerception.java

Violation Line
These nested if statements could be combined 887904
Useless parentheses. 960
Useless parentheses. 960
Useless parentheses. 961
Useless parentheses. 961

org/opentrafficsim/road/gtu/lane/perception/categories/IntersectionPerception.java

Violation Line
Avoid unused local variables such as 'conflict'. 102

org/opentrafficsim/road/gtu/lane/perception/categories/NeighborsPerception.java

Violation Line
Useless parentheses. 617
Useless parentheses. 618619
Avoid unused private methods such as 'forwardHeadway(Length)'. 683
Avoid unused private methods such as 'backwardHeadway(Length)'. 801
These nested if statements could be combined 860877

org/opentrafficsim/road/gtu/lane/perception/headway/HeadwayGTUReal.java

Violation Line
Avoid unused imports such as 'org.opentrafficsim.road.network.speed.SpeedLimitProspect' 10

org/opentrafficsim/road/gtu/lane/perception/headway/HeadwayStopLine.java

Violation Line
Overriding method merely calls super 3538

org/opentrafficsim/road/gtu/lane/plan/operational/LaneOperationalPlanBuilder.java

Violation Line
Avoid unused imports such as 'javax.management.RuntimeErrorException' 8
Avoid unused local variables such as 'fromFirst'. 395
Avoid unused local variables such as 'toFirst'. 396

org/opentrafficsim/road/gtu/lane/tactical/LaneBasedCFLCTacticalPlanner.java

Violation Line
Avoid unused local variables such as 'maximumReverseHeadway'. 122
Avoid unused local variables such as 'now'. 123
Avoid unused local variables such as 'currentLaneFine'. 142

org/opentrafficsim/road/gtu/lane/tactical/lmrs/LMRS.java

Violation Line
Avoid unused imports such as 'org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterTypes' 13

org/opentrafficsim/road/gtu/lane/tactical/toledo/Toledo.java

Violation Line
Useless parentheses. 156
Useless parentheses. 157160

org/opentrafficsim/road/gtu/lane/tactical/util/lmrs/LmrsUtil.java

Violation Line
Avoid empty if statements 171185
Useless parentheses. 485
Useless parentheses. 486

org/opentrafficsim/road/gtu/strategical/od/ODMatrix.java

Violation Line
Avoid unused local variables such as 'e'. 510

org/opentrafficsim/road/gtu/strategical/route/LaneBasedStrategicalRoutePlanner.java

Violation Line
Useless parentheses. 166
Useless parentheses. 167
Useless parentheses. 181
Useless parentheses. 182

org/opentrafficsim/road/network/lane/CrossSectionElement.java

Violation Line
Avoid unused constructor parameters such as 'newSimulator'. 169
Avoid unused constructor parameters such as 'animation'. 170

org/opentrafficsim/road/network/lane/Lane.java

Violation Line
Useless parentheses. 472
Useless parentheses. 475
Useless parentheses. 486
Useless parentheses. 488
These nested if statements could be combined 491495
These nested if statements could be combined 528532
Useless parentheses. 641

org/opentrafficsim/road/network/lane/changing/OvertakingConditions.java

Violation Line
Avoid modifiers which are implied by the context 6683
Avoid modifiers which are implied by the context 97114
Avoid modifiers which are implied by the context 126143
Avoid modifiers which are implied by the context 155172
Avoid modifiers which are implied by the context 184201
Avoid modifiers which are implied by the context 213230
Avoid modifiers which are implied by the context 242259
Avoid modifiers which are implied by the context 271301
Avoid modifiers which are implied by the context 313343
Avoid modifiers which are implied by the context 360405
Useless parentheses. 391392
Avoid modifiers which are implied by the context 422467
Useless parentheses. 453454
Avoid modifiers which are implied by the context 484539
Useless parentheses. 522523
Useless parentheses. 522523
Avoid modifiers which are implied by the context 556611
Useless parentheses. 594595
Useless parentheses. 594595

org/opentrafficsim/road/network/lane/object/sensor/TrafficLightSensor.java

Violation Line
Avoid unused private fields such as 'upSensor'. 32
Avoid unused private fields such as 'downSensor'. 35
Avoid unused private fields such as 'length'. 38
Avoid unused private fields such as 'currentGTUs'. 41
Avoid empty if statements 130132
Avoid empty if statements 139141