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 | "Query string contains invalid escape sequence!");↵ | 6 | "Fragment contains invalid escape sequence!");↵ | |
7 | }↵ | 7 | }↵ | |
8 | index += 2;↵ | 8 | index += 2;↵ | |
9 | }↵ | 9 | }↵ | |
10 | else if (!isURICharacter(testChar)) {↵ | 10 | else if (!isURICharacter(testChar)) {↵ | |
11 | throw new MalformedURIException(↵ | 11 | throw new MalformedURIException(↵ | |
12 | "Query string contains invalid character: " + testChar);↵ | 12 | "Fragment contains invalid character: "+testChar);↵ | |
13 | } | 13 |
| |
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
39 | if (testChar == '%') | 52 | if (testChar == '%') | |||||||||||
40 | 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))) | |||||||||||
41 | throw new MalformedURIException("Query string contains invalid escape sequence!"); |
| 54 | throw new MalformedURIException("Fragment contains invalid escape sequence!"); | ||||||||||
42 | index += 2; | 55 | index += 2; | |||||||||||
43 | else if (!isURICharacter(testChar)) | 56 | else if (!isURICharacter(testChar)) | |||||||||||
44 | throw new MalformedURIException("Query string contains invalid character: " + testChar); |
| 57 | throw new MalformedURIException("Fragment contains invalid character: " + testChar); |
Row | Violation |
---|