Ruby runtime = context.getRuntime(); try { pre(context, self, name, Block.NULL_BLOCK, 1); return jitCompiledScript.__file__(context, self, arg0, Block.NULL_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, args.length); return jitCompiledScript.__file__(context, self, args, 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) Method name: IRubyObject call(ThreadContext, IRubyObject, RubyModule, String, IRubyObject[], Block)
Number of AST nodes: 4 Number of AST nodes: 4
1
Ruby runtime = context.getRuntime();
1
Ruby runtime = context.getRuntime();
2
        
2
        try {
3
        try {
3
            pre(context, self, name, Block.NULL_BLOCK, 1);
4
            pre(context, self, name, block, args.length);
4
            return jitCompiledScript.__file__(context, self, arg0, Block.NULL_BLOCK);
5
            return jitCompiledScript.__file__(context, self, args, block);
5
        } catch (JumpException.ReturnJump rj) {
6
        } catch (JumpException.ReturnJump rj) {
6
            return handleReturn(context, rj);
7
            return handleReturn(context, rj);
7
        } catch (JumpException.RedoJump rj) {
8
        } catch (JumpException.RedoJump rj) {
8
            return handleRedo(runtime);
9
            return handleRedo(runtime);
9
        } finally {
10
        } finally {
10
            post(runtime, context, name);
11
            post(runtime, context, name);
11
        }
12
        }
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 declared in the same class
Number of node comparisons10
  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)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.NULL_BLOCK, 1);
    3
    pre(context, self, name, Block.NULL_BLOCK, 1);
    3
    pre(context, self, name, block, args.length);
    Differences
    Expression1Expression2Difference
    Block.NULL_BLOCKblockTYPE_COMPATIBLE_REPLACEMENT
    1args.lengthTYPE_COMPATIBLE_REPLACEMENT
    3
    pre(context, self, name, block, args.length);
    4
    return jitCompiledScript.__file__(context, self, arg0, Block.NULL_BLOCK);
    4
    return jitCompiledScript.__file__(context, self, arg0, Block.NULL_BLOCK);
    4
    return jitCompiledScript.__file__(context, self, args, block);
    Differences
    Expression1Expression2Difference
    arg0argsVARIABLE_NAME_MISMATCH
    org.jruby.runtime.builtin.IRubyObjectorg.jruby.runtime.builtin.IRubyObject[]VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jruby.runtime.builtin.IRubyObject of variable arg0 does not match with type org.jruby.runtime.builtin.IRubyObject[] of variable args
    • Make classes org.jruby.runtime.builtin.IRubyObject and org.jruby.runtime.builtin.IRubyObject[] extend a common superclass
    4
    return jitCompiledScript.__file__(context, self, args, block);
    Precondition Violations (1)
    Row Violation
    1Type org.jruby.runtime.builtin.IRubyObject of variable arg0 does not match with type org.jruby.runtime.builtin.IRubyObject[] of variable args