PMD Results

The following document contains the results of PMD 7.3.0.

Violations By Priority

Priority 3

com/bric/multislider/DefaultMultiThumbSliderUi.java

Rule Violation Line
DontUseFloatTypeForLoopIndices Dont use floating point for loop indices. If you must use floating point, use double. 72
UnnecessarySemicolon Unnecessary semicolon 93

com/bric/multislider/Jvm.java

Rule Violation Line
EmptyCatchBlock Avoid empty catch blocks 150152

com/bric/multislider/MultiThumbSlider.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'static' on enum 'Collision': nested enums are implicitly static 84
UnnecessarySemicolon Unnecessary semicolon 95
PrimitiveWrapperInstantiation Do not use `new Integer(...)`, prefer `Integer.valueOf(...)` 669

com/bric/multislider/MultiThumbSliderUi.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'static' on enum 'Thumb': nested enums are implicitly static 85
PrimitiveWrapperInstantiation Do not use `new Float(...)`, prefer `Float.valueOf(...)` 431
PrimitiveWrapperInstantiation Do not use `new Float(...)`, prefer `Float.valueOf(...)` 432
CollapsibleIfStatements This if statement could be combined with its parent 530612
CollapsibleIfStatements This if statement could be combined with its parent 719723
UselessQualifiedThis Useless qualified this usage in the same class. 1093
UnnecessaryReturn Unnecessary return statement 1195
UselessQualifiedThis Useless qualified this usage in the same class. 1524
CollapsibleIfStatements This if statement could be combined with its parent 15471551

com/bric/multislider/ShapeBounds.java

Rule Violation Line
EmptyCatchBlock Avoid empty catch blocks 6365
EmptyControlStatement Empty if statement 155355
EmptyControlStatement Empty if statement 267307
EmptyControlStatement Empty if statement 310350

com/bric/multislider/VistaMultiThumbSliderUI.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'tween': private methods cannot be overridden 144

org/opentrafficsim/swing/graphs/SwingPlot.java

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

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 117120
EmptyCatchBlock Avoid empty catch blocks 155158

org/opentrafficsim/swing/gui/AppearanceControl.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'DEFAULT_FONT_SIZE': the field is declared in an interface type 36

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. 252
UselessQualifiedThis Useless qualified this usage in the same class. 255
EmptyControlStatement Empty try body 604611
EmptyCatchBlock Avoid empty catch blocks 608611
EmptyCatchBlock Avoid empty catch blocks 720723
EmptyCatchBlock Avoid empty catch blocks 837840
UnusedFormalParameter Avoid unused constructor parameters such as 'size'. 885
CollapsibleIfStatements This if statement could be combined with its parent 10101013

org/opentrafficsim/swing/gui/OtsControlPanel.java

Rule Violation Line
UnusedFormalParameter Avoid unused method parameters such as 'source'. 321
EmptyCatchBlock Avoid empty catch blocks 369372
UselessQualifiedThis Useless qualified this usage in the same class. 454
UselessQualifiedThis Useless qualified this usage in the same class. 460
UselessQualifiedThis Useless qualified this usage in the same class. 468
UnnecessaryReturn Unnecessary return statement 674
UselessQualifiedThis Useless qualified this usage in the same class. 878

org/opentrafficsim/swing/gui/ProbabilityDistributionEditor.java

Rule Violation Line
PrimitiveWrapperInstantiation Do not use `new Double(...)`, prefer `Double.valueOf(...)` 96

org/opentrafficsim/swing/script/AbstractSimulationScript.java

Rule Violation Line
UselessQualifiedThis Useless qualified this usage in the same class. 266
UselessQualifiedThis Useless qualified this usage in the same class. 266
UselessQualifiedThis Useless qualified this usage in the same class. 277
UselessQualifiedThis Useless qualified this usage in the same class. 286

Priority 4

com/bric/multislider/Jvm.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Jvm': 'getMajorJavaVersion' is already in scope 59
UselessParentheses Useless parentheses. 67
UselessParentheses Useless parentheses. 78
UselessParentheses Useless parentheses. 81
UselessParentheses Useless parentheses. 84
UselessParentheses Useless parentheses. 87
UnnecessaryFullyQualifiedName Unnecessary qualifier 'java.security': 'AccessControlException' is already in scope because it is imported in this file 135

com/bric/multislider/MultiThumbSlider.java

Rule Violation Line
UselessParentheses Useless parentheses. 272
UselessParentheses Useless parentheses. 298

com/bric/multislider/MultiThumbSliderUi.java

Rule Violation Line
UselessParentheses Useless parentheses. 105
UselessParentheses Useless parentheses. 115
UselessParentheses Useless parentheses. 144
UselessParentheses Useless parentheses. 148
UselessParentheses Useless parentheses. 164
UselessParentheses Useless parentheses. 175
UselessParentheses Useless parentheses. 588
UselessParentheses Useless parentheses. 596
UselessParentheses Useless parentheses. 951
UselessParentheses Useless parentheses. 1621
UselessParentheses Useless parentheses. 1625

com/bric/multislider/PlafPaintUtils.java

Rule Violation Line
UselessParentheses Useless parentheses. 214

org/opentrafficsim/swing/graphs/SwingFundamentalDiagram.java

Rule Violation Line
UselessParentheses Useless parentheses. 74
UselessParentheses Useless parentheses. 186

org/opentrafficsim/swing/gui/AppearanceApplication.java

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

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 323
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Component': 'LEFT_ALIGNMENT' is already in scope because it is inherited by an enclosing type 361
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Component': 'LEFT_ALIGNMENT' is already in scope because it is inherited by an enclosing type 385
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Component': 'LEFT_ALIGNMENT' is already in scope because it is inherited by an enclosing type 434
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Thread': 'sleep' is already in scope 718
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Thread': 'sleep' is already in scope 835
UnnecessaryFullyQualifiedName Unnecessary qualifier 'VisualizationPanel': 'ZOOMFACTOR' is already in scope because it is inherited by an enclosing type 935
UnnecessaryFullyQualifiedName Unnecessary qualifier 'VisualizationPanel': 'ZOOMFACTOR' is already in scope because it is inherited by an enclosing type 939
UnnecessaryFullyQualifiedName Unnecessary qualifier 'VisualizationPanel': 'ZOOMFACTOR' is already in scope because it is inherited by an enclosing type 947
UnnecessaryFullyQualifiedName Unnecessary qualifier 'VisualizationPanel': 'ZOOMFACTOR' is already in scope because it is inherited by an enclosing type 951

org/opentrafficsim/swing/gui/OtsControlPanel.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Thread': 'sleep' is already in scope 367
UnnecessaryFullyQualifiedName Unnecessary qualifier 'OtsControlPanel': 'loadIcon' is already in scope 548
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ClockLabel': 'UPDATEINTERVAL' is already in scope because it is declared in an enclosing type 1008

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 52
UnnecessaryFullyQualifiedName Unnecessary qualifier 'WindowConstants': 'EXIT_ON_CLOSE' is already in scope because it is inherited by an enclosing type 85
UnnecessaryFullyQualifiedName Unnecessary qualifier 'WindowConstants': 'DISPOSE_ON_CLOSE' is already in scope because it is inherited by an enclosing type 89

Files

com/bric/multislider/DefaultMultiThumbSliderUi.java

Rule Violation Priority Line
DontUseFloatTypeForLoopIndices Dont use floating point for loop indices. If you must use floating point, use double. 3 72
UnnecessarySemicolon Unnecessary semicolon 3 93

com/bric/multislider/Jvm.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Jvm': 'getMajorJavaVersion' is already in scope 4 59
UselessParentheses Useless parentheses. 4 67
UselessParentheses Useless parentheses. 4 78
UselessParentheses Useless parentheses. 4 81
UselessParentheses Useless parentheses. 4 84
UselessParentheses Useless parentheses. 4 87
UnnecessaryFullyQualifiedName Unnecessary qualifier 'java.security': 'AccessControlException' is already in scope because it is imported in this file 4 135
EmptyCatchBlock Avoid empty catch blocks 3 150152

com/bric/multislider/MultiThumbSlider.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'static' on enum 'Collision': nested enums are implicitly static 3 84
UnnecessarySemicolon Unnecessary semicolon 3 95
UselessParentheses Useless parentheses. 4 272
UselessParentheses Useless parentheses. 4 298
PrimitiveWrapperInstantiation Do not use `new Integer(...)`, prefer `Integer.valueOf(...)` 3 669

com/bric/multislider/MultiThumbSliderUi.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'static' on enum 'Thumb': nested enums are implicitly static 3 85
UselessParentheses Useless parentheses. 4 105
UselessParentheses Useless parentheses. 4 115
UselessParentheses Useless parentheses. 4 144
UselessParentheses Useless parentheses. 4 148
UselessParentheses Useless parentheses. 4 164
UselessParentheses Useless parentheses. 4 175
PrimitiveWrapperInstantiation Do not use `new Float(...)`, prefer `Float.valueOf(...)` 3 431
PrimitiveWrapperInstantiation Do not use `new Float(...)`, prefer `Float.valueOf(...)` 3 432
CollapsibleIfStatements This if statement could be combined with its parent 3 530612
UselessParentheses Useless parentheses. 4 588
UselessParentheses Useless parentheses. 4 596
CollapsibleIfStatements This if statement could be combined with its parent 3 719723
UselessParentheses Useless parentheses. 4 951
UselessQualifiedThis Useless qualified this usage in the same class. 3 1093
UnnecessaryReturn Unnecessary return statement 3 1195
UselessQualifiedThis Useless qualified this usage in the same class. 3 1524
CollapsibleIfStatements This if statement could be combined with its parent 3 15471551
UselessParentheses Useless parentheses. 4 1621
UselessParentheses Useless parentheses. 4 1625

com/bric/multislider/PlafPaintUtils.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 214

com/bric/multislider/ShapeBounds.java

Rule Violation Priority Line
EmptyCatchBlock Avoid empty catch blocks 3 6365
EmptyControlStatement Empty if statement 3 155355
EmptyControlStatement Empty if statement 3 267307
EmptyControlStatement Empty if statement 3 310350

com/bric/multislider/VistaMultiThumbSliderUI.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'tween': private methods cannot be overridden 3 144

org/opentrafficsim/swing/graphs/SwingFundamentalDiagram.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 74
UselessParentheses Useless parentheses. 4 186

org/opentrafficsim/swing/graphs/SwingPlot.java

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

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 107
EmptyCatchBlock Avoid empty catch blocks 3 117120
EmptyCatchBlock Avoid empty catch blocks 3 155158
UnnecessaryFullyQualifiedName Unnecessary qualifier 'StayOpenCheckBoxMenuItem': 'PATH' is already in scope because it is declared in an enclosing type 4 520

org/opentrafficsim/swing/gui/AppearanceControl.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'DEFAULT_FONT_SIZE': the field is declared in an interface type 3 36

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 252
UselessQualifiedThis Useless qualified this usage in the same class. 3 255
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Component': 'LEFT_ALIGNMENT' is already in scope because it is inherited by an enclosing type 4 323
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Component': 'LEFT_ALIGNMENT' is already in scope because it is inherited by an enclosing type 4 361
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Component': 'LEFT_ALIGNMENT' is already in scope because it is inherited by an enclosing type 4 385
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Component': 'LEFT_ALIGNMENT' is already in scope because it is inherited by an enclosing type 4 434
EmptyControlStatement Empty try body 3 604611
EmptyCatchBlock Avoid empty catch blocks 3 608611
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Thread': 'sleep' is already in scope 4 718
EmptyCatchBlock Avoid empty catch blocks 3 720723
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Thread': 'sleep' is already in scope 4 835
EmptyCatchBlock Avoid empty catch blocks 3 837840
UnusedFormalParameter Avoid unused constructor parameters such as 'size'. 3 885
UnnecessaryFullyQualifiedName Unnecessary qualifier 'VisualizationPanel': 'ZOOMFACTOR' is already in scope because it is inherited by an enclosing type 4 935
UnnecessaryFullyQualifiedName Unnecessary qualifier 'VisualizationPanel': 'ZOOMFACTOR' is already in scope because it is inherited by an enclosing type 4 939
UnnecessaryFullyQualifiedName Unnecessary qualifier 'VisualizationPanel': 'ZOOMFACTOR' is already in scope because it is inherited by an enclosing type 4 947
UnnecessaryFullyQualifiedName Unnecessary qualifier 'VisualizationPanel': 'ZOOMFACTOR' is already in scope because it is inherited by an enclosing type 4 951
CollapsibleIfStatements This if statement could be combined with its parent 3 10101013

org/opentrafficsim/swing/gui/OtsControlPanel.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused method parameters such as 'source'. 3 321
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Thread': 'sleep' is already in scope 4 367
EmptyCatchBlock Avoid empty catch blocks 3 369372
UselessQualifiedThis Useless qualified this usage in the same class. 3 454
UselessQualifiedThis Useless qualified this usage in the same class. 3 460
UselessQualifiedThis Useless qualified this usage in the same class. 3 468
UnnecessaryFullyQualifiedName Unnecessary qualifier 'OtsControlPanel': 'loadIcon' is already in scope 4 548
UnnecessaryReturn Unnecessary return statement 3 674
UselessQualifiedThis Useless qualified this usage in the same class. 3 878
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ClockLabel': 'UPDATEINTERVAL' is already in scope because it is declared in an enclosing type 4 1008

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 52
UnnecessaryFullyQualifiedName Unnecessary qualifier 'WindowConstants': 'EXIT_ON_CLOSE' is already in scope because it is inherited by an enclosing type 4 85
UnnecessaryFullyQualifiedName Unnecessary qualifier 'WindowConstants': 'DISPOSE_ON_CLOSE' is already in scope because it is inherited by an enclosing type 4 89

org/opentrafficsim/swing/gui/ProbabilityDistributionEditor.java

Rule Violation Priority Line
PrimitiveWrapperInstantiation Do not use `new Double(...)`, prefer `Double.valueOf(...)` 3 96

org/opentrafficsim/swing/script/AbstractSimulationScript.java

Rule Violation Priority Line
UselessQualifiedThis Useless qualified this usage in the same class. 3 266
UselessQualifiedThis Useless qualified this usage in the same class. 3 266
UselessQualifiedThis Useless qualified this usage in the same class. 3 277
UselessQualifiedThis Useless qualified this usage in the same class. 3 286