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));
if (emailComboBox.getSelectedIndex() == 0) destModel.addEmail(new EmailModel(emailTextField.getText(), EmailModel.TYPE_WORK)); if (emailComboBox.getSelectedIndex() == 1) destModel.addEmail(new EmailModel(emailTextField.getText(), EmailModel.TYPE_HOME)); if (emailComboBox.getSelectedIndex() == 2) destModel.addEmail(new EmailModel(emailTextField.getText(), EmailModel.TYPE_OTHER));
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 fillEmailModel(JTextField, JComboBox, ContactModel)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (telephoneComboBox.getSelectedIndex() == 14)
1
if (emailComboBox.getSelectedIndex() == 0)
2
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
2
				destModel.addEmail(new EmailModel(emailTextField.getText(),
3
						PhoneModel.TYPE_RADIO));
3
						EmailModel.TYPE_WORK));
4
			else if (telephoneComboBox.getSelectedIndex() == 15)
4
			if (emailComboBox.getSelectedIndex() == 1)
5
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
5
				destModel.addEmail(new EmailModel(emailTextField.getText(),
6
						PhoneModel.TYPE_TELEX));
6
						EmailModel.TYPE_HOME));
7
			else if (telephoneComboBox.getSelectedIndex() == 16)
7
			if (emailComboBox.getSelectedIndex() == 2)
8
				destModel.addPhone(new PhoneModel(telephoneTextField.getText(),
8
				destModel.addEmail(new EmailModel(emailTextField.getText(),
9
						PhoneModel.TYPE_TTY));
9
						EmailModel.TYPE_OTHER));
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.9
Clones locationClones are declared in the same class
Number of node comparisons9