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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 20 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | AbstractColumbaAction[] actions = new AbstractColumbaAction[list.size()]; | |||||||||||||
1 | Object[] result = new Object[messages.size()]; | | |||||||||||||
| 2 | Iterator it = list.iterator(); | |||||||||||||
2 | ListIterator it = messages.listIterator(); | | |||||||||||||
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 | Type java.util.ListIterator of variable it does not match with type java.util.Iterator of variable it |
2 | 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 |
3 | 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 |
4 | Unmatched return actions; |
5 | Unmatched return result; |