Program: 9414
Project: 9414
Buggy source:
public void init() throws ComponentInitException {
  if (isInitialised) {
    throw new ComponentInitException("String_Node_Str");
  }
  for (  OWLObjectProperty op : reasoner.getObjectProperties()) {
    opDomains.put(op,reasoner.getDomain(op));
    opRanges.put(op,reasoner.getRange(op));
    if (useHasValueConstructor) {
      Map<OWLIndividual,Integer> opMap=new TreeMap<OWLIndividual,Integer>();
      valueFrequency.put(op,opMap);
      Collection<SortedSet<OWLIndividual>> fillerSets=reasoner.getPropertyMembers(op).values();
      for (      SortedSet<OWLIndividual> fillerSet : fillerSets) {
        for (        OWLIndividual i : fillerSet) {
          Integer value=opMap.get(i);
          if (value != null) {
            opMap.put(i,value + 1);
          }
 else {
            opMap.put(i,1);
          }
        }
      }
      Set<OWLIndividual> frequentInds=new TreeSet<OWLIndividual>();
      for (      OWLIndividual i : opMap.keySet()) {
        if (opMap.get(i) >= frequencyThreshold) {
          frequentInds.add(i);
        }
      }
      frequentValues.put(op,frequentInds);
    }
  }
  for (  OWLDataProperty dp : reasoner.getDatatypeProperties()) {
    dpDomains.put(dp,reasoner.getDomain(dp));
    if (useDataHasValueConstructor) {
      Map<OWLLiteral,Integer> dpMap=new TreeMap<OWLLiteral,Integer>();
      dataValueFrequency.put(dp,dpMap);
      Collection<SortedSet<OWLLiteral>> fillerSets=reasoner.getDatatypeMembers(dp).values();
      for (      SortedSet<OWLLiteral> fillerSet : fillerSets) {
        for (        OWLLiteral i : fillerSet) {
          Integer value=dpMap.get(i);
          if (value != null) {
            dpMap.put(i,value + 1);
          }
 else {
            dpMap.put(i,1);
          }
        }
      }
      Set<OWLLiteral> frequentInds=new TreeSet<OWLLiteral>();
      for (      OWLLiteral i : dpMap.keySet()) {
        if (dpMap.get(i) >= frequencyThreshold) {
          logger.trace("String_Node_Str" + i + "String_Node_Str"+ dpMap.get(i)+ "String_Node_Str"+ frequencyThreshold);
          frequentInds.add(i);
        }
      }
      frequentDataValues.put(dp,frequentInds);
    }
  }
  valueFrequency=null;
  dataValueFrequency.clear();
  for (  OWLDataProperty dp : reasoner.getNumericDataProperties()) {
    computeSplits(dp);
  }
  for (  OWLDataProperty dp : reasoner.getDoubleDatatypeProperties()) {
    computeSplits(dp);
  }
  if (useCardinalityRestrictions) {
    for (    OWLObjectProperty op : reasoner.getObjectProperties()) {
      int maxFillers=0;
      Map<OWLIndividual,SortedSet<OWLIndividual>> opMembers=reasoner.getPropertyMembers(op);
      for (      SortedSet<OWLIndividual> inds : opMembers.values()) {
        if (inds.size() > maxFillers)         maxFillers=inds.size();
        if (maxFillers >= cardinalityLimit) {
          maxFillers=cardinalityLimit;
          break;
        }
      }
      maxNrOfFillers.put(op,maxFillers);
    }
  }
  isInitialised=true;
}

Fixed version (ground truth):
public void init() throws ComponentInitException {
  if (isInitialised) {
    throw new ComponentInitException("String_Node_Str");
  }
  for (  OWLObjectProperty op : reasoner.getObjectProperties()) {
    opDomains.put(op,reasoner.getDomain(op));
    opRanges.put(op,reasoner.getRange(op));
    if (useHasValueConstructor) {
      Map<OWLIndividual,Integer> opMap=new TreeMap<OWLIndividual,Integer>();
      valueFrequency.put(op,opMap);
      Collection<SortedSet<OWLIndividual>> fillerSets=reasoner.getPropertyMembers(op).values();
      for (      SortedSet<OWLIndividual> fillerSet : fillerSets) {
        for (        OWLIndividual i : fillerSet) {
          Integer value=opMap.get(i);
          if (value != null) {
            opMap.put(i,value + 1);
          }
 else {
            opMap.put(i,1);
          }
        }
      }
      Set<OWLIndividual> frequentInds=new TreeSet<OWLIndividual>();
      for (      OWLIndividual i : opMap.keySet()) {
        if (opMap.get(i) >= frequencyThreshold) {
          frequentInds.add(i);
        }
      }
      frequentValues.put(op,frequentInds);
    }
  }
  for (  OWLDataProperty dp : reasoner.getDatatypeProperties()) {
    dpDomains.put(dp,reasoner.getDomain(dp));
    if (useDataHasValueConstructor) {
      Map<OWLLiteral,Integer> dpMap=new TreeMap<OWLLiteral,Integer>();
      dataValueFrequency.put(dp,dpMap);
      Collection<SortedSet<OWLLiteral>> fillerSets=reasoner.getDatatypeMembers(dp).values();
      for (      SortedSet<OWLLiteral> fillerSet : fillerSets) {
        for (        OWLLiteral i : fillerSet) {
          Integer value=dpMap.get(i);
          if (value != null) {
            dpMap.put(i,value + 1);
          }
 else {
            dpMap.put(i,1);
          }
        }
      }
      Set<OWLLiteral> frequentInds=new TreeSet<OWLLiteral>();
      for (      OWLLiteral i : dpMap.keySet()) {
        if (dpMap.get(i) >= frequencyThreshold) {
          logger.trace("String_Node_Str" + i + "String_Node_Str"+ dpMap.get(i)+ "String_Node_Str"+ frequencyThreshold);
          frequentInds.add(i);
        }
      }
      frequentDataValues.put(dp,frequentInds);
    }
  }
  valueFrequency=null;
  dataValueFrequency.clear();
  for (  OWLDataProperty dp : reasoner.getNumericDataProperties()) {
    computeSplits2(dp);
  }
  for (  OWLDataProperty dp : reasoner.getDoubleDatatypeProperties()) {
    computeSplits(dp);
  }
  if (useCardinalityRestrictions) {
    for (    OWLObjectProperty op : reasoner.getObjectProperties()) {
      int maxFillers=0;
      Map<OWLIndividual,SortedSet<OWLIndividual>> opMembers=reasoner.getPropertyMembers(op);
      for (      SortedSet<OWLIndividual> inds : opMembers.values()) {
        if (inds.size() > maxFillers)         maxFillers=inds.size();
        if (maxFillers >= cardinalityLimit) {
          maxFillers=cardinalityLimit;
          break;
        }
      }
      maxNrOfFillers.put(op,maxFillers);
    }
  }
  if (startClass == null) {
    startClass=df.getOWLThing();
  }
  isInitialised=true;
}