Program: 53617
Project: 53617
Buggy source:
@Override public void onBrowserEvent(Event event){
  CellBasedWidgetImpl.get().onBrowserEvent(this,event);
  if (isRefreshing) {
    return;
  }
  super.onBrowserEvent(event);
  String eventType=event.getType();
  if (BrowserEvents.FOCUS.equals(eventType)) {
    isFocused=true;
    onFocus();
  }
 else   if (BrowserEvents.BLUR.equals(eventType)) {
    isFocused=false;
    onBlur();
  }
 else   if (BrowserEvents.KEYDOWN.equals(eventType) && !cellIsEditing) {
    int keyCode=event.getKeyCode();
switch (keyCode) {
case KeyCodes.KEY_DOWN:
case KeyCodes.KEY_UP:
case KeyCodes.KEY_RIGHT:
case KeyCodes.KEY_LEFT:
      handleKeyNavigation(keyCode);
    event.preventDefault();
  return;
case 32:
event.preventDefault();
}
}
final Element target=event.getEventTarget().cast();
ArrayList<Element> chain=new ArrayList<Element>();
collectElementChain(chain,getElement(),target);
final boolean isMouseDown=BrowserEvents.MOUSEDOWN.equals(eventType);
final boolean isClick=BrowserEvents.CLICK.equals(eventType);
final CellTreeNodeView<?> nodeView=findItemByChain(chain,0,rootNode);
if (nodeView != null) {
if (isMouseDown) {
Element showMoreElem=nodeView.getShowMoreElement();
if (nodeView.getImageElement().isOrHasChild(target)) {
nodeView.setOpen(!nodeView.isOpen(),true);
return;
}
 else if (showMoreElem != null && showMoreElem.isOrHasChild(target)) {
nodeView.showMore();
return;
}
}
if (nodeView != rootNode && nodeView.getSelectionElement().isOrHasChild(target)) {
if (isClick) {
boolean isFocusable=CellBasedWidgetImpl.get().isFocusable(target);
isFocused=isFocused || isFocusable;
keyboardSelect(nodeView,!isFocusable);
}
nodeView.fireEventToCell(event);
}
}
}

Fixed version (ground truth):
@Override public void onBrowserEvent(Event event){
  CellBasedWidgetImpl.get().onBrowserEvent(this,event);
  if (isRefreshing) {
    return;
  }
  super.onBrowserEvent(event);
  String eventType=event.getType();
  if (BrowserEvents.FOCUS.equals(eventType)) {
    isFocused=true;
    onFocus();
  }
 else   if (BrowserEvents.BLUR.equals(eventType)) {
    isFocused=false;
    onBlur();
  }
 else   if (BrowserEvents.KEYDOWN.equals(eventType) && !cellIsEditing) {
    int keyCode=event.getKeyCode();
switch (keyCode) {
case KeyCodes.KEY_DOWN:
case KeyCodes.KEY_UP:
case KeyCodes.KEY_RIGHT:
case KeyCodes.KEY_LEFT:
      handleKeyNavigation(keyCode);
    event.preventDefault();
  return;
case 32:
event.preventDefault();
}
}
final Element target=event.getEventTarget().cast();
ArrayList<Element> chain=new ArrayList<Element>();
collectElementChain(chain,getElement(),target);
final boolean isMouseDown=BrowserEvents.MOUSEDOWN.equals(eventType);
final boolean isClick=BrowserEvents.CLICK.equals(eventType);
final CellTreeNodeView<?> nodeView=findItemByChain(chain,0,rootNode);
if (nodeView != null) {
if (isMouseDown) {
Element showMoreElem=nodeView.getShowMoreElement();
if (!nodeView.isRootNode() && nodeView.getImageElement().isOrHasChild(target)) {
nodeView.setOpen(!nodeView.isOpen(),true);
return;
}
 else if (showMoreElem != null && showMoreElem.isOrHasChild(target)) {
nodeView.showMore();
return;
}
}
if (nodeView != rootNode && nodeView.getSelectionElement().isOrHasChild(target)) {
if (isClick) {
boolean isFocusable=CellBasedWidgetImpl.get().isFocusable(target);
isFocused=isFocused || isFocusable;
keyboardSelect(nodeView,!isFocusable);
}
nodeView.fireEventToCell(event);
}
}
}