if (isSet(opts, MULTIPLE_LINES)) {
if (!(offset == con.start
|| offset > con.start && isEOLChar( target [ offset-1 ] )))
return -1;
} else {
if (offset != con.start)
return -1;
}
if (isSet(opts, MULTIPLE_LINES)) {
if (!(offset == con.start
|| offset > con.start && isEOLChar( target .charAt( offset-1 ) )))
return -1;
} else {
if (offset != con.start)
return -1;
}
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: int matchCharArray(Context, Op, int, int, int)
|
|
Method name: int matchString(Context, Op, int, int, int)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (isSet(opts, MULTIPLE_LINES)) {↵ | | 1 | if (isSet(opts, MULTIPLE_LINES)) {↵
|
2 | if (!(offset == con.start↵ | | 2 | if (!(offset == con.start↵
|
3 | || offset > con.start && isEOLChar( target [ offset-1 ] )))↵ | | 3 | || offset > con.start && isEOLChar( target .charAt( offset-1 ) )))↵
|
4 | return -1;↵ | | 4 | return -1;↵
|
5 | } else {↵ | | 5 | } else {↵
|
6 | if (offset != con.start)↵ | | 6 | if (offset != con.start)↵
|
7 | return -1;↵ | | 7 | return -1;↵
|
8 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.8 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
-
{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) | 4.4 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
101 | if (isSet(opts, MULTIPLE_LINES)) | | 101 | if (isSet(opts, MULTIPLE_LINES)) |
102 | if (!(offset == con.start || offset > con.start && isEOLChar(target[offset - 1]))) | | 102 | if (!(offset == con.start || offset > con.start && isEOLChar(target.charAt(offset - 1)))) |
103 | | | 103 | |
| | | | |
104 | | | 104 | |
105 | | | 105 | |
Precondition Violations (0)
Row |
Violation |