File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeTime.java | File path: /sql12/plugins/derby/src/net/sourceforge/squirrel_sql/plugins/derby/types/DerbyClobDataTypeComponent.java | |||
Method name: void keyTyped(KeyEvent)
|
Method name: void keyTyped(KeyEvent)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (text.equals("<null>")) {↵ | 1 | if (text.equals("<null>")) {↵ | |
2 | if ((c==KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)) {↵ | 2 | if ((c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)) {↵ | |
3 | // delete when null => original value↵ | 3 | // delete when null => original value↵ | |
4 | DataTypeTime.this._textComponent.restoreText();↵ | 4 | DerbyClobDataTypeComponent.this._textComponent.restoreText();↵ | |
5 | e.consume();↵ | 5 | e.consume();↵ | |
6 | }↵ | 6 | ↵ | |
7 | else {↵ | 7 | } else {↵ | |
8 | // non-delete when null => clear field and add text↵ | 8 | // non-delete when null => clear field and add text↵ | |
9 | DataTypeTime.this._textComponent.updateText("");↵ | 9 | DerbyClobDataTypeComponent.this._textComponent.updateText("");↵ | |
10 | // fall through to normal processing of this key stroke↵ | 10 | // fall through to normal processing of this key stroke↵ | |
11 | }↵ | 11 | ↵ | |
12 | ↵ | 12 | }↵ | |
13 | }↵ | 13 | }↵ | |
14 | else {↵ | 14 | else {↵ | |
15 | // check for user deletes last thing in field↵ | 15 | // check for user deletes last thing in field↵ | |
16 | if ((c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)) {↵ | 16 | if ((c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)) {↵ | |
17 | if (text.length() <= 1 ) {↵ | 17 | if (text.length() <= 1) {↵ | |
18 | // about to delete last thing in field, so replace with↵ | 18 | // about to delete last thing in field, so replace with↵ | |
19 | null↵ | 19 | // null↵ | |
20 | DataTypeTime.this._textComponent.updateText("<null>");↵ | 20 | DerbyClobDataTypeComponent.this._textComponent.updateText("<null>");↵ | |
21 | e.consume();↵ | 21 | e.consume();↵ | |
22 | }↵ | 22 | }↵ | |
23 | }↵ | 23 | ↵ | |
24 | ↵ | 24 | }↵ | |
25 | } | 25 |
| |
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) | 1.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 30 |
Number of mapped statements | 9 |
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) | 4.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13 | if (text.equals("<null>")) | 5 | if (text.equals("<null>")) | ||||||||||||
14 | if ((c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)) | 6 | if ((c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)) | ||||||||||||
15 | DataTypeTime.this._textComponent.restoreText(); |
| 7 | DerbyClobDataTypeComponent.this._textComponent.restoreText(); | |||||||||||
16 | e.consume(); | 8 | e.consume(); | ||||||||||||
else | else | ||||||||||||||
17 | DataTypeTime.this._textComponent.updateText(""); |
| 9 | DerbyClobDataTypeComponent.this._textComponent.updateText(""); | |||||||||||
else | else | ||||||||||||||
18 | if ((c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)) | 10 | if ((c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)) | ||||||||||||
19 | if (text.length() <= 1) | 11 | if (text.length() <= 1) | ||||||||||||
20 | DataTypeTime.this._textComponent.updateText("<null>"); |
| 12 | DerbyClobDataTypeComponent.this._textComponent.updateText("<null>"); | |||||||||||
21 | e.consume(); | 13 | e.consume(); |
Row | Violation |
---|---|
1 | Expression DataTypeTime cannot be unified with expression DerbyClobDataTypeComponent , because common superclass net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.BaseDataTypeComponent does not declare member(s) private net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.IRestorableTextComponent _textComponent |
2 | Expression DataTypeTime cannot be unified with expression DerbyClobDataTypeComponent , because common superclass net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.BaseDataTypeComponent does not declare member(s) private net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.IRestorableTextComponent _textComponent |
3 | Expression DataTypeTime cannot be unified with expression DerbyClobDataTypeComponent , because common superclass net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.BaseDataTypeComponent does not declare member(s) private net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.IRestorableTextComponent _textComponent |