File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Manifest.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Manifest.java | |||
Method name: Object clone()
|
Method name: void write(PrintWriter)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | while (e.hasMoreElements()) {↵ | 1 | while (e.hasMoreElements()) {↵ | |
2 | String key = (String) e.nextElement();↵ | 2 | String key = (String) e.nextElement();↵ | |
3 | Attribute attribute = getAttribute(key);↵ | 3 | Attribute attribute = getAttribute(key);↵ | |
4 | cloned.storeAttribute(new Attribute(attribute.getName(),↵ | 4 | ↵ | |
5 | attribute.getValue()));↵ | 5 | attribute.write(writer);↵ | |
6 | } | 6 |
| |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
Number of mapped statements | 3 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
4 | while (e.hasMoreElements()) | 5 | while (e.hasMoreElements()) | ||||
5 | String key = (String)e.nextElement(); | 6 | String key = (String)e.nextElement(); | ||||
6 | Attribute attribute = getAttribute(key); | 7 | Attribute attribute = getAttribute(key); | ||||
7 | cloned.storeAttribute(new Attribute(attribute.getName(), attribute.getValue())); |
| | ||||
|
| 8 | attribute.write(writer); |
Row | Violation |
---|---|
1 | Unmatched statement cloned.storeAttribute(new Attribute(attribute.getName(),attribute.getValue())); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement attribute.write(writer); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |