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/neuralnet/twod/NeuronSquareMesh2D.java

Rule Violation Line
ReturnEmptyCollectionRatherThanNull Return an empty collection rather than null. 454

Priority 3

org/apache/commons/math4/neuralnet/MapRanking.java

Rule Violation Line
CognitiveComplexity The method 'rank(double, int)' has a cognitive complexity of 17, current threshold is 15 79–117
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 91

org/apache/commons/math4/neuralnet/Network.java

Rule Violation Line
GodClass Possible God Class (WMC=49, ATFD=54, TCC=23.529%) 44–393
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 83
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 122–136
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 132
CompareObjectsWithEquals Use equals() to compare object references. 236
CompareObjectsWithEquals Use equals() to compare object references. 240
CompareObjectsWithEquals Use equals() to compare object references. 273
CompareObjectsWithEquals Use equals() to compare object references. 277

org/apache/commons/math4/neuralnet/Neuron.java

Rule Violation Line
DataClass The class 'Neuron' is suspected to be a Data Class (WOC=28.571%, NOPA=0, NOAM=5, WMC=17) 33–218
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 72–79

org/apache/commons/math4/neuralnet/internal/NeuralNetException.java

Rule Violation Line
DataClass The class 'NeuralNetException' is suspected to be a Data Class (WOC=0.000%, NOPA=8, NOAM=0, WMC=1) 24–55

org/apache/commons/math4/neuralnet/oned/NeuronString.java

Rule Violation Line
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 113

org/apache/commons/math4/neuralnet/twod/NeuronSquareMesh2D.java

Rule Violation Line
CyclomaticComplexity The class 'NeuronSquareMesh2D' has a total cyclomatic complexity of 99 (highest 47). 46–818
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 189
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 235–246
NPathComplexity The method 'getLocation(int, int, HorizontalDirection, VerticalDirection)' has an NPath complexity of 720, current threshold is 200 398–458
CognitiveComplexity The method 'createLinks()' has a cognitive complexity of 158, current threshold is 15 463–593
NPathComplexity The method 'createLinks()' has an NPath complexity of 55516, current threshold is 200 463–593
CyclomaticComplexity The method 'createLinks()' has a cyclomatic complexity of 47. 463–593
ImplicitSwitchFallThrough A switch statement does not contain a break 472–582
SwitchDensity A high ratio of statements to labels in a switch statement. Consider refactoring. 472–582
DataClass The class 'DataVisualization' is suspected to be a Data Class (WOC=14.286%, NOPA=0, NOAM=6, WMC=20) 604–817

org/apache/commons/math4/neuralnet/twod/util/LocationFinder.java

Rule Violation Line
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 88

org/apache/commons/math4/neuralnet/twod/util/UnifiedDistanceMatrix.java

Rule Violation Line
CognitiveComplexity The method 'computeImage(NeuronSquareMesh2D)' has a cognitive complexity of 20, current threshold is 15 62–154

Files

org/apache/commons/math4/neuralnet/MapRanking.java

Rule Violation Priority Line
CognitiveComplexity The method 'rank(double, int)' has a cognitive complexity of 17, current threshold is 15 3 79–117
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 91

org/apache/commons/math4/neuralnet/Network.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=49, ATFD=54, TCC=23.529%) 3 44–393
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 83
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 122–136
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 132
CompareObjectsWithEquals Use equals() to compare object references. 3 236
CompareObjectsWithEquals Use equals() to compare object references. 3 240
CompareObjectsWithEquals Use equals() to compare object references. 3 273
CompareObjectsWithEquals Use equals() to compare object references. 3 277

org/apache/commons/math4/neuralnet/Neuron.java

Rule Violation Priority Line
DataClass The class 'Neuron' is suspected to be a Data Class (WOC=28.571%, NOPA=0, NOAM=5, WMC=17) 3 33–218
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 72–79

org/apache/commons/math4/neuralnet/internal/NeuralNetException.java

Rule Violation Priority Line
DataClass The class 'NeuralNetException' is suspected to be a Data Class (WOC=0.000%, NOPA=8, NOAM=0, WMC=1) 3 24–55

org/apache/commons/math4/neuralnet/oned/NeuronString.java

Rule Violation Priority Line
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 113

org/apache/commons/math4/neuralnet/twod/NeuronSquareMesh2D.java

Rule Violation Priority Line
CyclomaticComplexity The class 'NeuronSquareMesh2D' has a total cyclomatic complexity of 99 (highest 47). 3 46–818
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 189
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 235–246
NPathComplexity The method 'getLocation(int, int, HorizontalDirection, VerticalDirection)' has an NPath complexity of 720, current threshold is 200 3 398–458
ReturnEmptyCollectionRatherThanNull Return an empty collection rather than null. 1 454
CognitiveComplexity The method 'createLinks()' has a cognitive complexity of 158, current threshold is 15 3 463–593
NPathComplexity The method 'createLinks()' has an NPath complexity of 55516, current threshold is 200 3 463–593
CyclomaticComplexity The method 'createLinks()' has a cyclomatic complexity of 47. 3 463–593
ImplicitSwitchFallThrough A switch statement does not contain a break 3 472–582
SwitchDensity A high ratio of statements to labels in a switch statement. Consider refactoring. 3 472–582
DataClass The class 'DataVisualization' is suspected to be a Data Class (WOC=14.286%, NOPA=0, NOAM=6, WMC=20) 3 604–817

org/apache/commons/math4/neuralnet/twod/util/LocationFinder.java

Rule Violation Priority Line
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 88

org/apache/commons/math4/neuralnet/twod/util/UnifiedDistanceMatrix.java

Rule Violation Priority Line
CognitiveComplexity The method 'computeImage(NeuronSquareMesh2D)' has a cognitive complexity of 20, current threshold is 15 3 62–154