Mutex result = new Mutex(context.getRuntime(), (RubyClass)recv); result.callInit(args, block); return result;
ConditionVariable result = new ConditionVariable(context.getRuntime(), (RubyClass)recv); result.callInit(args, block); return result;
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/libraries/ThreadLibrary.java File path: /jruby-1.4.0/src/org/jruby/libraries/ThreadLibrary.java
Method name: Mutex newInstance(ThreadContext, IRubyObject, IRubyObject[], Block) Method name: ConditionVariable newInstance(ThreadContext, IRubyObject, IRubyObject[], Block)
Number of AST nodes: 3 Number of AST nodes: 3
1
Mutex result = new Mutex(context.getRuntime(), (RubyClass)recv);
1
ConditionVariable result = new ConditionVariable(context.getRuntime(), (RubyClass)recv);
2
            result.callInit(args, block);
2
            result.callInit(args, block);
3
            return result;
3
            return result;
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 the same java file
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
    Mutex result = new Mutex(context.getRuntime(), (RubyClass)recv);
    1
    Mutex result = new Mutex(context.getRuntime(), (RubyClass)recv);
    1
    ConditionVariable result = new ConditionVariable(context.getRuntime(), (RubyClass)recv);
    Differences
    Expression1Expression2Difference
    org.jruby.libraries.ThreadLibrary.Mutexorg.jruby.libraries.ThreadLibrary.ConditionVariableSUBCLASS_TYPE_MISMATCH
    org.jruby.libraries.ThreadLibrary.Mutexorg.jruby.libraries.ThreadLibrary.ConditionVariableSUBCLASS_TYPE_MISMATCH
    org.jruby.libraries.ThreadLibrary.Mutexorg.jruby.libraries.ThreadLibrary.ConditionVariableSUBCLASS_TYPE_MISMATCH
    1
    ConditionVariable result = new ConditionVariable(context.getRuntime(), (RubyClass)recv);
    2
    result.callInit(args, block);
    2
    result.callInit(args, block);
    2
    result.callInit(args, block);
    Differences
    Expression1Expression2Difference
    org.jruby.libraries.ThreadLibrary.Mutexorg.jruby.libraries.ThreadLibrary.ConditionVariableSUBCLASS_TYPE_MISMATCH
    2
    result.callInit(args, block);
    3
    return result;
    3
    return result;
    3
    return result;
    Differences
    Expression1Expression2Difference
    org.jruby.libraries.ThreadLibrary.Mutexorg.jruby.libraries.ThreadLibrary.ConditionVariableSUBCLASS_TYPE_MISMATCH
    3
    return result;
    Precondition Violations (0)
    Row Violation