Ruby runtime = context.getRuntime(); try { pre(context, self, name, block, 1); return jitCompiledScript.__file__(context, self, arg0, block); } catch (JumpException.ReturnJump rj) { return handleReturn(context, rj); } catch (JumpException.RedoJump rj) { return handleRedo(runtime); } finally { post(runtime, context, name); }
Ruby runtime = context.getRuntime(); try { pre(context, self, name, Block.NULL_BLOCK, 0); return jitCompiledScript.__file__(context, self, Block.NULL_BLOCK); } catch (JumpException.ReturnJump rj) { return handleReturn(context, rj); } catch (JumpException.RedoJump rj) { return handleRedo(runtime); } finally { post(runtime, context, name); }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/internal/runtime/methods/JittedMethod.java File path: /jruby-1.4.0/src/org/jruby/internal/runtime/methods/JittedMethod.java
Method name: IRubyObject call(ThreadContext, IRubyObject, RubyModule, String, IRubyObject, Block) Method name: IRubyObject call(ThreadContext, IRubyObject, RubyModule, String)
Number of AST nodes: 4 Number of AST nodes: 4
1
Ruby runtime = context.getRuntime();
1
Ruby runtime = context.getRuntime();
2
        try {
2
        try {
3
            pre(context, self, name, block, 1);
3
            pre(context, self, name, Block.NULL_BLOCK, 0);
4
            return jitCompiledScript.__file__(context, self, arg0, block);
4
            return jitCompiledScript.__file__(context, self, Block.NULL_BLOCK);
5
        } catch (JumpException.ReturnJump rj) {
5
        } catch (JumpException.ReturnJump rj) {
6
            return handleReturn(context, rj);
6
            return handleReturn(context, rj);
7
        } catch (JumpException.RedoJump rj) {
7
        } catch (JumpException.RedoJump rj) {
8
            return handleRedo(runtime);
8
            return handleRedo(runtime);
9
        } finally {
9
        } finally {
10
            post(runtime, context, name);
10
            post(runtime, context, name);
11
        }
11
        }
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 comparisons10
  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)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    Ruby runtime = context.getRuntime();
    1
    Ruby runtime = context.getRuntime();
    2
    try
    2
    try
    3
    pre(context, self, name, block, 1);
    3
    pre(context, self, name, block, 1);
    3
    pre(context, self, name, Block.NULL_BLOCK, 0);
    Differences
    Expression1Expression2Difference
    blockBlock.NULL_BLOCKTYPE_COMPATIBLE_REPLACEMENT
    10LITERAL_VALUE_MISMATCH
    3
    pre(context, self, name, Block.NULL_BLOCK, 0);
    4
    return jitCompiledScript.__file__(context, self, arg0, block);
    4
    return jitCompiledScript.__file__(context, self, arg0, block);
    4
    return jitCompiledScript.__file__(context, self, Block.NULL_BLOCK);
    Differences
    Expression1Expression2Difference
    jitCompiledScript.__file__(context,self,arg0,block)jitCompiledScript.__file__(context,self,Block.NULL_BLOCK)ARGUMENT_NUMBER_MISMATCH
    4
    return jitCompiledScript.__file__(context, self, Block.NULL_BLOCK);
    Precondition Violations (0)
    Row Violation