RubyProc proc = new RubyProc(runtime, runtime.getProc(), type); proc.callInit(NULL_ARRAY, block); return proc;
RubyTime t = new RubyTime(runtime, runtime.getTime(), dt); t.setUSec(usec); return t;
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/RubyTime.java
Method name: RubyProc newProc(Ruby, Block, Block.Type) Method name: RubyTime newTime(Ruby, DateTime, long)
Number of AST nodes: 3 Number of AST nodes: 3
1
RubyProc proc = new RubyProc(runtime, runtime.getProc(), type);
1
RubyTime t = new RubyTime(runtime, runtime.get
2
        proc.callInit(NULL_ARRAY, block
2
Time(), dt);
3
);
3
        t.setUSec(usec);
4
        
5
        return proc;
4
        return t;
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                                      
    1
    RubyTime t = new RubyTime(runtime, runtime.getTime(), dt);
    1
    RubyProc proc = new RubyProc(runtime, runtime.getProc(), type);
                                                                                                                                
    2
    proc.callInit(NULL_ARRAY, block);
    2
    proc.callInit(NULL_ARRAY, block);
    2
    t.setUSec(usec);
    Differences
    Expression1Expression2Difference
    callInitsetUSecMETHOD_INVOCATION_NAME_MISMATCH
    proctVARIABLE_NAME_MISMATCH
    org.jruby.RubyProcorg.jruby.RubyTimeSUBCLASS_TYPE_MISMATCH
    proc.callInit(NULL_ARRAY,block)t.setUSec(usec)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression proc.callInit(NULL_ARRAY,block) is a void method call, and thus it cannot be parameterized
    Expression t.setUSec(usec) is a void method call, and thus it cannot be parameterized
    Expression proc.callInit(NULL_ARRAY,block) is a void method call, and thus it cannot be parameterized
    Expression t.setUSec(usec) is a void method call, and thus it cannot be parameterized
    2
    t.setUSec(usec);
    3
    return proc;
    3
    return proc;
    3
    return t;
    Differences
    Expression1Expression2Difference
    proctVARIABLE_NAME_MISMATCH
    org.jruby.RubyProcorg.jruby.RubyTimeSUBCLASS_TYPE_MISMATCH
    3
    return t;
    Precondition Violations (4)
    Row Violation
    1Expression proc.callInit(NULL_ARRAY,block) is a void method call, and thus it cannot be parameterized
    2Expression t.setUSec(usec) is a void method call, and thus it cannot be parameterized
    3Expression proc.callInit(NULL_ARRAY,block) is a void method call, and thus it cannot be parameterized
    4Expression t.setUSec(usec) is a void method call, and thus it cannot be parameterized