File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/DOMElementWriter.java | |||
Method name: Collection executeOrQueue(Enumeration, boolean)
|
Method name: void addNSDefinition(Element, String)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 5 | |||
1 | ForkedTestConfiguration c =↵ | |||
2 | new ForkedTestConfiguration(test);↵ | |||
3 | List l = (List) testConfigurations.get(c);↵ | 1 | ArrayList al = (ArrayList) ↵ | |
4 | ↵ | 2 | nsURIByElement.get(element);↵ | |
5 | if (l == null) {↵ | 3 | if (al == null) {↵ | |
6 | l = new ArrayList();↵ | 4 | al = new ArrayList();↵ | |
7 | testConfigurations.put(c, l);↵ | 5 | nsURIByElement.put(element, al);↵ | |
8 | }↵ | 6 | }↵ | |
9 | l.add(test); | 7 | al.add(uri); | |
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 different classes |
Number of node comparisons | 15 |
Number of mapped statements | 3 |
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) | 1.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | ArrayList al = (ArrayList)nsURIByElement.get(element); | |||||||||||||||||||||||
7 | ForkedTestConfiguration c = new ForkedTestConfiguration(test); |
| | ||||||||||||||||||||||
8 | List l = (List)testConfigurations.get(c); |
| | ||||||||||||||||||||||
9 | if (l == null) |
| 2 | if (al == null) | |||||||||||||||||||||
|
| 3 | al = new ArrayList(); | ||||||||||||||||||||||
10 | l = new ArrayList(); |
| | ||||||||||||||||||||||
11 | testConfigurations.put(c, l); |
| 4 | nsURIByElement.put(element, al); | |||||||||||||||||||||
12 | l.add(test); |
| 5 | al.add(uri); |
Row | Violation |
---|---|
1 | Unmatched statement ForkedTestConfiguration c=new ForkedTestConfiguration(test); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement List l=(List)testConfigurations.get(c); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type java.util.List of variable l does not match with type java.util.ArrayList of variable al |
4 | Unmatched statement al=new ArrayList(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement l=new ArrayList(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Type org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.ForkedTestConfiguration of variable c does not match with type org.w3c.dom.Element of variable element |
7 | Type java.util.Map of variable testConfigurations does not match with type java.util.HashMap of variable nsURIByElement |
8 | Type org.apache.tools.ant.taskdefs.optional.junit.JUnitTest of variable test does not match with type java.lang.String of variable uri |
9 | Type java.util.List of variable l does not match with type java.util.ArrayList of variable al |