super.setModel(model);
initColumns();
setIntercellSpacing(new Dimension(0, 0));
if ((headerList == null) || (headerList.count() == 0)) {
// table is empty
// -> just display empty table
getTreeModel().nodeStructureChanged(getRootNode());
fireTableDataChanged();
return;
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/list/CheckableList.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/table/model/HeaderTableModel.java
|
Method name: void setModel(TableModel)
|
|
Method name: void reset()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 4
|
|
1 | super.setModel(model);↵ | | |
|
|
2 | initColumns();↵ | | |
|
|
3 | setIntercellSpacing(new Dimension(0, 0)); | | 1 | if ((headerList == null) || (headerList.count() == 0)) {↵
|
| | | 2 | // table is empty↵
|
| | | 3 | // -> just display empty table↵
|
| | | 4 | ↵
|
| | | 5 | getTreeModel().nodeStructureChanged(getRootNode());↵
|
| | | 6 | ↵
|
| | | 7 | fireTableDataChanged();↵
|
| | | 8 | ↵
|
| | | 9 | return;↵
|
| | | 10 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | super.setModel(model); | | 7 | getTreeModel().nodeStructureChanged(getRootNode()); |
2 | initColumns(); | | 8 | fireTableDataChanged(); |
3 | setIntercellSpacing(new Dimension(0, 0)); | | | |
| | | 9 | return; |
Precondition Violations (5)
Row |
Violation |
1 | Expression super.setModel(model) is a void method call, and thus it cannot be parameterized |
2 | Expression getTreeModel().nodeStructureChanged(getRootNode()) is a void method call, and thus it cannot be parameterized |
3 | Expression initColumns() is a void method call, and thus it cannot be parameterized |
4 | Expression fireTableDataChanged() is a void method call, and thus it cannot be parameterized |
5 | Unmatched return; |