File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/Assertions.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/Assertions.java | |||
Method name: void applyAssertions(List)
|
Method name: void applyAssertions(ListIterator)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | while (it.hasNext()) {↵ | 1 | while (it.hasNext()) {↵ | |
2 | BaseAssertion assertion = (BaseAssertion) it.next();↵ | 2 | BaseAssertion assertion = (BaseAssertion) it.next();↵ | |
3 | String arg = assertion.toCommand();↵ | 3 | String arg = assertion.toCommand();↵ | |
4 | getProject().log("adding assertion " + arg, Project.MSG_DEBUG);↵ | 4 | getProject().log("adding assertion " + arg, Project.MSG_DEBUG);↵ | |
5 | commandList.add(arg);↵ | 5 | commandIterator.add(arg);↵ | |
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 | 25 |
Number of mapped statements | 4 |
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) | 6.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
10 | while (it.hasNext()) | 10 | while (it.hasNext()) | ||||
11 | BaseAssertion assertion = (BaseAssertion)it.next(); | 11 | BaseAssertion assertion = (BaseAssertion)it.next(); | ||||
12 | String arg = assertion.toCommand(); | 12 | String arg = assertion.toCommand(); | ||||
13 | getProject().log("adding assertion " + arg, Project.MSG_DEBUG); | 13 | getProject().log("adding assertion " + arg, Project.MSG_DEBUG); | ||||
|
| 14 | commandIterator.add(arg); | ||||
14 | commandList.add(arg); |
| |
Row | Violation |
---|---|
1 | Unmatched statement commandIterator.add(arg); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement commandList.add(arg); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |