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/Extension.java | |||
Method name: void addExtension(Extension, String, Attributes)
|
Method name: void addExtension(Extension, String, Attributes)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (null != specificationVendor) {↵ | 1 | if (null != implementationVendor) {↵ | |
2 | attributes.putValue(prefix + SPECIFICATION_VENDOR,↵ | 2 | attributes.putValue(prefix + IMPLEMENTATION_VENDOR,↵ | |
3 | specificationVendor);↵ | 3 | implementationVendor);↵ | |
4 | }↵ | 4 | }↵ | |
5 | final DeweyDecimal specificationVersion↵ | 5 | final DeweyDecimal implementationVersion↵ | |
6 | = extension.getSpecificationVersion();↵ | 6 | = extension.getImplementationVersion();↵ | |
7 | if (null != specificationVersion) {↵ | 7 | if (null != implementationVersion) {↵ | |
8 | attributes.putValue(prefix + SPECIFICATION_VERSION,↵ | 8 | attributes.putValue(prefix + IMPLEMENTATION_VERSION,↵ | |
9 | specificationVersion.toString());↵ | 9 | implementationVersion.toString());↵ | |
10 | }↵ | 10 | }↵ | |
11 | final String implementationVendorID↵ | 11 | final String implementation↵ | |
12 | = extension.getImplementationVendorID();↵ | 12 | URL = extension.getImplementationURL();↵ | |
13 | if (null != implementationVendorID) {↵ | 13 | if (null != implementationURL) {↵ | |
14 | attributes.putValue(prefix + IMPLEMENTATION_VENDOR_ID,↵ | 14 | attributes.putValue(prefix + IMPLEMENTATION_URL,↵ | |
15 | implementationVendorID);↵ | 15 | implementationURL);↵ | |
16 | } | 16 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 31 |
Number of mapped statements | 8 |
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) | 1.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (null != specificationVendor) |
| 12 | if (null != implementationVendor) | |||||||||||||
4 | attributes.putValue(prefix + SPECIFICATION_VENDOR, specificationVendor); |
| 13 | attributes.putValue(prefix + IMPLEMENTATION_VENDOR, implementationVendor); | |||||||||||||
5 | final DeweyDecimal specificationVersion = extension.getSpecificationVersion(); |
| 14 | final DeweyDecimal implementationVersion = extension.getImplementationVersion(); | |||||||||||||
6 | if (null != specificationVersion) |
| 15 | if (null != implementationVersion) | |||||||||||||
7 | attributes.putValue(prefix + SPECIFICATION_VERSION, specificationVersion.toString()); |
| 16 | attributes.putValue(prefix + IMPLEMENTATION_VERSION, implementationVersion.toString()); | |||||||||||||
8 | final String implementationVendorID = extension.getImplementationVendorID(); |
| 17 | final String implementationURL = extension.getImplementationURL(); | |||||||||||||
9 | if (null != implementationVendorID) |
| 18 | if (null != implementationURL) | |||||||||||||
10 | attributes.putValue(prefix + IMPLEMENTATION_VENDOR_ID, implementationVendorID); |
| 19 | attributes.putValue(prefix + IMPLEMENTATION_URL, implementationURL); |
Row | Violation |
---|