if (m.getType() == InstantMessagingModel.TYPE_JABBER) imComboBox.setSelectedIndex(0); else if (m.getType() == InstantMessagingModel.TYPE_AIM) imComboBox.setSelectedIndex(1); else if (m.getType() == InstantMessagingModel.TYPE_YAHOO) imComboBox.setSelectedIndex(2); else if (m.getType() == InstantMessagingModel.TYPE_MSN) imComboBox.setSelectedIndex(3); else if (m.getType() == InstantMessagingModel.TYPE_ICQ) imComboBox.setSelectedIndex(4);
if (m.getType() == PhoneModel.TYPE_PAGER) telephoneComboBox.setSelectedIndex(12); else if (m.getType() == PhoneModel.TYPE_PRIMARY_PHONE) telephoneComboBox.setSelectedIndex(13); else if (m.getType() == PhoneModel.TYPE_RADIO) telephoneComboBox.setSelectedIndex(14); else if (m.getType() == PhoneModel.TYPE_TELEX) telephoneComboBox.setSelectedIndex(15); else if (m.getType() == PhoneModel.TYPE_TTY) telephoneComboBox.setSelectedIndex(16);
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 fillIMView(InstantMessagingModel, JComboBox, JTextField) Method name: void fillPhoneView(PhoneModel, JComboBox, JTextField)
Number of AST nodes: 10 Number of AST nodes: 10
1
if (m.getType() == InstantMessagingModel.TYPE_JABBER)
1
if (m.getType() == PhoneModel.TYPE_PAGER)
2
			imComboBox.setSelectedIndex(0);
2
			telephoneComboBox.setSelectedIndex(12);
3
		else if (m.getType() == InstantMessagingModel.TYPE_AIM)
3
		else if (m.getType() == 
4
			im
4
PhoneModel.TYPE_PRIMARY_PHONE)
5
ComboBox.setSelectedIndex(1);
5
			telephoneComboBox.setSelectedIndex(13);
6
		else if (m.getType() == InstantMessagingModel.TYPE_YAHOO)
6
		else if (m.getType() == PhoneModel.TYPE_RADIO)
7
			imComboBox.setSelectedIndex(2);
7
			telephoneComboBox.setSelectedIndex(14);
8
		else if (m.getType() == InstantMessagingModel.TYPE_MSN)
8
		else if (m.getType() == 
9
			im
9
PhoneModel.TYPE_TELEX)
10
ComboBox.setSelectedIndex(3);
10
			telephoneComboBox.setSelectedIndex(15);
11
		else if (m.getType() == InstantMessagingModel.TYPE_ICQ)
11
		else if (m.getType() == PhoneModel.TYPE_TTY)
12
			imComboBox.setSelectedIndex(4);
12
			telephoneComboBox.setSelectedIndex(16);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)2.9
Clones locationClones are declared in the same class
Number of node comparisons70
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements10
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (m.getType() == InstantMessagingModel.TYPE_JABBER)
    1
    if (m.getType() == InstantMessagingModel.TYPE_JABBER)
    25
    if (m.getType() == PhoneModel.TYPE_PAGER)
    Differences
    Expression1Expression2Difference
    org.columba.addressbook.model.InstantMessagingModelorg.columba.addressbook.model.PhoneModelVARIABLE_TYPE_MISMATCH
    org.columba.addressbook.model.InstantMessagingModelorg.columba.addressbook.model.PhoneModelVARIABLE_TYPE_MISMATCH
    TYPE_JABBERTYPE_PAGERVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.columba.addressbook.model.InstantMessagingModel of variable m does not match with type org.columba.addressbook.model.PhoneModel of variable m
    • Make classes org.columba.addressbook.model.InstantMessagingModel and org.columba.addressbook.model.PhoneModel extend a common superclass
    Type org.columba.addressbook.model.InstantMessagingModel of variable InstantMessagingModel does not match with type org.columba.addressbook.model.PhoneModel of variable PhoneModel
    • Make classes org.columba.addressbook.model.InstantMessagingModel and org.columba.addressbook.model.PhoneModel extend a common superclass
    25
    if (m.getType() == PhoneModel.TYPE_PAGER)
    2
    imComboBox.setSelectedIndex(0);
    2
    imComboBox.setSelectedIndex(0);
    26
    telephoneComboBox.setSelectedIndex(12);
    Differences
    Expression1Expression2Difference
    012LITERAL_VALUE_MISMATCH
    imComboBoxtelephoneComboBoxVARIABLE_NAME_MISMATCH
    26
    telephoneComboBox.setSelectedIndex(12);
    3
    else if (m.getType() == InstantMessagingModel.TYPE_AIM)
    3
    else if (m.getType() == InstantMessagingModel.TYPE_AIM)
    27
    else if (m.getType() == PhoneModel.TYPE_PRIMARY_PHONE)
    Differences
    Expression1Expression2Difference
    org.columba.addressbook.model.InstantMessagingModelorg.columba.addressbook.model.PhoneModelVARIABLE_TYPE_MISMATCH
    org.columba.addressbook.model.InstantMessagingModelorg.columba.addressbook.model.PhoneModelVARIABLE_TYPE_MISMATCH
    TYPE_AIMTYPE_PRIMARY_PHONEVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.columba.addressbook.model.InstantMessagingModel of variable m does not match with type org.columba.addressbook.model.PhoneModel of variable m
    • Make classes org.columba.addressbook.model.InstantMessagingModel and org.columba.addressbook.model.PhoneModel extend a common superclass
    Type org.columba.addressbook.model.InstantMessagingModel of variable InstantMessagingModel does not match with type org.columba.addressbook.model.PhoneModel of variable PhoneModel
    • Make classes org.columba.addressbook.model.InstantMessagingModel and org.columba.addressbook.model.PhoneModel extend a common superclass
    27
    else if (m.getType() == PhoneModel.TYPE_PRIMARY_PHONE)
    4
    imComboBox.setSelectedIndex(1);
    4
    imComboBox.setSelectedIndex(1);
    28
    telephoneComboBox.setSelectedIndex(13);
    Differences
    Expression1Expression2Difference
    113LITERAL_VALUE_MISMATCH
    imComboBoxtelephoneComboBoxVARIABLE_NAME_MISMATCH
    28
    telephoneComboBox.setSelectedIndex(13);
    5
    else if (m.getType() == InstantMessagingModel.TYPE_YAHOO)
    5
    else if (m.getType() == InstantMessagingModel.TYPE_YAHOO)
    29
    else if (m.getType() == PhoneModel.TYPE_RADIO)
    Differences
    Expression1Expression2Difference
    org.columba.addressbook.model.InstantMessagingModelorg.columba.addressbook.model.PhoneModelVARIABLE_TYPE_MISMATCH
    org.columba.addressbook.model.InstantMessagingModelorg.columba.addressbook.model.PhoneModelVARIABLE_TYPE_MISMATCH
    TYPE_YAHOOTYPE_RADIOVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.columba.addressbook.model.InstantMessagingModel of variable m does not match with type org.columba.addressbook.model.PhoneModel of variable m
    • Make classes org.columba.addressbook.model.InstantMessagingModel and org.columba.addressbook.model.PhoneModel extend a common superclass
    Type org.columba.addressbook.model.InstantMessagingModel of variable InstantMessagingModel does not match with type org.columba.addressbook.model.PhoneModel of variable PhoneModel
    • Make classes org.columba.addressbook.model.InstantMessagingModel and org.columba.addressbook.model.PhoneModel extend a common superclass
    29
    else if (m.getType() == PhoneModel.TYPE_RADIO)
    6
    imComboBox.setSelectedIndex(2);
    6
    imComboBox.setSelectedIndex(2);
    30
    telephoneComboBox.setSelectedIndex(14);
    Differences
    Expression1Expression2Difference
    214LITERAL_VALUE_MISMATCH
    imComboBoxtelephoneComboBoxVARIABLE_NAME_MISMATCH
    30
    telephoneComboBox.setSelectedIndex(14);
    7
    else if (m.getType() == InstantMessagingModel.TYPE_MSN)
    7
    else if (m.getType() == InstantMessagingModel.TYPE_MSN)
    31
    else if (m.getType() == PhoneModel.TYPE_TELEX)
    Differences
    Expression1Expression2Difference
    org.columba.addressbook.model.InstantMessagingModelorg.columba.addressbook.model.PhoneModelVARIABLE_TYPE_MISMATCH
    org.columba.addressbook.model.InstantMessagingModelorg.columba.addressbook.model.PhoneModelVARIABLE_TYPE_MISMATCH
    TYPE_MSNTYPE_TELEXVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.columba.addressbook.model.InstantMessagingModel of variable m does not match with type org.columba.addressbook.model.PhoneModel of variable m
    • Make classes org.columba.addressbook.model.InstantMessagingModel and org.columba.addressbook.model.PhoneModel extend a common superclass
    Type org.columba.addressbook.model.InstantMessagingModel of variable InstantMessagingModel does not match with type org.columba.addressbook.model.PhoneModel of variable PhoneModel
    • Make classes org.columba.addressbook.model.InstantMessagingModel and org.columba.addressbook.model.PhoneModel extend a common superclass
    31
    else if (m.getType() == PhoneModel.TYPE_TELEX)
    8
    imComboBox.setSelectedIndex(3);
    8
    imComboBox.setSelectedIndex(3);
    32
    telephoneComboBox.setSelectedIndex(15);
    Differences
    Expression1Expression2Difference
    315LITERAL_VALUE_MISMATCH
    imComboBoxtelephoneComboBoxVARIABLE_NAME_MISMATCH
    32
    telephoneComboBox.setSelectedIndex(15);
    9
    else if (m.getType() == InstantMessagingModel.TYPE_ICQ)
    9
    else if (m.getType() == InstantMessagingModel.TYPE_ICQ)
    33
    else if (m.getType() == PhoneModel.TYPE_TTY)
    Differences
    Expression1Expression2Difference
    org.columba.addressbook.model.InstantMessagingModelorg.columba.addressbook.model.PhoneModelVARIABLE_TYPE_MISMATCH
    org.columba.addressbook.model.InstantMessagingModelorg.columba.addressbook.model.PhoneModelVARIABLE_TYPE_MISMATCH
    TYPE_ICQTYPE_TTYVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.columba.addressbook.model.InstantMessagingModel of variable m does not match with type org.columba.addressbook.model.PhoneModel of variable m
    • Make classes org.columba.addressbook.model.InstantMessagingModel and org.columba.addressbook.model.PhoneModel extend a common superclass
    Type org.columba.addressbook.model.InstantMessagingModel of variable InstantMessagingModel does not match with type org.columba.addressbook.model.PhoneModel of variable PhoneModel
    • Make classes org.columba.addressbook.model.InstantMessagingModel and org.columba.addressbook.model.PhoneModel extend a common superclass
    33
    else if (m.getType() == PhoneModel.TYPE_TTY)
    10
    imComboBox.setSelectedIndex(4);
    10
    imComboBox.setSelectedIndex(4);
    34
    telephoneComboBox.setSelectedIndex(16);
    Differences
    Expression1Expression2Difference
    416LITERAL_VALUE_MISMATCH
    imComboBoxtelephoneComboBoxVARIABLE_NAME_MISMATCH
    34
    telephoneComboBox.setSelectedIndex(16);
    Precondition Violations (10)
    Row Violation
    1Type org.columba.addressbook.model.InstantMessagingModel of variable m does not match with type org.columba.addressbook.model.PhoneModel of variable m
    2Type org.columba.addressbook.model.InstantMessagingModel of variable InstantMessagingModel does not match with type org.columba.addressbook.model.PhoneModel of variable PhoneModel
    3Type org.columba.addressbook.model.InstantMessagingModel of variable m does not match with type org.columba.addressbook.model.PhoneModel of variable m
    4Type org.columba.addressbook.model.InstantMessagingModel of variable InstantMessagingModel does not match with type org.columba.addressbook.model.PhoneModel of variable PhoneModel
    5Type org.columba.addressbook.model.InstantMessagingModel of variable m does not match with type org.columba.addressbook.model.PhoneModel of variable m
    6Type org.columba.addressbook.model.InstantMessagingModel of variable InstantMessagingModel does not match with type org.columba.addressbook.model.PhoneModel of variable PhoneModel
    7Type org.columba.addressbook.model.InstantMessagingModel of variable m does not match with type org.columba.addressbook.model.PhoneModel of variable m
    8Type org.columba.addressbook.model.InstantMessagingModel of variable InstantMessagingModel does not match with type org.columba.addressbook.model.PhoneModel of variable PhoneModel
    9Type org.columba.addressbook.model.InstantMessagingModel of variable m does not match with type org.columba.addressbook.model.PhoneModel of variable m
    10Type org.columba.addressbook.model.InstantMessagingModel of variable InstantMessagingModel does not match with type org.columba.addressbook.model.PhoneModel of variable PhoneModel