File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/list/AddressbookDNDListView.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/contact/list/ContactDNDListView.java | |||
Method name: void dragDropEnd(DragSourceDropEvent)
|
Method name: void dragDropEnd(DragSourceDropEvent)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | IBasicModelPartial[] items = HeaderItemDNDManager.getInstance()↵ | 1 | IHeaderItem[] items = HeaderItemDNDManager.getInstance()↵ | |
2 | .getHeaderItemList();↵ | 2 | .getHeaderItemList();↵ | |
3 | for (int i = 0; i < items.length; i++) {↵ | 3 | for (int i = 0; i < items.length; i++) {↵ | |
4 | ((AddressbookListModel) getModel()).removeElement(items[i]);↵ | 4 | ((ContactListModel) getModel()).removeElement(items[i]);↵ | |
5 | } | 5 |
| |
See real code fragment | See real code fragment |
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 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3 | IHeaderItem[] items = HeaderItemDNDManager.getInstance().getHeaderItemList(); | |||||||||||||
3 | IBasicModelPartial[] items = HeaderItemDNDManager.getInstance().getHeaderItemList(); | | |||||||||||||
4 | for (int i = 0; i < items.length; i++) |
| 4 | for (int i = 0; i < items.length; i++) | |||||||||||
|
| 5 | ((ContactListModel)getModel()).removeElement(items[i]); | ||||||||||||
5 | ((AddressbookListModel)getModel()).removeElement(items[i]); |
| |
Row | Violation |
---|---|
1 | Type org.columba.addressbook.model.IBasicModelPartial[] of variable items does not match with type org.columba.addressbook.facade.IHeaderItem[] of variable items |
2 | Unmatched statement ((ContactListModel)getModel()).removeElement(items[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement ((AddressbookListModel)getModel()).removeElement(items[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |