File path: /apache-ant-1.7.0/src/org/apache/tools/ant/RuntimeConfigurable.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/UnknownElement.java | |||
Method name: void applyPreSet(RuntimeConfigurable)
|
Method name: void applyPreSet(UnknownElement)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (r.children != null) {↵ | 1 | if (u.children != null) {↵ | |
2 | List newChildren = new ArrayList();↵ | 2 | List newChildren = new ArrayList();↵ | |
3 | newChildren.addAll(r.children);↵ | 3 | newChildren.addAll(u.children);↵ | |
4 | if (children != null) {↵ | 4 | if (children != null) {↵ | |
5 | newChildren.addAll(children);↵ | 5 | newChildren.addAll(children);↵ | |
6 | }↵ | 6 | }↵ | |
7 | children = newChildren;↵ | 7 | children = newChildren;↵ | |
8 | } | 8 |
| |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 20 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 3.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | if (r.children != null) |
| 4 | if (u.children != null) | ||||||||||||||||
8 | List newChildren = new ArrayList(); | 5 | List newChildren = new ArrayList(); | |||||||||||||||||
9 | newChildren.addAll(r.children); |
| 6 | newChildren.addAll(u.children); | ||||||||||||||||
10 | if (children != null) | 7 | if (children != null) | |||||||||||||||||
11 | newChildren.addAll(children); | 8 | newChildren.addAll(children); | |||||||||||||||||
12 | children = newChildren; | 9 | children = newChildren; |
Row | Violation |
---|---|
1 | Type java.util.List of variable r.children does not match with type java.util.List of variable u.children |
2 | Expression r.children cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression u.children cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type java.util.List of variable r.children does not match with type java.util.List of variable u.children |
5 | The refactoring of the clones is infeasible, because classes org.apache.tools.ant.RuntimeConfigurable and org.apache.tools.ant.UnknownElement do not have a common superclass |