File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/DataValue.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/DataValue.java | |||
Method name: void initializePath(String, int)
|
Method name: void initializePath(String, int)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (testChar == '%') {↵ | 1 | if (testChar == '%') {↵ | |
2 | if (index+2 >= end ||↵ | 2 | if (index+2 >= end ||↵ | |
3 | !isHex(p_uriSpec.charAt(index+1)) ||↵ | 3 | !isHex(p_uriSpec.charAt(index+1)) ||↵ | |
4 | !isHex(p_uriSpec.charAt(index+2))) {↵ | 4 | !isHex(p_uriSpec.charAt(index+2))) {↵ | |
5 | throw new MalformedURIException(↵ | 5 | throw new MalformedURIException(↵ | |
6 | "Opaque part contains invalid escape sequence!");↵ | 6 | "Fragment contains invalid escape sequence!");↵ | |
7 | }↵ | 7 | ↵ | |
8 | ↵ | 8 | }↵ | |
9 | index += 2;↵ | 9 | index += 2;↵ | |
10 | }↵ | 10 | }↵ | |
11 | // If the scheme specific part is opaque, it can contain '['↵ | |||
12 | // and ']'. uric_no_slash wasn't modified by RFC 2732, which↵ | |||
13 | // I've interpreted as an error in the spec, since the ↵ | |||
14 | // production should be equivalent to (uric - '/'), and uric↵ | |||
15 | // contains '[' and ']'. - mrglavas↵ | |||
16 | else if (!isURICharacter(testChar)) {↵ | 11 | else if (!isURICharacter(testChar)) {↵ | |
17 | throw new MalformedURIException(↵ | 12 | throw new MalformedURIException(↵ | |
18 | "Opaque part contains invalid character: " + testChar);↵ | 13 | "Fragment contains invalid character: "+testChar);↵ | |
19 | } | 14 |
| |
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.7 |
Clones location | Clones are in the same method |
Number of node comparisons | 13 |
Number of mapped statements | 6 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
24 | if (testChar == '%') | 52 | if (testChar == '%') | |||||||||||
25 | if (index + 2 >= end || !isHex(p_uriSpec.charAt(index + 1)) || !isHex(p_uriSpec.charAt(index + 2))) | 53 | if (index + 2 >= end || !isHex(p_uriSpec.charAt(index + 1)) || !isHex(p_uriSpec.charAt(index + 2))) | |||||||||||
26 | throw new MalformedURIException("Opaque part contains invalid escape sequence!"); |
| 54 | throw new MalformedURIException("Fragment contains invalid escape sequence!"); | ||||||||||
27 | index += 2; | 55 | index += 2; | |||||||||||
28 | else if (!isURICharacter(testChar)) | 56 | else if (!isURICharacter(testChar)) | |||||||||||
29 | throw new MalformedURIException("Opaque part contains invalid character: " + testChar); |
| 57 | throw new MalformedURIException("Fragment contains invalid character: " + testChar); |
Row | Violation |
---|