Program: 67475
Project: 67475
Buggy source:
public OutputColumnTableViewer(Composite parent){
  mainControl=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.numColumns=2;
  mainControl.setLayout(layout);
  GridData data=null;
  viewer=new TableViewer(mainControl,SWT.FULL_SELECTION | SWT.BORDER);
  data=new GridData(GridData.FILL_BOTH);
  viewer.getControl().setLayoutData(data);
  viewer.getTable().setHeaderVisible(true);
  viewer.getTable().setLinesVisible(true);
  viewer.getTable().addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      updateButtons();
    }
  }
);
  viewer.getTable().addMouseListener(new MouseAdapter(){
    public void mouseDoubleClick(    MouseEvent e){
      if (viewer.getTable().getSelectionCount() == 1) {
        doEdit();
      }
    }
  }
);
  Composite btnComposite=new Composite(mainControl,SWT.NONE);
  data=new GridData();
  data.verticalAlignment=SWT.CENTER;
  btnComposite.setLayoutData(data);
  GridLayout btnLayout=new GridLayout();
  layout.verticalSpacing=20;
  btnComposite.setLayout(btnLayout);
  GridData btnData=new GridData(GridData.CENTER);
  btnData.widthHint=52;
  btnAdd=new Button(btnComposite,SWT.NONE);
  btnAdd.setText(Messages.getString("String_Node_Str"));
  btnAdd.setLayoutData(btnData);
  btnAdd.setEnabled(true);
  btnEdit=new Button(btnComposite,SWT.NONE);
  btnEdit.setText(Messages.getString("String_Node_Str"));
  btnEdit.setLayoutData(btnData);
  btnRemove=new Button(btnComposite,SWT.NONE);
  btnRemove.setText(Messages.getString("String_Node_Str"));
  btnRemove.setLayoutData(btnData);
  btnRemove.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      removeSelectedItem();
    }
    public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  btnUp=new Button(btnComposite,SWT.NONE);
  btnUp.setText(Messages.getString("String_Node_Str"));
  btnUp.setLayoutData(btnData);
  btnUp.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      doMoveUp();
    }
    public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  btnDown=new Button(btnComposite,SWT.NONE);
  btnDown.setText(Messages.getString("String_Node_Str"));
  btnDown.setLayoutData(btnData);
  btnDown.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      doMoveDown();
    }
    public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  menu=new Menu(viewer.getTable());
  menu.addMenuListener(new MenuAdapter(){
    public void menuShown(    MenuEvent e){
      viewer.cancelEditing();
    }
  }
);
  itmRemove=new MenuItem(menu,SWT.NONE);
  itmRemove.setText(Messages.getString("String_Node_Str"));
  itmRemove.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      removeSelectedItem();
    }
  }
);
  itmRemoveAll=new MenuItem(menu,SWT.NONE);
  itmRemoveAll.setText(Messages.getString("String_Node_Str"));
  itmRemoveAll.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      doRemoveAll();
    }
  }
);
  viewer.getTable().setMenu(menu);
  viewer.getTable().addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
      viewer.getTable();
    }
    public void keyReleased(    KeyEvent e){
      if (e.keyCode == SWT.DEL) {
        removeSelectedItem();
      }
    }
  }
);
}

Fixed version (ground truth):
public OutputColumnTableViewer(Composite parent){
  mainControl=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.numColumns=2;
  mainControl.setLayout(layout);
  GridData data=null;
  viewer=new TableViewer(mainControl,SWT.FULL_SELECTION | SWT.BORDER);
  data=new GridData(GridData.FILL_BOTH);
  viewer.getControl().setLayoutData(data);
  viewer.getTable().setHeaderVisible(true);
  viewer.getTable().setLinesVisible(true);
  viewer.getTable().addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      updateButtons();
    }
  }
);
  viewer.getTable().addMouseListener(new MouseAdapter(){
    public void mouseDoubleClick(    MouseEvent e){
      if (viewer.getTable().getSelectionCount() == 1) {
        doEdit();
      }
    }
  }
);
  Composite btnComposite=new Composite(mainControl,SWT.NONE);
  data=new GridData();
  data.verticalAlignment=SWT.CENTER;
  btnComposite.setLayoutData(data);
  GridLayout btnLayout=new GridLayout();
  layout.verticalSpacing=20;
  btnComposite.setLayout(btnLayout);
  btnAdd=new Button(btnComposite,SWT.NONE);
  btnAdd.setText(Messages.getString("String_Node_Str"));
  btnAdd.setEnabled(true);
  btnEdit=new Button(btnComposite,SWT.NONE);
  btnEdit.setText(Messages.getString("String_Node_Str"));
  btnRemove=new Button(btnComposite,SWT.NONE);
  btnRemove.setText(Messages.getString("String_Node_Str"));
  btnRemove.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      removeSelectedItem();
    }
    public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  btnUp=new Button(btnComposite,SWT.NONE);
  btnUp.setText(Messages.getString("String_Node_Str"));
  btnUp.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      doMoveUp();
    }
    public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  btnDown=new Button(btnComposite,SWT.NONE);
  btnDown.setText(Messages.getString("String_Node_Str"));
  btnDown.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      doMoveDown();
    }
    public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  int width=getMaxWidth(btnAdd,55);
  width=getMaxWidth(btnEdit,width);
  width=getMaxWidth(btnRemove,width);
  width=getMaxWidth(btnUp,width);
  width=getMaxWidth(btnDown,width);
  GridData btnData=new GridData(GridData.CENTER);
  btnData.widthHint=width;
  btnAdd.setLayoutData(btnData);
  btnEdit.setLayoutData(btnData);
  btnRemove.setLayoutData(btnData);
  btnUp.setLayoutData(btnData);
  btnDown.setLayoutData(btnData);
  menu=new Menu(viewer.getTable());
  menu.addMenuListener(new MenuAdapter(){
    public void menuShown(    MenuEvent e){
      viewer.cancelEditing();
    }
  }
);
  itmRemove=new MenuItem(menu,SWT.NONE);
  itmRemove.setText(Messages.getString("String_Node_Str"));
  itmRemove.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      removeSelectedItem();
    }
  }
);
  itmRemoveAll=new MenuItem(menu,SWT.NONE);
  itmRemoveAll.setText(Messages.getString("String_Node_Str"));
  itmRemoveAll.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      doRemoveAll();
    }
  }
);
  viewer.getTable().setMenu(menu);
  viewer.getTable().addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
      viewer.getTable();
    }
    public void keyReleased(    KeyEvent e){
      if (e.keyCode == SWT.DEL) {
        removeSelectedItem();
      }
    }
  }
);
}