while (iten.hasNext()) {
Tuple tuple = (Tuple) iten.next();
Element propElement = doc.createElement(PROPERTY);
propElement.setAttribute(ATTR_NAME, tuple.key);
propElement.setAttribute(ATTR_VALUE, tuple.value);
rootElement.appendChild(propElement);
}
while (e.hasMoreElements()) {
String name = (String) e.nextElement();
Element propElement = doc.createElement(PROPERTY);
propElement.setAttribute(ATTR_NAME, name);
propElement.setAttribute(ATTR_VALUE, props.getProperty(name));
propsElement.appendChild(propElement);
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/EchoProperties.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
|
Method name: void xmlSaveProperties(Properties, OutputStream)
|
|
Method name: void startTestSuite(JUnitTest)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | while (iten.hasNext()) {↵ | | 1 | while (e.hasMoreElements()) {↵
|
2 | Tuple tuple = (Tuple) iten.next();↵ | | 2 | String name = (String) e.nextElement();↵
|
3 | Element propElement = doc.createElement(PROPERTY);↵ | | 3 | Element propElement = doc.createElement(PROPERTY);↵
|
4 | propElement.setAttribute(ATTR_NAME, tuple.key);↵ | | 4 | propElement.setAttribute(ATTR_NAME, ↵
|
| | | 5 | name);↵
|
5 | propElement.setAttribute(ATTR_VALUE, tuple.value);↵ | | 6 | propElement.setAttribute(ATTR_VALUE, props.getProperty(name));↵
|
6 | rootElement.appendChild(propElement);↵ | | 7 | propsElement.appendChild(propElement);↵
|
7 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |