RubyClass result = runtime.defineClass("JRubyObjectInputStream",runtime.getObject(),JROIS_ALLOCATOR); result.defineAnnotatedMethods(JRubyObjectInputStream.class); return result;
RubyClass systemExitClass = runtime.defineClass("SystemExit", exceptionClass, SYSTEMEXIT_ALLOCATOR); systemExitClass.defineAnnotatedMethods(RubySystemExit.class); return systemExitClass;
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/RubySystemExit.java
Method name: RubyClass createJRubyObjectInputStream(Ruby) Method name: RubyClass createSystemExitClass(Ruby, RubyClass)
Number of AST nodes: 3 Number of AST nodes: 3
1
RubyClass result = runtime.defineClass("JRubyObjectInputStream",runtime.getObject(),JROIS_ALLOCATOR);
1
RubyClass systemExitClass = runtime.defineClass("
2
	result
2
SystemExit", exceptionClass, SYSTEMEXIT_ALLOCATOR);
3
.defineAnnotatedMethods(JRubyObjectInputStream.class);
3
        systemExitClass.defineAnnotatedMethods(Ruby
4
	return result
4
SystemExit.class);
5
        
5
;
6
        return systemExitClass;
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 systemExitClass = runtime.defineClass("SystemExit", exceptionClass, SYSTEMEXIT_ALLOCATOR);
    Differences
    Expression1Expression2Difference
    resultsystemExitClassVARIABLE_NAME_MISMATCH
    "JRubyObjectInputStream""SystemExit"LITERAL_VALUE_MISMATCH
    runtime.getObject()exceptionClassTYPE_COMPATIBLE_REPLACEMENT
    JROIS_ALLOCATORSYSTEMEXIT_ALLOCATORVARIABLE_NAME_MISMATCH
    1
    RubyClass systemExitClass = runtime.defineClass("SystemExit", exceptionClass, SYSTEMEXIT_ALLOCATOR);
    2
    result.defineAnnotatedMethods(JRubyObjectInputStream.class);
    2
    result.defineAnnotatedMethods(JRubyObjectInputStream.class);
    2
    systemExitClass.defineAnnotatedMethods(RubySystemExit.class);
    Differences
    Expression1Expression2Difference
    resultsystemExitClassVARIABLE_NAME_MISMATCH
    2
    systemExitClass.defineAnnotatedMethods(RubySystemExit.class);
    3
    return result;
    3
    return result;
    3
    return systemExitClass;
    Differences
    Expression1Expression2Difference
    resultsystemExitClassVARIABLE_NAME_MISMATCH
    3
    return systemExitClass;
    Precondition Violations (0)
    Row Violation