File path: /sql12/plugins/codecompletion/src/net/sourceforge/squirrel_sql/plugins/codecompletion/prefs/CodeCompletionPreferencesPanel.java | File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/configuration/HibernateConfigPanel.java | |||
Method name: JPanel createButtonsPanel()
|
Method name: JPanel createButtonClasspathPanel()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | GridBagConstraints gbc;↵ | |||
2 | JPanel pnlButtons = new JPanel(new GridBagLayout());↵ | 1 | JPanel ret = new JPanel(new GridBagLayout());↵ | |
3 | // i18n[codeCompletion.prefixConfig.newRow=Add new row]↵ | 2 | ↵ | |
4 | btnNewRow = new JButton(s_stringMgr.getString("codeCompletion.prefixConfig.newRow"));↵ | 3 | GridBagConstraints gbc;↵ | |
5 | gbc = new GridBagConstraints(0,0,1,1,1,0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0,0,5,5),0,0);↵ | 4 | gbc = new GridBagConstraints(0,0,1,1,0,0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5,5,5,5), 0,0);↵ | |
6 | pnlButtons.add(btnNewRow, gbc);↵ | 5 | ↵ | |
7 | // i18n[codeCompletion.prefixConfig.deleteSelRows=Delete selected rows]↵ | |||
8 | btnDeleteRows = new JButton(s_stringMgr.getString("codeCompletion.prefixConfig.deleteSelRows")↵ | 6 | // i18n[HibernateConfigPanel.classPathAdd=Add classpath entry]↵ | |
7 | btnClassPathAdd = new JButton(s_stringMgr.getString("HibernatePanel.classPathAdd"));↵ | |||
9 | );↵ | 8 | ret.add(btnClassPathAdd, gbc);↵ | |
10 | gbc = new GridBagConstraints(1,0,1,1,0,0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0,5,5,5),0,0);↵ | 9 | gbc = new GridBagConstraints(1,0,1,1,0,0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5,5,5,5), 0,0);↵ | |
11 | pnlButtons.add(btnDeleteRows↵ | 10 | // i18n[HibernateConfigPanel.classPathRemove=Remove selected entries]↵ | |
11 | btnClassPathRemove = new JButton(s_stringMgr.getString("HibernatePanel.classPathRemove"));↵ | |||
12 | , gbc);↵ | 12 | ret.add(btnClassPathRemove, gbc);↵ | |
13 | return pnlButtons; | 13 | return ret; | |
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 in different classes having the same super class |
Number of node comparisons | 33 |
Number of mapped statements | 9 |
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 gbc; | 2 | GridBagConstraints gbc; | ||||||||||||||||||||
2 | JPanel pnlButtons = new JPanel(new GridBagLayout()); |
| 1 | JPanel ret = new JPanel(new GridBagLayout()); | |||||||||||||||||||
3 | btnNewRow = new JButton(s_stringMgr.getString("codeCompletion.prefixConfig.newRow")); |
| 4 | btnClassPathAdd = new JButton(s_stringMgr.getString("HibernatePanel.classPathAdd")); | |||||||||||||||||||
4 | gbc = new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0); |
| 3 | gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0); | |||||||||||||||||||
5 | pnlButtons.add(btnNewRow, gbc); |
| 5 | ret.add(btnClassPathAdd, gbc); | |||||||||||||||||||
6 | btnDeleteRows = new JButton(s_stringMgr.getString("codeCompletion.prefixConfig.deleteSelRows")); |
| 7 | btnClassPathRemove = new JButton(s_stringMgr.getString("HibernatePanel.classPathRemove")); | |||||||||||||||||||
7 | gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0); |
| 6 | gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0); | |||||||||||||||||||
8 | pnlButtons.add(btnDeleteRows, gbc); |
| 8 | ret.add(btnClassPathRemove, gbc); | |||||||||||||||||||
9 | return pnlButtons; |
| 9 | return ret; |
Row | Violation |
---|