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: 5 | Number of AST nodes: 5 | |||
1 | final String key = (String) keys.next();↵ | 1 | final String key = (String) keys.next();↵ | |
2 | final Attributes attributes = (Attributes) entries.get(key);↵ | 2 | final Attributes attributes = (Attributes) entries.get(key);↵ | |
3 | final Extension extension = getExtens↵ | 3 | final Specification specification↵ | |
4 | ion("", attributes);↵ | 4 | = getSpecification(key, attributes);↵ | |
5 | if (null != extension) {↵ | 5 | if (null != specification) {↵ | |
6 | results.add(extension);↵ | 6 | results.add(specification);↵ | |
7 | } | 7 |
| |
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 | 14 |
Number of mapped statements | 4 |
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) | 4.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |