File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/gui/AbstractRefactoringDialog.java | File path: /sql12/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/gui/AbstractPostgresDialog.java | |||
Method name: JPanel getButtonPanel()
|
Method name: JPanel getButtonPanel()
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | JPanel result = new JPanel();↵ | 1 | JPanel result = new JPanel();↵ | |
2 | ↵ | |||
3 | executeButton = new JButton(i18n.EXECUTE_BUTTON_LABEL);↵ | 2 | _executeButton = new JButton(i18n.EXECUTE_BUTTON_LABEL);↵ | |
4 | ↵ | |||
5 | result.add(executeButton);↵ | 3 | result.add(_executeButton);↵ | |
6 | ↵ | |||
7 | editSQLButton = new JButton(i18n.EDIT_BUTTON_LABEL);↵ | 4 | _editButton = new JButton(i18n.EDIT_BUTTON_LABEL);↵ | |
8 | ↵ | |||
9 | result.add(editSQLButton);↵ | 5 | result.add(_editButton);↵ | |
10 | ↵ | |||
11 | showSQLButton = new JButton(i18n.SHOWSQL_BUTTON_LABEL);↵ | 6 | _showButton = new JButton(i18n.SHOW_BUTTON_LABEL);↵ | |
12 | ↵ | |||
13 | result.add(showSQLButton);↵ | 7 | result.add(_showButton);↵ | |
14 | ↵ | |||
15 | cancelButton = new JButton(i18n.CANCEL_BUTTON_LABEL);↵ | 8 | _cancelButton = new JButton(i18n.CANCEL_BUTTON_LABEL);↵ | |
16 | cancelButton.addAction↵ | |||
17 | Listener(new ActionListener()↵ | 9 | addCancelListener(new ActionListener()↵ | |
18 | {↵ | |||
19 | ↵ | 10 | {↵ | |
20 | public void actionPerformed(ActionEvent e)↵ | 11 | public void actionPerformed(ActionEvent e)↵ | |
21 | {↵ | |||
22 | setVisible(false);↵ | |||
23 | }↵ | |||
24 | });↵ | |||
25 | ↵ | 12 | {↵ | |
13 | setVisible(false);↵ | |||
14 | }↵ | |||
15 | });↵ | |||
26 | result.add(cancelButton);↵ | 16 | result.add(_cancelButton);↵ | |
27 | ↵ | |||
28 | return result; | 17 | return result; | |
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 | 51 |
Number of mapped statements | 11 |
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 result = new JPanel(); | 1 | JPanel result = new JPanel(); | ||||||||||||||||||||||
2 | executeButton = new JButton(i18n.EXECUTE_BUTTON_LABEL); |
| 2 | _executeButton = new JButton(i18n.EXECUTE_BUTTON_LABEL); | |||||||||||||||||||||
3 | result.add(executeButton); |
| 3 | result.add(_executeButton); | |||||||||||||||||||||
4 | editSQLButton = new JButton(i18n.EDIT_BUTTON_LABEL); |
| 4 | _editButton = new JButton(i18n.EDIT_BUTTON_LABEL); | |||||||||||||||||||||
5 | result.add(editSQLButton); |
| 5 | result.add(_editButton); | |||||||||||||||||||||
6 | showSQLButton = new JButton(i18n.SHOWSQL_BUTTON_LABEL); |
| 6 | _showButton = new JButton(i18n.SHOW_BUTTON_LABEL); | |||||||||||||||||||||
7 | result.add(showSQLButton); |
| 7 | result.add(_showButton); | |||||||||||||||||||||
8 | cancelButton = new JButton(i18n.CANCEL_BUTTON_LABEL); |
| 8 | _cancelButton = new JButton(i18n.CANCEL_BUTTON_LABEL); | |||||||||||||||||||||
9 | cancelButton.addActionListener(new ActionListener() {...}); |
| 9 | addCancelListener(new ActionListener() {...}); | |||||||||||||||||||||
10 | result.add(cancelButton); |
| 10 | result.add(_cancelButton); | |||||||||||||||||||||
11 | return result; | 11 | return result; |
Row | Violation |
---|---|
1 | Expression executeButton is a field being modified, and thus it cannot be parameterized |
2 | Expression _executeButton is a field being modified, and thus it cannot be parameterized |
3 | Type net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog.i18n does not match with type net.sourceforge.squirrel_sql.plugins.postgres.gui.AbstractPostgresDialog.i18n |
4 | Expression executeButton cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression _executeButton cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog.i18n does not match with type net.sourceforge.squirrel_sql.plugins.postgres.gui.AbstractPostgresDialog.i18n |
7 | Type net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog.i18n does not match with type net.sourceforge.squirrel_sql.plugins.postgres.gui.AbstractPostgresDialog.i18n |
8 | Expression cancelButton is a field being modified, and thus it cannot be parameterized |
9 | Expression _cancelButton is a field being modified, and thus it cannot be parameterized |
10 | Type net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog.i18n does not match with type net.sourceforge.squirrel_sql.plugins.postgres.gui.AbstractPostgresDialog.i18n |
11 | Expression cancelButton.addActionListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ setVisible(false); } } ) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression addCancelListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ setVisible(false); } } ) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression cancelButton.addActionListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ setVisible(false); } } ) is a void method call, and thus it cannot be parameterized |
14 | Expression addCancelListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ setVisible(false); } } ) is a void method call, and thus it cannot be parameterized |
15 | Expression cancelButton.addActionListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ setVisible(false); } } ) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression addCancelListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ setVisible(false); } } ) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression cancelButton.addActionListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ setVisible(false); } } ) is a void method call, and thus it cannot be parameterized |
18 | Expression addCancelListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ setVisible(false); } } ) is a void method call, and thus it cannot be parameterized |
19 | Expression cancelButton cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression _cancelButton cannot be parameterized, because it has dependencies to/from statements that will be extracted |