if (!event.getProviderName().equals(this.providerTechnicalName))
return;
if (!event.getSearchCriteria().getTechnicalName().equals(
this.criteriaTechnicalName))
return;
List<ISearchResult> result = event.getSearchResults();
Iterator<ISearchResult> it = result.iterator();
while (it.hasNext()) {
list.add(it.next());
}
// setPreferredSize(list.getPreferredSize());
list.revalidate();
if (!event.getProviderName().equals(this.providerTechnicalName))
return;
if (!event.getSearchCriteria().getTechnicalName().equals(
this.criteriaTechnicalName))
return;
List<ISearchResult> result = event.getSearchResults();
Iterator<ISearchResult> it = result.iterator();
while (it.hasNext()) {
list.add(it.next());
}
list.revalidate();
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/search/BasicResultPanel.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/search/CriteriaResultPanel.java
|
Method name: void resultArrived(IResultEvent)
|
|
Method name: void resultArrived(IResultEvent)
|
Number of AST nodes: 9
|
|
Number of AST nodes: 9
|
|
1 | if (!event.getProviderName().equals(this.providerTechnicalName))↵ | | 1 | if (!event.getProviderName().equals(this.providerTechnicalName))↵
|
2 | return;↵ | | 2 | return;↵
|
3 | if (!event.getSearchCriteria().getTechnicalName().equals(↵ | | 3 | if (!event.getSearchCriteria().getTechnicalName().equals(↵
|
4 | this.criteriaTechnicalName))↵ | | 4 | this.criteriaTechnicalName))↵
|
5 | return;↵ | | 5 | return;↵
|
|
6 | List<ISearchResult> result = event.getSearchResults();↵ | | 6 | List<ISearchResult> result = event.getSearchResults();↵
|
|
7 | Iterator<ISearchResult> it = result.iterator();↵ | | 7 | Iterator<ISearchResult> it = result.iterator();↵
|
8 | while (it.hasNext()) {↵ | | 8 | while (it.hasNext()) {↵
|
9 | list.add(it.next());↵ | | 9 | list.add(it.next());↵
|
10 | }↵ | | 10 | }↵
|
|
11 | // setPreferredSize(list.getPreferredSize());↵ | | |
|
12 | list.revalidate(); | | 11 | list.revalidate();
|
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) | 1.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 36 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 9 |
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) | 9.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (!event.getProviderName().equals(this.providerTechnicalName)) | | 1 | if (!event.getProviderName().equals(this.providerTechnicalName)) |
2 | | | 2 | |
3 | if (!event.getSearchCriteria().getTechnicalName().equals(this.criteriaTechnicalName)) | | 3 | if (!event.getSearchCriteria().getTechnicalName().equals(this.criteriaTechnicalName)) |
4 | | | 4 | |
5 | List<ISearchResult> result = event.getSearchResults(); | | 5 | List<ISearchResult> result = event.getSearchResults(); |
6 | Iterator<ISearchResult> it = result.iterator(); | | 6 | Iterator<ISearchResult> it = result.iterator(); |
7 | while (it.hasNext()) | | 7 | while (it.hasNext()) |
8 | | | 8 | |
9 | list.revalidate(); | | 9 | list.revalidate(); |
Precondition Violations (0)
Row |
Violation |