for (Node asgn : multipleAsgnNode.getHeadNode().childNodes()) { if (asgn instanceof ListNode) { normalAssigns = false; break; } }
for (Node asgn : multipleAsgn19Node.getPre().childNodes()) { if (asgn instanceof ListNode) { normalAssigns = false; break; } }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/compiler/ASTCompiler.java File path: /jruby-1.4.0/src/org/jruby/compiler/ASTCompiler19.java
Method name: void compileOptimizedMultipleAsgn(MultipleAsgnNode, BodyCompiler, boolean) Method name: void compileOptimizedMultipleAsgn19(MultipleAsgn19Node, BodyCompiler, boolean)
Number of AST nodes: 4 Number of AST nodes: 4
1
for (Node asgn : multipleAsgnNode.getHeadNode().childNodes()) {
1
for (Node asgn : multipleAsgn19Node.getPre().childNodes()) {
2
                        if (asgn instanceof ListNode) {
2
                        if (asgn instanceof ListNode) {
3
                            normalAssigns = false;
3
                            normalAssigns = false;
4
                            break;
4
                            break;
5
                        }
5
                        }
6
                    }
6
                    }
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.5
Clones locationClones are in different classes having the same super class
Number of node comparisons11
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    for (Node asgn : multipleAsgnNode.getHeadNode().childNodes())
    5
    for (Node asgn : multipleAsgnNode.getHeadNode().childNodes())
    5
    for (Node asgn : multipleAsgn19Node.getPre().childNodes())
    Differences
    Expression1Expression2Difference
    getHeadNodegetPreMETHOD_INVOCATION_NAME_MISMATCH
    multipleAsgnNodemultipleAsgn19NodeVARIABLE_NAME_MISMATCH
    org.jruby.ast.MultipleAsgnNodeorg.jruby.ast.MultipleAsgn19NodeSUBCLASS_TYPE_MISMATCH
    5
    for (Node asgn : multipleAsgn19Node.getPre().childNodes())
    6
    if (asgn instanceof ListNode)
    6
    if (asgn instanceof ListNode)
    7
    normalAssigns = false;
    7
    normalAssigns = false;
    8
    break;
    8
    break;
    Precondition Violations (0)
    Row Violation