Program: 57717
Project: 57717
Buggy source:
protected void registerPickingListeners(){
  addTypePickingListener(new APickingListener(){
    @Override public void mouseOver(    Pick pick){
      if (detailLevel == EDetailLevel.VERY_LOW) {
        return;
      }
      handlePathwayElementSelection(SelectionType.MOUSE_OVER,pick.getObjectID());
    }
    @Override public void clicked(    Pick pick){
      if (detailLevel == EDetailLevel.VERY_LOW) {
        return;
      }
      if (glRemoteRenderingView != null && glRemoteRenderingView.getViewType().equals("String_Node_Str"))       return;
      handlePathwayElementSelection(SelectionType.SELECTION,pick.getObjectID());
    }
    @Override public void doubleClicked(    Pick pick){
      if (detailLevel == EDetailLevel.VERY_LOW) {
        return;
      }
      PathwayVertexRep vertexRep=(PathwayVertexRep)pathwayItemManager.getPathwayVertexRep(pick.getObjectID());
      if (vertexRep.getType() == EPathwayVertexType.map) {
        PathwayGraph pathway=PathwayManager.get().searchPathwayByName(vertexRep.getName(),PathwayDatabaseType.KEGG);
        if (pathway != null) {
          LoadPathwayEvent event=new LoadPathwayEvent();
          event.setSender(this);
          event.setPathwayID(pathway.getID());
          event.setDataDomainID(dataDomain.getDataDomainID());
          GeneralManager.get().getEventPublisher().triggerEvent(event);
        }
      }
 else {
      }
      handlePathwayElementSelection(SelectionType.SELECTION,pick.getObjectID());
    }
    @Override public void rightClicked(    Pick pick){
      if (detailLevel == EDetailLevel.VERY_LOW) {
        return;
      }
      PathwayVertexRep vertexRep=(PathwayVertexRep)pathwayItemManager.getPathwayVertexRep(pick.getObjectID());
      if (vertexRep.getType() == EPathwayVertexType.map) {
        LoadPathwaysByPathwayItem menuItem=new LoadPathwaysByPathwayItem(PathwayManager.get().searchPathwayByName(vertexRep.getName(),PathwayDatabaseType.KEGG),dataDomain.getDataDomainID());
        contextMenuCreator.addContextMenuItem(menuItem);
      }
 else       if (vertexRep.getType() == EPathwayVertexType.gene) {
        for (        PathwayVertex pathwayVertex : vertexRep.getPathwayVertices()) {
          GeneMenuItemContainer contexMenuItemContainer=new GeneMenuItemContainer();
          contexMenuItemContainer.setDataDomain((ATableBasedDataDomain)dataDomain);
          contexMenuItemContainer.setData(pathwayDataDomain.getDavidIDType(),pathwayItemManager.getDavidIdByPathwayVertex((PathwayVertex)pathwayVertex));
          contextMenuCreator.addContextMenuItemContainer(contexMenuItemContainer);
        }
      }
      handlePathwayElementSelection(SelectionType.SELECTION,pick.getObjectID());
    }
  }
,PickingType.PATHWAY_ELEMENT_SELECTION.name());
  addTypePickingListener(new APickingListener(){
    @Override public void clicked(    Pick pick){
      if (allPaths == null || allPaths.size() <= pick.getObjectID())       return;
      selectedPath=allPaths.get(selectedPathID);
      setDisplayListDirty();
      triggerPathUpdate();
    }
  }
,PickingType.PATHWAY_PATH_SELECTION.name());
}

Fixed version (ground truth):
protected void registerPickingListeners(){
  addTypePickingListener(new APickingListener(){
    @Override public void mouseOver(    Pick pick){
      if (detailLevel == EDetailLevel.VERY_LOW) {
        return;
      }
      handlePathwayElementSelection(SelectionType.MOUSE_OVER,pick.getObjectID());
    }
    @Override public void clicked(    Pick pick){
      if (detailLevel == EDetailLevel.VERY_LOW) {
        return;
      }
      if (glRemoteRenderingView != null && glRemoteRenderingView.getViewType().equals("String_Node_Str"))       return;
      handlePathwayElementSelection(SelectionType.SELECTION,pick.getObjectID());
    }
    @Override public void doubleClicked(    Pick pick){
      if (detailLevel == EDetailLevel.VERY_LOW) {
        return;
      }
      PathwayVertexRep vertexRep=(PathwayVertexRep)pathwayItemManager.getPathwayVertexRep(pick.getObjectID());
      if (vertexRep.getType() == EPathwayVertexType.map) {
        PathwayGraph pathway=PathwayManager.get().searchPathwayByName(vertexRep.getName(),PathwayDatabaseType.KEGG);
        if (pathway != null) {
          LoadPathwayEvent event=new LoadPathwayEvent();
          event.setSender(this);
          event.setPathwayID(pathway.getID());
          event.setDataDomainID(dataDomain.getDataDomainID());
          GeneralManager.get().getEventPublisher().triggerEvent(event);
        }
      }
 else {
      }
      handlePathwayElementSelection(SelectionType.SELECTION,pick.getObjectID());
    }
    @Override public void rightClicked(    Pick pick){
      if (detailLevel == EDetailLevel.VERY_LOW) {
        return;
      }
      PathwayVertexRep vertexRep=(PathwayVertexRep)pathwayItemManager.getPathwayVertexRep(pick.getObjectID());
      if (vertexRep.getType() == EPathwayVertexType.map) {
        LoadPathwaysByPathwayItem menuItem=new LoadPathwaysByPathwayItem(PathwayManager.get().searchPathwayByName(vertexRep.getName(),PathwayDatabaseType.KEGG),dataDomain.getDataDomainID());
        contextMenuCreator.addContextMenuItem(menuItem);
      }
 else       if (vertexRep.getType() == EPathwayVertexType.gene) {
        for (        PathwayVertex pathwayVertex : vertexRep.getPathwayVertices()) {
          GeneMenuItemContainer contexMenuItemContainer=new GeneMenuItemContainer();
          contexMenuItemContainer.setDataDomain((ATableBasedDataDomain)dataDomain);
          contexMenuItemContainer.setData(pathwayDataDomain.getDavidIDType(),pathwayItemManager.getDavidIdByPathwayVertex((PathwayVertex)pathwayVertex));
          contextMenuCreator.addContextMenuItemContainer(contexMenuItemContainer);
        }
      }
      handlePathwayElementSelection(SelectionType.SELECTION,pick.getObjectID());
    }
  }
,PickingType.PATHWAY_ELEMENT_SELECTION.name());
  addTypePickingListener(new APickingListener(){
    @Override public void clicked(    Pick pick){
      if (allPaths == null || allPaths.size() <= pick.getObjectID())       return;
      if (allPaths.size() <= selectedPathID)       selectedPathID=0;
      selectedPath=allPaths.get(selectedPathID);
      setDisplayListDirty();
      triggerPathUpdate();
    }
  }
,PickingType.PATHWAY_PATH_SELECTION.name());
}