String action = e.getActionCommand();
if (action.equals("OK")) //$NON-NLS-1$
{
// check if the user entered valid data
success = true;
updateComponents(false);
setVisible(false);
} else if (action.equals("CANCEL")) {
success = false;
setVisible(false);
String action = event.getActionCommand();
if (action.equals("OK")) {
result = true;
updateComponents(false);
setVisible(false);
} else if (action.equals("CANCEL")) {
result = false;
setVisible(false);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/dialog/EditEventDialog.java
|
|
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/dialog/contact/ContactEditorDialog.java
|
Method name: void actionPerformed(ActionEvent)
|
|
Method name: void actionPerformed(ActionEvent)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | String action = e.getActionCommand();↵ | | 1 | String action = event.getActionCommand();↵
|
|
2 | if (action.equals("OK")) //$NON-NLS-1$↵ | | 2 | if (action.equals("OK")) ↵
|
3 | {↵ | | |
|
4 | // check if the user entered valid data↵ | | |
|
5 | success↵ | | 3 | {↵
|
6 | = true;↵ | | 4 | result = true;↵
|
|
7 | updateComponents(false);↵ | | 5 | updateComponents(false);↵
|
|
8 | setVisible(false);↵ | | 6 | setVisible(false);↵
|
9 | } else if (action.equals("CANCEL")) {↵ | | 7 | } else if (action.equals("CANCEL")) {↵
|
10 | success = false;↵ | | 8 | result = false;↵
|
11 | setVisible(false); | | 9 | setVisible(false);
|
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 1 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 1 |
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) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | String action = e.getActionCommand(); | | 1 | String action = event.getActionCommand(); |
Precondition Violations (0)
Row |
Violation |