RubyClass nameErrorClass = runtime.defineClass("LocalJumpError", standardErrorClass, LOCALJUMPERROR_ALLOCATOR); nameErrorClass.defineAnnotatedMethods(RubyLocalJumpError.class); return nameErrorClass;
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/RubyLocalJumpError.java File path: /jruby-1.4.0/src/org/jruby/RubySystemExit.java
Method name: RubyClass createLocalJumpErrorClass(Ruby, RubyClass) Method name: RubyClass createSystemExitClass(Ruby, RubyClass)
Number of AST nodes: 3 Number of AST nodes: 3
1
RubyClass nameErrorClass = runtime.defineClass("LocalJumpError", standardErrorClass, LOCALJUMPERROR_ALLOCATOR);
1
RubyClass systemExitClass = runtime.defineClass("SystemExit", exceptionClass, SYSTEMEXIT_ALLOCATOR);
2
        
3
        nameErrorClass.defineAnnotatedMethods(RubyLocalJumpError.class);
2
        systemExitClass.defineAnnotatedMethods(RubySystemExit.class);
3
        
4
        return nameErrorClass;
4
        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 nameErrorClass = runtime.defineClass("LocalJumpError", standardErrorClass, LOCALJUMPERROR_ALLOCATOR);
    1
    RubyClass nameErrorClass = runtime.defineClass("LocalJumpError", standardErrorClass, LOCALJUMPERROR_ALLOCATOR);
    1
    RubyClass systemExitClass = runtime.defineClass("SystemExit", exceptionClass, SYSTEMEXIT_ALLOCATOR);
    Differences
    Expression1Expression2Difference
    nameErrorClasssystemExitClassVARIABLE_NAME_MISMATCH
    "LocalJumpError""SystemExit"LITERAL_VALUE_MISMATCH
    standardErrorClassexceptionClassVARIABLE_NAME_MISMATCH
    LOCALJUMPERROR_ALLOCATORSYSTEMEXIT_ALLOCATORVARIABLE_NAME_MISMATCH
    1
    RubyClass systemExitClass = runtime.defineClass("SystemExit", exceptionClass, SYSTEMEXIT_ALLOCATOR);
    2
    nameErrorClass.defineAnnotatedMethods(RubyLocalJumpError.class);
    2
    nameErrorClass.defineAnnotatedMethods(RubyLocalJumpError.class);
    2
    systemExitClass.defineAnnotatedMethods(RubySystemExit.class);
    Differences
    Expression1Expression2Difference
    nameErrorClasssystemExitClassVARIABLE_NAME_MISMATCH
    2
    systemExitClass.defineAnnotatedMethods(RubySystemExit.class);
    3
    return nameErrorClass;
    3
    return nameErrorClass;
    3
    return systemExitClass;
    Differences
    Expression1Expression2Difference
    nameErrorClasssystemExitClassVARIABLE_NAME_MISMATCH
    3
    return systemExitClass;
    Precondition Violations (0)
    Row Violation