File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties/SchemaPropertiesPanel.java | File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/configuration/HibernateConfigPanel.java | |||
Method name: JPanel createCacheFilePanel()
|
Method name: JPanel createButtonClasspathPanel()
|
|||
Number of AST nodes: 10 | Number of AST nodes: 9 | |||
1 | JPanel ret = new JPanel();↵ | 1 | JPanel ret = new JPanel(↵ | |
2 | ret.setLayout(new GridBagLayout());↵ | 2 | new GridBagLayout());↵ | |
3 | GridBagConstraints gbc;↵ | 3 | GridBagConstraints gbc;↵ | |
4 | // i18n[SchemaPropertiesPanel.printCacheFileLocation=Print cache file path to message panel]↵ | |||
5 | btnPrintCacheFileLocation = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.printCacheFileLocation"));↵ | |||
6 | gbc = new GridBagConstraints(0,0,1,1,0,0,GridBagConstraints.WEST, 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);↵ | |
7 | ret.add(btnPrintCacheFileLocation, gbc);↵ | 5 | ↵ | |
8 | // i18n[SchemaPropertiesPanel.deleteCache=Delete cache file]↵ | |||
9 | btnDeleteCache↵ | 6 | // i18n[HibernateConfigPanel.classPathAdd=Add classpath entry]↵ | |
10 | = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.deleteCache")↵ | 7 | btnClassPathAdd = new JButton(s_stringMgr.getString("HibernatePanel.classPathAdd"));↵ | |
11 | );↵ | 8 | ret.add(btnClassPathAdd, gbc);↵ | |
12 | 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,0,0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5,5,5,5), 0,0);↵ | |
13 | ret.add(btnDeleteCach↵ | 10 | // i18n[HibernateConfigPanel.classPathRemove=Remove selected entries]↵ | |
11 | btnClassPathRemove = new JButton(s_stringMgr.getString("HibernatePanel.classPathRemove"));↵ | |||
14 | e, gbc);↵ | 12 | ret.add(btnClassPathRemove, gbc);↵ | |
15 | return ret; | 13 |
| |
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 | 36 |
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | JPanel ret = new JPanel(); |
| 1 | JPanel ret = new JPanel(new GridBagLayout()); | |||||||||||||
2 | ret.setLayout(new GridBagLayout()); |
| | ||||||||||||||
3 | GridBagConstraints gbc; | 2 | GridBagConstraints gbc; | ||||||||||||||
4 | btnPrintCacheFileLocation = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.printCacheFileLocation")); |
| 4 | btnClassPathAdd = new JButton(s_stringMgr.getString("HibernatePanel.classPathAdd")); | |||||||||||||
5 | gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, 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); | |||||||||||||
6 | ret.add(btnPrintCacheFileLocation, gbc); |
| 5 | ret.add(btnClassPathAdd, gbc); | |||||||||||||
7 | btnDeleteCache = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.deleteCache")); |
| 7 | btnClassPathRemove = new JButton(s_stringMgr.getString("HibernatePanel.classPathRemove")); | |||||||||||||
8 | 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, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0); | |||||||||||||
9 | ret.add(btnDeleteCache, gbc); |
| 8 | ret.add(btnClassPathRemove, gbc); | |||||||||||||
10 | return ret; | 9 | return ret; |
Row | Violation |
---|---|
1 | Unmatched statement ret.setLayout(new GridBagLayout()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |