Apache Commons logo Apache Commons Geometry

PMD Results

The following document contains the results of PMD 6.36.0.

Violations By Priority

Priority 3

org/apache/commons/geometry/core/partitioning/AbstractConvexHyperplaneBoundedRegion.java

Rule Violation Line
CompareObjectsWithEquals Use equals() to compare object references. 460

org/apache/commons/geometry/core/partitioning/Split.java

Rule Violation Line
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 29 characters appended. 85

org/apache/commons/geometry/core/partitioning/bsp/AbstractBSPTree.java

Rule Violation Line
CyclomaticComplexity The class 'AbstractBSPTree' has a total cyclomatic complexity of 82 (highest 9). 631123
ExcessiveClassLength Avoid really long classes. 631123
CompareObjectsWithEquals Use equals() to compare object references. 246
CompareObjectsWithEquals Use equals() to compare object references. 282
CognitiveComplexity The method 'acceptRecursive(N, BSPTreeVisitor)' has a cognitive complexity of 25, current threshold is 15 368408
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 524
CognitiveComplexity The method 'splitInternalNode(N, HyperplaneConvexSubset)' has a cognitive complexity of 18, current threshold is 15 718789
AvoidFieldNameMatchingMethodName Field depth has the same name as a method 846
AvoidFieldNameMatchingMethodName Field count has the same name as a method 852
AvoidFieldNameMatchingMethodName Field height has the same name as a method 858
CompareObjectsWithEquals Use equals() to compare object references. 952
CompareObjectsWithEquals Use equals() to compare object references. 958
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 1046

org/apache/commons/geometry/core/partitioning/bsp/AbstractPartitionedRegionBuilder.java

Rule Violation Line
AbstractClassWithoutAbstractMethod This abstract class does not have any abstract methods 62307
CyclomaticComplexity The method 'insertBoundaryRecursiveInternalNode(N, HyperplaneConvexSubset, HyperplaneConvexSubset, BiConsumer)' has a cyclomatic complexity of 10. 165206

org/apache/commons/geometry/core/partitioning/bsp/AbstractRegionBSPTree.java

Rule Violation Line
ExcessivePublicCount This class has a bunch of public methods and attributes 171138
ExcessiveClassLength Avoid really long classes. 471138
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 333
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 339
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 536
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 623
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 659
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 733
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 734
CognitiveComplexity The method 'characterizeHyperplaneSubset(HyperplaneConvexSubset, AbstractRegionNode, List, List)' has a cognitive complexity of 18, current threshold is 15 746771
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 19 characters appended. 776
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 782
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 793

org/apache/commons/geometry/core/partitioning/bsp/BSPTreePrinter.java

Rule Violation Line
AvoidStringBufferField StringBuffers can grow quite a lot, and so may become a source of memory leak (if the owning class has a long life time). 48

Priority 4

org/apache/commons/geometry/core/partitioning/bsp/BSPTree.java

Rule Violation Line
ShortClassName Avoid short class names like Node 123204

Files

org/apache/commons/geometry/core/partitioning/AbstractConvexHyperplaneBoundedRegion.java

Rule Violation Priority Line
CompareObjectsWithEquals Use equals() to compare object references. 3 460

org/apache/commons/geometry/core/partitioning/Split.java

Rule Violation Priority Line
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 29 characters appended. 3 85

org/apache/commons/geometry/core/partitioning/bsp/AbstractBSPTree.java

Rule Violation Priority Line
CyclomaticComplexity The class 'AbstractBSPTree' has a total cyclomatic complexity of 82 (highest 9). 3 631123
ExcessiveClassLength Avoid really long classes. 3 631123
CompareObjectsWithEquals Use equals() to compare object references. 3 246
CompareObjectsWithEquals Use equals() to compare object references. 3 282
CognitiveComplexity The method 'acceptRecursive(N, BSPTreeVisitor)' has a cognitive complexity of 25, current threshold is 15 3 368408
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 524
CognitiveComplexity The method 'splitInternalNode(N, HyperplaneConvexSubset)' has a cognitive complexity of 18, current threshold is 15 3 718789
AvoidFieldNameMatchingMethodName Field depth has the same name as a method 3 846
AvoidFieldNameMatchingMethodName Field count has the same name as a method 3 852
AvoidFieldNameMatchingMethodName Field height has the same name as a method 3 858
CompareObjectsWithEquals Use equals() to compare object references. 3 952
CompareObjectsWithEquals Use equals() to compare object references. 3 958
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 1046

org/apache/commons/geometry/core/partitioning/bsp/AbstractPartitionedRegionBuilder.java

Rule Violation Priority Line
AbstractClassWithoutAbstractMethod This abstract class does not have any abstract methods 3 62307
CyclomaticComplexity The method 'insertBoundaryRecursiveInternalNode(N, HyperplaneConvexSubset, HyperplaneConvexSubset, BiConsumer)' has a cyclomatic complexity of 10. 3 165206

org/apache/commons/geometry/core/partitioning/bsp/AbstractRegionBSPTree.java

Rule Violation Priority Line
ExcessivePublicCount This class has a bunch of public methods and attributes 3 171138
ExcessiveClassLength Avoid really long classes. 3 471138
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 333
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 339
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 536
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 623
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 659
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 733
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 734
CognitiveComplexity The method 'characterizeHyperplaneSubset(HyperplaneConvexSubset, AbstractRegionNode, List, List)' has a cognitive complexity of 18, current threshold is 15 3 746771
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 19 characters appended. 3 776
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 782
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 793

org/apache/commons/geometry/core/partitioning/bsp/BSPTree.java

Rule Violation Priority Line
ShortClassName Avoid short class names like Node 4 123204

org/apache/commons/geometry/core/partitioning/bsp/BSPTreePrinter.java

Rule Violation Priority Line
AvoidStringBufferField StringBuffers can grow quite a lot, and so may become a source of memory leak (if the owning class has a long life time). 3 48