Program: 9612
Project: 9612
Buggy source:
private List<EvaluatedAxiom> applyCELOE(SparqlEndpointKS ks,NamedClass nc,boolean equivalence) throws ComponentInitException {
  SPARQLReasoner sr=new SPARQLReasoner(ks);
  SortedSet<Individual> posExamples=sr.getIndividuals(nc,20);
  SortedSet<String> posExStr=Helper.getStringSet(posExamples);
  System.out.print("String_Node_Str");
  AutomaticNegativeExampleFinderSPARQL2 finder=new AutomaticNegativeExampleFinderSPARQL2(ks.getEndpoint());
  SortedSet<String> negExStr=finder.getNegativeExamples(nc.getName(),posExStr);
  negExStr=SetManipulation.fuzzyShrink(negExStr,20);
  SortedSet<Individual> negExamples=Helper.getIndividualSet(negExStr);
  SortedSetTuple<Individual> examples=new SortedSetTuple<Individual>(posExamples,negExamples);
  System.out.println("String_Node_Str" + negExStr.size() + "String_Node_Str");
  ComponentManager cm=ComponentManager.getInstance();
  SparqlKnowledgeSource ks2=cm.knowledgeSource(SparqlKnowledgeSource.class);
  ks2.setInstances(Datastructures.individualSetToStringSet(examples.getCompleteSet()));
  ks2.setUrl(ks.getEndpoint().getURL());
  ks2.setDefaultGraphURIs(new TreeSet<String>(ks.getEndpoint().getDefaultGraphURIs()));
  ks2.setUseLits(false);
  ks2.setUseCacheDatabase(true);
  ks2.setRecursionDepth(2);
  ks2.setCloseAfterRecursion(true);
  System.out.println("String_Node_Str");
  ks2.init();
  System.out.println("String_Node_Str");
  AbstractReasonerComponent rc=cm.reasoner(FastInstanceChecker.class,ks2);
  rc.init();
  ClassLearningProblem lp=cm.learningProblem(ClassLearningProblem.class,rc);
  lp.setClassToDescribe(nc);
  lp.setEquivalence(true);
  lp.setHeuristic(HeuristicType.FMEASURE);
  lp.setUseApproximations(false);
  lp.setMaxExecutionTimeInSeconds(10);
  lp.init();
  CELOE la=null;
  try {
    la=cm.learningAlgorithm(CELOE.class,lp,rc);
  }
 catch (  LearningProblemUnsupportedException e) {
    e.printStackTrace();
  }
  la.setMaxExecutionTimeInSeconds(10);
  la.setNoisePercentage(25);
  la.init();
  System.out.print("String_Node_Str");
  la.start();
  System.out.println("String_Node_Str");
  List<? extends EvaluatedDescription> learnedDescriptions=la.getCurrentlyBestEvaluatedDescriptions(threshold);
  List<EvaluatedAxiom> evaluatedAxioms=new LinkedList<EvaluatedAxiom>();
  for (  EvaluatedDescription learnedDescription : learnedDescriptions) {
    Axiom axiom;
    if (equivalence) {
      axiom=new EquivalentClassesAxiom(nc,learnedDescription.getDescription());
    }
 else {
      axiom=new SubClassAxiom(nc,learnedDescription.getDescription());
    }
    Score score=lp.computeScore(learnedDescription.getDescription());
    evaluatedAxioms.add(new EvaluatedAxiom(axiom,score));
  }
  algorithmRuns.add(new AlgorithmRun(CELOE.class,evaluatedAxioms,ConfigHelper.getConfigOptionValuesString(la)));
  cm.freeAllComponents();
  return evaluatedAxioms;
}

Fixed version (ground truth):
private List<EvaluatedAxiom> applyCELOE(SparqlEndpointKS ks,NamedClass nc,boolean equivalence) throws ComponentInitException {
  SPARQLReasoner sr=new SPARQLReasoner(ks);
  SortedSet<Individual> posExamples=sr.getIndividuals(nc,20);
  SortedSet<String> posExStr=Helper.getStringSet(posExamples);
  System.out.print("String_Node_Str");
  AutomaticNegativeExampleFinderSPARQL2 finder=new AutomaticNegativeExampleFinderSPARQL2(ks.getEndpoint());
  SortedSet<String> negExStr=finder.getNegativeExamples(nc.getName(),posExStr);
  negExStr=SetManipulation.fuzzyShrink(negExStr,20);
  SortedSet<Individual> negExamples=Helper.getIndividualSet(negExStr);
  SortedSetTuple<Individual> examples=new SortedSetTuple<Individual>(posExamples,negExamples);
  System.out.println("String_Node_Str" + negExStr.size() + "String_Node_Str");
  SparqlKnowledgeSource ks2=new SparqlKnowledgeSource();
  ks2.setInstances(Datastructures.individualSetToStringSet(examples.getCompleteSet()));
  ks2.setUrl(ks.getEndpoint().getURL());
  ks2.setDefaultGraphURIs(new TreeSet<String>(ks.getEndpoint().getDefaultGraphURIs()));
  ks2.setUseLits(false);
  ks2.setUseCacheDatabase(true);
  ks2.setRecursionDepth(2);
  ks2.setCloseAfterRecursion(true);
  System.out.println("String_Node_Str");
  ks2.init();
  System.out.println("String_Node_Str");
  AbstractReasonerComponent rc=new FastInstanceChecker(ks2);
  rc.init();
  ClassLearningProblem lp=new ClassLearningProblem(rc);
  lp.setClassToDescribe(nc);
  lp.setEquivalence(true);
  lp.setHeuristic(HeuristicType.FMEASURE);
  lp.setUseApproximations(false);
  lp.setMaxExecutionTimeInSeconds(10);
  lp.init();
  CELOE la=new CELOE(lp,rc);
  la.setMaxExecutionTimeInSeconds(10);
  la.setNoisePercentage(25);
  la.init();
  System.out.print("String_Node_Str");
  la.start();
  System.out.println("String_Node_Str");
  List<? extends EvaluatedDescription> learnedDescriptions=la.getCurrentlyBestEvaluatedDescriptions(threshold);
  List<EvaluatedAxiom> evaluatedAxioms=new LinkedList<EvaluatedAxiom>();
  for (  EvaluatedDescription learnedDescription : learnedDescriptions) {
    Axiom axiom;
    if (equivalence) {
      axiom=new EquivalentClassesAxiom(nc,learnedDescription.getDescription());
    }
 else {
      axiom=new SubClassAxiom(nc,learnedDescription.getDescription());
    }
    Score score=lp.computeScore(learnedDescription.getDescription());
    evaluatedAxioms.add(new EvaluatedAxiom(axiom,score));
  }
  algorithmRuns.add(new AlgorithmRun(CELOE.class,evaluatedAxioms,ConfigHelper.getConfigOptionValuesString(la)));
  return evaluatedAxioms;
}