if (imComboBox.getSelectedIndex() == 3) destModel.addInstantMessaging(new InstantMessagingModel( imTextField.getText(), InstantMessagingModel.TYPE_MSN)); else if (imComboBox.getSelectedIndex() == 4) destModel.addInstantMessaging(new InstantMessagingModel( imTextField.getText(), InstantMessagingModel.TYPE_ICQ));
destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_BUSINESS_PHONE)); else if (telephoneComboBox.getSelectedIndex() == 1) destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_ASSISTANT_PHONE));
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 fillIMModel(JTextField, JComboBox, ContactModel) Method name: void fillPhoneModel(JTextField, JComboBox, ContactModel)
Number of AST nodes: 4 Number of AST nodes: 2
1
if (imComboBox.getSelectedIndex() == 3)
2
				destModel.addInstantMessaging(new InstantMessagingModel(
3
						imTextField.getText(), InstantMessagingModel.TYPE_MSN
1
destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
4
));
2
						PhoneModel.TYPE_BUSINESS_PHONE));
5
			else if (imComboBox.getSelectedIndex() == 4)
3
			else if (telephoneComboBox.getSelectedIndex() == 1)
6
				destModel.addInstantMessaging(new InstantMessagingModel(
4
				destModel.add
7
						imTextField.getText(), InstantMessagingModel.TYPE_ICQ
5
Phone(new PhoneModel(telephoneTextField.getText(),
8
));
6
						PhoneModel.TYPE_ASSISTANT_PHONE));
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons0