PMD Results

The following document contains the results of PMD 6.4.0.

Files

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

Violation Priority Line
Useless parentheses. 4 287
Useless parentheses. 4 287
Useless parentheses. 4 288
Useless parentheses. 4 288
These nested if statements could be combined 3 356376
These nested if statements could be combined 3 416436

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

Violation Priority Line
Avoid empty catch blocks 3 5457

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

Violation Priority Line
Avoid empty catch blocks 3 294297
Useless parentheses. 4 857
Useless parentheses. 4 1066

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

Violation Priority Line
Useless parentheses. 4 291

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

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

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 1383
Avoid empty catch blocks 3 14801483
Avoid empty catch blocks 3 14961499

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

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

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

Violation Priority Line
Useless parentheses. 4 44

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 461
Useless parentheses. 4 1256
Useless parentheses. 4 1257
Useless parentheses. 4 1344
Useless parentheses. 4 1345
Useless parentheses. 4 1428
Useless parentheses. 4 1429
Useless parentheses. 4 1458
Useless parentheses. 4 1459

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

Violation Priority Line
These nested if statements could be combined 3 341347
Useless parentheses. 4 341342
Useless parentheses. 4 343344

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

Violation Priority Line
Useless parentheses. 4 75

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

Violation Priority Line
These nested if statements could be combined 3 749752
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 421
Useless parentheses. 4 421
Useless parentheses. 4 436
Useless parentheses. 4 436
Useless parentheses. 4 449
Useless parentheses. 4 449
Useless parentheses. 4 453
Useless parentheses. 4 453
Useless parentheses. 4 464
Useless parentheses. 4 464
Useless parentheses. 4 663
Useless parentheses. 4 664

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

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

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

Violation Priority Line
Avoid unused local variables such as 'perc'. 3 256
Avoid empty catch blocks 3 299302
Avoid empty catch blocks 3 336339
Avoid unused method parameters such as 'egoSpeed'. 3 408

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

Violation Priority Line
Useless parentheses. 4 345346
Useless parentheses. 4 347348

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

Violation Priority Line
Useless parentheses. 4 212

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

Violation Priority Line
Avoid unused private fields such as 'nFollowers'. 3 41
Avoid unused private fields such as 'nLeaders'. 3 44
Avoid unused private fields such as 'headwayGtuType'. 3 62
Avoid unused local variables such as 'lane'. 3 91

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 88

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
Useless parentheses. 4 380

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

Violation Priority Line
Useless parentheses. 4 370
Avoid unused method parameters such as 'gtu'. 3 407
Avoid unused method parameters such as 'startSpeed'. 3 443
Useless parentheses. 4 500
Useless parentheses. 4 500

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 508
Avoid unused method parameters such as 'lanePathInfo'. 3 508
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 483499

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

Violation Priority Line
Avoid unused local variables such as 'speed'. 3 94
Avoid unused local variables such as 'realPlan'. 3 128

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 121
Useless parentheses. 4 122

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 176193
Useless parentheses. 4 469
Useless parentheses. 4 470

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

Violation Priority Line
Too many static imports may lead to messy code 3 1785
Useless parentheses. 4 325
Ternary operators that can be simplified with || or && 3 372373
Useless parentheses. 4 376377
Ternary operators that can be simplified with || or && 3 389390
Useless parentheses. 4 401
Useless parentheses. 4 685
Useless parentheses. 4 685

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 222
Useless parentheses. 4 223
Useless parentheses. 4 238239
Useless parentheses. 4 240241

org/opentrafficsim/road/network/factory/LaneFactory.java

Violation Priority Line
Avoid unused method parameters such as 'simulator'. 3 357

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

Violation Priority Line
Avoid unused constructor parameters such as 'newSimulator'. 3 195

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

Violation Priority Line
Useless parentheses. 4 494495
Useless parentheses. 4 496497
These nested if statements could be combined 3 499503
Useless parentheses. 4 534535
Useless parentheses. 4 536537
These nested if statements could be combined 3 539543
Useless parentheses. 4 1472
Useless parentheses. 4 1473
Useless parentheses. 4 1500
Useless parentheses. 4 1501

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 517518
Useless parentheses. 4 587588
Useless parentheses. 4 588

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

Violation Priority Line
Useless parentheses. 4 157
Useless parentheses. 4 158
These nested if statements could be combined 3 706714

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

Violation Priority Line
Useless parentheses. 4 372
Useless parentheses. 4 373
Useless parentheses. 4 513
Useless parentheses. 4 513
Useless parentheses. 4 521
Useless parentheses. 4 521

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/BusStop.java

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

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/SpeedSign.java

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

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

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