super(position); assert bodyNode != null : "bodyNode is not null"; this.bodyNode = bodyNode; this.ensureNode = ensureNode;
super(position); assert nextNode != null : "nextNode is not null"; this.nextNode = nextNode;
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/ast/EnsureNode.java File path: /jruby-1.4.0/src/org/jruby/ast/NewlineNode.java
Method name: void EnsureNode(ISourcePosition, Node, Node) Method name: void NewlineNode(ISourcePosition, Node)
Number of AST nodes: 4 Number of AST nodes: 3
1
super(position);
1
super(position);
2
        
3
        assert bodyNode != null : "bodyNode is not null";
2
        assert nextNode != null : "nextNode is not null";
4
        
3
        
5
        this.bodyNode = bodyNode;
4
        this.
6
        this.ensureNode = ensureNode;
5
nextNode = nextNode;
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons7
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    super(position);
    1
    super(position);
    2
    assert bodyNode != null : "bodyNode is not null";
    2
    assert bodyNode != null : "bodyNode is not null";
    2
    assert nextNode != null : "nextNode is not null";
    Differences
    Expression1Expression2Difference
    bodyNodenextNodeVARIABLE_NAME_MISMATCH
    "bodyNode is not null""nextNode is not null"LITERAL_VALUE_MISMATCH
    2
    assert nextNode != null : "nextNode is not null";
    3
    this.bodyNode = bodyNode;
    3
    this.bodyNode = bodyNode;
    3
    this.nextNode = nextNode;
    Differences
    Expression1Expression2Difference
    bodyNodenextNodeVARIABLE_NAME_MISMATCH
    bodyNodenextNodeVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.bodyNode is a field being modified, and thus it cannot be parameterized
    Expression this.nextNode is a field being modified, and thus it cannot be parameterized
    3
    this.nextNode = nextNode;
    4
    this.ensureNode = ensureNode;
                                                                
    Precondition Violations (2)
    Row Violation
    1Expression this.bodyNode is a field being modified, and thus it cannot be parameterized
    2Expression this.nextNode is a field being modified, and thus it cannot be parameterized