nus-yam/ex-repair huggingface dataset:
Program: 9387
Project: 9387
Buggy source:
@Override public final SortedSet<OWLClassExpression> getSubClasses(OWLClassExpression concept){
  if (precomputeClassHierarchy) {
    return getClassHierarchy().getSubClasses(concept);
  }
 else {
    try {
      return getSubClassesImpl(concept);
    }
 catch (    ReasoningMethodUnsupportedException e) {
      e.printStackTrace();
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public final SortedSet<OWLClassExpression> getSubClasses(OWLClassExpression concept){
  if (precomputeClassHierarchy) {
    return getClassHierarchy().getSubClasses(concept,true);
  }
 else {
    try {
      return getSubClassesImpl(concept);
    }
 catch (    ReasoningMethodUnsupportedException e) {
      e.printStackTrace();
    }
  }
  return null;
}
Program: 9389
Project: 9389
Buggy source:
private SortedSet<OWLClassExpression> getClassCandidatesRecursive(OWLClassExpression index,OWLClassExpression upperClass){
  SortedSet<OWLClassExpression> candidates=new TreeSet<OWLClassExpression>();
  for (  OWLClassExpression candidate : subHierarchy.getSubClasses(upperClass)) {
    if (!isDisjoint(candidate,index)) {
      boolean meaningful;
      if (instanceBasedDisjoints) {
        SortedSet<OWLIndividual> tmp=reasoner.getIndividuals(index);
        tmp.removeAll(reasoner.getIndividuals(candidate));
        meaningful=tmp.size() != 0;
      }
 else {
        meaningful=!isDisjoint(df.getOWLObjectComplementOf(candidate),index);
      }
      if (meaningful) {
        candidates.add(candidate);
      }
 else {
        candidates.addAll(getClassCandidatesRecursive(index,candidate));
      }
    }
  }
  return candidates;
}

Fixed version (ground truth):
private SortedSet<OWLClassExpression> getClassCandidatesRecursive(OWLClassExpression index,OWLClassExpression upperClass){
  SortedSet<OWLClassExpression> candidates=new TreeSet<OWLClassExpression>();
  for (  OWLClassExpression candidate : subHierarchy.getSubClasses(upperClass,true)) {
    if (!isDisjoint(candidate,index)) {
      boolean meaningful;
      if (instanceBasedDisjoints) {
        SortedSet<OWLIndividual> tmp=reasoner.getIndividuals(index);
        tmp.removeAll(reasoner.getIndividuals(candidate));
        meaningful=tmp.size() != 0;
      }
 else {
        meaningful=!isDisjoint(df.getOWLObjectComplementOf(candidate),index);
      }
      if (meaningful) {
        candidates.add(candidate);
      }
 else {
        candidates.addAll(getClassCandidatesRecursive(index,candidate));
      }
    }
  }
  return candidates;
}
Program: 9390
Project: 9390
Buggy source:
private Set<OWLClass> getClassCandidatesRecursive(OWLClassExpression index,Set<OWLClass> existingClasses,OWLClassExpression upperClass){
  Set<OWLClass> candidates=new TreeSet<OWLClass>();
  for (  OWLClassExpression d : sh.getSubClasses(upperClass)) {
    if (!d.isOWLNothing()) {
      OWLClass candidate=d.asOWLClass();
      if (!isDisjoint(candidate,index) && checkSubClasses(existingClasses,candidate) && checkDisjoints(existingClasses,candidate)) {
        if (!isDisjoint(df.getOWLObjectComplementOf(candidate),index) && checkSuperClasses(existingClasses,candidate)) {
          candidates.add(candidate);
        }
 else {
          candidates.addAll(getClassCandidatesRecursive(index,existingClasses,candidate));
        }
      }
    }
  }
  return candidates;
}

Fixed version (ground truth):
private Set<OWLClass> getClassCandidatesRecursive(OWLClassExpression index,Set<OWLClass> existingClasses,OWLClassExpression upperClass){
  Set<OWLClass> candidates=new TreeSet<OWLClass>();
  for (  OWLClassExpression d : sh.getSubClasses(upperClass,true)) {
    if (!d.isOWLNothing()) {
      OWLClass candidate=d.asOWLClass();
      if (!isDisjoint(candidate,index) && checkSubClasses(existingClasses,candidate) && checkDisjoints(existingClasses,candidate)) {
        if (!isDisjoint(df.getOWLObjectComplementOf(candidate),index) && checkSuperClasses(existingClasses,candidate)) {
          candidates.add(candidate);
        }
 else {
          candidates.addAll(getClassCandidatesRecursive(index,existingClasses,candidate));
        }
      }
    }
  }
  return candidates;
}
Program: 9391
Project: 9391
Buggy source:
@Override public SortedSet<OWLClassExpression> getSuperClassesImpl(OWLClassExpression description){
  if (description.isAnonymous()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String query=String.format(SPARQLQueryUtils.SELECT_DIRECT_SUPERCLASS_OF_QUERY,description.asOWLClass().toStringID());
  ResultSet rs=executeSelectQuery(query);
  SortedSet<OWLClass> superClasses=asOWLEntities(EntityType.CLASS,rs,"String_Node_Str");
  superClasses.remove(description);
  return new TreeSet<OWLClassExpression>(superClasses);
}

Fixed version (ground truth):
@Override public SortedSet<OWLClassExpression> getSuperClassesImpl(OWLClassExpression description){
  if (description.isAnonymous()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String query=String.format(SPARQLQueryUtils.SELECT_DIRECT_SUPERCLASS_OF_QUERY,description.asOWLClass().toStringID());
  ResultSet rs=executeSelectQuery(query);
  SortedSet<OWLClass> superClasses=asOWLEntities(EntityType.CLASS,rs,"String_Node_Str");
  superClasses.remove(description);
  System.out.println("String_Node_Str" + description + "String_Node_Str"+ superClasses);
  return new TreeSet<OWLClassExpression>(superClasses);
}
Program: 9392
Project: 9392
Buggy source:
private void reset(){
  variables.clear();
  properties.clear();
  sparql="String_Node_Str";
  intersection=new HashMap<Integer,Boolean>();
  mapping.reset();
}

Fixed version (ground truth):
private void reset(){
  variables.clear();
  properties.clear();
  sparql="String_Node_Str";
  intersection=new HashMap<Integer,Boolean>();
  mapping.reset();
  cnt=1;
}
Program: 9393
Project: 9393
Buggy source:
@Override public SortedSet<T> getParents(T entity,boolean direct){
  SortedSet<T> result=hierarchyUp.get(entity);
  if (result == null) {
    logger.error("String_Node_Str" + entity + "String_Node_Str");
    return new TreeSet<T>();
  }
  result.remove(entity);
  if (!direct) {
    for (    T parent : result) {
      result.addAll(getParents(parent,direct));
    }
  }
  return new TreeSet<T>(result);
}

Fixed version (ground truth):
@Override public SortedSet<T> getParents(T entity,boolean direct){
  SortedSet<T> result=hierarchyUp.get(entity);
  if (result == null) {
    logger.error("String_Node_Str" + entity + "String_Node_Str");
    return new TreeSet<T>();
  }
  result.remove(entity);
  if (!direct) {
    SortedSet<T> tmp=new TreeSet<T>();
    for (    T parent : result) {
      tmp.addAll(getParents(parent,direct));
    }
    result.addAll(tmp);
  }
  return new TreeSet<T>(result);
}
Program: 9394
Project: 9394
Buggy source:
@Override public SortedSet<T> getChildren(T entity,boolean direct){
  SortedSet<T> result=hierarchyDown.get(entity);
  if (result == null) {
    logger.error("String_Node_Str" + entity + "String_Node_Str");
    return new TreeSet<T>();
  }
  result.remove(entity);
  if (!direct) {
    for (    T child : result) {
      result.addAll(getChildren(child,direct));
    }
  }
  return new TreeSet<T>(result);
}

Fixed version (ground truth):
@Override public SortedSet<T> getChildren(T entity,boolean direct){
  SortedSet<T> result=hierarchyDown.get(entity);
  if (result == null) {
    logger.error("String_Node_Str" + entity + "String_Node_Str");
    return new TreeSet<T>();
  }
  result.remove(entity);
  if (!direct) {
    SortedSet<T> tmp=new TreeSet<T>();
    for (    T child : result) {
      tmp.addAll(getChildren(child,direct));
    }
    result.addAll(tmp);
  }
  return new TreeSet<T>(result);
}
Program: 9395
Project: 9395
Buggy source:
/** 
 * @param cache a cache object
 * @param sparqlEndpoint the Endpoint the sparql queries will be send to
 */
public SPARQLTasks(final Cache cache,final SparqlEndpoint sparqlEndpoint){
  this.cache=cache;
  this.sparqlEndpoint=sparqlEndpoint;
  reasoner=new SPARQLReasoner(sparqlEndpoint,null);
}

Fixed version (ground truth):
/** 
 * @param cache a cache object
 * @param sparqlEndpoint the Endpoint the sparql queries will be send to
 */
public SPARQLTasks(final Cache cache,final SparqlEndpoint sparqlEndpoint){
  this.cache=cache;
  this.sparqlEndpoint=sparqlEndpoint;
  reasoner=new SPARQLReasoner(sparqlEndpoint);
}
Program: 9396
Project: 9396
Buggy source:
private boolean occursOnFirstLevel(OWLClassExpression description,OWLClassExpression cls){
  if (cls.isOWLThing()) {
    return false;
  }
  return description.containsConjunct(cls) || (description instanceof OWLObjectUnionOf && ((OWLObjectUnionOf)description).getOperands().contains(cls));
}

Fixed version (ground truth):
private boolean occursOnFirstLevel(OWLClassExpression description,OWLClassExpression cls){
  if (cls.isOWLThing()) {
    return false;
  }
  return (description instanceof OWLNaryBooleanClassExpression && ((OWLNaryBooleanClassExpression)description).getOperands().contains(cls));
}
Program: 9398
Project: 9398
Buggy source:
public static void main(String[] args) throws Exception {
  String ontologyPath="String_Node_Str";
  OWLOntologyManager man=OWLManager.createOWLOntologyManager();
  OWLOntology ontology=man.loadOntologyFromOntologyDocument(new File(ontologyPath));
  AbstractKnowledgeSource source=new OWLAPIOntology(ontology);
  source.init();
  AbstractReasonerComponent reasoner=new FastInstanceChecker(source);
  reasoner.init();
  ClassLearningProblem lp=new ClassLearningProblem(reasoner);
  lp.setClassToDescribe(new OWLClassImpl(IRI.create("String_Node_Str")));
  lp.init();
  AbstractCELA la=new CELOE(lp,reasoner);
  la.init();
  la.start();
  List<? extends EvaluatedDescription> currentlyBestEvaluatedDescriptions=la.getCurrentlyBestEvaluatedDescriptions(0.8);
  System.out.println(currentlyBestEvaluatedDescriptions);
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  ToStringRenderer.getInstance().setRenderer(new DLSyntaxObjectRenderer());
  String ontologyPath="String_Node_Str";
  OWLOntologyManager man=OWLManager.createOWLOntologyManager();
  OWLOntology ontology=man.loadOntologyFromOntologyDocument(new File(ontologyPath));
  AbstractKnowledgeSource source=new OWLAPIOntology(ontology);
  source.init();
  AbstractReasonerComponent reasoner=new ClosedWorldReasoner(source);
  reasoner.init();
  ClassLearningProblem lp=new ClassLearningProblem(reasoner);
  lp.setClassToDescribe(new OWLClassImpl(IRI.create("String_Node_Str")));
  lp.init();
  final AbstractCELA la=new CELOE(lp,reasoner);
  la.init();
  Timer timer=new Timer();
  timer.schedule(new TimerTask(){
    int progress=0;
    List<EvaluatedDescriptionClass> result;
    @Override public void run(){
      if (la.isRunning()) {
        System.out.println(la.getCurrentlyBestEvaluatedDescriptions());
      }
    }
  }
,1000,500);
  la.start();
  timer.cancel();
  List<? extends EvaluatedDescription> currentlyBestEvaluatedDescriptions=la.getCurrentlyBestEvaluatedDescriptions(0.8);
  System.out.println(currentlyBestEvaluatedDescriptions);
}
Program: 9401
Project: 9401
Buggy source:
public static Set<String> individualListToStringSet(List<OWLIndividual> individuals){
  Set<String> ret=new TreeSet<String>();
  for (  OWLIndividual ind : individuals) {
    ret.add(ind.toString());
  }
  return ret;
}

Fixed version (ground truth):
public static Set<String> individualListToStringSet(List<OWLIndividual> individuals){
  Set<String> ret=new TreeSet<String>();
  for (  OWLIndividual ind : individuals) {
    ret.add(ind.toStringID());
  }
  return ret;
}
Program: 9402
Project: 9402
Buggy source:
public static Set<String> individualSetToStringSet(Set<OWLIndividual> individuals){
  Set<String> ret=new TreeSet<String>();
  for (  OWLIndividual ind : individuals) {
    ret.add(ind.toString());
  }
  return ret;
}

Fixed version (ground truth):
public static Set<String> individualSetToStringSet(Set<OWLIndividual> individuals){
  Set<String> ret=new TreeSet<String>();
  for (  OWLIndividual ind : individuals) {
    ret.add(ind.toStringID());
  }
  return ret;
}
Program: 9404
Project: 9404
Buggy source:
private boolean occursOnFirstLevel(OWLClassExpression description,OWLClassExpression cls){
  return description.containsConjunct(cls) || (description instanceof OWLObjectUnionOf && ((OWLObjectUnionOf)description).getOperands().contains(cls));
}

Fixed version (ground truth):
private boolean occursOnFirstLevel(OWLClassExpression description,OWLClassExpression cls){
  if (cls.isOWLThing()) {
    return false;
  }
  return description.containsConjunct(cls) || (description instanceof OWLObjectUnionOf && ((OWLObjectUnionOf)description).getOperands().contains(cls));
}
Program: 9405
Project: 9405
Buggy source:
public ConfParserConfiguration(Resource source){
  try {
    if (!(source instanceof InputStreamResource)) {
      baseDir=source.getFile().getParentFile().toURI().toString();
    }
 else {
      baseDir=null;
    }
    parser=new ConfParser(source.getInputStream());
    parser.Start();
  }
 catch (  ParseException e) {
    throw new RuntimeException(e);
  }
catch (  IOException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
public ConfParserConfiguration(Resource source){
  try {
    if (!(source instanceof InputStreamResource)) {
      baseDir=source.getFile().getAbsoluteFile().getParentFile().toURI().toString();
    }
 else {
      baseDir=null;
    }
    parser=new ConfParser(source.getInputStream());
    parser.Start();
  }
 catch (  ParseException e) {
    throw new RuntimeException(e);
  }
catch (  IOException e) {
    throw new RuntimeException(e);
  }
}
Program: 9407
Project: 9407
Buggy source:
@Override public void init() throws ComponentInitException {
  allExamples=Helper.union(positiveExamples,negativeExamples);
  if (reasoner != null && !reasoner.getIndividuals().containsAll(allExamples)) {
    Set<OWLIndividual> missing=Helper.difference(allExamples,reasoner.getIndividuals());
    double percentage=(double)(missing.size() / allExamples.size());
    percentage=Math.round(percentage * 1000) / 1000;
    String str="String_Node_Str" + percentage + "String_Node_Str";
    str+=missing.toString();
    if (missing.size() == allExamples.size()) {
      throw new ComponentInitException(str);
    }
    if (percentage < 0.10) {
      logger.warn(str);
    }
 else {
      logger.error(str);
    }
  }
}

Fixed version (ground truth):
@Override public void init() throws ComponentInitException {
  if (positiveExamples.isEmpty()) {
    throw new ComponentInitException("String_Node_Str");
  }
  if (negativeExamples.isEmpty()) {
    logger.warn("String_Node_Str" + "String_Node_Str");
  }
  SetView<OWLIndividual> overlap=Sets.intersection(positiveExamples,negativeExamples);
  if (!overlap.isEmpty()) {
    logger.warn("String_Node_Str");
  }
  allExamples=Helper.union(positiveExamples,negativeExamples);
  if (reasoner != null && !reasoner.getIndividuals().containsAll(allExamples)) {
    Set<OWLIndividual> missing=Helper.difference(allExamples,reasoner.getIndividuals());
    double percentage=(double)(missing.size() / allExamples.size());
    percentage=Math.round(percentage * 1000) / 1000;
    String str="String_Node_Str" + percentage + "String_Node_Str";
    str+=missing.toString();
    if (missing.size() == allExamples.size()) {
      throw new ComponentInitException(str);
    }
    if (percentage < 0.10) {
      logger.warn(str);
    }
 else {
      logger.error(str);
    }
  }
}
Program: 9408
Project: 9408
Buggy source:
@Autowired(required=false) public void setOperator(RhoDRDown operator){
  this.operator=operator;
}

Fixed version (ground truth):
@Autowired(required=false) public void setOperator(LengthLimitedRefinementOperator operator){
  this.operator=operator;
}
Program: 9409
Project: 9409
Buggy source:
public RhoDRDown getOperator(){
  return operator;
}

Fixed version (ground truth):
public LengthLimitedRefinementOperator getOperator(){
  return operator;
}
Program: 9411
Project: 9411
Buggy source:
public RhoDRDown getRefinementOperator(){
  return operator;
}

Fixed version (ground truth):
public LengthLimitedRefinementOperator getRefinementOperator(){
  return operator;
}
Program: 9412
Project: 9412
Buggy source:
protected <T extends Number & Comparable<Number>>Map<OWLIndividual,SortedSet<T>> getNumericDatatypeMembersImpl(OWLDataProperty datatypeProperty) throws ReasoningMethodUnsupportedException {
  Map<OWLIndividual,SortedSet<OWLLiteral>> mapping=getDatatypeMembersImpl(datatypeProperty);
  Map<OWLIndividual,SortedSet<T>> ret=new TreeMap<OWLIndividual,SortedSet<T>>();
  for (  Entry<OWLIndividual,SortedSet<OWLLiteral>> e : mapping.entrySet()) {
    SortedSet<OWLLiteral> values=e.getValue();
    SortedSet<T> numericValues=new TreeSet<T>();
    for (    OWLLiteral lit : values) {
      try {
        numericValues.add((T)numberFormat.parse(lit.getLiteral()));
      }
 catch (      ParseException e1) {
        e1.printStackTrace();
      }
    }
    ret.put(e.getKey(),numericValues);
  }
  return ret;
}

Fixed version (ground truth):
protected <T extends Number & Comparable<Number>>Map<OWLIndividual,SortedSet<T>> getNumericDatatypeMembersImpl(OWLDataProperty datatypeProperty) throws ReasoningMethodUnsupportedException {
  Map<OWLIndividual,SortedSet<OWLLiteral>> mapping=getDatatypeMembersImpl(datatypeProperty);
  Map<OWLIndividual,SortedSet<T>> ret=new TreeMap<OWLIndividual,SortedSet<T>>();
  for (  Entry<OWLIndividual,SortedSet<OWLLiteral>> entry : mapping.entrySet()) {
    OWLIndividual ind=entry.getKey();
    SortedSet<OWLLiteral> values=entry.getValue();
    SortedSet<T> numericValues=new TreeSet<T>();
    for (    OWLLiteral lit : values) {
      try {
        Number number=numberFormat.parse(lit.getLiteral());
        if (number instanceof Long) {
          number=Double.valueOf(number.toString());
        }
        numericValues.add((T)(number));
      }
 catch (      ParseException e) {
        e.printStackTrace();
      }
    }
    ret.put(ind,numericValues);
  }
  return ret;
}
Program: 9413
Project: 9413
Buggy source:
@Override public void setAsText(String s) throws IllegalArgumentException {
  ManchesterOWLSyntaxParser parser=OWLManager.createManchesterParser();
  parser.setStringToParse(s);
  try {
    description=parser.parseClassExpression();
  }
 catch (  Exception e) {
    throw new IllegalArgumentException(e);
  }
}

Fixed version (ground truth):
@Override public void setAsText(String s) throws IllegalArgumentException {
  description=new OWLClassImpl(IRI.create(s));
}
Program: 9416
Project: 9416
Buggy source:
/** 
 * Returns all triple patterns in given SPARQL query that have the given node either in subject or in object position, i.e.  the ingoing and outgoing triple patterns.
 * @param query The SPARQL query.
 * @param node
 * @return
 */
public Set<Triple> extractNonOptionalTriplePatterns(Query query,Node node){
  Set<Triple> triplePatterns=new HashSet<Triple>();
  triplePatterns.addAll(extractIngoingTriplePatterns(query,node));
  triplePatterns.addAll(extractOutgoingTriplePatterns(query,node));
  triplePatterns.removeAll(optionalTriplePattern);
  return triplePatterns;
}

Fixed version (ground truth):
/** 
 * Returns all triple patterns in given SPARQL query that have the given node either in subject or in object position, i.e.  the incoming and outgoing triple patterns.
 * @param query The SPARQL query.
 * @param node
 * @return
 */
public Set<Triple> extractNonOptionalTriplePatterns(Query query,Node node){
  Set<Triple> triplePatterns=new HashSet<Triple>();
  triplePatterns.addAll(extractIngoingTriplePatterns(query,node));
  triplePatterns.addAll(extractOutgoingTriplePatterns(query,node));
  triplePatterns.removeAll(optionalTriplePattern);
  return triplePatterns;
}
Program: 9417
Project: 9417
Buggy source:
private double precision(String referenceSparqlQuery,String learnedSPARQLQuery){
  List<String> referenceResources=getResult(referenceSparqlQuery);
  if (referenceResources.isEmpty()) {
    logger.error("String_Node_Str" + referenceSparqlQuery);
    return 0;
  }
  List<String> learnedResources=getResultSplitted(learnedSPARQLQuery);
  System.err.println(learnedSPARQLQuery);
  if (learnedResources.isEmpty()) {
    logger.error("String_Node_Str" + learnedSPARQLQuery);
    System.err.println(learnedSPARQLQuery);
    return 0;
  }
  int overlap=Sets.intersection(Sets.newHashSet(referenceResources),Sets.newHashSet(learnedResources)).size();
  double precision=overlap / (double)learnedResources.size();
  return precision;
}

Fixed version (ground truth):
private double precision(String referenceSparqlQuery,String learnedSPARQLQuery){
  List<String> referenceResources=getResult(referenceSparqlQuery);
  if (referenceResources.isEmpty()) {
    logger.error("String_Node_Str" + referenceSparqlQuery);
    return 0;
  }
  List<String> learnedResources=getResultSplitted(learnedSPARQLQuery);
  if (learnedResources.isEmpty()) {
    logger.error("String_Node_Str" + learnedSPARQLQuery);
    System.err.println(learnedSPARQLQuery);
    return 0;
  }
  int overlap=Sets.intersection(Sets.newHashSet(referenceResources),Sets.newHashSet(learnedResources)).size();
  double precision=overlap / (double)learnedResources.size();
  return precision;
}
Program: 9419
Project: 9419
Buggy source:
private void filterOutGeneralTypes(Multimap<Var,Triple> var2Triples){
  for (  Var var : var2Triples.keySet()) {
    Collection<Triple> triples=var2Triples.get(var);
    Set<Node> types2Remove=new HashSet<>();
    for (    Triple triple : triples) {
      if (triple.getPredicate().matches(RDF.type.asNode()) && triple.getObject().isURI()) {
        types2Remove.addAll(getSuperClasses(triple.getObject()));
      }
    }
    for (Iterator<Triple> iterator=triples.iterator(); iterator.hasNext(); ) {
      Triple triple=iterator.next();
      if (triple.getPredicate().matches(RDF.type.asNode()) && types2Remove.contains(triple.getObject())) {
        iterator.remove();
      }
    }
  }
}

Fixed version (ground truth):
private void filterOutGeneralTypes(Multimap<Var,Triple> var2Triples){
  for (  Var subject : var2Triples.keySet()) {
    Collection<Triple> triplePatterns=var2Triples.get(subject);
    Collection<Triple> triplesPatterns2Remove=new HashSet<Triple>();
    for (    Triple tp : triplePatterns) {
      if (tp.getObject().isURI() && !triplesPatterns2Remove.contains(tp)) {
        Set<Node> superClasses=getSuperClasses(tp.getObject());
        triplesPatterns2Remove.addAll(triplePatterns.stream().filter(t -> superClasses.contains(t.getObject())).collect(Collectors.toSet()));
      }
    }
    triplePatterns.removeAll(triplesPatterns2Remove);
  }
}
Program: 9422
Project: 9422
Buggy source:
protected Set<OWLDataProperty> getNumericDataPropertiesImpl() throws ReasoningMethodUnsupportedException {
  return getIntDatatypePropertiesImpl();
}

Fixed version (ground truth):
protected Set<OWLDataProperty> getNumericDataPropertiesImpl() throws ReasoningMethodUnsupportedException {
  return Sets.union(getIntDatatypePropertiesImpl(),getDoubleDatatypePropertiesImpl());
}
Program: 9427
Project: 9427
Buggy source:
@Override public OWLClassExpression getDomainImpl(OWLDataProperty datatypeProperty){
  NodeSet<OWLClass> nodeSet=reasoner.getDataPropertyDomains(datatypeProperty,true);
  OWLClassExpression domain=asIntersection(nodeSet);
  logger.trace("String_Node_Str" + datatypeProperty + "String_Node_Str"+ domain+ "String_Node_Str");
  return domain;
}

Fixed version (ground truth):
@Override public OWLClassExpression getDomainImpl(OWLDataProperty dataProperty){
  Set<OWLClassExpression> domains=new HashSet<OWLClassExpression>();
  domains.addAll(EntitySearcher.getDomains(dataProperty,ontology));
  NodeSet<OWLDataProperty> superProperties=reasoner.getSuperDataProperties(dataProperty,false);
  for (  OWLDataProperty supProp : superProperties.getFlattened()) {
    domains.addAll(EntitySearcher.getDomains(supProp,ontology));
  }
  NodeSet<OWLClass> nodeSet=reasoner.getDataPropertyDomains(dataProperty,true);
  domains.addAll(nodeSet.getFlattened());
  domains.remove(df.getOWLThing());
  OWLClassExpression domain;
  if (domains.size() > 1) {
    domain=df.getOWLObjectIntersectionOf(domains);
    domain=minimizer.minimize(domain);
  }
 else   if (domains.size() == 1) {
    domain=domains.iterator().next();
  }
 else {
    domain=df.getOWLThing();
  }
  logger.trace("String_Node_Str",dataProperty,domain);
  return domain;
}
Program: 9428
Project: 9428
Buggy source:
private void computeMgrRecursive(OWLClass domain,Set<OWLObjectProperty> currProperties,Set<OWLObjectProperty> mgrTmp){
  for (  OWLObjectProperty prop : currProperties) {
    if (appOP.get(domain).contains(prop))     mgrTmp.add(prop);
 else     computeMgrRecursive(domain,reasoner.getSubProperties(prop),mgrTmp);
  }
}

Fixed version (ground truth):
private void computeMgrRecursive(OWLClassExpression domain,Set<OWLObjectProperty> currProperties,Set<OWLObjectProperty> mgrTmp){
  for (  OWLObjectProperty prop : currProperties) {
    if (appOP.get(domain).contains(prop))     mgrTmp.add(prop);
 else     computeMgrRecursive(domain,reasoner.getSubProperties(prop),mgrTmp);
  }
}
Program: 9429
Project: 9429
Buggy source:
public SortedSet<OWLClassExpression> getNegClassCandidates(OWLClass index){
  return getNegClassCandidatesRecursive(index,df.getOWLNothing());
}

Fixed version (ground truth):
public SortedSet<OWLClassExpression> getNegClassCandidates(OWLClassExpression index){
  return getNegClassCandidatesRecursive(index,df.getOWLNothing());
}
Program: 9432
Project: 9432
Buggy source:
public SortedSet<OWLClassExpression> getClassCandidates(OWLClass index){
  return getClassCandidatesRecursive(index,df.getOWLThing());
}

Fixed version (ground truth):
public SortedSet<OWLClassExpression> getClassCandidates(OWLClassExpression index){
  return getClassCandidatesRecursive(index,df.getOWLThing());
}
Program: 9434
Project: 9434
Buggy source:
private void computeMostGeneralNumericDPRecursive(OWLClass domain,Set<OWLDataProperty> currProperties,Set<OWLDataProperty> mgddTmp){
  for (  OWLDataProperty prop : currProperties) {
    if (appNumeric.get(domain).contains(prop))     mgddTmp.add(prop);
 else     computeMostGeneralNumericDPRecursive(domain,reasoner.getSubProperties(prop),mgddTmp);
  }
}

Fixed version (ground truth):
private void computeMostGeneralNumericDPRecursive(OWLClassExpression domain,Set<OWLDataProperty> currProperties,Set<OWLDataProperty> mgddTmp){
  for (  OWLDataProperty prop : currProperties) {
    if (appNumeric.get(domain).contains(prop))     mgddTmp.add(prop);
 else     computeMostGeneralNumericDPRecursive(domain,reasoner.getSubProperties(prop),mgddTmp);
  }
}
Program: 9435
Project: 9435
Buggy source:
private void computeMgbdRecursive(OWLClass domain,Set<OWLDataProperty> currProperties,Set<OWLDataProperty> mgbdTmp){
  for (  OWLDataProperty prop : currProperties) {
    if (appBD.get(domain).contains(prop))     mgbdTmp.add(prop);
 else     computeMgbdRecursive(domain,reasoner.getSubProperties(prop),mgbdTmp);
  }
}

Fixed version (ground truth):
private void computeMgbdRecursive(OWLClassExpression domain,Set<OWLDataProperty> currProperties,Set<OWLDataProperty> mgbdTmp){
  for (  OWLDataProperty prop : currProperties) {
    if (appBD.get(domain).contains(prop))     mgbdTmp.add(prop);
 else     computeMgbdRecursive(domain,reasoner.getSubProperties(prop),mgbdTmp);
  }
}
Program: 9436
Project: 9436
Buggy source:
private void computeMostGeneralStringDPRecursive(OWLClass domain,Set<OWLDataProperty> currProperties,Set<OWLDataProperty> mgddTmp){
  for (  OWLDataProperty prop : currProperties) {
    if (appSD.get(domain).contains(prop))     mgddTmp.add(prop);
 else     computeMostGeneralStringDPRecursive(domain,reasoner.getSubProperties(prop),mgddTmp);
  }
}

Fixed version (ground truth):
private void computeMostGeneralStringDPRecursive(OWLClassExpression domain,Set<OWLDataProperty> currProperties,Set<OWLDataProperty> mgddTmp){
  for (  OWLDataProperty prop : currProperties) {
    if (appSD.get(domain).contains(prop))     mgddTmp.add(prop);
 else     computeMostGeneralStringDPRecursive(domain,reasoner.getSubProperties(prop),mgddTmp);
  }
}
Program: 9438
Project: 9438
Buggy source:
private void computeMg(OWLClass domain){
  if (appOP.get(domain) == null)   computeApp(domain);
  mgr.put(domain,new TreeSet<OWLObjectProperty>());
  mgbd.put(domain,new TreeSet<OWLDataProperty>());
  mgNumeric.put(domain,new TreeSet<OWLDataProperty>());
  mgsd.put(domain,new TreeSet<OWLDataProperty>());
  SortedSet<OWLObjectProperty> mostGeneral=reasoner.getMostGeneralProperties();
  computeMgrRecursive(domain,mostGeneral,mgr.get(domain));
  SortedSet<OWLDataProperty> mostGeneralDP=reasoner.getMostGeneralDatatypeProperties();
  Set<OWLDataProperty> mostGeneralBDP=Helper.intersection(mostGeneralDP,reasoner.getBooleanDatatypeProperties());
  Set<OWLDataProperty> mostGeneralNumericDPs=Helper.intersection(mostGeneralDP,reasoner.getNumericDataProperties());
  Set<OWLDataProperty> mostGeneralStringDPs=Helper.intersection(mostGeneralDP,reasoner.getStringDatatypeProperties());
  computeMgbdRecursive(domain,mostGeneralBDP,mgbd.get(domain));
  computeMostGeneralNumericDPRecursive(domain,mostGeneralNumericDPs,mgNumeric.get(domain));
  computeMostGeneralStringDPRecursive(domain,mostGeneralStringDPs,mgsd.get(domain));
}

Fixed version (ground truth):
private void computeMg(OWLClassExpression domain){
  if (appOP.get(domain) == null)   computeApp(domain);
  mgr.put(domain,new TreeSet<OWLObjectProperty>());
  mgbd.put(domain,new TreeSet<OWLDataProperty>());
  mgNumeric.put(domain,new TreeSet<OWLDataProperty>());
  mgsd.put(domain,new TreeSet<OWLDataProperty>());
  SortedSet<OWLObjectProperty> mostGeneral=reasoner.getMostGeneralProperties();
  computeMgrRecursive(domain,mostGeneral,mgr.get(domain));
  SortedSet<OWLDataProperty> mostGeneralDP=reasoner.getMostGeneralDatatypeProperties();
  Set<OWLDataProperty> mostGeneralBDP=Helper.intersection(mostGeneralDP,reasoner.getBooleanDatatypeProperties());
  Set<OWLDataProperty> mostGeneralNumericDPs=Helper.intersection(mostGeneralDP,reasoner.getNumericDataProperties());
  Set<OWLDataProperty> mostGeneralStringDPs=Helper.intersection(mostGeneralDP,reasoner.getStringDatatypeProperties());
  computeMgbdRecursive(domain,mostGeneralBDP,mgbd.get(domain));
  computeMostGeneralNumericDPRecursive(domain,mostGeneralNumericDPs,mgNumeric.get(domain));
  computeMostGeneralStringDPRecursive(domain,mostGeneralStringDPs,mgsd.get(domain));
}
Program: 9439
Project: 9439
Buggy source:
private int getLength(EvaluatedDescription ed){
  int length=0;
  OWLClassExpression d=ed.getDescription();
  if (d instanceof OWLNaryBooleanClassExpression) {
    for (    OWLClassExpression child : ((OWLNaryBooleanClassExpression)d).getOperands()) {
      if (child instanceof OWLObjectSomeValuesFrom && ((OWLObjectSomeValuesFrom)child).getProperty().asOWLObjectProperty() == OWLPunningDetector.punningProperty) {
        length+=OWLClassExpressionUtils.getLength(((OWLObjectSomeValuesFrom)child).getFiller());
      }
 else {
        length+=OWLClassExpressionUtils.getLength(child);
      }
    }
  }
  return length;
}

Fixed version (ground truth):
private int getLength(EvaluatedDescription ed){
  int length=0;
  OWLClassExpression ce=ed.getDescription();
  if (ce instanceof OWLNaryBooleanClassExpression) {
    Set<OWLClassExpression> operands=((OWLNaryBooleanClassExpression)ce).getOperands();
    for (    OWLClassExpression child : operands) {
      if (child instanceof OWLObjectSomeValuesFrom && ((OWLObjectSomeValuesFrom)child).getProperty().asOWLObjectProperty() == OWLPunningDetector.punningProperty) {
        length+=OWLClassExpressionUtils.getLength(((OWLObjectSomeValuesFrom)child).getFiller());
      }
 else {
        length+=OWLClassExpressionUtils.getLength(child);
      }
    }
    length+=operands.size() - 1;
  }
 else {
    length=OWLClassExpressionUtils.getLength(ce);
  }
  return length;
}
Program: 9440
Project: 9440
Buggy source:
public void setHeuristic(HeuristicType heuristic){
  this.heuristic=heuristic;
}

Fixed version (ground truth):
public void setHeuristic(HeuristicType heuristic){
  this.heuristic=heuristic;
  if (heuristic == HeuristicType.AMEASURE) {
    accuracyMethod="String_Node_Str";
  }
 else   if (heuristic == HeuristicType.FMEASURE) {
    accuracyMethod="String_Node_Str";
  }
 else   if (heuristic == HeuristicType.GEN_FMEASURE) {
    accuracyMethod="String_Node_Str";
  }
 else   if (heuristic == HeuristicType.JACCARD) {
    accuracyMethod="String_Node_Str";
  }
 else   if (heuristic == HeuristicType.PRED_ACC) {
    accuracyMethod="String_Node_Str";
  }
}
Program: 9441
Project: 9441
Buggy source:
public double getPredAccuracyOrTooWeakExact(Description description,double noise){
  int maxNotCovered=(int)Math.ceil(noise * positiveExamples.size());
  int notCoveredPos=0;
  int notCoveredNeg=0;
  for (  Individual example : positiveExamples) {
    if (!getReasoner().hasType(description,example)) {
      notCoveredPos++;
      if (notCoveredPos >= maxNotCovered) {
        System.out.println(description + "String_Node_Str" + notCoveredPos+ "String_Node_Str"+ (negativeExamples.size() - notCoveredNeg));
        return -1;
      }
    }
  }
  for (  Individual example : negativeExamples) {
    if (!getReasoner().hasType(description,example)) {
      notCoveredNeg++;
    }
  }
  System.out.println(description + "String_Node_Str" + notCoveredPos+ "String_Node_Str"+ (negativeExamples.size() - notCoveredNeg));
  return (positiveExamples.size() - notCoveredPos + notCoveredNeg) / (double)allExamples.size();
}

Fixed version (ground truth):
public double getPredAccuracyOrTooWeakExact(Description description,double noise){
  int maxNotCovered=(int)Math.ceil(noise * positiveExamples.size());
  int notCoveredPos=0;
  int notCoveredNeg=0;
  for (  Individual example : positiveExamples) {
    if (!getReasoner().hasType(description,example)) {
      notCoveredPos++;
      if (notCoveredPos >= maxNotCovered) {
        return -1;
      }
    }
  }
  for (  Individual example : negativeExamples) {
    if (!getReasoner().hasType(description,example)) {
      notCoveredNeg++;
    }
  }
  return (positiveExamples.size() - notCoveredPos + notCoveredNeg) / (double)allExamples.size();
}
Program: 9445
Project: 9445
Buggy source:
public static void main(String[] args) throws Exception {
  OWLOntologyManager man=OWLManager.createOWLOntologyManager();
  OWLDataFactory factory=man.getOWLDataFactory();
  logger.info("String_Node_Str");
  OWLOntology ontology=man.loadOntologyFromOntologyDocument(new File(dumpFilePath));
  logger.info("String_Node_Str");
  OWLAxiomCBDGenerator cbdGenartor=new OWLAxiomCBDGenerator(ontology);
  OWLOntology cbdOnt=man.createOntology();
  for (  String uri : exampleUris) {
    logger.info("String_Node_Str" + uri + "String_Node_Str");
    Set<OWLAxiom> cbdAxioms=cbdGenartor.getCBD(factory.getOWLNamedIndividual(IRI.create(uri)),cbdDepth);
    logger.info("String_Node_Str");
    man.addAxioms(cbdOnt,cbdAxioms);
    logger.info("String_Node_Str");
  }
  man.saveOntology(cbdOnt,new RDFXMLOntologyFormat(),new FileOutputStream(new File(cbdFilePath)));
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  OWLOntologyManager man=OWLManager.createOWLOntologyManager();
  OWLDataFactory factory=man.getOWLDataFactory();
  logger.info("String_Node_Str");
  OWLOntology ontology=man.loadOntologyFromOntologyDocument(new File(dumpFilePath));
  logger.info("String_Node_Str");
  OWLAxiomCBDGenerator cbdGenartor=new OWLAxiomCBDGenerator(ontology);
  cbdGenartor.setFetchCompleteRelatedTBox(true);
  OWLOntology cbdOnt=man.createOntology();
  for (  String uri : exampleUris) {
    logger.info("String_Node_Str" + uri + "String_Node_Str");
    Set<OWLAxiom> cbdAxioms=cbdGenartor.getCBD(factory.getOWLNamedIndividual(IRI.create(uri)),cbdDepth);
    logger.info("String_Node_Str",cbdAxioms.size());
    man.addAxioms(cbdOnt,cbdAxioms);
    logger.info("String_Node_Str");
  }
  man.saveOntology(cbdOnt,new RDFXMLOntologyFormat(),new FileOutputStream(new File(cbdFilePath)));
}
Program: 9446
Project: 9446
Buggy source:
private void computeSuperClasses(OWLClass cls){
  String s="String_Node_Str";
  for (int i=0; i < indent; i++) {
    s+="String_Node_Str";
  }
  indent++;
  Set<OWLClassExpression> superClasses=new HashSet<OWLClassExpression>();
  superClasses.add(cls);
  Set<OWLClassExpression> superClassExpressions=cls.getSuperClasses(ontology);
  superClassExpressions.remove(cls);
  for (  OWLClassExpression sup : superClassExpressions) {
    sup.accept(this);
    superClasses.addAll(stack.pop());
  }
  stack.push(superClasses);
  map.put(cls,superClasses);
}

Fixed version (ground truth):
private void computeSuperClasses(OWLClass cls){
  visited.add(cls);
  String s="String_Node_Str";
  for (int i=0; i < indent; i++) {
    s+="String_Node_Str";
  }
  indent++;
  Set<OWLClassExpression> superClasses=new HashSet<OWLClassExpression>();
  superClasses.add(cls);
  Set<OWLClassExpression> superClassExpressions=cls.getSuperClasses(ontology);
  superClassExpressions.remove(cls);
  for (  OWLClassExpression sup : superClassExpressions) {
    if (!visited.contains(sup)) {
      sup.accept(this);
      superClasses.addAll(stack.pop());
    }
 else {
      LOGGER.warn("String_Node_Str" + sup + "String_Node_Str"+ visited);
    }
  }
  stack.push(superClasses);
  map.put(cls,superClasses);
}
Program: 9447
Project: 9447
Buggy source:
public static void main(String[] args) throws Exception {
  ToStringRenderer.getInstance().setRenderer(new DLSyntaxObjectRenderer());
  String s="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  OWLOntologyManager man=OWLManager.createOWLOntologyManager();
  OWLOntology ontology=man.loadOntologyFromOntologyDocument(new ByteArrayInputStream(s.getBytes()));
  ExistentialRestrictionMaterialization mat=new ExistentialRestrictionMaterialization(ontology);
  Set<OWLClassExpression> superClassExpressions=mat.materialize("String_Node_Str");
  for (  OWLClassExpression sup : superClassExpressions) {
    System.out.println(sup);
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  ToStringRenderer.getInstance().setRenderer(new DLSyntaxObjectRenderer());
  String s="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  OWLOntologyManager man=OWLManager.createOWLOntologyManager();
  OWLOntology ontology=man.loadOntologyFromOntologyDocument(new ByteArrayInputStream(s.getBytes()));
  ExistentialRestrictionMaterialization mat=new ExistentialRestrictionMaterialization(ontology);
  Set<OWLClassExpression> superClassExpressions=mat.materialize("String_Node_Str");
  for (  OWLClassExpression sup : superClassExpressions) {
    System.out.println(sup);
  }
}
Program: 9448
Project: 9448
Buggy source:
private void computeSuperClasses(OWLClass cls){
  visited.add(cls);
  String s="String_Node_Str";
  for (int i=0; i < indent; i++) {
    s+="String_Node_Str";
  }
  indent++;
  Set<OWLClassExpression> superClasses=new HashSet<OWLClassExpression>();
  superClasses.add(cls);
  Set<OWLClassExpression> superClassExpressions=cls.getSuperClasses(ontology);
  superClassExpressions.remove(cls);
  for (  OWLClassExpression sup : superClassExpressions) {
    if (!visited.contains(sup)) {
      sup.accept(this);
      superClasses.addAll(stack.pop());
    }
 else {
      LOGGER.warn("String_Node_Str" + sup + "String_Node_Str"+ visited);
    }
  }
  stack.push(superClasses);
  map.put(cls,superClasses);
}

Fixed version (ground truth):
private void computeSuperClasses(OWLClass cls){
  visitedClassExpressions.add(cls);
  String s="String_Node_Str";
  for (int i=0; i < indent; i++) {
    s+="String_Node_Str";
  }
  indent++;
  Set<OWLClassExpression> superClasses=new HashSet<OWLClassExpression>();
  superClasses.add(cls);
  Set<OWLClassExpression> superClassExpressions=cls.getSuperClasses(ontology);
  superClassExpressions.remove(cls);
  for (  OWLClassExpression sup : superClassExpressions) {
    if (!visitedClassExpressions.contains(sup)) {
      visitedClassExpressions.add(sup);
      sup.accept(this);
      superClasses.addAll(stack.pop());
    }
 else {
    }
  }
  stack.push(superClasses);
  map.put(cls,superClasses);
}
Program: 9449
Project: 9449
Buggy source:
public Set<OWLClassExpression> getSuperClasses(OWLClass cls){
  map.clear();
  computeSuperClasses(cls);
  Set<OWLClassExpression> superClasses=map.get(cls);
  superClasses.remove(cls);
  if (onlyIfExistentialOnPath) {
    for (Iterator<OWLClassExpression> iterator=superClasses.iterator(); iterator.hasNext(); ) {
      OWLClassExpression sup=iterator.next();
      if (!(sup instanceof OWLObjectSomeValuesFrom || sup instanceof OWLDataAllValuesFrom)) {
        iterator.remove();
      }
    }
  }
  return superClasses;
}

Fixed version (ground truth):
public Set<OWLClassExpression> getSuperClasses(OWLClass cls){
  visitedClassExpressions=new HashSet<>();
  map.clear();
  computeSuperClasses(cls);
  Set<OWLClassExpression> superClasses=map.get(cls);
  superClasses.remove(cls);
  if (onlyIfExistentialOnPath) {
    for (Iterator<OWLClassExpression> iterator=superClasses.iterator(); iterator.hasNext(); ) {
      OWLClassExpression sup=iterator.next();
      if (!(sup instanceof OWLObjectSomeValuesFrom || sup instanceof OWLDataAllValuesFrom)) {
        iterator.remove();
      }
    }
  }
  return superClasses;
}
Program: 9451
Project: 9451
Buggy source:
@Override public void start(){
  logger.info("String_Node_Str");
  startTime=System.currentTimeMillis();
  fetchedRows=0;
  currentlyBestAxioms=new TreeSet<EvaluatedAxiom<T>>();
  if (returnOnlyNewAxioms) {
    getExistingAxioms();
  }
  learnAxioms();
  logger.info("String_Node_Str",(System.currentTimeMillis() - startTime));
}

Fixed version (ground truth):
@Override public void start(){
  logger.info("String_Node_Str");
  startTime=System.currentTimeMillis();
  fetchedRows=0;
  currentlyBestAxioms=new TreeSet<EvaluatedAxiom<T>>();
  if (returnOnlyNewAxioms) {
    getExistingAxioms();
  }
  learnAxioms();
  logger.info("String_Node_Str",(System.currentTimeMillis() - startTime));
  logger.info("String_Node_Str" + currentlyBestAxioms.size() + "String_Node_Str");
  if (!currentlyBestAxioms.isEmpty()) {
    logger.info("String_Node_Str" + currentlyBestAxioms.first());
  }
}
Program: 9452
Project: 9452
Buggy source:
public void testEquivalentObjectPropertiesAxiomLearning() throws Exception {
  EquivalentObjectPropertyAxiomLearner l=new EquivalentObjectPropertyAxiomLearner(ks);
  l.setMaxExecutionTimeInSeconds(maxExecutionTimeInSeconds);
  l.setPropertyToDescribe(op1);
  l.init();
  l.start();
  EvaluatedAxiom<OWLEquivalentObjectPropertiesAxiom> evAxiom=l.getCurrentlyBestEvaluatedAxiom();
  System.out.println(evAxiom);
  double actualScore=evAxiom.getScore().getAccuracy();
  int cntOp1=130;
  int cntOp2=70;
  int cntOp1_Op2=60;
  double beta=1.0;
  double precision=Heuristics.getConfidenceInterval95WaldAverage(cntOp2,cntOp1_Op2);
  double recall=Heuristics.getConfidenceInterval95WaldAverage(cntOp1,cntOp1_Op2);
  double expectedScore=Heuristics.getFScore(recall,precision,beta);
  assertEquals("String_Node_Str",expectedScore,actualScore,0d);
}

Fixed version (ground truth):
public void testEquivalentObjectPropertiesAxiomLearning() throws Exception {
  EquivalentObjectPropertyAxiomLearner l=new EquivalentObjectPropertyAxiomLearner(ks);
  l.setMaxExecutionTimeInSeconds(maxExecutionTimeInSeconds);
  l.setEntityToDescribe(op1);
  l.init();
  l.start();
  EvaluatedAxiom<OWLEquivalentObjectPropertiesAxiom> evAxiom=l.getCurrentlyBestEvaluatedAxiom();
  System.out.println(evAxiom);
  double actualScore=evAxiom.getScore().getAccuracy();
  int cntOp1=130;
  int cntOp2=70;
  int cntOp1_Op2=60;
  double beta=1.0;
  double precision=Heuristics.getConfidenceInterval95WaldAverage(cntOp2,cntOp1_Op2);
  double recall=Heuristics.getConfidenceInterval95WaldAverage(cntOp1,cntOp1_Op2);
  double expectedScore=Heuristics.getFScore(recall,precision,beta);
  assertEquals("String_Node_Str",expectedScore,actualScore,0d);
}
Program: 9453
Project: 9453
Buggy source:
public void testReflexivePropertyAxiomLearning() throws Exception {
  ReflexiveObjectPropertyAxiomLearner l=new ReflexiveObjectPropertyAxiomLearner(ks);
  l.setMaxExecutionTimeInSeconds(maxExecutionTimeInSeconds);
  l.setPropertyToDescribe(reflexive);
  l.init();
  l.start();
  System.out.println(l.getCurrentlyBestEvaluatedAxioms(nrOfAxioms));
}

Fixed version (ground truth):
public void testReflexivePropertyAxiomLearning() throws Exception {
  ReflexiveObjectPropertyAxiomLearner l=new ReflexiveObjectPropertyAxiomLearner(ks);
  l.setMaxExecutionTimeInSeconds(maxExecutionTimeInSeconds);
  l.setEntityToDescribe(reflexive);
  l.init();
  l.start();
  System.out.println(l.getCurrentlyBestEvaluatedAxioms(nrOfAxioms));
}
Program: 9454
Project: 9454
Buggy source:
public void testPropertyRangeAxiomLearning() throws Exception {
  ObjectPropertyRangeAxiomLearner l=new ObjectPropertyRangeAxiomLearner(ks);
  l.setMaxExecutionTimeInSeconds(maxExecutionTimeInSeconds);
  l.setPropertyToDescribe(range);
  l.init();
  l.start();
  System.out.println(l.getCurrentlyBestEvaluatedAxioms(nrOfAxioms));
}

Fixed version (ground truth):
public void testPropertyRangeAxiomLearning() throws Exception {
  ObjectPropertyRangeAxiomLearner l=new ObjectPropertyRangeAxiomLearner(ks);
  l.setMaxExecutionTimeInSeconds(maxExecutionTimeInSeconds);
  l.setEntityToDescribe(range);
  l.init();
  l.start();
  System.out.println(l.getCurrentlyBestEvaluatedAxioms(nrOfAxioms));
}
Program: 9455
Project: 9455
Buggy source:
public void testSubPropertyOfAxiomLearning() throws Exception {
  SubObjectPropertyOfAxiomLearner l=new SubObjectPropertyOfAxiomLearner(ks);
  l.setMaxExecutionTimeInSeconds(maxExecutionTimeInSeconds);
  l.setPropertyToDescribe(op1);
  l.init();
  l.start();
  EvaluatedAxiom<OWLSubObjectPropertyOfAxiom> evAxiom=l.getCurrentlyBestEvaluatedAxiom();
  System.out.println(evAxiom);
  double actualScore=evAxiom.getScore().getAccuracy();
  int cntOp1=130;
  int cntOp2=70;
  int cntOp1_Op2=60;
  double beta=3.0;
  double precision=Heuristics.getConfidenceInterval95WaldAverage(cntOp2,cntOp1_Op2);
  double recall=Heuristics.getConfidenceInterval95WaldAverage(cntOp1,cntOp1_Op2);
  double expectedScore=Heuristics.getFScore(recall,precision,beta);
  assertEquals("String_Node_Str",expectedScore,actualScore,0d);
}

Fixed version (ground truth):
public void testSubPropertyOfAxiomLearning() throws Exception {
  SubObjectPropertyOfAxiomLearner l=new SubObjectPropertyOfAxiomLearner(ks);
  l.setMaxExecutionTimeInSeconds(maxExecutionTimeInSeconds);
  l.setEntityToDescribe(op1);
  l.init();
  l.start();
  EvaluatedAxiom<OWLSubObjectPropertyOfAxiom> evAxiom=l.getCurrentlyBestEvaluatedAxiom();
  System.out.println(evAxiom);
  double actualScore=evAxiom.getScore().getAccuracy();
  int cntOp1=130;
  int cntOp2=70;
  int cntOp1_Op2=60;
  double beta=3.0;
  double precision=Heuristics.getConfidenceInterval95WaldAverage(cntOp2,cntOp1_Op2);
  double recall=Heuristics.getConfidenceInterval95WaldAverage(cntOp1,cntOp1_Op2);
  double expectedScore=Heuristics.getFScore(recall,precision,beta);
  assertEquals("String_Node_Str",expectedScore,actualScore,0d);
}
Program: 9456
Project: 9456
Buggy source:
public void testDisjointDataPropertiesAxiomLearning() throws Exception {
  DisjointDataPropertyAxiomLearner l=new DisjointDataPropertyAxiomLearner(ks);
  l.setMaxExecutionTimeInSeconds(maxExecutionTimeInSeconds);
  l.setPropertyToDescribe(disDataProperty);
  l.init();
  l.start();
  System.out.println(l.getCurrentlyBestEvaluatedAxioms(nrOfAxioms));
}

Fixed version (ground truth):
public void testDisjointDataPropertiesAxiomLearning() throws Exception {
  DisjointDataPropertyAxiomLearner l=new DisjointDataPropertyAxiomLearner(ks);
  l.setMaxExecutionTimeInSeconds(maxExecutionTimeInSeconds);
  l.setEntityToDescribe(disDataProperty);
  l.init();
  l.start();
  System.out.println(l.getCurrentlyBestEvaluatedAxioms(nrOfAxioms));
}