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/fraction/BigFraction.java
Rule Violation Line
CyclomaticComplexity The class 'BigFraction' has a total cyclomatic complexity of 154 (highest 20). 36
CognitiveComplexity The method 'from(double, double, int, int)' has a cognitive complexity of 21, current threshold is 20 140
CyclomaticComplexity The method 'from(double, double, int, int)' has a cyclomatic complexity of 20. 140
NPathComplexity The method 'from(double, double, int, int)' has an NPath complexity of 3264, current threshold is 200 140
UnnecessaryCast Unnecessary cast (double) 200
UnnecessaryCast Unnecessary cast (double) 200
LocalVariableCouldBeFinal Local variable 'den' could be declared final 221
org/apache/commons/numbers/fraction/Fraction.java
Rule Violation Line
CyclomaticComplexity The class 'Fraction' has a total cyclomatic complexity of 110 (highest 21). 33
LocalVariableCouldBeFinal Local variable 'p' could be declared final 86
LocalVariableCouldBeFinal Local variable 'q' could be declared final 87
CognitiveComplexity The constructor 'Fraction(double, double, int, int)' has a cognitive complexity of 27, current threshold is 20 158
CyclomaticComplexity The constructor 'Fraction(double, double, int, int)' has a cyclomatic complexity of 21. 158
NPathComplexity The constructor 'Fraction(double, double, int, int)' has an NPath complexity of 3264, current threshold is 200 158
UnnecessaryCast Unnecessary cast (double) 224
UnnecessaryCast Unnecessary cast (double) 224
UnnecessaryCast Unnecessary cast (double) 509
UnnecessaryCast Unnecessary cast (double) 509
UnnecessaryCast Unnecessary cast (long) 643
UnnecessaryCast Unnecessary cast (long) 643
UnnecessaryCast Unnecessary cast (long) 644
UnnecessaryCast Unnecessary cast (long) 644
org/apache/commons/numbers/fraction/GeneralizedContinuedFraction.java
Rule Violation Line
LocalVariableCouldBeFinal Local variable 'low' could be declared final 375
LocalVariableCouldBeFinal Local variable 'eps' could be declared final 376

Files

org/apache/commons/numbers/fraction/BigFraction.java

Rule Violation Priority Line
CyclomaticComplexity The class 'BigFraction' has a total cyclomatic complexity of 154 (highest 20). 3 36
CognitiveComplexity The method 'from(double, double, int, int)' has a cognitive complexity of 21, current threshold is 20 3 140
CyclomaticComplexity The method 'from(double, double, int, int)' has a cyclomatic complexity of 20. 3 140
NPathComplexity The method 'from(double, double, int, int)' has an NPath complexity of 3264, current threshold is 200 3 140
UnnecessaryCast Unnecessary cast (double) 3 200
UnnecessaryCast Unnecessary cast (double) 3 200
LocalVariableCouldBeFinal Local variable 'den' could be declared final 3 221

org/apache/commons/numbers/fraction/Fraction.java

Rule Violation Priority Line
CyclomaticComplexity The class 'Fraction' has a total cyclomatic complexity of 110 (highest 21). 3 33
LocalVariableCouldBeFinal Local variable 'p' could be declared final 3 86
LocalVariableCouldBeFinal Local variable 'q' could be declared final 3 87
CognitiveComplexity The constructor 'Fraction(double, double, int, int)' has a cognitive complexity of 27, current threshold is 20 3 158
CyclomaticComplexity The constructor 'Fraction(double, double, int, int)' has a cyclomatic complexity of 21. 3 158
NPathComplexity The constructor 'Fraction(double, double, int, int)' has an NPath complexity of 3264, current threshold is 200 3 158
UnnecessaryCast Unnecessary cast (double) 3 224
UnnecessaryCast Unnecessary cast (double) 3 224
UnnecessaryCast Unnecessary cast (double) 3 509
UnnecessaryCast Unnecessary cast (double) 3 509
UnnecessaryCast Unnecessary cast (long) 3 643
UnnecessaryCast Unnecessary cast (long) 3 643
UnnecessaryCast Unnecessary cast (long) 3 644
UnnecessaryCast Unnecessary cast (long) 3 644

org/apache/commons/numbers/fraction/GeneralizedContinuedFraction.java

Rule Violation Priority Line
LocalVariableCouldBeFinal Local variable 'low' could be declared final 3 375
LocalVariableCouldBeFinal Local variable 'eps' could be declared final 3 376