if (it.hasNext()) { PhoneModel m = (PhoneModel) it.next(); fillPhoneView(m, telephoneComboBox3, telephoneTextField3); } if (it.hasNext()) { PhoneModel m = (PhoneModel) it.next(); fillPhoneView(m, telephoneComboBox4, telephoneTextField4); }
if (it.hasNext()) { PhoneModel m = (PhoneModel) it.next(); fillPhoneView(m, telephoneComboBox1, telephoneTextField1); } if (it.hasNext()) { PhoneModel m = (PhoneModel) it.next(); fillPhoneView(m, telephoneComboBox2, telephoneTextField2); }
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
				PhoneModel m = (PhoneModel) it.next();
2
				PhoneModel m = (PhoneModel) it.next();
3
				fillPhoneView(m, telephoneComboBox3, telephoneTextField3);
3
				fillPhoneView(m, telephoneComboBox1, telephoneTextField1);
4
			}
4
			}
5
			if (it.hasNext()) {
5
			if (it.hasNext()) {
6
				PhoneModel m = (PhoneModel) it.next();
6
				PhoneModel m = (PhoneModel) it.next();
7
				fillPhoneView(m, telephoneComboBox4, telephoneTextField4);
7
				fillPhoneView(m, telephoneComboBox2, telephoneTextField2);
8
			}
8
			}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.5
Clones locationClones are in the same method
Number of node comparisons29
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2615.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    46
    if (it.hasNext())
    40
    if (it.hasNext())
    47
    PhoneModel m = (PhoneModel)it.next();
    41
    PhoneModel m = (PhoneModel)it.next();
    48
    fillPhoneView(m, telephoneComboBox3, telephoneTextField3);
    48
    fillPhoneView(m, telephoneComboBox3, telephoneTextField3);
    42
    fillPhoneView(m, telephoneComboBox1, telephoneTextField1);
    Differences
    Expression1Expression2Difference
    telephoneComboBox3telephoneComboBox1VARIABLE_NAME_MISMATCH
    telephoneTextField3telephoneTextField1VARIABLE_NAME_MISMATCH
    42
    fillPhoneView(m, telephoneComboBox1, telephoneTextField1);
    49
    if (it.hasNext())
    43
    if (it.hasNext())
    50
    PhoneModel m = (PhoneModel)it.next();
    44
    PhoneModel m = (PhoneModel)it.next();
    51
    fillPhoneView(m, telephoneComboBox4, telephoneTextField4);
    51
    fillPhoneView(m, telephoneComboBox4, telephoneTextField4);
    45
    fillPhoneView(m, telephoneComboBox2, telephoneTextField2);
    Differences
    Expression1Expression2Difference
    telephoneComboBox4telephoneComboBox2VARIABLE_NAME_MISMATCH
    telephoneTextField4telephoneTextField2VARIABLE_NAME_MISMATCH
    45
    fillPhoneView(m, telephoneComboBox2, telephoneTextField2);
    Precondition Violations (0)
    Row Violation