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: 5 | Number of AST nodes: 5 | |||
1 | if (null == specVendor) {↵ | 1 | if (null == impVersion) {↵ | |
2 | throw new ParseException(MISSING + SPECIFICATION_VENDOR, 0);↵ | 2 | throw new ParseException(MISSING + IMPLEMENTATION_VERSION, 0);↵ | |
3 | }↵ | 3 | }↵ | |
4 | final String specVersion↵ | 4 | final String impVendor↵ | |
5 | = getTrimmedString(attributes.getValue(SPECIFICATION_VERSION));↵ | 5 | = getTrimmedString(attributes.getValue(IMPLEMENTATION_VENDOR));↵ | |
6 | if (null == specVersion) {↵ | 6 | if (null == impVendor) {↵ | |
7 | throw new ParseException(MISSING + SPECIFICATION_VERSION, 0);↵ | 7 | throw new ParseException(MISSING + IMPLEMENTATION_VENDOR, 0);↵ | |
8 | } | 8 |
| |
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 | 14 |
Number of mapped statements | 5 |
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) | 2.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | if (null == specVendor) |
| 14 | if (null == impVersion) | |||||||||||||
6 | throw new ParseException(MISSING + SPECIFICATION_VENDOR, 0); |
| 15 | throw new ParseException(MISSING + IMPLEMENTATION_VERSION, 0); | |||||||||||||
7 | final String specVersion = getTrimmedString(attributes.getValue(SPECIFICATION_VERSION)); |
| 16 | final String impVendor = getTrimmedString(attributes.getValue(IMPLEMENTATION_VENDOR)); | |||||||||||||
8 | if (null == specVersion) |
| 17 | if (null == impVendor) | |||||||||||||
9 | throw new ParseException(MISSING + SPECIFICATION_VERSION, 0); |
| 18 | throw new ParseException(MISSING + IMPLEMENTATION_VENDOR, 0); |
Row | Violation |
---|