File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/j2ee/ServerDeploy.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/PropertyFile.java | |||
Method name: void execute()
|
Method name: void executeOperation()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 3 | |||
1 | for (Enumeration e = vendorTools.elements();↵ | 1 | for (Enumeration e = entries.elements();↵ | |
2 | e.hasMoreElements();) {↵ | 2 | e.hasMoreElements();) {↵ | |
3 | HotDeploymentTool tool = (HotDeploymentTool) e.nextElement();↵ | 3 | Entry entry = (Entry) e.nextElement();↵ | |
4 | tool.validateAttributes();↵ | 4 | ↵ | |
5 | tool.deploy();↵ | 5 | entry.executeOn(properties);↵ | |
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 12 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | for (Enumeration e = vendorTools.elements(); e.hasMoreElements(); ) |
| 1 | for (Enumeration e = entries.elements(); e.hasMoreElements(); ) | ||||||||||
|
| 2 | Entry entry = (Entry)e.nextElement(); | |||||||||||
2 | HotDeploymentTool tool = (HotDeploymentTool)e.nextElement(); |
| | |||||||||||
|
| 3 | entry.executeOn(properties); | |||||||||||
3 | tool.validateAttributes(); |
| | |||||||||||
4 | tool.deploy(); |
| |
Row | Violation |
---|---|
1 | Unmatched statement Entry entry=(Entry)e.nextElement(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement HotDeploymentTool tool=(HotDeploymentTool)e.nextElement(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement entry.executeOn(properties); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement tool.validateAttributes(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement tool.deploy(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |