if (action.equals("HIDE")) {
// disable selected item
if (selection != null) {
selection.setSelected(!selection.isSelected());
((CheckableItemListTableModel) list.getModel())
.updateRow(selection);
// list.repaint();
updateButtonState();
}
}
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: 5
|
|
Number of AST nodes: 4
|
|
1 | if (action.equals("HIDE")) {↵ | | |
|
2 | // disable selected item↵ | | |
|
3 | if (selection != null) {↵ | | 1 | if (selection != null) {↵
|
4 | selection.setSelected(!selection.isSelected());↵ | | 2 | selection.setSelected(!selection.isSelected());↵
|
5 | ((CheckableItemListTableModel) list.getModel())↵ | | 3 | ((CheckableItemListTableModel) list.getModel())↵
|
6 | .updateRow(selection);↵ | | 4 | .updateRow(selection);↵
|
|
7 | // list.repaint();↵ | | 5 | // list.repaint();↵
|
8 | updateButtonState();↵ | | 6 | updateButtonState();↵
|
9 | }↵ | | 7 | }
|
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) | 0.9 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
16 | if (selection != null) | | 11 | if (selection != null) |
17 | selection.setSelected(!selection.isSelected()); | | 12 | selection.setSelected(!selection.isSelected()); |
18 | ((CheckableItemListTableModel)list.getModel()).updateRow(selection); | | 13 | ((CheckableItemListTableModel)list.getModel()).updateRow(selection); |
19 | | | 14 | |
Precondition Violations (0)
Row |
Violation |