Program: 9571
Project: 9571
Buggy source:
/** 
 * This test runs all conf files in the examples directory. Each conf file corresponds to one unit test, which is succesful if a concept was learned. This unit test takes several hours.
 * @throws ComponentInitException If any component initialisation exception occurs in the process.
 */
@Test public void testAllConfFiles() throws ComponentInitException {
  boolean randomize=true;
  boolean testGP=false;
  int sparql=0;
  SimpleLayout layout=new SimpleLayout();
  ConsoleAppender consoleAppender=new ConsoleAppender(layout);
  Logger logger=Logger.getRootLogger();
  logger.removeAllAppenders();
  logger.addAppender(consoleAppender);
  logger.setLevel(Level.WARN);
  HashMap<String,ArrayList<String>> confFiles=new HashMap<String,ArrayList<String>>();
  String exampleDir="String_Node_Str" + File.separator + "String_Node_Str";
  File f=new File(exampleDir);
  QuickStart.getAllConfs(f,exampleDir,confFiles);
  List<String> examples=new LinkedList<String>();
  for (  Map.Entry<String,ArrayList<String>> entry : confFiles.entrySet()) {
    for (    String file : entry.getValue()) {
      examples.add(entry.getKey() + file + "String_Node_Str");
    }
  }
  if (randomize) {
    Collections.shuffle(examples,new Random());
  }
 else {
    Collections.sort(examples);
  }
  SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
  Set<String> ignore=new TreeSet<String>();
  ignore.add("String_Node_Str");
  ignore.add("String_Node_Str");
  ignore.add("String_Node_Str");
  ignore.add("String_Node_Str");
  ignore.add("String_Node_Str");
  int failedCounter=0;
  int counter=1;
  int total=examples.size();
  for (  String conf : examples) {
    boolean ignored=false;
    for (    String ignoredConfExpression : ignore) {
      if (conf.contains(ignoredConfExpression)) {
        ignored=true;
        break;
      }
    }
    if (ignored) {
      System.out.println("String_Node_Str" + conf + "String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str" + conf + "String_Node_Str"+ counter+ "String_Node_Str"+ total+ "String_Node_Str"+ sdf.format(new Date())+ "String_Node_Str");
      long startTime=System.nanoTime();
      boolean success=false, started=false;
      try {
        CLI start=new CLI(new File(conf));
        start.init();
        start.run();
        boolean isSparql=start.getKnowledgeSource() instanceof SparqlKnowledgeSource;
        LearningAlgorithm algorithm=start.getLearningAlgorithm();
        if ((testGP || !(algorithm instanceof GP)) && (sparql == 0 || (sparql == 1 && isSparql) || (sparql == 2 && !isSparql))) {
          started=true;
          if (algorithm instanceof AbstractCELA) {
            assert(((AbstractCELA)algorithm).getCurrentlyBestDescription() != null);
          }
          success=true;
        }
 else {
          System.out.println("String_Node_Str");
        }
      }
 catch (      Exception e) {
        assert(false);
        e.printStackTrace();
        failedCounter++;
      }
      long timeNeeded=System.nanoTime() - startTime;
      ComponentManager.getInstance().freeAllComponents();
      if (!success && started) {
        System.out.println("String_Node_Str");
      }
      if (started) {
        System.out.println("String_Node_Str" + conf + "String_Node_Str"+ Helper.prettyPrintNanoSeconds(timeNeeded)+ "String_Node_Str");
      }
    }
    counter++;
  }
  System.out.println("String_Node_Str" + failedCounter + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * This test runs all conf files in the examples directory. Each conf file corresponds to one unit test, which is succesful if a concept was learned. This unit test takes several hours.
 * @throws ComponentInitException If any component initialisation exception occurs in the process.
 */
@Test public void testAllConfFiles() throws ComponentInitException {
  boolean randomize=false;
  boolean testGP=false;
  int sparql=0;
  SimpleLayout layout=new SimpleLayout();
  ConsoleAppender consoleAppender=new ConsoleAppender(layout);
  Logger logger=Logger.getRootLogger();
  logger.removeAllAppenders();
  logger.addAppender(consoleAppender);
  logger.setLevel(Level.WARN);
  Map<String,ArrayList<String>> confFiles=new TreeMap<String,ArrayList<String>>();
  String exampleDir="String_Node_Str" + File.separator + "String_Node_Str";
  File f=new File(exampleDir);
  QuickStart.getAllConfs(f,exampleDir,confFiles);
  List<String> examples=new LinkedList<String>();
  for (  Map.Entry<String,ArrayList<String>> entry : confFiles.entrySet()) {
    for (    String file : entry.getValue()) {
      examples.add(entry.getKey() + file + "String_Node_Str");
    }
  }
  if (randomize) {
    Collections.shuffle(examples,new Random());
  }
 else {
    Collections.sort(examples);
  }
  SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
  Set<String> ignore=new TreeSet<String>();
  ignore.add("String_Node_Str");
  ignore.add("String_Node_Str");
  ignore.add("String_Node_Str");
  ignore.add("String_Node_Str");
  ignore.add("String_Node_Str");
  int failedCounter=0;
  int counter=1;
  int total=examples.size();
  for (  String conf : examples) {
    boolean ignored=false;
    for (    String ignoredConfExpression : ignore) {
      if (conf.contains(ignoredConfExpression)) {
        ignored=true;
        break;
      }
    }
    if (ignored) {
      System.out.println("String_Node_Str" + conf + "String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str" + conf + "String_Node_Str"+ counter+ "String_Node_Str"+ total+ "String_Node_Str"+ sdf.format(new Date())+ "String_Node_Str");
      long startTime=System.nanoTime();
      boolean success=false, started=false;
      try {
        CLI start=new CLI(new File(conf));
        start.init();
        start.run();
        boolean isSparql=start.getKnowledgeSource() instanceof SparqlKnowledgeSource;
        LearningAlgorithm algorithm=start.getLearningAlgorithm();
        if ((testGP || !(algorithm instanceof GP)) && (sparql == 0 || (sparql == 1 && isSparql) || (sparql == 2 && !isSparql))) {
          started=true;
          if (algorithm instanceof AbstractCELA) {
            assert(((AbstractCELA)algorithm).getCurrentlyBestDescription() != null);
          }
          success=true;
        }
 else {
          System.out.println("String_Node_Str");
        }
      }
 catch (      Exception e) {
        assert(false);
        e.printStackTrace();
        failedCounter++;
      }
      long timeNeeded=System.nanoTime() - startTime;
      ComponentManager.getInstance().freeAllComponents();
      if (!success && started) {
        System.out.println("String_Node_Str");
      }
      if (started) {
        System.out.println("String_Node_Str" + conf + "String_Node_Str"+ Helper.prettyPrintNanoSeconds(timeNeeded)+ "String_Node_Str");
      }
    }
    counter++;
  }
  System.out.println("String_Node_Str" + failedCounter + "String_Node_Str");
}