ListDiffEntry [] listDiffEntries = new ListDiffEntry [newValues.size()];
int position = notification.getPosition();
int index = 0;
for (Object newValue : newValues)
{
listDiffEntries[index++] = Diffs.createListDiffEntry(position++, true, newValue);
}
diff = Diffs.createListDiff(listDiffEntries);
break;
ListDiffEntry [] listDiffEntries = new ListDiffEntry [oldValues.size()];
int position = notification.getPosition();
int index = 0;
for (Object oldValue : oldValues)
{
listDiffEntries[index++] = Diffs.createListDiffEntry(position++, false, oldValue);
}
diff = Diffs.createListDiff(listDiffEntries);
break;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/databinding/EObjectObservableList.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/databinding/EObjectObservableList.java
|
Method name: void notifyChanged(Notification)
|
|
Method name: void notifyChanged(Notification)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | ListDiffEntry [] listDiffEntries = new ListDiffEntry [newValues.size()];↵ | | 1 | ListDiffEntry [] listDiffEntries = new ListDiffEntry [oldValues.size()];↵
|
2 | int position = notification.getPosition();↵ | | 2 | int position = notification.getPosition();↵
|
3 | int index = 0;↵ | | 3 | int index = 0;↵
|
4 | for (Object newValue : newValues)↵ | | 4 | for (Object oldValue : oldValues)↵
|
5 | {↵ | | 5 | {↵
|
6 | listDiffEntries[index++] = Diffs.createListDiffEntry(position++, true, newValue);↵ | | 6 | listDiffEntries[index++] = Diffs.createListDiffEntry(position++, false, oldValue);↵
|
7 | }↵ | | 7 | }↵
|
8 | diff = Diffs.createListDiff(listDiffEntries);↵ | | 8 | diff = Diffs.createListDiff(listDiffEntries);↵
|
9 | break; | | 9 | break;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 1 |