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: 3 | Number of AST nodes: 3 | |||
1 | if (operator == FilterCriteria.CONTAINS) {↵ | 1 | if (operator == FilterCriteria.SIZE_SMALLER) {↵ | |
2 | return new SearchKey(SearchKey.TO, criteria↵ | 2 | return new SearchKey(SearchKey.SMALLER, criteria↵ | |
3 | .getPatternString());↵ | 3 | .getPatternString());↵ | |
4 | } else {↵ | 4 | } else {↵ | |
5 | // contains not↵ | 5 | // contains not↵ | |
6 | return new SearchKey(SearchKey.NOT, new SearchKey(↵ | 6 | return new SearchKey(SearchKey.NOT, new SearchKey(↵ | |
7 | SearchKey.TO,↵ | 7 | SearchKey.↵ | |
8 | criteria.getPatternString()));↵ | 8 | 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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 10 |
Number of mapped statements | 3 |
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) | 2.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17 | if (operator == FilterCriteria.CONTAINS) |
| 41 | if (operator == FilterCriteria.SIZE_SMALLER) | ||||||||||
18 | return new SearchKey(SearchKey.TO, criteria.getPatternString()); |
| 42 | return new SearchKey(SearchKey.SMALLER, criteria.getPatternString()); | ||||||||||
else | else | |||||||||||||
19 | return new SearchKey(SearchKey.NOT, new SearchKey(SearchKey.TO, criteria.getPatternString())); |
| 43 | return new SearchKey(SearchKey.NOT, new SearchKey(SearchKey.SMALLER, criteria.getPatternString())); |
Row | Violation |
---|