destModel.addInstantMessaging(new InstantMessagingModel( imTextField.getText(), InstantMessagingModel.TYPE_JABBER)); else if (imComboBox.getSelectedIndex() == 1) destModel.addInstantMessaging(new InstantMessagingModel( imTextField.getText(), InstantMessagingModel.TYPE_AIM)); else if (imComboBox.getSelectedIndex() == 2) destModel .addInstantMessaging(new InstantMessagingModel( imTextField.getText(), InstantMessagingModel.TYPE_YAHOO)); else if (imComboBox.getSelectedIndex() == 3) destModel.addInstantMessaging(new InstantMessagingModel( imTextField.getText(), InstantMessagingModel.TYPE_MSN));
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)); else if (telephoneComboBox.getSelectedIndex() == 2) destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_BUSINESS_FAX)); else if (telephoneComboBox.getSelectedIndex() == 3) destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_CALLBACK_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: 4
1
destModel.addInstantMessaging(new InstantMessagingModel(
1
destModel.add
2
						imTextField.getText(),
2
Phone(new PhoneModel(telephoneTextField.getText(),
3
						InstantMessagingModel.TYPE_JABBER));
3
						PhoneModel.TYPE_BUSINESS_PHONE));
4
			else if (imComboBox.getSelectedIndex() == 1)
4
			else if (telephoneComboBox.getSelectedIndex() == 1)
5
				destModel.addInstantMessaging(new InstantMessagingModel(
5
				destModel.add
6
						imTextField.getText(), InstantMessagingModel.TYPE_AIM
6
Phone(new PhoneModel(telephoneTextField.getText(),
7
));
7
						PhoneModel.TYPE_ASSISTANT_PHONE));
8
			else if (imComboBox.getSelectedIndex() == 2)
8
			else if (telephoneComboBox.getSelectedIndex() == 2)
9
				destModel
9
				destModel
10
						.addInstantMessaging(new InstantMessagingModel(
11
								imTextField.getText(),
10
.addPhone(new PhoneModel(telephoneTextField.getText(),
12
								InstantMessagingModel.TYPE_YAHOO));
11
						PhoneModel.TYPE_BUSINESS_FAX));
13
			else if (imComboBox.getSelectedIndex() == 3)
12
			else if (telephoneComboBox.getSelectedIndex() == 3)
14
				destModel.addInstantMessaging(new InstantMessagingModel(
13
				destModel.add
15
						imTextField.getText(), InstantMessagingModel.TYPE_MSN
14
Phone(new PhoneModel(telephoneTextField.getText(),
16
));
15
						PhoneModel.TYPE_CALLBACK_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 comparisons1