Apache Commons logo Apache Commons Numbers

PMD Results

The following document contains the results of PMD 7.3.0.

Violations By Priority

Priority 3

org/apache/commons/numbers/core/ArithmeticUtils.java
Rule Violation Line
LocalVariableCouldBeFinal Local variable 'negatedGcd' could be declared final 73
LocalVariableCouldBeFinal Local variable 'negatedGcd' could be declared final 147
NPathComplexity The method 'pow(int, int)' has an NPath complexity of 640, current threshold is 200 279
AvoidLiteralsInIfCondition Avoid using literals in if statements 297
NPathComplexity The method 'pow(long, int)' has an NPath complexity of 640, current threshold is 200 339
AvoidLiteralsInIfCondition Avoid using literals in if statements 357
org/apache/commons/numbers/core/DD.java
Rule Violation Line
LocalVariableCouldBeFinal Local variable 'a1' could be declared final 688
LocalVariableCouldBeFinal Local variable 'a2' could be declared final 689
LocalVariableCouldBeFinal Local variable 'n' could be declared final 1700
LocalVariableCouldBeFinal Local variable 'm' could be declared final 1701
LocalVariableCouldBeFinal Local variable 'z0' could be declared final 1722
LocalVariableCouldBeFinal Local variable 'z1' could be declared final 1723
AvoidLiteralsInIfCondition Avoid using literals in if statements 1726
AvoidLiteralsInIfCondition Avoid using literals in if statements 1737
AvoidLiteralsInIfCondition Avoid using literals in if statements 1740
AvoidLiteralsInIfCondition Avoid using literals in if statements 1743
org/apache/commons/numbers/core/DDMath.java
Rule Violation Line
LocalVariableCouldBeFinal Local variable 'v' could be declared final 437
org/apache/commons/numbers/core/Norm.java
Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'of': the method is already in a final class 149
UnnecessaryModifier Unnecessary modifier 'final' on method 'of': the method is already in a final class 169
UnnecessaryModifier Unnecessary modifier 'final' on method 'of': the method is already in a final class 189
ConfusingTernary Avoid if (x != y) ..; else ..; 283289
ConfusingTernary Avoid if (x != y) ..; else ..; 412458
ConfusingTernary Avoid if (x != y) ..; else ..; 465479
org/apache/commons/numbers/core/Sum.java
Rule Violation Line
AvoidFieldNameMatchingTypeName It is somewhat confusing to have a field name matching the declaring class name 89

Priority 4

org/apache/commons/numbers/core/Precision.java
Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Precision': 'compareTo' is already in scope 531

Files

org/apache/commons/numbers/core/ArithmeticUtils.java

Rule Violation Priority Line
LocalVariableCouldBeFinal Local variable 'negatedGcd' could be declared final 3 73
LocalVariableCouldBeFinal Local variable 'negatedGcd' could be declared final 3 147
NPathComplexity The method 'pow(int, int)' has an NPath complexity of 640, current threshold is 200 3 279
AvoidLiteralsInIfCondition Avoid using literals in if statements 3 297
NPathComplexity The method 'pow(long, int)' has an NPath complexity of 640, current threshold is 200 3 339
AvoidLiteralsInIfCondition Avoid using literals in if statements 3 357

org/apache/commons/numbers/core/DD.java

Rule Violation Priority Line
LocalVariableCouldBeFinal Local variable 'a1' could be declared final 3 688
LocalVariableCouldBeFinal Local variable 'a2' could be declared final 3 689
LocalVariableCouldBeFinal Local variable 'n' could be declared final 3 1700
LocalVariableCouldBeFinal Local variable 'm' could be declared final 3 1701
LocalVariableCouldBeFinal Local variable 'z0' could be declared final 3 1722
LocalVariableCouldBeFinal Local variable 'z1' could be declared final 3 1723
AvoidLiteralsInIfCondition Avoid using literals in if statements 3 1726
AvoidLiteralsInIfCondition Avoid using literals in if statements 3 1737
AvoidLiteralsInIfCondition Avoid using literals in if statements 3 1740
AvoidLiteralsInIfCondition Avoid using literals in if statements 3 1743

org/apache/commons/numbers/core/DDMath.java

Rule Violation Priority Line
LocalVariableCouldBeFinal Local variable 'v' could be declared final 3 437

org/apache/commons/numbers/core/Norm.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'of': the method is already in a final class 3 149
UnnecessaryModifier Unnecessary modifier 'final' on method 'of': the method is already in a final class 3 169
UnnecessaryModifier Unnecessary modifier 'final' on method 'of': the method is already in a final class 3 189
ConfusingTernary Avoid if (x != y) ..; else ..; 3 283289
ConfusingTernary Avoid if (x != y) ..; else ..; 3 412458
ConfusingTernary Avoid if (x != y) ..; else ..; 3 465479

org/apache/commons/numbers/core/Precision.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Precision': 'compareTo' is already in scope 4 531

org/apache/commons/numbers/core/Sum.java

Rule Violation Priority Line
AvoidFieldNameMatchingTypeName It is somewhat confusing to have a field name matching the declaring class name 3 89