if ((s == '=') || d == -1) { if (s == '=') { encode.position(encode.position() - 1); } break; }
if ((s == '=') || c == -1) { if (s == '=') { encode.position(encode.position() - 1); } break; }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/util/Pack.java File path: /jruby-1.4.0/src/org/jruby/util/Pack.java
Method name: RubyArray unpack(Ruby, ByteList, ByteList) Method name: RubyArray unpack(Ruby, ByteList, ByteList)
Number of AST nodes: 4 Number of AST nodes: 4
1
if ((s == '=') || d == -1) {
1
if ((s == '=') || c == -1) {
2
                            if (s == '=') {
2
                            if (s == '=') {
3
                                encode.position(encode.position() - 1);
3
                                encode.position(encode.position() - 1);
4
                            }
4
                            }
5
                            break;
5
                            break;
6
                        }
6
                        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in the same method
Number of node comparisons15
  1. {Non-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)3.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    210
    if ((s == '=') || d == -1)
    210
    if ((s == '=') || d == -1)
    201
    if ((s == '=') || c == -1)
    Differences
    Expression1Expression2Difference
    dcVARIABLE_NAME_MISMATCH
    201
    if ((s == '=') || c == -1)
    211
    if (s == '=')
    202
    if (s == '=')
    212
    encode.position(encode.position() - 1);
    203
    encode.position(encode.position() - 1);
    213
    break;
    213
    break;
    204
    break;
    Preondition Violations
    Statement break; without innermost loop
    Statement break; without innermost loop
    204
    break;
    Precondition Violations (2)
    Row Violation
    1Statement break; without innermost loop
    2Statement break; without innermost loop