File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/extension/Specification.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/extension/Extension.java | |||
Method name: Specification[] getSpecifications(Manifest)
|
Method name: Extension[] getAvailable(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 Specification specification↵ | 4 | final ↵ | |
5 | = getSpecification(key, attributes);↵ | 5 | Extension extension = getExtension("", attributes);↵ | |
6 | if (null != specification) {↵ | 6 | if (null != extension) {↵ | |
7 | results.add(specification);↵ | 7 | results.add(extension);↵ | |
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.2 |
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.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | while (keys.hasNext()) | 11 | while (keys.hasNext()) | |||||||||||||||
7 | final String key = (String)keys.next(); | 12 | final String key = (String)keys.next(); | |||||||||||||||
8 | final Attributes attributes = (Attributes)entries.get(key); | 13 | final Attributes attributes = (Attributes)entries.get(key); | |||||||||||||||
9 | final Specification specification = getSpecification(key, attributes); |
| | |||||||||||||||
|
| 14 | final Extension extension = getExtension("", attributes); | |||||||||||||||
10 | if (null != specification) |
| 15 | if (null != extension) | ||||||||||||||
11 | results.add(specification); |
| 16 | results.add(extension); |
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.Specification of variable specification does not match with type org.apache.tools.ant.taskdefs.optional.extension.Extension of variable extension |
4 | Type org.apache.tools.ant.taskdefs.optional.extension.Specification of variable specification does not match with type org.apache.tools.ant.taskdefs.optional.extension.Extension of variable extension |
5 | Clone fragment #1 returns variables key, attributes , while Clone fragment #2 returns variables attributes |