Program: 10139
Project: 10139
Buggy source:
/** 
 * Initialise all components based on conf file.
 * @param file Conf file to read.
 * @throws ComponentInitException
 * @throws ParseException 
 * @throws FileNotFoundException 
 */
public Start(File file) throws ComponentInitException, FileNotFoundException, ParseException {
  String baseDir=file.getParentFile().getPath();
  String message="String_Node_Str";
  long cmStartTime=System.nanoTime();
  ComponentManager cm=ComponentManager.getInstance();
  long cmTime=System.nanoTime() - cmStartTime;
  message+="String_Node_Str" + Helper.prettyPrintNanoSeconds(cmTime) + "String_Node_Str";
  logger.info(message);
  ConfParser parser=ConfParser.parseFile(file);
  Monitor ksMonitor=JamonMonitorLogger.getTimeMonitor(Start.class,"String_Node_Str").start();
  sources=new HashSet<KnowledgeSource>();
  Map<URL,Class<? extends KnowledgeSource>> importedFiles=getImportedFiles(parser,baseDir);
  for (  Map.Entry<URL,Class<? extends KnowledgeSource>> entry : importedFiles.entrySet()) {
    KnowledgeSource ks=cm.knowledgeSource(entry.getValue());
    cm.applyConfigEntry(ks,"String_Node_Str",entry.getKey());
    sources.add(ks);
    configureComponent(cm,ks,parser);
    initComponent(cm,ks);
  }
  ksMonitor.stop();
  Monitor rsMonitor=JamonMonitorLogger.getTimeMonitor(Start.class,"String_Node_Str").start();
  ConfFileOption reasonerOption=parser.getConfOptionsByName("String_Node_Str");
  Class<? extends ReasonerComponent> rcClass;
  if (reasonerOption != null) {
    rcClass=confMapper.getReasonerComponentClass(reasonerOption.getStringValue());
    if (rcClass == null) {
      handleError("String_Node_Str" + reasonerOption.getStringValue() + "String_Node_Str"+ reasonerOption+ "String_Node_Str"+ confMapper.getReasoners()+ "String_Node_Str");
    }
  }
 else {
    rcClass=FastInstanceChecker.class;
  }
  rc=cm.reasoner(rcClass,sources);
  configureComponent(cm,rc,parser);
  initComponent(cm,rc);
  rs=cm.reasoningService(rc);
  rsMonitor.stop();
  Monitor lpMonitor=JamonMonitorLogger.getTimeMonitor(Start.class,"String_Node_Str").start();
  ConfFileOption problemOption=parser.getConfOptionsByName("String_Node_Str");
  Class<? extends LearningProblem> lpClass;
  if (problemOption != null) {
    lpClass=confMapper.getLearningProblemClass(problemOption.getStringValue());
    if (lpClass == null) {
      handleError("String_Node_Str" + problemOption.getStringValue() + "String_Node_Str"+ problemOption+ "String_Node_Str"+ confMapper.getLearningProblems()+ "String_Node_Str");
    }
  }
 else {
    lpClass=PosNegDefinitionLP.class;
  }
  lp=cm.learningProblem(lpClass,rs);
  SortedSet<String> posExamples=parser.getPositiveExamples();
  SortedSet<String> negExamples=parser.getNegativeExamples();
  cm.applyConfigEntry(lp,"String_Node_Str",posExamples);
  if (lpClass != PosOnlyDefinitionLP.class)   cm.applyConfigEntry(lp,"String_Node_Str",negExamples);
  configureComponent(cm,lp,parser);
  initComponent(cm,lp);
  lpMonitor.stop();
  Monitor laMonitor=JamonMonitorLogger.getTimeMonitor(Start.class,"String_Node_Str").start();
  ConfFileOption algorithmOption=parser.getConfOptionsByName("String_Node_Str");
  Class<? extends LearningAlgorithm> laClass;
  if (problemOption != null) {
    laClass=confMapper.getLearningAlgorithmClass(algorithmOption.getStringValue());
    if (laClass == null) {
      handleError("String_Node_Str" + algorithmOption.getStringValue() + "String_Node_Str"+ algorithmOption+ "String_Node_Str"+ confMapper.getLearningAlgorithms()+ "String_Node_Str");
    }
  }
 else {
    laClass=ExampleBasedROLComponent.class;
  }
  try {
    la=cm.learningAlgorithm(laClass,lp,rs);
  }
 catch (  LearningProblemUnsupportedException e) {
    e.printStackTrace();
  }
  configureComponent(cm,la,parser);
  initComponent(cm,la);
  laMonitor.stop();
  performExports(parser,baseDir,sources,rs);
  processCLIOptions(cm,parser,rs,lp);
}

Fixed version (ground truth):
/** 
 * Initialise all components based on conf file.
 * @param file Conf file to read.
 * @throws ComponentInitException
 * @throws ParseException 
 * @throws FileNotFoundException 
 */
public Start(File file) throws ComponentInitException, FileNotFoundException, ParseException {
  String baseDir=file.getParentFile().getPath();
  String message="String_Node_Str";
  long cmStartTime=System.nanoTime();
  ComponentManager cm=ComponentManager.getInstance();
  long cmTime=System.nanoTime() - cmStartTime;
  message+="String_Node_Str" + Helper.prettyPrintNanoSeconds(cmTime) + "String_Node_Str";
  logger.info(message);
  ConfParser parser=ConfParser.parseFile(file);
  Monitor ksMonitor=JamonMonitorLogger.getTimeMonitor(Start.class,"String_Node_Str").start();
  sources=new HashSet<KnowledgeSource>();
  Map<URL,Class<? extends KnowledgeSource>> importedFiles=getImportedFiles(parser,baseDir);
  for (  Map.Entry<URL,Class<? extends KnowledgeSource>> entry : importedFiles.entrySet()) {
    KnowledgeSource ks=cm.knowledgeSource(entry.getValue());
    cm.applyConfigEntry(ks,"String_Node_Str",entry.getKey());
    sources.add(ks);
    configureComponent(cm,ks,parser);
    initComponent(cm,ks);
  }
  ksMonitor.stop();
  Monitor rsMonitor=JamonMonitorLogger.getTimeMonitor(Start.class,"String_Node_Str").start();
  ConfFileOption reasonerOption=parser.getConfOptionsByName("String_Node_Str");
  Class<? extends ReasonerComponent> rcClass;
  if (reasonerOption != null) {
    rcClass=confMapper.getReasonerComponentClass(reasonerOption.getStringValue());
    if (rcClass == null) {
      handleError("String_Node_Str" + reasonerOption.getStringValue() + "String_Node_Str"+ reasonerOption+ "String_Node_Str"+ confMapper.getReasoners()+ "String_Node_Str");
    }
  }
 else {
    rcClass=FastInstanceChecker.class;
  }
  rc=cm.reasoner(rcClass,sources);
  configureComponent(cm,rc,parser);
  initComponent(cm,rc);
  rs=cm.reasoningService(rc);
  rsMonitor.stop();
  Monitor lpMonitor=JamonMonitorLogger.getTimeMonitor(Start.class,"String_Node_Str").start();
  ConfFileOption problemOption=parser.getConfOptionsByName("String_Node_Str");
  Class<? extends LearningProblem> lpClass;
  if (problemOption != null) {
    lpClass=confMapper.getLearningProblemClass(problemOption.getStringValue());
    if (lpClass == null) {
      handleError("String_Node_Str" + problemOption.getStringValue() + "String_Node_Str"+ problemOption+ "String_Node_Str"+ confMapper.getLearningProblems()+ "String_Node_Str");
    }
  }
 else {
    lpClass=PosNegDefinitionLP.class;
  }
  lp=cm.learningProblem(lpClass,rs);
  SortedSet<String> posExamples=parser.getPositiveExamples();
  SortedSet<String> negExamples=parser.getNegativeExamples();
  cm.applyConfigEntry(lp,"String_Node_Str",posExamples);
  if (lpClass != PosOnlyDefinitionLP.class)   cm.applyConfigEntry(lp,"String_Node_Str",negExamples);
  configureComponent(cm,lp,parser);
  initComponent(cm,lp);
  lpMonitor.stop();
  Monitor laMonitor=JamonMonitorLogger.getTimeMonitor(Start.class,"String_Node_Str").start();
  ConfFileOption algorithmOption=parser.getConfOptionsByName("String_Node_Str");
  Class<? extends LearningAlgorithm> laClass;
  if (algorithmOption != null) {
    laClass=confMapper.getLearningAlgorithmClass(algorithmOption.getStringValue());
    if (laClass == null) {
      handleError("String_Node_Str" + algorithmOption.getStringValue() + "String_Node_Str"+ algorithmOption+ "String_Node_Str"+ confMapper.getLearningAlgorithms()+ "String_Node_Str");
    }
  }
 else {
    laClass=ExampleBasedROLComponent.class;
  }
  try {
    la=cm.learningAlgorithm(laClass,lp,rs);
  }
 catch (  LearningProblemUnsupportedException e) {
    e.printStackTrace();
  }
  configureComponent(cm,la,parser);
  initComponent(cm,la);
  laMonitor.stop();
  performExports(parser,baseDir,sources,rs);
  processCLIOptions(cm,parser,rs,lp);
}