if (matchEnd == con.limit) {
if (con.match != null) {
con.match.setBeginning(0, con.start);
con.match.setEnd(0, matchEnd);
}
con.inuse = false;
return true;
}
if (matchEnd == con.limit) {
if (con.match != null) {
con.match.setBeginning(0, con.start);
con.match.setEnd(0, matchEnd);
}
con.inuse = false;
return true;
}
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(String, int, int, Match)
|
|
Method name: boolean matches(CharacterIterator, Match)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if (matchEnd == con.limit) {↵ | | 1 | if (matchEnd == con.limit) {↵
|
2 | if (con.match != null) {↵ | | 2 | if (con.match != null) {↵
|
3 | con.match.setBeginning(0, con.start);↵ | | 3 | con.match.setBeginning(0, con.start);↵
|
4 | con.match.setEnd(0, matchEnd);↵ | | 4 | con.match.setEnd(0, matchEnd);↵
|
5 | }↵ | | 5 | }↵
|
6 | con.inuse = false;↵ | | 6 | con.inuse = false;↵
|
7 | return true;↵ | | 7 | return true;↵
|
8 | } | | 8 | }
|
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 19 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 6 |
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.5 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
24 | if (matchEnd == con.limit) | | 21 | if (matchEnd == con.limit) |
25 | | | 22 | |
26 | con.match.setBeginning(0, con.start); | | 23 | con.match.setBeginning(0, con.start); |
27 | con.match.setEnd(0, matchEnd); | | 24 | con.match.setEnd(0, matchEnd); |
28 | | | 25 | |
29 | | | 26 | |
Precondition Violations (2)
Row |
Violation |
1 | Conditional return true; |
2 | Conditional return true; |