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_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: 6 Number of AST nodes: 6
1
if (m.getType() == InstantMessagingModel.TYPE_YAHOO)
1
if (m.getType() == PhoneModel.TYPE_RADIO)
2
			imComboBox.setSelectedIndex(2);
2
			telephoneComboBox.setSelectedIndex(14);
3
		else if (m.getType() == InstantMessagingModel.TYPE_MSN)
3
		else if (m.getType() == 
4
			im
4
PhoneModel.TYPE_TELEX)
5
ComboBox.setSelectedIndex(3);
5
			telephoneComboBox.setSelectedIndex(15);
6
		else if (m.getType() == InstantMessagingModel.TYPE_ICQ)
6
		else if (m.getType() == PhoneModel.TYPE_TTY)
7
			imComboBox.setSelectedIndex(4);
7
			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)1.1
Clones locationClones are declared in the same class
Number of node comparisons27
  1. {Non-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)1.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    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 (6)
    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