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/helper/AntXMLContext.java | |||
Method name: Collection executeOrQueue(Enumeration, boolean)
|
Method name: void startPrefixMapping(String, 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 | List list = (List) ↵ | |
4 | ↵ | 2 | prefixMapping.get(prefix);↵ | |
5 | if (l == null) {↵ | 3 | if (list == null) {↵ | |
6 | l = new ArrayList();↵ | 4 | list = new ArrayList();↵ | |
7 | testConfigurations.put(c, l);↵ | 5 | ↵ | |
8 | ↵ | 6 | prefixMapping.put(prefix, list);↵ | |
9 | }↵ | 7 | }↵ | |
10 | l.add(test); | 8 | list.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 | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | ForkedTestConfiguration c = new ForkedTestConfiguration(test); |
| | ||||||||||||||||||||||
8 | List l = (List)testConfigurations.get(c); |
| 1 | List list = (List)prefixMapping.get(prefix); | |||||||||||||||||||||
9 | if (l == null) |
| 2 | if (list == null) | |||||||||||||||||||||
10 | l = new ArrayList(); |
| 3 | list = new ArrayList(); | |||||||||||||||||||||
11 | testConfigurations.put(c, l); |
| 4 | prefixMapping.put(prefix, list); | |||||||||||||||||||||
12 | l.add(test); |
| 5 | list.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 | Expression l cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.ForkedTestConfiguration of variable c does not match with type java.lang.String of variable prefix |
4 | Expression l cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression list cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression l cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression list cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.ForkedTestConfiguration of variable c does not match with type java.lang.String of variable prefix |
9 | Type org.apache.tools.ant.taskdefs.optional.junit.JUnitTest of variable test does not match with type java.lang.String of variable uri |
10 | Expression l cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression list cannot be parameterized, because it has dependencies to/from statements that will be extracted |