try {
// modify card properties in folder
folder.modify(contactId, dialog.getDestModel());
} catch (Exception e1) {
if (Logging.DEBUG)
e1.printStackTrace();
ErrorDialog.createDialog(e1.getMessage(), e1);
}
try {
// modify card properties in folder
selectedFolder.modify(selected.getId(), dialog.getDestModel());
} catch (Exception e1) {
if (Logging.DEBUG)
e1.printStackTrace();
ErrorDialog.createDialog(e1.getMessage(), e1);
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/facade/DialogFacade.java
|
|
File path: /columba-1.4-src/contact/src/main/java/org/columba/contact/gui/box/ContactBox.java
|
Method name: void openContactDialog(URI)
|
|
Method name: void openEditContactDialog(IContactModelPartial)
|
Number of AST nodes: 2
|
|
Number of AST nodes: 2
|
|
1 | try {↵ | | 1 | try {↵
|
2 | // modify card properties in folder↵ | | 2 | // modify card properties in folder↵
|
3 | folder.modify(contactId, dialog.getDestModel());↵ | | 3 | selectedFolder.modify(selected.getId(), dialog.getDestModel());↵
|
4 | } catch (Exception e1) {↵ | | 4 | } catch (Exception e1) {↵
|
5 | if (Logging.DEBUG)↵ | | 5 | if (Logging.DEBUG)↵
|
6 | e1.printStackTrace();↵ | | 6 | e1.printStackTrace();↵
|
|
7 | ErrorDialog.createDialog(e1.getMessage(), e1);↵ | | 7 | ErrorDialog.createDialog(e1.getMessage(), e1);↵
|
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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 5 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
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) | 2.2 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
15 | try | | 10 | try |
16 | folder.modify(contactId, dialog.getDestModel()); | | 11 | selectedFolder.modify(selected.getId(), dialog.getDestModel()); |
Precondition Violations (1)
Row |
Violation |
1 | The refactoring of the clones is infeasible, because classes org.columba.addressbook.facade.DialogFacade and org.columba.contact.gui.box.ContactBox do not have a common superclass |