Program: 79237
Project: 79237
Buggy source:
/** 
 * Creates the composite,  for displaying the list of available db objects
 * @param parent
 */
private void createTableSelectionComposite(Composite parent){
  Composite tablescomposite=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  tablescomposite.setLayout(layout);
{
    GridData data=new GridData(GridData.FILL_BOTH);
    data.grabExcessVerticalSpace=true;
    tablescomposite.setLayoutData(data);
  }
  Label dataSourceLabel=new Label(tablescomposite,SWT.LEFT);
  dataSourceLabel.setText(JdbcPlugin.getResourceString("String_Node_Str"));
{
    GridData data=new GridData();
    dataSourceLabel.setLayoutData(data);
  }
  AvailableDbObjects=new Tree(tablescomposite,SWT.BORDER | SWT.MULTI);
{
    GridData data=new GridData(GridData.FILL_BOTH);
    data.grabExcessHorizontalSpace=true;
    data.grabExcessVerticalSpace=true;
    AvailableDbObjects.setLayoutData(data);
  }
  AvailableDbObjects.addMouseListener(new MouseAdapter(){
    public void mouseDoubleClick(    MouseEvent e){
    }
  }
);
  AvailableDbObjects.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      if (event.widget.getClass() != null)       handleAvailabeTreeSelection();
    }
    private void handleAvailabeTreeSelection(){
      TreeItem items[]=AvailableDbObjects.getSelection();
      for (int i=0; i < items.length; i++) {
        if (items[i].getGrayed()) {
          AvailableDbObjects.setRedraw(false);
          AvailableDbObjects.deselectAll();
          AvailableDbObjects.setRedraw(true);
          AvailableDbObjects.redraw();
        }
      }
    }
  }
);
  Group selectTableGroup=new Group(tablescomposite,SWT.FILL);
{
    GridLayout groupLayout=new GridLayout();
    groupLayout.numColumns=3;
    groupLayout.verticalSpacing=10;
    selectTableGroup.setLayout(groupLayout);
    GridData data=new GridData(GridData.FILL_HORIZONTAL);
    selectTableGroup.setLayoutData(data);
  }
  Label FilterLabel=new Label(selectTableGroup,SWT.LEFT);
  FilterLabel.setText(JdbcPlugin.getResourceString("String_Node_Str"));
  searchTxt=new Text(selectTableGroup,SWT.BORDER);
{
    GridData data=new GridData();
    data.horizontalSpan=2;
    searchTxt.setLayoutData(data);
  }
  Label selectTypeLabel=new Label(selectTableGroup,SWT.NONE);
  selectTypeLabel.setText(JdbcPlugin.getResourceString("String_Node_Str"));
  filterComboViewer=new ComboViewer(selectTableGroup,SWT.READ_ONLY);
  setFilterComboContents(filterComboViewer);
  Button findButton=new Button(selectTableGroup,SWT.NONE);
  findButton.setText(JdbcPlugin.getResourceString("String_Node_Str"));
  findButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable(){
        public void run(){
          populateAvailableDbObjects();
        }
      }
);
    }
  }
);
  setRootElement();
  addDragSupportToTree();
}

Fixed version (ground truth):
/** 
 * Creates the composite,  for displaying the list of available db objects
 * @param parent
 */
private void createTableSelectionComposite(Composite parent){
  Composite tablescomposite=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  tablescomposite.setLayout(layout);
{
    GridData data=new GridData(GridData.FILL_BOTH);
    data.grabExcessVerticalSpace=true;
    tablescomposite.setLayoutData(data);
  }
  Label dataSourceLabel=new Label(tablescomposite,SWT.LEFT);
  dataSourceLabel.setText(JdbcPlugin.getResourceString("String_Node_Str"));
{
    GridData data=new GridData();
    dataSourceLabel.setLayoutData(data);
  }
  AvailableDbObjects=new Tree(tablescomposite,SWT.BORDER | SWT.MULTI);
{
    GridData data=new GridData(GridData.FILL_BOTH);
    data.grabExcessHorizontalSpace=true;
    data.grabExcessVerticalSpace=true;
    AvailableDbObjects.setLayoutData(data);
  }
  AvailableDbObjects.addMouseListener(new MouseAdapter(){
    public void mouseDoubleClick(    MouseEvent e){
    }
  }
);
  AvailableDbObjects.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      if (event.widget.getClass() != null)       handleAvailabeTreeSelection();
    }
    private void handleAvailabeTreeSelection(){
      TreeItem items[]=AvailableDbObjects.getSelection();
      for (int i=0; i < items.length; i++) {
        if (items[i].getGrayed()) {
          AvailableDbObjects.setRedraw(false);
          AvailableDbObjects.deselectAll();
          AvailableDbObjects.setRedraw(true);
          AvailableDbObjects.redraw();
        }
      }
    }
  }
);
  Group selectTableGroup=new Group(tablescomposite,SWT.FILL);
{
    GridLayout groupLayout=new GridLayout();
    groupLayout.numColumns=3;
    groupLayout.verticalSpacing=10;
    selectTableGroup.setLayout(groupLayout);
    GridData data=new GridData(GridData.FILL_HORIZONTAL);
    selectTableGroup.setLayoutData(data);
  }
  Label FilterLabel=new Label(selectTableGroup,SWT.LEFT);
  FilterLabel.setText(JdbcPlugin.getResourceString("String_Node_Str"));
  searchTxt=new Text(selectTableGroup,SWT.BORDER);
{
    GridData data=new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan=2;
    searchTxt.setLayoutData(data);
  }
  Label selectTypeLabel=new Label(selectTableGroup,SWT.NONE);
  selectTypeLabel.setText(JdbcPlugin.getResourceString("String_Node_Str"));
  filterComboViewer=new ComboViewer(selectTableGroup,SWT.READ_ONLY);
  setFilterComboContents(filterComboViewer);
  filterComboViewer.getControl().setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  Button findButton=new Button(selectTableGroup,SWT.NONE);
  findButton.setText(JdbcPlugin.getResourceString("String_Node_Str"));
  findButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable(){
        public void run(){
          populateAvailableDbObjects();
        }
      }
);
    }
  }
);
  setRootElement();
  addDragSupportToTree();
}