if (resolve())
{
@SuppressWarnings("unchecked") List<E> newValueList = (List<E>)value;
valueList = newValueList;
}
else
{
@SuppressWarnings("unchecked") InternalEList<E> newValueList = (InternalEList<E>)value;
valueList = valueInternalEList = newValueList;
}
if (resolve())
{
@SuppressWarnings("unchecked") List<E> newValueList = (List<E>)value;
valueList = newValueList;
}
else
{
@SuppressWarnings("unchecked") InternalEList<E> newValueList = (InternalEList<E>)value;
valueList = valueInternalEList = newValueList;
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EContentsEList.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EContentsEList.java
|
Method name: boolean hasNext()
|
|
Method name: boolean hasPrevious()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (resolve())↵ | | 1 | if (resolve())↵
|
2 | {↵ | | 2 | {↵
|
3 | @SuppressWarnings("unchecked") List<E> newValueList = (List<E>)value;↵ | | 3 | @SuppressWarnings("unchecked") List<E> newValueList = (List<E>)value;↵
|
4 | valueList = newValueList;↵ | | 4 | valueList = newValueList;↵
|
5 | }↵ | | 5 | }↵
|
6 | else↵ | | 6 | else↵
|
7 | {↵ | | 7 | {↵
|
8 | @SuppressWarnings("unchecked") InternalEList<E> newValueList = (InternalEList<E>)value;↵ | | 8 | @SuppressWarnings("unchecked") InternalEList<E> newValueList = (InternalEList<E>)value;↵
|
9 | valueList = valueInternalEList = newValueList;↵ | | 9 | valueList = valueInternalEList = newValueList;↵
|
10 | } | | 10 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
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 | 27 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
19 | if (resolve()) | | 19 | if (resolve()) |
20 | @SuppressWarnings("unchecked") List<E> newValueList = (List<E>)value; | | 20 | @SuppressWarnings("unchecked") List<E> newValueList = (List<E>)value; |
21 | valueList = newValueList; | | 21 | valueList = newValueList; |
| | | | |
22 | @SuppressWarnings("unchecked") InternalEList<E> newValueList = (InternalEList<E>)value; | | 22 | @SuppressWarnings("unchecked") InternalEList<E> newValueList = (InternalEList<E>)value; |
23 | valueList = valueInternalEList = newValueList; | | 23 | valueList = valueInternalEList = newValueList; |
Precondition Violations (0)
Row |
Violation |