Program: 58862
Project: 58862
Buggy source:
public void export(ISet set,String sFileName,boolean bExportBucketInternal){
  IVirtualArray contentVA=null;
  IVirtualArray storageVA=null;
  Collection<AGLEventListener> views=GeneralManager.get().getViewGLCanvasManager().getAllGLEventListeners();
  for (  AGLEventListener view : views) {
    if (view instanceof GLParallelCoordinates && view.isRenderedRemote() && bExportBucketInternal) {
      contentVA=set.getVA(view.getContentVAID());
      storageVA=set.getVA(view.getStorageVAID());
      break;
    }
 else     if (!view.isRenderedRemote() && (view instanceof GLParallelCoordinates || view instanceof GLHierarchicalHeatMap) && !bExportBucketInternal) {
      contentVA=set.getVA(view.getContentVAID());
      storageVA=set.getVA(view.getStorageVAID());
      break;
    }
  }
  if (contentVA == null || storageVA == null)   throw new IllegalStateException("String_Node_Str");
  try {
    PrintWriter out=new PrintWriter(new BufferedWriter(new FileWriter(sFileName)));
    out.print("String_Node_Str");
    for (    Integer iStorageIndex : storageVA) {
      out.print(set.get(iStorageIndex).getLabel());
      out.print("String_Node_Str");
    }
    if (contentVA.getGroupList() != null)     out.print("String_Node_Str");
    out.println();
    int cnt=0;
    int cluster=0;
    int index=0;
    int offset=0;
    for (    Integer iContentIndex : contentVA) {
      IIDMappingManager iDMappingManager=GeneralManager.get().getIDMappingManager();
      Integer iRefseqMrnaInt=iDMappingManager.getID(EMappingType.EXPRESSION_INDEX_2_REFSEQ_MRNA_INT,iContentIndex);
      if (iRefseqMrnaInt == null) {
        continue;
      }
      String sRefseqMrna=iDMappingManager.getID(EMappingType.REFSEQ_MRNA_INT_2_REFSEQ_MRNA,iRefseqMrnaInt);
      out.print(sRefseqMrna + "String_Node_Str");
      for (      Integer iStorageIndex : storageVA) {
        IStorage storage=set.get(iStorageIndex);
        out.print(storage.getFloat(EDataRepresentation.RAW,iContentIndex));
        out.print("String_Node_Str");
      }
      if (contentVA.getGroupList() != null) {
        if (cnt == contentVA.getGroupList().get(cluster).getNrElements() - 0) {
          offset=offset + contentVA.getGroupList().get(cluster).getNrElements();
          cluster++;
          cnt=0;
        }
 else {
          cnt++;
        }
        if (cluster < contentVA.getGroupList().size()) {
          if (index == offset + contentVA.getGroupList().get(cluster).getIdxExample())           out.print(cluster + "String_Node_Str" + 1+ "String_Node_Str");
 else           out.print(cluster + "String_Node_Str" + 0+ "String_Node_Str");
        }
 else         out.print(cluster + "String_Node_Str" + 0+ "String_Node_Str");
        index++;
      }
      out.println();
    }
    out.close();
    Tree<ClusterNode> tree=set.getClusteredTreeGenes();
    if (tree != null) {
      TreePorter treePorter=new TreePorter();
      if (treePorter.exportTree(sFileName + "String_Node_Str",tree) == false)       System.out.println("String_Node_Str");
    }
  }
 catch (  IOException e) {
  }
catch (  JAXBException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void export(ISet set,String sFileName,boolean bExportBucketInternal){
  IVirtualArray contentVA=null;
  IVirtualArray storageVA=null;
  Collection<AGLEventListener> views=GeneralManager.get().getViewGLCanvasManager().getAllGLEventListeners();
  for (  AGLEventListener view : views) {
    if (view instanceof GLParallelCoordinates && view.isRenderedRemote() && bExportBucketInternal) {
      contentVA=set.getVA(view.getContentVAID());
      storageVA=set.getVA(view.getStorageVAID());
      break;
    }
 else     if (!view.isRenderedRemote() && (view instanceof GLParallelCoordinates || view instanceof GLHierarchicalHeatMap) && !bExportBucketInternal) {
      contentVA=set.getVA(view.getContentVAID());
      storageVA=set.getVA(view.getStorageVAID());
      break;
    }
  }
  if (contentVA == null || storageVA == null)   throw new IllegalStateException("String_Node_Str");
  try {
    PrintWriter out=new PrintWriter(new BufferedWriter(new FileWriter(sFileName)));
    out.print("String_Node_Str");
    for (    Integer iStorageIndex : storageVA) {
      out.print(set.get(iStorageIndex).getLabel());
      out.print("String_Node_Str");
    }
    if (contentVA.getGroupList() != null)     out.print("String_Node_Str");
    out.println();
    int cnt=-1;
    int cluster=0;
    int index=0;
    int offset=0;
    for (    Integer iContentIndex : contentVA) {
      IIDMappingManager iDMappingManager=GeneralManager.get().getIDMappingManager();
      Integer iRefseqMrnaInt=iDMappingManager.getID(EMappingType.EXPRESSION_INDEX_2_REFSEQ_MRNA_INT,iContentIndex);
      if (iRefseqMrnaInt == null) {
        continue;
      }
      String sRefseqMrna=iDMappingManager.getID(EMappingType.REFSEQ_MRNA_INT_2_REFSEQ_MRNA,iRefseqMrnaInt);
      out.print(sRefseqMrna + "String_Node_Str");
      for (      Integer iStorageIndex : storageVA) {
        IStorage storage=set.get(iStorageIndex);
        out.print(storage.getFloat(EDataRepresentation.RAW,iContentIndex));
        out.print("String_Node_Str");
      }
      if (contentVA.getGroupList() != null) {
        if (cnt == contentVA.getGroupList().get(cluster).getNrElements() - 1) {
          offset=offset + contentVA.getGroupList().get(cluster).getNrElements();
          cluster++;
          cnt=0;
        }
 else {
          cnt++;
        }
        if (cnt == 0)         out.print(cluster + "String_Node_Str" + 1+ "String_Node_Str");
 else         out.print(cluster + "String_Node_Str" + 0+ "String_Node_Str");
        index++;
      }
      out.println();
    }
    out.close();
    Tree<ClusterNode> tree=set.getClusteredTreeGenes();
    if (tree != null) {
      TreePorter treePorter=new TreePorter();
      if (treePorter.exportTree(sFileName + "String_Node_Str",tree) == false)       System.out.println("String_Node_Str");
    }
  }
 catch (  IOException e) {
  }
catch (  JAXBException e) {
    e.printStackTrace();
  }
}