if (whileNode.getBodyNode() != null) { compile(whileNode.getBodyNode(), context, true); }
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 branch(BodyCompiler) Method name: void branch(BodyCompiler)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (whileNode.getBodyNode() != null) {
1
if (untilNode.getBodyNode() != null) {
2
                        compile(whileNode.getBodyNode(), context, true);
2
                        compile(untilNode.getBodyNode(), context, true);
3
                    }
3
                    }
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 fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (whileNode.getBodyNode() != null)
    1
    if (whileNode.getBodyNode() != null)
    1
    if (untilNode.getBodyNode() != null)
    Differences
    Expression1Expression2Difference
    whileNodeuntilNodeVARIABLE_NAME_MISMATCH
    org.jruby.ast.WhileNodeorg.jruby.ast.UntilNodeSUBCLASS_TYPE_MISMATCH
    whileNodeuntilNodeVARIABLE_NAME_MISMATCH
    org.jruby.ast.WhileNodeorg.jruby.ast.UntilNodeSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression whileNode 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 whileNode 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(whileNode.getBodyNode(), context, true);
    2
    compile(whileNode.getBodyNode(), context, true);
    2
    compile(untilNode.getBodyNode(), context, true);
    Differences
    Expression1Expression2Difference
    whileNodeuntilNodeVARIABLE_NAME_MISMATCH
    org.jruby.ast.WhileNodeorg.jruby.ast.UntilNodeSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression whileNode 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);
    Precondition Violations (3)
    Row Violation
    1Expression whileNode 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 whileNode 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 whileNode cannot be unified with expression untilNode , because common superclass org.jruby.ast.Node does not declare member(s) public org.jruby.ast.Node getBodyNode()