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/Specification.java | |||
Method name: Specification getSpecification(String, Attributes)
|
Method name: Specification getSpecification(String, Attributes)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (null == specVendor) {↵ | 1 | if (null == impTitle) {↵ | |
2 | throw new ParseException(MISSING + SPECIFICATION_VENDOR, 0);↵ | 2 | throw new ParseException(MISSING + IMPLEMENTATION_TITLE, 0);↵ | |
3 | }↵ | 3 | }↵ | |
4 | final String specVersion↵ | 4 | final String impVersion↵ | |
5 | = getTrimmedString(attributes.getValue(SPECIFICATION_VERSION));↵ | 5 | = getTrimmedString(attributes.getValue(IMPLEMENTATION_VERSION));↵ | |
6 | if (null == specVersion) {↵ | 6 | if (null == impVersion) {↵ | |
7 | throw new ParseException(MISSING + SPECIFICATION_VERSION, 0);↵ | 7 | throw new ParseException(MISSING + IMPLEMENTATION_VERSION, 0);↵ | |
8 | }↵ | 8 | }↵ | |
9 | final String impTitle↵ | 9 | final String impVendor↵ | |
10 | = getTrimmedString(attributes.getValue(IMPLEMENTATION_TITLE));↵ | 10 | = getTrimmedString(attributes.getValue(IMPLEMENTATION_VENDOR));↵ | |
11 | if (null == impTitle) {↵ | 11 | if (null == impVendor) {↵ | |
12 | throw new ParseException(MISSING + IMPLEMENTATION_TITLE, 0);↵ | 12 | throw new ParseException(MISSING + IMPLEMENTATION_VENDOR, 0);↵ | |
13 | } | 13 |
| |
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.4 |
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 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | if (null == specVendor) |
| 11 | if (null == impTitle) | |||||||||||||
6 | throw new ParseException(MISSING + SPECIFICATION_VENDOR, 0); |
| 12 | throw new ParseException(MISSING + IMPLEMENTATION_TITLE, 0); | |||||||||||||
7 | final String specVersion = getTrimmedString(attributes.getValue(SPECIFICATION_VERSION)); |
| 13 | final String impVersion = getTrimmedString(attributes.getValue(IMPLEMENTATION_VERSION)); | |||||||||||||
8 | if (null == specVersion) |
| 14 | if (null == impVersion) | |||||||||||||
9 | throw new ParseException(MISSING + SPECIFICATION_VERSION, 0); |
| 15 | throw new ParseException(MISSING + IMPLEMENTATION_VERSION, 0); | |||||||||||||
10 | final String impTitle = getTrimmedString(attributes.getValue(IMPLEMENTATION_TITLE)); |
| 16 | final String impVendor = getTrimmedString(attributes.getValue(IMPLEMENTATION_VENDOR)); | |||||||||||||
11 | if (null == impTitle) |
| 17 | if (null == impVendor) | |||||||||||||
12 | throw new ParseException(MISSING + IMPLEMENTATION_TITLE, 0); |
| 18 | throw new ParseException(MISSING + IMPLEMENTATION_VENDOR, 0); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables specVersion, impTitle , while Clone fragment #2 returns variables impVersion, impVendor |