File path: /sql12/plugins/graph/src/net/sourceforge/squirrel_sql/plugins/graph/GraphSelectionDialog.java | File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/configuration/HibernateConfigPanel.java | |||
Method name: JPanel createButtonPanel()
|
Method name: JPanel createUserDefinedSessionFactoryPanel()
|
|||
Number of AST nodes: 13 | Number of AST nodes: 14 | |||
1 | JPanel ret = new JPanel(new GridBagLayout());↵ | 1 | JPanel ret = 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(0,5,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);↵ | |
4 | // i18n[graph.btnOk=OK]↵ | 4 | // i18n[↵ | |
5 | btnOK↵ | 5 | HibernateConfigPanel.FactoryProvider=SessionFactoryImpl provider]↵ | |
6 | = new JButton(s_stringMgr.getString("graph.btnOk"));↵ | 6 | JLabel lblConfig = new JLabel(s_stringMgr.getString("↵ | |
7 | ret.add(btnOK, gbc);↵ | |||
8 | getRootPane().setDefaultButton(btnOK);↵ | |||
7 | HibernatePanel.FactoryProvider"));↵ | |||
8 | ret.add(lblConfig, gbc);↵ | |||
9 | gbc = new GridBagConstraints(1,0,1,1,0,0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,5,5,5),0,0);↵ | 9 | gbc = new GridBagConstraints(1,0,1,1,1,0, GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL, new Insets(5,5,5,5),0,0);↵ | |
10 | // i18n[graph.btnCreateNewGraph=Create new graph]↵ | 10 | ↵ | |
11 | btnCreateNewGraph = new JButton(s_stringMg↵ | 11 | txtFactoryProvider = new JTextField();↵ | |
12 | r.getString("graph.btnCreateNewGraph")↵ | 12 | txtFactoryProvider.setEditable(false);↵ | |
13 | );↵ | 13 | txtFactoryProvider.setBackground(Color.lightGray);↵ | |
14 | ret.add(btnCreateNewGraph, gbc);↵ | 14 | ret.add(txtFactoryProvider, gbc);↵ | |
15 | gbc = new GridBagConstraints(2,0,1,1,0,0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0,5,5,5),0,0);↵ | 15 | gbc = new GridBagConstraints(2,0,1,1,0,0, GridBagConstraints.WEST,GridBagConstraints.NONE, new Insets(5,5,5,5),0,0);↵ | |
16 | // i18n[graph.btnCancel=Cancel]↵ | 16 | // i18n[HibernateConfigPanel↵ | |
17 | btnCancel↵ | 17 | .editFactoryProvider=Edit]↵ | |
18 | = new JButton(s_stringMgr.getString("graph.btnCancel"));↵ | 18 | btnEditFactoryProviderInfo = new JButton(s_stringMgr.getString("↵ | |
19 | ret.add(btnCancel↵ | 19 | HibernatePanel.editFactoryProvider"));↵ | |
20 | , gbc);↵ | 20 | ret.add(btnEditFactoryProviderInfo, gbc);↵ | |
21 | return ret; | 21 |
| |
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 | 83 |
Number of mapped statements | 12 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 2 |
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 ret = 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(0, 5, 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); | |||||||||||||||||||||||||||||
| 4 | JLabel lblConfig = new JLabel(s_stringMgr.getString("HibernatePanel.FactoryProvider")); | |||||||||||||||||||||||||||||||
| 9 | txtFactoryProvider.setBackground(Color.lightGray); | |||||||||||||||||||||||||||||||
4 | btnOK = new JButton(s_stringMgr.getString("graph.btnOk")); |
| 12 | btnEditFactoryProviderInfo = new JButton(s_stringMgr.getString("HibernatePanel.editFactoryProvider")); | |||||||||||||||||||||||||||||
5 | ret.add(btnOK, gbc); |
| 13 | ret.add(btnEditFactoryProviderInfo, gbc); | |||||||||||||||||||||||||||||
6 | getRootPane().setDefaultButton(btnOK); |
| 5 | ret.add(lblConfig, gbc); | |||||||||||||||||||||||||||||
7 | gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0); |
| 6 | gbc = new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0); | |||||||||||||||||||||||||||||
8 | btnCreateNewGraph = new JButton(s_stringMgr.getString("graph.btnCreateNewGraph")); |
| 7 | txtFactoryProvider = new JTextField(); | |||||||||||||||||||||||||||||
9 | ret.add(btnCreateNewGraph, gbc); |
| 10 | ret.add(txtFactoryProvider, gbc); | |||||||||||||||||||||||||||||
10 | gbc = new GridBagConstraints(2, 0, 1, 1, 0, 0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0); |
| 11 | gbc = new GridBagConstraints(2, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0); | |||||||||||||||||||||||||||||
11 | btnCancel = new JButton(s_stringMgr.getString("graph.btnCancel")); |
| | ||||||||||||||||||||||||||||||
12 | ret.add(btnCancel, gbc); |
| 8 | txtFactoryProvider.setEditable(false); | |||||||||||||||||||||||||||||
13 | return ret; | 14 | return ret; |
Row | Violation |
---|---|
1 | Expression btnOK is a field being modified, and thus it cannot be parameterized |
2 | Expression btnEditFactoryProviderInfo is a field being modified, and thus it cannot be parameterized |
3 | Expression btnOK cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression btnEditFactoryProviderInfo cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression getRootPane().setDefaultButton(btnOK) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression ret.add(lblConfig,gbc) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression getRootPane().setDefaultButton(btnOK) is a void method call, and thus it cannot be parameterized |
8 | Expression ret.add(lblConfig,gbc) is a void method call, and thus it cannot be parameterized |
9 | Expression ret cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression getRootPane().setDefaultButton(btnOK) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression ret.add(lblConfig,gbc) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression getRootPane().setDefaultButton(btnOK) is a void method call, and thus it cannot be parameterized |
13 | Expression ret.add(lblConfig,gbc) is a void method call, and thus it cannot be parameterized |
14 | Expression btnCreateNewGraph is a field being modified, and thus it cannot be parameterized |
15 | Expression txtFactoryProvider is a field being modified, and thus it cannot be parameterized |
16 | Expression btnCreateNewGraph cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression txtFactoryProvider cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Unmatched statement btnCancel=new JButton(s_stringMgr.getString("graph.btnCancel")); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
19 | Expression ret.add(btnCancel,gbc) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression txtFactoryProvider.setEditable(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression ret.add(btnCancel,gbc) is a void method call, and thus it cannot be parameterized |
22 | Expression txtFactoryProvider.setEditable(false) is a void method call, and thus it cannot be parameterized |
23 | Expression ret cannot be parameterized, because it has dependencies to/from statements that will be extracted |
24 | Expression txtFactoryProvider cannot be parameterized, because it has dependencies to/from statements that will be extracted |
25 | Expression ret.add(btnCancel,gbc) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
26 | Expression txtFactoryProvider.setEditable(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
27 | Expression ret.add(btnCancel,gbc) is a void method call, and thus it cannot be parameterized |
28 | Expression txtFactoryProvider.setEditable(false) is a void method call, and thus it cannot be parameterized |
29 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.graph.GraphSelectionDialog and net.sourceforge.squirrel_sql.plugins.hibernate.configuration.HibernateConfigPanel do not have a common superclass |