try { return links.get(index); } catch (IndexOutOfBoundsException e) { throw runtime.newArgumentError("dump format error (unlinked, index: " + index + ")"); }
try { return symbols.get(index); } catch (IndexOutOfBoundsException e) { throw runtime.newTypeError("bad symbol"); }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/runtime/marshal/UnmarshalCache.java File path: /jruby-1.4.0/src/org/jruby/runtime/marshal/UnmarshalCache.java
Method name: IRubyObject linkedByIndex(int) Method name: RubySymbol symbolByIndex(int)
Number of AST nodes: 2 Number of AST nodes: 2
1
try {
1
try {
2
            return links.get(index);
2
            return symbols.get(index);
3
        } catch (IndexOutOfBoundsException e) {
3
        } catch (IndexOutOfBoundsException e) {
4
            throw runtime.newArgumentError("dump format error (unlinked, index: " + index + ")");
4
            throw runtime.newTypeError("bad symbol");
5
        }
5
        }
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.2
Clones locationClones are declared in the same class
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    1
    try
    Differences
    Expression1Expression2Difference
    newArgumentErrornewTypeErrorMETHOD_INVOCATION_NAME_MISMATCH
    "dump format error (unlinked, index: " + index + ")""bad symbol"TYPE_COMPATIBLE_REPLACEMENT
    1
    try
                                                              
    2
    return symbols.get(index);
    Preondition Violations
    Unmatched return symbols.get(index);
    2
    return symbols.get(index);
    2
    return links.get(index);
    2
    return links.get(index);
    Preondition Violations
    Unmatched return links.get(index);
                                                          
    Precondition Violations (2)
    Row Violation
    1Unmatched return symbols.get(index);
    2Unmatched return links.get(index);