CloneSet39


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
69230.980class_body_declarations[4]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
169261
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/config/gui/ArgumentsPanel.java
269228
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java
Next
Last
Clone Instance
1
Line Count
69
Source Line
261
Source File
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/config/gui/ArgumentsPanel.java

/**
 * Invoked when an action occurs. This implementation supports the add and
 * delete buttons.
 * 
 * @param e
 *            the event that has occurred
 */
public void actionPerformed(ActionEvent e) {
  String action = e.getActionCommand();
  if (action.equals(DELETE)) {
    deleteArgument();
  }
  else
    if (action.equals(ADD)) {
      addArgument();
    }
}

/**
 * Remove the currently selected argument from the table.
 */
protected void deleteArgument() {
  // If a table cell is being edited, we must cancel the editing before
  // deleting the row
  if (table.isEditing()) {
    TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn());
    cellEditor.cancelCellEditing();
  }
  int rowSelected = table.getSelectedRow();
  if (rowSelected >= 0) {
    tableModel.removeRow(rowSelected);
    tableModel.fireTableDataChanged();
    // Disable DELETE if there are no rows in the table to delete.
    if (tableModel.getRowCount() == 0) {
      delete.setEnabled(false);
    }
    // Table still contains one or more rows, so highlight (select)
    // the appropriate one.
    else {
      int rowToSelect = rowSelected;
      if (rowSelected >= tableModel.getRowCount()) {
        rowToSelect = rowSelected - 1;
      }
      table.setRowSelectionInterval(rowToSelect, rowToSelect);
    }
  }
}

/**
 * Add a new argument row to the table.
 */
protected void addArgument() {
  // If a table cell is being edited, we should accept the current value
  // and stop the editing before adding a new row.
  stopTableEditing();
  tableModel.addRow(makeNewArgument());
  // Enable DELETE (which may already be enabled, but it won't hurt)
  delete.setEnabled(true);
  // Highlight (select) the appropriate row.
  int rowToSelect = tableModel.getRowCount() - 1;
  table.setRowSelectionInterval(rowToSelect, rowToSelect);
}

/**
 * Create a new Argument object.
 * 
 * @return a new Argument object
 */
protected Object makeNewArgument() {
  return new Argument("", ""); // $NON-NLS-1$ // $NON-NLS-2$
}


First
Previous
Clone Instance
2
Line Count
69
Source Line
228
Source File
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java

/**
 * Invoked when an action occurs. This implementation supports the add and
 * delete buttons.
 * 
 * @param e
 *            the event that has occurred
 */
public void actionPerformed(ActionEvent e) {
  String action = e.getActionCommand();
  if (action.equals(DELETE)) {
    deleteArgument();
  }
  else
    if (action.equals(ADD)) {
      addArgument();
    }
}

/**
 * Remove the currently selected argument from the table.
 */
protected void deleteArgument() {
  // If a table cell is being edited, we must cancel the editing before
  // deleting the row
  if (table.isEditing()) {
    TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn());
    cellEditor.cancelCellEditing();
  }
  int rowSelected = table.getSelectedRow();
  if (rowSelected >= 0) {
    tableModel.removeRow(rowSelected);
    tableModel.fireTableDataChanged();
    // Disable DELETE if there are no rows in the table to delete.
    if (tableModel.getRowCount() == 0) {
      delete.setEnabled(false);
    }
    // Table still contains one or more rows, so highlight (select)
    // the appropriate one.
    else {
      int rowToSelect = rowSelected;
      if (rowSelected >= tableModel.getRowCount()) {
        rowToSelect = rowSelected - 1;
      }
      table.setRowSelectionInterval(rowToSelect, rowToSelect);
    }
  }
}

/**
 * Add a new argument row to the table.
 */
protected void addArgument() {
  // If a table cell is being edited, we should accept the current value
  // and stop the editing before adding a new row.
  stopTableEditing();
  tableModel.addRow(makeNewLDAPArgument());
  // Enable DELETE (which may already be enabled, but it won't hurt)
  delete.setEnabled(true);
  // Highlight (select) the appropriate row.
  int rowToSelect = tableModel.getRowCount() - 1;
  table.setRowSelectionInterval(rowToSelect, rowToSelect);
}

/**
 * Create a new LDAPArgument object.
 * 
 * @return a new LDAPArgument object
 */
protected Object makeNewLDAPArgument() {
  return new LDAPArgument("", "", "");
}


Clone AbstractionParameter Count: 3Parameter Bindings

/**
         * Invoked when an action occurs. This implementation supports the add and
         * delete buttons.
         * 
         * @param e
         *            the event that has occurred
         */
public void actionPerformed(ActionEvent e) {
  String action = e.getActionCommand();
  if (action.equals(DELETE)) {
    deleteArgument();
  }
  else
    if (action.equals(ADD)) {
      addArgument();
    }
}

/**
         * Remove the currently selected argument from the table.
         */
protected void deleteArgument() {
  // If a table cell is being edited, we must cancel the editing before
  // deleting the row
  if (table.isEditing()) {
    TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn());
    cellEditor.cancelCellEditing();
  }
  int rowSelected = table.getSelectedRow();
  if (rowSelected >= 0) {
    tableModel.removeRow(rowSelected);
    tableModel.fireTableDataChanged();
    // Disable DELETE if there are no rows in the table to delete.
    if (tableModel.getRowCount() == 0) {
      delete.setEnabled(false);
    }
    // Table still contains one or more rows, so highlight (select)
    // the appropriate one.
    else {
      int rowToSelect = rowSelected;
      if (rowSelected >= tableModel.getRowCount()) {
        rowToSelect = rowSelected - 1;
      }
      table.setRowSelectionInterval(rowToSelect, rowToSelect);
    }
  }
}

/**
         * Add a new argument row to the table.
         */
protected void addArgument() {
  // If a table cell is being edited, we should accept the current value
  // and stop the editing before adding a new row.
  stopTableEditing();
  tableModel.addRow( [[#variabledfdbd80]]());
  // Enable DELETE (which may already be enabled, but it won't hurt)
  delete.setEnabled(true);
  // Highlight (select) the appropriate row.
  int rowToSelect = tableModel.getRowCount() - 1;
  table.setRowSelectionInterval(rowToSelect, rowToSelect);
}

/**
         * Create a new LDAPArgument object.
         * 
         * @return a new LDAPArgument object
         */
/**
         * Create a new Argument object.
         * 
         * @return a new Argument object
         */
protected Object  [[#variabledfdbd80]]() {
  return new [[#variabledfdb920]]( [[#variabledfdbd20]], ""); // $NON-NLS-1$ // $NON-NLS-2$
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#dfdbd80]]
makeNewArgument 
12[[#dfdbd80]]
makeNewLDAPArgument 
21[[#dfdb920]]
Argument 
22[[#dfdb920]]
LDAPArgument 
31[[#dfdbd20]]
"" 
32[[#dfdbd20]]
"", ""