final EvStrNode evStrNode = (EvStrNode) node; compile(evStrNode.getBody(), context,true); context.asString(); // TODO: don't require pop if (!expr) context.consumeCurrentValue();
SValueNode svalueNode = (SValueNode) node; compile(svalueNode.getValue(), context,true); context.singlifySplattedValue(); // TODO: don't require pop if (!expr) context.consumeCurrentValue();
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 compileEvStr(Node, BodyCompiler, boolean) Method name: void compileSValue(Node, BodyCompiler, boolean)
Number of AST nodes: 5 Number of AST nodes: 5
1
final EvStrNode evStrNode = (EvStrNode) node;
1
SValueNode svalueNode = (SValueNode) node;
2
        compile(evStrNode.getBody(), context,true);
2
        compile(svalueNode.getValue(), context,true);
3
        context.asString();
3
        context.singlifySplattedValue();
4
        // TODO: don't require pop
4
        // TODO: don't require pop
5
        if (!expr) context.consumeCurrentValue();
5
        if (!expr) context.consumeCurrentValue();
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.1
Clones locationClones are declared in the same class
Number of node comparisons13
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)6.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                        
    1
    SValueNode svalueNode = (SValueNode)node;
    1
    final EvStrNode evStrNode = (EvStrNode)node;
                                                                                              
    2
    compile(evStrNode.getBody(), context, true);
    2
    compile(evStrNode.getBody(), context, true);
    2
    compile(svalueNode.getValue(), context, true);
    Differences
    Expression1Expression2Difference
    getBodygetValueMETHOD_INVOCATION_NAME_MISMATCH
    evStrNodesvalueNodeVARIABLE_NAME_MISMATCH
    org.jruby.ast.EvStrNodeorg.jruby.ast.SValueNodeSUBCLASS_TYPE_MISMATCH
    2
    compile(svalueNode.getValue(), context, true);
    3
    context.asString();
    3
    context.asString();
    3
    context.singlifySplattedValue();
    Differences
    Expression1Expression2Difference
    asStringsinglifySplattedValueMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression context.asString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression context.singlifySplattedValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression context.asString() is a void method call, and thus it cannot be parameterized
    Expression context.singlifySplattedValue() is a void method call, and thus it cannot be parameterized
    3
    context.singlifySplattedValue();
    4
    if (!expr)
    4
    if (!expr)
    5
    context.consumeCurrentValue();
    5
    context.consumeCurrentValue();
    Precondition Violations (4)
    Row Violation
    1Expression context.asString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression context.singlifySplattedValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression context.asString() is a void method call, and thus it cannot be parameterized
    4Expression context.singlifySplattedValue() is a void method call, and thus it cannot be parameterized