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)); else if (telephoneComboBox.getSelectedIndex() == 7) destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_HOME_FAX));
if (telephoneComboBox.getSelectedIndex() == 9) destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_MOBILE_PHONE)); else 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));
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: 8 Number of AST nodes: 16
1
if (telephoneComboBox.getSelectedIndex() == 9)
1
destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
2
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
2
						PhoneModel.TYPE_BUSINESS_PHONE));
3
						PhoneModel.TYPE_MOBILE_PHONE));
3
			else if (telephoneComboBox.getSelectedIndex() == 1)
4
			else if (telephoneComboBox.getSelectedIndex() == 10)
4
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
5
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
5
						PhoneModel.TYPE_ASSISTANT_PHONE));
6
						PhoneModel.TYPE_OTHER_PHONE));
6
			else if (telephoneComboBox.getSelectedIndex() == 2)
7
			else if (telephoneComboBox.getSelectedIndex() == 11)
7
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
8
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
8
						PhoneModel.TYPE_BUSINESS_FAX));
9
						PhoneModel.TYPE_OTHER_FAX));
9
			else if (telephoneComboBox.getSelectedIndex() == 3)
10
			else if (telephoneComboBox.getSelectedIndex() == 12)
10
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
11
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
11
						PhoneModel.TYPE_CALLBACK_PHONE));
12
						PhoneModel.TYPE_PAGER));
12
			else if (telephoneComboBox.getSelectedIndex() == 4)
13
			else if (telephoneComboBox.getSelectedIndex() == 13)
13
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
14
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
14
						PhoneModel.TYPE_CAR_PHONE));
15
						PhoneModel.TYPE_PRIMARY_PHONE));
15
			else if (telephoneComboBox.getSelectedIndex() == 5)
16
			else if (telephoneComboBox.getSelectedIndex() == 14)
16
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
17
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
17
						PhoneModel.TYPE_COMPANY_PHONE));
18
						PhoneModel.TYPE_RADIO));
18
			else if (telephoneComboBox.getSelectedIndex() == 6)
19
			else if (telephoneComboBox.getSelectedIndex() == 15)
19
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
20
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
20
						PhoneModel.TYPE_HOME_PHONE));
21
						PhoneModel.TYPE_TELEX));
21
			else if (telephoneComboBox.getSelectedIndex() == 7)
22
			else if (telephoneComboBox.getSelectedIndex() == 16)
22
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
23
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
23
						PhoneModel.TYPE_HOME_FAX));
24
						PhoneModel.TYPE_TTY));
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