PMD Results

The following document contains the results of PMD 6.4.0.

Files

org/opentrafficsim/graphs/ContourPlot.java

Violation Priority Line
Avoid empty catch blocks 3 207210

org/opentrafficsim/graphs/DataSampler.java

Violation Priority Line
Avoid empty if statements 3 7173

org/opentrafficsim/road/animation/AbstractSimulationScript.java

Violation Priority Line
Useless qualified this usage in the same class. 3 249
Useless qualified this usage in the same class. 3 249
Useless qualified this usage in the same class. 3 260
Useless qualified this usage in the same class. 3 269
Useless qualified this usage in the same class. 3 284
Useless qualified this usage in the same class. 3 288
Useless qualified this usage in the same class. 3 295
Useless qualified this usage in the same class. 3 300
Useless qualified this usage in the same class. 3 316

org/opentrafficsim/road/gtu/animation/DefaultCarAnimation.java

Violation Priority Line
Ensure you override both equals() and hashCode() 3 218

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

Violation Priority Line
Useless parentheses. 4 286
Useless parentheses. 4 286
Useless parentheses. 4 287
Useless parentheses. 4 287
These nested if statements could be combined 3 355375
These nested if statements could be combined 3 415435

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

Violation Priority Line
Avoid empty catch blocks 3 5558

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

Violation Priority Line
Avoid empty catch blocks 3 292295
Useless parentheses. 4 843
Avoid modifiers which are implied by the context 3 9491009
Avoid modifiers which are implied by the context 3 10231108
Useless parentheses. 4 1052

org/opentrafficsim/road/gtu/generator/od/ODApplier.java

Violation Priority Line
Useless parentheses. 4 290

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

Violation Priority Line
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 2 1191
Avoid empty catch blocks 3 12881291
Avoid empty catch blocks 3 13041307

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

Violation Priority Line
Ternary operators that can be simplified with || or && 3 97

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

Violation Priority Line
Useless parentheses. 4 36

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

Violation Priority Line
Useless qualified this usage in the same class. 3 115
Useless qualified this usage in the same class. 3 117
Useless qualified this usage in the same class. 3 118
Useless qualified this usage in the same class. 3 122
Useless qualified this usage in the same class. 3 123
Useless qualified this usage in the same class. 3 232

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

Violation Priority Line
Useless parentheses. 4 104
These nested if statements could be combined 3 122126

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

Violation Priority Line
Avoid modifiers which are implied by the context 3 6382
Avoid modifiers which are implied by the context 3 98108
Avoid modifiers which are implied by the context 3 124132

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

Violation Priority Line
Useless parentheses. 4 475
Useless parentheses. 4 1263
Useless parentheses. 4 1264
Useless parentheses. 4 1350
Useless parentheses. 4 1351
Useless parentheses. 4 1432
Useless parentheses. 4 1433
Useless parentheses. 4 1462
Useless parentheses. 4 1463

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

Violation Priority Line
These nested if statements could be combined 3 342348
Useless parentheses. 4 342343
Useless parentheses. 4 344345

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

Violation Priority Line
Useless parentheses. 4 75

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

Violation Priority Line
Avoid modifiers which are implied by the context 3 2337
Avoid modifiers which are implied by the context 3 4056
Avoid modifiers which are implied by the context 3 5985
Avoid modifiers which are implied by the context 3 117172

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

Violation Priority Line
Avoid empty catch blocks 3 294297
Avoid empty catch blocks 3 329332
Avoid unused method parameters such as 'egoSpeed'. 3 401

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

Violation Priority Line
These nested if statements could be combined 3 750753
These nested if statements could be combined 3 883900
Useless parentheses. 4 952
Useless parentheses. 4 952
Useless parentheses. 4 953
Useless parentheses. 4 953

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

Violation Priority Line
Useless parentheses. 4 416
Useless parentheses. 4 416
Useless parentheses. 4 431
Useless parentheses. 4 431
Useless parentheses. 4 444
Useless parentheses. 4 444
Useless parentheses. 4 448
Useless parentheses. 4 448
Useless parentheses. 4 459
Useless parentheses. 4 459
Useless parentheses. 4 657
Useless parentheses. 4 658

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

Violation Priority Line
Ternary operators that can be simplified with || or && 3 303
Ternary operators that can be simplified with || or && 3 310

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

Violation Priority Line
Useless parentheses. 4 513514
Useless parentheses. 4 515516

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

Violation Priority Line
Avoid modifiers which are implied by the context 3 2634
Avoid modifiers which are implied by the context 3 3757

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

Violation Priority Line
Avoid modifiers which are implied by the context 3 3146
Avoid modifiers which are implied by the context 3 4964
Useless parentheses. 4 147

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

Violation Priority Line
Avoid unused private fields such as 'nFollowers'. 3 40
Avoid unused private fields such as 'nLeaders'. 3 43
Avoid unused private fields such as 'headwayGtuType'. 3 61
Avoid unused local variables such as 'lane'. 3 90

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

Violation Priority Line
Overriding method merely calls super 3 3538

org/opentrafficsim/road/gtu/lane/perception/mental/AdaptationHeadway.java

Violation Priority Line
Useless parentheses. 4 46

org/opentrafficsim/road/gtu/lane/perception/mental/AdaptationSituationalAwareness.java

Violation Priority Line
Useless parentheses. 4 89

org/opentrafficsim/road/gtu/lane/perception/mental/AdaptationSpeed.java

Violation Priority Line
Useless parentheses. 4 41

org/opentrafficsim/road/gtu/lane/perception/mental/TaskHeadwayBased.java

Violation Priority Line
Useless parentheses. 4 55
Useless parentheses. 4 146

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

Violation Priority Line
Avoid modifiers which are implied by the context 3 352364
Avoid modifiers which are implied by the context 3 367383
Useless parentheses. 4 380
Avoid modifiers which are implied by the context 3 386402
Avoid modifiers which are implied by the context 3 417522

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

Violation Priority Line
Useless parentheses. 4 367
Avoid unused method parameters such as 'gtu'. 3 404
Avoid unused method parameters such as 'startSpeed'. 3 440
Useless parentheses. 4 495
Useless parentheses. 4 496

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

Violation Priority Line
Avoid unused local variables such as 'currentLaneFine'. 3 154

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

Violation Priority Line
Useless parentheses. 4 236
These nested if statements could be combined 3 238245
Useless parentheses. 4 266
Avoid unused method parameters such as 'perception'. 3 507
Avoid unused method parameters such as 'lanePathInfo'. 3 507
Useless parentheses. 4 629

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

Violation Priority Line
These nested if statements could be combined 3 7079

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

Violation Priority Line
Useless parentheses. 4 90

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

Violation Priority Line
Useless parentheses. 4 161
Useless parentheses. 4 162163
Avoid unused method parameters such as 'gtu'. 3 715

org/opentrafficsim/road/gtu/lane/tactical/util/ConflictUtil.java

Violation Priority Line
These nested if statements could be combined 3 484500

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

Violation Priority Line
Useless parentheses. 4 41
Useless parentheses. 4 42
Useless parentheses. 4 77
Useless parentheses. 4 78
Useless parentheses. 4 115
Useless parentheses. 4 116

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

Violation Priority Line
Ternary operators that can be simplified with || or && 3 107

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

Violation Priority Line
These nested if statements could be combined 3 174191
Useless parentheses. 4 477
Useless parentheses. 4 478

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

Violation Priority Line
Too many static imports may lead to messy code 3 1701
Useless parentheses. 4 250
Ternary operators that can be simplified with || or && 3 297298
Useless parentheses. 4 301302
Ternary operators that can be simplified with || or && 3 314315
Useless parentheses. 4 326
Useless parentheses. 4 601
Useless parentheses. 4 601
Avoid modifiers which are implied by the context 3 635641

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

Violation Priority Line
Useless parentheses. 4 199
Useless parentheses. 4 200

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

Violation Priority Line
Useless parentheses. 4 223
Useless parentheses. 4 224
Useless parentheses. 4 239240
Useless parentheses. 4 241242

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

Violation Priority Line
Avoid unused constructor parameters such as 'newSimulator'. 3 196
Avoid unused constructor parameters such as 'animation'. 3 197

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

Violation Priority Line
Useless parentheses. 4 490491
Useless parentheses. 4 492493
These nested if statements could be combined 3 495499
Useless parentheses. 4 530531
Useless parentheses. 4 532533
These nested if statements could be combined 3 535539
Useless parentheses. 4 1447
Useless parentheses. 4 1448
Useless parentheses. 4 1474
Useless parentheses. 4 1475

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

Violation Priority Line
Avoid unused constructor parameters such as 'inverted'. 3 125

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

Violation Priority Line
Useless parentheses. 4 531532
Useless parentheses. 4 603604
Useless parentheses. 4 603604

org/opentrafficsim/road/network/lane/conflict/Conflict.java

Violation Priority Line
Useless parentheses. 4 170
Useless parentheses. 4 171
These nested if statements could be combined 3 688696

org/opentrafficsim/road/network/lane/conflict/ConflictBuilder.java

Violation Priority Line
Useless parentheses. 4 370
Useless parentheses. 4 371
Useless parentheses. 4 510
Useless parentheses. 4 510
Useless parentheses. 4 518
Useless parentheses. 4 518

org/opentrafficsim/road/network/lane/conflict/DefaultConflictRule.java

Violation Priority Line
Useless parentheses. 4 111
Useless parentheses. 4 112

org/opentrafficsim/road/network/lane/object/Distraction.java

Violation Priority Line
Avoid unused constructor parameters such as 'simulator'. 3 41

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

Violation Priority Line
Avoid unused constructor parameters such as 'dummy2'. 3 64
Avoid unused constructor parameters such as 'dummy1'. 3 64