public boolean isGreaterThan(final DeweyDecimal other) { final int max = Math.max(other.components.length, components.length); for (int i = 0; i < max; i++) { final int component1 = (i < components.length) ? components[ i ] : 0; final int component2 = (i < other.components.length) ? other.components[ i ] : 0; if (component2 > component1) { return false; } if (component2 < component1) { return true; } } return false; // Exact match
public boolean isGreaterThanOrEqual(final DeweyDecimal other) { final int max = Math.max(other.components.length, components.length); for (int i = 0; i < max; i++) { final int component1 = (i < components.length) ? components[ i ] : 0; final int component2 = (i < other.components.length) ? other.components[ i ] : 0; if (component2 > component1) { return false; } if (component2 < component1) { return true; } } return true; // Exact match
Clone fragments detected by clone detection tool
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: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public boolean isGreaterThan(final DeweyDecimal other) {
1
public boolean isGreaterThanOrEqual(final DeweyDecimal other) {
2
        final int max = Math.max(other.components.length, components.length);
2
        final int max = Math.max(other.components.length, components.length);
3
        for (int i = 0; i < max; i++) {
3
        for (int i = 0; i < max; i++) {
4
            final int component1 = (i < components.length) ? components[ i ] : 0;
4
            final int component1 = (i < components.length) ? components[ i ] : 0;
5
            final int component2 = (i < other.components.length) ? other.components[ i ] : 0;
5
            final int component2 = (i < other.components.length) ? other.components[ i ] : 0;
6
            if (component2 > component1) {
6
            if (component2 > component1) {
7
                return false;
7
                return false;
8
            }
8
            }
9
            if (component2 < component1) {
9
            if (component2 < component1) {
10
                return true;
10
                return true;
11
            }
11
            }
12
        }
12
        }
13
        return false; // Exact match
13
        return true; // Exact match
14
    
14
    
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0