File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/desktopcontainer/TabbedStyleHintDlg.java | File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/configuration/HibernateConfigPanel.java | |||
Method name: JPanel createButtonPanel()
|
Method name: JPanel createClasspathPanel()
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | JPanel ret = new JPanel();↵ | |||
2 | ret.setLayout(new GridBagLayout());↵ | 1 | TitledBorder brd = BorderFactory.createTitledBorder(s_stringMgr.getString("HibernatePanel.newFactoryClasspathBorder"));↵ | |
2 | JPanel ret = new JPanel(new GridBagLayout());↵ | |||
3 | ret.setBorder(brd);↵ | |||
3 | GridBagConstraints gbc;↵ | 4 | GridBagConstraints gbc;↵ | |
4 | gbc = new GridBagConstraints(0,0,1,1,0,0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5,5,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);↵ | |
5 | btnYes = new JButton(s_stringMgr.getString("SessionStartupTimeHintDlg.yes"));↵ | 6 | ↵ | |
6 | ret.add(btnYes↵ | 7 | lstClassPath = new JList();↵ | |
7 | , gbc);↵ | 8 | ret.add(new JScrollPane(lstClassPath), gbc);↵ | |
8 | gbc = new GridBagConstraints(1,0,1,1,0,0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5,5,5,5), 0,0);↵ | 9 | gbc = new GridBagConstraints(0,1,1,1,0,0, GridBagConstraints.SOUTHEAST,GridBagConstraints.NONE, new Insets(0,5,5,5),0,0);↵ | |
9 | btnNo = new JButton(s_stringMgr.getString("SessionStartupTimeHintDlg.no"));↵ | 10 | ↵ | |
10 | ret.add(btnNo, gbc);↵ | 11 | ret.add(createButtonClasspathPanel(), gbc);↵ | |
11 | 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 | gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5, 5, 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); | ||||||||||||||||||||||
5 | btnYes = new JButton(s_stringMgr.getString("SessionStartupTimeHintDlg.yes")); |
| 6 | lstClassPath = new JList(); | ||||||||||||||||||||||
6 | ret.add(btnYes, gbc); |
| 9 | ret.add(createButtonClasspathPanel(), gbc); | ||||||||||||||||||||||
7 | gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5, 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); | ||||||||||||||||||||||
8 | btnNo = new JButton(s_stringMgr.getString("SessionStartupTimeHintDlg.no")); |
| | |||||||||||||||||||||||
9 | ret.add(btnNo, gbc); |
| 3 | ret.setBorder(brd); | ||||||||||||||||||||||
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 | Expression btnYes is a field being modified, and thus it cannot be parameterized |
10 | Expression lstClassPath is a field being modified, and thus it cannot be parameterized |
11 | Expression btnYes cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression createButtonClasspathPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Unmatched statement btnNo=new JButton(s_stringMgr.getString("SessionStartupTimeHintDlg.no")); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
14 | Expression ret.add(btnNo,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(btnNo,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 ret.add(btnNo,gbc) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Expression ret.setBorder(brd) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression ret.add(btnNo,gbc) is a void method call, and thus it cannot be parameterized |
21 | Expression ret.setBorder(brd) is a void method call, and thus it cannot be parameterized |
22 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.gui.desktopcontainer.TabbedStyleHintDlg and net.sourceforge.squirrel_sql.plugins.hibernate.configuration.HibernateConfigPanel do not have a common superclass |