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: 10 | Number of AST nodes: 10 | |||
1 | if (telephoneComboBox.getSelectedIndex() == 12)↵ | 1 | if (imComboBox.getSelectedIndex() == 0)↵ | |
2 | destModel.addPhone(new PhoneModel(telephone↵ | 2 | destModel.addInstantMessaging(new InstantMessagingModel(↵ | |
3 | TextField.getText(),↵ | 3 | imTextField.getText(),↵ | |
4 | PhoneModel.TYPE_PAGER));↵ | 4 | InstantMessagingModel.TYPE_JABBER));↵ | |
5 | else if (telephoneComboBox.getSelectedIndex() == 13)↵ | 5 | else if (imComboBox.getSelectedIndex() == 1)↵ | |
6 | destModel.addPhone(new PhoneModel(telephone↵ | 6 | destModel.addInstantMessaging(new InstantMessagingModel(↵ | |
7 | TextField.getText(),↵ | 7 | imTextField.getText(),↵ | |
8 | PhoneModel.TYPE_PRIMARY_PHONE));↵ | 8 | InstantMessagingModel.TYPE_AIM));↵ | |
9 | else if (telephoneComboBox.getSelectedIndex() == 14)↵ | 9 | else if (imComboBox.getSelectedIndex() == 2)↵ | |
10 | destModel.addPhone(new PhoneModel(telephone↵ | 10 | destModel↵ | |
11 | .addInstantMessaging(new InstantMessagingModel(↵ | |||
11 | TextField.getText(),↵ | 12 | imTextField.getText(),↵ | |
12 | PhoneModel.TYPE_RADIO));↵ | 13 | InstantMessagingModel.TYPE_YAHOO));↵ | |
13 | else if (telephoneComboBox.getSelectedIndex() == 15)↵ | 14 | else if (imComboBox.getSelectedIndex() == 3)↵ | |
14 | destModel.addPhone(new PhoneModel(telephone↵ | 15 | destModel.addInstantMessaging(new InstantMessagingModel(↵ | |
15 | TextField.getText(),↵ | 16 | imTextField.getText(),↵ | |
16 | PhoneModel.TYPE_TELEX));↵ | 17 | InstantMessagingModel.TYPE_MSN));↵ | |
17 | else if (telephoneComboBox.getSelectedIndex() == 16)↵ | 18 | else if (imComboBox.getSelectedIndex() == 4)↵ | |
18 | destModel.addPhone(new PhoneModel(telephone↵ | 19 | destModel.addInstantMessaging(new InstantMessagingModel(↵ | |
19 | TextField.getText(),↵ | 20 | imTextField.getText(),↵ | |
20 | PhoneModel.TYPE_TTY)); | 21 | 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) | 2.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 71 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 5 |
Number of unmapped statements in the second code fragment | 5 |
Time elapsed for statement mapping (ms) | 12.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
26 | if (telephoneComboBox.getSelectedIndex() == 12) |
| 2 | if (imComboBox.getSelectedIndex() == 0) | |||||||||||||
|
| 3 | destModel.addInstantMessaging(new InstantMessagingModel(imTextField.getText(), InstantMessagingModel.TYPE_JABBER)); | ||||||||||||||
27 | destModel.addPhone(new PhoneModel(telephoneTextField.getText(), PhoneModel.TYPE_PAGER)); |
| | ||||||||||||||
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_JABBER)); 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_JABBER)); 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_PAGER)); 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_PAGER)); 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_AIM)); 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_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 |
7 | 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 |
8 | 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 |
9 | 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 |
10 | 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 |
11 | 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 |
12 | 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 |
13 | 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 |
14 | 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 |
15 | 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 |
16 | 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 |
17 | 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 |
18 | 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 |
19 | 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 |
20 | 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 |