Buggy code:
public class Tree < D > extends UiComponent < Tree . View < D > > implements IsWidget { @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) public static < NodeData > Tree < NodeData > create ( Tree . Resources resources , NodeDataAdapter < NodeData > dataAdapter , NodeRenderer < NodeData > nodeRenderer ) { } private static boolean thisIsTablet = false ; public interface Css extends CssResource { String active ( ) { } String childrenContainer ( ) { } String closedIcon ( ) { } String expandControl ( ) { } String isDropTarget ( ) { } String leafIcon ( ) { } String openedIcon ( ) { } String selected ( ) { } String selectedInactive ( ) { } String treeNode ( ) { } String treeNodeBody ( ) { } String treeNodeLabel ( ) { } String treeRoot ( ) { } } public interface Listener < D > { void onNodeAction ( TreeNodeElement < D > node ) { } void onNodeClosed ( TreeNodeElement < D > node ) { } void onNodeContextMenu ( int mouseX , int mouseY , TreeNodeElement < D > node ) { } void onNodeDragStart ( TreeNodeElement < D > node , MouseEvent event ) { } void onNodeDragDrop ( TreeNodeElement < D > node , MouseEvent event ) { } void onNodeExpanded ( TreeNodeElement < D > node ) { } void onNodeSelected ( TreeNodeElement < D > node , SignalEvent event ) { } void onRootContextMenu ( int mouseX , int mouseY ) { } void onRootDragDrop ( MouseEvent event ) { } void onKeyboard ( KeyboardEvent event ) { } } public interface Visitor < D > { boolean shouldVisit ( D node ) { } void visit ( D node , boolean willVisitChildren ) { } } public static class Model < D > { private final NodeDataAdapter < D > dataAdapter ; private Tree . Listener < D > externalEventDelegate ; private final NodeRenderer < D > nodeRenderer ; private D root ; private final SelectionModel < D > selectionModel ; private final Tree . Resources resources ; private final AnimationController animator ; public Model ( NodeDataAdapter < D > dataAdapter , NodeRenderer < D > nodeRenderer , Tree . Resources resources ) { } public NodeDataAdapter < D > getDataAdapter ( ) { } public NodeRenderer < D > getNodeRenderer ( ) { } public D getRoot ( ) { } public void setRoot ( D root ) { } } public interface Resources extends ClientBundle { @ MimeType ( "image//svg+xml" ) @ Source ( "expansionIcon.svg" ) DataResource oldExpansionIcon ( ) { } @ Source ( "expansionIcon.svg" ) SVGResource expansionIcon ( ) { } @ Source ( { "com//codenvy//ide//common//constants.css" , "Tree.css" , "com//codenvy//ide//api//ui//style.css" } ) Tree . Css treeCss ( ) { } } public static class View < D > extends CompositeView < Tree . ViewEvents < D > > { private abstract class TreeNodeEventListener implements EventListener { private final boolean primaryMouseButtonOnly ; private double previousClickMs ; private Element previousClickTreeNodeBody ; TreeNodeEventListener ( boolean primaryMouseButtonOnly ) { } @ Override public void handleEvent ( Event evt ) { if ( ( ( Tree . View . TreeNodeEventListener . getDelegate ( ) ) == null ) || ( ( primaryMouseButtonOnly ) && ( ( ( ( MouseEvent ) ( evt ) ) . getButton ( ) ) != ( Button . PRIMARY ) ) ) ) { return ; } Element eventTarget = ( ( Element ) ( evt . getTarget ( ) ) ) ; if ( CssUtils . containsClassName ( eventTarget , css . expandControl ( ) ) ) { onExpansionControlEvent ( evt , eventTarget ) ; } else { Element treeNodeBody = CssUtils . getAncestorOrSelfWithClassName ( eventTarget , css . treeNodeBody ( ) ) ; if ( treeNodeBody != null ) { <START_BUG> if ( CLICK . equals ( evt . getType ( ) ) ) { <END_BUG> double currentClickMs = Duration . currentTimeMillis ( ) ; if ( ( ( currentClickMs - ( previousClickMs ) ) < ( MouseGestureListener . MAX_CLICK_TIMEOUT_MS ) ) && ( treeNodeBody . equals ( previousClickTreeNodeBody ) ) ) { if ( ( ( BrowserUtils . isAndroid ( ) ) || ( BrowserUtils . isIPad ( ) ) ) || ( BrowserUtils . isIphone ( ) ) ) { evt . stopPropagation ( ) ; evt . preventDefault ( ) ; doActionsForDoubleClick ( treeNodeBody , evt ) ; } return ; } else { this . previousClickMs = currentClickMs ; this . previousClickTreeNodeBody = treeNodeBody ; } } onTreeNodeBodyChildEvent ( evt , treeNodeBody ) ; } else { onOtherEvent ( evt ) ; } } } private void doActionsForDoubleClick ( Element treeNodeBody , Object evt ) { } protected void onOtherEvent ( Event evt ) { } protected void onTreeNodeBodyChildEvent ( Event evt , Element treeNodeBody ) { } protected void onExpansionControlEvent ( Event evt , Element expansionControl ) { } } private final Tree . Css css ; @ SuppressWarnings ( "unused" ) private final Tree . Resources resources ; public View ( Tree . Resources resources ) { } void attachEventListeners ( ) { } private void dispatchContextMenuEvent ( int mouseX , int mouseY , Element treeNodeBody , Tree . Css css ) { } private void dispatchExpansionEvent ( TreeNodeElement < D > treeNode , Tree . Css css ) { } private void dispatchNodeActionEvent ( Element treeNodeBody , Tree . Css css ) { } private void dispatchNodeSelectedEvent ( Element treeNodeBody , SignalEvent evt , Tree . Css css ) { } private void dispatchOnRootContextMenuEvent ( int mouseX , int mouseY ) { } private TreeNodeElement < D > getTreeNodeFromTreeNodeBody ( Element treeNodeBody , Tree . Css css ) { } } private interface ViewEvents < D > { void onNodeAction ( TreeNodeElement < D > node ) { } void onNodeClosed ( TreeNodeElement < D > node ) { }

Fix:
if ( MOUSEDOWN . equals ( evt . getType ( ) ) ) {