File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/DriverInternalFrame.java | File path: /sql12/plugins/sqlval/src/net/sourceforge/squirrel_sql/plugins/sqlval/LogonDialog.java | |||
Method name: JPanel createButtonsPanel()
|
Method name: JPanel createButtonsPanel()
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | JPanel pnl = new JPanel();↵ | 1 | JPanel pnl = new JPanel();↵ | |
2 | // i18n[sqlval.logonOk=OK]↵ | |||
2 | JButton okBtn = new JButton(s_stringMgr.getString("DriverInternalFrame.ok"));↵ | 3 | JButton okBtn = new JButton(s_stringMgr.getString("sqlval.logonOk"));↵ | |
3 | okBtn.addActionListener(new ActionListener()↵ | 4 | okBtn.addActionListener(new ActionListener()↵ | |
4 | {↵ | 5 | {↵ | |
5 | public void actionPerformed(ActionEvent evt)↵ | 6 | public void actionPerformed(ActionEvent evt)↵ | |
6 | {↵ | 7 | {↵ | |
7 | performOk();↵ | 8 | performOk();↵ | |
8 | }↵ | 9 | }↵ | |
9 | });↵ | 10 | });↵ | |
10 | ↵ | 11 | // i18n[sqlval.logonClose=Close]↵ | |
11 | JButton closeBtn = new JButton(s_stringMgr.getString("DriverInternalFrame.close"));↵ | 12 | JButton closeBtn = new JButton(s_stringMgr.getString("sqlval.logonClose"));↵ | |
12 | closeBtn.addActionListener(new ActionListener()↵ | 13 | closeBtn.addActionListener(new ActionListener()↵ | |
13 | {↵ | 14 | {↵ | |
14 | public void actionPerformed(ActionEvent evt)↵ | 15 | public void actionPerformed(ActionEvent evt)↵ | |
15 | {↵ | 16 | {↵ | |
16 | performClose();↵ | 17 | performClose();↵ | |
17 | }↵ | 18 | }↵ | |
18 | });↵ | 19 | });↵ | |
19 | pnl.add(okBtn);↵ | |||
20 | pnl.add(closeBtn);↵ | |||
21 | GUIUtils.setJButtonSizesTheSame(new JButton[] { okBtn, closeBtn });↵ | 20 | GUIUtils.setJButtonSizesTheSame(new JButton[] { okBtn, closeBtn });↵ | |
21 | pnl.add(okBtn);↵ | |||
22 | pnl.add(closeBtn);↵ | |||
22 | getRootPane().setDefaultButton(okBtn);↵ | 23 | getRootPane().setDefaultButton(okBtn);↵ | |
23 | return pnl; | 24 |
| |
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 |
Number of node comparisons | 55 |
Number of mapped statements | 10 |
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 pnl = new JPanel(); | 1 | JPanel pnl = new JPanel(); | |||||||||||
2 | JButton okBtn = new JButton(s_stringMgr.getString("DriverInternalFrame.ok")); |
| 2 | JButton okBtn = new JButton(s_stringMgr.getString("sqlval.logonOk")); | ||||||||||
3 | okBtn.addActionListener(new ActionListener() {...}); | 3 | okBtn.addActionListener(new ActionListener() {...}); | |||||||||||
4 | JButton closeBtn = new JButton(s_stringMgr.getString("DriverInternalFrame.close")); |
| 4 | JButton closeBtn = new JButton(s_stringMgr.getString("sqlval.logonClose")); | ||||||||||
5 | closeBtn.addActionListener(new ActionListener() {...}); | 5 | closeBtn.addActionListener(new ActionListener() {...}); | |||||||||||
6 | pnl.add(okBtn); | 7 | pnl.add(okBtn); | |||||||||||
7 | pnl.add(closeBtn); | 8 | pnl.add(closeBtn); | |||||||||||
8 | GUIUtils.setJButtonSizesTheSame(new JButton[] {okBtn, closeBtn}); | 6 | GUIUtils.setJButtonSizesTheSame(new JButton[] {okBtn, closeBtn}); | |||||||||||
9 | getRootPane().setDefaultButton(okBtn); | 9 | getRootPane().setDefaultButton(okBtn); | |||||||||||
10 | return pnl; | 10 | return pnl; |
Row | Violation |
---|---|
1 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.gui.db.DriverInternalFrame and net.sourceforge.squirrel_sql.plugins.sqlval.LogonDialog do not have a common superclass |