File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/contact/list/ContactDNDListView.java | File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/list/AddressbookDNDListView.java | |||
Method name: void valueChanged(ListSelectionEvent)
|
Method name: void valueChanged(ListSelectionEvent)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | Object[] list = getSelectedValues();↵ | 1 | Object[] list = getSelectedValues();↵ | |
2 | selection2 = new IHeaderItem[list.length];↵ | 2 | selection1 = new IBasicModelPartial[list.length];↵ | |
3 | for (int i = 0; i < list.length; i++) {↵ | 3 | for (int i = 0; i < list.length; i++) {↵ | |
4 | selection2[i] = (IHeaderItem) list[i];↵ | 4 | selection1[i] = (IBasicModelPartial) list[i];↵ | |
5 | }↵ | 5 | }↵ | |
6 | dndAction = true; | 6 | dndAction = false; | |
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 | 10 |
Number of mapped statements | 3 |
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) | 2.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | Object[] list = getSelectedValues(); | 2 | Object[] list = getSelectedValues(); | |||||||||||
|
| 3 | selection1 = new IBasicModelPartial[list.length]; | |||||||||||
8 | selection2 = new IHeaderItem[list.length]; |
| | |||||||||||
9 | for (int i = 0; i < list.length; i++) | 4 | for (int i = 0; i < list.length; i++) | |||||||||||
|
| 5 | selection1[i] = (IBasicModelPartial)list[i]; | |||||||||||
10 | selection2[i] = (IHeaderItem)list[i]; |
| | |||||||||||
11 | dndAction = true; |
| 6 | dndAction = false; |
Row | Violation |
---|---|
1 | Unmatched statement selection1=new IBasicModelPartial[list.length]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement selection2=new IHeaderItem[list.length]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement selection1[i]=(IBasicModelPartial)list[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement selection2[i]=(IHeaderItem)list[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | The refactoring of the clones is infeasible, because classes org.columba.mail.gui.contact.list.ContactDNDListView and org.columba.addressbook.gui.list.AddressbookDNDListView do not have a common superclass |