if (entryTargetIndex == -1)
{
throw new IndexOutOfBoundsException("targetIndex=" + targetIndex + ", size=" + count);
}
if (entrySourceIndex == -1)
{
throw new IndexOutOfBoundsException("sourceIndex=" + sourceIndex + ", size=" + count);
}
super.move(entryTargetIndex, entrySourceIndex);
if (isNotificationRequired())
{
dispatchNotification
(createNotification
(Notification.MOVE,
feature,
new Integer(sourceIndex),
result,
targetIndex,
true));
}
return result;
if (entryTargetIndex == -1)
{
throw new IndexOutOfBoundsException("targetIndex=" + targetIndex + ", size=" + count);
}
if (entrySourceIndex == -1)
{
throw new IndexOutOfBoundsException("sourceIndex=" + sourceIndex + ", size=" + count);
}
super.move(entryTargetIndex, entrySourceIndex);
if (isNotificationRequired())
{
dispatchNotification
(createNotification
(Notification.MOVE,
feature,
sourceIndex,
result,
targetIndex,
true));
}
return result;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java
|
Method name: Object move(EStructuralFeature, int, int)
|
|
Method name: Object move(EStructuralFeature, int, int)
|
Number of AST nodes: 8
|
|
Number of AST nodes: 8
|
|
1 | if (entryTargetIndex == -1)↵ | | 1 | if (entryTargetIndex == -1)↵
|
2 | {↵ | | 2 | {↵
|
3 | throw new IndexOutOfBoundsException("targetIndex=" + targetIndex + ", size=" + count);↵ | | 3 | throw new IndexOutOfBoundsException("targetIndex=" + targetIndex + ", size=" + count);↵
|
4 | }↵ | | 4 | }↵
|
5 | if (entrySourceIndex == -1)↵ | | 5 | if (entrySourceIndex == -1)↵
|
6 | {↵ | | 6 | {↵
|
7 | throw new IndexOutOfBoundsException("sourceIndex=" + sourceIndex + ", size=" + count);↵ | | 7 | throw new IndexOutOfBoundsException("sourceIndex=" + sourceIndex + ", size=" + count);↵
|
8 | }↵ | | 8 | }↵
|
|
9 | super.move(entryTargetIndex, entrySourceIndex);↵ | | 9 | super.move(entryTargetIndex, entrySourceIndex);↵
|
|
10 | if (isNotificationRequired())↵ | | 10 | if (isNotificationRequired())↵
|
11 | {↵ | | 11 | {↵
|
12 | dispatchNotification↵ | | 12 | dispatchNotification↵
|
13 | (createNotification↵ | | 13 | (createNotification↵
|
14 | (Notification.MOVE, ↵ | | 14 | (Notification.MOVE, ↵
|
15 | feature,↵ | | 15 | feature,↵
|
16 | new Integer(sourceIndex), ↵ | | 16 | sourceIndex, ↵
|
17 | result,↵ | | 17 | result,↵
|
18 | targetIndex,↵ | | 18 | targetIndex,↵
|
19 | true));↵ | | 19 | true));↵
|
20 | }↵ | | 20 | }↵
|
|
21 | return result; | | 21 | return result;
|
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.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 33 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
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) | 1.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
17 | if (entryTargetIndex == -1) | | 16 | if (entryTargetIndex == -1) |
18 | throw new IndexOutOfBoundsException("targetIndex=" + targetIndex + ", size=" + count); | | 17 | throw new IndexOutOfBoundsException("targetIndex=" + targetIndex + ", size=" + count); |
19 | if (entrySourceIndex == -1) | | 18 | if (entrySourceIndex == -1) |
20 | throw new IndexOutOfBoundsException("sourceIndex=" + sourceIndex + ", size=" + count); | | 19 | throw new IndexOutOfBoundsException("sourceIndex=" + sourceIndex + ", size=" + count); |
21 | super.move(entryTargetIndex, entrySourceIndex); | | 20 | super.move(entryTargetIndex, entrySourceIndex); |
22 | if (isNotificationRequired()) | | 21 | if (isNotificationRequired()) |
| | | 22 | dispatchNotification(createNotification(Notification.MOVE, feature, sourceIndex, result, targetIndex, true)); |
23 | dispatchNotification(createNotification(Notification.MOVE, feature, new Integer(sourceIndex), result, targetIndex, true)); | | | |
24 | return result; | | 23 | return result; |
Precondition Violations (0)
Row |
Violation |