Program: 102123
Project: 102123
Buggy source:
private Composite createForeignKeysPanel(Composite parent){
  Composite thePanel=WidgetFactory.createPanel(parent,SWT.NONE,1,2);
  GridLayoutFactory.fillDefaults().margins(10,10).applyTo(thePanel);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(thePanel);
  Composite buttonPanel=new Composite(thePanel,SWT.NONE);
  GridLayoutFactory.fillDefaults().numColumns(3).applyTo(buttonPanel);
  GridDataFactory.fillDefaults().grab(true,false).applyTo(buttonPanel);
  this.addFKButton=new Button(buttonPanel,SWT.PUSH);
  this.addFKButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.ADD));
  GridDataFactory.fillDefaults().applyTo(this.addFKButton);
  this.addFKButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      RelationalForeignKey newFK=new RelationalForeignKey();
      EditForeignKeyDialog dialog=new EditForeignKeyDialog(getShell(),getModelFile(),getRelationalReference(),newFK,false);
      int result=dialog.open();
      if (result == Window.OK) {
        getRelationalReference().addForeignKey(newFK);
      }
      handleInfoChanged();
    }
  }
);
  this.editFKButton=new Button(buttonPanel,SWT.PUSH);
  this.editFKButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.EDIT_ELIPSIS));
  GridDataFactory.fillDefaults().applyTo(this.editFKButton);
  this.editFKButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      RelationalForeignKey fk=null;
      IStructuredSelection selection=(IStructuredSelection)fkViewer.getSelection();
      for (      Object obj : selection.toArray()) {
        if (obj instanceof RelationalForeignKey) {
          fk=(RelationalForeignKey)obj;
          break;
        }
      }
      if (fk != null) {
        EditForeignKeyDialog dialog=new EditForeignKeyDialog(getShell(),getModelFile(),getRelationalReference(),fk,true);
        int result=dialog.open();
        if (result == Window.OK) {
        }
        handleInfoChanged();
      }
    }
  }
);
  this.deleteFKButton=new Button(buttonPanel,SWT.PUSH);
  this.deleteFKButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.DELETE));
  GridDataFactory.fillDefaults().applyTo(this.deleteFKButton);
  this.deleteFKButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      RelationalForeignKey fk=null;
      IStructuredSelection selection=(IStructuredSelection)fkViewer.getSelection();
      for (      Object obj : selection.toArray()) {
        if (obj instanceof RelationalForeignKey) {
          fk=(RelationalForeignKey)obj;
          break;
        }
      }
      if (fk != null) {
        getRelationalReference().removeForeignKey(fk);
        deleteFKButton.setEnabled(false);
        handleInfoChanged();
      }
    }
  }
);
  Table columnTable=new Table(thePanel,SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER);
  columnTable.setHeaderVisible(true);
  columnTable.setLinesVisible(true);
  columnTable.setLayout(new TableLayout());
  this.fkViewer=new TableViewer(columnTable);
  GridDataFactory.fillDefaults().grab(true,false).hint(SWT.DEFAULT,200).applyTo(this.fkViewer.getControl());
  TableViewerColumn column=new TableViewerColumn(this.fkViewer,SWT.LEFT);
  column.getColumn().setText(Messages.fkNameLabel);
  column.setLabelProvider(new FKDataLabelProvider(0));
  column.getColumn().pack();
  if (getRelationalReference() != null) {
    for (    RelationalForeignKey row : this.getRelationalReference().getForeignKeys()) {
      this.fkViewer.add(row);
    }
  }
  return thePanel;
}

Fixed version (ground truth):
private Composite createForeignKeysPanel(Composite parent){
  Composite thePanel=WidgetFactory.createPanel(parent,SWT.NONE,1,2);
  GridLayoutFactory.fillDefaults().margins(10,10).applyTo(thePanel);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(thePanel);
  Composite buttonPanel=new Composite(thePanel,SWT.NONE);
  GridLayoutFactory.fillDefaults().numColumns(3).applyTo(buttonPanel);
  GridDataFactory.fillDefaults().grab(true,false).applyTo(buttonPanel);
  this.addFKButton=new Button(buttonPanel,SWT.PUSH);
  this.addFKButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.ADD));
  GridDataFactory.fillDefaults().applyTo(this.addFKButton);
  this.addFKButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      RelationalForeignKey newFK=new RelationalForeignKey();
      EditForeignKeyDialog dialog=new EditForeignKeyDialog(getShell(),getModelFile(),getRelationalReference(),newFK,false);
      int result=dialog.open();
      if (result == Window.OK) {
        getRelationalReference().addForeignKey(newFK);
      }
      handleInfoChanged();
    }
  }
);
  this.editFKButton=new Button(buttonPanel,SWT.PUSH);
  this.editFKButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.EDIT_ELIPSIS));
  GridDataFactory.fillDefaults().applyTo(this.editFKButton);
  this.editFKButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      RelationalForeignKey fk=null;
      IStructuredSelection selection=(IStructuredSelection)fkViewer.getSelection();
      for (      Object obj : selection.toArray()) {
        if (obj instanceof RelationalForeignKey) {
          fk=(RelationalForeignKey)obj;
          break;
        }
      }
      if (fk != null) {
        EditForeignKeyDialog dialog=new EditForeignKeyDialog(getShell(),getModelFile(),getRelationalReference(),fk,true);
        int result=dialog.open();
        if (result == Window.OK) {
        }
        handleInfoChanged();
      }
    }
  }
);
  this.deleteFKButton=new Button(buttonPanel,SWT.PUSH);
  this.deleteFKButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.DELETE));
  GridDataFactory.fillDefaults().applyTo(this.deleteFKButton);
  this.deleteFKButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      RelationalForeignKey fk=null;
      IStructuredSelection selection=(IStructuredSelection)fkViewer.getSelection();
      for (      Object obj : selection.toArray()) {
        if (obj instanceof RelationalForeignKey) {
          fk=(RelationalForeignKey)obj;
          break;
        }
      }
      if (fk != null) {
        getRelationalReference().removeForeignKey(fk);
        deleteFKButton.setEnabled(false);
        handleInfoChanged();
      }
    }
  }
);
  Table columnTable=new Table(thePanel,SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER);
  columnTable.setHeaderVisible(true);
  columnTable.setLinesVisible(true);
  columnTable.setLayout(new TableLayout());
  this.fkViewer=new TableViewer(columnTable);
  GridDataFactory.fillDefaults().grab(true,true).hint(SWT.DEFAULT,200).applyTo(this.fkViewer.getControl());
  TableViewerColumn column=new TableViewerColumn(this.fkViewer,SWT.LEFT);
  column.getColumn().setText(Messages.fkNameLabel);
  column.setLabelProvider(new FKDataLabelProvider(0));
  column.getColumn().pack();
  if (getRelationalReference() != null) {
    for (    RelationalForeignKey row : this.getRelationalReference().getForeignKeys()) {
      this.fkViewer.add(row);
    }
  }
  return thePanel;
}