File path: /apache-ant-1.7.0/src/org/apache/tools/ant/AntClassLoader.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/AntClassLoader.java | |||
Method name: void definePackage(File, String, Manifest)
|
Method name: void definePackage(File, String, Manifest)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | if (specificationTitle == null) {↵ | |||
2 | specificationTitle↵ | |||
3 | = mainAttributes.getValue(Name.SPECIFICATION_TITLE);↵ | |||
4 | }↵ | |||
5 | if (specificationVendor == null) {↵ | |||
6 | specificationVendor↵ | |||
7 | = mainAttributes.getValue(Name.SPECIFICATION_VENDOR);↵ | |||
8 | }↵ | |||
1 | if (specificationVersion == null) {↵ | 9 | if (specificationVersion == null) {↵ | |
2 | specificationVersion↵ | 10 | specificationVersion↵ | |
3 | = mainAttributes.getValue(Name.SPECIFICATION_VERSION);↵ | 11 | = mainAttributes.getValue(Name.SPECIFICATION_VERSION);↵ | |
4 | }↵ | 12 | }↵ | |
5 | if (implementationTitle == null) {↵ | 13 | if (implementationTitle == null) {↵ | |
6 | implementationTitle↵ | 14 | implementationTitle↵ | |
7 | = mainAttributes.getValue(Name.IMPLEMENTATION_TITLE);↵ | 15 | = mainAttributes.getValue(Name.IMPLEMENTATION_TITLE);↵ | |
8 | }↵ | 16 | }↵ | |
9 | if (implementationVendor == null) {↵ | 17 | if (implementationVendor == null) {↵ | |
10 | implementationVendor↵ | 18 | implementationVendor↵ | |
11 | = mainAttributes.getValue(Name.IMPLEMENTATION_VENDOR);↵ | 19 | = mainAttributes.getValue(Name.IMPLEMENTATION_VENDOR);↵ | |
12 | }↵ | 20 |
| |
13 | if (implementationVersion == null) {↵ | |||
14 | implementationVersion↵ | |||
15 | = mainAttributes.getValue(Name.IMPLEMENTATION_VERSION);↵ | |||
16 | }↵ | |||
17 | if (sealedString == null) {↵ | |||
18 | sealedString↵ | |||
19 | = mainAttributes.getValue(Name.SEALED);↵ | |||
20 | } | |||
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) | 2.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 71 |
Number of mapped statements | 10 |
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) | 5.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
25 | if (specificationVersion == null) | 25 | if (specificationVersion == null) | ||||||||||||||
26 | specificationVersion = mainAttributes.getValue(Name.SPECIFICATION_VERSION); | 26 | specificationVersion = mainAttributes.getValue(Name.SPECIFICATION_VERSION); | ||||||||||||||
27 | if (implementationTitle == null) | 27 | if (implementationTitle == null) | ||||||||||||||
28 | implementationTitle = mainAttributes.getValue(Name.IMPLEMENTATION_TITLE); | 28 | implementationTitle = mainAttributes.getValue(Name.IMPLEMENTATION_TITLE); | ||||||||||||||
29 | if (implementationVendor == null) | 29 | if (implementationVendor == null) | ||||||||||||||
30 | implementationVendor = mainAttributes.getValue(Name.IMPLEMENTATION_VENDOR); | 30 | implementationVendor = mainAttributes.getValue(Name.IMPLEMENTATION_VENDOR); | ||||||||||||||
31 | if (implementationVersion == null) |
| 23 | if (specificationVendor == null) | |||||||||||||
32 | implementationVersion = mainAttributes.getValue(Name.IMPLEMENTATION_VERSION); |
| 24 | specificationVendor = mainAttributes.getValue(Name.SPECIFICATION_VENDOR); | |||||||||||||
33 | if (sealedString == null) |
| 21 | if (specificationTitle == null) | |||||||||||||
34 | sealedString = mainAttributes.getValue(Name.SEALED); |
| 22 | specificationTitle = mainAttributes.getValue(Name.SPECIFICATION_TITLE); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables sealedString, specificationVersion, implementationTitle, implementationVendor, implementationVersion , while Clone fragment #2 returns variables specificationTitle, specificationVendor, specificationVersion, implementationTitle, implementationVendor |