Program: 58797
Project: 58797
Buggy source:
@Override protected void handleEvents(EPickingType ePickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
  if (detailLevel == EDetailLevel.VERY_LOW) {
    return;
  }
  ESelectionType eSelectionType;
switch (ePickingType) {
case HEAT_MAP_LINE_SELECTION:
    iCurrentMouseOverElement=iExternalID;
switch (pickingMode) {
case DOUBLE_CLICKED:
    LoadPathwaysByGeneEvent loadPathwaysByGeneEvent=new LoadPathwaysByGeneEvent();
  loadPathwaysByGeneEvent.setSender(this);
loadPathwaysByGeneEvent.setGeneID(iExternalID);
loadPathwaysByGeneEvent.setIdType(EIDType.EXPRESSION_INDEX);
eventPublisher.triggerEvent(loadPathwaysByGeneEvent);
case CLICKED:
eSelectionType=ESelectionType.SELECTION;
break;
case MOUSE_OVER:
eSelectionType=ESelectionType.MOUSE_OVER;
break;
case RIGHT_CLICKED:
eSelectionType=ESelectionType.SELECTION;
if (!isRenderedRemote()) {
contextMenu.setLocation(pick.getPickedPoint(),getParentGLCanvas().getWidth(),getParentGLCanvas().getHeight());
contextMenu.setMasterGLView(this);
}
GeneContextMenuItemContainer geneContextMenuItemContainer=new GeneContextMenuItemContainer();
geneContextMenuItemContainer.setStorageIndex(iExternalID);
contextMenu.addItemContanier(geneContextMenuItemContainer);
default :
return;
}
createContentSelection(eSelectionType,iExternalID);
break;
case HEAT_MAP_STORAGE_SELECTION:
switch (pickingMode) {
case CLICKED:
eSelectionType=ESelectionType.SELECTION;
break;
case MOUSE_OVER:
eSelectionType=ESelectionType.MOUSE_OVER;
if (storageSelectionManager.checkStatus(ESelectionType.SELECTION,iExternalID)) {
storageSelectionManager.clearSelection(eSelectionType);
setDisplayListDirty();
return;
}
createStorageSelection(eSelectionType,iExternalID);
break;
default :
return;
}
break;
case LIST_HEAT_MAP_CLEAR_ALL:
switch (pickingMode) {
case CLICKED:
contentSelectionManager.resetSelectionManager();
setDisplayListDirty();
SelectionCommand command=new SelectionCommand(ESelectionCommandType.RESET);
ArrayList<SelectionCommand> commands=new ArrayList<SelectionCommand>();
commands.add(command);
TriggerPropagationCommandEvent event=new TriggerPropagationCommandEvent();
event.setType(EIDType.EXPRESSION_INDEX);
event.setSelectionCommands(commands);
event.setSender(this);
eventPublisher.triggerEvent(event);
break;
}
break;
}
}

Fixed version (ground truth):
@Override protected void handleEvents(EPickingType ePickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
  if (detailLevel == EDetailLevel.VERY_LOW) {
    return;
  }
  ESelectionType eSelectionType;
switch (ePickingType) {
case HEAT_MAP_LINE_SELECTION:
    iCurrentMouseOverElement=iExternalID;
switch (pickingMode) {
case DOUBLE_CLICKED:
    LoadPathwaysByGeneEvent loadPathwaysByGeneEvent=new LoadPathwaysByGeneEvent();
  loadPathwaysByGeneEvent.setSender(this);
loadPathwaysByGeneEvent.setGeneID(iExternalID);
loadPathwaysByGeneEvent.setIdType(EIDType.EXPRESSION_INDEX);
eventPublisher.triggerEvent(loadPathwaysByGeneEvent);
case CLICKED:
eSelectionType=ESelectionType.SELECTION;
break;
case MOUSE_OVER:
eSelectionType=ESelectionType.MOUSE_OVER;
break;
case RIGHT_CLICKED:
eSelectionType=ESelectionType.SELECTION;
if (!isRenderedRemote()) {
contextMenu.setLocation(pick.getPickedPoint(),getParentGLCanvas().getWidth(),getParentGLCanvas().getHeight());
contextMenu.setMasterGLView(this);
}
GeneContextMenuItemContainer geneContextMenuItemContainer=new GeneContextMenuItemContainer();
geneContextMenuItemContainer.setStorageIndex(iExternalID);
contextMenu.addItemContanier(geneContextMenuItemContainer);
default :
return;
}
createContentSelection(eSelectionType,iExternalID);
break;
case HEAT_MAP_STORAGE_SELECTION:
switch (pickingMode) {
case CLICKED:
eSelectionType=ESelectionType.SELECTION;
break;
case MOUSE_OVER:
eSelectionType=ESelectionType.MOUSE_OVER;
if (storageSelectionManager.checkStatus(ESelectionType.SELECTION,iExternalID)) {
storageSelectionManager.clearSelection(eSelectionType);
setDisplayListDirty();
return;
}
break;
default :
return;
}
createStorageSelection(eSelectionType,iExternalID);
break;
case LIST_HEAT_MAP_CLEAR_ALL:
switch (pickingMode) {
case CLICKED:
contentSelectionManager.resetSelectionManager();
setDisplayListDirty();
SelectionCommand command=new SelectionCommand(ESelectionCommandType.RESET);
ArrayList<SelectionCommand> commands=new ArrayList<SelectionCommand>();
commands.add(command);
TriggerPropagationCommandEvent event=new TriggerPropagationCommandEvent();
event.setType(EIDType.EXPRESSION_INDEX);
event.setSelectionCommands(commands);
event.setSender(this);
eventPublisher.triggerEvent(event);
break;
}
break;
}
}