Program: 9514
Project: 9514
Buggy source:
@Override public void init() throws ComponentInitException {
  if (endpointURL == null) {
    throw new ComponentInitException("String_Node_Str");
  }
  if (instances == null) {
    throw new ComponentInitException("String_Node_Str");
  }
  if (recursionDepth == 0) {
    throw new ComponentInitException("String_Node_Str");
  }
  if (ontologySchemaUrls == null) {
    throw new ComponentInitException("String_Node_Str");
  }
  for (  String instance : instances) {
    model.createIndividual(instance,OWL.Thing);
  }
  Monitor monComp=MonitorFactory.start("String_Node_Str").start();
  Monitor monIndexer=MonitorFactory.start("String_Node_Str").start();
  indexer=new SchemaIndexer();
  indexer.setOntologySchemaUrls(ontologySchemaUrls);
  indexer.init();
  monIndexer.stop();
  TypeOntology typeOntology=new TypeOntology();
  Monitor monQueryingABox;
  QueryExecutor executor=new QueryExecutor();
  String queryString;
  Set<String> instancesSet=new HashSet<String>(instances);
  Set<String> alreadyQueried=new HashSet<String>();
  Monitor typizeModel;
  if (sparqlQuery == null) {
    ABoxQueryGenerator aGenerator=new ABoxQueryGenerator();
    for (int i=0; i < recursionDepth; i++) {
      if (instancesSet.isEmpty()) {
        log.warn("String_Node_Str" + i + "String_Node_Str"+ instancesSet.size()+ "String_Node_Str");
      }
      log.info("String_Node_Str" + i + "String_Node_Str"+ instancesSet.size()+ "String_Node_Str");
      queryString=aGenerator.createQuery(instancesSet,aboxfilter);
      System.out.println(queryString);
      log.debug("String_Node_Str",queryString);
      monQueryingABox=MonitorFactory.start("String_Node_Str");
      try {
        executor.executeQuery(queryString,endpointURL,model,defaultGraphURI);
      }
 catch (      Throwable t) {
        t.printStackTrace();
      }
      monQueryingABox.stop();
      typizeModel=MonitorFactory.start("String_Node_Str");
      typeOntology.addTypes(model);
      typizeModel.stop();
      alreadyQueried.addAll(instancesSet);
      instancesSet=difference(alreadyQueried,model);
    }
  }
 else {
    monQueryingABox=MonitorFactory.getTimeMonitor("String_Node_Str").start();
    executor.executeQuery(sparqlQuery,endpointURL,model,null);
    monQueryingABox.stop();
  }
  TBoxQueryGenerator tGenerator=new TBoxQueryGenerator();
  queryString=tGenerator.createQuery(alreadyQueried,tboxfilter);
  Monitor monQueryingTBox=MonitorFactory.start("String_Node_Str");
  executor.executeQuery(queryString,endpointURL,model,defaultGraphURI);
  monQueryingTBox.stop();
  Monitor monIndexing=MonitorFactory.start("String_Node_Str");
  Set<OntClass> classes=model.listClasses().toSet();
  for (  OntClass ontClass : classes) {
    OntModel hierarchy=indexer.getHierarchyForURI(ontClass.getURI());
    if (hierarchy != null) {
      model.add(hierarchy);
      log.debug("String_Node_Str",model);
    }
  }
  JenaToOwlapiConverter converter=new JenaToOwlapiConverter();
  owlOntology=converter.convert(this.model);
  monIndexing.stop();
  monComp.stop();
  log.info("String_Node_Str");
  log.info(JamonMonitorLogger.getStringForAllSortedByLabel());
  log.info("String_Node_Str");
}

Fixed version (ground truth):
@Override public void init() throws ComponentInitException {
  if (endpointURL == null) {
    throw new ComponentInitException("String_Node_Str");
  }
  if (instances == null) {
    throw new ComponentInitException("String_Node_Str");
  }
  if (recursionDepth == 0) {
    throw new ComponentInitException("String_Node_Str");
  }
  if (ontologySchemaUrls == null) {
    throw new ComponentInitException("String_Node_Str");
  }
  Monitor monComp=MonitorFactory.start("String_Node_Str").start();
  Monitor monIndexer=MonitorFactory.start("String_Node_Str").start();
  indexer=new SchemaIndexer();
  indexer.setOntologySchemaUrls(ontologySchemaUrls);
  indexer.init();
  monIndexer.stop();
  TypeOntology typeOntology=new TypeOntology();
  Monitor monQueryingABox;
  QueryExecutor executor=new QueryExecutor();
  String queryString;
  Set<String> instancesSet=new HashSet<String>(instances);
  Set<String> alreadyQueried=new HashSet<String>();
  Monitor typizeModel;
  if (sparqlQuery == null) {
    ABoxQueryGenerator aGenerator=new ABoxQueryGenerator();
    for (int i=0; i < recursionDepth; i++) {
      if (instancesSet.isEmpty()) {
        log.warn("String_Node_Str" + i + "String_Node_Str"+ instancesSet.size()+ "String_Node_Str");
      }
      log.info("String_Node_Str" + i + "String_Node_Str"+ instancesSet.size()+ "String_Node_Str");
      queryString=aGenerator.createQuery(instancesSet,aboxfilter);
      log.debug("String_Node_Str",queryString);
      monQueryingABox=MonitorFactory.start("String_Node_Str");
      try {
        executor.executeQuery(queryString,endpointURL,model,defaultGraphURI);
      }
 catch (      Throwable t) {
        t.printStackTrace();
      }
      monQueryingABox.stop();
      typizeModel=MonitorFactory.start("String_Node_Str");
      model=typeOntology.addTypetoJena(model,instances,null);
      typizeModel.stop();
      alreadyQueried.addAll(instancesSet);
      instancesSet=difference(alreadyQueried,model);
    }
  }
 else {
    monQueryingABox=MonitorFactory.getTimeMonitor("String_Node_Str").start();
    executor.executeQuery(sparqlQuery,endpointURL,model,null);
    monQueryingABox.stop();
  }
  TBoxQueryGenerator tGenerator=new TBoxQueryGenerator();
  queryString=tGenerator.createQuery(alreadyQueried,tboxfilter);
  Monitor monQueryingTBox=MonitorFactory.start("String_Node_Str");
  executor.executeQuery(queryString,endpointURL,model,defaultGraphURI);
  monQueryingTBox.stop();
  Monitor monIndexing=MonitorFactory.start("String_Node_Str");
  Set<OntClass> classes=model.listClasses().toSet();
  for (  OntClass ontClass : classes) {
    OntModel hierarchy=indexer.getHierarchyForURI(ontClass.getURI());
    if (hierarchy != null) {
      model.add(hierarchy);
      log.debug("String_Node_Str",model);
    }
  }
  JenaToOwlapiConverter converter=new JenaToOwlapiConverter();
  owlOntology=converter.convert(this.model);
  monIndexing.stop();
  monComp.stop();
  log.info("String_Node_Str");
  log.info(JamonMonitorLogger.getStringForAllSortedByLabel());
  log.info("String_Node_Str");
}