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 != implementationVendor) {↵ | 1 | if (null != specificationVendor) {↵ | |
2 | attributes.putValue(prefix + IMPLEMENTATION_VENDOR,↵ | 2 | attributes.putValue(prefix + SPECIFICATION_VENDOR,↵ | |
3 | implementationVendor);↵ | 3 | specificationVendor);↵ | |
4 | }↵ | 4 | }↵ | |
5 | final DeweyDecimal implementationVersion↵ | 5 | final DeweyDecimal specificationVersion↵ | |
6 | = extension.getImplementationVersion();↵ | 6 | = extension.getSpecificationVersion();↵ | |
7 | if (null != implementationVersion) {↵ | 7 | if (null != specificationVersion) {↵ | |
8 | attributes.putValue(prefix + IMPLEMENTATION_VERSION,↵ | 8 | attributes.putValue(prefix + SPECIFICATION_VERSION,↵ | |
9 | implementationVersion.toString());↵ | 9 | specificationVersion.toString());↵ | |
10 | }↵ | 10 | }↵ | |
11 | final String implementationURL↵ | 11 | final String implementationVendorID↵ | |
12 | = extension.getImplementationURL();↵ | 12 | = extension.getImplementationVendorID();↵ | |
13 | if (null != implementationURL) {↵ | 13 | if (null != implementationVendorID) {↵ | |
14 | attributes.putValue(prefix + IMPLEMENTATION_URL,↵ | 14 | attributes.putValue(prefix + IMPLEMENTATION_VENDOR_ID,↵ | |
15 | implementationURL);↵ | 15 | implementationVendorID);↵ | |
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.5 |
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) | 4.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | if (null != implementationVendor) |
| 3 | if (null != specificationVendor) | |||||||||||||
13 | attributes.putValue(prefix + IMPLEMENTATION_VENDOR, implementationVendor); |
| 4 | attributes.putValue(prefix + SPECIFICATION_VENDOR, specificationVendor); | |||||||||||||
14 | final DeweyDecimal implementationVersion = extension.getImplementationVersion(); |
| 5 | final DeweyDecimal specificationVersion = extension.getSpecificationVersion(); | |||||||||||||
15 | if (null != implementationVersion) |
| 6 | if (null != specificationVersion) | |||||||||||||
16 | attributes.putValue(prefix + IMPLEMENTATION_VERSION, implementationVersion.toString()); |
| 7 | attributes.putValue(prefix + SPECIFICATION_VERSION, specificationVersion.toString()); | |||||||||||||
17 | final String implementationURL = extension.getImplementationURL(); |
| 8 | final String implementationVendorID = extension.getImplementationVendorID(); | |||||||||||||
18 | if (null != implementationURL) |
| 9 | if (null != implementationVendorID) | |||||||||||||
19 | attributes.putValue(prefix + IMPLEMENTATION_URL, implementationURL); |
| 10 | attributes.putValue(prefix + IMPLEMENTATION_VENDOR_ID, implementationVendorID); |
Row | Violation |
---|