if (it.hasNext()) {
AddressModel m = (AddressModel) it.next();
fillAddressView(m);
}
if (it.hasNext()) {
AddressModel m = (AddressModel) it.next();
fillAddressView(m);
}
if (it.hasNext()) {
AddressModel m = (AddressModel) it.next();
fillAddressView(m);
}
if (it.hasNext()) {
AddressModel m = (AddressModel) it.next();
fillAddressView(m);
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/dialog/contact/ContactEditorDialog.java
|
|
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/dialog/contact/ContactEditorDialog.java
|
Method name: void updateComponents(boolean)
|
|
Method name: void updateComponents(boolean)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if (it.hasNext()) {↵ | | 1 | if (it.hasNext()) {↵
|
2 | AddressModel m = (AddressModel) it.next();↵ | | 2 | AddressModel m = (AddressModel) it.next();↵
|
3 | fillAddressView(m);↵ | | 3 | fillAddressView(m);↵
|
4 | }↵ | | 4 | }↵
|
5 | if (it.hasNext()) {↵ | | 5 | if (it.hasNext()) {↵
|
6 | AddressModel m = (AddressModel) it.next();↵ | | 6 | AddressModel m = (AddressModel) it.next();↵
|
7 | fillAddressView(m);↵ | | 7 | fillAddressView(m);↵
|
8 | } | | 8 | }
|
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 29 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
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) | 871.1 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
69 | if (it.hasNext()) | | 69 | if (it.hasNext()) |
70 | AddressModel m = (AddressModel)it.next(); | | 70 | AddressModel m = (AddressModel)it.next(); |
71 | | | 71 | |
72 | if (it.hasNext()) | | 66 | if (it.hasNext()) |
73 | AddressModel m = (AddressModel)it.next(); | | 67 | AddressModel m = (AddressModel)it.next(); |
74 | | | 68 | |
Precondition Violations (0)
Row |
Violation |