Program: 9503
Project: 9503
Buggy source:
private List<EvaluatedAxiom> buildAxioms(Map<ObjectProperty,Integer> property2Count,Set<ObjectProperty> allProperties){
  List<EvaluatedAxiom> axioms=new ArrayList<EvaluatedAxiom>();
  Integer all=property2Count.get(propertyToDescribe);
  property2Count.remove(propertyToDescribe);
  Set<ObjectProperty> completeDisjointProperties=new TreeSet<ObjectProperty>(allProperties);
  completeDisjointProperties.removeAll(property2Count.keySet());
  EvaluatedAxiom evalAxiom;
  for (  ObjectProperty p : completeDisjointProperties) {
    if (usePropertyPopularity) {
      int overlap=0;
      int pop;
      if (ks.isRemote()) {
        pop=reasoner.getPopularity(p);
      }
 else {
        Model model=((LocalModelBasedSparqlEndpointKS)ks).getModel();
        pop=model.listStatements(null,model.getProperty(p.getName()),(RDFNode)null).toSet().size();
      }
      if (pop == 0)       continue;
      double precision=accuracy(pop,overlap);
      double recall=accuracy(popularity,overlap);
      double score=1 - fMEasure(precision,recall);
      evalAxiom=new EvaluatedAxiom(new DisjointObjectPropertyAxiom(propertyToDescribe,p),new AxiomScore(score));
    }
 else {
      evalAxiom=new EvaluatedAxiom(new DisjointObjectPropertyAxiom(propertyToDescribe,p),new AxiomScore(1));
    }
    axioms.add(evalAxiom);
  }
  ObjectProperty p;
  for (  Entry<ObjectProperty,Integer> entry : sortByValues(property2Count)) {
    p=entry.getKey();
    int overlap=entry.getValue();
    int pop;
    if (ks.isRemote()) {
      pop=reasoner.getPopularity(p);
    }
 else {
      Model model=((LocalModelBasedSparqlEndpointKS)ks).getModel();
      pop=model.listStatements(null,model.getProperty(p.getName()),(RDFNode)null).toSet().size();
    }
    if (pop == 0)     continue;
    double precision=accuracy(pop,overlap);
    double recall=accuracy(popularity,overlap);
    double score=1 - fMEasure(precision,recall);
    evalAxiom=new EvaluatedAxiom(new DisjointObjectPropertyAxiom(propertyToDescribe,p),new AxiomScore(score));
  }
  property2Count.put(propertyToDescribe,all);
  return axioms;
}

Fixed version (ground truth):
private List<EvaluatedAxiom> buildAxioms(Map<ObjectProperty,Integer> property2Count,Set<ObjectProperty> allProperties){
  List<EvaluatedAxiom> axioms=new ArrayList<EvaluatedAxiom>();
  Integer all=property2Count.get(propertyToDescribe);
  property2Count.remove(propertyToDescribe);
  Set<ObjectProperty> completeDisjointProperties=new TreeSet<ObjectProperty>(allProperties);
  completeDisjointProperties.removeAll(property2Count.keySet());
  EvaluatedAxiom evalAxiom;
  for (  ObjectProperty p : completeDisjointProperties) {
    if (usePropertyPopularity) {
      int overlap=0;
      int otherPopularity;
      if (ks.isRemote()) {
        otherPopularity=reasoner.getPopularity(p);
      }
 else {
        Model model=((LocalModelBasedSparqlEndpointKS)ks).getModel();
        otherPopularity=model.listStatements(null,model.getProperty(p.getName()),(RDFNode)null).toSet().size();
      }
      if (otherPopularity == 0)       continue;
      double precision=accuracy(otherPopularity,overlap);
      double recall=accuracy(popularity,overlap);
      double score=1 - fMEasure(precision,recall);
      evalAxiom=new EvaluatedAxiom(new DisjointObjectPropertyAxiom(propertyToDescribe,p),new AxiomScore(score,score,popularity,popularity,0));
    }
 else {
      evalAxiom=new EvaluatedAxiom(new DisjointObjectPropertyAxiom(propertyToDescribe,p),new AxiomScore(1));
    }
    axioms.add(evalAxiom);
  }
  ObjectProperty p;
  for (  Entry<ObjectProperty,Integer> entry : sortByValues(property2Count)) {
    p=entry.getKey();
    int overlap=entry.getValue();
    int otherPopularity;
    if (ks.isRemote()) {
      otherPopularity=reasoner.getPopularity(p);
    }
 else {
      Model model=((LocalModelBasedSparqlEndpointKS)ks).getModel();
      otherPopularity=model.listStatements(null,model.getProperty(p.getName()),(RDFNode)null).toSet().size();
    }
    if (otherPopularity == 0)     continue;
    double precision=accuracy(otherPopularity,overlap);
    double recall=accuracy(popularity,overlap);
    double score=1 - fMEasure(precision,recall);
    evalAxiom=new EvaluatedAxiom(new DisjointObjectPropertyAxiom(propertyToDescribe,p),new AxiomScore(score,score,popularity,popularity - overlap,overlap));
  }
  property2Count.put(propertyToDescribe,all);
  return axioms;
}