if (telephoneComboBox.getSelectedIndex() == 10) destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_OTHER_PHONE)); else if (telephoneComboBox.getSelectedIndex() == 11) destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_OTHER_FAX)); else if (telephoneComboBox.getSelectedIndex() == 12) destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_PAGER)); else if (telephoneComboBox.getSelectedIndex() == 13) destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_PRIMARY_PHONE)); else if (telephoneComboBox.getSelectedIndex() == 14) destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_RADIO)); else if (telephoneComboBox.getSelectedIndex() == 15) destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_TELEX)); else if (telephoneComboBox.getSelectedIndex() == 16) destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_TTY));
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)); else if (telephoneComboBox.getSelectedIndex() == 4) destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_CAR_PHONE)); else if (telephoneComboBox.getSelectedIndex() == 5) destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_COMPANY_PHONE)); else if (telephoneComboBox.getSelectedIndex() == 6) destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_HOME_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 fillPhoneModel(JTextField, JComboBox, ContactModel) Method name: void fillPhoneModel(JTextField, JComboBox, ContactModel)
Number of AST nodes: 14 Number of AST nodes: 7
1
if (telephoneComboBox.getSelectedIndex() == 10)
2
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
1
destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
3
						PhoneModel.TYPE_OTHER_PHONE));
2
						PhoneModel.TYPE_BUSINESS_PHONE));
4
			else if (telephoneComboBox.getSelectedIndex() == 11)
3
			else if (telephoneComboBox.getSelectedIndex() == 1)
5
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
4
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
6
						PhoneModel.TYPE_OTHER_FAX));
5
						PhoneModel.TYPE_ASSISTANT_PHONE));
7
			else if (telephoneComboBox.getSelectedIndex() == 12)
6
			else if (telephoneComboBox.getSelectedIndex() == 2)
8
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
7
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
9
						PhoneModel.TYPE_PAGER));
8
						PhoneModel.TYPE_BUSINESS_FAX));
10
			else if (telephoneComboBox.getSelectedIndex() == 13)
9
			else if (telephoneComboBox.getSelectedIndex() == 3)
11
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
10
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
12
						PhoneModel.TYPE_PRIMARY_PHONE));
11
						PhoneModel.TYPE_CALLBACK_PHONE));
13
			else if (telephoneComboBox.getSelectedIndex() == 14)
12
			else if (telephoneComboBox.getSelectedIndex() == 4)
14
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
13
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
15
						PhoneModel.TYPE_RADIO));
14
						PhoneModel.TYPE_CAR_PHONE));
16
			else if (telephoneComboBox.getSelectedIndex() == 15)
15
			else if (telephoneComboBox.getSelectedIndex() == 5)
17
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
16
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
18
						PhoneModel.TYPE_TELEX));
17
						PhoneModel.TYPE_COMPANY_PHONE));
19
			else if (telephoneComboBox.getSelectedIndex() == 16)
18
			else if (telephoneComboBox.getSelectedIndex() == 6)
20
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
19
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
21
						PhoneModel.TYPE_TTY));
20
						PhoneModel.TYPE_HOME_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 in the same method
Number of node comparisons0