if (other instanceof RubyTime) { return getRuntime().newBoolean(cmp((RubyTime) other) <= 0); } return RubyComparable.op_le(context, this, other);
if (other instanceof RubyTime) { return getRuntime().newBoolean(cmp((RubyTime) other) < 0); } return RubyComparable.op_lt(context, this, other);
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/RubyTime.java File path: /jruby-1.4.0/src/org/jruby/RubyTime.java
Method name: IRubyObject op_le(ThreadContext, IRubyObject) Method name: IRubyObject op_lt(ThreadContext, IRubyObject)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (other instanceof RubyTime) {
1
if (other instanceof RubyTime) {
2
            return getRuntime().newBoolean(cmp((RubyTime) other) <= 0);
2
            return getRuntime().newBoolean(cmp((RubyTime) other) < 0);
3
        }
3
        }
4
        
4
        
5
        return RubyComparable.op_le(context, this, other);
5
        return RubyComparable.op_lt(context, this, other);
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.1
Clones locationClones are declared in the same class
Number of node comparisons5
  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)4478.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (other instanceof RubyTime)
    1
    if (other instanceof RubyTime)
                                                                                                                            
    2
    return getRuntime().newBoolean(cmp((RubyTime)other) < 0);
    Preondition Violations
    Unmatched statement return getRuntime().newBoolean(cmp((RubyTime)other) < 0); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched return getRuntime().newBoolean(cmp((RubyTime)other) < 0);
    2
    return getRuntime().newBoolean(cmp((RubyTime)other) < 0);
    2
    return getRuntime().newBoolean(cmp((RubyTime)other) <= 0);
    2
    return getRuntime().newBoolean(cmp((RubyTime)other) <= 0);
    Preondition Violations
    Unmatched statement return getRuntime().newBoolean(cmp((RubyTime)other) <= 0); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched return getRuntime().newBoolean(cmp((RubyTime)other) <= 0);
                                                                                                                              
    3
    return RubyComparable.op_le(context, this, other);
    3
    return RubyComparable.op_le(context, this, other);
    3
    return RubyComparable.op_lt(context, this, other);
    Differences
    Expression1Expression2Difference
    op_leop_ltMETHOD_INVOCATION_NAME_MISMATCH
    3
    return RubyComparable.op_lt(context, this, other);
    Precondition Violations (4)
    Row Violation
    1Unmatched statement return getRuntime().newBoolean(cmp((RubyTime)other) < 0); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched return getRuntime().newBoolean(cmp((RubyTime)other) < 0);
    3Unmatched statement return getRuntime().newBoolean(cmp((RubyTime)other) <= 0); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched return getRuntime().newBoolean(cmp((RubyTime)other) <= 0);