CloneSet1109


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
25220.988statement_sequence[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
125426
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMNode.java
221454
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMNode.java
Clone Instance
1
Line Count
25
Source Line
426
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMNode.java

        DOMNode clone = newDOMNode();
        clone.shareContents(this );
        clone.fDocument = buffer;

        if (offset > 0) {
                clone.offset(0 - offset);
        }

        // clone my children
        if (canHaveChildren()) {
                Enumeration children = getChildren();
                while (children.hasMoreElements()) {
                        DOMNode child = (DOMNode) children.nextElement();
                        if (child.fDocument == fDocument) {
                                DOMNode childClone = child.cloneSharingDocument(buffer, offset);
                                clone.basicAddChild(childClone);
                        }
                        else   {
                                DOMNode childClone = (DOMNode) child.clone();
                                clone.addChild(childClone);
                        }
                }
        }

        return clone;


Clone Instance
2
Line Count
21
Source Line
454
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMNode.java

        DOMNode clone = newDOMNode();
        clone.shareContents(this );
        clone.fDocument = document;
        if (rootOffset > 0) {
                clone.offset(0 - rootOffset);
        }

        if (canHaveChildren()) {
                Enumeration children = getChildren();
                while (children.hasMoreElements()) {
                        DOMNode child = (DOMNode) children.nextElement();
                        if (child.fDocument == fDocument) {
                                DOMNode childClone = child.cloneSharingDocument(document, rootOffset);
                                clone.basicAddChild(childClone);
                        }
                        else   {
                                DOMNode childClone = (DOMNode) child.clone();
                                clone.addChild(childClone);
                        }
                }
        }
        return clone;


Clone AbstractionParameter Count: 2Parameter Bindings

DOMNode clone = newDOMNode();
clone.shareContents(this );
clone.fDocument = [[#variablebcc899a0]];
if ( [[#variablebcc88a60]] > 0) {
  clone.offset(0 -  [[#variablebcc88a60]]);
}
// clone my children
if (canHaveChildren()) {
  Enumeration children = getChildren();
  while (children.hasMoreElements()) {
    DOMNode child = (DOMNode) children.nextElement();
    if (child.fDocument == fDocument) {
      DOMNode childClone = child.cloneSharingDocument( [[#variablebcc899a0]],  [[#variablebcc88a60]]);
      clone.basicAddChild(childClone);
    }
    else {
      DOMNode childClone = (DOMNode) child.clone();
      clone.addChild(childClone);
    }
  }
}
return clone;
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#bcc899a0]]
buffer 
12[[#bcc899a0]]
document 
21[[#bcc88a60]]
offset 
22[[#bcc88a60]]
rootOffset