File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/imap/IMAPFolder.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/imap/IMAPFolder.java | |||
Method name: void synchronizeFlags(MailboxStatus)
|
Method name: void synchronizeFlags(MailboxStatus)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | flagged++;↵ | 1 | unseen++;↵ | |
2 | }↵ | 2 | }↵ | |
3 | index = Collections.binarySearch(remoteRecentUids, uid);↵ | 3 | index = Collections.binarySearch(remoteDeletedUids, uid);↵ | |
4 | flag.setRecent(index >= 0);↵ | 4 | flag.setDeleted(index >= 0);↵ | |
5 | if (flag.getRecent()) {↵ | 5 | if (flag.getDeleted()) {↵ | |
6 | recent++;↵ | 6 | deleted++;↵ | |
7 | }↵ | 7 | }↵ | |
8 | index = Collections.binarySearch(remoteJunkUids, uid); | 8 | index = Collections.binarySearch(remoteFlaggedUids, uid); | |
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 the same method |
Number of node comparisons | 14 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 8.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
40 | index = Collections.binarySearch(remoteRecentUids, uid); |
| 32 | index = Collections.binarySearch(remoteDeletedUids, uid); | ||||||||||||||
41 | flag.setRecent(index >= 0); |
| 33 | flag.setDeleted(index >= 0); | ||||||||||||||
42 | if (flag.getRecent()) |
| 34 | if (flag.getDeleted()) | ||||||||||||||
43 | recent++; |
| 35 | deleted++; | ||||||||||||||
44 | index = Collections.binarySearch(remoteJunkUids, uid); |
| 36 | index = Collections.binarySearch(remoteFlaggedUids, uid); |
Row | Violation |
---|---|
1 | Expression flag.setRecent(index >= 0) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression flag.setDeleted(index >= 0) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression flag.setRecent(index >= 0) is a void method call, and thus it cannot be parameterized |
4 | Expression flag.setDeleted(index >= 0) is a void method call, and thus it cannot be parameterized |
5 | Clone fragment #1 returns variables index, recent , while Clone fragment #2 returns variables index, deleted |