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.BODY: {↵ | 1 | case MailFilterCriteria.SIZE: {↵ | |
2 | if (operator == FilterCriteria.CONTAINS) {↵ | 2 | if (operator == FilterCriteria.SIZE_SMALLER) {↵ | |
3 | return new SearchKey(SearchKey.BODY, criteria↵ | 3 | return new SearchKey(SearchKey.SMALLER, 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.BODY, criteria.getPatternString()));↵ | 8 | SearchKey.SMALLER, criteria.getPatternString()));↵ | |
9 | } | 9 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
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) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
24 | case MailFilterCriteria.BODY: |
| 40 | case MailFilterCriteria.SIZE: | ||||||||||
25 | if (operator == FilterCriteria.CONTAINS) |
| 41 | if (operator == FilterCriteria.SIZE_SMALLER) | ||||||||||
26 | return new SearchKey(SearchKey.BODY, criteria.getPatternString()); |
| 42 | return new SearchKey(SearchKey.SMALLER, criteria.getPatternString()); | ||||||||||
else | else | |||||||||||||
27 | return new SearchKey(SearchKey.NOT, new SearchKey(SearchKey.BODY, criteria.getPatternString())); |
| 43 | return new SearchKey(SearchKey.NOT, new SearchKey(SearchKey.SMALLER, criteria.getPatternString())); |
Row | Violation |
---|