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: void write(PrintWriter)
|
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 sectionName = (String) e.nextElement();↵ | 2 | String key = (String) e.nextElement();↵ | |
3 | Section section = getSection(sectionName);↵ | 3 | Attribute attribute = getAttribute(key);↵ | |
4 | section.write(writer);↵ | 4 | attribute.write(writer);↵ | |
5 | } | 5 | } | |
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 in the same java file |
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 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | while (e.hasMoreElements()) | 5 | while (e.hasMoreElements()) | |||||||||||||||
13 | String sectionName = (String)e.nextElement(); |
| 6 | String key = (String)e.nextElement(); | ||||||||||||||
|
| 7 | Attribute attribute = getAttribute(key); | |||||||||||||||
14 | Section section = getSection(sectionName); |
| | |||||||||||||||
15 | section.write(writer); |
| 8 | attribute.write(writer); |
Row | Violation |
---|---|
1 | Unmatched statement Attribute attribute=getAttribute(key); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement Section section=getSection(sectionName); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type org.apache.tools.ant.taskdefs.Manifest.Section of variable section does not match with type org.apache.tools.ant.taskdefs.Manifest.Attribute of variable attribute |