File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/gui/PreferencesPanel.java | File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/gui/PreferencesPanel.java | |||
Method name: void addCopyTableRecordsCheckBox(JPanel, int, int)
|
Method name: void addCopyIndexDefsCheckBox(JPanel, int, int)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
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.gridwidth = 2; // Span across two columns↵ | 4 | c.gridwidth = 2; // Span across two columns↵ | |
5 | c.insets = new Insets(10,0,0,0);↵ | 5 | c.insets = new Insets(10,0,0,0);↵ | |
6 | c.anchor = GridBagConstraints.WEST;↵ | 6 | c.anchor = GridBagConstraints.WEST;↵ | |
7 | String cbLabelStr = ↵ | 7 | String cbLabelStr = ↵ | |
8 | s_stringMgr.getString("PreferencesPanel.copyTableRecords");↵ | 8 | s_stringMgr.getString("PreferencesPanel.copyIndexDefs");↵ | |
9 | String toolTipText = ↵ | 9 | String toolTipText = ↵ | |
10 | s_stringMgr.getString("PreferencesPanel.copyTableRecordsToolTip");↵ | 10 | s_stringMgr.getString("PreferencesPanel.copyIndexDefsToolTip");↵ | |
11 | copyTableRecords = new JCheckBox(cbLabelStr);↵ | 11 | copyIndexDefs = new JCheckBox(cbLabelStr);↵ | |
12 | copyTableRecords.setToolTipText(toolTipText);↵ | 12 | copy↵ | |
13 | copyTableRecords.addActionListener(new ActionListener() {↵ | 13 | IndexDefs.addActionListener(new ActionListener() {↵ | |
14 | public void actionPerformed(ActionEvent e) {↵ | 14 | public void actionPerformed(ActionEvent e) {↵ | |
15 | selectFetchSizeLabel.setEnabled(copyTableRecords.isSelected());↵ | 15 | if (copyIndexDefs.isSelected()) {↵ | |
16 | selectFetchSizeTextField.setEnabled(copyTableRecords.isSelected());↵ | 16 | ↵ | |
17 | }↵ | |||
18 | }↵ | 17 | pruneDuplicateIndexDefs.setEnabled(true);↵ | |
18 | } else {↵ | |||
19 | pruneDuplicateIndexDefs.setEnabled(false);↵ | |||
20 | }↵ | |||
21 | }↵ | |||
22 | });↵ | |||
19 | );↵ | 23 | copyIndexDefs.setToolTipText(toolTipText);↵ | |
20 | panel.add(copyTableRecords, c); | 24 | panel.add(copyIndexDefs, c); | |
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 68 |
Number of mapped statements | 12 |
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.gridwidth = 2; | 4 | c.gridwidth = 2; | |||||||||||||||||||||||||||||
5 | c.insets = new Insets(10, 0, 0, 0); | 5 | c.insets = new Insets(10, 0, 0, 0); | |||||||||||||||||||||||||||||
6 | c.anchor = GridBagConstraints.WEST; | 6 | c.anchor = GridBagConstraints.WEST; | |||||||||||||||||||||||||||||
7 | String cbLabelStr = s_stringMgr.getString("PreferencesPanel.copyTableRecords"); |
| 7 | String cbLabelStr = s_stringMgr.getString("PreferencesPanel.copyIndexDefs"); | ||||||||||||||||||||||||||||
8 | String toolTipText = s_stringMgr.getString("PreferencesPanel.copyTableRecordsToolTip"); |
| 8 | String toolTipText = s_stringMgr.getString("PreferencesPanel.copyIndexDefsToolTip"); | ||||||||||||||||||||||||||||
9 | copyTableRecords = new JCheckBox(cbLabelStr); |
| 9 | copyIndexDefs = new JCheckBox(cbLabelStr); | ||||||||||||||||||||||||||||
10 | copyTableRecords.setToolTipText(toolTipText); |
| 11 | copyIndexDefs.setToolTipText(toolTipText); | ||||||||||||||||||||||||||||
11 | copyTableRecords.addActionListener(new ActionListener() {...}); |
| 12 | panel.add(copyIndexDefs, c); | ||||||||||||||||||||||||||||
12 | panel.add(copyTableRecords, c); |
| 10 | copyIndexDefs.addActionListener(new ActionListener() {...}); |
Row | Violation |
---|---|
1 | Expression copyTableRecords is a field being modified, and thus it cannot be parameterized |
2 | Expression copyIndexDefs is a field being modified, and thus it cannot be parameterized |
3 | Expression copyTableRecords cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression copyIndexDefs cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression copyTableRecords.addActionListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ selectFetchSizeLabel.setEnabled(copyTableRecords.isSelected()); selectFetchSizeTextField.setEnabled(copyTableRecords.isSelected()); } } ) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression panel.add(copyIndexDefs,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression copyTableRecords.addActionListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ selectFetchSizeLabel.setEnabled(copyTableRecords.isSelected()); selectFetchSizeTextField.setEnabled(copyTableRecords.isSelected()); } } ) is a void method call, and thus it cannot be parameterized |
8 | Expression panel.add(copyIndexDefs,c) is a void method call, and thus it cannot be parameterized |
9 | Expression copyTableRecords cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression copyTableRecords.addActionListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ selectFetchSizeLabel.setEnabled(copyTableRecords.isSelected()); selectFetchSizeTextField.setEnabled(copyTableRecords.isSelected()); } } ) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression panel.add(copyIndexDefs,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression copyTableRecords.addActionListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ selectFetchSizeLabel.setEnabled(copyTableRecords.isSelected()); selectFetchSizeTextField.setEnabled(copyTableRecords.isSelected()); } } ) is a void method call, and thus it cannot be parameterized |
13 | Expression panel.add(copyIndexDefs,c) is a void method call, and thus it cannot be parameterized |
14 | Expression panel.add(copyTableRecords,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression copyIndexDefs.addActionListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ if (copyIndexDefs.isSelected()) { pruneDuplicateIndexDefs.setEnabled(true); } else { pruneDuplicateIndexDefs.setEnabled(false); } } } ) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression panel.add(copyTableRecords,c) is a void method call, and thus it cannot be parameterized |
17 | Expression copyIndexDefs.addActionListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ if (copyIndexDefs.isSelected()) { pruneDuplicateIndexDefs.setEnabled(true); } else { pruneDuplicateIndexDefs.setEnabled(false); } } } ) is a void method call, and thus it cannot be parameterized |
18 | Expression copyIndexDefs cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Expression panel.add(copyTableRecords,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression copyIndexDefs.addActionListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ if (copyIndexDefs.isSelected()) { pruneDuplicateIndexDefs.setEnabled(true); } else { pruneDuplicateIndexDefs.setEnabled(false); } } } ) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression panel.add(copyTableRecords,c) is a void method call, and thus it cannot be parameterized |
22 | Expression copyIndexDefs.addActionListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ if (copyIndexDefs.isSelected()) { pruneDuplicateIndexDefs.setEnabled(true); } else { pruneDuplicateIndexDefs.setEnabled(false); } } } ) is a void method call, and thus it cannot be parameterized |