if (exception instanceof RaiseException) { throw (RaiseException) exception; } throw createRaiseException(exception, target);
if (e instanceof RaiseException) { throw (RaiseException) e; }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/javasupport/JavaSupport.java File path: /jruby-1.4.0/src/org/jruby/runtime/load/LoadService.java
Method name: void handleNativeException(Throwable, Member) Method name: void reraiseRaiseExceptions(Throwable)
Number of AST nodes: 3 Number of AST nodes: 2
1
if (exception instanceof RaiseException) {
1
if (e instanceof RaiseException) {
2
            throw (RaiseException) exception;
2
            throw (RaiseException) e;
3
        }
3
        }
4
        throw createRaiseException(exception, target);
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 in different classes
Number of node comparisons4
  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 fragment0
    Time elapsed for statement mapping (ms)0.4
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (exception instanceof RaiseException)
    1
    if (exception instanceof RaiseException)
    1
    if (e instanceof RaiseException)
    Differences
    Expression1Expression2Difference
    exceptioneVARIABLE_NAME_MISMATCH
    1
    if (e instanceof RaiseException)
    2
    throw (RaiseException)exception;
    2
    throw (RaiseException)exception;
    2
    throw (RaiseException)e;
    Differences
    Expression1Expression2Difference
    exceptioneVARIABLE_NAME_MISMATCH
    2
    throw (RaiseException)e;
    3
    throw createRaiseException(exception, target);
    3
    throw createRaiseException(exception, target);
    Preondition Violations
    Unmatched throw createRaiseException(exception,target);
                                                                                                    
    Precondition Violations (1)
    Row Violation
    1Unmatched throw createRaiseException(exception,target);