RubyException exception = (RubyException)clone; exception.backtraceFrames = backtraceFrames; exception.javaStackTrace = javaStackTrace; exception.backtrace = backtrace; exception.message = message;
RubyRange range = (RubyRange)clone; range.begin = begin; range.end = end; range.isExclusive = isExclusive;
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/RubyException.java File path: /jruby-1.4.0/src/org/jruby/RubyRange.java
Method name: void copySpecialInstanceVariables(IRubyObject) Method name: void copySpecialInstanceVariables(IRubyObject)
Number of AST nodes: 5 Number of AST nodes: 4
1
RubyException exception = (RubyException)clone;
1
Ruby
2
        exception.backtraceFrames = backtraceFrames;
3
        exception.javaStackTrace = javaStackTrace;
4
        exception.backtrace = backtrace;
5
        exception.message = messag
2
Range range = (RubyRange)clone;
3
        range.begin = begin;
4
        range.end = end;
6
e;
5
        range.isExclusive = isExclusive;
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 comparisons20
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    RubyException exception = (RubyException)clone;
    1
    RubyException exception = (RubyException)clone;
    1
    RubyRange range = (RubyRange)clone;
    Differences
    Expression1Expression2Difference
    org.jruby.RubyExceptionorg.jruby.RubyRangeSUBCLASS_TYPE_MISMATCH
    exceptionrangeVARIABLE_NAME_MISMATCH
    org.jruby.RubyExceptionorg.jruby.RubyRangeSUBCLASS_TYPE_MISMATCH
    org.jruby.RubyExceptionorg.jruby.RubyRangeSUBCLASS_TYPE_MISMATCH
    1
    RubyRange range = (RubyRange)clone;
    2
    exception.backtraceFrames = backtraceFrames;
                                                                                              
    3
    exception.javaStackTrace = javaStackTrace;
                                                                                          
    4
    exception.backtrace = backtrace;
    4
    exception.backtrace = backtrace;
    2
    range.begin = begin;
    Differences
    Expression1Expression2Difference
    exceptionrangeVARIABLE_NAME_MISMATCH
    org.jruby.RubyExceptionorg.jruby.RubyRangeSUBCLASS_TYPE_MISMATCH
    backtracebeginVARIABLE_NAME_MISMATCH
    backtracebeginVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression exception.backtrace cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression range.begin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2
    range.begin = begin;
    5
    exception.message = message;
    5
    exception.message = message;
    3
    range.end = end;
    Differences
    Expression1Expression2Difference
    exceptionrangeVARIABLE_NAME_MISMATCH
    org.jruby.RubyExceptionorg.jruby.RubyRangeSUBCLASS_TYPE_MISMATCH
    messageendVARIABLE_NAME_MISMATCH
    messageendVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression exception.message cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression range.end cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    range.end = end;
                                                                      
    4
    range.isExclusive = isExclusive;
    Precondition Violations (5)
    Row Violation
    1Expression exception.backtrace cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression range.begin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression exception.message cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression range.end cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Clone fragment #1 returns variable exception with type org.jruby.RubyException , while Clone fragment #2 returns variable range with type org.jruby.RubyRange