File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/properties/SessionSQLPropertiesPanel.java | File path: /sql12/plugins/laf/src/net/sourceforge/squirrel_sql/plugins/laf/OyoahaLookAndFeelController.java | |||
Method name: JPanel createSQLHistoryPanel()
|
Method name: void createUserInterface()
|
|||
Number of AST nodes: 16 | Number of AST nodes: 15 | |||
1 | _shareSQLHistoryChk.addChangeListener(_controlMediator);↵ | 1 | final GridBagConstr↵ | |
2 | _limitSQLHistoryComboSizeChk.addChangeListener(_controlMediator);↵ | |||
3 | JPanel pnl = new JPanel(new GridBagLayout());↵ | |||
4 | pnl.setBorder(BorderFactory.createTitledBorder(s_stringMgr.getString("SessionSQLPropertiesPanel.sqlhistory")));↵ | |||
5 | final GridBagConstraints gbc = new↵ | 2 | aints gbc = new GridBagConstraints();↵ | |
6 | GridBagConstraints();↵ | 3 | gbc.anchor = GridBagConstraints.WEST;↵ | |
7 | gbc.fill = GridBagConstraints.HORIZONTAL;↵ | 4 | gbc.fill = GridBagConstraints.HORIZONTAL;↵ | |
8 | gbc.insets = new Insets(4, 4, 4, 4);↵ | 5 | gbc.insets = new Insets(4, 4, 4, 4);↵ | |
9 | gbc.anchor = GridBa↵ | 6 | gbc.gridx = 0;↵ | |
7 | gbc.gridy = 0;↵ | |||
10 | gConstraints.WEST;↵ | 8 | add(new JLabel(OyoahaPrefsPanelI18n.THEME_PACK, SwingConstants.↵ | |
11 | gbc.gridx = 0;↵ | 9 | RIGHT), gbc);↵ | |
12 | gbc.gridy = 0;↵ | 10 | ++gbc.gridx;↵ | |
13 | pnl.add(_shareSQLHistoryChk, gbc);↵ | 11 | add(_↵ | |
14 | ++gbc.gridy;↵ | |||
15 | pnl.add(_limitSQLHistoryComboSizeChk, gbc);↵ | |||
16 | ++gbc.gridx;↵ | |||
17 | pnl.add(_limitSQLHistoryComboSizeField, gbc↵ | 12 | themePackCmb, gbc);↵ | |
13 | gbc.gridx = 0;↵ | |||
14 | ++gbc.gridy;↵ | |||
15 | add(new JLabel(OyoahaPrefsPanelI18n.THEMEPACK_LOC, SwingConstants.RIGHT), gbc);↵ | |||
16 | ++gbc.gridx;↵ | |||
18 | );↵ | 17 | final String themePackDir = _ctrl._prefs.getThemePackDirectory();↵ | |
19 | return pnl; | 18 | add(new OutputLabel(themePackDir), gbc); | |
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 | 144 |
Number of mapped statements | 11 |
Number of unmapped statements in the first code fragment | 5 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | _shareSQLHistoryChk.addChangeListener(_controlMediator); | | ||||||||||||||||||||||
2 | _limitSQLHistoryComboSizeChk.addChangeListener(_controlMediator); | | ||||||||||||||||||||||
3 | JPanel pnl = new JPanel(new GridBagLayout()); | | ||||||||||||||||||||||
4 | pnl.setBorder(BorderFactory.createTitledBorder(s_stringMgr.getString("SessionSQLPropertiesPanel.sqlhistory"))); | | ||||||||||||||||||||||
5 | final GridBagConstraints gbc = new GridBagConstraints(); | 1 | final GridBagConstraints gbc = new GridBagConstraints(); | |||||||||||||||||||||
6 | gbc.fill = GridBagConstraints.HORIZONTAL; | 3 | gbc.fill = GridBagConstraints.HORIZONTAL; | |||||||||||||||||||||
7 | gbc.insets = new Insets(4, 4, 4, 4); | 4 | gbc.insets = new Insets(4, 4, 4, 4); | |||||||||||||||||||||
8 | gbc.anchor = GridBagConstraints.WEST; | 2 | gbc.anchor = GridBagConstraints.WEST; | |||||||||||||||||||||
|
| 5 | gbc.gridx = 0; | |||||||||||||||||||||
9 | gbc.gridx = 0; | 10 | gbc.gridx = 0; | |||||||||||||||||||||
10 | gbc.gridy = 0; | 6 | gbc.gridy = 0; | |||||||||||||||||||||
|
| 8 | ++gbc.gridx; | |||||||||||||||||||||
11 | pnl.add(_shareSQLHistoryChk, gbc); |
| 9 | add(_themePackCmb, gbc); | ||||||||||||||||||||
12 | ++gbc.gridy; | 11 | ++gbc.gridy; | |||||||||||||||||||||
13 | pnl.add(_limitSQLHistoryComboSizeChk, gbc); |
| 12 | add(new JLabel(OyoahaPrefsPanelI18n.THEMEPACK_LOC, SwingConstants.RIGHT), gbc); | ||||||||||||||||||||
14 | ++gbc.gridx; | 13 | ++gbc.gridx; | |||||||||||||||||||||
15 | pnl.add(_limitSQLHistoryComboSizeField, gbc); |
| 7 | add(new JLabel(OyoahaPrefsPanelI18n.THEME_PACK, SwingConstants.RIGHT), gbc); | ||||||||||||||||||||
| 14 | final String themePackDir = _ctrl._prefs.getThemePackDirectory(); | ||||||||||||||||||||||
|
| 15 | add(new OutputLabel(themePackDir), gbc); | |||||||||||||||||||||
16 | return pnl; |
| |
Row | Violation |
---|---|
1 | Unmatched statement gbc.gridx=0; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement ++gbc.gridx; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Expression pnl.add(_shareSQLHistoryChk,gbc) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression add(_themePackCmb,gbc) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression pnl.add(_shareSQLHistoryChk,gbc) is a void method call, and thus it cannot be parameterized |
6 | Expression add(_themePackCmb,gbc) is a void method call, and thus it cannot be parameterized |
7 | Expression pnl.add(_limitSQLHistoryComboSizeChk,gbc) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression add(new JLabel(OyoahaPrefsPanelI18n.THEMEPACK_LOC,SwingConstants.RIGHT),gbc) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression pnl.add(_limitSQLHistoryComboSizeChk,gbc) is a void method call, and thus it cannot be parameterized |
10 | Expression add(new JLabel(OyoahaPrefsPanelI18n.THEMEPACK_LOC,SwingConstants.RIGHT),gbc) is a void method call, and thus it cannot be parameterized |
11 | Expression pnl.add(_limitSQLHistoryComboSizeField,gbc) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression add(new JLabel(OyoahaPrefsPanelI18n.THEME_PACK,SwingConstants.RIGHT),gbc) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression pnl.add(_limitSQLHistoryComboSizeField,gbc) is a void method call, and thus it cannot be parameterized |
14 | Expression add(new JLabel(OyoahaPrefsPanelI18n.THEME_PACK,SwingConstants.RIGHT),gbc) is a void method call, and thus it cannot be parameterized |
15 | Unmatched statement add(new OutputLabel(themePackDir),gbc); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
16 | Unmatched return pnl; |
17 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables gbc |
18 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.session.properties.SessionSQLPropertiesPanel.SQLPropertiesPanel and net.sourceforge.squirrel_sql.plugins.laf.OyoahaLookAndFeelController.OyoahaPrefsPanel do not have a common superclass |