Program: 58509
Project: 58509
Buggy source:
/** 
 * Saves the project to the directory with the given name. The directory is created before saving.
 * @param dirName directory to save the project-files into
 */
private void saveProjectData(String dirName){
  if (dirName.charAt(dirName.length() - 1) != File.separatorChar) {
    dirName+=File.separator;
  }
  File tempDirFile=new File(dirName);
  tempDirFile.mkdir();
  AUseCase useCase=(AUseCase)GeneralManager.get().getUseCase(EDataDomain.GENETIC_DATA);
  LoadDataParameters parameters=useCase.getLoadDataParameters();
  byte[] data=SetUtils.loadSetFile(parameters);
  String setFileName=dirName + SET_DATA_FILE_NAME;
  File setFile=new File(setFileName);
  SetUtils.saveFile(data,setFile);
  SerializationManager serializationManager=GeneralManager.get().getSerializationManager();
  JAXBContext projectContext=serializationManager.getProjectContext();
  try {
    Marshaller marshaller=projectContext.createMarshaller();
    saveVirtualArray(marshaller,dirName,useCase,EVAType.CONTENT);
    saveVirtualArray(marshaller,dirName,useCase,EVAType.CONTENT_CONTEXT);
    saveVirtualArray(marshaller,dirName,useCase,EVAType.CONTENT_EMBEDDED_HM);
    saveVirtualArray(marshaller,dirName,useCase,EVAType.STORAGE);
    TreePorter treePorter=new TreePorter();
    Tree<ClusterNode> geneTree=useCase.getSet().getClusteredTreeGenes();
    if (geneTree != null) {
      treePorter.exportTree(dirName + GENE_TREE_FILE_NAME,geneTree);
    }
    treePorter=new TreePorter();
    Tree<ClusterNode> expTree=useCase.getSet().getClusteredTreeExps();
    if (expTree != null) {
      treePorter.exportTree(dirName + EXP_TREE_FILE_NAME,expTree);
    }
    File useCaseFile=new File(dirName + USECASE_FILE_NAME);
    marshaller.marshal(useCase,useCaseFile);
  }
 catch (  JAXBException ex) {
    throw new RuntimeException("String_Node_Str",ex);
  }
catch (  IOException ex) {
    throw new RuntimeException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
/** 
 * Saves the project to the directory with the given name. The directory is created before saving.
 * @param dirName directory to save the project-files into
 */
private void saveProjectData(String dirName){
  if (dirName.charAt(dirName.length() - 1) != File.separatorChar) {
    dirName+=File.separator;
  }
  File tempDirFile=new File(dirName);
  tempDirFile.mkdir();
  AUseCase useCase=(AUseCase)GeneralManager.get().getUseCase(EDataDomain.GENETIC_DATA);
  LoadDataParameters parameters=useCase.getLoadDataParameters();
  FileOperations.writeInputStreamToFile(dirName + SET_DATA_FILE_NAME,GeneralManager.get().getResourceLoader().getInputSource(parameters.getFileName()).getByteStream());
  SerializationManager serializationManager=GeneralManager.get().getSerializationManager();
  JAXBContext projectContext=serializationManager.getProjectContext();
  try {
    Marshaller marshaller=projectContext.createMarshaller();
    saveVirtualArray(marshaller,dirName,useCase,EVAType.CONTENT);
    saveVirtualArray(marshaller,dirName,useCase,EVAType.CONTENT_CONTEXT);
    saveVirtualArray(marshaller,dirName,useCase,EVAType.CONTENT_EMBEDDED_HM);
    saveVirtualArray(marshaller,dirName,useCase,EVAType.STORAGE);
    TreePorter treePorter=new TreePorter();
    Tree<ClusterNode> geneTree=useCase.getSet().getClusteredTreeGenes();
    if (geneTree != null) {
      treePorter.exportTree(dirName + GENE_TREE_FILE_NAME,geneTree);
    }
    treePorter=new TreePorter();
    Tree<ClusterNode> expTree=useCase.getSet().getClusteredTreeExps();
    if (expTree != null) {
      treePorter.exportTree(dirName + EXP_TREE_FILE_NAME,expTree);
    }
    File useCaseFile=new File(dirName + USECASE_FILE_NAME);
    marshaller.marshal(useCase,useCaseFile);
  }
 catch (  JAXBException ex) {
    throw new RuntimeException("String_Node_Str",ex);
  }
catch (  IOException ex) {
    throw new RuntimeException("String_Node_Str",ex);
  }
}