CloneSet101


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
43220.951statement_sequence[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
144426
E:/TSE/Projects-CloneDR/sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/gui/AddForeignKeyDialog.java
243227
E:/TSE/Projects-CloneDR/sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/gui/MergeTableDialog.java
Next
Last
Clone Instance
1
Line Count
44
Source Line
426
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/gui/AddForeignKeyDialog.java

addButton = new JButton(i18n.COLUMNS_ADD_BUTTON_LABEL);
addButton.addActionListener(new ActionListener() {
                              public void actionPerformed(ActionEvent e) {
                                String local = (String) localColumBox.getSelectedItem();
                                String ref = (String) referencingBox.getSelectedItem();
                                localColumBox.removeItem(local);
                                referencingBox.removeItem(ref);
                                _columnTableModel.addColumn(new String[] {
                                                                           local,
                                                                           ref
                                                                         } );
                                _propertiesTab.enableReferencedComboBox(false);
                                if (localColumBox.getItemCount() == 0 || referencingBox.getItemCount() == 0)
                                  addButton.setEnabled(false);
                                AddForeignKeyDialog.this.checkInputCompletion();
                              }
                            } );
removeButton = new JButton(i18n.COLUMNS_REMOVE_BUTTON_LABEL);
removeButton.setEnabled(false);
removeButton.addActionListener(new ActionListener() {
                                 public void actionPerformed(ActionEvent e) {
                                   int index = _columTable.getSelectedRow();
                                   if (index != -1) {
                                     String[] removed = _columnTableModel.deleteRow(index);
                                     localColumBox.addItem(removed[0]);
                                     referencingBox.addItem(removed[1]);
                                     addButton.setEnabled(true);
                                     if (_columnTableModel.getRowCount() == 0) {
                                       removeButton.setEnabled(false);
                                       _propertiesTab.enableReferencedComboBox(true);
                                     }
                                     else {
                                       int deleteIndex = 0;
                                       if (index > 0)
                                         deleteIndex = index - 1;
                                       _columTable.getSelectionModel().setSelectionInterval(0, deleteIndex);
                                     }
                                   }
                                   AddForeignKeyDialog.this.checkInputCompletion();
                                 }
                               } );
buttonPanel.add(addButton);


First
Previous
Clone Instance
2
Line Count
43
Source Line
227
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/gui/MergeTableDialog.java

addButton = new JButton(i18n.COLUMNS_ADD_BUTTON_LABEL);
addButton.addActionListener(new ActionListener() {
                              public void actionPerformed(ActionEvent e) {
                                String local = (String) localColumBox.getSelectedItem();
                                String ref = (String) referencingBox.getSelectedItem();
                                localColumBox.removeItem(local);
                                referencingBox.removeItem(ref);
                                _columnTableModel.addColumn(new String[] {
                                                                           local,
                                                                           ref
                                                                         } );
                                _propertiesTab.enableReferencedComboBox(false);
                                if (localColumBox.getItemCount() == 0 || referencingBox.getItemCount() == 0)
                                  addButton.setEnabled(false);
                                MergeTableDialog.this.checkInputCompletion();
                              }
                            } );
removeButton = new JButton(i18n.COLUMNS_REMOVE_BUTTON_LABEL);
removeButton.setEnabled(false);
removeButton.addActionListener(new ActionListener() {
                                 public void actionPerformed(ActionEvent e) {
                                   int index = _columTable.getSelectedRow();
                                   if (index != -1) {
                                     String[] removed = _columnTableModel.deleteRow(index);
                                     localColumBox.addItem(removed[0]);
                                     referencingBox.addItem(removed[1]);
                                     addButton.setEnabled(true);
                                     if (_columnTableModel.getRowCount() == 0) {
                                       removeButton.setEnabled(false);
                                       _propertiesTab.enableReferencedComboBox(true);
                                     }
                                     else {
                                       int deleteIndex = 0;
                                       if (index > 0)
                                         deleteIndex = index - 1;
                                       _columTable.getSelectionModel().setSelectionInterval(0, deleteIndex);
                                     }
                                   }
                                   MergeTableDialog.this.checkInputCompletion();
                                 }
                               } );
Insets left = new Insets(5, 5, 5, 0);


Clone AbstractionParameter Count: 2Parameter Bindings

addButton = new JButton(i18n.COLUMNS_ADD_BUTTON_LABEL);
addButton.addActionListener(new ActionListener() {
                              public void actionPerformed(ActionEvent e) {
                                String local = (String) localColumBox.getSelectedItem();
                                String ref = (String) referencingBox.getSelectedItem();
                                localColumBox.removeItem(local);
                                referencingBox.removeItem(ref);
                                _columnTableModel.addColumn(new String[] {
                                                                           local,
                                                                           ref
                                                                         } );
                                _propertiesTab.enableReferencedComboBox(false);
                                if (localColumBox.getItemCount() == 0 || referencingBox.getItemCount() == 0)
                                  addButton.setEnabled(false);
                                 [[#variable18cef420]].this.checkInputCompletion();
                              }
                            } );
removeButton = new JButton(i18n.COLUMNS_REMOVE_BUTTON_LABEL);
removeButton.setEnabled(false);
removeButton.addActionListener(new ActionListener() {
                                 public void actionPerformed(ActionEvent e) {
                                   int index = _columTable.getSelectedRow();
                                   if (index != -1) {
                                     String[] removed = _columnTableModel.deleteRow(index);
                                     localColumBox.addItem(removed[0]);
                                     referencingBox.addItem(removed[1]);
                                     addButton.setEnabled(true);
                                     if (_columnTableModel.getRowCount() == 0) {
                                       removeButton.setEnabled(false);
                                       _propertiesTab.enableReferencedComboBox(true);
                                     }
                                     else {
                                       int deleteIndex = 0;
                                       if (index > 0)
                                         deleteIndex = index - 1;
                                       _columTable.getSelectionModel().setSelectionInterval(0, deleteIndex);
                                     }
                                   }
                                    [[#variable18cef420]].this.checkInputCompletion();
                                 }
                               } );
 [[#variable13ccd380]]
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#18cef420]]
AddForeignKeyDialog 
12[[#18cef420]]
MergeTableDialog 
21[[#13ccd380]]
buttonPanel.add(addButton); 
22[[#13ccd380]]
Insets left = new Insets(5, 5, 5, 0);