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/io/euclidean/threed/AbstractBoundaryReadHandler3D.java

Rule Violation Line
AssignmentInOperand Avoid assignments in operands 50
AssignmentInOperand Avoid assignments in operands 65
RedundantFieldInitializer Avoid using redundant field initializer for 'loadCount' 105
AvoidFieldNameMatchingMethodName Field next has the same name as a method 108

org/apache/commons/geometry/io/euclidean/threed/IO3D.java

Rule Violation Line
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 620

org/apache/commons/geometry/io/euclidean/threed/SimpleFacetDefinition.java

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

org/apache/commons/geometry/io/euclidean/threed/obj/AbstractObjParser.java

Rule Violation Line
CyclomaticComplexity The method 'nextKeyword()' has a cyclomatic complexity of 10. 5891
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 59

org/apache/commons/geometry/io/euclidean/threed/obj/ObjTriangleMeshReader.java

Rule Violation Line
AssignmentInOperand Avoid assignments in operands 61

org/apache/commons/geometry/io/euclidean/threed/obj/ObjWriter.java

Rule Violation Line
CyclomaticComplexity The method 'writeFaceWithOffsets(int, int, int, int)' has a cyclomatic complexity of 14. 253291
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 360
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 363
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 369
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 426
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 427
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 431
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 436
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 446
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 449
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 452
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 467

org/apache/commons/geometry/io/euclidean/threed/obj/PolygonObjParser.java

Rule Violation Line
DataClass The class 'PolygonObjParser' is suspected to be a Data Class (WOC=12.500%, NOPA=0, NOAM=5, WMC=29) 40488

org/apache/commons/geometry/io/euclidean/threed/stl/BinaryStlFacetDefinitionReader.java

Rule Violation Line
ImmutableField Private field 'header' could be made final; it is only initialized in the declaration or constructor. 40
LocalVariableCouldBeFinal Local variable 'c' could be declared final 89
LocalVariableCouldBeFinal Local variable 'read' could be declared final 181

org/apache/commons/geometry/io/euclidean/threed/stl/BinaryStlWriter.java

Rule Violation Line
LocalVariableCouldBeFinal Local variable 'countBuffer' could be declared final 146

org/apache/commons/geometry/io/euclidean/threed/stl/TextStlFacetDefinitionReader.java

Rule Violation Line
ImmutableField Private field 'reader' could be made final; it is only initialized in the declaration or constructor. 35
ImmutableField Private field 'parser' could be made final; it is only initialized in the declaration or constructor. 38
LocalVariableCouldBeFinal Local variable 'choice' could be declared final 7678

org/apache/commons/geometry/io/euclidean/threed/stl/TextStlWriter.java

Rule Violation Line
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 89

org/apache/commons/geometry/io/euclidean/threed/txt/AbstractTextBoundaryWriteHandler3D.java

Rule Violation Line
DataClass The class 'AbstractTextBoundaryWriteHandler3D' is suspected to be a Data Class (WOC=25.000%, NOPA=0, NOAM=6, WMC=11) 35132

org/apache/commons/geometry/io/euclidean/threed/txt/TextBoundaryWriteHandler3D.java

Rule Violation Line
DataClass The class 'TextBoundaryWriteHandler3D' is suspected to be a Data Class (WOC=14.286%, NOPA=0, NOAM=6, WMC=8) 29109

Priority 4

org/apache/commons/geometry/io/euclidean/threed/IO3D.java

Rule Violation Line
ShortClassName Avoid short class names like IO3D 57622

org/apache/commons/geometry/io/euclidean/threed/obj/PolygonObjParser.java

Rule Violation Line
ShortClassName Avoid short class names like Face 288436

Files

org/apache/commons/geometry/io/euclidean/threed/AbstractBoundaryReadHandler3D.java

Rule Violation Priority Line
AssignmentInOperand Avoid assignments in operands 3 50
AssignmentInOperand Avoid assignments in operands 3 65
RedundantFieldInitializer Avoid using redundant field initializer for 'loadCount' 3 105
AvoidFieldNameMatchingMethodName Field next has the same name as a method 3 108

org/apache/commons/geometry/io/euclidean/threed/IO3D.java

Rule Violation Priority Line
ShortClassName Avoid short class names like IO3D 4 57622
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 620

org/apache/commons/geometry/io/euclidean/threed/SimpleFacetDefinition.java

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

org/apache/commons/geometry/io/euclidean/threed/obj/AbstractObjParser.java

Rule Violation Priority Line
CyclomaticComplexity The method 'nextKeyword()' has a cyclomatic complexity of 10. 3 5891
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 59

org/apache/commons/geometry/io/euclidean/threed/obj/ObjTriangleMeshReader.java

Rule Violation Priority Line
AssignmentInOperand Avoid assignments in operands 3 61

org/apache/commons/geometry/io/euclidean/threed/obj/ObjWriter.java

Rule Violation Priority Line
CyclomaticComplexity The method 'writeFaceWithOffsets(int, int, int, int)' has a cyclomatic complexity of 14. 3 253291
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 360
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 363
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 369
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 426
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 427
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 431
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 436
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 446
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 449
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 452
AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 467

org/apache/commons/geometry/io/euclidean/threed/obj/PolygonObjParser.java

Rule Violation Priority Line
DataClass The class 'PolygonObjParser' is suspected to be a Data Class (WOC=12.500%, NOPA=0, NOAM=5, WMC=29) 3 40488
ShortClassName Avoid short class names like Face 4 288436

org/apache/commons/geometry/io/euclidean/threed/stl/BinaryStlFacetDefinitionReader.java

Rule Violation Priority Line
ImmutableField Private field 'header' could be made final; it is only initialized in the declaration or constructor. 3 40
LocalVariableCouldBeFinal Local variable 'c' could be declared final 3 89
LocalVariableCouldBeFinal Local variable 'read' could be declared final 3 181

org/apache/commons/geometry/io/euclidean/threed/stl/BinaryStlWriter.java

Rule Violation Priority Line
LocalVariableCouldBeFinal Local variable 'countBuffer' could be declared final 3 146

org/apache/commons/geometry/io/euclidean/threed/stl/TextStlFacetDefinitionReader.java

Rule Violation Priority Line
ImmutableField Private field 'reader' could be made final; it is only initialized in the declaration or constructor. 3 35
ImmutableField Private field 'parser' could be made final; it is only initialized in the declaration or constructor. 3 38
LocalVariableCouldBeFinal Local variable 'choice' could be declared final 3 7678

org/apache/commons/geometry/io/euclidean/threed/stl/TextStlWriter.java

Rule Violation Priority Line
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 89

org/apache/commons/geometry/io/euclidean/threed/txt/AbstractTextBoundaryWriteHandler3D.java

Rule Violation Priority Line
DataClass The class 'AbstractTextBoundaryWriteHandler3D' is suspected to be a Data Class (WOC=25.000%, NOPA=0, NOAM=6, WMC=11) 3 35132

org/apache/commons/geometry/io/euclidean/threed/txt/TextBoundaryWriteHandler3D.java

Rule Violation Priority Line
DataClass The class 'TextBoundaryWriteHandler3D' is suspected to be a Data Class (WOC=14.286%, NOPA=0, NOAM=6, WMC=8) 3 29109