PMD Results

The following document contains the results of PMD 7.3.0.

Violations By Priority

Priority 3

org/opentrafficsim/core/definitions/DefaultsNl.java

Rule Violation Line
UnnecessarySemicolon Unnecessary semicolon 177

org/opentrafficsim/core/dsol/OtsDevsRealTimeParallelMove.java

Rule Violation Line
EmptyCatchBlock Avoid empty catch blocks 332335
EmptyCatchBlock Avoid empty catch blocks 375378
EmptyCatchBlock Avoid empty catch blocks 418421

org/opentrafficsim/core/dsol/OtsLoggingAnimator.java

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'path'. 39

org/opentrafficsim/core/geometry/Flattener.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifiers 'public static' on class 'NumSegments': the class is declared in an interface type 46
UnnecessaryModifier Unnecessary modifiers 'public static' on class 'MaxDeviation': the class is declared in an interface type 86
UnnecessaryModifier Unnecessary modifiers 'public static' on class 'MaxDeviationAndAngle': the class is declared in an interface type 167
UnnecessaryModifier Unnecessary modifiers 'public static' on class 'MaxAngle': the class is declared in an interface type 280

org/opentrafficsim/core/geometry/FractionalLengthData.java

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

org/opentrafficsim/core/geometry/Ots2dSet.java

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

org/opentrafficsim/core/geometry/OtsGeometryUtil.java

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

org/opentrafficsim/core/gtu/Gtu.java

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'centerOfGravity'. 201
EmptyCatchBlock Avoid empty catch blocks 926929

org/opentrafficsim/core/math/Acceleration3d.java

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'unit'. 72

org/opentrafficsim/core/network/LinkPosition.java

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

org/opentrafficsim/core/network/Network.java

Rule Violation Line
EmptyCatchBlock Avoid empty catch blocks 739742
UnusedFormalParameter Avoid unused method parameters such as 'gtuType'. 771

org/opentrafficsim/core/network/Node.java

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

org/opentrafficsim/core/network/route/Route.java

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

org/opentrafficsim/core/perception/AbstractHistorical.java

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

Priority 4

org/opentrafficsim/core/dsol/OtsDevsRealTimeParallelMove.java

Rule Violation Line
UselessParentheses Useless parentheses. 155
UselessParentheses Useless parentheses. 188
UnnecessaryFullyQualifiedName Unnecessary qualifier 'SimulatorInterface': 'TIME_CHANGED_EVENT' is already in scope because it is inherited by an enclosing type 206
UnnecessaryFullyQualifiedName Unnecessary qualifier 'SimulatorInterface': 'TIME_CHANGED_EVENT' is already in scope because it is inherited by an enclosing type 425

org/opentrafficsim/core/dsol/OtsLoggingAnimator.java

Rule Violation Line
UselessParentheses Useless parentheses. 174
UselessParentheses Useless parentheses. 207
UselessParentheses Useless parentheses. 215
UnnecessaryFullyQualifiedName Unnecessary qualifier 'SimulatorInterface': 'TIME_CHANGED_EVENT' is already in scope because it is inherited by an enclosing type 253
UnnecessaryFullyQualifiedName Unnecessary qualifier 'SimulatorInterface': 'TIME_CHANGED_EVENT' is already in scope because it is inherited by an enclosing type 291

org/opentrafficsim/core/geometry/Bezier.java

Rule Violation Line
UselessParentheses Useless parentheses. 204
UselessParentheses Useless parentheses. 264
UselessParentheses Useless parentheses. 269

org/opentrafficsim/core/geometry/ContinuousArc.java

Rule Violation Line
UselessParentheses Useless parentheses. 83
UselessParentheses Useless parentheses. 124
UselessParentheses Useless parentheses. 137
UselessParentheses Useless parentheses. 205206

org/opentrafficsim/core/geometry/ContinuousClothoid.java

Rule Violation Line
UselessParentheses Useless parentheses. 251
UselessParentheses Useless parentheses. 382

org/opentrafficsim/core/geometry/Fresnel.java

Rule Violation Line
UselessParentheses Useless parentheses. 262
UselessParentheses Useless parentheses. 263

org/opentrafficsim/core/geometry/Ots2dSet.java

Rule Violation Line
UnnecessaryImport Unused import 'java.awt.geom.Rectangle2D' 3

org/opentrafficsim/core/geometry/OtsLine2d.java

Rule Violation Line
UselessParentheses Useless parentheses. 904
UselessParentheses Useless parentheses. 905

org/opentrafficsim/core/gtu/Gtu.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Gtu': 'DESTROY_EVENT' is already in scope because it is declared in an enclosing type 350
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Gtu': 'MOVE_EVENT' is already in scope because it is declared in an enclosing type 445

org/opentrafficsim/core/gtu/RelativePosition.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RelativePosition': 'REFERENCE' is already in scope because it is declared in an enclosing type 49

org/opentrafficsim/core/network/Link.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Link': 'GTU_ADD_EVENT' is already in scope because it is declared in an enclosing type 145
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Link': 'GTU_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 161

org/opentrafficsim/core/network/Network.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'NODE_ADD_EVENT' is already in scope because it is declared in an enclosing type 141
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'NODE_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 155
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'LINK_ADD_EVENT' is already in scope because it is declared in an enclosing type 270
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'LINK_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 284
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'OBJECT_ADD_EVENT' is already in scope because it is declared in an enclosing type 437
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'OBJECT_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 451
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'NONLOCATED_OBJECT_ADD_EVENT' is already in scope because it is declared in an enclosing type 538
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'NONLOCATED_OBJECT_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 552
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'ROUTE_ADD_EVENT' is already in scope because it is declared in an enclosing type 631
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'ROUTE_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 647
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'GTU_ADD_EVENT' is already in scope because it is declared in an enclosing type 939
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'GTU_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 946

org/opentrafficsim/core/network/Node.java

Rule Violation Line
UselessParentheses Useless parentheses. 350

Files

org/opentrafficsim/core/definitions/DefaultsNl.java

Rule Violation Priority Line
UnnecessarySemicolon Unnecessary semicolon 3 177

org/opentrafficsim/core/dsol/OtsDevsRealTimeParallelMove.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 155
UselessParentheses Useless parentheses. 4 188
UnnecessaryFullyQualifiedName Unnecessary qualifier 'SimulatorInterface': 'TIME_CHANGED_EVENT' is already in scope because it is inherited by an enclosing type 4 206
EmptyCatchBlock Avoid empty catch blocks 3 332335
EmptyCatchBlock Avoid empty catch blocks 3 375378
EmptyCatchBlock Avoid empty catch blocks 3 418421
UnnecessaryFullyQualifiedName Unnecessary qualifier 'SimulatorInterface': 'TIME_CHANGED_EVENT' is already in scope because it is inherited by an enclosing type 4 425

org/opentrafficsim/core/dsol/OtsLoggingAnimator.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'path'. 3 39
UselessParentheses Useless parentheses. 4 174
UselessParentheses Useless parentheses. 4 207
UselessParentheses Useless parentheses. 4 215
UnnecessaryFullyQualifiedName Unnecessary qualifier 'SimulatorInterface': 'TIME_CHANGED_EVENT' is already in scope because it is inherited by an enclosing type 4 253
UnnecessaryFullyQualifiedName Unnecessary qualifier 'SimulatorInterface': 'TIME_CHANGED_EVENT' is already in scope because it is inherited by an enclosing type 4 291

org/opentrafficsim/core/geometry/Bezier.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 204
UselessParentheses Useless parentheses. 4 264
UselessParentheses Useless parentheses. 4 269

org/opentrafficsim/core/geometry/ContinuousArc.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 83
UselessParentheses Useless parentheses. 4 124
UselessParentheses Useless parentheses. 4 137
UselessParentheses Useless parentheses. 4 205206

org/opentrafficsim/core/geometry/ContinuousClothoid.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 251
UselessParentheses Useless parentheses. 4 382

org/opentrafficsim/core/geometry/Flattener.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifiers 'public static' on class 'NumSegments': the class is declared in an interface type 3 46
UnnecessaryModifier Unnecessary modifiers 'public static' on class 'MaxDeviation': the class is declared in an interface type 3 86
UnnecessaryModifier Unnecessary modifiers 'public static' on class 'MaxDeviationAndAngle': the class is declared in an interface type 3 167
UnnecessaryModifier Unnecessary modifiers 'public static' on class 'MaxAngle': the class is declared in an interface type 3 280

org/opentrafficsim/core/geometry/FractionalLengthData.java

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

org/opentrafficsim/core/geometry/Fresnel.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 262
UselessParentheses Useless parentheses. 4 263

org/opentrafficsim/core/geometry/Ots2dSet.java

Rule Violation Priority Line
UnnecessaryImport Unused import 'java.awt.geom.Rectangle2D' 4 3
CollapsibleIfStatements This if statement could be combined with its parent 3 442449

org/opentrafficsim/core/geometry/OtsGeometryUtil.java

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

org/opentrafficsim/core/geometry/OtsLine2d.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 904
UselessParentheses Useless parentheses. 4 905

org/opentrafficsim/core/gtu/Gtu.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'centerOfGravity'. 3 201
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Gtu': 'DESTROY_EVENT' is already in scope because it is declared in an enclosing type 4 350
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Gtu': 'MOVE_EVENT' is already in scope because it is declared in an enclosing type 4 445
EmptyCatchBlock Avoid empty catch blocks 3 926929

org/opentrafficsim/core/gtu/RelativePosition.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RelativePosition': 'REFERENCE' is already in scope because it is declared in an enclosing type 4 49

org/opentrafficsim/core/math/Acceleration3d.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'unit'. 3 72

org/opentrafficsim/core/network/Link.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Link': 'GTU_ADD_EVENT' is already in scope because it is declared in an enclosing type 4 145
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Link': 'GTU_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 4 161

org/opentrafficsim/core/network/LinkPosition.java

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

org/opentrafficsim/core/network/Network.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'NODE_ADD_EVENT' is already in scope because it is declared in an enclosing type 4 141
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'NODE_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 4 155
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'LINK_ADD_EVENT' is already in scope because it is declared in an enclosing type 4 270
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'LINK_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 4 284
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'OBJECT_ADD_EVENT' is already in scope because it is declared in an enclosing type 4 437
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'OBJECT_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 4 451
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'NONLOCATED_OBJECT_ADD_EVENT' is already in scope because it is declared in an enclosing type 4 538
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'NONLOCATED_OBJECT_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 4 552
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'ROUTE_ADD_EVENT' is already in scope because it is declared in an enclosing type 4 631
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'ROUTE_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 4 647
EmptyCatchBlock Avoid empty catch blocks 3 739742
UnusedFormalParameter Avoid unused method parameters such as 'gtuType'. 3 771
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'GTU_ADD_EVENT' is already in scope because it is declared in an enclosing type 4 939
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Network': 'GTU_REMOVE_EVENT' is already in scope because it is declared in an enclosing type 4 946

org/opentrafficsim/core/network/Node.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 350
CollapsibleIfStatements This if statement could be combined with its parent 3 352355

org/opentrafficsim/core/network/route/Route.java

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

org/opentrafficsim/core/perception/AbstractHistorical.java

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