Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
17 | 2 | 3 | 0.974 | statement_sequence[4] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 17 | 352 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMNode.java |
2 | 17 | 676 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMNode.java |
| ||||
if (child.getParent() != null) { throw new DOMException(Messages.dom_addChildWithParent); } /* NOTE: To test if the child is an ancestor of this node, we * need only test if the root of this node is the child (the child * is already a root since we have just guarenteed it has no parent). */ if (child == getRoot()) { throw new DOMException(Messages.dom_addAncestorAsChild); } DOMNode node = (DOMNode) child; // if the child is not already part of this document, localize its contents // before adding it to the tree if (node.getDocument() != getDocument()) { node.localizeContents(); } |
| ||||
if (sibling.getParent() != null) { throw new DOMException(Messages.dom_addSiblingWithParent); } /* NOTE: To test if the sibling is an ancestor of this node, we * need only test if the root of this node is the child (the sibling * is already a root since we have just guaranteed it has no parent). */ if (sibling == getRoot()) { throw new DOMException(Messages.dom_addAncestorAsSibling); } DOMNode node = (DOMNode) sibling; // if the sibling is not already part of this document, localize its contents // before inserting it into the tree if (node.getDocument() != getDocument()) { node.localizeContents(); } |
| |||
if ( [[#variable99055000]].getParent() != null) { throw new DOMException(Messages. [[#variablea3570900]]); } /* NOTE: To test if the sibling is an ancestor of this node, we * need only test if the root of this node is the child (the sibling * is already a root since we have just guaranteed it has no parent). */ /* NOTE: To test if the child is an ancestor of this node, we * need only test if the root of this node is the child (the child * is already a root since we have just guarenteed it has no parent). */ if ( [[#variable99055000]]== getRoot()) { throw new DOMException(Messages. [[#variablea0520580]]); } DOMNode node = (DOMNode) [[#variable99055000]]; // if the sibling is not already part of this document, localize its contents // before inserting it into the tree // if the child is not already part of this document, localize its contents // before adding it to the tree if (node.getDocument() != getDocument()) { node.localizeContents(); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#99055000]] | sibling |
1 | 2 | [[#99055000]] | child |
2 | 1 | [[#a3570900]] | dom_addSiblingWithParent |
2 | 2 | [[#a3570900]] | dom_addChildWithParent |
3 | 1 | [[#a0520580]] | dom_addAncestorAsSibling |
3 | 2 | [[#a0520580]] | dom_addAncestorAsChild |