Program: 57853
Project: 57853
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()) {
    DataDomainManager.get().register(dataDomain);
    dataDomain.init();
    Thread thread=new Thread(dataDomain,dataDomain.getDataDomainID());
    thread.start();
    if (dataDomain instanceof ATableBasedDataDomain) {
      String extendedDirName=dirName + dataDomain.getDataDomainID() + "String_Node_Str";
      dataDomain.setFileName(extendedDirName + ProjectSaver.DATA_TABLE_FILE);
      dataDomain.getLoadDataParameters().setFileName(extendedDirName + ProjectSaver.DATA_TABLE_FILE);
      DataDomainSerializationData dataInitializationData=new DataDomainSerializationData();
      dataInitializationData.setDataDomain((ATableBasedDataDomain)dataDomain);
      HashMap<String,RecordPerspective> recordPerspectives=new HashMap<String,RecordPerspective>();
      for (      String recordPerspectiveID : ((ATableBasedDataDomain)dataDomain).getRecordPerspectiveIDs()) {
        RecordPerspective recordPerspective=(RecordPerspective)unmarshaller.unmarshal(GeneralManager.get().getResourceLoader().getResource(extendedDirName + recordPerspectiveID + "String_Node_Str"));
        recordPerspective.setIDType(((ATableBasedDataDomain)dataDomain).getRecordIDType());
        recordPerspectives.put(recordPerspectiveID,recordPerspective);
        if (!recordPerspective.isTreeDefaultTree()) {
          ClusterTree tree=loadTree(extendedDirName + recordPerspectiveID + "String_Node_Str",((ATableBasedDataDomain)dataDomain).getRecordIDType());
          recordPerspective.setTree(tree);
        }
      }
      dataInitializationData.setRecordPerspectiveMap(recordPerspectives);
      HashMap<String,DimensionPerspective> dimensionPerspectives=new HashMap<String,DimensionPerspective>();
      for (      String dimensionPerspectiveID : ((ATableBasedDataDomain)dataDomain).getDimensionPerspectiveIDs()) {
        DimensionPerspective dimensionPerspective=(DimensionPerspective)unmarshaller.unmarshal(GeneralManager.get().getResourceLoader().getResource(extendedDirName + dimensionPerspectiveID + "String_Node_Str"));
        dimensionPerspective.setIDType(((ATableBasedDataDomain)dataDomain).getDimensionIDType());
        dimensionPerspectives.put(dimensionPerspectiveID,dimensionPerspective);
        if (!dimensionPerspective.isTreeDefaultTree()) {
          ClusterTree tree=loadTree(extendedDirName + dimensionPerspectiveID + "String_Node_Str",((ATableBasedDataDomain)dataDomain).getDimensionIDType());
          dimensionPerspective.setTree(tree);
        }
      }
      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()) {
    DataDomainManager.get().register(dataDomain);
    dataDomain.init();
    Thread thread=new Thread(dataDomain,dataDomain.getDataDomainID());
    thread.start();
    if (dataDomain instanceof ATableBasedDataDomain) {
      String extendedDirName=dirName + dataDomain.getDataDomainID() + "String_Node_Str";
      dataDomain.setFileName(extendedDirName + ProjectSaver.DATA_TABLE_FILE);
      dataDomain.getLoadDataParameters().setFileName(extendedDirName + ProjectSaver.DATA_TABLE_FILE);
      DataDomainSerializationData dataInitializationData=new DataDomainSerializationData();
      dataInitializationData.setDataDomain((ATableBasedDataDomain)dataDomain);
      HashMap<String,RecordPerspective> recordPerspectives=new HashMap<String,RecordPerspective>();
      for (      String recordPerspectiveID : ((ATableBasedDataDomain)dataDomain).getRecordPerspectiveIDs()) {
        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);
        if (!recordPerspective.isTreeDefaultTree()) {
          ClusterTree tree=loadTree(extendedDirName + recordPerspectiveID + "String_Node_Str",((ATableBasedDataDomain)dataDomain).getRecordIDType());
          recordPerspective.setTree(tree);
        }
      }
      dataInitializationData.setRecordPerspectiveMap(recordPerspectives);
      HashMap<String,DimensionPerspective> dimensionPerspectives=new HashMap<String,DimensionPerspective>();
      for (      String dimensionPerspectiveID : ((ATableBasedDataDomain)dataDomain).getDimensionPerspectiveIDs()) {
        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);
        if (!dimensionPerspective.isTreeDefaultTree()) {
          ClusterTree tree=loadTree(extendedDirName + dimensionPerspectiveID + "String_Node_Str",((ATableBasedDataDomain)dataDomain).getDimensionIDType());
          dimensionPerspective.setTree(tree);
        }
      }
      dataInitializationData.setDimensionPerspectiveMap(dimensionPerspectives);
      serializationData.addDataDomainSerializationData(dataInitializationData);
    }
  }
  return serializationData;
}