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: 8 | Number of AST nodes: 8 | |||
1 | b = true;↵ | 1 | b = false;↵ | |
2 | uid = it.next();↵ | 2 | uid = it.next();↵ | |
3 | for (int i = 0; (i < rule.count()) && b; i++) {↵ | 3 | for (int i = 0; (i < rule.count()) && !b; i++) {↵ | |
4 | IFilterCriteria criteria = rule.get(i);↵ | 4 | IFilterCriteria criteria = rule.get(i);↵ | |
5 | String type = criteria.getTypeString();↵ | 5 | String type = criteria.getTypeString();↵ | |
6 | b &= processRule(uid, criteria, type);↵ | 6 | b = processRule(uid, criteria, type);↵ | |
7 | }↵ | 7 | }↵ | |
8 | if (b) {↵ | 8 | if (b) {↵ | |
9 | result.add(uid);↵ | 9 | result.add(uid);↵ | |
10 | } | 10 |
| |
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 | 28 |
Number of mapped statements | 7 |
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) | 5.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |