try { return callBlock(context, caller, self, args, block); } catch (JumpException.BreakJump bj) { return handleBreakJump(context, bj); } catch (JumpException.RetryJump rj) { throw retryJumpError(context); } finally { block.escape(); }
try { return callBlock(context, caller, self, arg1, block); } catch (JumpException.BreakJump bj) { return handleBreakJump(context, bj); } catch (JumpException.RetryJump rj) { throw retryJumpError(context); } finally { block.escape(); }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/runtime/callsite/CachingCallSite.java File path: /jruby-1.4.0/src/org/jruby/runtime/callsite/SuperCallSite.java
Method name: IRubyObject callIter(ThreadContext, IRubyObject, IRubyObject, IRubyObject[], Block) Method name: IRubyObject callIter(ThreadContext, IRubyObject, IRubyObject, IRubyObject, Block)
Number of AST nodes: 2 Number of AST nodes: 2
1
try {
1
try {
2
            return callBlock(context, caller, self, args, block);
2
            return callBlock(context, caller, self, arg1, block);
3
        } catch (JumpException.BreakJump bj) {
3
        } catch (JumpException.BreakJump bj) {
4
            return handleBreakJump(context, bj);
4
            return handleBreakJump(context, bj);
5
        } catch (JumpException.RetryJump rj) {
5
        } catch (JumpException.RetryJump rj) {
6
            throw retryJumpError(context);
6
            throw retryJumpError(context);
7
        } finally {
7
        } finally {
8
            block.escape();
8
            block.escape();
9
        }
9
        }
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.4
Clones locationClones are in different classes having the same super class
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    2
    return callBlock(context, caller, self, args, block);
    2
    return callBlock(context, caller, self, args, block);
    2
    return callBlock(context, caller, self, arg1, block);
    Differences
    Expression1Expression2Difference
    argsarg1VARIABLE_NAME_MISMATCH
    org.jruby.runtime.builtin.IRubyObject[]org.jruby.runtime.builtin.IRubyObjectVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jruby.runtime.builtin.IRubyObject[] of variable args does not match with type org.jruby.runtime.builtin.IRubyObject of variable arg1
    • Make classes org.jruby.runtime.builtin.IRubyObject[] and org.jruby.runtime.builtin.IRubyObject extend a common superclass
    2
    return callBlock(context, caller, self, arg1, block);
    Precondition Violations (1)
    Row Violation
    1Type org.jruby.runtime.builtin.IRubyObject[] of variable args does not match with type org.jruby.runtime.builtin.IRubyObject of variable arg1