PMD Results

The following document contains the results of PMD 7.3.0.

Violations By Priority

Priority 2

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

Rule Violation Line
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 506

Priority 3

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

Rule Violation Line
EmptyCatchBlock Avoid empty catch blocks 493496
UnnecessaryModifier Unnecessary modifier 'public' on interface 'RoadPosition': the interface is declared in an interface type 868

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

Rule Violation Line
EmptyCatchBlock Avoid empty catch blocks 13841387
SimplifiedTernary This conditional expression can be simplified with || or && 1637

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

Rule Violation Line
UselessQualifiedThis Useless qualified this usage in the same class. 123
UselessQualifiedThis Useless qualified this usage in the same class. 125
UselessQualifiedThis Useless qualified this usage in the same class. 126
UselessQualifiedThis Useless qualified this usage in the same class. 130
UselessQualifiedThis Useless qualified this usage in the same class. 131
CollapsibleIfStatements This if statement could be combined with its parent 319322
UselessQualifiedThis Useless qualified this usage in the same class. 330

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

Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 120124

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

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on interface 'PerceptionCollector': the interface is declared in an interface type 74
UnnecessaryModifier Unnecessary modifier 'public' on interface 'PerceptionAccumulator': the interface is declared in an interface type 108
UnnecessaryModifier Unnecessary modifier 'public' on interface 'PerceptionFinalizer': the interface is declared in an interface type 133

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

Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 6063

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

Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 736739
CollapsibleIfStatements This if statement could be combined with its parent 868885

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

Rule Violation Line
UselessOverridingMethod Overriding method merely calls super 36

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

Rule Violation Line
UselessQualifiedThis Useless qualified this usage in the same class. 90
UselessQualifiedThis Useless qualified this usage in the same class. 96
UselessQualifiedThis Useless qualified this usage in the same class. 135
UselessQualifiedThis Useless qualified this usage in the same class. 183
UselessQualifiedThis Useless qualified this usage in the same class. 184
UselessQualifiedThis Useless qualified this usage in the same class. 235
UselessQualifiedThis Useless qualified this usage in the same class. 236
UselessQualifiedThis Useless qualified this usage in the same class. 295
UselessQualifiedThis Useless qualified this usage in the same class. 296
UselessQualifiedThis Useless qualified this usage in the same class. 334
UselessQualifiedThis Useless qualified this usage in the same class. 335
UselessQualifiedThis Useless qualified this usage in the same class. 375
UselessQualifiedThis Useless qualified this usage in the same class. 396
UnnecessaryModifier Unnecessary modifier 'final' on method 'position': private methods cannot be overridden 415
UselessQualifiedThis Useless qualified this usage in the same class. 417
UselessQualifiedThis Useless qualified this usage in the same class. 773
UselessQualifiedThis Useless qualified this usage in the same class. 778
UselessQualifiedThis Useless qualified this usage in the same class. 778
UselessQualifiedThis Useless qualified this usage in the same class. 779

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

Rule Violation Line
UnusedFormalParameter Avoid unused method parameters such as 'planDistance'. 673
UnusedFormalParameter Avoid unused method parameters such as 'width'. 674
UnusedFormalParameter Avoid unused method parameters such as 'from'. 674
UnusedFormalParameter Avoid unused method parameters such as 'startPosition'. 674
UnusedFormalParameter Avoid unused method parameters such as 'fromLine'. 674
UnusedFormalParameter Avoid unused method parameters such as 'toLine'. 675
UnusedLocalVariable Avoid unused local variables such as 'f'. 687
UnusedLocalVariable Avoid unused local variables such as 'cumulLcLength'. 691

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

Rule Violation Line
UnusedLocalVariable Avoid unused local variables such as 'currentLaneFine'. 150
UnusedLocalVariable Avoid unused local variables such as 'nextSplitNode'. 428
UnusedLocalVariable Avoid unused local variables such as 'nextLane'. 503

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

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'getReferenceLane': the method is already in a final class 45

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

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'isSplit': the method is already in a final class 46

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

Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 7483

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

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

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

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on record 'AnticipationInfo': records are implicitly final 28

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

Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 191202
CollapsibleIfStatements This if statement could be combined with its parent 499515

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

Rule Violation Line
SimplifiedTernary This conditional expression can be simplified with || or && 96

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

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'get': the method is already in a final class 56
UnnecessaryModifier Unnecessary modifier 'final' on method 'leftIsLargerOrEqual': the method is already in a final class 73

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

Rule Violation Line
SimplifiedTernary This conditional expression can be simplified with || or && 109

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

Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 187204
UnusedPrivateMethod Avoid unused private methods such as 'quickIntersectionScan(Parameters, SpeedLimitInfo, CarFollowingModel, Speed, LateralDirectionality, IntersectionPerception)'. 591

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

Rule Violation Line
SimplifiedTernary This conditional expression can be simplified with || or && 365366
SimplifiedTernary This conditional expression can be simplified with || or && 382383
UnnecessaryModifier Unnecessary modifier 'public' on method 'getMergeDistance': the method is declared in an interface type 475

org/opentrafficsim/road/gtu/strategical/RouteGenerator.java

Rule Violation Line
EmptyCatchBlock Avoid empty catch blocks 117120
UnnecessarySemicolon Unnecessary semicolon 163

org/opentrafficsim/road/network/RoadNetwork.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'static' on record 'LaneChangeInfoEdge': records are implicitly static 526

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

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'simulator'. 124
UnusedFormalParameter Avoid unused method parameters such as 'simulator'. 432

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

Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 301305
CollapsibleIfStatements This if statement could be combined with its parent 341345

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

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'getLocation': the method is already in a final class 31

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

Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 402423
CollapsibleIfStatements This if statement could be combined with its parent 786805

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

Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 278281
EmptyCatchBlock Avoid empty catch blocks 11041107
EmptyCatchBlock Avoid empty catch blocks 11261129
EmptyCatchBlock Avoid empty catch blocks 11391142
EmptyCatchBlock Avoid empty catch blocks 11981201
EmptyCatchBlock Avoid empty catch blocks 12191222
EmptyCatchBlock Avoid empty catch blocks 12321235
UnnecessaryModifier Unnecessary modifier 'static' on record 'ConflictBuilderRecordSmall': records are implicitly static 1352
UnnecessaryModifier Unnecessary modifier 'static' on record 'ConflictBuilderRecordBig': records are implicitly static 1467

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

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'isPriority': the method is already in a final class 35
UnnecessaryModifier Unnecessary modifier 'final' on method 'isGiveWay': the method is already in a final class 44
UnnecessaryModifier Unnecessary modifier 'final' on method 'isStop': the method is already in a final class 53
UnnecessaryModifier Unnecessary modifier 'final' on method 'isAllStop': the method is already in a final class 62
UnnecessaryModifier Unnecessary modifier 'final' on method 'isSplit': the method is already in a final class 71

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

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as 'name'. 42
UnusedFormalParameter Avoid unused constructor parameters such as 'simulator'. 60

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

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

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

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

org/opentrafficsim/road/network/lane/object/detector/TrafficLightDetector.java

Rule Violation Line
UnnecessaryReturn Unnecessary return statement 253

org/opentrafficsim/road/network/lane/object/trafficlight/TrafficLightColor.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'isRedOrYellow': the method is already in a final class 31
UnnecessaryModifier Unnecessary modifier 'final' on method 'isRed': the method is already in a final class 37
UnnecessaryModifier Unnecessary modifier 'final' on method 'isYellow': the method is already in a final class 43
UnnecessaryModifier Unnecessary modifier 'final' on method 'isGreen': the method is already in a final class 49
UnnecessaryModifier Unnecessary modifier 'final' on method 'isPreGreen': the method is already in a final class 55
UnnecessaryModifier Unnecessary modifier 'final' on method 'isBlack': the method is already in a final class 61

org/opentrafficsim/road/network/speed/SpeedInfoCurvature.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'getSpeedForLateralAcceleration': the method is already in a final class 43

org/opentrafficsim/road/od/OdApplier.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'static' on record 'GeneratorObjects': records are implicitly static 928

Priority 4

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

Rule Violation Line
UselessParentheses Useless parentheses. 785
UselessParentheses Useless parentheses. 991

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

Rule Violation Line
UnnecessaryImport Unused import 'java.util.Set' 7

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

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneBasedGtu': 'LANE_CHANGE_EVENT' is already in scope because it is declared in an enclosing type 301
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneBasedGtu': 'LANE_CHANGE_EVENT' is already in scope because it is declared in an enclosing type 474
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneBasedGtu': 'LANEBASED_MOVE_EVENT' is already in scope because it is declared in an enclosing type 546
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneBasedGtu': 'LANEBASED_DESTROY_EVENT' is already in scope because it is declared in an enclosing type 1415
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneBasedGtu': 'LANEBASED_DESTROY_EVENT' is already in scope because it is declared in an enclosing type 1423

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

Rule Violation Line
UselessParentheses Useless parentheses. 87

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

Rule Violation Line
UselessParentheses Useless parentheses. 87

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

Rule Violation Line
UselessParentheses Useless parentheses. 80

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

Rule Violation Line
UselessParentheses Useless parentheses. 45

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

Rule Violation Line
UselessParentheses Useless parentheses. 87

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

Rule Violation Line
UselessParentheses Useless parentheses. 40

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

Rule Violation Line
UselessParentheses Useless parentheses. 53

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

Rule Violation Line
UselessParentheses Useless parentheses. 532533

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

Rule Violation Line
UselessParentheses Useless parentheses. 148

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

Rule Violation Line
UselessParentheses Useless parentheses. 615
UselessParentheses Useless parentheses. 615
UselessParentheses Useless parentheses. 753

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

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneOperationalPlanBuilder': 'buildAccelerationPlan' is already in scope 301
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneOperationalPlanBuilder': 'buildAccelerationPlan' is already in scope 315
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneOperationalPlanBuilder': 'buildAccelerationPlan' is already in scope 320
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneOperationalPlanBuilder': 'buildAccelerationLaneChangePlan' is already in scope 323

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

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneBasedTacticalPlanner': 'mostOnSide' is already in scope 88

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

Rule Violation Line
UselessParentheses Useless parentheses. 118

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

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Toledo': 'RANDOM' is already in scope because it is declared in an enclosing type 187
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Toledo': 'RANDOM' is already in scope because it is declared in an enclosing type 209
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Toledo': 'RANDOM' is already in scope because it is declared in an enclosing type 227
UselessParentheses Useless parentheses. 761

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

Rule Violation Line
UnnecessaryImport Unused static import 'org.opentrafficsim.road.gtu.lane.tactical.util.lmrs.Tailgating.socialPressure' 3

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

Rule Violation Line
UselessParentheses Useless parentheses. 172

org/opentrafficsim/road/network/RoadNetwork.java

Rule Violation Line
UselessParentheses Useless parentheses. 337

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

Rule Violation Line
UselessParentheses Useless parentheses. 282
UselessParentheses Useless parentheses. 284
UselessParentheses Useless parentheses. 322
UselessParentheses Useless parentheses. 324
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lane': 'DETECTOR_ADD_EVENT' is already in scope because it is declared in an enclosing type 385
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lane': 'DETECTOR_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 396
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lane': 'OBJECT_ADD_EVENT' is already in scope because it is declared in an enclosing type 598
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lane': 'OBJECT_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 608
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lane': 'GTU_ADD_EVENT' is already in scope because it is declared in an enclosing type 775
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lane': 'GTU_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 808
UselessParentheses Useless parentheses. 1051
UselessParentheses Useless parentheses. 1119

org/opentrafficsim/road/network/lane/object/detector/LaneDetector.java

Rule Violation Line
UnnecessaryImport Unused import 'java.rmi.RemoteException' 3
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneDetector': 'DEFAULT_DETECTOR_ELEVATION' is already in scope because it is declared in an enclosing type 111
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneDetector': 'DETECTOR_TRIGGER_EVENT' is already in scope because it is declared in an enclosing type 150

org/opentrafficsim/road/network/lane/object/detector/TrafficLightDetector.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'TrafficLightDetector': 'TRAFFIC_LIGHT_DETECTOR_TRIGGER_ENTRY_EVENT' is already in scope because it is declared in an enclosing type 193
UnnecessaryFullyQualifiedName Unnecessary qualifier 'TrafficLightDetector': 'TRAFFIC_LIGHT_DETECTOR_TRIGGER_EXIT_EVENT' is already in scope because it is declared in an enclosing type 206

org/opentrafficsim/road/od/OdApplier.java

Rule Violation Line
UselessParentheses Useless parentheses. 336
UselessParentheses Useless parentheses. 341

org/opentrafficsim/road/od/SplitFraction.java

Rule Violation Line
UselessParentheses Useless parentheses. 175

Files

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

Rule Violation Priority Line
EmptyCatchBlock Avoid empty catch blocks 3 493496
UselessParentheses Useless parentheses. 4 785
UnnecessaryModifier Unnecessary modifier 'public' on interface 'RoadPosition': the interface is declared in an interface type 3 868
UselessParentheses Useless parentheses. 4 991

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

Rule Violation Priority Line
UnnecessaryImport Unused import 'java.util.Set' 4 7

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

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneBasedGtu': 'LANE_CHANGE_EVENT' is already in scope because it is declared in an enclosing type 4 301
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneBasedGtu': 'LANE_CHANGE_EVENT' is already in scope because it is declared in an enclosing type 4 474
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneBasedGtu': 'LANEBASED_MOVE_EVENT' is already in scope because it is declared in an enclosing type 4 546
EmptyCatchBlock Avoid empty catch blocks 3 13841387
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneBasedGtu': 'LANEBASED_DESTROY_EVENT' is already in scope because it is declared in an enclosing type 4 1415
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneBasedGtu': 'LANEBASED_DESTROY_EVENT' is already in scope because it is declared in an enclosing type 4 1423
SimplifiedTernary This conditional expression can be simplified with || or && 3 1637

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

Rule Violation Priority Line
UselessQualifiedThis Useless qualified this usage in the same class. 3 123
UselessQualifiedThis Useless qualified this usage in the same class. 3 125
UselessQualifiedThis Useless qualified this usage in the same class. 3 126
UselessQualifiedThis Useless qualified this usage in the same class. 3 130
UselessQualifiedThis Useless qualified this usage in the same class. 3 131
CollapsibleIfStatements This if statement could be combined with its parent 3 319322
UselessQualifiedThis Useless qualified this usage in the same class. 3 330

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

Rule Violation Priority Line
CollapsibleIfStatements This if statement could be combined with its parent 3 120124

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

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on interface 'PerceptionCollector': the interface is declared in an interface type 3 74
UnnecessaryModifier Unnecessary modifier 'public' on interface 'PerceptionAccumulator': the interface is declared in an interface type 3 108
UnnecessaryModifier Unnecessary modifier 'public' on interface 'PerceptionFinalizer': the interface is declared in an interface type 3 133

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

Rule Violation Priority Line
CollapsibleIfStatements This if statement could be combined with its parent 3 6063

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

Rule Violation Priority Line
CollapsibleIfStatements This if statement could be combined with its parent 3 736739
CollapsibleIfStatements This if statement could be combined with its parent 3 868885

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 87

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 87

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 80

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

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

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 45

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 87

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 40

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 53

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

Rule Violation Priority Line
UselessQualifiedThis Useless qualified this usage in the same class. 3 90
UselessQualifiedThis Useless qualified this usage in the same class. 3 96
UselessQualifiedThis Useless qualified this usage in the same class. 3 135
UselessQualifiedThis Useless qualified this usage in the same class. 3 183
UselessQualifiedThis Useless qualified this usage in the same class. 3 184
UselessQualifiedThis Useless qualified this usage in the same class. 3 235
UselessQualifiedThis Useless qualified this usage in the same class. 3 236
UselessQualifiedThis Useless qualified this usage in the same class. 3 295
UselessQualifiedThis Useless qualified this usage in the same class. 3 296
UselessQualifiedThis Useless qualified this usage in the same class. 3 334
UselessQualifiedThis Useless qualified this usage in the same class. 3 335
UselessQualifiedThis Useless qualified this usage in the same class. 3 375
UselessQualifiedThis Useless qualified this usage in the same class. 3 396
UnnecessaryModifier Unnecessary modifier 'final' on method 'position': private methods cannot be overridden 3 415
UselessQualifiedThis Useless qualified this usage in the same class. 3 417
UselessParentheses Useless parentheses. 4 532533
UselessQualifiedThis Useless qualified this usage in the same class. 3 773
UselessQualifiedThis Useless qualified this usage in the same class. 3 778
UselessQualifiedThis Useless qualified this usage in the same class. 3 778
UselessQualifiedThis Useless qualified this usage in the same class. 3 779

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 148

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 615
UselessParentheses Useless parentheses. 4 615
UnusedFormalParameter Avoid unused method parameters such as 'planDistance'. 3 673
UnusedFormalParameter Avoid unused method parameters such as 'width'. 3 674
UnusedFormalParameter Avoid unused method parameters such as 'from'. 3 674
UnusedFormalParameter Avoid unused method parameters such as 'startPosition'. 3 674
UnusedFormalParameter Avoid unused method parameters such as 'fromLine'. 3 674
UnusedFormalParameter Avoid unused method parameters such as 'toLine'. 3 675
UnusedLocalVariable Avoid unused local variables such as 'f'. 3 687
UnusedLocalVariable Avoid unused local variables such as 'cumulLcLength'. 3 691
UselessParentheses Useless parentheses. 4 753

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

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneOperationalPlanBuilder': 'buildAccelerationPlan' is already in scope 4 301
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneOperationalPlanBuilder': 'buildAccelerationPlan' is already in scope 4 315
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneOperationalPlanBuilder': 'buildAccelerationPlan' is already in scope 4 320
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneOperationalPlanBuilder': 'buildAccelerationLaneChangePlan' is already in scope 4 323

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

Rule Violation Priority Line
UnusedLocalVariable Avoid unused local variables such as 'currentLaneFine'. 3 150
UnusedLocalVariable Avoid unused local variables such as 'nextSplitNode'. 3 428
UnusedLocalVariable Avoid unused local variables such as 'nextLane'. 3 503
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 2 506

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

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneBasedTacticalPlanner': 'mostOnSide' is already in scope 4 88

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

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'getReferenceLane': the method is already in a final class 3 45

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

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'isSplit': the method is already in a final class 3 46

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

Rule Violation Priority Line
CollapsibleIfStatements This if statement could be combined with its parent 3 7483

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 118

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

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Toledo': 'RANDOM' is already in scope because it is declared in an enclosing type 4 187
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Toledo': 'RANDOM' is already in scope because it is declared in an enclosing type 4 209
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Toledo': 'RANDOM' is already in scope because it is declared in an enclosing type 4 227
UnusedFormalParameter Avoid unused method parameters such as 'gtu'. 3 714
UselessParentheses Useless parentheses. 4 761

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

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on record 'AnticipationInfo': records are implicitly final 3 28

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

Rule Violation Priority Line
CollapsibleIfStatements This if statement could be combined with its parent 3 191202
CollapsibleIfStatements This if statement could be combined with its parent 3 499515

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

Rule Violation Priority Line
SimplifiedTernary This conditional expression can be simplified with || or && 3 96

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

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'get': the method is already in a final class 3 56
UnnecessaryModifier Unnecessary modifier 'final' on method 'leftIsLargerOrEqual': the method is already in a final class 3 73

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

Rule Violation Priority Line
SimplifiedTernary This conditional expression can be simplified with || or && 3 109

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

Rule Violation Priority Line
CollapsibleIfStatements This if statement could be combined with its parent 3 187204
UnusedPrivateMethod Avoid unused private methods such as 'quickIntersectionScan(Parameters, SpeedLimitInfo, CarFollowingModel, Speed, LateralDirectionality, IntersectionPerception)'. 3 591

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

Rule Violation Priority Line
SimplifiedTernary This conditional expression can be simplified with || or && 3 365366
SimplifiedTernary This conditional expression can be simplified with || or && 3 382383
UnnecessaryModifier Unnecessary modifier 'public' on method 'getMergeDistance': the method is declared in an interface type 3 475

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

Rule Violation Priority Line
UnnecessaryImport Unused static import 'org.opentrafficsim.road.gtu.lane.tactical.util.lmrs.Tailgating.socialPressure' 4 3

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 172

org/opentrafficsim/road/gtu/strategical/RouteGenerator.java

Rule Violation Priority Line
EmptyCatchBlock Avoid empty catch blocks 3 117120
UnnecessarySemicolon Unnecessary semicolon 3 163

org/opentrafficsim/road/network/RoadNetwork.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 337
UnnecessaryModifier Unnecessary modifier 'static' on record 'LaneChangeInfoEdge': records are implicitly static 3 526

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

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

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

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 282
UselessParentheses Useless parentheses. 4 284
CollapsibleIfStatements This if statement could be combined with its parent 3 301305
UselessParentheses Useless parentheses. 4 322
UselessParentheses Useless parentheses. 4 324
CollapsibleIfStatements This if statement could be combined with its parent 3 341345
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lane': 'DETECTOR_ADD_EVENT' is already in scope because it is declared in an enclosing type 4 385
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lane': 'DETECTOR_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 4 396
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lane': 'OBJECT_ADD_EVENT' is already in scope because it is declared in an enclosing type 4 598
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lane': 'OBJECT_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 4 608
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lane': 'GTU_ADD_EVENT' is already in scope because it is declared in an enclosing type 4 775
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lane': 'GTU_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 4 808
UselessParentheses Useless parentheses. 4 1051
UselessParentheses Useless parentheses. 4 1119

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

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'getLocation': the method is already in a final class 3 31

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

Rule Violation Priority Line
CollapsibleIfStatements This if statement could be combined with its parent 3 402423
CollapsibleIfStatements This if statement could be combined with its parent 3 786805

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

Rule Violation Priority Line
CollapsibleIfStatements This if statement could be combined with its parent 3 278281
EmptyCatchBlock Avoid empty catch blocks 3 11041107
EmptyCatchBlock Avoid empty catch blocks 3 11261129
EmptyCatchBlock Avoid empty catch blocks 3 11391142
EmptyCatchBlock Avoid empty catch blocks 3 11981201
EmptyCatchBlock Avoid empty catch blocks 3 12191222
EmptyCatchBlock Avoid empty catch blocks 3 12321235
UnnecessaryModifier Unnecessary modifier 'static' on record 'ConflictBuilderRecordSmall': records are implicitly static 3 1352
UnnecessaryModifier Unnecessary modifier 'static' on record 'ConflictBuilderRecordBig': records are implicitly static 3 1467

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

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'isPriority': the method is already in a final class 3 35
UnnecessaryModifier Unnecessary modifier 'final' on method 'isGiveWay': the method is already in a final class 3 44
UnnecessaryModifier Unnecessary modifier 'final' on method 'isStop': the method is already in a final class 3 53
UnnecessaryModifier Unnecessary modifier 'final' on method 'isAllStop': the method is already in a final class 3 62
UnnecessaryModifier Unnecessary modifier 'final' on method 'isSplit': the method is already in a final class 3 71

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

Rule Violation Priority Line
UnusedPrivateField Avoid unused private fields such as 'name'. 3 42
UnusedFormalParameter Avoid unused constructor parameters such as 'simulator'. 3 60

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

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

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

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

org/opentrafficsim/road/network/lane/object/detector/LaneDetector.java

Rule Violation Priority Line
UnnecessaryImport Unused import 'java.rmi.RemoteException' 4 3
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneDetector': 'DEFAULT_DETECTOR_ELEVATION' is already in scope because it is declared in an enclosing type 4 111
UnnecessaryFullyQualifiedName Unnecessary qualifier 'LaneDetector': 'DETECTOR_TRIGGER_EVENT' is already in scope because it is declared in an enclosing type 4 150

org/opentrafficsim/road/network/lane/object/detector/TrafficLightDetector.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'TrafficLightDetector': 'TRAFFIC_LIGHT_DETECTOR_TRIGGER_ENTRY_EVENT' is already in scope because it is declared in an enclosing type 4 193
UnnecessaryFullyQualifiedName Unnecessary qualifier 'TrafficLightDetector': 'TRAFFIC_LIGHT_DETECTOR_TRIGGER_EXIT_EVENT' is already in scope because it is declared in an enclosing type 4 206
UnnecessaryReturn Unnecessary return statement 3 253

org/opentrafficsim/road/network/lane/object/trafficlight/TrafficLightColor.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'isRedOrYellow': the method is already in a final class 3 31
UnnecessaryModifier Unnecessary modifier 'final' on method 'isRed': the method is already in a final class 3 37
UnnecessaryModifier Unnecessary modifier 'final' on method 'isYellow': the method is already in a final class 3 43
UnnecessaryModifier Unnecessary modifier 'final' on method 'isGreen': the method is already in a final class 3 49
UnnecessaryModifier Unnecessary modifier 'final' on method 'isPreGreen': the method is already in a final class 3 55
UnnecessaryModifier Unnecessary modifier 'final' on method 'isBlack': the method is already in a final class 3 61

org/opentrafficsim/road/network/speed/SpeedInfoCurvature.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'getSpeedForLateralAcceleration': the method is already in a final class 3 43

org/opentrafficsim/road/od/OdApplier.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 336
UselessParentheses Useless parentheses. 4 341
UnnecessaryModifier Unnecessary modifier 'static' on record 'GeneratorObjects': records are implicitly static 3 928

org/opentrafficsim/road/od/SplitFraction.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 175

Suppressed Violations

Filename Rule message Suppression type Reason
org/opentrafficsim/road/gtu/generator/LaneBasedGtuGenerator.java Avoid unused private methods such as 'generateCharacteristics()'. @suppresswarnings
org/opentrafficsim/road/gtu/generator/LaneBasedGtuGenerator.java Avoid unused private methods such as 'enable()'. @suppresswarnings
org/opentrafficsim/road/gtu/generator/LaneBasedGtuGenerator.java Avoid unused private methods such as 'disable(Lane)'. @suppresswarnings
org/opentrafficsim/road/gtu/generator/LaneBasedGtuGenerator.java Avoid unused private methods such as 'tryToPlaceGTU(GeneratorLanePosition)'. @suppresswarnings