IRubyObject digest = getDigestStringNoClone(); reset(); return digest;
RubyArray ary = to_a(); ary.callMethod(context, "flatten!", level); return ary;
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/RubyDigest.java File path: /jruby-1.4.0/src/org/jruby/RubyHash.java
Method name: IRubyObject digest_bang() Method name: IRubyObject flatten(ThreadContext, IRubyObject)
Number of AST nodes: 3 Number of AST nodes: 3
1
IRubyObject digest = getDigestStringNoClone();
1
Ruby
2
            reset(
2
Array ary = to_a();
3
);
3
        ary.callMethod(context, "flatten!", level);
4
            return digest;
4
        return ary;
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 statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                    
    1
    RubyArray ary = to_a();
    1
    IRubyObject digest = getDigestStringNoClone();
                                                                                                  
    2
    reset();
    2
    reset();
    2
    ary.callMethod(context, "flatten!", level);
    Differences
    Expression1Expression2Difference
    resetcallMethodMETHOD_INVOCATION_NAME_MISMATCH
    reset()ary.callMethod(context,"flatten!",level)ARGUMENT_NUMBER_MISMATCH
    aryMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression ary.callMethod(context,"flatten!",level) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2
    ary.callMethod(context, "flatten!", level);
                                
    3
    return ary;
    Preondition Violations
    Unmatched return ary;
    3
    return ary;
    3
    return digest;
    3
    return digest;
    Preondition Violations
    Unmatched return digest;
                                      
    Precondition Violations (3)
    Row Violation
    1Expression ary.callMethod(context,"flatten!",level) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Unmatched return ary;
    3Unmatched return digest;