File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/DataSetViewerEditableTablePanel.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/DataSetViewerEditableTablePanel.java | |||
Method name: int[] changeUnderlyingValueAt(int, int, Object, Object)
|
Method name: int[] changeUnderlyingValueAt(int, int, Object, Object)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (message != null) {↵ | 1 | if (message != null) {↵ | |
2 | // set up dialog to ask user if it is ok to proceed↵ | 2 | // set up dialog to ask user if it is ok to proceed↵ | |
3 | // IMPORTANT: this dialog is SYNCHRONOUS (ie. we do not proceed until↵ | 3 | // IMPORTANT: this dialog is SYNCHRONOUS (ie. we do not proceed until↵ | |
4 | // user gives a response). This is critical since this function provides↵ | 4 | // user gives a response). This is critical since this function provides↵ | |
5 | // a return value to its caller that depends on the user input.↵ | 5 | // a return value to its caller that depends on the user input.↵ | |
6 | // i18n[baseDataSetViewerDestination.warning2=Warning]↵ | 6 | // i18n[baseDataSetViewerDestination.warning=Warning]↵ | |
7 | int option = JOptionPane.showConfirmDialog(null, message, s_stringMgr.getString("baseDataSetViewerDestination.warning2"),↵ | 7 | int option = JOptionPane.showConfirmDialog(null, message, s_stringMgr.getString("baseDataSetViewerDestination.warning"),↵ | |
8 | JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);↵ | 8 | JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);↵ | |
9 | if ( option != JOptionPane.YES_OPTION)↵ | 9 | if ( option != JOptionPane.YES_OPTION)↵ | |
10 | {↵ | 10 | {↵ | |
11 | return new int[0]; // no update done to underlying data↵ | 11 | return new int[0]; // no update done to underlying data↵ | |
12 | }↵ | 12 | }↵ | |
13 | } | 13 |
| |
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 8 |
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) | 7.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17 | if (message != null) | 11 | if (message != null) | |||||||||||
18 | int option = JOptionPane.showConfirmDialog(null, message, s_stringMgr.getString("baseDataSetViewerDestination.warning2"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); |
| 12 | int option = JOptionPane.showConfirmDialog(null, message, s_stringMgr.getString("baseDataSetViewerDestination.warning"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); | ||||||||||
19 | if (option != JOptionPane.YES_OPTION) | 13 | if (option != JOptionPane.YES_OPTION) | |||||||||||
20 | return new int[0]; | 14 | return new int[0]; |
Row | Violation |
---|---|
1 | Not all possible execution flows end in a return statement |