JPanel ret = new JPanel(new GridBagLayout());
GridBagConstraints gbc;
// i18n[TableExportCsvDlg.formatCSV=Export CSV file]
radFormatCSV = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.formatCSV"));
gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 0, 0);
ret.add(radFormatCSV, gbc);
// i18n[TableExportCsvDlg.formatXLS=Export MS Excel (XLS) file]
radFormatXLS = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.formatXLS"));
gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
ret.add(radFormatXLS, gbc);
gbc = new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0);
ret.add(new JPanel(), gbc);
ButtonGroup bg = new ButtonGroup();
bg.add(radFormatCSV);
bg.add(radFormatXLS);
return ret;
JPanel ret = new JPanel(new GridBagLayout());
GridBagConstraints gbc;
// i18n[TableExportCsvDlg.exportCompleteTable=Export complete table]
radComplete = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.exportCompleteTable"));
gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 0, 0);
ret.add(radComplete, gbc);
// i18n[TableExportCsvDlg.exportSelection=Export selection]
radSelection = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.exportSelection"));
gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
ret.add(radSelection, gbc);
gbc = new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0);
ret.add(new JPanel(), gbc);
ButtonGroup bg = new ButtonGroup();
bg.add(radComplete);
bg.add(radSelection);
return ret;
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui/action/TableExportCsvDlg.java
|
|
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui/action/TableExportCsvDlg.java
|
Method name: JPanel getExportFormatPanel()
|
|
Method name: Component getSelelectionPanel()
|
Number of AST nodes: 14
|
|
Number of AST nodes: 14
|
|
1 | JPanel ret = new JPanel(new GridBagLayout());↵ | | 1 | JPanel ret = new JPanel(new GridBagLayout());↵
|
|
2 | GridBagConstraints gbc;↵ | | 2 | GridBagConstraints gbc;↵
|
|
3 | // i18n[TableExportCsvDlg.formatCSV=Export CSV file]↵ | | 3 | // i18n[TableExportCsvDlg.exportCompleteTable=Export complete table]↵
|
4 | radFormatCSV = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.formatCSV"));↵ | | 4 | radComplete = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.exportCompleteTable"));↵
|
5 | gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 0, 0);↵ | | 5 | gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 0, 0);↵
|
6 | ret.add(radFormatCSV, gbc);↵ | | 6 | ret.add(radComplete, gbc);↵
|
|
7 | // i18n[TableExportCsvDlg.formatXLS=Export MS Excel (XLS) file]↵ | | 7 | // i18n[TableExportCsvDlg.exportSelection=Export selection]↵
|
8 | radFormatXLS = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.formatXLS"));↵ | | 8 | radSelection = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.exportSelection"));↵
|
9 | gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);↵ | | 9 | gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);↵
|
10 | ret.add(radFormatXLS, gbc);↵ | | 10 | ret.add(radSelection, gbc);↵
|
|
11 | gbc = new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0);↵ | | 11 | gbc = new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0);↵
|
12 | ret.add(new JPanel(), gbc);↵ | | 12 | ret.add(new JPanel(), gbc);↵
|
|
|
13 | ButtonGroup bg = new ButtonGroup();↵ | | 13 | ButtonGroup bg = new ButtonGroup();↵
|
14 | bg.add(radFormatCSV);↵ | | 14 | bg.add(radComplete);↵
|
15 | bg.add(radFormatXLS);↵ | | 15 | bg.add(radSelection);↵
|
|
16 | return ret; | | 16 | return ret;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 78 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 14 |
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.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | JPanel ret = new JPanel(new GridBagLayout()); | | 1 | JPanel ret = new JPanel(new GridBagLayout()); |
2 | GridBagConstraints gbc; | | 2 | GridBagConstraints gbc; |
3 | radFormatCSV = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.formatCSV")); | | 3 | radComplete = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.exportCompleteTable")); |
4 | gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 0, 0); | | 4 | gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 0, 0); |
5 | ret.add(radFormatCSV, gbc); | | 5 | ret.add(radComplete, gbc); |
6 | radFormatXLS = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.formatXLS")); | | 6 | radSelection = new JRadioButton(s_stringMgr.getString("TableExportCsvDlg.exportSelection")); |
7 | gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0); | | 7 | gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0); |
8 | ret.add(radFormatXLS, gbc); | | 8 | ret.add(radSelection, gbc); |
9 | gbc = new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0); | | 9 | gbc = new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0); |
10 | ret.add(new JPanel(), gbc); | | 10 | ret.add(new JPanel(), gbc); |
11 | ButtonGroup bg = new ButtonGroup(); | | 11 | ButtonGroup bg = new ButtonGroup(); |
12 | bg.add(radFormatCSV); | | 12 | bg.add(radComplete); |
13 | bg.add(radFormatXLS); | | 13 | bg.add(radSelection); |
14 | return ret; | | 14 | return ret; |
Precondition Violations (0)
Row |
Violation |