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: 4 | Number of AST nodes: 4 | |||
1 | for (int i = 0; (i < rule.count()) && b; i++) {↵ | 1 | for (int i = 0; (i < rule.count()) && !b; i++) {↵ | |
2 | IFilterCriteria criteria = rule.get(i);↵ | 2 | IFilterCriteria criteria = rule.get(i);↵ | |
3 | String type = criteria.getTypeString();↵ | 3 | String type = criteria.getTypeString();↵ | |
4 | b &= processRule(uid, criteria, type);↵ | 4 | b = processRule(uid, criteria, type);↵ | |
5 | } | 5 |
| |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 18 |
Number of mapped statements | 3 |
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) | 3.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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); |
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 |
7 | Clone fragment #1 returns variables criteria, type , while Clone fragment #2 returns variables criteria, type |