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: 4 | Number of AST nodes: 4 | |||
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 |
| |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 11 |
Number of mapped statements | 4 |
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) | 0.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | if (middleNameTextField.getText() != null) |
| 2 | if (firstNameTextField.getText() != null) | ||||||||||
7 | if (middleNameTextField.getText().indexOf(",") != -1) |
| 3 | if (firstNameTextField.getText().indexOf(",") != -1) | ||||||||||
8 | JOptionPane.showInternalMessageDialog(this, "Middle name can't contain comma character."); |
| 4 | JOptionPane.showInternalMessageDialog(this, "Firstname can't contain comma character."); | ||||||||||
9 | return; |
| 5 | return; |
Row | Violation |
---|---|
1 | Conditional return; |
2 | Conditional return; |