Program: 10154
Project: 10154
Buggy source:
/** 
 * Initialise all components based on conf file.
 * @param file Conf file to read.
 * @throws ComponentInitException
 */
public Start(File file) throws ComponentInitException {
  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);
  Map<Class<? extends Component>,String> componentPrefixMapping=createComponentPrefixMapping();
  ConfParser parser=ConfParser.parseFile(file);
  Monitor ksMonitor=JamonMonitorLogger.getTimeMonitor(Start.class,"String_Node_Str").start();
  Set<KnowledgeSource> 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().toString());
    sources.add(ks);
    configureComponent(cm,ks,componentPrefixMapping,parser);
    initComponent(cm,ks);
  }
  ksMonitor.stop();
  Monitor rsMonitor=JamonMonitorLogger.getTimeMonitor(Start.class,"String_Node_Str").start();
  ConfFileOption reasonerOption=parser.getConfOptionsByName("String_Node_Str");
  rc=cm.reasoner(getReasonerClass(reasonerOption),sources);
  configureComponent(cm,rc,componentPrefixMapping,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");
  lp=cm.learningProblem(getLearningProblemClass(problemOption),rs);
  SortedSet<String> posExamples=parser.getPositiveExamples();
  SortedSet<String> negExamples=parser.getNegativeExamples();
  cm.applyConfigEntry(lp,"String_Node_Str",posExamples);
  if (getLearningProblemClass(problemOption) != PosOnlyDefinitionLP.class)   cm.applyConfigEntry(lp,"String_Node_Str",negExamples);
  configureComponent(cm,lp,componentPrefixMapping,parser);
  initComponent(cm,lp);
  lpMonitor.stop();
  Monitor laMonitor=JamonMonitorLogger.getTimeMonitor(Start.class,"String_Node_Str").start();
  ConfFileOption algorithmOption=parser.getConfOptionsByName("String_Node_Str");
  try {
    la=cm.learningAlgorithm(getLearningAlgorithm(algorithmOption),lp,rs);
  }
 catch (  LearningProblemUnsupportedException e) {
    e.printStackTrace();
  }
  configureComponent(cm,la,componentPrefixMapping,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
 */
public Start(File file) throws ComponentInitException {
  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);
  Map<Class<? extends Component>,String> componentPrefixMapping=createComponentPrefixMapping();
  ConfParser parser=ConfParser.parseFile(file);
  Monitor ksMonitor=JamonMonitorLogger.getTimeMonitor(Start.class,"String_Node_Str").start();
  Set<KnowledgeSource> 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,componentPrefixMapping,parser);
    initComponent(cm,ks);
  }
  ksMonitor.stop();
  Monitor rsMonitor=JamonMonitorLogger.getTimeMonitor(Start.class,"String_Node_Str").start();
  ConfFileOption reasonerOption=parser.getConfOptionsByName("String_Node_Str");
  rc=cm.reasoner(getReasonerClass(reasonerOption),sources);
  configureComponent(cm,rc,componentPrefixMapping,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");
  lp=cm.learningProblem(getLearningProblemClass(problemOption),rs);
  SortedSet<String> posExamples=parser.getPositiveExamples();
  SortedSet<String> negExamples=parser.getNegativeExamples();
  cm.applyConfigEntry(lp,"String_Node_Str",posExamples);
  if (getLearningProblemClass(problemOption) != PosOnlyDefinitionLP.class)   cm.applyConfigEntry(lp,"String_Node_Str",negExamples);
  configureComponent(cm,lp,componentPrefixMapping,parser);
  initComponent(cm,lp);
  lpMonitor.stop();
  Monitor laMonitor=JamonMonitorLogger.getTimeMonitor(Start.class,"String_Node_Str").start();
  ConfFileOption algorithmOption=parser.getConfOptionsByName("String_Node_Str");
  try {
    la=cm.learningAlgorithm(getLearningAlgorithm(algorithmOption),lp,rs);
  }
 catch (  LearningProblemUnsupportedException e) {
    e.printStackTrace();
  }
  configureComponent(cm,la,componentPrefixMapping,parser);
  initComponent(cm,la);
  laMonitor.stop();
  performExports(parser,baseDir,sources,rs);
  processCLIOptions(cm,parser,rs,lp);
}