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.CC: {↵ | 1 | case MailFilterCriteria.TO: {↵ | |
2 | if (operator == FilterCriteria.CONTAINS) {↵ | 2 | if (operator == FilterCriteria.CONTAINS) {↵ | |
3 | return new SearchKey(SearchKey.CC, criteria.getPatternString());↵ | 3 | return new SearchKey(SearchKey.TO, criteria.getPatternString());↵ | |
4 | } else {↵ | 4 | } else {↵ | |
5 | // contains not↵ | 5 | // contains not↵ | |
6 | return new SearchKey(SearchKey.NOT, new SearchKey(SearchKey.CC,↵ | 6 | return new SearchKey(SearchKey.NOT, new SearchKey(SearchKey.TO,↵ | |
7 | criteria.getPatternString()));↵ | 7 | criteria.getPatternString()));↵ | |
8 | } | 8 |
| |
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.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8 | case MailFilterCriteria.CC: |
| 16 | case MailFilterCriteria.TO: | ||||||||||
9 | if (operator == FilterCriteria.CONTAINS) | 17 | if (operator == FilterCriteria.CONTAINS) | |||||||||||
10 | return new SearchKey(SearchKey.CC, criteria.getPatternString()); |
| 18 | return new SearchKey(SearchKey.TO, criteria.getPatternString()); | ||||||||||
else | else | |||||||||||||
11 | return new SearchKey(SearchKey.NOT, new SearchKey(SearchKey.CC, criteria.getPatternString())); |
| 19 | return new SearchKey(SearchKey.NOT, new SearchKey(SearchKey.TO, criteria.getPatternString())); |
Row | Violation |
---|