Program: 9410
Project: 9410
Buggy source:
@Override public void init() throws ComponentInitException {
  if (getReasoner().getReasonerType() == ReasonerType.DIG) {
    throw new ComponentInitException("String_Node_Str" + getName());
  }
  if (!logLevel.equals(CommonConfigOptions.logLevelDefault))   logger.setLevel(Level.toLevel(logLevel,Level.toLevel(CommonConfigOptions.logLevelDefault)));
  if (searchTreeFile == null)   searchTreeFile=new File(defaultSearchTreeFile);
  if (writeSearchTree)   Files.clearFile(searchTreeFile);
  if (heuristic == null) {
    if (getLearningProblem() instanceof PosOnlyLP) {
      throw new RuntimeException("String_Node_Str");
    }
 else {
      heuristic=new MultiHeuristic(((PosNegLP)getLearningProblem()).getPositiveExamples().size(),((PosNegLP)getLearningProblem()).getNegativeExamples().size(),negativeWeight,startNodeBonus,expansionPenaltyFactor,negationPenalty);
    }
  }
 else {
    if (heuristic instanceof MultiHeuristic) {
      MultiHeuristic mh=((MultiHeuristic)heuristic);
      if (mh.getNrOfNegativeExamples() == 0) {
        mh.setNrOfNegativeExamples(((PosNegLP)getLearningProblem()).getNegativeExamples().size());
      }
      int nrPosEx=((PosNegLP)getLearningProblem()).getPositiveExamples().size();
      int nrNegEx=((PosNegLP)getLearningProblem()).getNegativeExamples().size();
      if (mh.getNrOfExamples() == 0) {
        mh.setNrOfExamples(nrPosEx + nrNegEx);
      }
      if (mh.getNrOfNegativeExamples() == 0) {
        mh.setNrOfNegativeExamples(nrNegEx);
      }
    }
  }
  if (learningProblem instanceof PosNegLPStandard) {
    if (((PosNegLPStandard)learningProblem).isUseApproximations()) {
      System.err.println("String_Node_Str");
    }
    if (!((PosNegLPStandard)learningProblem).getAccuracyMethod().equals("String_Node_Str")) {
      System.err.println("String_Node_Str");
    }
  }
  if (allowedConcepts != null) {
    Helper.checkConcepts(reasoner,allowedConcepts);
    usedConcepts=allowedConcepts;
  }
 else   if (ignoredConcepts != null) {
    usedConcepts=Helper.computeConceptsUsingIgnoreList(reasoner,ignoredConcepts);
  }
 else {
    usedConcepts=Helper.computeConcepts(reasoner);
  }
  if (allowedRoles != null) {
    Helper.checkRoles(reasoner,allowedRoles);
    usedRoles=allowedRoles;
  }
 else   if (ignoredRoles != null) {
    Helper.checkRoles(reasoner,ignoredRoles);
    usedRoles=Helper.difference(reasoner.getObjectProperties(),ignoredRoles);
  }
 else {
    usedRoles=reasoner.getObjectProperties();
  }
  ClassHierarchy classHierarchy=reasoner.getClassHierarchy().cloneAndRestrict(usedConcepts);
  if (improveSubsumptionHierarchy)   classHierarchy.thinOutSubsumptionHierarchy();
  if (operator == null) {
    operator=new RhoDRDown();
    ((RhoDRDown)operator).setReasoner(reasoner);
    ((RhoDRDown)operator).init();
  }
  ((RhoDRDown)operator).setSubHierarchy(classHierarchy);
  ((RhoDRDown)operator).setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy());
  ((RhoDRDown)operator).setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy());
  algorithm=new ROLearner2(learningProblem,reasoner,operator,heuristic,startClass,noisePercentage / (double)100,writeSearchTree,replaceSearchTree,searchTreeFile,useTooWeakList,useOverlyGeneralList,useShortConceptConstruction,usePropernessChecks,maxPosOnlyExpansion,maxExecutionTimeInSeconds,minExecutionTimeInSeconds,guaranteeXgoodDescriptions,maxClassDescriptionTests,forceRefinementLengthIncrease,terminateOnNoiseReached,negativeWeight,startNodeBonus,expansionPenaltyFactor,negationPenalty);
}

Fixed version (ground truth):
@Override public void init() throws ComponentInitException {
  if (getReasoner().getReasonerType() == ReasonerType.DIG) {
    throw new ComponentInitException("String_Node_Str" + getName());
  }
  if (!logLevel.equals(CommonConfigOptions.logLevelDefault))   logger.setLevel(Level.toLevel(logLevel,Level.toLevel(CommonConfigOptions.logLevelDefault)));
  if (searchTreeFile == null)   searchTreeFile=new File(defaultSearchTreeFile);
  if (writeSearchTree)   Files.clearFile(searchTreeFile);
  if (heuristic == null) {
    if (getLearningProblem() instanceof PosOnlyLP) {
      throw new RuntimeException("String_Node_Str");
    }
 else {
      heuristic=new MultiHeuristic(((PosNegLP)getLearningProblem()).getPositiveExamples().size(),((PosNegLP)getLearningProblem()).getNegativeExamples().size(),negativeWeight,startNodeBonus,expansionPenaltyFactor,negationPenalty);
    }
  }
 else {
    if (heuristic instanceof MultiHeuristic) {
      MultiHeuristic mh=((MultiHeuristic)heuristic);
      if (mh.getNrOfNegativeExamples() == 0) {
        mh.setNrOfNegativeExamples(((PosNegLP)getLearningProblem()).getNegativeExamples().size());
      }
      int nrPosEx=((PosNegLP)getLearningProblem()).getPositiveExamples().size();
      int nrNegEx=((PosNegLP)getLearningProblem()).getNegativeExamples().size();
      if (mh.getNrOfExamples() == 0) {
        mh.setNrOfExamples(nrPosEx + nrNegEx);
      }
      if (mh.getNrOfNegativeExamples() == 0) {
        mh.setNrOfNegativeExamples(nrNegEx);
      }
    }
  }
  if (learningProblem instanceof PosNegLPStandard) {
    if (((PosNegLPStandard)learningProblem).isUseApproximations()) {
      System.err.println("String_Node_Str");
    }
    if (!((PosNegLPStandard)learningProblem).getAccuracyMethod().equals("String_Node_Str")) {
      System.err.println("String_Node_Str");
    }
  }
  if (allowedConcepts != null) {
    Helper.checkConcepts(reasoner,allowedConcepts);
    usedConcepts=allowedConcepts;
  }
 else   if (ignoredConcepts != null) {
    usedConcepts=Helper.computeConceptsUsingIgnoreList(reasoner,ignoredConcepts);
  }
 else {
    usedConcepts=Helper.computeConcepts(reasoner);
  }
  if (allowedRoles != null) {
    Helper.checkRoles(reasoner,allowedRoles);
    usedRoles=allowedRoles;
  }
 else   if (ignoredRoles != null) {
    Helper.checkRoles(reasoner,ignoredRoles);
    usedRoles=Helper.difference(reasoner.getObjectProperties(),ignoredRoles);
  }
 else {
    usedRoles=reasoner.getObjectProperties();
  }
  ClassHierarchy classHierarchy=reasoner.getClassHierarchy().cloneAndRestrict(usedConcepts);
  if (improveSubsumptionHierarchy)   classHierarchy.thinOutSubsumptionHierarchy();
  if (operator == null) {
    operator=new RhoDRDown();
    if (operator instanceof CustomStartRefinementOperator) {
      ((CustomStartRefinementOperator)operator).setStartClass(startClass);
    }
    if (operator instanceof ReasoningBasedRefinementOperator) {
      ((ReasoningBasedRefinementOperator)operator).setReasoner(reasoner);
    }
    operator.init();
  }
  if (operator instanceof CustomHierarchyRefinementOperator) {
    ((CustomHierarchyRefinementOperator)operator).setClassHierarchy(classHierarchy);
    ((CustomHierarchyRefinementOperator)operator).setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy());
    ((CustomHierarchyRefinementOperator)operator).setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy());
  }
  algorithm=new ROLearner2(learningProblem,reasoner,operator,heuristic,startClass,noisePercentage / (double)100,writeSearchTree,replaceSearchTree,searchTreeFile,useTooWeakList,useOverlyGeneralList,useShortConceptConstruction,usePropernessChecks,maxPosOnlyExpansion,maxExecutionTimeInSeconds,minExecutionTimeInSeconds,guaranteeXgoodDescriptions,maxClassDescriptionTests,forceRefinementLengthIncrease,terminateOnNoiseReached,negativeWeight,startNodeBonus,expansionPenaltyFactor,negationPenalty);
}