if (object == this)
{
return true;
}
if (!(object instanceof List))
{
return false;
}
List<?> list = (List<?>)object;
if (list.size() != size)
{
return false;
}
if (object == this)
{
return true;
}
if (!(object instanceof List))
{
return false;
}
List<?> list = (List<?>)object;
if (list.size() != delegateSize())
{
return false;
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/util/BasicEList.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EStoreEObjectImpl.java
|
Method name: boolean equals(Object)
|
|
Method name: boolean delegateEquals(Object)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | if (object == this)↵ | | 1 | if (object == this)↵
|
2 | {↵ | | 2 | ↵
|
| | | 3 | {↵
|
3 | return true;↵ | | 4 | return true;↵
|
4 | }↵ | | 5 | }↵
|
|
5 | if (!(object instanceof List))↵ | | 6 | if (!(object instanceof List))↵
|
6 | {↵ | | 7 | {↵
|
7 | return false;↵ | | 8 | return false;↵
|
8 | }↵ | | 9 | }↵
|
|
9 | List<?> list = (List<?>)object;↵ | | 10 | List<?> list = (List<?>)object;↵
|
10 | if (list.size() != size)↵ | | 11 | if (list.size() != delegateSize())↵
|
11 | {↵ | | 12 | {↵
|
12 | return false;↵ | | 13 | return false;↵
|
13 | } | | 14 | }
|
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.6 |
Clones location | Clones are in different classes having the same super 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) | 0.5 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (object == this) | | 1 | if (object == this) |
2 | | | 2 | |
3 | if (!(object instanceof List)) | | 3 | if (!(object instanceof List)) |
4 | | | 4 | |
Precondition Violations (4)
Row |
Violation |
1 | Conditional return true; |
2 | Conditional return true; |
3 | Conditional return false; |
4 | Conditional return false; |