while (it.hasNext()) {
ISearchResult r = it.next();
buf.append("<p>");
buf.append(createTitle(r));
buf.append("</p><p>");
buf.append(getDescription(r));
buf.append("</p><p><br></p>");
}
while (it.hasNext()) {
ISearchResult r = it.next();
buf.append("<p>");
buf.append(createTitle(r));
buf.append("</p><p>");
buf.append(getDescription(r));
buf.append("</p><p><br></p>");
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/search/HTMLResultView.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/search/SearchResultView.java
|
Method name: void resultArrived(IResultEvent)
|
|
Method name: void resultArrived(IResultEvent)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | while (it.hasNext()) {↵ | | 1 | while (it.hasNext()) {↵
|
2 | ISearchResult r = it.next();↵ | | 2 | ISearchResult r = it.next();↵
|
3 | buf.append("<p>");↵ | | 3 | buf.append("<p>");↵
|
4 | buf.append(createTitle(r));↵ | | 4 | buf.append(createTitle(r));↵
|
5 | buf.append("</p><p>");↵ | | 5 | buf.append("</p><p>");↵
|
6 | buf.append(getDescription(r));↵ | | 6 | buf.append(getDescription(r));↵
|
7 | buf.append("</p><p><br></p>");↵ | | 7 | buf.append("</p><p><br></p>");↵
|
8 | } | | 8 | }
|
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 49 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
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) | 26.3 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
4 | while (it.hasNext()) | | 4 | while (it.hasNext()) |
5 | ISearchResult r = it.next(); | | 5 | ISearchResult r = it.next(); |
6 | | | 6 | |
7 | buf.append(createTitle(r)); | | 7 | buf.append(createTitle(r)); |
8 | | | 8 | |
9 | buf.append(getDescription(r)); | | 9 | buf.append(getDescription(r)); |
10 | buf.append("</p><p><br></p>"); | | 10 | buf.append("</p><p><br></p>"); |
Precondition Violations (0)
Row |
Violation |