Program: 123810
Project: 123810
Buggy source:
private Composite createBottomButtonArea(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  GridLayout gridLayout=new GridLayout();
  gridLayout.horizontalSpacing=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING * 4);
  composite.setLayout(gridLayout);
  composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END));
  Button expandButton=createButton(composite,99,Messages.getString("String_Node_Str"),false);
  expandButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (getViewer() != null) {
        getViewer().expandAll();
      }
    }
  }
);
  Button collapseButton=createButton(composite,98,Messages.getString("String_Node_Str"),false);
  collapseButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (getViewer() != null) {
        getViewer().collapseAll();
      }
    }
  }
);
  if (!isOnlySimpleShow()) {
    selectButton=createButton(composite,IDialogConstants.SELECT_ALL_ID,WorkbenchMessages.SelectionDialog_selectLabel,false);
    if (getViewerHelper() != null) {
      getViewerHelper().refreshSelectButton();
    }
    selectButton.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        if (getViewerHelper() != null) {
          boolean state=false;
          if (!isJobReadOnly && WorkbenchMessages.SelectionDialog_selectLabel.equals(selectButton.getText())) {
            state=true;
          }
          getViewerHelper().selectAll(state);
        }
      }
    }
);
  }
  return composite;
}

Fixed version (ground truth):
private Composite createBottomButtonArea(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  GridLayout gridLayout=new GridLayout();
  gridLayout.horizontalSpacing=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING * 4);
  composite.setLayout(gridLayout);
  composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END));
  Button expandButton=createButton(composite,99,Messages.getString("String_Node_Str"),false);
  expandButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (getViewer() != null) {
        getViewer().expandAll();
      }
    }
  }
);
  Button collapseButton=createButton(composite,98,Messages.getString("String_Node_Str"),false);
  collapseButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (getViewer() != null) {
        getViewer().collapseAll();
      }
    }
  }
);
  if (!isOnlySimpleShow() && canDeselect) {
    selectButton=createButton(composite,IDialogConstants.SELECT_ALL_ID,WorkbenchMessages.SelectionDialog_selectLabel,false);
    if (getViewerHelper() != null) {
      getViewerHelper().refreshSelectButton();
    }
    selectButton.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        if (getViewerHelper() != null) {
          boolean state=false;
          if (!isJobReadOnly && WorkbenchMessages.SelectionDialog_selectLabel.equals(selectButton.getText())) {
            state=true;
          }
          getViewerHelper().selectAll(state);
        }
      }
    }
);
  }
  return composite;
}