Rule |
Violation |
Priority |
Line |
ExcessivePublicCount |
This class has a bunch of public methods and attributes |
3 |
18–2897 |
GodClass |
Possible God Class (WMC=478, ATFD=424, TCC=14.011%) |
3 |
96–2897 |
CyclomaticComplexity |
The class 'Dfp' has a total cyclomatic complexity of 478 (highest 39). |
3 |
96–2897 |
AvoidFieldNameMatchingMethodName |
Field exp has the same name as a method |
3 |
170 |
AvoidReassigningParameters |
Avoid reassigning parameters such as 'x' |
2 |
221 |
UnusedAssignment |
The value assigned to field 'sign' is never used (overwritten on lines 274, 292, 295, 298 and 313) |
3 |
260 |
UnusedAssignment |
The value assigned to field 'exp' is never used (overwritten on line 314) |
3 |
261 |
UnusedAssignment |
The value assigned to field 'nans' is never used (overwritten on lines 293, 296, 299 and 315) |
3 |
262 |
LocalVariableCouldBeFinal |
Local variable 'bits' could be declared final |
3 |
265 |
AvoidLiteralsInIfCondition |
Avoid using Literals in Conditional Statements |
3 |
289 |
CognitiveComplexity |
The constructor 'Dfp(DfpField, String)' has a cognitive complexity of 61, current threshold is 15 |
3 |
333–529 |
NPathComplexity |
The constructor 'Dfp(DfpField, String)' has an NPath complexity of 689472000, current threshold is 200 |
3 |
333–529 |
CyclomaticComplexity |
The constructor 'Dfp(DfpField, String)' has a cyclomatic complexity of 39. |
3 |
333–529 |
UnusedAssignment |
The value assigned to field 'exp' is never used (overwritten on line 523) |
3 |
338 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
342 |
ConstructorCallsOverridableMethod |
Overridable method 'getRadixDigits' called during object construction |
1 |
345 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
345 |
LiteralsFirstInComparisons |
Position literals first in String comparisons |
3 |
348 |
LiteralsFirstInComparisons |
Position literals first in String comparisons |
3 |
354 |
LiteralsFirstInComparisons |
Position literals first in String comparisons |
3 |
360 |
UseIndexOfChar |
String.indexOf(char) is faster than String.indexOf(String). |
3 |
367 |
UseIndexOfChar |
String.indexOf(char) is faster than String.indexOf(String). |
3 |
369 |
ConfusingTernary |
Avoid if (x != y) ..; else ..; |
3 |
374–396 |
LocalVariableCouldBeFinal |
Local variable 'fpexp' could be declared final |
3 |
377 |
AvoidLiteralsInIfCondition |
Avoid using Literals in Conditional Statements |
3 |
381 |
UseIndexOfChar |
String.indexOf(char) is faster than String.indexOf(String). |
3 |
399 |
AvoidLiteralsInIfCondition |
Avoid using Literals in Conditional Statements |
3 |
417 |
AvoidLiteralsInIfCondition |
Avoid using Literals in Conditional Statements |
3 |
445 |
AvoidLiteralsInIfCondition |
Avoid using Literals in Conditional Statements |
3 |
471 |
AvoidLiteralsInIfCondition |
Avoid using Literals in Conditional Statements |
3 |
494 |
ConstructorCallsOverridableMethod |
Overridable method 'round' called during object construction |
1 |
527 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
694 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
695 |
LocalVariableCouldBeFinal |
Local variable 'diff' could be declared final |
3 |
697 |
LocalVariableCouldBeFinal |
Local variable 'result' could be declared final |
3 |
857 |
NPathComplexity |
The method 'compare(Dfp, Dfp)' has an NPath complexity of 12150, current threshold is 200 |
3 |
936–987 |
CyclomaticComplexity |
The method 'compare(Dfp, Dfp)' has a cyclomatic complexity of 20. |
3 |
936–987 |
CognitiveComplexity |
The method 'compare(Dfp, Dfp)' has a cognitive complexity of 23, current threshold is 15 |
3 |
936–987 |
CognitiveComplexity |
The method 'trunc(DfpField.RoundingMode)' has a cognitive complexity of 22, current threshold is 15 |
3 |
1042–1126 |
NPathComplexity |
The method 'trunc(DfpField.RoundingMode)' has an NPath complexity of 896, current threshold is 200 |
3 |
1042–1126 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
1043 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
1134 |
LocalVariableCouldBeFinal |
Local variable 'd' could be declared final |
3 |
1171 |
AvoidLiteralsInIfCondition |
Avoid using Literals in Conditional Statements |
3 |
1181 |
AvoidLiteralsInIfCondition |
Avoid using Literals in Conditional Statements |
3 |
1184 |
AvoidLiteralsInIfCondition |
Avoid using Literals in Conditional Statements |
3 |
1187 |
ImplicitSwitchFallThrough |
A switch statement does not contain a break |
3 |
1206–1217 |
AvoidReassigningParameters |
Avoid reassigning parameters such as 'extra' |
2 |
1230 |
CognitiveComplexity |
The method 'add(Dfp)' has a cognitive complexity of 42, current threshold is 15 |
3 |
1251–1396 |
CyclomaticComplexity |
The method 'add(Dfp)' has a cyclomatic complexity of 32. |
3 |
1251–1396 |
NPathComplexity |
The method 'add(Dfp)' has an NPath complexity of 13317120, current threshold is 200 |
3 |
1251–1396 |
LocalVariableCouldBeFinal |
Local variable 'a' could be declared final |
3 |
1293 |
LocalVariableCouldBeFinal |
Local variable 'b' could be declared final |
3 |
1294 |
LocalVariableCouldBeFinal |
Local variable 'result' could be declared final |
3 |
1403 |
CognitiveComplexity |
The method 'round(int)' has a cognitive complexity of 15, current threshold is 15 |
3 |
1421–1493 |
NPathComplexity |
The method 'round(int)' has an NPath complexity of 360, current threshold is 200 |
3 |
1421–1493 |
NPathComplexity |
The method 'multiply(Dfp)' has an NPath complexity of 775296, current threshold is 200 |
3 |
1500–1599 |
CyclomaticComplexity |
The method 'multiply(Dfp)' has a cyclomatic complexity of 29. |
3 |
1500–1599 |
CognitiveComplexity |
The method 'multiply(Dfp)' has a cognitive complexity of 32, current threshold is 15 |
3 |
1500–1599 |
NPathComplexity |
The method 'multiplyFast(int)' has an NPath complexity of 912, current threshold is 200 |
3 |
1619–1675 |
CognitiveComplexity |
The method 'multiplyFast(int)' has a cognitive complexity of 15, current threshold is 15 |
3 |
1619–1675 |
CyclomaticComplexity |
The method 'divide(Dfp)' has a cyclomatic complexity of 38. |
3 |
1682–1888 |
CognitiveComplexity |
The method 'divide(Dfp)' has a cognitive complexity of 71, current threshold is 15 |
3 |
1682–1888 |
NPathComplexity |
The method 'divide(Dfp)' has an NPath complexity of 731512320, current threshold is 200 |
3 |
1682–1888 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
1683 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
1684 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
1685 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
1686 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
1687 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
1688 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
1689 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
1690 |
UnusedAssignment |
The initializer for variable 'md' is never used (overwritten on line 1856) |
3 |
1691 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
1691 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
1692 |
LocalVariableCouldBeFinal |
Local variable 'dm' could be declared final |
3 |
1782 |
AvoidLiteralsInIfCondition |
Avoid using Literals in Conditional Statements |
3 |
1807 |
NPathComplexity |
The method 'divide(int)' has an NPath complexity of 240, current threshold is 200 |
3 |
1895–1952 |
NPathComplexity |
The method 'sqrt()' has an NPath complexity of 4680, current threshold is 200 |
3 |
1965–2055 |
CognitiveComplexity |
The method 'sqrt()' has a cognitive complexity of 19, current threshold is 15 |
3 |
1965–2055 |
ImplicitSwitchFallThrough |
A switch statement does not contain a break |
3 |
2012–2024 |
UnusedAssignment |
The initializer for variable 'dx' is never used (overwritten on line 2034) |
3 |
2026 |
UnusedAssignment |
The initializer for variable 'ppx' is never used (overwritten on line 2038) |
3 |
2032 |
NPathComplexity |
The method 'dfp2sci()' has an NPath complexity of 576, current threshold is 200 |
3 |
2081–2157 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
2086 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
2087 |
AvoidLiteralsInIfCondition |
Avoid using Literals in Conditional Statements |
3 |
2101 |
ConfusingTernary |
Avoid if (x != y) ..; else ..; |
3 |
2113–2128 |
UnusedAssignment |
The updated value of variable 'q' is never used |
3 |
2126 |
NPathComplexity |
The method 'dfp2string()' has an NPath complexity of 768, current threshold is 200 |
3 |
2162–2229 |
AssignmentInOperand |
Avoid assignments in operands |
3 |
2190 |
AvoidLiteralsInIfCondition |
Avoid using Literals in Conditional Statements |
3 |
2214 |
CognitiveComplexity |
The method 'dotrap(int, String, Dfp, Dfp)' has a cognitive complexity of 16, current threshold is 15 |
3 |
2238–2294 |
LocalVariableCouldBeFinal |
Local variable 'result' could be declared final |
3 |
2325 |
NPathComplexity |
The method 'nextAfter(Dfp)' has an NPath complexity of 432, current threshold is 200 |
3 |
2335–2397 |
CognitiveComplexity |
The method 'nextAfter(Dfp)' has a cognitive complexity of 16, current threshold is 15 |
3 |
2335–2397 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
2346 |
NPathComplexity |
The method 'toDouble()' has an NPath complexity of 27648, current threshold is 200 |
3 |
2403–2486 |
CognitiveComplexity |
The method 'toDouble()' has a cognitive complexity of 21, current threshold is 15 |
3 |
2403–2486 |
LocalVariableCouldBeFinal |
Local variable 'cmp0' could be declared final |
3 |
2419 |
AvoidLiteralsInIfCondition |
Avoid using Literals in Conditional Statements |
3 |
2452 |
AvoidLiteralsInIfCondition |
Avoid using Literals in Conditional Statements |
3 |
2462 |
LocalVariableCouldBeFinal |
Local variable 'bits' could be declared final |
3 |
2478 |
LocalVariableCouldBeFinal |
Local variable 'mask' could be declared final |
3 |
2494 |
LocalVariableCouldBeFinal |
Local variable 'sb' could be declared final |
3 |
2586 |
AvoidUncheckedExceptionsInSignatures |
A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause |
3 |
2744 |
AvoidUncheckedExceptionsInSignatures |
A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause |
3 |
2817 |
AvoidUncheckedExceptionsInSignatures |
A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause |
3 |
2833 |