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 = arg0.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);
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/calendar/src/main/java/org/columba/calendar/ui/dialog/RecurrenceDialog.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 = arg0.getActionCommand();↵
|
|
| | | 2 |
↵
|
2 | if (action.equals("OK")) //$NON-NLS-1$↵ | | 3 | if (action.equals("OK")) //$NON-NLS-1$
↵
|
3 | {↵ | | 4 | {
↵
|
4 | // check if the user entered valid data↵ | | 5 | // check if the user entered valid data
↵
|
5 | success = true;↵ | | 6 | success = true;↵
|
|
| | | 7 |
↵
|
6 | updateComponents(false);↵ | | 8 | updateComponents(false);↵
|
|
| | | 9 |
↵
|
7 | setVisible(false);↵ | | 10 | setVisible(false);
↵
|
8 | } else if (action.equals("CANCEL")) {↵ | | 11 | } else if (action.equals("CANCEL")) {
↵
|
9 | success = false;↵ | | 12 | success = false;
↵
|
10 | setVisible(false); | | 13 | 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 = arg0.getActionCommand(); |
Precondition Violations (0)
Row |
Violation |