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: boolean isValidServerBasedAuthority(String, int, String)
|
Method name: boolean isURIString(String)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 9 | |||
1 | testChar = userinfo.charAt(index);↵ | 1 | testChar = p_uric.charAt(i);↵ | |
2 | if (testChar == '%') {↵ | 2 | if (testChar == '%') {↵ | |
3 | if (index+2 >= end ||↵ | 3 | if (i+2 >= end ||↵ | |
4 | !isHex(userinfo.charAt(index+1)) ||↵ | 4 | !isHex(p_uric.charAt(i+1)) ||↵ | |
5 | !isHex(userinfo.charAt(index+2))) {↵ | 5 | !isHex(p_uric.charAt(i+2))) {↵ | |
6 | return false;↵ | 6 | return false;↵ | |
7 | }↵ | 7 | }↵ | |
8 | else {↵ | |||
8 | index += 2;↵ | 9 | i += 2;↵ | |
10 | continue;↵ | |||
9 | }↵ | 11 | }↵ | |
10 | else↵ | 12 | }↵ | |
11 | if (!isUserinfoCharacter(testChar)) {↵ | 13 | if (isURICharacter(testChar)) {↵ | |
12 | return false;↵ | 14 | ↵ | |
13 | }↵ | |||
14 | ++index; | 15 | continue;↵ | |
16 | }↵ | |||
17 | else {↵ | |||
18 | return false;↵ | |||
19 |
| |||
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) | 1.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | if (index + 2 >= end || !isHex(userinfo.charAt(index + 1)) || !isHex(userinfo.charAt(index + 2))) |
| 8 | if (i + 2 >= end || !isHex(p_uric.charAt(i + 1)) || !isHex(p_uric.charAt(i + 2))) | ||||||||||||||||||||||
13 | return false; |
| 9 | return false; | ||||||||||||||||||||||
| else | |||||||||||||||||||||||||
|
| 10 | i += 2; | |||||||||||||||||||||||
|
| 11 | continue; |
Row | Violation |
---|---|
1 | Unmatched statement i+=2; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched continue; |
3 | Conditional return false; |
4 | Conditional return false; |