File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/outbox/SendListManager.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/outbox/SendListManager.java | |||
Method name: Object getNextUid()
|
Method name: SendableMessage getNextMessage()
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | getMutex();↵ | 1 | getMutex();↵ | |
2 | SendList actList = (SendList) sendAccounts.get(0);↵ | 2 | SendList actList = (SendList) sendAccounts.get(0);↵ | |
3 | Object output = actList.getFirst().getUID();↵ | 3 | SendableMessage output = actList.getFirst();↵ | |
4 | counter--;↵ | 4 | counter--;↵ | |
5 | if (actList.count() == 0) {↵ | 5 | if (actList.count() == 0) {↵ | |
6 | sendAccounts.remove(0);↵ | 6 | sendAccounts.remove(0);↵ | |
7 | }↵ | 7 | }↵ | |
8 | releaseMutex();↵ | 8 | releaseMutex();↵ | |
9 | return output; | 9 |
| |
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 declared in the same class |
Number of node comparisons | 26 |
Number of mapped statements | 6 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
1 | getMutex(); | 1 | getMutex(); | ||||
2 | SendList actList = (SendList)sendAccounts.get(0); | 2 | SendList actList = (SendList)sendAccounts.get(0); | ||||
|
| 3 | SendableMessage output = actList.getFirst(); | ||||
3 | Object output = actList.getFirst().getUID(); |
| | ||||
4 | counter--; | 4 | counter--; | ||||
5 | if (actList.count() == 0) | 5 | if (actList.count() == 0) | ||||
6 | sendAccounts.remove(0); | 6 | sendAccounts.remove(0); | ||||
7 | releaseMutex(); | 7 | releaseMutex(); | ||||
|
| 8 | return output; | ||||
8 | return output; |
| |
Row | Violation |
---|---|
1 | Unmatched statement SendableMessage output=actList.getFirst(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement Object output=actList.getFirst().getUID(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched return output; |
4 | Unmatched return output; |