Entry entry = delegateGet(i);
if (validator.isValid(entry.getEStructuralFeature()))
{
if (index == count)
{
return i;
}
++count;
result = i + 1;
}
Entry entry = entries[i];
if (validator.isValid(entry.getEStructuralFeature()))
{
if (index == count)
{
return i;
}
++count;
result = i + 1;
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java
|
Method name: int entryIndex(EStructuralFeature, int)
|
|
Method name: int entryIndex(EStructuralFeature, int)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | Entry entry = delegateGet(i);↵ | | 1 | Entry entry = entries[i];↵
|
2 | if (validator.isValid(entry.getEStructuralFeature()))↵ | | 2 | if (validator.isValid(entry.getEStructuralFeature()))↵
|
3 | {↵ | | 3 | {↵
|
4 | if (index == count)↵ | | 4 | if (index == count)↵
|
5 | {↵ | | 5 | {↵
|
6 | return i;↵ | | 6 | return i;↵
|
7 | }↵ | | 7 | }↵
|
8 | ++count;↵ | | 8 | ++count;↵
|
9 | result = i + 1;↵ | | 9 | result = i + 1;↵
|
10 | } | | 10 | }
|
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 in different classes having the same super class |
Number of node comparisons | 15 |
-
{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) | 0.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
6 | Entry entry = delegateGet(i); | | 6 | Entry entry = entries[i]; |
7 | if (validator.isValid(entry.getEStructuralFeature())) | | 7 | if (validator.isValid(entry.getEStructuralFeature())) |
8 | | | 8 | |
9 | | | 9 | |
10 | | | 10 | |
11 | | | 11 | |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables count, result , while Clone fragment #2 returns variables count, result |