Program: 128986
Project: 128986
Buggy source:
private void addXmlFileViewer(final Composite mainComposite,final int width,final int height){
  final Group group=Form.createGroup(mainComposite,1,"String_Node_Str",height);
  GridData data=new GridData(GridData.FILL_BOTH);
  Composite composite=new Composite(group,SWT.BORDER);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(data);
  rootComboViewer=new ComboViewer(composite,SWT.READ_ONLY);
  FoxNodeComboViewProvider comboProvider=new FoxNodeComboViewProvider();
  rootComboViewer.setLabelProvider(comboProvider);
  rootComboViewer.setContentProvider(comboProvider);
  rootCombo=rootComboViewer.getCombo();
  GridData comboData=new GridData(SWT.FILL,SWT.CENTER,true,false);
  rootCombo.setLayoutData(comboData);
  xmlViewer=new TreeViewer(composite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER| SWT.FULL_SELECTION| SWT.MULTI);
  data=new GridData(GridData.FILL_BOTH);
  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("String_Node_Str");
  column1.setWidth(120);
  TreeColumn column2=new TreeColumn(tree,SWT.CENTER);
  column2.setText("String_Node_Str");
  column2.setWidth(100);
  TreeColumn column3=new TreeColumn(tree,SWT.CENTER);
  column3.setText("String_Node_Str");
  column3.setWidth(100);
  TreeColumn column4=new TreeColumn(tree,SWT.CENTER);
  column4.setText("String_Node_Str");
  column4.setWidth(100);
  tree.setHeaderVisible(true);
  XmlFileTreeViewerProvider provider=new XmlFileTreeViewerProvider();
  xmlViewer.setLabelProvider(provider);
  xmlViewer.setCellModifier(new ICellModifier(){
    public void modify(    Object element,    String property,    Object value){
      TreeItem treeItem=(TreeItem)element;
      FOXTreeNode node=(FOXTreeNode)treeItem.getData();
      if (property.equals("String_Node_Str")) {
        node.setLabel((String)value);
      }
      if (property.equals("String_Node_Str")) {
        node.setDefaultValue((String)value);
      }
      xmlViewer.refresh(node);
    }
    public Object getValue(    Object element,    String property){
      FOXTreeNode node=(FOXTreeNode)element;
      if (property.equals("String_Node_Str")) {
        return node.getLabel();
      }
      if (property.equals("String_Node_Str")) {
        return node.getDefaultValue();
      }
      return null;
    }
    public boolean canModify(    Object element,    String property){
      FOXTreeNode node=(FOXTreeNode)element;
      if (property.equals("String_Node_Str")) {
        if (node.getLabel() != null && node.getLabel().length() > 0) {
          return true;
        }
      }
      if (property.equals("String_Node_Str")) {
        if (node.getDefaultValue() != null && node.getDefaultValue().length() > 0) {
          return true;
        }
      }
      return false;
    }
  }
);
  xmlViewer.setColumnProperties(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  CellEditor editor=new TextCellEditor(xmlViewer.getTree());
  editor.addListener(new DialogErrorXMLLabelCellEditor(editor,"String_Node_Str"));
  CellEditor editorDefault=new TextCellEditor(xmlViewer.getTree());
  editorDefault.addListener(new DialogErrorXMLLabelCellEditor(editorDefault,"String_Node_Str"));
  xmlViewer.setCellEditors(new CellEditor[]{editor,null,null,editorDefault});
  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,"String_Node_Str",height);
  GridData data=new GridData(GridData.FILL_BOTH);
  Composite composite=new Composite(group,SWT.BORDER);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(data);
  rootComboViewer=new ComboViewer(composite,SWT.READ_ONLY);
  FoxNodeComboViewProvider comboProvider=new FoxNodeComboViewProvider();
  rootComboViewer.setLabelProvider(comboProvider);
  rootComboViewer.setContentProvider(comboProvider);
  rootCombo=rootComboViewer.getCombo();
  GridData comboData=new GridData(SWT.FILL,SWT.CENTER,true,false);
  rootCombo.setLayoutData(comboData);
  xmlViewer=new TreeViewer(composite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER| SWT.FULL_SELECTION| SWT.MULTI);
  data=new GridData(GridData.FILL_BOTH);
  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("String_Node_Str");
  column1.setWidth(120);
  TreeColumn column2=new TreeColumn(tree,SWT.CENTER);
  column2.setText("String_Node_Str");
  column2.setWidth(100);
  TreeColumn column3=new TreeColumn(tree,SWT.CENTER);
  column3.setText("String_Node_Str");
  column3.setWidth(100);
  TreeColumn column4=new TreeColumn(tree,SWT.CENTER);
  column4.setText("String_Node_Str");
  column4.setWidth(100);
  tree.setHeaderVisible(true);
  XmlFileTreeViewerProvider provider=new XmlFileTreeViewerProvider();
  xmlViewer.setLabelProvider(provider);
  xmlViewer.setCellModifier(new ICellModifier(){
    @Override public void modify(    Object element,    String property,    Object value){
      TreeItem treeItem=(TreeItem)element;
      FOXTreeNode node=(FOXTreeNode)treeItem.getData();
      if (property.equals("String_Node_Str")) {
        node.setLabel((String)value);
      }
      if (property.equals("String_Node_Str")) {
        node.setDefaultValue((String)value);
      }
      xmlViewer.refresh(node);
    }
    @Override public Object getValue(    Object element,    String property){
      FOXTreeNode node=(FOXTreeNode)element;
      if (property.equals("String_Node_Str")) {
        return node.getLabel();
      }
      if (property.equals("String_Node_Str")) {
        return node.getDefaultValue();
      }
      return null;
    }
    @Override public boolean canModify(    Object element,    String property){
      FOXTreeNode node=(FOXTreeNode)element;
      if (property.equals("String_Node_Str")) {
        if (node.getLabel() != null && node.getLabel().length() > 0) {
          return true;
        }
      }
      if (property.equals("String_Node_Str")) {
        if (node.getDefaultValue() != null && node.getDefaultValue().length() > 0) {
          return true;
        }
      }
      return false;
    }
  }
);
  xmlViewer.setColumnProperties(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  CellEditor editor=new TextCellEditor(xmlViewer.getTree());
  editor.addListener(new DialogErrorXMLLabelCellEditor(editor,"String_Node_Str"));
  CellEditor editorDefault=new TextCellEditor(xmlViewer.getTree());
  editorDefault.addListener(new DialogErrorXMLLabelCellEditor(editorDefault,"String_Node_Str"));
  xmlViewer.setCellEditors(new CellEditor[]{editor,null,null,editorDefault});
  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);
}