Program: 127519
Project: 127519
Buggy source:
private void addXmlFileViewer(final Composite mainComposite,final int width,final int height){
  final Group group=Form.createGroup(mainComposite,1,Messages.getString("String_Node_Str"),height);
  GridData data=new GridData(GridData.FILL_BOTH);
  Composite composite=new Composite(group,SWT.NONE);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(data);
  xmlViewer=new TreeViewer(composite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER| SWT.FULL_SELECTION| SWT.MULTI);
  xmlViewer.getControl().setLayoutData(data);
  xmlViewer.setUseHashlookup(true);
  Tree tree=xmlViewer.getTree();
  if (isReadOnly()) {
    tree.setEnabled(false);
  }
  tree.setLinesVisible(true);
  tree.setBackground(tree.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  TreeColumn column1=new TreeColumn(tree,SWT.LEFT);
  column1.setText(Messages.getString("String_Node_Str"));
  column1.setWidth(120);
  TreeColumn column2=new TreeColumn(tree,SWT.CENTER);
  column2.setText(Messages.getString("String_Node_Str"));
  column2.setWidth(100);
  TreeColumn column3=new TreeColumn(tree,SWT.CENTER);
  column3.setText(Messages.getString("String_Node_Str"));
  column3.setWidth(100);
  TreeColumn column4=new TreeColumn(tree,SWT.CENTER);
  column4.setText(Messages.getString("String_Node_Str"));
  column4.setWidth(100);
  tree.setHeaderVisible(true);
  XmlFileTreeViewerProvider provider=new XmlFileTreeViewerProvider();
  xmlViewer.setLabelProvider(provider);
  xmlViewer.setColumnProperties(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  xmlViewer.setContentProvider(provider);
  xmlViewer.expandAll();
  createAction();
  MenuManager menuMgr=new MenuManager("String_Node_Str");
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    public void menuAboutToShow(    IMenuManager manager){
      fillContextMenu(manager);
    }
  }
);
  Menu menu=menuMgr.createContextMenu(xmlViewer.getControl());
  xmlViewer.getControl().setMenu(menu);
  xmlViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
    }
  }
);
  initToolBar(composite);
}

Fixed version (ground truth):
private void addXmlFileViewer(final Composite mainComposite,final int width,final int height){
  final Group group=Form.createGroup(mainComposite,1,Messages.getString("String_Node_Str"),height);
  GridData data=new GridData(GridData.FILL_BOTH);
  Composite composite=new Composite(group,SWT.NONE);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(data);
  xmlViewer=new TreeViewer(composite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER| SWT.FULL_SELECTION| SWT.MULTI);
  xmlViewer.getControl().setLayoutData(data);
  xmlViewer.setUseHashlookup(true);
  Tree tree=xmlViewer.getTree();
  if (isReadOnly()) {
    tree.setEnabled(false);
  }
  tree.setLinesVisible(true);
  tree.setBackground(tree.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  TreeColumn column1=new TreeColumn(tree,SWT.LEFT);
  column1.setText(Messages.getString("String_Node_Str"));
  column1.setWidth(120);
  TreeColumn column2=new TreeColumn(tree,SWT.CENTER);
  column2.setText(Messages.getString("String_Node_Str"));
  column2.setWidth(100);
  TreeColumn column3=new TreeColumn(tree,SWT.CENTER);
  column3.setText(Messages.getString("String_Node_Str"));
  column3.setWidth(100);
  TreeColumn column4=new TreeColumn(tree,SWT.CENTER);
  column4.setText(Messages.getString("String_Node_Str"));
  column4.setWidth(100);
  tree.setHeaderVisible(true);
  XmlFileTreeViewerProvider provider=new XmlFileTreeViewerProvider();
  xmlViewer.setLabelProvider(provider);
  xmlViewer.setColumnProperties(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  xmlViewer.setContentProvider(provider);
  xmlViewer.expandAll();
  createAction();
  MenuManager menuMgr=new MenuManager("String_Node_Str");
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    @Override public void menuAboutToShow(    IMenuManager manager){
      fillContextMenu(manager);
    }
  }
);
  Menu menu=menuMgr.createContextMenu(xmlViewer.getControl());
  xmlViewer.getControl().setMenu(menu);
  xmlViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    @Override public void selectionChanged(    SelectionChangedEvent event){
    }
  }
);
  initToolBar(composite);
}