File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/DOMUtils.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/DOMUtils.java | |||
Method name: void appendCDATA(Element, String)
|
Method name: void appendText(Element, String)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | Document doc = parent.getOwnerDocument();↵ | 1 | Document doc = parent.getOwnerDocument();↵ | |
2 | CDATASection c = doc.createCDATASection(content);↵ | 2 | Text t = doc.createTextNode(content);↵ | |
3 | parent.appendChild(c); | 3 | parent.appendChild(t); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Document doc = parent.getOwnerDocument(); | 1 | Document doc = parent.getOwnerDocument(); | |||||||||||||||
|
| 2 | Text t = doc.createTextNode(content); | |||||||||||||||
2 | CDATASection c = doc.createCDATASection(content); |
| | |||||||||||||||
3 | parent.appendChild(c); |
| 3 | parent.appendChild(t); |
Row | Violation |
---|---|
1 | Unmatched statement Text t=doc.createTextNode(content); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement CDATASection c=doc.createCDATASection(content); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type org.w3c.dom.CDATASection of variable c does not match with type org.w3c.dom.Text of variable t |