if (currentLoopLabels != null) { value.call(this); issueLoopBreak(); } else { loadThreadContext(); value.call(this); invokeUtilityMethod("breakJump", sig(IRubyObject.class, ThreadContext.class, IRubyObject.class)); }
if (currentLoopLabels != null) { value.call(this); issueLoopNext(); } else { value.call(this); invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class)); }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/compiler/impl/ChildScopedBodyCompiler.java File path: /jruby-1.4.0/src/org/jruby/compiler/impl/ChildScopedBodyCompiler.java
Method name: void issueBreakEvent(CompilerCallback) Method name: void issueNextEvent(CompilerCallback)
Number of AST nodes: 6 Number of AST nodes: 5
1
if (currentLoopLabels != null) {
1
if (currentLoopLabels != null) {
2
            value.call(this);
2
            value.call(this);
3
            issueLoopBreak();
3
            issueLoopNext();
4
        } else {
4
        } else {
5
            loadThreadContext();
6
            value.call(this);
5
            value.call(this);
7
            invokeUtilityMethod("breakJump", sig(IRubyObject.class, ThreadContext.class, IRubyObject.class));
6
            invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class));
8
        }
7
        }
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.2
Clones locationClones are declared in the same class
Number of node comparisons30
  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)2.2
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (currentLoopLabels != null)
    1
    if (currentLoopLabels != null)
    2
    value.call(this);
    2
    value.call(this);
    3
    issueLoopBreak();
    3
    issueLoopBreak();
    3
    issueLoopNext();
    Differences
    Expression1Expression2Difference
    issueLoopBreakissueLoopNextMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression issueLoopBreak() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression issueLoopNext() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression issueLoopBreak() is a void method call, and thus it cannot be parameterized
    Expression issueLoopNext() is a void method call, and thus it cannot be parameterized
    3
    issueLoopNext();
    else
    else
    4
    loadThreadContext();
                                                  
    5
    value.call(this);
    4
    value.call(this);
    6
    invokeUtilityMethod("breakJump", sig(IRubyObject.class, ThreadContext.class, IRubyObject.class));
    6
    invokeUtilityMethod("breakJump", sig(IRubyObject.class, ThreadContext.class, IRubyObject.class));
    5
    invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class));
    Differences
    Expression1Expression2Difference
    "breakJump""nextJump"LITERAL_VALUE_MISMATCH
    sig(IRubyObject.class,ThreadContext.class,IRubyObject.class)sig(IRubyObject.class,IRubyObject.class)ARGUMENT_NUMBER_MISMATCH
    5
    invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class));
    Precondition Violations (4)
    Row Violation
    1Expression issueLoopBreak() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression issueLoopNext() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression issueLoopBreak() is a void method call, and thus it cannot be parameterized
    4Expression issueLoopNext() is a void method call, and thus it cannot be parameterized