File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/imap/IMAPServer.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/imap/IMAPServer.java | |||
Method name: SearchKey getSearchKey(IFilterCriteria)
|
Method name: SearchKey getSearchKey(IFilterCriteria)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | case MailFilterCriteria.FROM: {↵ | 1 | case MailFilterCriteria.CC: {↵ | |
2 | if (operator == FilterCriteria.CONTAINS) {↵ | 2 | if (operator == FilterCriteria.CONTAINS) {↵ | |
3 | return new SearchKey(SearchKey.FROM, criteria↵ | 3 | return new SearchKey(SearchKey.CC, criteria↵ | |
4 | .getPatternString());↵ | 4 | .getPatternString());↵ | |
5 | } else {↵ | 5 | } else {↵ | |
6 | // contains not↵ | 6 | // contains not↵ | |
7 | return new SearchKey(SearchKey.NOT, new SearchKey(↵ | 7 | return new SearchKey(SearchKey.NOT, new SearchKey(↵ | |
8 | SearchKey.FROM, ↵ | 8 | SearchKey.CC,↵ | |
9 | criteria.getPatternString()));↵ | 9 | criteria.getPatternString()));↵ | |
10 | } | 10 |
| |
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 11 |
Number of mapped statements | 4 |
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) | 3.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | case MailFilterCriteria.FROM: |
| 8 | case MailFilterCriteria.CC: | ||||||||||||
5 | if (operator == FilterCriteria.CONTAINS) | 9 | if (operator == FilterCriteria.CONTAINS) | |||||||||||||
6 | return new SearchKey(SearchKey.FROM, criteria.getPatternString()); |
| 10 | return new SearchKey(SearchKey.CC, criteria.getPatternString()); | ||||||||||||
else | else | |||||||||||||||
7 | return new SearchKey(SearchKey.NOT, new SearchKey(SearchKey.FROM, criteria.getPatternString())); |
| 11 | return new SearchKey(SearchKey.NOT, new SearchKey(SearchKey.CC, criteria.getPatternString())); |
Row | Violation |
---|---|
1 | Switch case MailFilterCriteria.FROM: without corresponding switch |
2 | Switch case MailFilterCriteria.CC: without corresponding switch |
3 | Not all possible execution flows end in a return statement |