if (hasProxies())
{
for (int i = size() - 1; i >= 0; --i)
{
get(i);
}
}
return super.toArray(array);
if (hasProxies())
{
for (int i = size - 1; i >= 0; --i)
{
get(i);
}
}
return super.toArray();
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingEcoreEList.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreEList.java
|
Method name: T[] toArray(T[])
|
|
Method name: Object[] toArray()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (hasProxies())↵ | | 1 | if (hasProxies())↵
|
2 | {↵ | | 2 | {↵
|
3 | for (int i = size() - 1; i >= 0; --i)↵ | | 3 | for (int i = size - 1; i >= 0; --i)↵
|
4 | {↵ | | 4 | {↵
|
5 | get(i);↵ | | 5 | get(i);↵
|
6 | }↵ | | 6 | }↵
|
7 | }↵ | | 7 | }↵
|
8 | return super.toArray(array); | | 8 | return super.toArray();
|
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 in different classes having the same super class |
Number of node comparisons | 6 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (hasProxies()) | | 1 | if (hasProxies()) |
2 | for (int i = size() - 1; i >= 0; --i) | | 2 | for (int i = size - 1; i >= 0; --i) |
3 | | | 3 | |
| | | 4 | return super.toArray(); |
4 | return super.toArray(array); | | | |
Precondition Violations (2)
Row |
Violation |
1 | Unmatched return super.toArray(); |
2 | Unmatched return super.toArray(array); |