if (con.length == 0)
go = true;
else {
int after = getWordType(target, con.start, con.limit, offset, opts);
go = after == WT_IGNORE
|| after == getPreviousWordType(target, con.start, con.limit, offset, opts);
}
if (con.length == 0)
go = true;
else {
int after = getWordType(target, con.start, con.limit, offset, opts);
go = after == WT_IGNORE
|| after == getPreviousWordType(target, con.start, con.limit, offset, opts);
}
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: 4
|
|
Number of AST nodes: 4
|
|
1 | if (con.length == 0)↵ | | 1 | if (con.length == 0)↵
|
2 | go = true;↵ | | 2 | go = true;↵
|
3 | else {↵ | | 3 | else {↵
|
4 | int after = getWordType(target, con.start, con.limit, offset, opts);↵ | | 4 | int after = getWordType(target, con.start, con.limit, offset, opts);↵
|
5 | go = after == WT_IGNORE↵ | | 5 | go = after == WT_IGNORE↵
|
6 | || after == getPreviousWordType(target, con.start, con.limit, offset, opts);↵ | | 6 | || after == getPreviousWordType(target, con.start, con.limit, offset, opts);↵
|
7 | } | | 7 | }
|
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 18 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 5.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
141 | if (con.length == 0) | | 141 | if (con.length == 0) |
142 | | | 142 | |
| | | | |
143 | int after = getWordType(target, con.start, con.limit, offset, opts); | | 143 | int after = getWordType(target, con.start, con.limit, offset, opts); |
144 | go = after == WT_IGNORE || after == getPreviousWordType(target, con.start, con.limit, offset, opts); | | 144 | go = after == WT_IGNORE || after == getPreviousWordType(target, con.start, con.limit, offset, opts); |
Precondition Violations (2)
Row |
Violation |
1 | Type char[] of variable target does not match with type java.lang.String of variable target |
2 | Type char[] of variable target does not match with type java.lang.String of variable target |