RubyClass result = runtime.defineClass("JRubyObjectInputStream",runtime.getObject(),JROIS_ALLOCATOR); result.defineAnnotatedMethods(JRubyObjectInputStream.class); return result;
RubyClass noMethodErrorClass = runtime.defineClass("NoMethodError", nameErrorClass, NOMETHODERROR_ALLOCATOR); noMethodErrorClass.defineAnnotatedMethods(RubyNoMethodError.class); return noMethodErrorClass;
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/util/io/JRubyObjectInputStream.java File path: /jruby-1.4.0/src/org/jruby/RubyNoMethodError.java
Method name: RubyClass createJRubyObjectInputStream(Ruby) Method name: RubyClass createNoMethodErrorClass(Ruby, RubyClass)
Number of AST nodes: 3 Number of AST nodes: 3
1
RubyClass result = runtime.defineClass("JRubyObjectInputStream",runtime.getObject(),JROIS_ALLOCATOR);
1
RubyClass noMethodErrorClass = runtime.defineClass("
2
	result
2
NoMethodError", nameErrorClass, NOMETHODERROR_ALLOCATOR);
3
        
3
.defineAnnotatedMethods(JRubyObjectInputStream.class);
4
        noMethodErrorClass.defineAnnotatedMethods(Ruby
4
	return result
5
NoMethodError.class);
5
;
6
        return noMethodErrorClass;
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 different classes having the same super class
Number of node comparisons9
  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
    RubyClass result = runtime.defineClass("JRubyObjectInputStream", runtime.getObject(), JROIS_ALLOCATOR);
    1
    RubyClass result = runtime.defineClass("JRubyObjectInputStream", runtime.getObject(), JROIS_ALLOCATOR);
    1
    RubyClass noMethodErrorClass = runtime.defineClass("NoMethodError", nameErrorClass, NOMETHODERROR_ALLOCATOR);
    Differences
    Expression1Expression2Difference
    resultnoMethodErrorClassVARIABLE_NAME_MISMATCH
    "JRubyObjectInputStream""NoMethodError"LITERAL_VALUE_MISMATCH
    runtime.getObject()nameErrorClassTYPE_COMPATIBLE_REPLACEMENT
    JROIS_ALLOCATORNOMETHODERROR_ALLOCATORVARIABLE_NAME_MISMATCH
    1
    RubyClass noMethodErrorClass = runtime.defineClass("NoMethodError", nameErrorClass, NOMETHODERROR_ALLOCATOR);
    2
    result.defineAnnotatedMethods(JRubyObjectInputStream.class);
    2
    result.defineAnnotatedMethods(JRubyObjectInputStream.class);
    2
    noMethodErrorClass.defineAnnotatedMethods(RubyNoMethodError.class);
    Differences
    Expression1Expression2Difference
    resultnoMethodErrorClassVARIABLE_NAME_MISMATCH
    2
    noMethodErrorClass.defineAnnotatedMethods(RubyNoMethodError.class);
    3
    return result;
    3
    return result;
    3
    return noMethodErrorClass;
    Differences
    Expression1Expression2Difference
    resultnoMethodErrorClassVARIABLE_NAME_MISMATCH
    3
    return noMethodErrorClass;
    Precondition Violations (0)
    Row Violation