File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/dialog/contact/FullNameDialog.java | File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/dialog/contact/FullNameDialog.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (middleNameTextField.getText() != null) {↵ | 1 | if (firstNameTextField.getText() != null) {↵ | |
2 | // contains "," comma character↵ | 2 | // contains "," comma character↵ | |
3 | if (middleNameTextField.getText().indexOf(",") != -1) {↵ | 3 | if (firstNameTextField.getText().indexOf(",") != -1) {↵ | |
4 | JOptionPane.showInternalMessageDialog(this,↵ | 4 | JOptionPane.showInternalMessageDialog(this,↵ | |
5 | "Middle name can't contain comma character.");↵ | 5 | "Firstname can't contain comma character.");↵ | |
6 | return;↵ | 6 | return;↵ | |
7 | }↵ | 7 | }↵ | |
8 | }↵ | 8 | }↵ | |
9 | ↵ | 9 | ↵ | |
10 | if (lastNameTextField.getText() != null) {↵ | 10 | if (middleNameTextField.getText() != null) {↵ | |
11 | // contains "," comma character↵ | 11 | // contains "," comma character↵ | |
12 | if (lastNameTextField.getText().indexOf(",") != -1) {↵ | 12 | if (middleNameTextField.getText().indexOf(",") != -1) {↵ | |
13 | JOptionPane.showInternalMessageDialog(this,↵ | 13 | JOptionPane.showInternalMessageDialog(this,↵ | |
14 | "Lastname can't contain comma character.");↵ | 14 | "Middle name can't contain comma character.");↵ | |
15 | return;↵ | 15 | return;↵ | |
16 | }↵ | 16 | }↵ | |
17 | } | 17 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.8 |
Clones location | Clones are in the same method |
Number of node comparisons | 31 |
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | if (middleNameTextField.getText() != null) | 6 | if (middleNameTextField.getText() != null) | |||||||||||
7 | if (middleNameTextField.getText().indexOf(",") != -1) | 7 | if (middleNameTextField.getText().indexOf(",") != -1) | |||||||||||
8 | JOptionPane.showInternalMessageDialog(this, "Middle name can't contain comma character."); | 8 | JOptionPane.showInternalMessageDialog(this, "Middle name can't contain comma character."); | |||||||||||
9 | return; |
| 9 | return; | ||||||||||
10 | if (lastNameTextField.getText() != null) |
| 2 | if (firstNameTextField.getText() != null) | ||||||||||
11 | if (lastNameTextField.getText().indexOf(",") != -1) |
| 3 | if (firstNameTextField.getText().indexOf(",") != -1) | ||||||||||
12 | JOptionPane.showInternalMessageDialog(this, "Lastname can't contain comma character."); |
| 4 | JOptionPane.showInternalMessageDialog(this, "Firstname can't contain comma character."); | ||||||||||
13 | return; |
| 5 | return; |
Row | Violation |
---|---|
1 | Conditional return; |
2 | Conditional return; |
3 | Conditional return; |
4 | Conditional return; |