check(); if (i < 0 || (regs == null ? 1 : regs.numRegs) <= i) throw runtime.newIndexError("index " + i + " out of matches"); return regs == null ? end : regs.end[i];
check(); if (i < 0 || (regs == null ? 1 : regs.numRegs) <= i) throw runtime.newIndexError("index " + i + " out of matches"); return regs == null ? begin : regs.beg[i];
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/RubyMatchData.java File path: /jruby-1.4.0/src/org/jruby/RubyMatchData.java
Method name: int endCommon(Ruby, int) Method name: int beginCommon(Ruby, int)
Number of AST nodes: 4 Number of AST nodes: 4
1
check();
1
check();
2
        if (i < 0 || (regs == null ? 1 : regs.numRegs) <= i) throw runtime.newIndexError("index " + i + " out of matches");
2
        if (i < 0 || (regs == null ? 1 : regs.numRegs) <= i) throw runtime.newIndexError("index " + i + " out of matches");
3
        return regs == null ? end : regs.end[i];
3
        return regs == null ? begin : regs.beg[i];
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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    check();
    1
    check();
    2
    if (i < 0 || (regs == null ? 1 : regs.numRegs) <= i)
    2
    if (i < 0 || (regs == null ? 1 : regs.numRegs) <= i)
    3
    throw runtime.newIndexError("index " + i + " out of matches");
    3
    throw runtime.newIndexError("index " + i + " out of matches");
    4
    return regs == null ? end : regs.end[i];
    4
    return regs == null ? end : regs.end[i];
    4
    return regs == null ? begin : regs.beg[i];
    Differences
    Expression1Expression2Difference
    endbeginVARIABLE_NAME_MISMATCH
    endbegVARIABLE_NAME_MISMATCH
    4
    return regs == null ? begin : regs.beg[i];
    Precondition Violations (0)
    Row Violation