if (currentLoopLabels != null) { issueLoopRedo(); } else if (inNestedMethod) { invokeUtilityMethod("redoJump", sig(IRubyObject.class)); } else { // in method body with no containing loop, issue jump error // load runtime and value, issue jump error loadRuntime(); invokeUtilityMethod("redoLocalJumpError", sig(IRubyObject.class, Ruby.class)); }
if (currentLoopLabels != null) { issueLoopRedo(); } else if (inNestedMethod) { invokeUtilityMethod("redoJump", sig(IRubyObject.class)); } else { // jump back to the top of the main body of this closure method.go_to(scopeStart); }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/compiler/impl/RootScopedBodyCompiler.java File path: /jruby-1.4.0/src/org/jruby/compiler/impl/ChildScopedBodyCompiler.java
Method name: void issueRedoEvent() Method name: void issueRedoEvent()
Number of AST nodes: 6 Number of AST nodes: 5
1
if (currentLoopLabels != null) {
1
if (currentLoopLabels != null) {
2
            issueLoopRedo();
2
            issueLoopRedo();
3
        } else if (inNestedMethod) {
3
        } else if (inNestedMethod) {
4
            invokeUtilityMethod("redoJump", sig(IRubyObject.class));
4
            invokeUtilityMethod("redoJump", sig(IRubyObject.class));
5
        } else {
5
        } else {
6
            // in method body with no containing loop, issue jump error
6
            // 
7
            // load runtime and value, issue jump error
8
            loadRuntime();
9
            invokeUtilityMethod("redoLocalJumpError", sig(IRubyObject.class, Ruby.class)
7
jump back to the top of the main body of this closure
10
);
8
            method.go_to(scopeStart);
11
        }
9
        }
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.3
Clones locationClones are in different classes having the same super class
Number of node comparisons23
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.7
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (currentLoopLabels != null)
    1
    if (currentLoopLabels != null)
    2
    issueLoopRedo();
    2
    issueLoopRedo();
    3
    else if (inNestedMethod)
    3
    else if (inNestedMethod)
    4
    invokeUtilityMethod("redoJump", sig(IRubyObject.class));
    4
    invokeUtilityMethod("redoJump", sig(IRubyObject.class));
    else
    else
    5
    loadRuntime();
    5
    loadRuntime();
    5
    method.go_to(scopeStart);
    Differences
    Expression1Expression2Difference
    loadRuntimego_toMETHOD_INVOCATION_NAME_MISMATCH
    loadRuntime()method.go_to(scopeStart)ARGUMENT_NUMBER_MISMATCH
    methodMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression loadRuntime() is a void method call, and thus it cannot be parameterized
    Expression method.go_to(scopeStart) is a void method call, and thus it cannot be parameterized
    Expression loadRuntime() is a void method call, and thus it cannot be parameterized
    Expression method.go_to(scopeStart) is a void method call, and thus it cannot be parameterized
    5
    method.go_to(scopeStart);
    6
    invokeUtilityMethod("redoLocalJumpError", sig(IRubyObject.class, Ruby.class));
                                                                                                                                                                  
    Precondition Violations (4)
    Row Violation
    1Expression loadRuntime() is a void method call, and thus it cannot be parameterized
    2Expression method.go_to(scopeStart) is a void method call, and thus it cannot be parameterized
    3Expression loadRuntime() is a void method call, and thus it cannot be parameterized
    4Expression method.go_to(scopeStart) is a void method call, and thus it cannot be parameterized