switch (condition) {
case FilterCriteria.CONTAINS:
if (body.indexOf(bodyText) != -1) {
result = true;
}
break;
case FilterCriteria.CONTAINS_NOT:
if (body.indexOf(bodyText) == -1) {
result = true;
}
break;
}
switch (condition) {
case FilterCriteria.SIZE_SMALLER:
if (size.compareTo(s) > 0) {
result = true;
}
break;
case FilterCriteria.SIZE_BIGGER:
if (size.compareTo(s) < 0) {
result = true;
}
break;
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/filter/plugins/BodyFilter.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.CONTAINS:↵ | | 2 | case FilterCriteria.↵
|
|
3 | if (body.indexOf(bodyText) != -1↵ | | 3 | SIZE_SMALLER:↵
|
|
4 | ) {↵ | | 4 | if (size.compareTo(s) > 0) {↵
|
5 | result = true;↵ | | 5 | result = true;↵
|
6 | }↵ | | 6 | }↵
|
|
7 | break;↵ | | 7 | break;↵
|
|
8 | case FilterCriteria.CONTAINS_NOT:↵ | | 8 | case FilterCriteria.↵
|
|
9 | if (body.indexOf(bodyText) == -1↵ | | 9 | SIZE_BIGGER:↵
|
|
10 | ) {↵ | | 10 | if (size.compareTo(s) < 0) {↵
|
11 | result = true;↵ | | 11 | result = true;↵
|
12 | }↵ | | 12 | }↵
|
|
13 | break;↵ | | 13 | break;↵
|
14 | } | | 14 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.8 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 4 |