File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/DeweyDecimal.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/DeweyDecimal.java | |||
Method name: boolean isGreaterThan(DeweyDecimal)
|
Method name: boolean isGreaterThanOrEqual(DeweyDecimal)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | final int max = Math.max(other.components.length, components.length);↵ | 1 | final int max = Math.max(other.components.length, components.length);↵ | |
2 | for (int i = 0; i < max; i++) {↵ | 2 | for (int i = 0; i < max; i++) {↵ | |
3 | final int component1 = (i < components.length) ? components[ i ] : 0;↵ | 3 | final int component1 = (i < components.length) ? components[ i ] : 0;↵ | |
4 | final int component2 = (i < other.components.length) ? other.components[ i ] : 0;↵ | 4 | final int component2 = (i < other.components.length) ? other.components[ i ] : 0;↵ | |
5 | if (component2 > component1) {↵ | 5 | if (component2 > component1) {↵ | |
6 | return false;↵ | 6 | return false;↵ | |
7 | }↵ | 7 | }↵ | |
8 | if (component2 < component1) {↵ | 8 | if (component2 < component1) {↵ | |
9 | return true;↵ | 9 | return true;↵ | |
10 | }↵ | 10 | }↵ | |
11 | }↵ | 11 | }↵ | |
12 | return false; | 12 | return true; | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 26 |
Number of mapped statements | 9 |
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.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | final int max = Math.max(other.components.length, components.length); | 1 | final int max = Math.max(other.components.length, components.length); | |||||||||||
2 | for (int i = 0; i < max; i++) | 2 | for (int i = 0; i < max; i++) | |||||||||||
3 | final int component1 = (i < components.length) ? components[i] : 0; | 3 | final int component1 = (i < components.length) ? components[i] : 0; | |||||||||||
4 | final int component2 = (i < other.components.length) ? other.components[i] : 0; | 4 | final int component2 = (i < other.components.length) ? other.components[i] : 0; | |||||||||||
5 | if (component2 > component1) | 5 | if (component2 > component1) | |||||||||||
6 | return false; | 6 | return false; | |||||||||||
7 | if (component2 < component1) | 7 | if (component2 < component1) | |||||||||||
8 | return true; | 8 | return true; | |||||||||||
9 | return false; |
| 9 | return true; |
Row | Violation |
---|