Iterator<ISearchCriteria> it2 = p.getAllCriteria(
ref.getSearchTerm()).iterator();
while (it2.hasNext()) {
ISearchCriteria c = it2.next();
String searchCriteriaTechnicalName = c
.getTechnicalName();
// execute search
doExecute(ref.getSearchTerm(), p,
searchCriteriaTechnicalName, ref
.isSearchInside(), ref.getStartIndex(),
ref.getResultCount());
}
Iterator<ISearchCriteria> it2 = p.getAllCriteria(
ref.getSearchTerm()).iterator();
while (it2.hasNext()) {
ISearchCriteria c = it2.next();
String searchCriteriaTechnicalName = c.getTechnicalName();
// execute search
doExecute(ref.getSearchTerm(), p,
searchCriteriaTechnicalName, ref.isSearchInside(),
ref.getStartIndex(), ref.getResultCount());
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/search/SearchManager.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/search/SearchManager.java
|
Method name: void execute(IWorkerStatusController)
|
|
Method name: void execute(IWorkerStatusController)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | Iterator<ISearchCriteria> it2 = p.getAllCriteria(↵ | | 1 | Iterator<ISearchCriteria> it2 = p.getAllCriteria(↵
|
2 | ref.getSearchTerm()).iterator();↵ | | 2 | ref.getSearchTerm()).iterator();↵
|
3 | while (it2.hasNext()) {↵ | | 3 | while (it2.hasNext()) {↵
|
4 | ISearchCriteria c = it2.next();↵ | | 4 | ISearchCriteria c = it2.next();↵
|
5 | String searchCriteriaTechnicalName = c↵ | | 5 | String searchCriteriaTechnicalName = c↵
|
6 | .getTechnicalName();↵ | | 6 | .getTechnicalName();↵
|
7 | // execute search↵ | | 7 | // execute search↵
|
8 | doExecute(ref.getSearchTerm(), p,↵ | | 8 | doExecute(ref.getSearchTerm(), p,↵
|
9 | searchCriteriaTechnicalName, ref↵ | | 9 | searchCriteriaTechnicalName, ref↵
|
10 | .isSearchInside(), ↵ | | 10 | .isSearchInside(),↵
|
11 | ref.getStartIndex(),↵ | | 11 | ref.getStartIndex(),↵
|
12 | ref.getResultCount());↵ | | 12 | ref.getResultCount());↵
|
13 | } | | 13 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.5 |
Clones location | Clones are in the same method |
Number of node comparisons | 19 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 146.8 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
6 | Iterator<ISearchCriteria> it2 = p.getAllCriteria(ref.getSearchTerm()).iterator(); | | 14 | Iterator<ISearchCriteria> it2 = p.getAllCriteria(ref.getSearchTerm()).iterator(); |
7 | while (it2.hasNext()) | | 15 | while (it2.hasNext()) |
8 | ISearchCriteria c = it2.next(); | | 16 | ISearchCriteria c = it2.next(); |
9 | String searchCriteriaTechnicalName = c.getTechnicalName(); | | 17 | String searchCriteriaTechnicalName = c.getTechnicalName(); |
10 | doExecute(ref.getSearchTerm(), p, searchCriteriaTechnicalName, ref.isSearchInside(), ref.getStartIndex(), ref.getResultCount()); | | 18 | doExecute(ref.getSearchTerm(), p, searchCriteriaTechnicalName, ref.isSearchInside(), ref.getStartIndex(), ref.getResultCount()); |
Precondition Violations (0)
Row |
Violation |