File path: /apache-ant-1.7.0/src/org/apache/tools/ant/listener/AnsiColorLogger.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/listener/AnsiColorLogger.java | |||
Method name: void setColors()
|
Method name: void setColors()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (errC != null) {↵ | 1 | if (info != null) {↵ | |
2 | errColor = PREFIX + errC + SUFFIX;↵ | 2 | infoColor = PREFIX + info + SUFFIX;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (warn != null) {↵ | 4 | if (verbose != null) {↵ | |
5 | warnColor = PREFIX + warn + SUFFIX;↵ | 5 | verboseColor = PREFIX + verbose + SUFFIX;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (info != null) {↵ | 7 | if (debug != null) {↵ | |
8 | infoColor = PREFIX + info + SUFFIX;↵ | 8 | debugColor = PREFIX + debug + SUFFIX;↵ | |
9 | } | 9 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 1.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 28 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16 | if (errC != null) |
| 20 | if (info != null) | |||||||||||||||
17 | errColor = PREFIX + errC + SUFFIX; |
| 21 | infoColor = PREFIX + info + SUFFIX; | |||||||||||||||
18 | if (warn != null) |
| 22 | if (verbose != null) | |||||||||||||||
19 | warnColor = PREFIX + warn + SUFFIX; |
| 23 | verboseColor = PREFIX + verbose + SUFFIX; | |||||||||||||||
20 | if (info != null) |
| 24 | if (debug != null) | |||||||||||||||
21 | infoColor = PREFIX + info + SUFFIX; |
| 25 | debugColor = PREFIX + debug + SUFFIX; |
Row | Violation |
---|---|
1 | Expression errColor is a field being modified, and thus it cannot be parameterized |
2 | Expression infoColor is a field being modified, and thus it cannot be parameterized |
3 | Expression warnColor is a field being modified, and thus it cannot be parameterized |
4 | Expression verboseColor is a field being modified, and thus it cannot be parameterized |
5 | Expression infoColor is a field being modified, and thus it cannot be parameterized |
6 | Expression debugColor is a field being modified, and thus it cannot be parameterized |