PMD Results

The following document contains the results of PMD 6.21.0.

Violations By Priority

Priority 2

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

Rule Violation Line
BooleanInstantiation Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 1464
BooleanInstantiation Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 1473

Priority 3

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

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 348368
CollapsibleIfStatements These nested if statements could be combined 408428

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

Rule Violation Line
EmptyCatchBlock Avoid empty catch blocks 5457

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

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'biases'. 78
EmptyCatchBlock Avoid empty catch blocks 296299
EmptyCatchBlock Avoid empty catch blocks 608611
UnnecessaryModifier Unnecessary modifier 'public' on class 'ByValue': members of interface types are implicitly public 10641124

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

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on interface 'TacticalPlannerFactorySupplierOD': members of interface types are implicitly public 106118

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

Rule Violation Line
EmptyCatchBlock Avoid empty catch blocks 15721575
EmptyCatchBlock Avoid empty catch blocks 15881591

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

Rule Violation Line
EmptyIfStmt Avoid empty if statements 590592
EmptyCatchBlock Avoid empty catch blocks 13361339

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

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'simulator'. 52
SimplifiedTernary Ternary operators that can be simplified with || or && 96

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

Rule Violation Line
UselessQualifiedThis Useless qualified this usage in the same class. 125
UselessQualifiedThis Useless qualified this usage in the same class. 127
UselessQualifiedThis Useless qualified this usage in the same class. 128
UselessQualifiedThis Useless qualified this usage in the same class. 132
UselessQualifiedThis Useless qualified this usage in the same class. 133
UselessQualifiedThis Useless qualified this usage in the same class. 316

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

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 120124

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

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on interface 'PerceptionCollector': members of interface types are implicitly public 7695
UnnecessaryModifier Unnecessary modifier 'public' on interface 'PerceptionAccumulator': members of interface types are implicitly public 111121
UnnecessaryModifier Unnecessary modifier 'public' on interface 'PerceptionFinalizer': members of interface types are implicitly public 137145

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

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 343348

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

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 749752
CollapsibleIfStatements These nested if statements could be combined 883900

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

Rule Violation Line
UnusedFormalParameter Avoid unused method parameters such as 'context'. 126

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

Rule Violation Line
UselessOverridingMethod Overriding method merely calls super 3740

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

Rule Violation Line
UnusedFormalParameter Avoid unused method parameters such as 'planDistance'. 711
UnusedFormalParameter Avoid unused method parameters such as 'width'. 712
UnusedFormalParameter Avoid unused method parameters such as 'startPosition'. 712
UnusedFormalParameter Avoid unused method parameters such as 'from'. 712
UnusedFormalParameter Avoid unused method parameters such as 'toLine'. 713
UnusedFormalParameter Avoid unused method parameters such as 'fromLine'. 713
UnusedLocalVariable Avoid unused local variables such as 'f'. 725
UnusedLocalVariable Avoid unused local variables such as 'cumulLcLength'. 729

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

Rule Violation Line
UnusedLocalVariable Avoid unused local variables such as 'alternativeTried'. 349
UnusedFormalParameter Avoid unused method parameters such as 'startSpeed'. 555

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

Rule Violation Line
UnusedLocalVariable Avoid unused local variables such as 'currentLaneFine'. 151

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

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 238245
UnusedFormalParameter Avoid unused method parameters such as 'lanePathInfo'. 508
UnusedFormalParameter Avoid unused method parameters such as 'perception'. 508

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

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 7584

org/opentrafficsim/road/gtu/lane/tactical/routesystem/DefaultRouteSystem.java

Rule Violation Line
UnusedFormalParameter Avoid unused method parameters such as 'route'. 78
UnusedPrivateMethod Avoid unused private methods such as 'determineSet(DirectedLanePosition,Length,Route,GTUType,Length)'. 7879
UnusedFormalParameter Avoid unused method parameters such as 'distance'. 79

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

Rule Violation Line
UnusedFormalParameter Avoid unused method parameters such as 'gtu'. 716

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

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 188200
CollapsibleIfStatements These nested if statements could be combined 498514

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

Rule Violation Line
UnusedLocalVariable Avoid unused local variables such as 'speed'. 94
UnusedLocalVariable Avoid unused local variables such as 'realPlan'. 128

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

Rule Violation Line
UnusedLocalVariable Avoid unused local variables such as 'b'. 85
SimplifiedTernary Ternary operators that can be simplified with || or && 93

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

Rule Violation Line
SimplifiedTernary Ternary operators that can be simplified with || or && 110

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

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 187204
UnusedPrivateMethod Avoid unused private methods such as 'quickIntersectionScan(Parameters,SpeedLimitInfo,CarFollowingModel,Speed,LateralDirectionality,IntersectionPerception)'. 594596

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

Rule Violation Line
TooManyStaticImports Too many static imports may lead to messy code 1836
SimplifiedTernary Ternary operators that can be simplified with || or && 397398
SimplifiedTernary Ternary operators that can be simplified with || or && 414415
UnnecessaryModifier Unnecessary modifier 'public' on method 'getMergeDistance': the method is declared in an interface type 499511

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

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'simulator'. 108
UnusedFormalParameter Avoid unused method parameters such as 'simulator'. 387

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

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'newSimulator'. 346

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

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 535539
CollapsibleIfStatements These nested if statements could be combined 575579

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

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'inverted'. 144

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

Rule Violation Line
UnusedPrivateMethod Avoid unused private methods such as 'directionalityNone(RoadNetwork)'. 35

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

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 420440
CollapsibleIfStatements These nested if statements could be combined 851870

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

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 292295

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

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'simulator'. 62

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

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'simulator'. 41

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

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'simulator'. 62

Priority 4

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

Rule Violation Line
UselessParentheses Useless parentheses. 279
UselessParentheses Useless parentheses. 279
UselessParentheses Useless parentheses. 280
UselessParentheses Useless parentheses. 280

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

Rule Violation Line
UselessParentheses Useless parentheses. 958
UselessParentheses Useless parentheses. 1167

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

Rule Violation Line
UselessParentheses Useless parentheses. 304

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

Rule Violation Line
UselessParentheses Useless parentheses. 1085

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

Rule Violation Line
UselessParentheses Useless parentheses. 44

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

Rule Violation Line
UselessParentheses Useless parentheses. 102

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

Rule Violation Line
UselessParentheses Useless parentheses. 65

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

Rule Violation Line
UselessParentheses Useless parentheses. 481
UselessParentheses Useless parentheses. 13331334
UselessParentheses Useless parentheses. 13341335
UselessParentheses Useless parentheses. 14201421
UselessParentheses Useless parentheses. 14211422
UselessParentheses Useless parentheses. 15031504
UselessParentheses Useless parentheses. 1504
UselessParentheses Useless parentheses. 15321533
UselessParentheses Useless parentheses. 1533

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

Rule Violation Line
UselessParentheses Useless parentheses. 343344
UselessParentheses Useless parentheses. 344345

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

Rule Violation Line
UselessParentheses Useless parentheses. 75

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

Rule Violation Line
UselessParentheses Useless parentheses. 952
UselessParentheses Useless parentheses. 952
UselessParentheses Useless parentheses. 953
UselessParentheses Useless parentheses. 953

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

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.opentrafficsim.road.gtu.lane.Break' 22
UselessParentheses Useless parentheses. 412413
UselessParentheses Useless parentheses. 413
UselessParentheses Useless parentheses. 428
UselessParentheses Useless parentheses. 428
UselessParentheses Useless parentheses. 441
UselessParentheses Useless parentheses. 441
UselessParentheses Useless parentheses. 444
UselessParentheses Useless parentheses. 444445
UselessParentheses Useless parentheses. 455
UselessParentheses Useless parentheses. 455456
UselessParentheses Useless parentheses. 655
UselessParentheses Useless parentheses. 655656

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

Rule Violation Line
UselessParentheses Useless parentheses. 273274
UselessParentheses Useless parentheses. 275276

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

Rule Violation Line
UselessParentheses Useless parentheses. 211

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

Rule Violation Line
UselessParentheses Useless parentheses. 81

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

Rule Violation Line
UselessParentheses Useless parentheses. 46

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

Rule Violation Line
UselessParentheses Useless parentheses. 88

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

Rule Violation Line
UselessParentheses Useless parentheses. 41

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

Rule Violation Line
UselessParentheses Useless parentheses. 180

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

Rule Violation Line
UselessParentheses Useless parentheses. 56

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

Rule Violation Line
UselessParentheses Useless parentheses. 640
UselessParentheses Useless parentheses. 826

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

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.opentrafficsim.core.gtu.GTUDirectionality' 25
UnusedImports Avoid unused imports such as 'org.opentrafficsim.core.gtu.RelativePosition' 27
UselessParentheses Useless parentheses. 495

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

Rule Violation Line
UselessParentheses Useless parentheses. 236
UselessParentheses Useless parentheses. 266
UselessParentheses Useless parentheses. 629

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

Rule Violation Line
UselessParentheses Useless parentheses. 90

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

Rule Violation Line
UselessParentheses Useless parentheses. 162
UselessParentheses Useless parentheses. 163164

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

Rule Violation Line
UselessParentheses Useless parentheses. 849850

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

Rule Violation Line
UselessParentheses Useless parentheses. 43
UselessParentheses Useless parentheses. 44
UselessParentheses Useless parentheses. 79
UselessParentheses Useless parentheses. 80
UselessParentheses Useless parentheses. 124
UselessParentheses Useless parentheses. 125

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

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.opentrafficsim.road.gtu.lane.Break' 24

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

Rule Violation Line
UselessParentheses Useless parentheses. 350
UselessParentheses Useless parentheses. 401402
UselessParentheses Useless parentheses. 426
UselessParentheses Useless parentheses. 736
UselessParentheses Useless parentheses. 736

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

Rule Violation Line
UselessParentheses Useless parentheses. 199
UselessParentheses Useless parentheses. 200

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

Rule Violation Line
UselessParentheses Useless parentheses. 164
UselessParentheses Useless parentheses. 164
UselessParentheses Useless parentheses. 234235
UselessParentheses Useless parentheses. 234
UselessParentheses Useless parentheses. 250251
UselessParentheses Useless parentheses. 251252

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

Rule Violation Line
UselessParentheses Useless parentheses. 128

org/opentrafficsim/road/network/control/rampmetering/AlineaSwitch.java

Rule Violation Line
UselessParentheses Useless parentheses. 60

org/opentrafficsim/road/network/control/rampmetering/RwsSwitch.java

Rule Violation Line
UselessParentheses Useless parentheses. 63

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

Rule Violation Line
UselessParentheses Useless parentheses. 269
UselessParentheses Useless parentheses. 270
UselessParentheses Useless parentheses. 270

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

Rule Violation Line
UselessParentheses Useless parentheses. 530531
UselessParentheses Useless parentheses. 532533
UselessParentheses Useless parentheses. 570571
UselessParentheses Useless parentheses. 572573
UselessParentheses Useless parentheses. 1512
UselessParentheses Useless parentheses. 1513
UselessParentheses Useless parentheses. 1540
UselessParentheses Useless parentheses. 1541

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

Rule Violation Line
UselessParentheses Useless parentheses. 188
UselessParentheses Useless parentheses. 189

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

Rule Violation Line
UselessParentheses Useless parentheses. 300
UselessParentheses Useless parentheses. 468
UselessParentheses Useless parentheses. 469
UselessParentheses Useless parentheses. 619
UselessParentheses Useless parentheses. 619
UselessParentheses Useless parentheses. 627
UselessParentheses Useless parentheses. 627

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

Rule Violation Line
UselessParentheses Useless parentheses. 726
UselessParentheses Useless parentheses. 727
UselessParentheses Useless parentheses. 876
UselessParentheses Useless parentheses. 876
UselessParentheses Useless parentheses. 884
UselessParentheses Useless parentheses. 884

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

Rule Violation Line
UselessParentheses Useless parentheses. 111
UselessParentheses Useless parentheses. 112

Files

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 279
UselessParentheses Useless parentheses. 4 279
UselessParentheses Useless parentheses. 4 280
UselessParentheses Useless parentheses. 4 280
CollapsibleIfStatements These nested if statements could be combined 3 348368
CollapsibleIfStatements These nested if statements could be combined 3 408428

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

Rule Violation Priority Line
EmptyCatchBlock Avoid empty catch blocks 3 5457

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

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'biases'. 3 78
EmptyCatchBlock Avoid empty catch blocks 3 296299
EmptyCatchBlock Avoid empty catch blocks 3 608611
UselessParentheses Useless parentheses. 4 958
UnnecessaryModifier Unnecessary modifier 'public' on class 'ByValue': members of interface types are implicitly public 3 10641124
UselessParentheses Useless parentheses. 4 1167

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 304

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

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on interface 'TacticalPlannerFactorySupplierOD': members of interface types are implicitly public 3 106118

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

Rule Violation Priority Line
BooleanInstantiation Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 2 1464
BooleanInstantiation Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 2 1473
EmptyCatchBlock Avoid empty catch blocks 3 15721575
EmptyCatchBlock Avoid empty catch blocks 3 15881591

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

Rule Violation Priority Line
EmptyIfStmt Avoid empty if statements 3 590592
UselessParentheses Useless parentheses. 4 1085
EmptyCatchBlock Avoid empty catch blocks 3 13361339

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

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'simulator'. 3 52
SimplifiedTernary Ternary operators that can be simplified with || or && 3 96

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 44

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

Rule Violation Priority Line
UselessQualifiedThis Useless qualified this usage in the same class. 3 125
UselessQualifiedThis Useless qualified this usage in the same class. 3 127
UselessQualifiedThis Useless qualified this usage in the same class. 3 128
UselessQualifiedThis Useless qualified this usage in the same class. 3 132
UselessQualifiedThis Useless qualified this usage in the same class. 3 133
UselessQualifiedThis Useless qualified this usage in the same class. 3 316

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 102
CollapsibleIfStatements These nested if statements could be combined 3 120124

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

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on interface 'PerceptionCollector': members of interface types are implicitly public 3 7695
UnnecessaryModifier Unnecessary modifier 'public' on interface 'PerceptionAccumulator': members of interface types are implicitly public 3 111121
UnnecessaryModifier Unnecessary modifier 'public' on interface 'PerceptionFinalizer': members of interface types are implicitly public 3 137145

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 65

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 481
UselessParentheses Useless parentheses. 4 13331334
UselessParentheses Useless parentheses. 4 13341335
UselessParentheses Useless parentheses. 4 14201421
UselessParentheses Useless parentheses. 4 14211422
UselessParentheses Useless parentheses. 4 15031504
UselessParentheses Useless parentheses. 4 1504
UselessParentheses Useless parentheses. 4 15321533
UselessParentheses Useless parentheses. 4 1533

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

Rule Violation Priority Line
CollapsibleIfStatements These nested if statements could be combined 3 343348
UselessParentheses Useless parentheses. 4 343344
UselessParentheses Useless parentheses. 4 344345

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 75

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

Rule Violation Priority Line
CollapsibleIfStatements These nested if statements could be combined 3 749752
CollapsibleIfStatements These nested if statements could be combined 3 883900
UselessParentheses Useless parentheses. 4 952
UselessParentheses Useless parentheses. 4 952
UselessParentheses Useless parentheses. 4 953
UselessParentheses Useless parentheses. 4 953

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

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.opentrafficsim.road.gtu.lane.Break' 4 22
UselessParentheses Useless parentheses. 4 412413
UselessParentheses Useless parentheses. 4 413
UselessParentheses Useless parentheses. 4 428
UselessParentheses Useless parentheses. 4 428
UselessParentheses Useless parentheses. 4 441
UselessParentheses Useless parentheses. 4 441
UselessParentheses Useless parentheses. 4 444
UselessParentheses Useless parentheses. 4 444445
UselessParentheses Useless parentheses. 4 455
UselessParentheses Useless parentheses. 4 455456
UselessParentheses Useless parentheses. 4 655
UselessParentheses Useless parentheses. 4 655656

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

Rule Violation Priority Line
UnusedFormalParameter Avoid unused method parameters such as 'context'. 3 126

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 273274
UselessParentheses Useless parentheses. 4 275276

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 211

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 81

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

Rule Violation Priority Line
UselessOverridingMethod Overriding method merely calls super 3 3740

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 46

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 88

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 41

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 180

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 56

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 640
UnusedFormalParameter Avoid unused method parameters such as 'planDistance'. 3 711
UnusedFormalParameter Avoid unused method parameters such as 'width'. 3 712
UnusedFormalParameter Avoid unused method parameters such as 'startPosition'. 3 712
UnusedFormalParameter Avoid unused method parameters such as 'from'. 3 712
UnusedFormalParameter Avoid unused method parameters such as 'toLine'. 3 713
UnusedFormalParameter Avoid unused method parameters such as 'fromLine'. 3 713
UnusedLocalVariable Avoid unused local variables such as 'f'. 3 725
UnusedLocalVariable Avoid unused local variables such as 'cumulLcLength'. 3 729
UselessParentheses Useless parentheses. 4 826

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

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.opentrafficsim.core.gtu.GTUDirectionality' 4 25
UnusedImports Avoid unused imports such as 'org.opentrafficsim.core.gtu.RelativePosition' 4 27
UnusedLocalVariable Avoid unused local variables such as 'alternativeTried'. 3 349
UselessParentheses Useless parentheses. 4 495
UnusedFormalParameter Avoid unused method parameters such as 'startSpeed'. 3 555

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

Rule Violation Priority Line
UnusedLocalVariable Avoid unused local variables such as 'currentLaneFine'. 3 151

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

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

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

Rule Violation Priority Line
CollapsibleIfStatements These nested if statements could be combined 3 7584

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 90

org/opentrafficsim/road/gtu/lane/tactical/routesystem/DefaultRouteSystem.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused method parameters such as 'route'. 3 78
UnusedPrivateMethod Avoid unused private methods such as 'determineSet(DirectedLanePosition,Length,Route,GTUType,Length)'. 3 7879
UnusedFormalParameter Avoid unused method parameters such as 'distance'. 3 79

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 162
UselessParentheses Useless parentheses. 4 163164
UnusedFormalParameter Avoid unused method parameters such as 'gtu'. 3 716

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

Rule Violation Priority Line
CollapsibleIfStatements These nested if statements could be combined 3 188200
CollapsibleIfStatements These nested if statements could be combined 3 498514
UselessParentheses Useless parentheses. 4 849850

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

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

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 43
UselessParentheses Useless parentheses. 4 44
UselessParentheses Useless parentheses. 4 79
UselessParentheses Useless parentheses. 4 80
UnusedLocalVariable Avoid unused local variables such as 'b'. 3 85
SimplifiedTernary Ternary operators that can be simplified with || or && 3 93
UselessParentheses Useless parentheses. 4 124
UselessParentheses Useless parentheses. 4 125

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

Rule Violation Priority Line
SimplifiedTernary Ternary operators that can be simplified with || or && 3 110

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

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.opentrafficsim.road.gtu.lane.Break' 4 24
CollapsibleIfStatements These nested if statements could be combined 3 187204
UnusedPrivateMethod Avoid unused private methods such as 'quickIntersectionScan(Parameters,SpeedLimitInfo,CarFollowingModel,Speed,LateralDirectionality,IntersectionPerception)'. 3 594596

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

Rule Violation Priority Line
TooManyStaticImports Too many static imports may lead to messy code 3 1836
UselessParentheses Useless parentheses. 4 350
SimplifiedTernary Ternary operators that can be simplified with || or && 3 397398
UselessParentheses Useless parentheses. 4 401402
SimplifiedTernary Ternary operators that can be simplified with || or && 3 414415
UselessParentheses Useless parentheses. 4 426
UnnecessaryModifier Unnecessary modifier 'public' on method 'getMergeDistance': the method is declared in an interface type 3 499511
UselessParentheses Useless parentheses. 4 736
UselessParentheses Useless parentheses. 4 736

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

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

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 164
UselessParentheses Useless parentheses. 4 164
UselessParentheses Useless parentheses. 4 234235
UselessParentheses Useless parentheses. 4 234
UselessParentheses Useless parentheses. 4 250251
UselessParentheses Useless parentheses. 4 251252

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 128

org/opentrafficsim/road/network/control/rampmetering/AlineaSwitch.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 60

org/opentrafficsim/road/network/control/rampmetering/RwsSwitch.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 63

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

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'simulator'. 3 108
UnusedFormalParameter Avoid unused method parameters such as 'simulator'. 3 387

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 269
UselessParentheses Useless parentheses. 4 270
UselessParentheses Useless parentheses. 4 270
UnusedFormalParameter Avoid unused constructor parameters such as 'newSimulator'. 3 346

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 530531
UselessParentheses Useless parentheses. 4 532533
CollapsibleIfStatements These nested if statements could be combined 3 535539
UselessParentheses Useless parentheses. 4 570571
UselessParentheses Useless parentheses. 4 572573
CollapsibleIfStatements These nested if statements could be combined 3 575579
UselessParentheses Useless parentheses. 4 1512
UselessParentheses Useless parentheses. 4 1513
UselessParentheses Useless parentheses. 4 1540
UselessParentheses Useless parentheses. 4 1541

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

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'inverted'. 3 144

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

Rule Violation Priority Line
UnusedPrivateMethod Avoid unused private methods such as 'directionalityNone(RoadNetwork)'. 3 35

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 188
UselessParentheses Useless parentheses. 4 189
CollapsibleIfStatements These nested if statements could be combined 3 420440
CollapsibleIfStatements These nested if statements could be combined 3 851870

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

Rule Violation Priority Line
CollapsibleIfStatements These nested if statements could be combined 3 292295
UselessParentheses Useless parentheses. 4 300
UselessParentheses Useless parentheses. 4 468
UselessParentheses Useless parentheses. 4 469
UselessParentheses Useless parentheses. 4 619
UselessParentheses Useless parentheses. 4 619
UselessParentheses Useless parentheses. 4 627
UselessParentheses Useless parentheses. 4 627

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 726
UselessParentheses Useless parentheses. 4 727
UselessParentheses Useless parentheses. 4 876
UselessParentheses Useless parentheses. 4 876
UselessParentheses Useless parentheses. 4 884
UselessParentheses Useless parentheses. 4 884

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

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

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

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

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

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

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

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