if (!range.match(ch)) {
char ch1 = Character.toUpperCase((char)ch);
if (!range.match(ch1))
if (!range.match(Character.toLowerCase(ch1)))
continue;
}
if (!range.match(ch)) {
char ch1 = Character.toUpperCase((char)ch);
if (!range.match(ch1))
if (!range.match(Character.toLowerCase(ch1)))
continue;
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java
|
Method name: boolean matches(char[], int, int, Match)
|
|
Method name: boolean matches(String, int, int, Match)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (!range.match(ch)) {↵ | | 1 | if (!range.match(ch)) {↵
|
2 | char ch1 = Character.toUpperCase((char)ch);↵ | | 2 | char ch1 = Character.toUpperCase((char)ch);↵
|
3 | if (!range.match(ch1))↵ | | 3 | if (!range.match(ch1))↵
|
4 | if (!range.match(Character.toLowerCase(ch1)))↵ | | 4 | if (!range.match(Character.toLowerCase(ch1)))↵
|
5 | continue;↵ | | 5 | continue;↵
|
6 | } | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
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) | 0.7 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 12 |
-
{Non-refactorable}
Mapping Summary
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) | 1.4 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
67 | if (!range.match(ch)) | | 72 | if (!range.match(ch)) |
68 | char ch1 = Character.toUpperCase((char)ch); | | 73 | char ch1 = Character.toUpperCase((char)ch); |
69 | | | 74 | |
70 | if (!range.match(Character.toLowerCase(ch1))) | | 75 | if (!range.match(Character.toLowerCase(ch1))) |
71 | | | 76 | |
Precondition Violations (2)
Row |
Violation |
1 | Statement continue; without innermost loop |
2 | Statement continue; without innermost loop |