Program: 54664
Project: 54664
Buggy source:
private void init(TreeImages images,boolean useLeafImages){
  setImages(images,useLeafImages);
  setElement(DOM.createDiv());
  DOM.setStyleAttribute(getElement(),"String_Node_Str","String_Node_Str");
  DOM.setStyleAttribute(getElement(),"String_Node_Str","String_Node_Str");
  focusable=FocusPanel.impl.createFocusable();
  DOM.setStyleAttribute(focusable,"String_Node_Str","String_Node_Str");
  DOM.setStyleAttribute(focusable,"String_Node_Str","String_Node_Str");
  DOM.setStyleAttribute(focusable,"String_Node_Str","String_Node_Str");
  DOM.setElementAttribute(focusable,"String_Node_Str","String_Node_Str");
  DOM.setIntStyleAttribute(focusable,"String_Node_Str",-1);
  DOM.appendChild(getElement(),focusable);
  sinkEvents(Event.MOUSEEVENTS | Event.ONCLICK | Event.KEYEVENTS);
  DOM.sinkEvents(focusable,Event.FOCUSEVENTS);
  root=new TreeItem(){
    @Override public void addItem(    TreeItem item){
      if ((item.getParentItem() != null) || (item.getTree() != null)) {
        item.remove();
      }
      DOM.appendChild(Tree.this.getElement(),item.getElement());
      item.setTree(this.getTree());
      item.setParentItem(null);
      getChildren().add(item);
      if (LocaleInfo.getCurrentLocale().isRTL()) {
        DOM.setIntStyleAttribute(item.getElement(),"String_Node_Str",0);
      }
 else {
        DOM.setIntStyleAttribute(item.getElement(),"String_Node_Str",0);
      }
    }
    @Override public void removeItem(    TreeItem item){
      if (!getChildren().contains(item)) {
        return;
      }
      item.setTree(null);
      item.setParentItem(null);
      getChildren().remove(item);
      DOM.removeChild(Tree.this.getElement(),item.getElement());
    }
  }
;
  root.initChildren();
  root.setTree(this);
  setStyleName("String_Node_Str");
  Accessibility.setRole(getElement(),Accessibility.ROLE_TREE);
  Accessibility.setRole(focusable,Accessibility.ROLE_TREEITEM);
}

Fixed version (ground truth):
private void init(TreeImages images,boolean useLeafImages){
  setImages(images,useLeafImages);
  setElement(DOM.createDiv());
  DOM.setStyleAttribute(getElement(),"String_Node_Str","String_Node_Str");
  DOM.setStyleAttribute(getElement(),"String_Node_Str","String_Node_Str");
  focusable=FocusPanel.impl.createFocusable();
  DOM.setStyleAttribute(focusable,"String_Node_Str","String_Node_Str");
  DOM.setStyleAttribute(focusable,"String_Node_Str","String_Node_Str");
  DOM.setStyleAttribute(focusable,"String_Node_Str","String_Node_Str");
  DOM.setElementAttribute(focusable,"String_Node_Str","String_Node_Str");
  DOM.setIntStyleAttribute(focusable,"String_Node_Str",-1);
  DOM.appendChild(getElement(),focusable);
  sinkEvents(Event.ONMOUSEDOWN | Event.ONCLICK | Event.KEYEVENTS);
  DOM.sinkEvents(focusable,Event.FOCUSEVENTS);
  root=new TreeItem(){
    @Override public void addItem(    TreeItem item){
      if ((item.getParentItem() != null) || (item.getTree() != null)) {
        item.remove();
      }
      DOM.appendChild(Tree.this.getElement(),item.getElement());
      item.setTree(this.getTree());
      item.setParentItem(null);
      getChildren().add(item);
      if (LocaleInfo.getCurrentLocale().isRTL()) {
        DOM.setIntStyleAttribute(item.getElement(),"String_Node_Str",0);
      }
 else {
        DOM.setIntStyleAttribute(item.getElement(),"String_Node_Str",0);
      }
    }
    @Override public void removeItem(    TreeItem item){
      if (!getChildren().contains(item)) {
        return;
      }
      item.setTree(null);
      item.setParentItem(null);
      getChildren().remove(item);
      DOM.removeChild(Tree.this.getElement(),item.getElement());
    }
  }
;
  root.initChildren();
  root.setTree(this);
  setStyleName("String_Node_Str");
  Accessibility.setRole(getElement(),Accessibility.ROLE_TREE);
  Accessibility.setRole(focusable,Accessibility.ROLE_TREEITEM);
}