Program: 58774
Project: 58774
Buggy source:
@Override protected void initLists(){
  if (bRenderOnlyContext) {
    iContentVAID=mapVAIDs.get(EStorageBasedVAType.EXTERNAL_SELECTION);
  }
 else {
    if (!mapVAIDs.containsKey(EStorageBasedVAType.COMPLETE_SELECTION)) {
      initCompleteList();
    }
    iContentVAID=mapVAIDs.get(EStorageBasedVAType.COMPLETE_SELECTION);
  }
  iStorageVAID=mapVAIDs.get(EStorageBasedVAType.STORAGE_SELECTION);
  if (set.isClusterInfo())   set.getVA(iContentVAID).setGroupList(set.getGroupList());
  if (bUseClusteredVA) {
    int iContentVAIDtemp=0, iStorageVAIDtemp=0;
    if (bRenderOnlyContext) {
      iContentVAIDtemp=mapVAIDs.get(EStorageBasedVAType.EXTERNAL_SELECTION);
    }
 else {
      if (!mapVAIDs.containsKey(EStorageBasedVAType.COMPLETE_SELECTION)) {
        initCompleteList();
      }
      iContentVAIDtemp=mapVAIDs.get(EStorageBasedVAType.COMPLETE_SELECTION);
    }
    iStorageVAIDtemp=mapVAIDs.get(EStorageBasedVAType.STORAGE_SELECTION);
    if (clusterstate.getClustererType() == EClustererType.GENE_CLUSTERING) {
      int iVAid=set.cluster(iContentVAIDtemp,iStorageVAIDtemp,clusterstate);
      if (iVAid == -1)       iContentVAID=iContentVAIDtemp;
 else       iContentVAID=iVAid;
      iStorageVAID=iStorageVAIDtemp;
    }
 else     if (clusterstate.getClustererType() == EClustererType.EXPERIMENTS_CLUSTERING) {
      int iVAid=set.cluster(iContentVAIDtemp,iStorageVAIDtemp,clusterstate);
      if (iVAid == -1)       iStorageVAID=iStorageVAIDtemp;
 else       iStorageVAID=iVAid;
      iContentVAID=iContentVAIDtemp;
    }
 else {
      clusterstate.setClustererType(EClustererType.EXPERIMENTS_CLUSTERING);
      int iVAid=set.cluster(iContentVAIDtemp,iStorageVAIDtemp,clusterstate);
      if (iVAid == -1)       iStorageVAID=iStorageVAIDtemp;
 else       iStorageVAID=iVAid;
      clusterstate.setClustererType(EClustererType.GENE_CLUSTERING);
      iVAid=set.cluster(iContentVAIDtemp,iStorageVAID,clusterstate);
      if (iVAid == -1)       iContentVAID=iContentVAIDtemp;
 else       iContentVAID=iVAid;
    }
  }
  contentSelectionManager.resetSelectionManager();
  storageSelectionManager.resetSelectionManager();
  contentSelectionManager.setVA(set.getVA(iContentVAID));
  storageSelectionManager.setVA(set.getVA(iStorageVAID));
  int iNumberOfColumns=set.getVA(iContentVAID).size();
  int iNumberOfRows=set.getVA(iStorageVAID).size();
  for (int iRowCount=0; iRowCount < iNumberOfRows; iRowCount++) {
    storageSelectionManager.initialAdd(set.getVA(iStorageVAID).get(iRowCount));
  }
  for (int iColumnCount=0; iColumnCount < iNumberOfColumns; iColumnCount++) {
    contentSelectionManager.initialAdd(set.getVA(iContentVAID).get(iColumnCount));
  }
}

Fixed version (ground truth):
@Override protected void initLists(){
  if (bRenderOnlyContext) {
    iContentVAID=mapVAIDs.get(EStorageBasedVAType.EXTERNAL_SELECTION);
  }
 else {
    if (!mapVAIDs.containsKey(EStorageBasedVAType.COMPLETE_SELECTION)) {
      initCompleteList();
    }
    iContentVAID=mapVAIDs.get(EStorageBasedVAType.COMPLETE_SELECTION);
  }
  iStorageVAID=mapVAIDs.get(EStorageBasedVAType.STORAGE_SELECTION);
  if (set.isClusterInfo())   set.getVA(iContentVAID).setGroupList(set.getGroupList());
  if (bUseClusteredVA) {
    int iContentVAIDtemp=0, iStorageVAIDtemp=0;
    if (bRenderOnlyContext) {
      iContentVAIDtemp=mapVAIDs.get(EStorageBasedVAType.EXTERNAL_SELECTION);
    }
 else {
      if (!mapVAIDs.containsKey(EStorageBasedVAType.COMPLETE_SELECTION)) {
        initCompleteList();
      }
      iContentVAIDtemp=mapVAIDs.get(EStorageBasedVAType.COMPLETE_SELECTION);
    }
    iStorageVAIDtemp=mapVAIDs.get(EStorageBasedVAType.STORAGE_SELECTION);
    if (clusterstate.getClustererType() == EClustererType.GENE_CLUSTERING) {
      int iVAid=set.cluster(iContentVAIDtemp,iStorageVAIDtemp,clusterstate);
      if (iVAid == -1)       iContentVAID=iContentVAIDtemp;
 else       iContentVAID=iVAid;
      iStorageVAID=iStorageVAIDtemp;
    }
 else     if (clusterstate.getClustererType() == EClustererType.EXPERIMENTS_CLUSTERING) {
      int iVAid=set.cluster(iContentVAIDtemp,iStorageVAIDtemp,clusterstate);
      if (iVAid == -1)       iStorageVAID=iStorageVAIDtemp;
 else       iStorageVAID=iVAid;
      iContentVAID=iContentVAIDtemp;
    }
 else {
      clusterstate.setClustererType(EClustererType.EXPERIMENTS_CLUSTERING);
      int iVAid=set.cluster(iContentVAIDtemp,iStorageVAIDtemp,clusterstate);
      if (iVAid == -1)       iStorageVAID=iStorageVAIDtemp;
 else       iStorageVAID=iVAid;
      clusterstate.setClustererType(EClustererType.GENE_CLUSTERING);
      iVAid=set.cluster(iContentVAIDtemp,iStorageVAID,clusterstate);
      if (iVAid == -1)       iContentVAID=iContentVAIDtemp;
 else       iContentVAID=iVAid;
    }
    AlSelection.clear();
  }
  contentSelectionManager.resetSelectionManager();
  storageSelectionManager.resetSelectionManager();
  contentSelectionManager.setVA(set.getVA(iContentVAID));
  storageSelectionManager.setVA(set.getVA(iStorageVAID));
  int iNumberOfColumns=set.getVA(iContentVAID).size();
  int iNumberOfRows=set.getVA(iStorageVAID).size();
  for (int iRowCount=0; iRowCount < iNumberOfRows; iRowCount++) {
    storageSelectionManager.initialAdd(set.getVA(iStorageVAID).get(iRowCount));
  }
  for (int iColumnCount=0; iColumnCount < iNumberOfColumns; iColumnCount++) {
    contentSelectionManager.initialAdd(set.getVA(iContentVAID).get(iColumnCount));
  }
}