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/spherical/oned/AngularInterval.java

Rule Violation Line
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 64
CyclomaticComplexity The method 'classify(Point1S)' has a cyclomatic complexity of 10. 161176
AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 246
AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 253
AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 254
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 467
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 482
CyclomaticComplexity The method 'splitDiameter(CutAngle)' has a cyclomatic complexity of 13. 490574
CognitiveComplexity The method 'splitDiameter(CutAngle)' has a cognitive complexity of 28, current threshold is 15 490574
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 605
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 619

org/apache/commons/geometry/spherical/oned/CutAngle.java

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

org/apache/commons/geometry/spherical/oned/RegionBSPTree1S.java

Rule Violation Line
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 191
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 192
CyclomaticComplexity The method 'getNodeBoundaryPair(RegionNode1S)' has a cyclomatic complexity of 10. 321346
AssignmentInOperand Avoid assignments in operands 329
AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 381

org/apache/commons/geometry/spherical/oned/Transform1S.java

Rule Violation Line
AvoidFieldNameMatchingMethodName Field IDENTITY has the same name as a method 39
AvoidFieldNameMatchingMethodName Field rotate has the same name as a method 48
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 20 characters appended. 178

org/apache/commons/geometry/spherical/twod/AbstractGreatArcConnector.java

Rule Violation Line
CompareObjectsWithEquals Use equals() to compare object references. 124
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 256261

org/apache/commons/geometry/spherical/twod/ConvexArea2S.java

Rule Violation Line
AvoidFieldNameMatchingMethodName Field FULL has the same name as a method 43
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 97
CyclomaticComplexity The method 'fromVertices(Collection, boolean, Precision.DoubleEquivalence)' has a cyclomatic complexity of 12. 240276

org/apache/commons/geometry/spherical/twod/EmbeddedTreeGreatCircleSubset.java

Rule Violation Line
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 20 characters appended. 157
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 159

org/apache/commons/geometry/spherical/twod/GreatArcPath.java

Rule Violation Line
AvoidFieldNameMatchingMethodName Field EMPTY has the same name as a method 33
AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 272
LinguisticNaming Linguistics Antipattern - The setter 'setPrecision' should not return any type except void linguistically 321325
CyclomaticComplexity The method 'build(boolean)' has a cyclomatic complexity of 10. 513551
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 545
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 546
AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 550

org/apache/commons/geometry/spherical/twod/GreatCircle.java

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

org/apache/commons/geometry/spherical/twod/RegionBSPTree2S.java

Rule Violation Line
LinguisticNaming Linguistics Antipattern - The transform method 'toConvexRecursive' should not return void linguistically 120134
AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 209
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 217
AssignmentInOperand Avoid assignments in operands 288

org/apache/commons/geometry/spherical/twod/Transform2S.java

Rule Violation Line
AvoidFieldNameMatchingMethodName Field IDENTITY has the same name as a method 33
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 22 characters appended. 170

Files

org/apache/commons/geometry/spherical/oned/AngularInterval.java

Rule Violation Priority Line
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 64
CyclomaticComplexity The method 'classify(Point1S)' has a cyclomatic complexity of 10. 3 161176
AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 246
AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 253
AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 254
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 467
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 482
CyclomaticComplexity The method 'splitDiameter(CutAngle)' has a cyclomatic complexity of 13. 3 490574
CognitiveComplexity The method 'splitDiameter(CutAngle)' has a cognitive complexity of 28, current threshold is 15 3 490574
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 605
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 619

org/apache/commons/geometry/spherical/oned/CutAngle.java

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

org/apache/commons/geometry/spherical/oned/RegionBSPTree1S.java

Rule Violation Priority Line
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 191
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 192
CyclomaticComplexity The method 'getNodeBoundaryPair(RegionNode1S)' has a cyclomatic complexity of 10. 3 321346
AssignmentInOperand Avoid assignments in operands 3 329
AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 381

org/apache/commons/geometry/spherical/oned/Transform1S.java

Rule Violation Priority Line
AvoidFieldNameMatchingMethodName Field IDENTITY has the same name as a method 3 39
AvoidFieldNameMatchingMethodName Field rotate has the same name as a method 3 48
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 20 characters appended. 3 178

org/apache/commons/geometry/spherical/twod/AbstractGreatArcConnector.java

Rule Violation Priority Line
CompareObjectsWithEquals Use equals() to compare object references. 3 124
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 256261

org/apache/commons/geometry/spherical/twod/ConvexArea2S.java

Rule Violation Priority Line
AvoidFieldNameMatchingMethodName Field FULL has the same name as a method 3 43
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 97
CyclomaticComplexity The method 'fromVertices(Collection, boolean, Precision.DoubleEquivalence)' has a cyclomatic complexity of 12. 3 240276

org/apache/commons/geometry/spherical/twod/EmbeddedTreeGreatCircleSubset.java

Rule Violation Priority Line
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 20 characters appended. 3 157
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 159

org/apache/commons/geometry/spherical/twod/GreatArcPath.java

Rule Violation Priority Line
AvoidFieldNameMatchingMethodName Field EMPTY has the same name as a method 3 33
AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 272
LinguisticNaming Linguistics Antipattern - The setter 'setPrecision' should not return any type except void linguistically 3 321325
CyclomaticComplexity The method 'build(boolean)' has a cyclomatic complexity of 10. 3 513551
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 545
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 546
AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 550

org/apache/commons/geometry/spherical/twod/GreatCircle.java

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

org/apache/commons/geometry/spherical/twod/RegionBSPTree2S.java

Rule Violation Priority Line
LinguisticNaming Linguistics Antipattern - The transform method 'toConvexRecursive' should not return void linguistically 3 120134
AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 209
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 217
AssignmentInOperand Avoid assignments in operands 3 288

org/apache/commons/geometry/spherical/twod/Transform2S.java

Rule Violation Priority Line
AvoidFieldNameMatchingMethodName Field IDENTITY has the same name as a method 3 33
InsufficientStringBufferDeclaration StringBuilder has been initialized with size 16, but has at least 22 characters appended. 3 170