Program: 96421
Project: 96421
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  patternFilter=new PatternFilter();
  try {
    Constructor<FilteredTree> constructor=FilteredTree.class.getConstructor(Composite.class,int.class,PatternFilter.class,boolean.class);
    filteredTree=constructor.newInstance(parent,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER,patternFilter,true);
  }
 catch (  SecurityException e1) {
    throw new IllegalStateException(e1);
  }
catch (  NoSuchMethodException e1) {
    filteredTree=new FilteredTree(parent,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER,patternFilter);
  }
catch (  Exception e) {
    throw new IllegalStateException(e);
  }
  int heightHint=(filteredTree.getViewer().getTree().getItemHeight() * 12) + Math.max(filteredTree.getFilterControl().getSize().y,12);
  GridDataFactory.fillDefaults().grab(true,true).hint(SWT.DEFAULT,heightHint).applyTo(filteredTree);
  filteredTree.getViewer().setUseHashlookup(true);
  filteredTree.getViewer().setContentProvider(new BaseWorkbenchContentProvider());
  filteredTree.getViewer().setLabelProvider(WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider());
  filteredTree.getViewer().setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
  filteredTree.getViewer().getTree().addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
      handleSelection();
    }
    public void widgetSelected(    SelectionEvent e){
    }
  }
);
  filteredTree.getViewer().getTree().addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
      if (e.character == 0x1B) {
        dispose();
      }
    }
    public void keyReleased(    KeyEvent e){
    }
  }
);
  filteredTree.getViewer().getTree().addMouseListener(new MouseAdapter(){
    @Override public void mouseUp(    MouseEvent e){
      Tree tree=filteredTree.getViewer().getTree();
      if ((tree.getSelectionCount() < 1) || (e.button != 1)) {
        return;
      }
      Object object=tree.getItem(new Point(e.x,e.y));
      TreeItem selection=tree.getSelection()[0];
      if (selection.equals(object)) {
        handleSelection();
      }
    }
  }
);
  return filteredTree;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected Control createDialogArea(Composite parent){
  patternFilter=new PatternFilter();
  try {
    Constructor<FilteredTree> constructor=FilteredTree.class.getConstructor(Composite.class,int.class,PatternFilter.class,boolean.class);
    filteredTree=constructor.newInstance(parent,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER,patternFilter,true);
  }
 catch (  SecurityException e1) {
    throw new IllegalStateException(e1);
  }
catch (  NoSuchMethodException e1) {
    filteredTree=new FilteredTree(parent,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER,patternFilter);
  }
catch (  Exception e) {
    throw new IllegalStateException(e);
  }
  int heightHint=(filteredTree.getViewer().getTree().getItemHeight() * 12) + Math.max(filteredTree.getFilterControl().getSize().y,12);
  GridDataFactory.fillDefaults().grab(true,true).hint(SWT.DEFAULT,heightHint).applyTo(filteredTree);
  filteredTree.getViewer().setUseHashlookup(true);
  filteredTree.getViewer().setContentProvider(new BaseWorkbenchContentProvider());
  filteredTree.getViewer().setLabelProvider(WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider());
  filteredTree.getViewer().setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
  filteredTree.getViewer().getTree().addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
      handleSelection();
    }
    public void widgetSelected(    SelectionEvent e){
    }
  }
);
  filteredTree.getViewer().getTree().addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
      if (e.character == 0x1B) {
        dispose();
      }
    }
    public void keyReleased(    KeyEvent e){
    }
  }
);
  filteredTree.getViewer().getTree().addMouseListener(new MouseAdapter(){
    @Override public void mouseUp(    MouseEvent e){
      Tree tree=filteredTree.getViewer().getTree();
      if ((tree.getSelectionCount() < 1) || (e.button != 1)) {
        return;
      }
      Object object=tree.getItem(new Point(e.x,e.y));
      TreeItem selection=tree.getSelection()[0];
      if (selection.equals(object)) {
        handleSelection();
      }
    }
  }
);
  return filteredTree;
}