File path: /sql12/plugins/graph/src/net/sourceforge/squirrel_sql/plugins/graph/graphtofiles/GraphToFilesDlg.java | File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/configuration/HibernateConfigPanel.java | |||
Method name: JPanel createButtonPanel()
|
Method name: JPanel createJPAPanel()
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | JPanel ret = new JPanel();↵ | 1 | JPanel ret = new JPanel(new GridBagLayout());↵ | |
2 | GridBagConstraints gbc;↵ | 2 | GridBagCon↵ | |
3 | // i18n[graphToClipboard.copyButton=Copy image from selected tab]↵ | |||
4 | btnSaveToFile = new JButton(s_stringMgr.getString("graphToFile.saveFilesTo"));↵ | 3 | straints gbc;↵ | |
5 | gbc = new GridBagConstraints(0,0,1,1,0,0,GridBagConstraints.SOUTHEAST, GridBagConstraints.NONE, new Insets(5,5,5,5), 0,0);↵ | 4 | gbc = new GridBagConstraints(0,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5,0,5,5),0,0);↵ | |
6 | ret.add(btnSaveToFile↵ | 5 | // i18n[HibernateConfigPanel.toObtainSessionFactJPA=Call "javax.persistence.Persistence.createEntityManagerFactory("<persitence-unit name>");"]↵ | |
6 | radJPA = new JRadioButton(s_stringMgr.getString("HibernatePanel.toObtainSessionFactJPA"));↵ | |||
7 | , gbc);↵ | 7 | ret.add(radJPA, gbc);↵ | |
8 | gbc = new GridBagConstraints(1,0,1,1,1,0,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5,5,5,5), 0,0);↵ | 8 | gbc = new GridBagConstraints(1,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5,5,5,5),0,0);↵ | |
9 | ret.add(new JPanel(), gbc);↵ | 9 | ↵ | |
10 | ↵ | |||
11 | // i18n[graphToClipboard.closeButton=Close]↵ | |||
12 | btnClose = new JButton(s_stringMgr.getString("graphToClipboard.closeButton")↵ | 10 | // i18n[HibernateConfigPanel.toObtainSessionFactPersUnit=persitence-unit name:]↵ | |
13 | );↵ | 11 | ret.add(new JLabel(s_stringMgr.getString("HibernatePanel.toObtainSessionFactPersUnit")), gbc);↵ | |
14 | gbc = new GridBagConstraints(2,0,1,1,0,0,GridBagConstraints.SOUTHWEST, GridBagConstraints.NONE, new Insets(5,5,5,5), 0,0);↵ | 12 | gbc = new GridBagConstraints(2,0,1,1,1,0,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5,0,5,5),0,0);↵ | |
15 | ret.add(btnClos↵ | 13 | txtPersistenceUnitName = new JTextField();↵ | |
16 | e, gbc);↵ | 14 | ret.add(txtPersistenceUnitName, gbc);↵ | |
17 | return ret; | 15 |
| |
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 | 50 |
Number of mapped statements | 11 |
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 | JPanel ret = new JPanel(); |
| 1 | JPanel ret = new JPanel(new GridBagLayout()); | |||||||||||||||||||
2 | GridBagConstraints gbc; | 2 | GridBagConstraints gbc; | ||||||||||||||||||||
3 | btnSaveToFile = new JButton(s_stringMgr.getString("graphToFile.saveFilesTo")); |
| 4 | radJPA = new JRadioButton(s_stringMgr.getString("HibernatePanel.toObtainSessionFactJPA")); | |||||||||||||||||||
4 | gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.SOUTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0); |
| 3 | gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0); | |||||||||||||||||||
5 | ret.add(btnSaveToFile, gbc); |
| 5 | ret.add(radJPA, gbc); | |||||||||||||||||||
6 | gbc = new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 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); | |||||||||||||||||||
7 | ret.add(new JPanel(), gbc); |
| 7 | ret.add(new JLabel(s_stringMgr.getString("HibernatePanel.toObtainSessionFactPersUnit")), gbc); | |||||||||||||||||||
8 | btnClose = new JButton(s_stringMgr.getString("graphToClipboard.closeButton")); |
| 9 | txtPersistenceUnitName = new JTextField(); | |||||||||||||||||||
9 | gbc = new GridBagConstraints(2, 0, 1, 1, 0, 0, GridBagConstraints.SOUTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0); |
| 8 | gbc = new GridBagConstraints(2, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 5), 0, 0); | |||||||||||||||||||
10 | ret.add(btnClose, gbc); |
| 10 | ret.add(txtPersistenceUnitName, gbc); | |||||||||||||||||||
11 | return ret; | 11 | return ret; |
Row | Violation |
---|---|
1 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.graph.graphtofiles.GraphToFilesDlg and net.sourceforge.squirrel_sql.plugins.hibernate.configuration.HibernateConfigPanel do not have a common superclass |