Program: 9557
Project: 9557
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 (heuristicStr == "String_Node_Str")     heuristic=new LexicographicHeuristic();
 else     if (heuristicStr == "String_Node_Str") {
      if (learningProblem instanceof PosOnlyLP) {
        throw new RuntimeException("String_Node_Str");
      }
      heuristic=new FlexibleHeuristic(((PosNegLP)getLearningProblem()).getNegativeExamples().size(),((PosNegLP)getLearningProblem()).getPercentPerLengthUnit());
    }
 else {
      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);
      }
    }
  }
  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).setSubHierarchy(classHierarchy);
    ((RhoDRDown)operator).setReasoner(reasoner);
    ((RhoDRDown)operator).init();
  }
 else {
    operator.setSubHierarchy(classHierarchy);
  }
  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();
    ((RhoDRDown)operator).setReasoner(reasoner);
  }
  ((RhoDRDown)operator).setSubHierarchy(classHierarchy);
  ((RhoDRDown)operator).setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy());
  ((RhoDRDown)operator).setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy());
  ((RhoDRDown)operator).init();
  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);
}