if (it.hasNext()) {
IEmailModel m = (IEmailModel) it.next();
fillEmailView(m, emailComboBox2, emailTextField2);
}
if (it.hasNext()) {
IEmailModel m = (IEmailModel) it.next();
fillEmailView(m, emailComboBox3, emailTextField3);
}
if (it.hasNext()) {
IEmailModel m = (IEmailModel) it.next();
fillEmailView(m, emailComboBox4, emailTextField4);
}
if (it.hasNext()) {
IEmailModel m = (IEmailModel) it.next();
fillEmailView(m, emailComboBox1, emailTextField1);
}
if (it.hasNext()) {
IEmailModel m = (IEmailModel) it.next();
fillEmailView(m, emailComboBox2, emailTextField2);
}
if (it.hasNext()) {
IEmailModel m = (IEmailModel) it.next();
fillEmailView(m, emailComboBox3, emailTextField3);
}
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: 9
|
|
Number of AST nodes: 9
|
|
| | | 1 | if (it.hasNext()) {↵
|
| | | 2 | IEmailModel m = (IEmailModel) it.next();↵
|
| | | 3 | fillEmailView(m, emailComboBox1, emailTextField1);↵
|
| | | 4 | }↵
|
1 | if (it.hasNext()) {↵ | | 5 | if (it.hasNext()) {↵
|
2 | IEmailModel m = (IEmailModel) it.next();↵ | | 6 | IEmailModel m = (IEmailModel) it.next();↵
|
3 | fillEmailView(m, emailComboBox2, emailTextField2);↵ | | 7 | fillEmailView(m, emailComboBox2, emailTextField2);↵
|
4 | }↵ | | 8 | }↵
|
5 | if (it.hasNext()) {↵ | | 9 | if (it.hasNext()) {↵
|
6 | IEmailModel m = (IEmailModel) it.next();↵ | | 10 | IEmailModel m = (IEmailModel) it.next();↵
|
7 | fillEmailView(m, emailComboBox3, emailTextField3);↵ | | 11 | fillEmailView(m, emailComboBox3, emailTextField3);↵
|
8 | }↵ | | 12 | }
|
9 | if (it.hasNext()) {↵ | | | |
10 | IEmailModel m = (IEmailModel) it.next();↵ | | | |
11 | fillEmailView(m, emailComboBox4, emailTextField4);↵ | | | |
12 | } | | | |
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 58 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 9 |
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) | 1601.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
30 | if (it.hasNext()) | | 30 | if (it.hasNext()) |
31 | IEmailModel m = (IEmailModel)it.next(); | | 31 | IEmailModel m = (IEmailModel)it.next(); |
32 | fillEmailView(m, emailComboBox2, emailTextField2); | | 32 | fillEmailView(m, emailComboBox2, emailTextField2); |
33 | if (it.hasNext()) | | 33 | if (it.hasNext()) |
34 | IEmailModel m = (IEmailModel)it.next(); | | 34 | IEmailModel m = (IEmailModel)it.next(); |
35 | fillEmailView(m, emailComboBox3, emailTextField3); | | 35 | fillEmailView(m, emailComboBox3, emailTextField3); |
36 | if (it.hasNext()) | | 27 | if (it.hasNext()) |
37 | IEmailModel m = (IEmailModel)it.next(); | | 28 | IEmailModel m = (IEmailModel)it.next(); |
38 | fillEmailView(m, emailComboBox4, emailTextField4); | | 29 | fillEmailView(m, emailComboBox1, emailTextField1); |
Precondition Violations (0)
Row |
Violation |