File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/configuration/HibernateConfigPanel.java | File path: /sql12/plugins/sqlbookmark/src/net/sourceforge/squirrel_sql/plugins/sqlbookmark/SQLBookmarkPreferencesPanel.java | |||
Method name: JPanel createUserDefinedSessionFactoryPanel()
|
Method name: JPanel createSouthPane(SQLBookmarkPlugin)
|
|||
Number of AST nodes: 14 | Number of AST nodes: 12 | |||
1 | JPanel ret = new JPanel(new GridBagLayout());↵ | 1 | JPanel pnlSouth = new JPanel(new GridBagLayout());↵ | |
2 | GridBagConstraints gbc;↵ | 2 | GridBagConstraints gbc;↵ | |
3 | gbc = new GridBagConstraints(0,0,1,1,0,0, GridBagConstraints.WEST,GridBagConstraints.NONE, new Insets(5,5,5,5),0,0);↵ | 3 | gbc = new GridBagConstraints(0,0,1,1,0,0,GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5,5,5,5), 0,0);↵ | |
4 | // i18n[HibernateConfigPanel.FactoryProvider=SessionFactoryImpl provider]↵ | 4 | // i18n[↵ | |
5 | JLabel lblConfig = new JLabel(s_stringMgr.getString("HibernatePanel.FactoryProvider"));↵ | |||
6 | ret.add(lblConfig, gbc↵ | 5 | sqlbookmark.squirrelMarksInPopup=Show SQuirreL bookmarks in ctrl+j popup]↵ | |
6 | chkSquirrelMarksInPopup = new JCheckBox(s_stringMgr.getString("sqlbookmark.squirrelMarksInPopup"));↵ | |||
7 | pnlSouth.add(chkSquirrelMarksInPopup, gbc);↵ | |||
8 | JLabel lblAccesshint = new JLabel(plugin.getResourceString(AddBookmarkDialog.BM_ACCESS_HINT));↵ | |||
7 | );↵ | 9 | lblAccesshint.setForeground(Color.red);↵ | |
8 | gbc = new GridBagConstraints(1,0,1,1,1,0, GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL, new Insets(5,5,5,5),0,0);↵ | 10 | gbc = new GridBagConstraints(0,1,1,1,0,0,GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0,5,5,5), 0,0);↵ | |
9 | txtFactoryProvider = new JTextField();↵ | 11 | ↵ | |
10 | txtFactoryProvider.setEditable(false);↵ | |||
11 | txtFactoryProvider.setBackground(Color.lightGray);↵ | |||
12 | ret.add(txtFactoryProvider, gbc);↵ | 12 | pnlSouth.add(lblAccesshint, gbc);↵ | |
13 | gbc = new GridBagConstraints(2,0,1,1,0,0, GridBagConstraints.WEST,GridBagConstraints.NONE, new Insets(5,5,5,5),0,0);↵ | 13 | gbc = new GridBagConstraints(1,0,1,2,0,0,GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0,0,0,0), 0,0);↵ | |
14 | // i18n[HibernateConfigPanel.editFactoryProvider=Edit]↵ | 14 | ↵ | |
15 | btnEditFactoryProviderInfo = new JButton(s_stringMgr.getString("HibernatePanel.editFactoryProvider"));↵ | |||
16 | ret.add(btnEditFactoryProviderInfo, gbc);↵ | 15 | pnlSouth.add(new JPanel(), gbc);↵ | |
17 | return ret; | 16 | return pnlSouth; | |
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 in different classes having the same super class |
Number of node comparisons | 87 |
Number of mapped statements | 11 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | JPanel ret = new JPanel(new GridBagLayout()); |
| 1 | JPanel pnlSouth = new JPanel(new GridBagLayout()); | |||||||||||||||||||||||||||||||
2 | GridBagConstraints gbc; | 2 | GridBagConstraints gbc; | ||||||||||||||||||||||||||||||||
3 | gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0); |
| 3 | gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0); | |||||||||||||||||||||||||||||||
4 | JLabel lblConfig = new JLabel(s_stringMgr.getString("HibernatePanel.FactoryProvider")); | | |||||||||||||||||||||||||||||||||
| 6 | JLabel lblAccesshint = new JLabel(plugin.getResourceString(AddBookmarkDialog.BM_ACCESS_HINT)); | |||||||||||||||||||||||||||||||||
5 | ret.add(lblConfig, gbc); |
| 9 | pnlSouth.add(lblAccesshint, gbc); | |||||||||||||||||||||||||||||||
6 | gbc = new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0); |
| 8 | gbc = new GridBagConstraints(0, 1, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0); | |||||||||||||||||||||||||||||||
7 | txtFactoryProvider = new JTextField(); |
| 4 | chkSquirrelMarksInPopup = new JCheckBox(s_stringMgr.getString("sqlbookmark.squirrelMarksInPopup")); | |||||||||||||||||||||||||||||||
8 | txtFactoryProvider.setEditable(false); | | |||||||||||||||||||||||||||||||||
9 | txtFactoryProvider.setBackground(Color.lightGray); |
| 7 | lblAccesshint.setForeground(Color.red); | |||||||||||||||||||||||||||||||
10 | ret.add(txtFactoryProvider, gbc); |
| 5 | pnlSouth.add(chkSquirrelMarksInPopup, gbc); | |||||||||||||||||||||||||||||||
11 | gbc = new GridBagConstraints(2, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0); |
| 10 | gbc = new GridBagConstraints(1, 0, 1, 2, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0); | |||||||||||||||||||||||||||||||
12 | btnEditFactoryProviderInfo = new JButton(s_stringMgr.getString("HibernatePanel.editFactoryProvider")); |
| | ||||||||||||||||||||||||||||||||
13 | ret.add(btnEditFactoryProviderInfo, gbc); |
| 11 | pnlSouth.add(new JPanel(), gbc); | |||||||||||||||||||||||||||||||
14 | return ret; |
| 12 | return pnlSouth; |
Row | Violation |
---|---|
1 | Expression lblConfig cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression lblAccesshint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression txtFactoryProvider is a field being modified, and thus it cannot be parameterized |
4 | Expression chkSquirrelMarksInPopup is a field being modified, and thus it cannot be parameterized |
5 | Expression txtFactoryProvider.setBackground(Color.lightGray) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression lblAccesshint.setForeground(Color.red) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression txtFactoryProvider.setBackground(Color.lightGray) is a void method call, and thus it cannot be parameterized |
8 | Expression lblAccesshint.setForeground(Color.red) is a void method call, and thus it cannot be parameterized |
9 | Expression txtFactoryProvider cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression lblAccesshint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression txtFactoryProvider cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression chkSquirrelMarksInPopup cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Unmatched statement btnEditFactoryProviderInfo=new JButton(s_stringMgr.getString("HibernatePanel.editFactoryProvider")); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
14 | Expression btnEditFactoryProviderInfo cannot be parameterized, because it has dependencies to/from statements that will be extracted |