Program: 58855
Project: 58855
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.setGeneID(iExternalID);
loadPathwaysByGeneEvent.setIdType(EIDType.EXPRESSION_INDEX);
generalManager.getEventPublisher().triggerEvent(loadPathwaysByGeneEvent);
case CLICKED:
eSelectionType=ESelectionType.SELECTION;
break;
case MOUSE_OVER:
eSelectionType=ESelectionType.MOUSE_OVER;
if (contentSelectionManager.checkStatus(ESelectionType.SELECTION,iExternalID)) {
contentSelectionManager.clearSelection(eSelectionType);
SelectionCommand command=new SelectionCommand(ESelectionCommandType.CLEAR,eSelectionType);
sendSelectionCommandEvent(EIDType.EXPRESSION_INDEX,command);
setDisplayListDirty();
return;
}
break;
default :
return;
}
if (contentSelectionManager.checkStatus(eSelectionType,iExternalID)) {
break;
}
connectedElementRepresentationManager.clear(EIDType.EXPRESSION_INDEX);
contentSelectionManager.clearSelection(eSelectionType);
Integer iMappingID=generalManager.getIDManager().createID(EManagedObjectType.CONNECTION);
contentSelectionManager.addToType(eSelectionType,iExternalID);
contentSelectionManager.addConnectionID(iMappingID,iExternalID);
if (eFieldDataType == EIDType.EXPRESSION_INDEX) {
ISelectionDelta selectionDelta=contentSelectionManager.getDelta();
SelectionCommand command=new SelectionCommand(ESelectionCommandType.CLEAR,eSelectionType);
sendSelectionCommandEvent(EIDType.REFSEQ_MRNA_INT,command);
handleConnectedElementRep(selectionDelta);
SelectionUpdateEvent event=new SelectionUpdateEvent();
event.setSelectionDelta(selectionDelta);
event.setInfo(getShortInfo());
eventPublisher.triggerEvent(event);
}
setDisplayListDirty();
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);
SelectionCommand command=new SelectionCommand(ESelectionCommandType.CLEAR,eSelectionType);
sendSelectionCommandEvent(EIDType.EXPERIMENT_INDEX,command);
setDisplayListDirty();
return;
}
break;
default :
return;
}
if (storageSelectionManager.checkStatus(eSelectionType,iExternalID)) {
break;
}
storageSelectionManager.clearSelection(eSelectionType);
storageSelectionManager.addToType(eSelectionType,iExternalID);
if (eStorageDataType == EIDType.EXPERIMENT_INDEX) {
SelectionCommand command=new SelectionCommand(ESelectionCommandType.CLEAR,eSelectionType);
sendSelectionCommandEvent(EIDType.EXPERIMENT_INDEX,command);
ISelectionDelta selectionDelta=storageSelectionManager.getDelta();
SelectionUpdateEvent event=new SelectionUpdateEvent();
event.setSelectionDelta(selectionDelta);
eventPublisher.triggerEvent(event);
}
setDisplayListDirty();
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.setGeneID(iExternalID);
loadPathwaysByGeneEvent.setIdType(EIDType.EXPRESSION_INDEX);
generalManager.getEventPublisher().triggerEvent(loadPathwaysByGeneEvent);
case CLICKED:
eSelectionType=ESelectionType.SELECTION;
break;
case MOUSE_OVER:
eSelectionType=ESelectionType.MOUSE_OVER;
if (contentSelectionManager.checkStatus(ESelectionType.SELECTION,iExternalID)) {
contentSelectionManager.clearSelection(eSelectionType);
SelectionCommand command=new SelectionCommand(ESelectionCommandType.CLEAR,eSelectionType);
sendSelectionCommandEvent(EIDType.EXPRESSION_INDEX,command);
setDisplayListDirty();
return;
}
break;
case RIGHT_CLICKED:
eSelectionType=ESelectionType.SELECTION;
if (!isRenderedRemote()) {
contextMenu.setLocation(pick.getPickedPoint(),getParentGLCanvas().getWidth(),getParentGLCanvas().getHeight());
contextMenu.setMasterViewID(iUniqueID);
}
GeneContextMenuItemContainer geneContextMenuItemContainer=new GeneContextMenuItemContainer(IDMappingHelper.get().getRefSeqFromStorageIndex(iExternalID));
contextMenu.addItemContanier(geneContextMenuItemContainer);
default :
return;
}
if (contentSelectionManager.checkStatus(eSelectionType,iExternalID)) {
break;
}
connectedElementRepresentationManager.clear(EIDType.EXPRESSION_INDEX);
contentSelectionManager.clearSelection(eSelectionType);
Integer iMappingID=generalManager.getIDManager().createID(EManagedObjectType.CONNECTION);
contentSelectionManager.addToType(eSelectionType,iExternalID);
contentSelectionManager.addConnectionID(iMappingID,iExternalID);
if (eFieldDataType == EIDType.EXPRESSION_INDEX) {
ISelectionDelta selectionDelta=contentSelectionManager.getDelta();
SelectionCommand command=new SelectionCommand(ESelectionCommandType.CLEAR,eSelectionType);
sendSelectionCommandEvent(EIDType.REFSEQ_MRNA_INT,command);
handleConnectedElementRep(selectionDelta);
SelectionUpdateEvent event=new SelectionUpdateEvent();
event.setSelectionDelta(selectionDelta);
event.setInfo(getShortInfo());
eventPublisher.triggerEvent(event);
}
setDisplayListDirty();
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);
SelectionCommand command=new SelectionCommand(ESelectionCommandType.CLEAR,eSelectionType);
sendSelectionCommandEvent(EIDType.EXPERIMENT_INDEX,command);
setDisplayListDirty();
return;
}
break;
default :
return;
}
if (storageSelectionManager.checkStatus(eSelectionType,iExternalID)) {
break;
}
storageSelectionManager.clearSelection(eSelectionType);
storageSelectionManager.addToType(eSelectionType,iExternalID);
if (eStorageDataType == EIDType.EXPERIMENT_INDEX) {
SelectionCommand command=new SelectionCommand(ESelectionCommandType.CLEAR,eSelectionType);
sendSelectionCommandEvent(EIDType.EXPERIMENT_INDEX,command);
ISelectionDelta selectionDelta=storageSelectionManager.getDelta();
SelectionUpdateEvent event=new SelectionUpdateEvent();
event.setSelectionDelta(selectionDelta);
eventPublisher.triggerEvent(event);
}
setDisplayListDirty();
break;
}
}