Program: 58611
Project: 58611
Buggy source:
/** 
 * Function which merges the clusters determined by the cut off value to group lists used for rendering the clusters assignments in   {@link GLHierarchicalHeatMap}.
 */
private void buildNewGroupList(){
  if (iAlClusterNodes.size() < 1) {
    groupList=new GroupList(iAlClusterNodes.size());
    Group temp=new Group(tree.getRoot().getNrElements(),false,0,ESelectionType.NORMAL,tree.getRoot());
    groupList.append(temp);
    if (bRenderGeneTree) {
      NewGroupInfoEvent newGroupInfoEvent=new NewGroupInfoEvent();
      newGroupInfoEvent.setSender(this);
      newGroupInfoEvent.setEVAType(EVAType.CONTENT);
      newGroupInfoEvent.setGroupList(groupList);
      newGroupInfoEvent.setDeleteTree(false);
      eventPublisher.triggerEvent(newGroupInfoEvent);
    }
 else {
      NewGroupInfoEvent newGroupInfoEvent=new NewGroupInfoEvent();
      newGroupInfoEvent.setSender(this);
      newGroupInfoEvent.setEVAType(EVAType.STORAGE);
      newGroupInfoEvent.setGroupList(groupList);
      newGroupInfoEvent.setDeleteTree(false);
      eventPublisher.triggerEvent(newGroupInfoEvent);
    }
    return;
  }
  groupList=new GroupList(iAlClusterNodes.size());
  bEnableDepthCheck=true;
  int cnt=0;
  int iExample=0;
  IVirtualArray currentVA=null;
  if (bRenderGeneTree) {
    currentVA=contentVA;
  }
 else {
    currentVA=storageVA;
  }
  for (  ClusterNode iter : iAlClusterNodes) {
    Group temp=new Group(iter.getNrElements(),false,currentVA.get(iExample),ESelectionType.NORMAL,iter);
    groupList.append(temp);
    cnt++;
    iExample+=iter.getNrElements();
  }
  if (bRenderGeneTree) {
    NewGroupInfoEvent newGroupInfoEvent=new NewGroupInfoEvent();
    newGroupInfoEvent.setSender(this);
    newGroupInfoEvent.setEVAType(EVAType.CONTENT);
    newGroupInfoEvent.setGroupList(groupList);
    newGroupInfoEvent.setDeleteTree(false);
    eventPublisher.triggerEvent(newGroupInfoEvent);
  }
 else {
    NewGroupInfoEvent newGroupInfoEvent=new NewGroupInfoEvent();
    newGroupInfoEvent.setSender(this);
    newGroupInfoEvent.setEVAType(EVAType.STORAGE);
    newGroupInfoEvent.setGroupList(groupList);
    newGroupInfoEvent.setDeleteTree(false);
    eventPublisher.triggerEvent(newGroupInfoEvent);
  }
}

Fixed version (ground truth):
/** 
 * Function which merges the clusters determined by the cut off value to group lists used for rendering the clusters assignments in   {@link GLHierarchicalHeatMap}.
 */
private void buildNewGroupList(){
  if (iAlClusterNodes.size() < 1) {
    groupList=new GroupList(iAlClusterNodes.size());
    Group temp=new Group(tree.getRoot().getNrElements(),false,0,ESelectionType.NORMAL,tree.getRoot());
    groupList.append(temp);
    if (bRenderGeneTree) {
      NewGroupInfoEvent newGroupInfoEvent=new NewGroupInfoEvent();
      newGroupInfoEvent.setSender(this);
      newGroupInfoEvent.setEVAType(EVAType.CONTENT);
      newGroupInfoEvent.setGroupList(groupList);
      newGroupInfoEvent.setDeleteTree(false);
      eventPublisher.triggerEvent(newGroupInfoEvent);
    }
 else {
      NewGroupInfoEvent newGroupInfoEvent=new NewGroupInfoEvent();
      newGroupInfoEvent.setSender(this);
      newGroupInfoEvent.setEVAType(EVAType.STORAGE);
      newGroupInfoEvent.setGroupList(groupList);
      newGroupInfoEvent.setDeleteTree(false);
      eventPublisher.triggerEvent(newGroupInfoEvent);
    }
    return;
  }
  groupList=new GroupList(iAlClusterNodes.size());
  bEnableDepthCheck=true;
  int cnt=0;
  int iExample=0;
  IVirtualArray currentVA=null;
  if (bRenderGeneTree) {
    currentVA=contentVA;
  }
 else {
    currentVA=storageVA;
  }
  for (  ClusterNode iter : iAlClusterNodes) {
    Group temp=new Group(iter.getNrElements(),false,currentVA.indexOf(iExample),ESelectionType.NORMAL,iter);
    groupList.append(temp);
    cnt++;
    iExample+=iter.getNrElements();
  }
  if (bRenderGeneTree) {
    NewGroupInfoEvent newGroupInfoEvent=new NewGroupInfoEvent();
    newGroupInfoEvent.setSender(this);
    newGroupInfoEvent.setEVAType(EVAType.CONTENT);
    newGroupInfoEvent.setGroupList(groupList);
    newGroupInfoEvent.setDeleteTree(false);
    eventPublisher.triggerEvent(newGroupInfoEvent);
  }
 else {
    NewGroupInfoEvent newGroupInfoEvent=new NewGroupInfoEvent();
    newGroupInfoEvent.setSender(this);
    newGroupInfoEvent.setEVAType(EVAType.STORAGE);
    newGroupInfoEvent.setGroupList(groupList);
    newGroupInfoEvent.setDeleteTree(false);
    eventPublisher.triggerEvent(newGroupInfoEvent);
  }
}