File path: /sql12/plugins/sqlscript/src/net/sourceforge/squirrel_sql/plugins/sqlscript/prefs/SQLScriptPreferencesPanel.java | File path: /sql12/plugins/sqlscript/src/net/sourceforge/squirrel_sql/plugins/sqlscript/prefs/SQLScriptPreferencesPanel.java | |||
Method name: void addDeleteRefActionCheckBox(JPanel, int, int)
|
Method name: void addUpdateRefActionCheckBox(JPanel, int, int)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | GridBagConstraints c = new GridBagConstraints();↵ | 1 | GridBagConstraints c = new GridBagConstraints();↵ | |
2 | c.gridx = col;↵ | 2 | c.gridx = col;↵ | |
3 | c.gridy = row; ↵ | 3 | c.gridy = row; ↵ | |
4 | c.anchor = GridBagConstraints.WEST;↵ | 4 | c.anchor = GridBagConstraints.WEST;↵ | |
5 | //i18n[SQLScriptPreferencesPanel.deleteRefActionCheckboxLabel=Add delete ↵ | 5 | //i18n[SQLScriptPreferencesPanel.updateRefActionCheckboxLabel=Add update ↵ | |
6 | //referential action to the FK definition]↵ | 6 | //referential action to the FK definition]↵ | |
7 | String cbLabelStr = ↵ | 7 | String cbLabelStr = ↵ | |
8 | s_stringMgr.getString("SQLScriptPreferencesPanel.deleteRefActionCheckboxLabel");↵ | 8 | s_stringMgr.getString("SQLScriptPreferencesPanel.updateRefActionCheckboxLabel");↵ | |
9 | // i18n[SQLScriptPreferencesPanel.deleteRefActionToolTip=Append ON DELETE ...]↵ | 9 | // i18n[SQLScriptPreferencesPanel.updateRefActionToolTip=Append ON UPDATE ...]↵ | |
10 | String cbToolTipText = ↵ | 10 | String cbToolTipText = ↵ | |
11 | s_stringMgr.getString("SQLScriptPreferencesPanel.deleteRefActionToolTip");↵ | 11 | s_stringMgr.getString("SQLScriptPreferencesPanel.updateRefActionToolTip");↵ | |
12 | deleteReferentialActionCheckbox = new JCheckBox(cbLabelStr);↵ | 12 | updateReferentialActionCheckbox = new JCheckBox(cbLabelStr);↵ | |
13 | deleteReferentialActionCheckbox.setToolTipText(cbToolTipText);↵ | 13 | updateReferentialActionCheckbox.setToolTipText(cbToolTipText);↵ | |
14 | deleteReferentialActionCheckbox.addActionListener(new ActionListener() {↵ | 14 | updateReferentialActionCheckbox.addActionListener(new ActionListener() {↵ | |
15 | public void actionPerformed(ActionEvent e) {↵ | 15 | public void actionPerformed(ActionEvent e) {↵ | |
16 | boolean enabled = deleteReferentialActionCheckbox.isSelected();↵ | 16 | boolean enabled = updateReferentialActionCheckbox.isSelected();↵ | |
17 | deleteActionLabel.setEnabled(enabled);↵ | 17 | updateActionLabel.setEnabled(enabled);↵ | |
18 | deleteActionComboBox.setEnabled(enabled);↵ | 18 | updateActionComboBox.setEnabled(enabled);↵ | |
19 | }↵ | 19 | }↵ | |
20 | });↵ | 20 | });↵ | |
21 | panel.add(deleteReferentialActionCheckbox, c); | 21 | panel.add(updateReferentialActionCheckbox, c); | |
See real code fragment | See real code fragment |
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 | 46 |
Number of mapped statements | 10 |
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 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | GridBagConstraints c = new GridBagConstraints(); | 1 | GridBagConstraints c = new GridBagConstraints(); | ||||||||||||||||||||
2 | c.gridx = col; | 2 | c.gridx = col; | ||||||||||||||||||||
3 | c.gridy = row; | 3 | c.gridy = row; | ||||||||||||||||||||
4 | c.anchor = GridBagConstraints.WEST; | 4 | c.anchor = GridBagConstraints.WEST; | ||||||||||||||||||||
5 | String cbLabelStr = s_stringMgr.getString("SQLScriptPreferencesPanel.deleteRefActionCheckboxLabel"); |
| 5 | String cbLabelStr = s_stringMgr.getString("SQLScriptPreferencesPanel.updateRefActionCheckboxLabel"); | |||||||||||||||||||
6 | String cbToolTipText = s_stringMgr.getString("SQLScriptPreferencesPanel.deleteRefActionToolTip"); |
| 6 | String cbToolTipText = s_stringMgr.getString("SQLScriptPreferencesPanel.updateRefActionToolTip"); | |||||||||||||||||||
7 | deleteReferentialActionCheckbox = new JCheckBox(cbLabelStr); |
| 7 | updateReferentialActionCheckbox = new JCheckBox(cbLabelStr); | |||||||||||||||||||
8 | deleteReferentialActionCheckbox.setToolTipText(cbToolTipText); |
| 8 | updateReferentialActionCheckbox.setToolTipText(cbToolTipText); | |||||||||||||||||||
9 | deleteReferentialActionCheckbox.addActionListener(new ActionListener() {...}); |
| 9 | updateReferentialActionCheckbox.addActionListener(new ActionListener() {...}); | |||||||||||||||||||
10 | panel.add(deleteReferentialActionCheckbox, c); |
| 10 | panel.add(updateReferentialActionCheckbox, c); |
Row | Violation |
---|