if (nextNode.getValueNode() != null) { compile(nextNode.getValueNode(), context,true); } else { context.loadNil(); }
if (breakNode.getValueNode() != null) { compile(breakNode.getValueNode(), context, true); } else { context.loadNil(); }
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 call(BodyCompiler)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (nextNode.getValueNode() != null) {
1
if (breakNode.getValueNode() != null) {
2
                            compile(nextNode.getValueNode(), context,true);
2
                            compile(breakNode.getValueNode(), context, true);
3
                        } else {
3
                        } else {
4
                            context.loadNil();
4
                            context.loadNil();
5
                        }
5
                        }
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.5
Clones locationClones are in the same java file
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)5.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (nextNode.getValueNode() != null)
    1
    if (nextNode.getValueNode() != null)
    1
    if (breakNode.getValueNode() != null)
    Differences
    Expression1Expression2Difference
    nextNodebreakNodeVARIABLE_NAME_MISMATCH
    org.jruby.ast.NextNodeorg.jruby.ast.BreakNodeSUBCLASS_TYPE_MISMATCH
    nextNodebreakNodeVARIABLE_NAME_MISMATCH
    org.jruby.ast.NextNodeorg.jruby.ast.BreakNodeSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression nextNode cannot be unified with expression breakNode , because common superclass org.jruby.ast.Node does not declare member(s) public org.jruby.ast.Node getValueNode()
    Expression nextNode cannot be unified with expression breakNode , because common superclass org.jruby.ast.Node does not declare member(s) public org.jruby.ast.Node getValueNode()
    1
    if (breakNode.getValueNode() != null)
    2
    compile(nextNode.getValueNode(), context, true);
    2
    compile(nextNode.getValueNode(), context, true);
    2
    compile(breakNode.getValueNode(), context, true);
    Differences
    Expression1Expression2Difference
    nextNodebreakNodeVARIABLE_NAME_MISMATCH
    org.jruby.ast.NextNodeorg.jruby.ast.BreakNodeSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression nextNode cannot be unified with expression breakNode , because common superclass org.jruby.ast.Node does not declare member(s) public org.jruby.ast.Node getValueNode()
    2
    compile(breakNode.getValueNode(), context, true);
    else
    else
    3
    context.loadNil();
    3
    context.loadNil();
    Precondition Violations (3)
    Row Violation
    1Expression nextNode cannot be unified with expression breakNode , because common superclass org.jruby.ast.Node does not declare member(s) public org.jruby.ast.Node getValueNode()
    2Expression nextNode cannot be unified with expression breakNode , because common superclass org.jruby.ast.Node does not declare member(s) public org.jruby.ast.Node getValueNode()
    3Expression nextNode cannot be unified with expression breakNode , because common superclass org.jruby.ast.Node does not declare member(s) public org.jruby.ast.Node getValueNode()