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.IS: if (priority.compareTo(searchPatternInt) == 0) { result = true; } break; case FilterCriteria.IS_NOT: if (priority.compareTo(searchPatternInt) != 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/PriorityFilter.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.IS:
3
			if (body.indexOf(bodyText) != -1) {
3
			if (priority.compareTo(searchPatternInt) == 0) {
4
				result = true;
4
				result = true;
5
			}
5
			}
6
			break;
6
			break;
7
		case FilterCriteria.CONTAINS_NOT:
7
		case FilterCriteria.IS_NOT:
8
			if (body.indexOf(bodyText) == -1) {
8
			if (priority.compareTo(searchPatternInt) != 0) {
9
				result = true;
9
				result = true;
10
			}
10
			}
11
			break;
11
			break;
12
		}
12
		}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.6
Clones locationClones are in different classes having the same super class
Number of node comparisons4