Program: 9651
Project: 9651
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();
          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());
    }
  }
  try {
    ontology=manager.createOntology(IRI.create("String_Node_Str"),new HashSet<OWLOntology>(owlAPIOntologies));
  }
 catch (  OWLOntologyCreationException e1) {
    e1.printStackTrace();
  }
  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   if (configurator.getReasonerType().equals("String_Node_Str")) {
    reasoner=new ReasonerFactory().createNonBufferingReasoner(ontology,conf);
  }
 else   if (configurator.getReasonerType().equals("String_Node_Str")) {
    reasoner=PelletReasonerFactory.getInstance().createNonBufferingReasoner(ontology,conf);
    Logger pelletLogger=Logger.getLogger("String_Node_Str");
    pelletLogger.setLevel(Level.WARN);
  }
 else {
    try {
      OWLlinkHTTPXMLReasonerFactory factory=new OWLlinkHTTPXMLReasonerFactory();
      URL url=getConfigurator().getOwlLinkURL();
      OWLlinkReasonerConfiguration config=new OWLlinkReasonerConfiguration(url);
      reasoner=factory.createNonBufferingReasoner(ontology,config);
      System.out.println(reasoner.getReasonerName());
    }
 catch (    Exception e) {
      throw new ComponentInitException(e);
    }
  }
  boolean inconsistentOntology=!reasoner.isConsistent();
  if (!inconsistentOntology) {
    reasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY,InferenceType.CLASS_ASSERTIONS);
  }
 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();
          manager=ontology.getOWLOntologyManager();
        }
 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());
    }
  }
  try {
    ontology=manager.createOntology(IRI.create("String_Node_Str"),new HashSet<OWLOntology>(owlAPIOntologies));
  }
 catch (  OWLOntologyCreationException e1) {
    e1.printStackTrace();
  }
  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   if (configurator.getReasonerType().equals("String_Node_Str")) {
    reasoner=new ReasonerFactory().createNonBufferingReasoner(ontology,conf);
  }
 else   if (configurator.getReasonerType().equals("String_Node_Str")) {
    reasoner=PelletReasonerFactory.getInstance().createNonBufferingReasoner(ontology,conf);
    Logger pelletLogger=Logger.getLogger("String_Node_Str");
    pelletLogger.setLevel(Level.WARN);
  }
 else {
    try {
      OWLlinkHTTPXMLReasonerFactory factory=new OWLlinkHTTPXMLReasonerFactory();
      URL url=getConfigurator().getOwlLinkURL();
      OWLlinkReasonerConfiguration config=new OWLlinkReasonerConfiguration(url);
      reasoner=factory.createNonBufferingReasoner(ontology,config);
      System.out.println(reasoner.getReasonerName());
    }
 catch (    Exception e) {
      throw new ComponentInitException(e);
    }
  }
  boolean inconsistentOntology=!reasoner.isConsistent();
  if (!inconsistentOntology) {
    reasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY,InferenceType.CLASS_ASSERTIONS);
  }
 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()));
  }
}