byte c; if(str == end || (c = data[str]) < 0) { return false; } return space[c];
byte c; if(str == end || (c = data[str]) < 0) { return false; } return spaceOrUnderscore[c];
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/util/Convert2.java File path: /jruby-1.4.0/src/org/jruby/util/Convert2.java
Method name: boolean isSpace(int) Method name: boolean isSpaceOrUnderscore(int)
Number of AST nodes: 4 Number of AST nodes: 4
1
byte c;
1
byte c;
2
        if(str == end || (c = data[str]) < 0) {
2
        if(str == end || (c = data[str]) < 0) {
3
            return false;
3
            return false;
4
        }
4
        }
5
        return space[c];
5
        return spaceOrUnderscore[c];
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are declared in the same class
Number of node comparisons8
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    byte c;
    1
    byte c;
    2
    if (str == end || (c = data[str]) < 0)
    2
    if (str == end || (c = data[str]) < 0)
    3
    return false;
    3
    return false;
    4
    return space[c];
    4
    return space[c];
    4
    return spaceOrUnderscore[c];
    Differences
    Expression1Expression2Difference
    spacespaceOrUnderscoreVARIABLE_NAME_MISMATCH
    4
    return spaceOrUnderscore[c];
    Precondition Violations (0)
    Row Violation