if (currentLoopLabels != null) { value.call(this); issueLoopNext(); } else if (inNestedMethod) { value.call(this); invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class)); } else { // in method body with no containing loop, issue jump error // load runtime and value, issue jump error loadRuntime(); value.call(this); invokeUtilityMethod("nextLocalJumpError", sig(IRubyObject.class, Ruby.class, IRubyObject.class)); }
if (currentLoopLabels != null) { value.call(this); issueLoopNext(); } else if (inNestedMethod) { value.call(this); invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class)); } else { // in method body with no containing loop, issue jump error // load runtime and value, issue jump error loadRuntime(); value.call(this); invokeUtilityMethod("nextLocalJumpError", sig(IRubyObject.class, Ruby.class, IRubyObject.class)); }
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/MethodBodyCompiler.java
Method name: void issueNextEvent(CompilerCallback) Method name: void issueNextEvent(CompilerCallback)
Number of AST nodes: 9 Number of AST nodes: 9
1
if (currentLoopLabels != null) {
1
if (currentLoopLabels != null) {
2
            value.call(this);
2
            value.call(this);
3
            issueLoopNext();
3
            issueLoopNext();
4
        } else if (inNestedMethod) {
4
        } else if (inNestedMethod) {
5
            value.call(this);
5
            value.call(this);
6
            invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class));
6
            invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class));
7
        } else {
7
        } else {
8
            // in method body with no containing loop, issue jump error
8
            // in method body with no containing loop, issue jump error
9
            // load runtime and value, issue jump error
9
            // load runtime and value, issue jump error
10
            loadRuntime();
10
            loadRuntime();
11
            value.call(this);
11
            value.call(this);
12
            invokeUtilityMethod("nextLocalJumpError", sig(IRubyObject.class, Ruby.class, IRubyObject.class));
12
            invokeUtilityMethod("nextLocalJumpError", sig(IRubyObject.class, Ruby.class, IRubyObject.class));
13
        }
13
        }
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons64
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.2
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    if (currentLoopLabels != null)
    1
    if (currentLoopLabels != null)
    2
    value.call(this);
    2
    value.call(this);
    3
    issueLoopNext();
    3
    issueLoopNext();
    4
    else if (inNestedMethod)
    4
    else if (inNestedMethod)
    5
    value.call(this);
    5
    value.call(this);
    6
    invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class));
    6
    invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class));
    else
    else
    7
    loadRuntime();
    7
    loadRuntime();
    8
    value.call(this);
    8
    value.call(this);
    9
    invokeUtilityMethod("nextLocalJumpError", sig(IRubyObject.class, Ruby.class, IRubyObject.class));
    9
    invokeUtilityMethod("nextLocalJumpError", sig(IRubyObject.class, Ruby.class, IRubyObject.class));
    Precondition Violations (0)
    Row Violation