Program: 58674
Project: 58674
Buggy source:
/** 
 * Function called any time a update is triggered external
 * @param
 */
@Override protected void reactOnExternalSelection(boolean scrollToSelection){
  if (bRenderGeneTree == true) {
    if (tree != null) {
      int iIndex;
      resetAllTreeSelections();
      Set<ClusterNode> nodeSet=tree.getGraph().vertexSet();
      for (      ClusterNode node : nodeSet) {
        node.setSelectionType(ESelectionType.NORMAL);
      }
      Set<Integer> setMouseOverElements=contentSelectionManager.getElements(ESelectionType.MOUSE_OVER);
      for (      Integer iSelectedID : setMouseOverElements) {
        iIndex=iSelectedID;
        if (tree.getNodeByNumber(iIndex) != null)         tree.getNodeByNumber(iIndex).setSelectionType(ESelectionType.MOUSE_OVER);
      }
      Set<Integer> setSelectionElements=contentSelectionManager.getElements(ESelectionType.SELECTION);
      for (      Integer iSelectedID : setSelectionElements) {
        iIndex=contentVA.indexOf(iSelectedID);
        if (tree.getNodeByNumber(iIndex) != null)         tree.getNodeByNumber(iIndex).setSelectionType(ESelectionType.SELECTION);
      }
      setDisplayListDirty();
    }
  }
 else {
    if (tree != null) {
      int iIndex;
      resetAllTreeSelections();
      Set<ClusterNode> nodeSet=tree.getGraph().vertexSet();
      for (      ClusterNode node : nodeSet) {
        node.setSelectionType(ESelectionType.NORMAL);
      }
      Set<Integer> setMouseOverElements=storageSelectionManager.getElements(ESelectionType.MOUSE_OVER);
      for (      Integer iSelectedID : setMouseOverElements) {
        iIndex=iSelectedID;
        if (tree.getNodeByNumber(iIndex) != null)         tree.getNodeByNumber(iIndex).setSelectionType(ESelectionType.MOUSE_OVER);
      }
      Set<Integer> setSelectionElements=storageSelectionManager.getElements(ESelectionType.SELECTION);
      for (      Integer iSelectedID : setSelectionElements) {
        iIndex=storageVA.indexOf(iSelectedID);
        if (tree.getNodeByNumber(iIndex) != null)         tree.getNodeByNumber(iIndex).setSelectionType(ESelectionType.SELECTION);
      }
      setDisplayListDirty();
    }
  }
}

Fixed version (ground truth):
/** 
 * Function called any time a update is triggered external
 * @param
 */
@Override protected void reactOnExternalSelection(boolean scrollToSelection){
  if (bRenderGeneTree == true) {
    if (tree != null) {
      int iIndex;
      resetAllTreeSelections();
      Set<ClusterNode> nodeSet=tree.getGraph().vertexSet();
      for (      ClusterNode node : nodeSet) {
        node.setSelectionType(ESelectionType.NORMAL);
      }
      Set<Integer> setMouseOverElements=contentSelectionManager.getElements(ESelectionType.MOUSE_OVER);
      for (      Integer iSelectedID : setMouseOverElements) {
        iIndex=iSelectedID;
        if (tree.getNodeByNumber(iIndex) != null)         tree.getNodeByNumber(iIndex).setSelectionType(ESelectionType.MOUSE_OVER);
      }
      Set<Integer> setSelectionElements=contentSelectionManager.getElements(ESelectionType.SELECTION);
      for (      Integer iSelectedID : setSelectionElements) {
        iIndex=iSelectedID;
        if (tree.getNodeByNumber(iIndex) != null)         tree.getNodeByNumber(iIndex).setSelectionType(ESelectionType.SELECTION);
      }
      setDisplayListDirty();
    }
  }
 else {
    if (tree != null) {
      int iIndex;
      resetAllTreeSelections();
      Set<ClusterNode> nodeSet=tree.getGraph().vertexSet();
      for (      ClusterNode node : nodeSet) {
        node.setSelectionType(ESelectionType.NORMAL);
      }
      Set<Integer> setMouseOverElements=storageSelectionManager.getElements(ESelectionType.MOUSE_OVER);
      for (      Integer iSelectedID : setMouseOverElements) {
        iIndex=iSelectedID;
        if (tree.getNodeByNumber(iIndex) != null)         tree.getNodeByNumber(iIndex).setSelectionType(ESelectionType.MOUSE_OVER);
      }
      Set<Integer> setSelectionElements=storageSelectionManager.getElements(ESelectionType.SELECTION);
      for (      Integer iSelectedID : setSelectionElements) {
        iIndex=iSelectedID;
        if (tree.getNodeByNumber(iIndex) != null)         tree.getNodeByNumber(iIndex).setSelectionType(ESelectionType.SELECTION);
      }
      setDisplayListDirty();
    }
  }
}