Iterator it = list.values().iterator();
int i = 0;
while (it.hasNext()) {
rows[i++] = (ContactModelPartial) it.next();
}
fireTableDataChanged();
Iterator it = headerItemList.values().iterator();
int i = 0;
while (it.hasNext()) {
rows[i++] = (ContactModelPartial) it.next();
}
fireTableDataChanged();
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/table/model/AddressbookTableModel.java
|
|
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/table/model/AddressbookTableModel.java
|
Method name: void setContactItemMap(Map)
|
|
Method name: void update()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | Iterator it = list.values().iterator();↵ | | 1 | Iterator it = headerItemList.values().iterator();↵
|
2 | int i = 0;↵ | | 2 | int i = 0;↵
|
3 | while (it.hasNext()) {↵ | | 3 | while (it.hasNext()) {↵
|
4 | rows[i++] = (ContactModelPartial) it.next();↵ | | 4 | rows[i++] = (ContactModelPartial) it.next();↵
|
5 | }↵ | | 5 | }↵
|
|
6 | fireTableDataChanged(); | | 6 | fireTableDataChanged();
|
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 6.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | Iterator it = list.values().iterator(); | | 2 | Iterator it = headerItemList.values().iterator(); |
11 | int i = 0; | | 3 | int i = 0; |
12 | while (it.hasNext()) | | 4 | while (it.hasNext()) |
13 | rows[i++] = (ContactModelPartial)it.next(); | | 5 | rows[i++] = (ContactModelPartial)it.next(); |
14 | fireTableDataChanged(); | | 6 | fireTableDataChanged(); |
Precondition Violations (0)
Row |
Violation |