private OWLOntology doRefactoring(InputStream input, KB kb) throws OWLOntologyCreationException,
RefactoringException {
if (kb == null) return null;
RuleList ruleList = kb.getkReSRuleList();
if (ruleList == null) return null;
Recipe actualRecipe = new RecipeImpl(null, null, ruleList);
// Parse the input ontology
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
OWLOntology inputOntology = manager.loadOntologyFromOntologyDocument(input);