File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/gui/MergeTableDialog.java | File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/gui/AddForeignKeyDialog.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | String local = (String) localColumBox.getSelectedItem();↵ | 1 | String local = (String) localColumBox.getSelectedItem();↵ | |
2 | String ref = (String) referencingBox.getSelectedItem();↵ | 2 | String ref = (String) referencingBox.getSelectedItem();↵ | |
3 | localColumBox.removeItem(local);↵ | 3 | localColumBox.removeItem(local);↵ | |
4 | referencingBox.removeItem(ref);↵ | 4 | referencingBox.removeItem(ref);↵ | |
5 | _columnTableModel.addColumn(new String[]{local, ref});↵ | 5 | _columnTableModel.addColumn(new String[]{local, ref});↵ | |
6 | _propertiesTab.enableReferencedComboBox(false);↵ | 6 | _propertiesTab.enableReferencedComboBox(false);↵ | |
7 | if (localColumBox.getItemCount() == 0 || referencingBox.getItemCount() == 0)↵ | 7 | if (localColumBox.getItemCount() == 0 || referencingBox.getItemCount() == 0)↵ | |
8 | addButton.setEnabled(false);↵ | 8 | addButton.setEnabled(false);↵ | |
9 | MergeTableDialog.this.checkInputCompletion(); | 9 | AddForeignKeyDialog.this.checkInputCompletion(); | |
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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 53 |
Number of mapped statements | 9 |
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) | 13.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | String local = (String)localColumBox.getSelectedItem(); | 1 | String local = (String)localColumBox.getSelectedItem(); | ||||||||||||
2 | String ref = (String)referencingBox.getSelectedItem(); | 2 | String ref = (String)referencingBox.getSelectedItem(); | ||||||||||||
3 | localColumBox.removeItem(local); | 3 | localColumBox.removeItem(local); | ||||||||||||
4 | referencingBox.removeItem(ref); | 4 | referencingBox.removeItem(ref); | ||||||||||||
5 | _columnTableModel.addColumn(new String[] {local, ref}); |
| 5 | _columnTableModel.addColumn(new String[] {local, ref}); | |||||||||||
6 | _propertiesTab.enableReferencedComboBox(false); |
| 6 | _propertiesTab.enableReferencedComboBox(false); | |||||||||||
7 | if (localColumBox.getItemCount() == 0 || referencingBox.getItemCount() == 0) | 7 | if (localColumBox.getItemCount() == 0 || referencingBox.getItemCount() == 0) | ||||||||||||
8 | addButton.setEnabled(false); | 8 | addButton.setEnabled(false); | ||||||||||||
9 | MergeTableDialog.this.checkInputCompletion(); |
| 9 | AddForeignKeyDialog.this.checkInputCompletion(); |
Row | Violation |
---|---|
1 | Expression _columnTableModel cannot be unified with expression _columnTableModel , because common superclass javax.swing.table.AbstractTableModel does not declare member(s) public void addColumn(java.lang.String[]) |
2 | Expression _propertiesTab cannot be unified with expression _propertiesTab , because common superclass javax.swing.JPanel does not declare member(s) private void enableReferencedComboBox(boolean) |
3 | Expression MergeTableDialog cannot be unified with expression AddForeignKeyDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringTabbedDialog does not declare member(s) private void checkInputCompletion() |
4 | The refactoring of the clones is infeasible, because classes and do not have a common superclass |