Program: 122568
Project: 122568
Buggy source:
/** 
 * DOC amaumont Comment method "addListenersToInputButtons".
 */
private void addListenersToOutputButtons(){
  MetadataToolbarEditorView toolBar=outputMetaEditor.getToolBar();
  outputToolBarButtons=toolBar.getButtons();
  beforeCommandListenerForOutputButtons=new IExtendedButtonListener(){
    public void handleEvent(    ExtendedButtonEvent event){
      TableViewerCreator tableViewerCreator=mapperManager.getUiManager().getCurrentSelectedOutputTableView().getTableViewerCreatorForColumns();
      if (tableViewerCreator != null) {
        tableViewerCreator.applyActivatedCellEditor();
      }
    }
  }
;
  for (  ExtendedPushButton extendedPushButton : outputToolBarButtons) {
    extendedPushButton.addListener(beforeCommandListenerForOutputButtons,true);
    if (extendedPushButton instanceof RemovePushButton) {
      removeButton=(RemovePushButtonForExtendedTable)extendedPushButton;
    }
  }
  if (removeButton != null) {
    final TableViewerCreator tableViewerCreator=removeButton.getExtendedTableViewer().getTableViewerCreator();
    tableViewerCreator.getSelectionHelper().addAfterSelectionListener(new ILineSelectionListener(){
      public void handle(      LineSelectionEvent e){
        for (        TableItem item : tableViewerCreator.getTable().getSelection()) {
          if (item.getData() instanceof MetadataColumn) {
            MetadataColumn column=(MetadataColumn)item.getData();
            removeButton.getButton().setEnabled(!column.isCustom());
            break;
          }
        }
      }
    }
);
  }
  this.addDisposeListener(new DisposeListener(){
    public void widgetDisposed(    DisposeEvent e){
      for (      ExtendedPushButton extendedPushButton : outputToolBarButtons) {
        extendedPushButton.removeListener(beforeCommandListenerForOutputButtons,true);
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC amaumont Comment method "addListenersToInputButtons".
 */
private void addListenersToOutputButtons(){
  MetadataToolbarEditorView toolBar=outputMetaEditor.getToolBar();
  outputToolBarButtons=toolBar.getButtons();
  beforeCommandListenerForOutputButtons=new IExtendedButtonListener(){
    public void handleEvent(    ExtendedButtonEvent event){
      TableViewerCreator tableViewerCreator=mapperManager.getUiManager().getCurrentSelectedOutputTableView().getTableViewerCreatorForColumns();
      if (tableViewerCreator != null) {
        tableViewerCreator.applyActivatedCellEditor();
      }
    }
  }
;
  for (  ExtendedPushButton extendedPushButton : outputToolBarButtons) {
    extendedPushButton.addListener(beforeCommandListenerForOutputButtons,true);
    if (extendedPushButton instanceof RemovePushButton && !mapperManager.componentIsReadOnly()) {
      removeButton=(RemovePushButtonForExtendedTable)extendedPushButton;
    }
  }
  if (removeButton != null) {
    final TableViewerCreator tableViewerCreator=removeButton.getExtendedTableViewer().getTableViewerCreator();
    tableViewerCreator.getSelectionHelper().addAfterSelectionListener(new ILineSelectionListener(){
      public void handle(      LineSelectionEvent e){
        for (        TableItem item : tableViewerCreator.getTable().getSelection()) {
          if (item.getData() instanceof MetadataColumn) {
            MetadataColumn column=(MetadataColumn)item.getData();
            removeButton.getButton().setEnabled(!column.isCustom());
            break;
          }
        }
      }
    }
);
  }
  this.addDisposeListener(new DisposeListener(){
    public void widgetDisposed(    DisposeEvent e){
      for (      ExtendedPushButton extendedPushButton : outputToolBarButtons) {
        extendedPushButton.removeListener(beforeCommandListenerForOutputButtons,true);
      }
    }
  }
);
}