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 createClasspathPanel()
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | JPanel ret = new JPanel();↵ | |||
2 | ret.setLayout(new GridBagLayout());↵ | |||
3 | GridBagConstraints gbc;↵ | 1 | TitledBorder brd = BorderFactory.createTitledBorder(s_stringMgr.getStrin↵ | |
4 | // i18n[SchemaPropertiesPanel.printCacheFileLocation=Print cache file path to message panel]↵ | |||
5 | btnPrintCacheFileLocation = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.printCacheFileLocation"));↵ | 2 | g("HibernatePanel.newFactoryClasspathBorder"));↵ | |
3 | JPanel ret = new JPanel(new GridBagLayout());↵ | |||
4 | ret.setBorder(brd);↵ | |||
5 | GridBagConstraints gbc;↵ | |||
6 | gbc = new GridBagConstraints(0,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,5,5), 0,0);↵ | 6 | gbc = new GridBagConstraints(0,0,1,1,1,1, GridBagConstraints.NORTHWEST,GridBagConstraints.BOTH, new Insets(0,5,5,5),0,0);↵ | |
7 | ret.add(btnPrintCacheFileLocation, gbc);↵ | 7 | ↵ | |
8 | // i18n[SchemaPropertiesPanel.deleteCache=Delete cache file]↵ | |||
9 | btnDeleteCache = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.deleteCache")↵ | 8 | lstClassPath = new JList();↵ | |
10 | );↵ | 9 | ret.add(new JScrollPane(lstClassPath), gbc);↵ | |
11 | gbc = new GridBagConstraints(1,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,5,5,5), 0,0);↵ | 10 | gbc = new GridBagConstraints(0,1,1,1,0,0, GridBagConstraints.SOUTHEAST,GridBagConstraints.NONE, new Insets(0,5,5,5),0,0);↵ | |
12 | ret.add(btnDeleteCache, gbc);↵ | 11 | ret.add(createButtonClasspathPanel(), gbc);↵ | |
13 | return ret; | 12 |
| |
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 | 48 |
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | TitledBorder brd = BorderFactory.createTitledBorder(s_stringMgr.getString("HibernatePanel.newFactoryClasspathBorder")); | ||||||||||||||||||||||||
1 | JPanel ret = new JPanel(); |
| 2 | JPanel ret = new JPanel(new GridBagLayout()); | ||||||||||||||||||||||
2 | ret.setLayout(new GridBagLayout()); |
| 7 | ret.add(new JScrollPane(lstClassPath), gbc); | ||||||||||||||||||||||
3 | GridBagConstraints gbc; | 4 | GridBagConstraints gbc; | |||||||||||||||||||||||
4 | btnPrintCacheFileLocation = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.printCacheFileLocation")); |
| | |||||||||||||||||||||||
5 | gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0); |
| 5 | gbc = new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0); | ||||||||||||||||||||||
6 | ret.add(btnPrintCacheFileLocation, gbc); |
| 3 | ret.setBorder(brd); | ||||||||||||||||||||||
7 | btnDeleteCache = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.deleteCache")); |
| 6 | lstClassPath = new JList(); | ||||||||||||||||||||||
8 | gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0); |
| 8 | gbc = new GridBagConstraints(0, 1, 1, 1, 0, 0, GridBagConstraints.SOUTHEAST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0); | ||||||||||||||||||||||
9 | ret.add(btnDeleteCache, gbc); |
| 9 | ret.add(createButtonClasspathPanel(), gbc); | ||||||||||||||||||||||
10 | return ret; | 10 | return ret; |
Row | Violation |
---|---|
1 | Expression ret.setLayout(new GridBagLayout()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression ret.add(new JScrollPane(lstClassPath),gbc) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression ret.setLayout(new GridBagLayout()) is a void method call, and thus it cannot be parameterized |
4 | Expression ret.add(new JScrollPane(lstClassPath),gbc) is a void method call, and thus it cannot be parameterized |
5 | Expression ret.setLayout(new GridBagLayout()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression ret.add(new JScrollPane(lstClassPath),gbc) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression ret.setLayout(new GridBagLayout()) is a void method call, and thus it cannot be parameterized |
8 | Expression ret.add(new JScrollPane(lstClassPath),gbc) is a void method call, and thus it cannot be parameterized |
9 | Unmatched statement btnPrintCacheFileLocation=new JButton(s_stringMgr.getString("SchemaPropertiesPanel.printCacheFileLocation")); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
10 | Expression ret.add(btnPrintCacheFileLocation,gbc) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression ret.setBorder(brd) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression ret.add(btnPrintCacheFileLocation,gbc) is a void method call, and thus it cannot be parameterized |
13 | Expression ret.setBorder(brd) is a void method call, and thus it cannot be parameterized |
14 | Expression ret.add(btnPrintCacheFileLocation,gbc) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression ret.setBorder(brd) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression ret.add(btnPrintCacheFileLocation,gbc) is a void method call, and thus it cannot be parameterized |
17 | Expression ret.setBorder(brd) is a void method call, and thus it cannot be parameterized |
18 | Expression btnDeleteCache is a field being modified, and thus it cannot be parameterized |
19 | Expression lstClassPath is a field being modified, and thus it cannot be parameterized |
20 | Expression btnDeleteCache cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression createButtonClasspathPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted |