ISearchResult result = (ISearchResult) getSelectedValue();
try {
IDialogFacade facade = (IDialogFacade) ServiceFacadeRegistry
.getInstance().getService(IDialogFacade.class);
facade.openMessage(result.getLocation());
} catch (ServiceNotFoundException e) {
e.printStackTrace();
}
ISearchResult result = (ISearchResult) getSelectedValue();
try {
IDialogFacade facade = (IDialogFacade) ServiceFacadeRegistry
.getInstance().getService(IDialogFacade.class);
facade.openMessage(result.getLocation());
} catch (ServiceNotFoundException e) {
e.printStackTrace();
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/search/ResultList.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/search/ResultList.java
|
Method name: void actionPerformed(ActionEvent)
|
|
Method name: void doubleClick(MouseEvent)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | ISearchResult result = (ISearchResult) getSelectedValue();↵ | | 1 | ISearchResult result = (ISearchResult) getSelectedValue();↵
|
|
2 | try {↵ | | 2 | try {↵
|
3 | IDialogFacade facade = (IDialogFacade) ServiceFacadeRegistry↵ | | 3 | IDialogFacade facade = (IDialogFacade) ServiceFacadeRegistry↵
|
4 | .getInstance().getService(IDialogFacade.class);↵ | | 4 | .getInstance().getService(IDialogFacade.class);↵
|
5 | facade.openMessage(result.getLocation());↵ | | 5 | facade.openMessage(result.getLocation());↵
|
6 | } catch (ServiceNotFoundException e) {↵ | | 6 | } catch (ServiceNotFoundException e) {↵
|
7 | e.printStackTrace();↵ | | 7 | e.printStackTrace();↵
|
8 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.5 |
Clones location | Clones are in the same java file |
Number of node comparisons | 10 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 1.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | ISearchResult result = (ISearchResult)getSelectedValue(); | | 1 | ISearchResult result = (ISearchResult)getSelectedValue(); |
2 | try | | 2 | try |
3 | IDialogFacade facade = (IDialogFacade)ServiceFacadeRegistry.getInstance().getService(IDialogFacade.class); | | 3 | IDialogFacade facade = (IDialogFacade)ServiceFacadeRegistry.getInstance().getService(IDialogFacade.class); |
4 | facade.openMessage(result.getLocation()); | | 4 | facade.openMessage(result.getLocation()); |
Precondition Violations (1)
Row |
Violation |
1 | The refactoring of the clones is infeasible, because classes and do not have a common superclass |