testChar = userinfo.charAt(index);
if (testChar == '%') {
if (index+2 >= end ||
!isHex(userinfo.charAt(index+1)) ||
!isHex(userinfo.charAt(index+2))) {
return false;
}
index += 2;
}
else if (!isUserinfoCharacter(testChar)) {
return false;
}
++index;
testChar = p_uric.charAt(i);
if (testChar == '%') {
if (i+2 >= end ||
!isHex(p_uric.charAt(i+1)) ||
!isHex(p_uric.charAt(i+2))) {
return false;
}
else {
i += 2;
continue;
}
}
if (isURICharacter(testChar)) {
continue;
}
else {
return false;
}
Clone fragments detected by clone detection tool
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 |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 1 |