File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/filter/plugins/PriorityFilter.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/filter/plugins/SizeFilter.java | |||
Method name: boolean process(IFolder, Object)
|
Method name: boolean process(IFolder, Object)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | switch (condition) {↵ | 1 | switch (condition) {↵ | |
2 | case FilterCriteria.IS:↵ | 2 | case FilterCriteria.SIZE_SMALLER:↵ | |
3 | if (priority.compareTo(searchPatternInt) == 0) {↵ | 3 | if (size.compareTo(s) > 0) {↵ | |
4 | result = true;↵ | 4 | result = true;↵ | |
5 | }↵ | 5 | }↵ | |
6 | break;↵ | 6 | break;↵ | |
7 | case FilterCriteria.IS_NOT:↵ | 7 | case FilterCriteria.SIZE_BIGGER:↵ | |
8 | if (priority.compareTo(searchPatternInt) != 0) {↵ | 8 | if (size.compareTo(s) < 0) {↵ | |
9 | result = true;↵ | 9 | result = true;↵ | |
10 | }↵ | 10 | }↵ | |
11 | break;↵ | 11 | break;↵ | |
12 | } | 12 |
| |
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.7 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 21 |
Number of mapped statements | 7 |
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.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8 | case FilterCriteria.IS: |
| 7 | case FilterCriteria.SIZE_SMALLER: | ||||||||||||||||
9 | if (priority.compareTo(searchPatternInt) == 0) |
| 8 | if (size.compareTo(s) > 0) | ||||||||||||||||
10 | result = true; | 9 | result = true; | |||||||||||||||||
11 | break; |
| 10 | break; | ||||||||||||||||
12 | case FilterCriteria.IS_NOT: |
| 11 | case FilterCriteria.SIZE_BIGGER: | ||||||||||||||||
13 | if (priority.compareTo(searchPatternInt) != 0) |
| 12 | if (size.compareTo(s) < 0) | ||||||||||||||||
14 | result = true; | 13 | result = true; |
Row | Violation |
---|---|
1 | Switch case FilterCriteria.IS: without corresponding switch |
2 | Switch case FilterCriteria.SIZE_SMALLER: without corresponding switch |
3 | Statement break; without innermost loop |
4 | Statement break; without innermost loop |
5 | Switch case FilterCriteria.IS_NOT: without corresponding switch |
6 | Switch case FilterCriteria.SIZE_BIGGER: without corresponding switch |