RubyProc proc = new RubyProc(runtime, runtime.getProc(), type); proc.callInit(NULL_ARRAY, block); return proc;
RubyStruct struct = new RubyStruct(recv.getRuntime(), (RubyClass) recv); struct.callInit(args, block); return struct;
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/RubyProc.java File path: /jruby-1.4.0/src/org/jruby/RubyStruct.java
Method name: RubyProc newProc(Ruby, Block, Block.Type) Method name: RubyStruct newStruct(IRubyObject, IRubyObject[], Block)
Number of AST nodes: 3 Number of AST nodes: 3
1
RubyProc proc = new RubyProc(runtime, runtime.getProc(), type);
1
RubyStruct struct = new RubyStruct(recv.getRuntime(), (RubyClass) recv);
2
        proc.callInit(NULL_ARRAY, block);
2
        struct.callInit(args, block);
3
        
4
        return proc;
3
        return struct;
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons5
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    RubyProc proc = new RubyProc(runtime, runtime.getProc(), type);
    1
    RubyProc proc = new RubyProc(runtime, runtime.getProc(), type);
    1
    RubyStruct struct = new RubyStruct(recv.getRuntime(), (RubyClass)recv);
    Differences
    Expression1Expression2Difference
    org.jruby.RubyProcorg.jruby.RubyStructSUBCLASS_TYPE_MISMATCH
    procstructVARIABLE_NAME_MISMATCH
    org.jruby.RubyProcorg.jruby.RubyStructSUBCLASS_TYPE_MISMATCH
    org.jruby.RubyProcorg.jruby.RubyStructSUBCLASS_TYPE_MISMATCH
    new RubyProc(runtime,runtime.getProc(),type)new RubyStruct(recv.getRuntime(),(RubyClass)recv)ARGUMENT_NUMBER_MISMATCH
    1
    RubyStruct struct = new RubyStruct(recv.getRuntime(), (RubyClass)recv);
    2
    proc.callInit(NULL_ARRAY, block);
    2
    proc.callInit(NULL_ARRAY, block);
    2
    struct.callInit(args, block);
    Differences
    Expression1Expression2Difference
    NULL_ARRAYargsVARIABLE_NAME_MISMATCH
    procstructVARIABLE_NAME_MISMATCH
    org.jruby.RubyProcorg.jruby.RubyStructSUBCLASS_TYPE_MISMATCH
    2
    struct.callInit(args, block);
    3
    return proc;
    3
    return proc;
    3
    return struct;
    Differences
    Expression1Expression2Difference
    procstructVARIABLE_NAME_MISMATCH
    org.jruby.RubyProcorg.jruby.RubyStructSUBCLASS_TYPE_MISMATCH
    3
    return struct;
    Precondition Violations (0)
    Row Violation