Program: 78821
Project: 78821
Buggy source:
private void createDynamicParamsPart(Composite parent){
  Composite comp=new Composite(parent,SWT.NULL);
  GridLayout layout=new GridLayout(3,false);
  layout.marginHeight=0;
  layout.marginWidth=0;
  comp.setLayout(layout);
  comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  createLabel(comp,LABEL_DATA_SETS);
  dataSetsCombo=new Combo(comp,SWT.READ_ONLY);
  GridData data=new GridData();
  data.widthHint=120;
  dataSetsCombo.setLayoutData(data);
  dataSetsCombo.setItems(getDataSets());
  dataSetsCombo.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      dataSet=getDataSet(dataSetsCombo.getText());
    }
  }
);
  createDSButton=new Button(comp,SWT.PUSH);
  createDSButton.setText(LABEL_BUTTON_CREATE_NEW_DATASET);
  createDSButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      new NewDataSetAction().run();
      refreshDataSets();
    }
  }
);
  Label label=new Label(comp,SWT.NULL);
  label.setText(LABEL_PARAMETERS);
  data=new GridData();
  data.horizontalSpan=3;
  label.setLayoutData(data);
  table=new Table(comp,SWT.FULL_SELECTION | SWT.HIDE_SELECTION | SWT.BORDER);
  data=new GridData(GridData.FILL_HORIZONTAL);
  data.horizontalSpan=3;
  data.heightHint=100;
  table.setLayoutData(data);
  table.setLinesVisible(true);
  table.setHeaderVisible(true);
  table.addKeyListener(new KeyAdapter(){
    public void keyReleased(    KeyEvent e){
      if (e.keyCode == SWT.DEL) {
        deleteRow();
      }
    }
  }
);
  int[] columnWidths=new int[]{180,145,145};
  String[] columnProps=new String[]{COLUMN_NAME,COLUMN_VALUE,COLUMN_DISPLAY_TEXT};
  String[] columnLabels=new String[]{COLUMN_NAME_LABEL,COLUMN_VALUE_LABEL,COLUMN_DISPLAY_TEXT_LABEL};
  cellEditors=new CellEditor[]{new TextCellEditor(table),new ComboBoxCellEditor(table,new String[0],SWT.READ_ONLY),new ComboBoxCellEditor(table,new String[0],SWT.READ_ONLY)};
  for (int i=0; i < columnProps.length; i++) {
    TableColumn column=new TableColumn(table,SWT.LEFT);
    column.setResizable(true);
    column.setText(columnLabels[i]);
    column.setWidth(columnWidths[i]);
  }
  valueTable=new TableViewer(table);
  valueTable.setCellEditors(cellEditors);
  valueTable.setColumnProperties(columnProps);
  valueTable.setContentProvider(contentProvider);
  valueTable.setLabelProvider(labelProvider);
  valueTable.setCellModifier(cellModifier);
  valueTable.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      ISelection selection=event.getSelection();
      Object param=((StructuredSelection)selection).getFirstElement();
      if (param != selectedParameter) {
        if (param instanceof ScalarParameterHandle) {
          try {
            saveParameterProperties();
            selectedParameter=(ScalarParameterHandle)param;
          }
 catch (          SemanticException e) {
            ExceptionHandler.handle(e);
            valueTable.setSelection(new StructuredSelection(selectedParameter));
          }
          refreshParameterProperties();
          updateButtons();
        }
      }
    }
  }
);
}

Fixed version (ground truth):
private void createDynamicParamsPart(Composite parent){
  Composite comp=new Composite(parent,SWT.NULL);
  GridLayout layout=new GridLayout(3,false);
  layout.marginHeight=0;
  layout.marginWidth=0;
  comp.setLayout(layout);
  comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  createLabel(comp,LABEL_DATA_SETS);
  dataSetsCombo=new Combo(comp,SWT.READ_ONLY);
  GridData data=new GridData();
  data.widthHint=120;
  dataSetsCombo.setLayoutData(data);
  dataSetsCombo.setItems(getDataSets());
  dataSetsCombo.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      dataSet=getDataSet(dataSetsCombo.getText());
      refreshValueTable();
      updateButtons();
    }
  }
);
  createDSButton=new Button(comp,SWT.PUSH);
  createDSButton.setText(LABEL_BUTTON_CREATE_NEW_DATASET);
  createDSButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      new NewDataSetAction().run();
      refreshDataSets();
    }
  }
);
  Label label=new Label(comp,SWT.NULL);
  label.setText(LABEL_PARAMETERS);
  data=new GridData();
  data.horizontalSpan=3;
  label.setLayoutData(data);
  table=new Table(comp,SWT.FULL_SELECTION | SWT.HIDE_SELECTION | SWT.BORDER);
  data=new GridData(GridData.FILL_HORIZONTAL);
  data.horizontalSpan=3;
  data.heightHint=100;
  table.setLayoutData(data);
  table.setLinesVisible(true);
  table.setHeaderVisible(true);
  table.addKeyListener(new KeyAdapter(){
    public void keyReleased(    KeyEvent e){
      if (e.keyCode == SWT.DEL) {
        deleteRow();
      }
    }
  }
);
  int[] columnWidths=new int[]{180,145,145};
  String[] columnProps=new String[]{COLUMN_NAME,COLUMN_VALUE,COLUMN_DISPLAY_TEXT};
  String[] columnLabels=new String[]{COLUMN_NAME_LABEL,COLUMN_VALUE_LABEL,COLUMN_DISPLAY_TEXT_LABEL};
  cellEditors=new CellEditor[]{new TextCellEditor(table),new ComboBoxCellEditor(table,new String[0],SWT.READ_ONLY),new ComboBoxCellEditor(table,new String[0],SWT.READ_ONLY)};
  for (int i=0; i < columnProps.length; i++) {
    TableColumn column=new TableColumn(table,SWT.LEFT);
    column.setResizable(true);
    column.setText(columnLabels[i]);
    column.setWidth(columnWidths[i]);
  }
  valueTable=new TableViewer(table);
  valueTable.setCellEditors(cellEditors);
  valueTable.setColumnProperties(columnProps);
  valueTable.setContentProvider(contentProvider);
  valueTable.setLabelProvider(labelProvider);
  valueTable.setCellModifier(cellModifier);
  valueTable.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      ISelection selection=event.getSelection();
      Object param=((StructuredSelection)selection).getFirstElement();
      if (param != selectedParameter) {
        if (param instanceof ScalarParameterHandle) {
          try {
            saveParameterProperties();
            selectedParameter=(ScalarParameterHandle)param;
          }
 catch (          SemanticException e) {
            ExceptionHandler.handle(e);
            valueTable.setSelection(new StructuredSelection(selectedParameter));
          }
          refreshParameterProperties();
          updateButtons();
        }
      }
    }
  }
);
}