PMD Results

The following document contains the results of PMD 7.3.0.

Violations By Priority

Priority 3

org/opentrafficsim/demo/CircularRoadSwing.java

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'title'. 73

org/opentrafficsim/demo/NetworksSwing.java

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'title'. 66

org/opentrafficsim/demo/RampMeteringDemo.java

Rule Violation Line
UnusedLocalVariable Avoid unused local variables such as 'part'. 231
UnusedLocalVariable Avoid unused local variables such as 'lanesBC'. 288
UnusedLocalVariable Avoid unused local variables such as 'lanesFB'. 296

org/opentrafficsim/demo/ShortMerge.java

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'title'. 161
EmptyControlStatement Empty if statement 324327
UnusedFormalParameter Avoid unused method parameters such as 'generationSpeed'. 466
UnusedFormalParameter Avoid unused method parameters such as 'gtuColorer'. 468
UnusedFormalParameter Avoid unused method parameters such as 'bcFactory'. 468
UnusedFormalParameter Avoid unused method parameters such as 'tacticalFactory'. 469
UnusedFormalParameter Avoid unused method parameters such as 'simulationTime'. 469

org/opentrafficsim/demo/StraightSwing.java

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'title'. 58

org/opentrafficsim/demo/conflict/TJunctionDemo.java

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'title'. 47

org/opentrafficsim/demo/conflict/TurboRoundaboutDemo.java

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'title'. 47

org/opentrafficsim/demo/loadfromxml/LoadXml.java

Rule Violation Line
UnusedLocalVariable Avoid unused local variables such as 'loadXml'. 140

org/opentrafficsim/demo/strategies/StrategiesDemo.java

Rule Violation Line
UselessQualifiedThis Useless qualified this usage in the same class. 355

org/opentrafficsim/demo/trafficcontrol/TrafCodDemo2.java

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'title'. 63
UnnecessaryReturn Unnecessary return statement 216

Priority 4

org/opentrafficsim/demo/CircularRoadModel.java

Rule Violation Line
UnnecessaryImport Unused import 'java.util.LinkedHashSet' 5
UnnecessaryImport Unused import 'java.util.Set' 8
UselessParentheses Useless parentheses. 285

org/opentrafficsim/demo/CircularRoadSwing.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Thread': 'sleep' is already in scope 131

org/opentrafficsim/demo/NetworksModel.java

Rule Violation Line
UselessParentheses Useless parentheses. 485
UselessParentheses Useless parentheses. 486

org/opentrafficsim/demo/SuperDemo.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'WindowConstants': 'EXIT_ON_CLOSE' is already in scope because it is inherited by an enclosing type 56

org/opentrafficsim/demo/fd/FundamentalDiagramDemo.java

Rule Violation Line
UselessParentheses Useless parentheses. 499

Files

org/opentrafficsim/demo/CircularRoadModel.java

Rule Violation Priority Line
UnnecessaryImport Unused import 'java.util.LinkedHashSet' 4 5
UnnecessaryImport Unused import 'java.util.Set' 4 8
UselessParentheses Useless parentheses. 4 285

org/opentrafficsim/demo/CircularRoadSwing.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'title'. 3 73
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Thread': 'sleep' is already in scope 4 131

org/opentrafficsim/demo/NetworksModel.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 485
UselessParentheses Useless parentheses. 4 486

org/opentrafficsim/demo/NetworksSwing.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'title'. 3 66

org/opentrafficsim/demo/RampMeteringDemo.java

Rule Violation Priority Line
UnusedLocalVariable Avoid unused local variables such as 'part'. 3 231
UnusedLocalVariable Avoid unused local variables such as 'lanesBC'. 3 288
UnusedLocalVariable Avoid unused local variables such as 'lanesFB'. 3 296

org/opentrafficsim/demo/ShortMerge.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'title'. 3 161
EmptyControlStatement Empty if statement 3 324327
UnusedFormalParameter Avoid unused method parameters such as 'generationSpeed'. 3 466
UnusedFormalParameter Avoid unused method parameters such as 'gtuColorer'. 3 468
UnusedFormalParameter Avoid unused method parameters such as 'bcFactory'. 3 468
UnusedFormalParameter Avoid unused method parameters such as 'tacticalFactory'. 3 469
UnusedFormalParameter Avoid unused method parameters such as 'simulationTime'. 3 469

org/opentrafficsim/demo/StraightSwing.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'title'. 3 58

org/opentrafficsim/demo/SuperDemo.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'WindowConstants': 'EXIT_ON_CLOSE' is already in scope because it is inherited by an enclosing type 4 56

org/opentrafficsim/demo/conflict/TJunctionDemo.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'title'. 3 47

org/opentrafficsim/demo/conflict/TurboRoundaboutDemo.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'title'. 3 47

org/opentrafficsim/demo/fd/FundamentalDiagramDemo.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 499

org/opentrafficsim/demo/loadfromxml/LoadXml.java

Rule Violation Priority Line
UnusedLocalVariable Avoid unused local variables such as 'loadXml'. 3 140

org/opentrafficsim/demo/strategies/StrategiesDemo.java

Rule Violation Priority Line
UselessQualifiedThis Useless qualified this usage in the same class. 3 355

org/opentrafficsim/demo/trafficcontrol/TrafCodDemo2.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'title'. 3 63
UnnecessaryReturn Unnecessary return statement 3 216

Suppressed Violations

Filename Rule message Suppression type Reason
org/opentrafficsim/demo/strategies/StrategiesDemo.java Avoid unused private methods such as 'checkVehicleNumber()'. @suppresswarnings