Program: 126831
Project: 126831
Buggy source:
private void createItemsListButtonsArea(Composite listComposite){
  Composite buttonsComposite=new Composite(listComposite,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.marginWidth=0;
  layout.marginHeight=25;
  buttonsComposite.setLayout(layout);
  buttonsComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
  Button refresh=new Button(buttonsComposite,SWT.PUSH);
  refresh.setText(Messages.getString("String_Node_Str"));
  refresh.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (itemFromDirectoryRadio.getSelection()) {
        updateItemsList(directoryPathField.getText().trim(),true,true);
      }
 else {
        updateItemsList(archivePathField.getText().trim(),false,true);
      }
    }
  }
);
  setButtonLayoutData(refresh);
  new Label(buttonsComposite,SWT.NONE);
  Button selectAll=new Button(buttonsComposite,SWT.PUSH);
  selectAll.setText(Messages.getString("String_Node_Str"));
  selectAll.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      final CheckboxTreeViewer viewer=filteredCheckboxTree.getViewer();
      if (viewer.getTree().getItemCount() > 0) {
        for (int i=0; i < viewer.getTree().getItemCount(); i++) {
          TreeItem topItem=viewer.getTree().getItem(i);
          if (topItem != null) {
            viewer.setSubtreeChecked(topItem.getData(),true);
          }
        }
        filteredCheckboxTree.calculateCheckedLeafNodes();
        checkSelectedItemErrors();
      }
    }
  }
);
  setButtonLayoutData(selectAll);
  Button deselectAll=new Button(buttonsComposite,SWT.PUSH);
  deselectAll.setText(Messages.getString("String_Node_Str"));
  deselectAll.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      filteredCheckboxTree.getViewer().setCheckedElements(new Object[0]);
      filteredCheckboxTree.calculateCheckedLeafNodes();
      checkSelectedItemErrors();
    }
  }
);
  setButtonLayoutData(deselectAll);
  new Label(buttonsComposite,SWT.NONE);
  Button expandAll=new Button(buttonsComposite,SWT.PUSH);
  expandAll.setText(Messages.getString("String_Node_Str"));
  expandAll.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      filteredCheckboxTree.getViewer().expandAll();
    }
  }
);
  setButtonLayoutData(expandAll);
  Button collapseAll=new Button(buttonsComposite,SWT.PUSH);
  collapseAll.setText(Messages.getString("String_Node_Str"));
  collapseAll.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      filteredCheckboxTree.getViewer().collapseAll();
    }
  }
);
  setButtonLayoutData(collapseAll);
}

Fixed version (ground truth):
private void createItemsListButtonsArea(Composite listComposite){
  Composite buttonsComposite=new Composite(listComposite,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.marginWidth=0;
  layout.marginHeight=25;
  buttonsComposite.setLayout(layout);
  buttonsComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
  Button refresh=new Button(buttonsComposite,SWT.PUSH);
  refresh.setText(Messages.getString("String_Node_Str"));
  refresh.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (itemFromDirectoryRadio.getSelection()) {
        updateItemsList(directoryPathField.getText().trim(),true,true);
      }
 else {
        updateItemsList(archivePathField.getText().trim(),false,true);
      }
    }
  }
);
  setButtonLayoutData(refresh);
  refresh.setVisible(false);
  new Label(buttonsComposite,SWT.NONE);
  Button selectAll=new Button(buttonsComposite,SWT.PUSH);
  selectAll.setText(Messages.getString("String_Node_Str"));
  selectAll.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      final CheckboxTreeViewer viewer=filteredCheckboxTree.getViewer();
      if (viewer.getTree().getItemCount() > 0) {
        for (int i=0; i < viewer.getTree().getItemCount(); i++) {
          TreeItem topItem=viewer.getTree().getItem(i);
          if (topItem != null) {
            viewer.setSubtreeChecked(topItem.getData(),true);
          }
        }
        filteredCheckboxTree.calculateCheckedLeafNodes();
        checkSelectedItemErrors();
      }
    }
  }
);
  setButtonLayoutData(selectAll);
  Button deselectAll=new Button(buttonsComposite,SWT.PUSH);
  deselectAll.setText(Messages.getString("String_Node_Str"));
  deselectAll.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      filteredCheckboxTree.getViewer().setCheckedElements(new Object[0]);
      filteredCheckboxTree.calculateCheckedLeafNodes();
      checkSelectedItemErrors();
    }
  }
);
  setButtonLayoutData(deselectAll);
  new Label(buttonsComposite,SWT.NONE);
  Button expandAll=new Button(buttonsComposite,SWT.PUSH);
  expandAll.setText(Messages.getString("String_Node_Str"));
  expandAll.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      filteredCheckboxTree.getViewer().expandAll();
    }
  }
);
  setButtonLayoutData(expandAll);
  Button collapseAll=new Button(buttonsComposite,SWT.PUSH);
  collapseAll.setText(Messages.getString("String_Node_Str"));
  collapseAll.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      filteredCheckboxTree.getViewer().collapseAll();
    }
  }
);
  setButtonLayoutData(collapseAll);
}