Program: 9765
Project: 9765
Buggy source:
@Override public void init() throws ComponentInitException {
  atomicConcepts=new TreeSet<NamedClass>(conceptComparator);
  atomicRoles=new TreeSet<ObjectProperty>(roleComparator);
  datatypeProperties=new TreeSet<DatatypeProperty>();
  booleanDatatypeProperties=new TreeSet<DatatypeProperty>();
  doubleDatatypeProperties=new TreeSet<DatatypeProperty>();
  intDatatypeProperties=new TreeSet<DatatypeProperty>();
  stringDatatypeProperties=new TreeSet<DatatypeProperty>();
  individuals=new TreeSet<Individual>();
  manager=OWLManager.createOWLOntologyManager();
  Comparator<OWLNamedObject> namedObjectComparator=new Comparator<OWLNamedObject>(){
    public int compare(    OWLNamedObject o1,    OWLNamedObject o2){
      return o1.getIRI().compareTo(o2.getIRI());
    }
  }
;
  Set<OWLClass> classes=new TreeSet<OWLClass>(namedObjectComparator);
  Set<OWLObjectProperty> owlObjectProperties=new TreeSet<OWLObjectProperty>(namedObjectComparator);
  Set<OWLDataProperty> owlDatatypeProperties=new TreeSet<OWLDataProperty>(namedObjectComparator);
  Set<OWLNamedIndividual> owlIndividuals=new TreeSet<OWLNamedIndividual>(namedObjectComparator);
  Set<OWLOntology> allImports=new HashSet<OWLOntology>();
  prefixes=new TreeMap<String,String>();
  for (  KnowledgeSource source : sources) {
    if (source instanceof OWLFile || source instanceof SparqlKnowledgeSource || source instanceof OWLAPIOntology) {
      URL url=null;
      if (source instanceof OWLFile) {
        url=((OWLFile)source).getURL();
      }
      try {
        if (source instanceof OWLAPIOntology) {
          ontology=((OWLAPIOntology)source).getOWLOntolgy();
        }
 else         if (source instanceof SparqlKnowledgeSource) {
          ontology=((SparqlKnowledgeSource)source).getOWLAPIOntology();
        }
 else {
          ontology=manager.loadOntologyFromOntologyDocument(IRI.create(url.toURI()));
        }
        owlAPIOntologies.add(ontology);
        Set<OWLOntology> imports=manager.getImportsClosure(ontology);
        allImports.addAll(imports);
        for (        OWLOntology ont : imports) {
          classes.addAll(ont.getClassesInSignature());
          owlObjectProperties.addAll(ont.getObjectPropertiesInSignature());
          owlDatatypeProperties.addAll(ont.getDataPropertiesInSignature());
          owlIndividuals.addAll(ont.getIndividualsInSignature());
        }
        OWLOntologyFormat format=manager.getOntologyFormat(ontology);
        if (format instanceof PrefixOWLOntologyFormat) {
          prefixes.putAll(((PrefixOWLOntologyFormat)format).getPrefixName2PrefixMap());
          baseURI=((PrefixOWLOntologyFormat)format).getDefaultPrefix();
          prefixes.remove("String_Node_Str");
        }
      }
 catch (      OWLOntologyCreationException e) {
        e.printStackTrace();
      }
catch (      URISyntaxException e) {
        e.printStackTrace();
      }
    }
 else {
      KB kb=source.toKB();
      IRI ontologyURI=IRI.create("String_Node_Str");
      ontology=null;
      try {
        ontology=manager.createOntology(ontologyURI);
      }
 catch (      OWLOntologyCreationException e) {
        e.printStackTrace();
      }
      OWLAPIAxiomConvertVisitor.fillOWLOntology(manager,ontology,kb);
      owlAPIOntologies.add(ontology);
      allImports.add(ontology);
      atomicConcepts.addAll(kb.findAllAtomicConcepts());
      atomicRoles.addAll(kb.findAllAtomicRoles());
      individuals.addAll(kb.findAllIndividuals());
    }
  }
  ReasonerProgressMonitor progressMonitor=new NullReasonerProgressMonitor();
  FreshEntityPolicy freshEntityPolicy=FreshEntityPolicy.ALLOW;
  long timeOut=Integer.MAX_VALUE;
  IndividualNodeSetPolicy individualNodeSetPolicy=IndividualNodeSetPolicy.BY_NAME;
  OWLReasonerConfiguration conf=new SimpleConfiguration(progressMonitor,freshEntityPolicy,timeOut,individualNodeSetPolicy);
  if (configurator.getReasonerType().equals("String_Node_Str")) {
    try {
      reasoner=new FaCTPlusPlusReasonerFactory().createNonBufferingReasoner(ontology,conf);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    System.out.println("String_Node_Str");
  }
 else {
    reasoner=PelletReasonerFactory.getInstance().createNonBufferingReasoner(ontology,conf);
    Logger pelletLogger=Logger.getLogger("String_Node_Str");
    pelletLogger.setLevel(Level.WARN);
  }
  boolean inconsistentOntology=!reasoner.isConsistent();
  if (!inconsistentOntology) {
    reasoner.prepareReasoner();
  }
 else {
    throw new ComponentInitException("String_Node_Str");
  }
  factory=manager.getOWLDataFactory();
  for (  OWLClass owlClass : classes)   atomicConcepts.add(new NamedClass(owlClass.toStringID()));
  for (  OWLObjectProperty owlProperty : owlObjectProperties)   atomicRoles.add(new ObjectProperty(owlProperty.toStringID()));
  for (  OWLDataProperty owlProperty : owlDatatypeProperties) {
    DatatypeProperty dtp=new DatatypeProperty(owlProperty.toStringID());
    Set<OWLDataRange> ranges=owlProperty.getRanges(allImports);
    Iterator<OWLDataRange> it=ranges.iterator();
    if (it.hasNext()) {
      OWLDataRange range=it.next();
      if (range.isDatatype()) {
        URI uri=((OWLDatatype)range).getIRI().toURI();
        if (uri.equals(Datatype.BOOLEAN.getURI()))         booleanDatatypeProperties.add(dtp);
 else         if (uri.equals(Datatype.DOUBLE.getURI()))         doubleDatatypeProperties.add(dtp);
 else         if (uri.equals(Datatype.INT.getURI()))         intDatatypeProperties.add(dtp);
 else         if (uri.equals(Datatype.STRING.getURI()))         stringDatatypeProperties.add(dtp);
      }
    }
 else {
      stringDatatypeProperties.add(dtp);
    }
    datatypeProperties.add(dtp);
  }
  for (  OWLNamedIndividual owlIndividual : owlIndividuals) {
    individuals.add(new Individual(owlIndividual.toStringID()));
  }
}

Fixed version (ground truth):
@Override public void init() throws ComponentInitException {
  atomicConcepts=new TreeSet<NamedClass>(conceptComparator);
  atomicRoles=new TreeSet<ObjectProperty>(roleComparator);
  datatypeProperties=new TreeSet<DatatypeProperty>();
  booleanDatatypeProperties=new TreeSet<DatatypeProperty>();
  doubleDatatypeProperties=new TreeSet<DatatypeProperty>();
  intDatatypeProperties=new TreeSet<DatatypeProperty>();
  stringDatatypeProperties=new TreeSet<DatatypeProperty>();
  individuals=new TreeSet<Individual>();
  manager=OWLManager.createOWLOntologyManager();
  Comparator<OWLNamedObject> namedObjectComparator=new Comparator<OWLNamedObject>(){
    public int compare(    OWLNamedObject o1,    OWLNamedObject o2){
      return o1.getIRI().compareTo(o2.getIRI());
    }
  }
;
  Set<OWLClass> classes=new TreeSet<OWLClass>(namedObjectComparator);
  Set<OWLObjectProperty> owlObjectProperties=new TreeSet<OWLObjectProperty>(namedObjectComparator);
  Set<OWLDataProperty> owlDatatypeProperties=new TreeSet<OWLDataProperty>(namedObjectComparator);
  Set<OWLNamedIndividual> owlIndividuals=new TreeSet<OWLNamedIndividual>(namedObjectComparator);
  Set<OWLOntology> allImports=new HashSet<OWLOntology>();
  prefixes=new TreeMap<String,String>();
  for (  KnowledgeSource source : sources) {
    if (source instanceof OWLFile || source instanceof SparqlKnowledgeSource || source instanceof OWLAPIOntology) {
      URL url=null;
      if (source instanceof OWLFile) {
        url=((OWLFile)source).getURL();
      }
      try {
        if (source instanceof OWLAPIOntology) {
          ontology=((OWLAPIOntology)source).getOWLOntolgy();
        }
 else         if (source instanceof SparqlKnowledgeSource) {
          ontology=((SparqlKnowledgeSource)source).getOWLAPIOntology();
          manager=ontology.getOWLOntologyManager();
        }
 else {
          ontology=manager.loadOntologyFromOntologyDocument(IRI.create(url.toURI()));
        }
        owlAPIOntologies.add(ontology);
        Set<OWLOntology> imports=manager.getImportsClosure(ontology);
        allImports.addAll(imports);
        for (        OWLOntology ont : imports) {
          classes.addAll(ont.getClassesInSignature());
          owlObjectProperties.addAll(ont.getObjectPropertiesInSignature());
          owlDatatypeProperties.addAll(ont.getDataPropertiesInSignature());
          owlIndividuals.addAll(ont.getIndividualsInSignature());
        }
        OWLOntologyFormat format=manager.getOntologyFormat(ontology);
        if (format instanceof PrefixOWLOntologyFormat) {
          prefixes.putAll(((PrefixOWLOntologyFormat)format).getPrefixName2PrefixMap());
          baseURI=((PrefixOWLOntologyFormat)format).getDefaultPrefix();
          prefixes.remove("String_Node_Str");
        }
      }
 catch (      OWLOntologyCreationException e) {
        e.printStackTrace();
      }
catch (      URISyntaxException e) {
        e.printStackTrace();
      }
    }
 else {
      KB kb=source.toKB();
      IRI ontologyURI=IRI.create("String_Node_Str");
      ontology=null;
      try {
        ontology=manager.createOntology(ontologyURI);
      }
 catch (      OWLOntologyCreationException e) {
        e.printStackTrace();
      }
      OWLAPIAxiomConvertVisitor.fillOWLOntology(manager,ontology,kb);
      owlAPIOntologies.add(ontology);
      allImports.add(ontology);
      atomicConcepts.addAll(kb.findAllAtomicConcepts());
      atomicRoles.addAll(kb.findAllAtomicRoles());
      individuals.addAll(kb.findAllIndividuals());
    }
  }
  ReasonerProgressMonitor progressMonitor=new NullReasonerProgressMonitor();
  FreshEntityPolicy freshEntityPolicy=FreshEntityPolicy.ALLOW;
  long timeOut=Integer.MAX_VALUE;
  IndividualNodeSetPolicy individualNodeSetPolicy=IndividualNodeSetPolicy.BY_NAME;
  OWLReasonerConfiguration conf=new SimpleConfiguration(progressMonitor,freshEntityPolicy,timeOut,individualNodeSetPolicy);
  if (configurator.getReasonerType().equals("String_Node_Str")) {
    try {
      reasoner=new FaCTPlusPlusReasonerFactory().createNonBufferingReasoner(ontology,conf);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    System.out.println("String_Node_Str");
  }
 else {
    reasoner=PelletReasonerFactory.getInstance().createNonBufferingReasoner(ontology,conf);
    Logger pelletLogger=Logger.getLogger("String_Node_Str");
    pelletLogger.setLevel(Level.WARN);
  }
  boolean inconsistentOntology=!reasoner.isConsistent();
  if (!inconsistentOntology) {
    reasoner.prepareReasoner();
  }
 else {
    throw new ComponentInitException("String_Node_Str");
  }
  factory=manager.getOWLDataFactory();
  for (  OWLClass owlClass : classes)   atomicConcepts.add(new NamedClass(owlClass.toStringID()));
  for (  OWLObjectProperty owlProperty : owlObjectProperties)   atomicRoles.add(new ObjectProperty(owlProperty.toStringID()));
  for (  OWLDataProperty owlProperty : owlDatatypeProperties) {
    DatatypeProperty dtp=new DatatypeProperty(owlProperty.toStringID());
    Set<OWLDataRange> ranges=owlProperty.getRanges(allImports);
    Iterator<OWLDataRange> it=ranges.iterator();
    if (it.hasNext()) {
      OWLDataRange range=it.next();
      if (range.isDatatype()) {
        URI uri=((OWLDatatype)range).getIRI().toURI();
        if (uri.equals(Datatype.BOOLEAN.getURI()))         booleanDatatypeProperties.add(dtp);
 else         if (uri.equals(Datatype.DOUBLE.getURI()))         doubleDatatypeProperties.add(dtp);
 else         if (uri.equals(Datatype.INT.getURI()))         intDatatypeProperties.add(dtp);
 else         if (uri.equals(Datatype.STRING.getURI()))         stringDatatypeProperties.add(dtp);
      }
    }
 else {
      stringDatatypeProperties.add(dtp);
    }
    datatypeProperties.add(dtp);
  }
  for (  OWLNamedIndividual owlIndividual : owlIndividuals) {
    individuals.add(new Individual(owlIndividual.toStringID()));
  }
}