if (moduleNode.getBodyNode() != null) { compile(moduleNode.getBodyNode(), context,true); } context.loadNil();
if (untilNode.getBodyNode() != null) { compile(untilNode.getBodyNode(), context, true); }
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/ASTCompiler.java
Method name: void call(BodyCompiler) Method name: void branch(BodyCompiler)
Number of AST nodes: 3 Number of AST nodes: 2
1
if (moduleNode.getBodyNode() != null) {
1
if (untilNode.getBodyNode() != null) {
2
                            compile(moduleNode.getBodyNode(), context,true);
2
                        compile(untilNode.getBodyNode(), context, true);
3
                        }
3
                    
4
                        context.loadNil();
4
}
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 the same java file
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.9
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (moduleNode.getBodyNode() != null)
    1
    if (moduleNode.getBodyNode() != null)
    1
    if (untilNode.getBodyNode() != null)
    Differences
    Expression1Expression2Difference
    moduleNodeuntilNodeVARIABLE_NAME_MISMATCH
    org.jruby.ast.ModuleNodeorg.jruby.ast.UntilNodeSUBCLASS_TYPE_MISMATCH
    moduleNodeuntilNodeVARIABLE_NAME_MISMATCH
    org.jruby.ast.ModuleNodeorg.jruby.ast.UntilNodeSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression moduleNode cannot be unified with expression untilNode , because common superclass org.jruby.ast.Node does not declare member(s) public org.jruby.ast.Node getBodyNode()
    Expression moduleNode cannot be unified with expression untilNode , because common superclass org.jruby.ast.Node does not declare member(s) public org.jruby.ast.Node getBodyNode()
    1
    if (untilNode.getBodyNode() != null)
    2
    compile(moduleNode.getBodyNode(), context, true);
    2
    compile(moduleNode.getBodyNode(), context, true);
    2
    compile(untilNode.getBodyNode(), context, true);
    Differences
    Expression1Expression2Difference
    moduleNodeuntilNodeVARIABLE_NAME_MISMATCH
    org.jruby.ast.ModuleNodeorg.jruby.ast.UntilNodeSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression moduleNode cannot be unified with expression untilNode , because common superclass org.jruby.ast.Node does not declare member(s) public org.jruby.ast.Node getBodyNode()
    2
    compile(untilNode.getBodyNode(), context, true);
    3
    context.loadNil();
    3
    context.loadNil();
    Preondition Violations
    Unmatched statement context.loadNil(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                              
    Precondition Violations (4)
    Row Violation
    1Expression moduleNode cannot be unified with expression untilNode , because common superclass org.jruby.ast.Node does not declare member(s) public org.jruby.ast.Node getBodyNode()
    2Expression moduleNode cannot be unified with expression untilNode , because common superclass org.jruby.ast.Node does not declare member(s) public org.jruby.ast.Node getBodyNode()
    3Expression moduleNode cannot be unified with expression untilNode , because common superclass org.jruby.ast.Node does not declare member(s) public org.jruby.ast.Node getBodyNode()
    4Unmatched statement context.loadNil(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted