Program: 57806
Project: 57806
Buggy source:
@Override public void handleSelectionUpdate(SelectionDelta selectionDelta,boolean scrollToSelection,String info){
  if (pathway == null)   return;
  if (selectionDelta.getIDType().getIDCategory() == geneSelectionManager.getIDType().getIDCategory()) {
    SelectionDelta resolvedDelta=resolveExternalSelectionDelta(selectionDelta);
    geneSelectionManager.setDelta(resolvedDelta);
    setDisplayListDirty();
    int pathwayHeight=pathway.getHeight();
    for (    SelectionDeltaItem item : resolvedDelta) {
      if (item.getSelectionType() != SelectionType.MOUSE_OVER && item.getSelectionType() != SelectionType.SELECTION) {
        continue;
      }
      PathwayVertexGraphItemRep vertexRep=(PathwayVertexGraphItemRep)pathwayItemManager.getItem(item.getID());
      int viewID=uniqueID;
      SelectedElementRep elementRep=new SelectedElementRep(dataDomain.getRecordIDType(),viewID,vertexRep.getXOrigin() * PathwayRenderStyle.SCALING_FACTOR_X * vecScaling.x() + vecTranslation.x(),(pathwayHeight - vertexRep.getYOrigin()) * PathwayRenderStyle.SCALING_FACTOR_Y * vecScaling.y() + vecTranslation.y(),0);
      for (      Integer iConnectionID : item.getConnectionIDs()) {
        connectedElementRepresentationManager.addSelection(iConnectionID,elementRep,item.getSelectionType());
      }
    }
  }
 else   if (selectionDelta.getIDType().getIDCategory() == dimensionSelectionManager.getIDType().getIDCategory()) {
    for (    SelectionDeltaItem item : selectionDelta.getAllItems()) {
      if (item.getSelectionType() == SelectionType.MOUSE_OVER && !item.isRemove()) {
        selectedSampleIndex=item.getID();
        break;
      }
    }
    setDisplayListDirty();
  }
}

Fixed version (ground truth):
@Override public void handleSelectionUpdate(SelectionDelta selectionDelta,boolean scrollToSelection,String info){
  if (pathway == null)   return;
  if (selectionDelta.getIDType().getIDCategory() == geneSelectionManager.getIDType().getIDCategory()) {
    SelectionDelta resolvedDelta=resolveExternalSelectionDelta(selectionDelta);
    geneSelectionManager.setDelta(resolvedDelta);
    setDisplayListDirty();
    int pathwayHeight=pathway.getHeight();
    for (    SelectionDeltaItem item : resolvedDelta) {
      if (item.getSelectionType() != SelectionType.MOUSE_OVER && item.getSelectionType() != SelectionType.SELECTION) {
        continue;
      }
      PathwayVertexGraphItemRep vertexRep=(PathwayVertexGraphItemRep)pathwayItemManager.getItem(item.getID());
      int viewID=uniqueID;
      SelectedElementRep elementRep=new SelectedElementRep(dataDomain.getRecordIDType(),viewID,vertexRep.getXOrigin() * PathwayRenderStyle.SCALING_FACTOR_X * vecScaling.x() + vecTranslation.x(),(pathwayHeight - vertexRep.getYOrigin()) * PathwayRenderStyle.SCALING_FACTOR_Y * vecScaling.y() + vecTranslation.y(),0);
      for (      Integer iConnectionID : item.getConnectionIDs()) {
        connectedElementRepresentationManager.addSelection(iConnectionID,elementRep,item.getSelectionType());
      }
    }
  }
 else   if (selectionDelta.getIDType().getIDCategory() == sampleSelectionManager.getIDType().getIDCategory()) {
    for (    SelectionDeltaItem item : selectionDelta.getAllItems()) {
      if (item.getSelectionType() == SelectionType.MOUSE_OVER && !item.isRemove()) {
        selectedSampleIndex=item.getID();
        break;
      }
    }
    setDisplayListDirty();
  }
}