String action = ev.getActionCommand();
if (action.equals("OK")) {
success = true;
setVisible(false);
} else if (action.equals("CANCEL")) {
success = false;
setVisible(false);
}
String action = e.getActionCommand();
if (action.equals("OK")) {
bool = true;
setVisible(false);
} else if (action.equals("CANCEL")) {
bool = false;
setVisible(false);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/dialog/DateChooserDialog.java
|
|
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/tree/util/SelectAddressbookFolderDialog.java
|
Method name: void actionPerformed(ActionEvent)
|
|
Method name: void actionPerformed(ActionEvent)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 5
|
|
1 | String action = ev.getActionCommand();↵ | | 1 | String action = e.getActionCommand();↵
|
|
2 | if (action.equals("OK")) {↵ | | 2 | if (action.equals("OK")) {↵
|
3 | success = true;↵ | | |
|
4 | ↵ | | 3 | bool = true;↵
|
5 | setVisible(false);↵ | | 4 | setVisible(false);↵
|
6 | } else if (action.equals("CANCEL")) {↵ | | 5 | } else if (action.equals("CANCEL")) {↵
|
7 | success = false;↵ | | |
|
8 | ↵ | | 6 | bool = false;↵
|
9 | setVisible(false);↵ | | 7 | setVisible(false);
|
10 | } | | | |
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 = ev.getActionCommand(); | | 1 | String action = e.getActionCommand(); |
Precondition Violations (0)
Row |
Violation |