Program: 57823
Project: 57823
Buggy source:
public void addDataDomain(IDataDomain dataDomain){
  if (dataDomainGraph.containsVertex(dataDomain))   return;
  dataDomainGraph.addVertex(dataDomain);
  for (  IDataDomain vertex : dataDomainGraph.vertexSet()) {
    if (vertex != dataDomain) {
      for (      IDCategory category : vertex.getIDCategories()) {
        for (        IDCategory currentCategory : dataDomain.getIDCategories()) {
          if (category == currentCategory) {
            Edge edge=new Edge(dataDomain,vertex,category);
            if (dataDomain instanceof ATableBasedDataDomain && vertex instanceof ATableBasedDataDomain) {
              ATableBasedDataDomain tableBasedDataDomain=(ATableBasedDataDomain)dataDomain;
              ATableBasedDataDomain previouslyRegisteredDataDomain=(ATableBasedDataDomain)vertex;
              if (currentCategory == tableBasedDataDomain.getDimensionIDCategory()) {
                edge.setInfoVertex1("String_Node_Str");
              }
 else               if (currentCategory == tableBasedDataDomain.getRecordIDCategory()) {
                edge.setInfoVertex1("String_Node_Str");
              }
              if (currentCategory == previouslyRegisteredDataDomain.getDimensionIDCategory()) {
                edge.setInfoVertex2("String_Node_Str");
              }
 else               if (currentCategory == previouslyRegisteredDataDomain.getRecordIDCategory()) {
                edge.setInfoVertex2("String_Node_Str");
              }
            }
            dataDomainGraph.addEdge(dataDomain,vertex,edge);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public synchronized void addDataDomain(IDataDomain dataDomain){
  if (dataDomainGraph.containsVertex(dataDomain))   return;
  dataDomainGraph.addVertex(dataDomain);
  for (  IDataDomain vertex : dataDomainGraph.vertexSet()) {
    if (vertex != dataDomain) {
      for (      IDCategory category : vertex.getIDCategories()) {
        for (        IDCategory currentCategory : dataDomain.getIDCategories()) {
          if (category == currentCategory) {
            Edge edge=new Edge(dataDomain,vertex,category);
            if (dataDomain instanceof ATableBasedDataDomain && vertex instanceof ATableBasedDataDomain) {
              ATableBasedDataDomain tableBasedDataDomain=(ATableBasedDataDomain)dataDomain;
              ATableBasedDataDomain previouslyRegisteredDataDomain=(ATableBasedDataDomain)vertex;
              if (currentCategory == tableBasedDataDomain.getDimensionIDCategory()) {
                edge.setInfoVertex1("String_Node_Str");
              }
 else               if (currentCategory == tableBasedDataDomain.getRecordIDCategory()) {
                edge.setInfoVertex1("String_Node_Str");
              }
              if (currentCategory == previouslyRegisteredDataDomain.getDimensionIDCategory()) {
                edge.setInfoVertex2("String_Node_Str");
              }
 else               if (currentCategory == previouslyRegisteredDataDomain.getRecordIDCategory()) {
                edge.setInfoVertex2("String_Node_Str");
              }
            }
            dataDomainGraph.addEdge(dataDomain,vertex,edge);
          }
        }
      }
    }
  }
}