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 addUpdateActionComboBox(JPanel, int, int)
|
Method name: void addDeleteActionComboBox(JPanel, int, int)
|
|||
Number of AST nodes: 15 | Number of AST nodes: 15 | |||
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.insets = new Insets(5,25,0,0);↵ | 4 | c.insets = new Insets(5,25,0,0);↵ | |
5 | c.anchor = GridBagConstraints.WEST;↵ | 5 | c.anchor = GridBagConstraints.WEST;↵ | |
6 | ↵ | 6 | ↵ | |
7 | JPanel subpanel = new JPanel();↵ | 7 | JPanel subpanel = new JPanel();↵ | |
8 | ↵ | 8 | ↵ | |
9 | //i18n[SQLScriptPreferencesPanel.updateActionLabel=Action to take on update:]↵ | 9 | //i18n[SQLScriptPreferencesPanel.deleteActionLabel=Action to take on delete:]↵ | |
10 | String cbLabelStr = ↵ | 10 | String cbLabelStr = ↵ | |
11 | s_stringMgr.getString("SQLScriptPreferencesPanel.updateActionLabel");↵ | 11 | s_stringMgr.getString("SQLScriptPreferencesPanel.deleteActionLabel");↵ | |
12 | updateActionLabel = new JLabel(cbLabelStr);↵ | 12 | deleteActionLabel = new JLabel(cbLabelStr);↵ | |
13 | updateActionLabel.setHorizontalAlignment(JLabel.LEFT);↵ | 13 | deleteActionLabel.setHorizontalAlignment(JLabel.LEFT);↵ | |
14 | ↵ | 14 | ↵ | |
15 | updateActionComboBox = new JComboBox();↵ | 15 | deleteActionComboBox = new JComboBox();↵ | |
16 | DefaultComboBoxModel model = ↵ | 16 | DefaultComboBoxModel model = ↵ | |
17 | new DefaultComboBoxModel(new String[] { "NO ACTION", ↵ | 17 | new DefaultComboBoxModel(new String[] { "NO ACTION", ↵ | |
18 | "CASCADE", ↵ | 18 | "CASCADE", ↵ | |
19 | "SET DEFAULT",↵ | 19 | "SET DEFAULT",↵ | |
20 | "SET NULL"});↵ | 20 | "SET NULL"});↵ | |
21 | updateActionComboBox.setModel(model);↵ | 21 | deleteActionComboBox.setModel(model);↵ | |
22 | subpanel.add(updateActionLabel);↵ | 22 | subpanel.add(deleteActionLabel);↵ | |
23 | subpanel.add(updateActionComboBox);↵ | 23 | subpanel.add(deleteActionComboBox);↵ | |
24 | panel.add(subpanel, c); | 24 |
| |
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 | 91 |
Number of mapped statements | 15 |
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.insets = new Insets(5, 25, 0, 0); | 4 | c.insets = new Insets(5, 25, 0, 0); | |||||||||||
5 | c.anchor = GridBagConstraints.WEST; | 5 | c.anchor = GridBagConstraints.WEST; | |||||||||||
6 | JPanel subpanel = new JPanel(); | 6 | JPanel subpanel = new JPanel(); | |||||||||||
7 | String cbLabelStr = s_stringMgr.getString("SQLScriptPreferencesPanel.updateActionLabel"); |
| 7 | String cbLabelStr = s_stringMgr.getString("SQLScriptPreferencesPanel.deleteActionLabel"); | ||||||||||
8 | updateActionLabel = new JLabel(cbLabelStr); |
| 8 | deleteActionLabel = new JLabel(cbLabelStr); | ||||||||||
9 | updateActionLabel.setHorizontalAlignment(JLabel.LEFT); |
| 9 | deleteActionLabel.setHorizontalAlignment(JLabel.LEFT); | ||||||||||
10 | updateActionComboBox = new JComboBox(); |
| 10 | deleteActionComboBox = new JComboBox(); | ||||||||||
11 | DefaultComboBoxModel model = new DefaultComboBoxModel(new String[] {"NO ACTION", "CASCADE", "SET DEFAULT", "SET NULL"}); | 11 | DefaultComboBoxModel model = new DefaultComboBoxModel(new String[] {"NO ACTION", "CASCADE", "SET DEFAULT", "SET NULL"}); | |||||||||||
12 | updateActionComboBox.setModel(model); |
| 12 | deleteActionComboBox.setModel(model); | ||||||||||
13 | subpanel.add(updateActionLabel); |
| 13 | subpanel.add(deleteActionLabel); | ||||||||||
14 | subpanel.add(updateActionComboBox); |
| 14 | subpanel.add(deleteActionComboBox); | ||||||||||
15 | panel.add(subpanel, c); | 15 | panel.add(subpanel, c); |
Row | Violation |
---|