File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui/action/TableExportCsvController.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui/action/TableExportCsvController.java | |||
Method name: void onOK()
|
Method name: void onOK()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | String sepChar = _dlg.txtSeparatorChar.getText();↵ | 1 | String command = _dlg.txtCommand.getText();↵ | |
2 | if(null == sepChar || 1 != sepChar.trim().length())↵ | 2 | if(null == command || 0 == command.trim().length())↵ | |
3 | {↵ | 3 | {↵ | |
4 | // i18n[TableExportCsvController.invalidSeparator=You must provide a single separator character or check "Use tab" to use the tab character.]↵ | 4 | // i18n[TableExportCsvController.noCommand=You must provide a command string or uncheck "Execute command".]↵ | |
5 | String msg = s_stringMgr.getString("TableExportCsvController.invalidSeparator");↵ | 5 | String msg = s_stringMgr.getString("TableExportCsvController.noCommand");↵ | |
6 | JOptionPane.showMessageDialog(_dlg, msg);↵ | 6 | JOptionPane.showMessageDialog(_dlg, msg);↵ | |
7 | return;↵ | 7 | return;↵ | |
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 | 18 |
Number of mapped statements | 5 |
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.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | String sepChar = _dlg.txtSeparatorChar.getText(); |
| 13 | String command = _dlg.txtCommand.getText(); | |||||||||||||||||||||
8 | if (null == sepChar || 1 != sepChar.trim().length()) |
| 14 | if (null == command || 0 == command.trim().length()) | |||||||||||||||||||||
9 | String msg = s_stringMgr.getString("TableExportCsvController.invalidSeparator"); |
| 15 | String msg = s_stringMgr.getString("TableExportCsvController.noCommand"); | |||||||||||||||||||||
10 | JOptionPane.showMessageDialog(_dlg, msg); | 16 | JOptionPane.showMessageDialog(_dlg, msg); | ||||||||||||||||||||||
11 | return; |
| 17 | return; |
Row | Violation |
---|---|
1 | Expression 1 != sepChar.trim().length() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression 0 == command.trim().length() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Conditional return; |
4 | Conditional return; |