File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/extension/Extension.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/extension/Specification.java | |||
Method name: Extension[] getAvailable(Manifest)
|
Method name: Specification[] getSpecifications(Manifest)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | while (keys.hasNext()) {↵ | 1 | while (keys.hasNext()) {↵ | |
2 | final String key = (String) keys.next();↵ | 2 | final String key = (String) keys.next();↵ | |
3 | final Attributes attributes = (Attributes) entries.get(key);↵ | 3 | final Attributes attributes = (Attributes) entries.get(key);↵ | |
4 | final Extension extension = getExtens↵ | 4 | final Specification specification↵ | |
5 | ion("", attributes);↵ | 5 | = getSpecification(key, attributes);↵ | |
6 | if (null != extension) {↵ | 6 | if (null != specification) {↵ | |
7 | results.add(extension);↵ | 7 | results.add(specification);↵ | |
8 | }↵ | 8 | }↵ | |
9 | } | 9 |
| |
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 | 20 |
Number of mapped statements | 5 |
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.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11 | while (keys.hasNext()) | 6 | while (keys.hasNext()) | |||||||||||||||
12 | final String key = (String)keys.next(); | 7 | final String key = (String)keys.next(); | |||||||||||||||
13 | final Attributes attributes = (Attributes)entries.get(key); | 8 | final Attributes attributes = (Attributes)entries.get(key); | |||||||||||||||
|
| 9 | final Specification specification = getSpecification(key, attributes); | |||||||||||||||
14 | final Extension extension = getExtension("", attributes); |
| | |||||||||||||||
15 | if (null != extension) |
| 10 | if (null != specification) | ||||||||||||||
16 | results.add(extension); |
| 11 | results.add(specification); |
Row | Violation |
---|---|
1 | Unmatched statement final Specification specification=getSpecification(key,attributes); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement final Extension extension=getExtension("",attributes); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type org.apache.tools.ant.taskdefs.optional.extension.Extension of variable extension does not match with type org.apache.tools.ant.taskdefs.optional.extension.Specification of variable specification |
4 | Type org.apache.tools.ant.taskdefs.optional.extension.Extension of variable extension does not match with type org.apache.tools.ant.taskdefs.optional.extension.Specification of variable specification |
5 | Clone fragment #1 returns variables attributes , while Clone fragment #2 returns variables key, attributes |