PMD Results

The following document contains the results of PMD 7.7.0.

Violations By Priority

Priority 3

org/opentrafficsim/swing/graphs/SwingContourPlot.java

Rule Violation Line
UselessQualifiedThis Useless qualified this usage in the same class. 78
UselessQualifiedThis Useless qualified this usage in the same class. 81
UselessQualifiedThis Useless qualified this usage in the same class. 87
UselessQualifiedThis Useless qualified this usage in the same class. 92
UselessQualifiedThis Useless qualified this usage in the same class. 124
UselessQualifiedThis Useless qualified this usage in the same class. 127
UselessQualifiedThis Useless qualified this usage in the same class. 133
UselessQualifiedThis Useless qualified this usage in the same class. 141

org/opentrafficsim/swing/graphs/SwingPlot.java

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

org/opentrafficsim/swing/graphs/SwingTrajectoryPlot.java

Rule Violation Line
UselessQualifiedThis Useless qualified this usage in the same class. 136
UselessQualifiedThis Useless qualified this usage in the same class. 325
UselessQualifiedThis Useless qualified this usage in the same class. 327
UselessQualifiedThis Useless qualified this usage in the same class. 329
UselessQualifiedThis Useless qualified this usage in the same class. 331

org/opentrafficsim/swing/gui/Appearance.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'getName': the method is already in a final class 81
UnnecessaryModifier Unnecessary modifier 'final' on method 'getBackground': the method is already in a final class 90
UnnecessaryModifier Unnecessary modifier 'final' on method 'getForeground': the method is already in a final class 99
UnnecessaryModifier Unnecessary modifier 'final' on method 'getBackdrop': the method is already in a final class 108
UnnecessaryModifier Unnecessary modifier 'final' on method 'getFont': the method is already in a final class 117

org/opentrafficsim/swing/gui/AppearanceApplication.java

Rule Violation Line
EmptyCatchBlock Avoid empty catch blocks 119122
EmptyCatchBlock Avoid empty catch blocks 157160

org/opentrafficsim/swing/gui/ColorControlPanel.java

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

org/opentrafficsim/swing/gui/CustomSimulation.java

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

org/opentrafficsim/swing/gui/OtsAnimationPanel.java

Rule Violation Line
UselessQualifiedThis Useless qualified this usage in the same class. 255
UselessQualifiedThis Useless qualified this usage in the same class. 258
EmptyControlStatement Empty try body 583590
EmptyCatchBlock Avoid empty catch blocks 587590
EmptyCatchBlock Avoid empty catch blocks 689692
EmptyCatchBlock Avoid empty catch blocks 804807
CollapsibleIfStatements This if statement could be combined with its parent 920923

org/opentrafficsim/swing/gui/OtsControlPanel.java

Rule Violation Line
EmptyCatchBlock Avoid empty catch blocks 367370
UselessQualifiedThis Useless qualified this usage in the same class. 447
UselessQualifiedThis Useless qualified this usage in the same class. 453
UselessQualifiedThis Useless qualified this usage in the same class. 461
UnnecessaryReturn Unnecessary return statement 665
UselessQualifiedThis Useless qualified this usage in the same class. 861

org/opentrafficsim/swing/script/AbstractSimulationScript.java

Rule Violation Line
UselessQualifiedThis Useless qualified this usage in the same class. 280
UselessQualifiedThis Useless qualified this usage in the same class. 280
UselessQualifiedThis Useless qualified this usage in the same class. 291
UselessQualifiedThis Useless qualified this usage in the same class. 300

Priority 4

org/opentrafficsim/swing/graphs/SwingFundamentalDiagram.java

Rule Violation Line
UselessParentheses Useless parentheses. 73
UselessParentheses Useless parentheses. 184

org/opentrafficsim/swing/gui/AppearanceApplication.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'AppearanceApplication': 'setDefaultFont' is already in scope 109
UnnecessaryFullyQualifiedName Unnecessary qualifier 'StayOpenCheckBoxMenuItem': 'PATH' is already in scope because it is declared in an enclosing type 514

org/opentrafficsim/swing/gui/OtsAnimationPanel.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Component': 'LEFT_ALIGNMENT' is already in scope because it is inherited by an enclosing type 327
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Component': 'LEFT_ALIGNMENT' is already in scope because it is inherited by an enclosing type 387
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Component': 'LEFT_ALIGNMENT' is already in scope because it is inherited by an enclosing type 429
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Thread': 'sleep' is already in scope 687
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Thread': 'sleep' is already in scope 802

org/opentrafficsim/swing/gui/OtsControlPanel.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Thread': 'sleep' is already in scope 365
UnnecessaryFullyQualifiedName Unnecessary qualifier 'OtsControlPanel': 'loadIcon' is already in scope 541
UnnecessaryFullyQualifiedName Unnecessary qualifier 'SwingConstants': 'RIGHT' is already in scope because it is inherited by an enclosing type 989
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ClockLabel': 'UPDATEINTERVAL' is already in scope because it is declared in an enclosing type 992
UnnecessaryFullyQualifiedName Unnecessary qualifier 'SwingConstants': 'RIGHT' is already in scope because it is inherited by an enclosing type 1191

org/opentrafficsim/swing/gui/OtsSwingApplication.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Frame': 'MAXIMIZED_BOTH' is already in scope because it is inherited by an enclosing type 59
UnnecessaryFullyQualifiedName Unnecessary qualifier 'WindowConstants': 'EXIT_ON_CLOSE' is already in scope because it is inherited by an enclosing type 93
UnnecessaryFullyQualifiedName Unnecessary qualifier 'WindowConstants': 'DISPOSE_ON_CLOSE' is already in scope because it is inherited by an enclosing type 97

Files

org/opentrafficsim/swing/graphs/SwingContourPlot.java

Rule Violation Priority Line
UselessQualifiedThis Useless qualified this usage in the same class. 3 78
UselessQualifiedThis Useless qualified this usage in the same class. 3 81
UselessQualifiedThis Useless qualified this usage in the same class. 3 87
UselessQualifiedThis Useless qualified this usage in the same class. 3 92
UselessQualifiedThis Useless qualified this usage in the same class. 3 124
UselessQualifiedThis Useless qualified this usage in the same class. 3 127
UselessQualifiedThis Useless qualified this usage in the same class. 3 133
UselessQualifiedThis Useless qualified this usage in the same class. 3 141

org/opentrafficsim/swing/graphs/SwingFundamentalDiagram.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 73
UselessParentheses Useless parentheses. 4 184

org/opentrafficsim/swing/graphs/SwingPlot.java

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

org/opentrafficsim/swing/graphs/SwingTrajectoryPlot.java

Rule Violation Priority Line
UselessQualifiedThis Useless qualified this usage in the same class. 3 136
UselessQualifiedThis Useless qualified this usage in the same class. 3 325
UselessQualifiedThis Useless qualified this usage in the same class. 3 327
UselessQualifiedThis Useless qualified this usage in the same class. 3 329
UselessQualifiedThis Useless qualified this usage in the same class. 3 331

org/opentrafficsim/swing/gui/Appearance.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'getName': the method is already in a final class 3 81
UnnecessaryModifier Unnecessary modifier 'final' on method 'getBackground': the method is already in a final class 3 90
UnnecessaryModifier Unnecessary modifier 'final' on method 'getForeground': the method is already in a final class 3 99
UnnecessaryModifier Unnecessary modifier 'final' on method 'getBackdrop': the method is already in a final class 3 108
UnnecessaryModifier Unnecessary modifier 'final' on method 'getFont': the method is already in a final class 3 117

org/opentrafficsim/swing/gui/AppearanceApplication.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'AppearanceApplication': 'setDefaultFont' is already in scope 4 109
EmptyCatchBlock Avoid empty catch blocks 3 119122
EmptyCatchBlock Avoid empty catch blocks 3 157160
UnnecessaryFullyQualifiedName Unnecessary qualifier 'StayOpenCheckBoxMenuItem': 'PATH' is already in scope because it is declared in an enclosing type 4 514

org/opentrafficsim/swing/gui/ColorControlPanel.java

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

org/opentrafficsim/swing/gui/CustomSimulation.java

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

org/opentrafficsim/swing/gui/OtsAnimationPanel.java

Rule Violation Priority Line
UselessQualifiedThis Useless qualified this usage in the same class. 3 255
UselessQualifiedThis Useless qualified this usage in the same class. 3 258
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Component': 'LEFT_ALIGNMENT' is already in scope because it is inherited by an enclosing type 4 327
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Component': 'LEFT_ALIGNMENT' is already in scope because it is inherited by an enclosing type 4 387
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Component': 'LEFT_ALIGNMENT' is already in scope because it is inherited by an enclosing type 4 429
EmptyControlStatement Empty try body 3 583590
EmptyCatchBlock Avoid empty catch blocks 3 587590
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Thread': 'sleep' is already in scope 4 687
EmptyCatchBlock Avoid empty catch blocks 3 689692
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Thread': 'sleep' is already in scope 4 802
EmptyCatchBlock Avoid empty catch blocks 3 804807
CollapsibleIfStatements This if statement could be combined with its parent 3 920923

org/opentrafficsim/swing/gui/OtsControlPanel.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Thread': 'sleep' is already in scope 4 365
EmptyCatchBlock Avoid empty catch blocks 3 367370
UselessQualifiedThis Useless qualified this usage in the same class. 3 447
UselessQualifiedThis Useless qualified this usage in the same class. 3 453
UselessQualifiedThis Useless qualified this usage in the same class. 3 461
UnnecessaryFullyQualifiedName Unnecessary qualifier 'OtsControlPanel': 'loadIcon' is already in scope 4 541
UnnecessaryReturn Unnecessary return statement 3 665
UselessQualifiedThis Useless qualified this usage in the same class. 3 861
UnnecessaryFullyQualifiedName Unnecessary qualifier 'SwingConstants': 'RIGHT' is already in scope because it is inherited by an enclosing type 4 989
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ClockLabel': 'UPDATEINTERVAL' is already in scope because it is declared in an enclosing type 4 992
UnnecessaryFullyQualifiedName Unnecessary qualifier 'SwingConstants': 'RIGHT' is already in scope because it is inherited by an enclosing type 4 1191

org/opentrafficsim/swing/gui/OtsSwingApplication.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Frame': 'MAXIMIZED_BOTH' is already in scope because it is inherited by an enclosing type 4 59
UnnecessaryFullyQualifiedName Unnecessary qualifier 'WindowConstants': 'EXIT_ON_CLOSE' is already in scope because it is inherited by an enclosing type 4 93
UnnecessaryFullyQualifiedName Unnecessary qualifier 'WindowConstants': 'DISPOSE_ON_CLOSE' is already in scope because it is inherited by an enclosing type 4 97

org/opentrafficsim/swing/script/AbstractSimulationScript.java

Rule Violation Priority Line
UselessQualifiedThis Useless qualified this usage in the same class. 3 280
UselessQualifiedThis Useless qualified this usage in the same class. 3 280
UselessQualifiedThis Useless qualified this usage in the same class. 3 291
UselessQualifiedThis Useless qualified this usage in the same class. 3 300