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 fillIMModel(JTextField, JComboBox, ContactModel)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (telephoneComboBox.getSelectedIndex() == 13)↵ | 1 | if (imComboBox.getSelectedIndex() == 1)↵ | |
2 | destModel.addPhone(new PhoneModel(telephone↵ | 2 | destModel.addInstantMessaging(new InstantMessagingModel(↵ | |
3 | TextField.getText(),↵ | 3 | imTextField.getText(),↵ | |
4 | PhoneModel.TYPE_PRIMARY_PHONE));↵ | 4 | InstantMessagingModel.TYPE_AIM));↵ | |
5 | else if (telephoneComboBox.getSelectedIndex() == 14)↵ | 5 | else if (imComboBox.getSelectedIndex() == 2)↵ | |
6 | destModel.addPhone(new PhoneModel(telephone↵ | 6 | destModel↵ | |
7 | .addInstantMessaging(new InstantMessagingModel(↵ | |||
7 | TextField.getText(),↵ | 8 | imTextField.getText(),↵ | |
8 | PhoneModel.TYPE_RADIO));↵ | 9 | InstantMessagingModel.TYPE_YAHOO));↵ | |
9 | else if (telephoneComboBox.getSelectedIndex() == 15)↵ | 10 | else if (imComboBox.getSelectedIndex() == 3)↵ | |
10 | destModel.addPhone(new PhoneModel(telephone↵ | 11 | destModel.addInstantMessaging(new InstantMessagingModel(↵ | |
11 | TextField.getText(),↵ | 12 | imTextField.getText(),↵ | |
12 | PhoneModel.TYPE_TELEX));↵ | 13 | InstantMessagingModel.TYPE_MSN));↵ | |
13 | else if (telephoneComboBox.getSelectedIndex() == 16)↵ | 14 | else if (imComboBox.getSelectedIndex() == 4)↵ | |
14 | destModel.addPhone(new PhoneModel(telephone↵ | 15 | destModel.addInstantMessaging(new InstantMessagingModel(↵ | |
15 | TextField.getText(),↵ | 16 | imTextField.getText(),↵ | |
16 | PhoneModel.TYPE_TTY)); | 17 | InstantMessagingModel.TYPE_ICQ)); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 1.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 47 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 9.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
28 | else if (telephoneComboBox.getSelectedIndex() == 13) |
| 4 | else if (imComboBox.getSelectedIndex() == 1) | |||||||||||||
|
| 5 | destModel.addInstantMessaging(new InstantMessagingModel(imTextField.getText(), InstantMessagingModel.TYPE_AIM)); | ||||||||||||||
29 | destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_PRIMARY_PHONE)); |
| | ||||||||||||||
30 | else if (telephoneComboBox.getSelectedIndex() == 14) |
| 6 | else if (imComboBox.getSelectedIndex() == 2) | |||||||||||||
|
| 7 | destModel.addInstantMessaging(new InstantMessagingModel(imTextField.getText(), InstantMessagingModel.TYPE_YAHOO)); | ||||||||||||||
31 | destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_RADIO)); |
| | ||||||||||||||
32 | else if (telephoneComboBox.getSelectedIndex() == 15) |
| 8 | else if (imComboBox.getSelectedIndex() == 3) | |||||||||||||
|
| 9 | destModel.addInstantMessaging(new InstantMessagingModel(imTextField.getText(), InstantMessagingModel.TYPE_MSN)); | ||||||||||||||
33 | destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_TELEX)); |
| | ||||||||||||||
34 | else if (telephoneComboBox.getSelectedIndex() == 16) |
| 10 | else if (imComboBox.getSelectedIndex() == 4) | |||||||||||||
|
| 11 | destModel.addInstantMessaging(new InstantMessagingModel(imTextField.getText(), InstantMessagingModel.TYPE_ICQ)); | ||||||||||||||
35 | destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_TTY)); |
| |
Row | Violation |
---|---|
1 | Unmatched statement destModel.addInstantMessaging(new InstantMessagingModel(imTextField.getText(),InstantMessagingModel.TYPE_AIM)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement destModel.addInstantMessaging(new InstantMessagingModel(imTextField.getText(),InstantMessagingModel.TYPE_AIM)); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
3 | Unmatched statement destModel.addPhone(new PhoneModel(telephoneTextField.getText(),PhoneModel.TYPE_PRIMARY_PHONE)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement destModel.addPhone(new PhoneModel(telephoneTextField.getText(),PhoneModel.TYPE_PRIMARY_PHONE)); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
5 | Unmatched statement destModel.addInstantMessaging(new InstantMessagingModel(imTextField.getText(),InstantMessagingModel.TYPE_YAHOO)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Unmatched statement destModel.addInstantMessaging(new InstantMessagingModel(imTextField.getText(),InstantMessagingModel.TYPE_YAHOO)); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
7 | Unmatched statement destModel.addPhone(new PhoneModel(telephoneTextField.getText(),PhoneModel.TYPE_RADIO)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
8 | Unmatched statement destModel.addPhone(new PhoneModel(telephoneTextField.getText(),PhoneModel.TYPE_RADIO)); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
9 | Unmatched statement destModel.addInstantMessaging(new InstantMessagingModel(imTextField.getText(),InstantMessagingModel.TYPE_MSN)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
10 | Unmatched statement destModel.addInstantMessaging(new InstantMessagingModel(imTextField.getText(),InstantMessagingModel.TYPE_MSN)); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
11 | Unmatched statement destModel.addPhone(new PhoneModel(telephoneTextField.getText(),PhoneModel.TYPE_TELEX)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
12 | Unmatched statement destModel.addPhone(new PhoneModel(telephoneTextField.getText(),PhoneModel.TYPE_TELEX)); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
13 | Unmatched statement destModel.addInstantMessaging(new InstantMessagingModel(imTextField.getText(),InstantMessagingModel.TYPE_ICQ)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
14 | Unmatched statement destModel.addInstantMessaging(new InstantMessagingModel(imTextField.getText(),InstantMessagingModel.TYPE_ICQ)); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
15 | Unmatched statement destModel.addPhone(new PhoneModel(telephoneTextField.getText(),PhoneModel.TYPE_TTY)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
16 | Unmatched statement destModel.addPhone(new PhoneModel(telephoneTextField.getText(),PhoneModel.TYPE_TTY)); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |