Program: 9450
Project: 9450
Buggy source:
private void dematerialize(){
  long dematStartTime=System.currentTimeMillis();
  logger.debug("String_Node_Str");
  for (  NamedClass atomicConcept : rc.getNamedClasses()) {
    SortedSet<Individual> pos=rc.getIndividuals(atomicConcept);
    classInstancesPos.put(atomicConcept,(TreeSet<Individual>)pos);
    if (isDefaultNegation()) {
      classInstancesNeg.put(atomicConcept,(TreeSet<Individual>)Helper.difference(individuals,pos));
    }
 else {
      Negation negatedAtomicConcept=new Negation(atomicConcept);
      classInstancesNeg.put(atomicConcept,(TreeSet<Individual>)rc.getIndividuals(negatedAtomicConcept));
    }
  }
  logger.debug("String_Node_Str");
  for (  ObjectProperty atomicRole : atomicRoles) {
    opPos.put(atomicRole,rc.getPropertyMembers(atomicRole));
  }
  logger.debug("String_Node_Str");
  for (  DatatypeProperty atomicRole : datatypeProperties) {
    dpPos.put(atomicRole,rc.getDatatypeMembers(atomicRole));
  }
  for (  DatatypeProperty dp : booleanDatatypeProperties) {
    bdPos.put(dp,(TreeSet<Individual>)rc.getTrueDatatypeMembers(dp));
    bdNeg.put(dp,(TreeSet<Individual>)rc.getFalseDatatypeMembers(dp));
  }
  for (  DatatypeProperty dp : intDatatypeProperties) {
    id.put(dp,rc.getIntDatatypeMembers(dp));
  }
  for (  DatatypeProperty dp : doubleDatatypeProperties) {
    dd.put(dp,rc.getDoubleDatatypeMembers(dp));
  }
  for (  DatatypeProperty dp : stringDatatypeProperties) {
    sd.put(dp,rc.getStringDatatypeMembers(dp));
  }
  if (materializeExistentialRestrictions) {
    ExistentialRestrictionMaterialization materialization=new ExistentialRestrictionMaterialization(rc.getReasoner().getRootOntology());
    for (    NamedClass cls : atomicConcepts) {
      TreeSet<Individual> individuals=classInstancesPos.get(cls);
      Set<OWLClassExpression> superClass=materialization.materialize(cls.getName());
      for (      OWLClassExpression sup : superClass) {
        fill(individuals,DLLearnerDescriptionConvertVisitor.getDLLearnerDescription(sup));
      }
    }
  }
  if (handlePunning) {
    OWLOntology ontology=rc.getReasoner().getRootOntology();
    Individual genericIndividual=new Individual("String_Node_Str");
    Map<Individual,SortedSet<Individual>> map=new HashMap<Individual,SortedSet<Individual>>();
    for (    Individual individual : individuals) {
      SortedSet<Individual> objects=new TreeSet<Individual>();
      objects.add(genericIndividual);
      map.put(individual,objects);
    }
    for (    NamedClass cls : atomicConcepts) {
      classInstancesNeg.get(cls).add(genericIndividual);
      if (OWLPunningDetector.hasPunning(ontology,cls)) {
        Individual clsAsInd=new Individual(cls.getName());
        SortedSet<Individual> individuals=classInstancesPos.get(cls);
        for (        Individual individual : individuals) {
          SortedSet<Individual> objects=map.get(individual);
          if (objects == null) {
            objects=new TreeSet<Individual>();
            map.put(individual,objects);
          }
          objects.add(clsAsInd);
        }
      }
    }
    opPos.put(OWLPunningDetector.punningProperty,map);
    atomicRoles=new TreeSet<ObjectProperty>(atomicRoles);
    atomicRoles.add(OWLPunningDetector.punningProperty);
    atomicRoles=Collections.unmodifiableSet(atomicRoles);
  }
  long dematDuration=System.currentTimeMillis() - dematStartTime;
  logger.debug("String_Node_Str" + dematDuration + "String_Node_Str");
}

Fixed version (ground truth):
private void dematerialize(){
  long dematStartTime=System.currentTimeMillis();
  logger.debug("String_Node_Str");
  for (  NamedClass atomicConcept : rc.getNamedClasses()) {
    SortedSet<Individual> pos=rc.getIndividuals(atomicConcept);
    classInstancesPos.put(atomicConcept,(TreeSet<Individual>)pos);
    if (isDefaultNegation()) {
      classInstancesNeg.put(atomicConcept,(TreeSet<Individual>)Helper.difference(individuals,pos));
    }
 else {
      Negation negatedAtomicConcept=new Negation(atomicConcept);
      classInstancesNeg.put(atomicConcept,(TreeSet<Individual>)rc.getIndividuals(negatedAtomicConcept));
    }
  }
  logger.debug("String_Node_Str");
  for (  ObjectProperty atomicRole : atomicRoles) {
    opPos.put(atomicRole,rc.getPropertyMembers(atomicRole));
  }
  logger.debug("String_Node_Str");
  for (  DatatypeProperty atomicRole : datatypeProperties) {
    dpPos.put(atomicRole,rc.getDatatypeMembers(atomicRole));
  }
  for (  DatatypeProperty dp : booleanDatatypeProperties) {
    bdPos.put(dp,(TreeSet<Individual>)rc.getTrueDatatypeMembers(dp));
    bdNeg.put(dp,(TreeSet<Individual>)rc.getFalseDatatypeMembers(dp));
  }
  for (  DatatypeProperty dp : intDatatypeProperties) {
    id.put(dp,rc.getIntDatatypeMembers(dp));
  }
  for (  DatatypeProperty dp : doubleDatatypeProperties) {
    dd.put(dp,rc.getDoubleDatatypeMembers(dp));
  }
  for (  DatatypeProperty dp : stringDatatypeProperties) {
    sd.put(dp,rc.getStringDatatypeMembers(dp));
  }
  if (materializeExistentialRestrictions) {
    logger.debug("String_Node_Str");
    ExistentialRestrictionMaterialization materialization=new ExistentialRestrictionMaterialization(rc.getReasoner().getRootOntology());
    int cnt=0;
    for (    NamedClass cls : atomicConcepts) {
      System.out.println(cnt++ + "String_Node_Str" + atomicConcepts.size());
      TreeSet<Individual> individuals=classInstancesPos.get(cls);
      Set<OWLClassExpression> superClass=materialization.materialize(cls.getName());
      for (      OWLClassExpression sup : superClass) {
        fill(individuals,DLLearnerDescriptionConvertVisitor.getDLLearnerDescription(sup));
      }
    }
    logger.debug("String_Node_Str");
  }
  if (handlePunning) {
    OWLOntology ontology=rc.getReasoner().getRootOntology();
    Individual genericIndividual=new Individual("String_Node_Str");
    Map<Individual,SortedSet<Individual>> map=new HashMap<Individual,SortedSet<Individual>>();
    for (    Individual individual : individuals) {
      SortedSet<Individual> objects=new TreeSet<Individual>();
      objects.add(genericIndividual);
      map.put(individual,objects);
    }
    for (    NamedClass cls : atomicConcepts) {
      classInstancesNeg.get(cls).add(genericIndividual);
      if (OWLPunningDetector.hasPunning(ontology,cls)) {
        Individual clsAsInd=new Individual(cls.getName());
        SortedSet<Individual> individuals=classInstancesPos.get(cls);
        for (        Individual individual : individuals) {
          SortedSet<Individual> objects=map.get(individual);
          if (objects == null) {
            objects=new TreeSet<Individual>();
            map.put(individual,objects);
          }
          objects.add(clsAsInd);
        }
      }
    }
    opPos.put(OWLPunningDetector.punningProperty,map);
    atomicRoles=new TreeSet<ObjectProperty>(atomicRoles);
    atomicRoles.add(OWLPunningDetector.punningProperty);
    atomicRoles=Collections.unmodifiableSet(atomicRoles);
  }
  long dematDuration=System.currentTimeMillis() - dematStartTime;
  logger.debug("String_Node_Str" + dematDuration + "String_Node_Str");
}