File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/search/DefaultSearchEngine.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/search/DefaultSearchEngine.java | |||
Method name: List processCriteria(IFilterRule, List)
|
Method name: List processCriteria(IFilterRule, List)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | while (it.hasNext()) {↵ | 1 | while (it.hasNext()) {↵ | |
2 | b = true;↵ | 2 | b = false;↵ | |
3 | uid = it.next();↵ | 3 | uid = it.next();↵ | |
4 | for (int i = 0; (i < rule.count()) && b; i++) {↵ | 4 | for (int i = 0; (i < rule.count()) && !b; i++) {↵ | |
5 | IFilterCriteria criteria = rule.get(i);↵ | 5 | IFilterCriteria criteria = rule.get(i);↵ | |
6 | String type = criteria.getTypeString();↵ | 6 | String type = criteria.getTypeString();↵ | |
7 | b &= processRule(uid, criteria, type);↵ | 7 | b = processRule(uid, criteria, type);↵ | |
8 | }↵ | 8 | }↵ | |
9 | if (b) {↵ | 9 | if (b) {↵ | |
10 | result.add(uid);↵ | 10 | result.add(uid);↵ | |
11 | }↵ | 11 | }↵ | |
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 the same method |
Number of node comparisons | 32 |
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 10.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | while (it.hasNext()) | 16 | while (it.hasNext()) | |||||||||||||
8 | b = true; |
| 17 | b = false; | ||||||||||||
9 | uid = it.next(); | 18 | uid = it.next(); | |||||||||||||
10 | for (int i = 0; (i < rule.count()) && b; i++) |
| 19 | for (int i = 0; (i < rule.count()) && !b; i++) | ||||||||||||
11 | IFilterCriteria criteria = rule.get(i); | 20 | IFilterCriteria criteria = rule.get(i); | |||||||||||||
12 | String type = criteria.getTypeString(); | 21 | String type = criteria.getTypeString(); | |||||||||||||
13 | b &= processRule(uid, criteria, type); |
| | |||||||||||||
|
| 22 | b = processRule(uid, criteria, type); | |||||||||||||
14 | if (b) | 23 | if (b) | |||||||||||||
15 | result.add(uid); | 24 | result.add(uid); |
Row | Violation |
---|---|
1 | Expression b cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression !b cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement b&=processRule(uid,criteria,type); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement b&=processRule(uid,criteria,type); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
5 | Unmatched statement b=processRule(uid,criteria,type); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement b=processRule(uid,criteria,type); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |