Program: 71864
Project: 71864
Buggy source:
/** 
 * Creates the composite, for displaying the list of available db objects
 * @param parent
 */
private Control createTableSelectionComposite(Composite parent){
  Composite tablescomposite=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  tablescomposite.setLayout(layout);
{
    GridData data=new GridData(GridData.FILL_VERTICAL);
    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);
  }
  availableDbObjectsTree=new Tree(tablescomposite,SWT.BORDER | SWT.MULTI);
{
    GridData data=new GridData(GridData.FILL_BOTH);
    data.grabExcessHorizontalSpace=true;
    data.grabExcessVerticalSpace=true;
    data.heightHint=150;
    availableDbObjectsTree.setLayoutData(data);
  }
  availableDbObjectsTree.addMouseListener(new MouseAdapter(){
    public void mouseDoubleClick(    MouseEvent e){
      populateEventData(e);
      insertText((String)e.data);
    }
  }
);
  availableDbObjectsTree.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      if (event.widget.getClass() != null)       handleAvailabeTreeSelection();
    }
    private void handleAvailabeTreeSelection(){
      TreeItem items[]=availableDbObjectsTree.getSelection();
      for (int i=0; i < items.length; i++) {
        if (items[i].getGrayed()) {
          availableDbObjectsTree.setRedraw(false);
          availableDbObjectsTree.deselectAll();
          availableDbObjectsTree.setRedraw(true);
          availableDbObjectsTree.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);
  }
  schemaLabel=new Label(selectTableGroup,SWT.LEFT);
  schemaLabel.setText(JdbcPlugin.getResourceString("String_Node_Str"));
  schemaCombo=new Combo(selectTableGroup,(JdbcPlugin.getDefault().getPluginPreferences().getString(DateSetPreferencePage.SCHEMAS_PREFETCH_CONFIG).equals(ENABLED)) ? SWT.READ_ONLY : SWT.DROP_DOWN);
  GridData gd=new GridData(GridData.FILL_HORIZONTAL);
  gd.horizontalSpan=2;
  schemaCombo.setLayoutData(gd);
  enableSchemaComponent(isSchemaSupported);
  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();
        }
      }
);
    }
  }
);
  setupIdentifierQuoteStringCheckBox(selectTableGroup);
  setupShowSystemTableCheckBox(selectTableGroup);
  setRootElement();
  addDragSupportToTree();
  return tablescomposite;
}

Fixed version (ground truth):
/** 
 * Creates the composite, for displaying the list of available db objects
 * @param parent
 */
private Control createTableSelectionComposite(Composite parent){
  Composite tablescomposite=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  tablescomposite.setLayout(layout);
{
    GridData data=new GridData(GridData.FILL_VERTICAL);
    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);
  }
  availableDbObjectsTree=new Tree(tablescomposite,SWT.BORDER | SWT.MULTI);
{
    GridData data=new GridData(GridData.FILL_BOTH);
    data.grabExcessHorizontalSpace=true;
    data.grabExcessVerticalSpace=true;
    data.heightHint=150;
    availableDbObjectsTree.setLayoutData(data);
  }
  availableDbObjectsTree.addMouseListener(new MouseAdapter(){
    public void mouseDoubleClick(    MouseEvent e){
      populateEventData(e);
      insertText((String)e.data);
    }
  }
);
  availableDbObjectsTree.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      if (event.widget.getClass() != null)       handleAvailabeTreeSelection();
    }
    private void handleAvailabeTreeSelection(){
      TreeItem items[]=availableDbObjectsTree.getSelection();
      for (int i=0; i < items.length; i++) {
        if (items[i].getGrayed()) {
          availableDbObjectsTree.setRedraw(false);
          availableDbObjectsTree.deselectAll();
          availableDbObjectsTree.setRedraw(true);
          availableDbObjectsTree.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);
  }
  schemaLabel=new Label(selectTableGroup,SWT.LEFT);
  schemaLabel.setText(JdbcPlugin.getResourceString("String_Node_Str"));
  schemaCombo=new Combo(selectTableGroup,(JdbcPlugin.getDefault().getPluginPreferences().getString(DateSetPreferencePage.SCHEMAS_PREFETCH_CONFIG).equals(ENABLED)) ? SWT.READ_ONLY : SWT.DROP_DOWN);
  GridData gd=new GridData(GridData.FILL_HORIZONTAL);
  gd.horizontalSpan=2;
  schemaCombo.setLayoutData(gd);
  enableSchemaComponent(isSchemaSupported);
  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(true);
        }
      }
);
    }
  }
);
  setupIdentifierQuoteStringCheckBox(selectTableGroup);
  setupShowSystemTableCheckBox(selectTableGroup);
  setRootElement();
  addDragSupportToTree();
  return tablescomposite;
}