File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/table/selection/TableSelectionHandler.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/mailchecking/MailCheckingManager.java | |||
Method name: Object[] getUidArray()
|
Method name: AbstractColumbaAction[] getActions()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | Object[] result = new Object[messages.size()];↵ | 1 | AbstractColumbaAction[] actions = new AbstractColumbaAction[list.size()];↵ | |
2 | List↵ | |||
3 | Iterator it = messages.listIterator();↵ | 2 | Iterator it = list.iterator();↵ | |
4 | int i = 0;↵ | 3 | int i = 0;↵ | |
5 | while (it.hasNext()) {↵ | 4 | while (it.hasNext()) {↵ | |
6 | result[i++] = ((MessageNode) it.next()).getUid();↵ | |||
7 | }↵ | |||
8 | return result↵ | 5 | actions[i++] = ((AbstractMailCheckingAction) it.next());↵ | |
6 | }↵ | |||
9 | ; | 7 | return actions; | |
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 |
Number of node comparisons | 20 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 638.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | AbstractColumbaAction[] actions = new AbstractColumbaAction[list.size()]; | ||||||||||||||||||||||||
1 | Object[] result = new Object[messages.size()]; | | ||||||||||||||||||||||||
2 | ListIterator it = messages.listIterator(); |
| 2 | Iterator it = list.iterator(); | ||||||||||||||||||||||
3 | int i = 0; | 3 | int i = 0; | |||||||||||||||||||||||
4 | while (it.hasNext()) |
| 4 | while (it.hasNext()) | ||||||||||||||||||||||
|
| 5 | actions[i++] = ((AbstractMailCheckingAction)it.next()); | |||||||||||||||||||||||
5 | result[i++] = ((MessageNode)it.next()).getUid(); |
| | |||||||||||||||||||||||
|
| 6 | return actions; | |||||||||||||||||||||||
6 | return result; |
| |
Row | Violation |
---|---|
1 | Unmatched statement actions[i++]=((AbstractMailCheckingAction)it.next()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement result[i++]=((MessageNode)it.next()).getUid(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched return actions; |
4 | Unmatched return result; |
5 | Clone fragment #1 returns variables it, i , while Clone fragment #2 returns variables it, i |
6 | The refactoring of the clones is infeasible, because classes org.columba.mail.gui.table.selection.TableSelectionHandler and org.columba.mail.mailchecking.MailCheckingManager do not have a common superclass |