Program: 57496
Project: 57496
Buggy source:
private SerializationData loadData(String dirName) throws IOException, JAXBException {
  SerializationData serializationData=null;
  SerializationManager serializationManager=GeneralManager.get().getSerializationManager();
  JAXBContext projectContext=serializationManager.getProjectContext();
  Unmarshaller unmarshaller=projectContext.createUnmarshaller();
  GeneralManager.get().setBasicInfo((BasicInformation)unmarshaller.unmarshal(GeneralManager.get().getResourceLoader().getResource(dirName + ProjectSaver.BASIC_INFORMATION_FILE)));
  DataDomainList dataDomainList;
  dataDomainList=(DataDomainList)unmarshaller.unmarshal(GeneralManager.get().getResourceLoader().getResource(dirName + ProjectSaver.DATA_DOMAIN_FILE));
  serializationData=new SerializationData();
  for (  ADataDomain dataDomain : dataDomainList.getDataDomains()) {
    DataSetDescription dataSetDescription=dataDomain.getDataSetDescription();
    IDTypeInitializer.initIDs(dataSetDescription);
    dataDomain.init();
    DataDomainManager.get().register(dataDomain);
    Thread thread=new Thread(dataDomain,dataDomain.getDataDomainID());
    thread.start();
    if (dataDomain instanceof ATableBasedDataDomain) {
      String extendedDirName=dirName + dataDomain.getDataDomainID() + "String_Node_Str";
      dataDomain.getDataSetDescription().setDataSourcePath(extendedDirName + ProjectSaver.DATA_TABLE_FILE);
      DataDomainSerializationData dataInitializationData=new DataDomainSerializationData();
      dataInitializationData.setDataDomain((ATableBasedDataDomain)dataDomain);
      HashMap<String,RecordPerspective> recordPerspectives=new HashMap<String,RecordPerspective>();
      GeneralManager.get().getSWTGUIManager().setProgressBarText("String_Node_Str" + dataDomain.getLabel());
      Set<String> recordPerspectiveIDs=((ATableBasedDataDomain)dataDomain).getRecordPerspectiveIDs();
      Set<String> dimensionPerspectiveIDs=((ATableBasedDataDomain)dataDomain).getDimensionPerspectiveIDs();
      int nrPerspectives=recordPerspectiveIDs.size() + dimensionPerspectiveIDs.size();
      float progressBarFactor=100f / nrPerspectives;
      int perspectiveCount=0;
      for (      String recordPerspectiveID : recordPerspectiveIDs) {
        RecordPerspective recordPerspective=(RecordPerspective)unmarshaller.unmarshal(GeneralManager.get().getResourceLoader().getResource(extendedDirName + recordPerspectiveID + "String_Node_Str"));
        recordPerspective.setDataDomain((ATableBasedDataDomain)dataDomain);
        recordPerspective.setIDType(((ATableBasedDataDomain)dataDomain).getRecordIDType());
        recordPerspectives.put(recordPerspectiveID,recordPerspective);
        ClusterTree tree=loadTree(extendedDirName + recordPerspectiveID + "String_Node_Str",((ATableBasedDataDomain)dataDomain).getRecordIDType());
        if (tree != null)         recordPerspective.setTree(tree);
        GeneralManager.get().getSWTGUIManager().setProgressBarPercentage((int)(progressBarFactor * perspectiveCount));
        perspectiveCount++;
      }
      dataInitializationData.setRecordPerspectiveMap(recordPerspectives);
      HashMap<String,DimensionPerspective> dimensionPerspectives=new HashMap<String,DimensionPerspective>();
      for (      String dimensionPerspectiveID : dimensionPerspectiveIDs) {
        DimensionPerspective dimensionPerspective=(DimensionPerspective)unmarshaller.unmarshal(GeneralManager.get().getResourceLoader().getResource(extendedDirName + dimensionPerspectiveID + "String_Node_Str"));
        dimensionPerspective.setDataDomain((ATableBasedDataDomain)dataDomain);
        dimensionPerspective.setIDType(((ATableBasedDataDomain)dataDomain).getDimensionIDType());
        dimensionPerspectives.put(dimensionPerspectiveID,dimensionPerspective);
        ClusterTree tree=loadTree(extendedDirName + dimensionPerspectiveID + "String_Node_Str",((ATableBasedDataDomain)dataDomain).getDimensionIDType());
        dimensionPerspective.setTree(tree);
        GeneralManager.get().getSWTGUIManager().setProgressBarPercentage((int)(progressBarFactor * perspectiveCount));
        perspectiveCount++;
      }
      dataInitializationData.setDimensionPerspectiveMap(dimensionPerspectives);
      serializationData.addDataDomainSerializationData(dataInitializationData);
    }
  }
  return serializationData;
}

Fixed version (ground truth):
private SerializationData loadData(String dirName) throws IOException, JAXBException {
  SerializationData serializationData=null;
  SerializationManager serializationManager=GeneralManager.get().getSerializationManager();
  JAXBContext projectContext=serializationManager.getProjectContext();
  Unmarshaller unmarshaller=projectContext.createUnmarshaller();
  GeneralManager.get().setBasicInfo((BasicInformation)unmarshaller.unmarshal(GeneralManager.get().getResourceLoader().getResource(dirName + ProjectSaver.BASIC_INFORMATION_FILE)));
  DataDomainList dataDomainList;
  dataDomainList=(DataDomainList)unmarshaller.unmarshal(GeneralManager.get().getResourceLoader().getResource(dirName + ProjectSaver.DATA_DOMAIN_FILE));
  serializationData=new SerializationData();
  for (  ADataDomain dataDomain : dataDomainList.getDataDomains()) {
    DataSetDescription dataSetDescription=dataDomain.getDataSetDescription();
    if (dataDomain.getDataDomainType().equals("String_Node_Str"))     DataDomainManager.get().initalizeDataDomain("String_Node_Str");
    IDTypeInitializer.initIDs(dataSetDescription);
    dataDomain.init();
    DataDomainManager.get().register(dataDomain);
    Thread thread=new Thread(dataDomain,dataDomain.getDataDomainID());
    thread.start();
    if (dataDomain instanceof ATableBasedDataDomain) {
      String extendedDirName=dirName + dataDomain.getDataDomainID() + "String_Node_Str";
      dataDomain.getDataSetDescription().setDataSourcePath(extendedDirName + ProjectSaver.DATA_TABLE_FILE);
      DataDomainSerializationData dataInitializationData=new DataDomainSerializationData();
      dataInitializationData.setDataDomain((ATableBasedDataDomain)dataDomain);
      HashMap<String,RecordPerspective> recordPerspectives=new HashMap<String,RecordPerspective>();
      GeneralManager.get().getSWTGUIManager().setProgressBarText("String_Node_Str" + dataDomain.getLabel());
      Set<String> recordPerspectiveIDs=((ATableBasedDataDomain)dataDomain).getRecordPerspectiveIDs();
      Set<String> dimensionPerspectiveIDs=((ATableBasedDataDomain)dataDomain).getDimensionPerspectiveIDs();
      int nrPerspectives=recordPerspectiveIDs.size() + dimensionPerspectiveIDs.size();
      float progressBarFactor=100f / nrPerspectives;
      int perspectiveCount=0;
      for (      String recordPerspectiveID : recordPerspectiveIDs) {
        RecordPerspective recordPerspective=(RecordPerspective)unmarshaller.unmarshal(GeneralManager.get().getResourceLoader().getResource(extendedDirName + recordPerspectiveID + "String_Node_Str"));
        recordPerspective.setDataDomain((ATableBasedDataDomain)dataDomain);
        recordPerspective.setIDType(((ATableBasedDataDomain)dataDomain).getRecordIDType());
        recordPerspectives.put(recordPerspectiveID,recordPerspective);
        ClusterTree tree=loadTree(extendedDirName + recordPerspectiveID + "String_Node_Str",((ATableBasedDataDomain)dataDomain).getRecordIDType());
        if (tree != null)         recordPerspective.setTree(tree);
        GeneralManager.get().getSWTGUIManager().setProgressBarPercentage((int)(progressBarFactor * perspectiveCount));
        perspectiveCount++;
      }
      dataInitializationData.setRecordPerspectiveMap(recordPerspectives);
      HashMap<String,DimensionPerspective> dimensionPerspectives=new HashMap<String,DimensionPerspective>();
      for (      String dimensionPerspectiveID : dimensionPerspectiveIDs) {
        DimensionPerspective dimensionPerspective=(DimensionPerspective)unmarshaller.unmarshal(GeneralManager.get().getResourceLoader().getResource(extendedDirName + dimensionPerspectiveID + "String_Node_Str"));
        dimensionPerspective.setDataDomain((ATableBasedDataDomain)dataDomain);
        dimensionPerspective.setIDType(((ATableBasedDataDomain)dataDomain).getDimensionIDType());
        dimensionPerspectives.put(dimensionPerspectiveID,dimensionPerspective);
        ClusterTree tree=loadTree(extendedDirName + dimensionPerspectiveID + "String_Node_Str",((ATableBasedDataDomain)dataDomain).getDimensionIDType());
        dimensionPerspective.setTree(tree);
        GeneralManager.get().getSWTGUIManager().setProgressBarPercentage((int)(progressBarFactor * perspectiveCount));
        perspectiveCount++;
      }
      dataInitializationData.setDimensionPerspectiveMap(dimensionPerspectives);
      serializationData.addDataDomainSerializationData(dataInitializationData);
    }
  }
  return serializationData;
}