if (selection != null) {
selection.setSelected(!selection.isSelected());
((CheckableItemListTableModel) list.getModel())
.updateRow(selection);
// list.repaint();
updateButtonState();
}
if (action.equals("HIDE")) {
// disable selected item
if (selection != null) {
selection.setSelected(!selection.isSelected());
((CheckableItemListTableModel) list.getModel())
.updateRow(selection);
// list.repaint();
updateButtonState();
}
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/columns/ColumnConfigDialog.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/columns/ColumnConfigDialog.java
|
Method name: void actionPerformed(ActionEvent)
|
|
Method name: void actionPerformed(ActionEvent)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 5
|
|
| | | 1 | if (action.equals("HIDE")) {↵
|
| | | 2 | // disable selected item↵
|
1 | if (selection != null) {↵ | | 3 | if (selection != null) {↵
|
2 | selection.setSelected(!selection.isSelected());↵ | | 4 | selection.setSelected(!selection.isSelected());↵
|
3 | ((CheckableItemListTableModel) list.getModel())↵ | | 5 | ((CheckableItemListTableModel) list.getModel())↵
|
4 | .updateRow(selection);↵ | | 6 | .updateRow(selection);↵
|
|
5 | // list.repaint();↵ | | 7 | // list.repaint();↵
|
6 | updateButtonState();↵ | | 8 | updateButtonState();↵
|
7 | } | | 9 | }↵
|
| | | 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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 17 |
-
{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) | 2.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
11 | if (selection != null) | | 16 | if (selection != null) |
12 | selection.setSelected(!selection.isSelected()); | | 17 | selection.setSelected(!selection.isSelected()); |
13 | ((CheckableItemListTableModel)list.getModel()).updateRow(selection); | | 18 | ((CheckableItemListTableModel)list.getModel()).updateRow(selection); |
14 | | | 19 | |
Precondition Violations (0)
Row |
Violation |