Apache Commons logo Commons Math

PMD Results

The following document contains the results of PMD 6.55.0.

Violations By Priority

Priority 1

org/apache/commons/math4/examples/kmeans/image/ImageData.java

Rule Violation Line
AvoidThrowingRawExceptionTypes Avoid throwing raw exception types. 73
AvoidThrowingRawExceptionTypes Avoid throwing raw exception types. 107

Priority 2

org/apache/commons/math4/examples/kmeans/image/StandAlone.java

Rule Violation Line
SystemPrintln System.out.println is used 114

Priority 3

org/apache/commons/math4/examples/kmeans/image/ImageData.java

Rule Violation Line
LocalVariableCouldBeFinal Local variable 'cluster' could be declared final 92
LocalVariableCouldBeFinal Local variable 'pixel' could be declared final 94
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 139
MethodReturnsInternalArray Returning 'color' may expose an internal array. 148

org/apache/commons/math4/examples/kmeans/image/StandAlone.java

Rule Violation Line
ImmutableField Private field 'maxIter' could be made final; it is only initialized in the declaration or constructor. 49

Files

org/apache/commons/math4/examples/kmeans/image/ImageData.java

Rule Violation Priority Line
AvoidThrowingRawExceptionTypes Avoid throwing raw exception types. 1 73
LocalVariableCouldBeFinal Local variable 'cluster' could be declared final 3 92
LocalVariableCouldBeFinal Local variable 'pixel' could be declared final 3 94
AvoidThrowingRawExceptionTypes Avoid throwing raw exception types. 1 107
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 139
MethodReturnsInternalArray Returning 'color' may expose an internal array. 3 148

org/apache/commons/math4/examples/kmeans/image/StandAlone.java

Rule Violation Priority Line
ImmutableField Private field 'maxIter' could be made final; it is only initialized in the declaration or constructor. 3 49
SystemPrintln System.out.println is used 2 114