Program: 122903
Project: 122903
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){
    }
  }
;
  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(){
    @Override public void handleEvent(    ExtendedButtonEvent event){
    }
  }
;
  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(){
      @Override 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(){
    @Override public void widgetDisposed(    DisposeEvent e){
      for (      ExtendedPushButton extendedPushButton : outputToolBarButtons) {
        extendedPushButton.removeListener(beforeCommandListenerForOutputButtons,true);
      }
    }
  }
);
}