Program: 5849
Project: 5849
Buggy source:
@Override public ProgramController call() throws Exception {
  return launch(program,options,localizeResources,tempDir,new ApplicationLauncher(){
    @Override public TwillController launch(    TwillApplication twillApplication,    Iterable<String> extraClassPaths,    Iterable<? extends Class<?>> extraDependencies){
      TwillPreparer twillPreparer=twillRunner.prepare(twillApplication);
      twillPreparer.withEnv(Collections.singletonMap("String_Node_Str","String_Node_Str"));
      if (options.isDebug()) {
        twillPreparer.enableDebugging();
      }
      LOG.info("String_Node_Str",program.getId(),options.isDebug(),programOptions,logbackURI);
      if (schedulerQueueName != null && !schedulerQueueName.isEmpty()) {
        LOG.info("String_Node_Str",program.getId(),schedulerQueueName);
        twillPreparer.setSchedulerQueue(schedulerQueueName);
      }
      if (logbackURI != null) {
        twillPreparer.withResources(logbackURI);
      }
      String logLevelConf=cConf.get(Constants.COLLECT_APP_CONTAINER_LOG_LEVEL).toUpperCase();
      if ("String_Node_Str".equals(logLevelConf)) {
        twillPreparer.addJVMOptions("String_Node_Str");
      }
 else {
        LogEntry.Level logLevel=LogEntry.Level.ERROR;
        if ("String_Node_Str".equals(logLevelConf)) {
          logLevel=LogEntry.Level.TRACE;
        }
 else {
          try {
            logLevel=LogEntry.Level.valueOf(logLevelConf.toUpperCase());
          }
 catch (          Exception e) {
            LOG.warn("String_Node_Str",logLevelConf);
          }
        }
        twillPreparer.addLogHandler(new ApplicationLogHandler(new PrinterLogHandler(new PrintWriter(System.out)),logLevel));
      }
      String yarnAppClassPath=hConf.get(YarnConfiguration.YARN_APPLICATION_CLASSPATH,Joiner.on("String_Node_Str").join(YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH));
      if (User.isHBaseSecurityEnabled(hConf) || UserGroupInformation.isSecurityEnabled()) {
        twillPreparer.addSecureStore(secureStoreUpdater.update());
      }
      Iterable<Class<?>> dependencies=Iterables.concat(Collections.singletonList(HBaseTableUtilFactory.getHBaseTableUtilClass()),getKMSSecureStore(cConf),extraDependencies);
      twillPreparer.withDependencies(dependencies).withClassPaths(Iterables.concat(extraClassPaths,Splitter.on(',').trimResults().split(hConf.get(YarnConfiguration.YARN_APPLICATION_CLASSPATH,"String_Node_Str")))).withApplicationClassPaths(Splitter.on("String_Node_Str").trimResults().split(yarnAppClassPath)).withBundlerClassAcceptor(new HadoopClassExcluder(){
        @Override public boolean accept(        String className,        URL classUrl,        URL classPathUrl){
          return super.accept(className,classUrl,classPathUrl) && !className.startsWith("String_Node_Str");
        }
      }
).withApplicationArguments("String_Node_Str" + RunnableOptions.JAR,programJarName,"String_Node_Str" + RunnableOptions.HADOOP_CONF_FILE,HADOOP_CONF_FILE_NAME,"String_Node_Str" + RunnableOptions.CDAP_CONF_FILE,CDAP_CONF_FILE_NAME,"String_Node_Str" + RunnableOptions.APP_SPEC_FILE,APP_SPEC_FILE_NAME,"String_Node_Str" + RunnableOptions.PROGRAM_OPTIONS,programOptions,"String_Node_Str" + RunnableOptions.PROGRAM_ID,GSON.toJson(program.getId().toEntityId()));
      TwillController twillController;
      ClassLoader oldClassLoader=ClassLoaders.setContextClassLoader(new CombineClassLoader(AbstractDistributedProgramRunner.this.getClass().getClassLoader(),Iterables.transform(dependencies,new Function<Class<?>,ClassLoader>(){
        @Override public ClassLoader apply(        Class<?> input){
          return input.getClassLoader();
        }
      }
)));
      try {
        twillController=twillPreparer.start();
      }
  finally {
        ClassLoaders.setContextClassLoader(oldClassLoader);
      }
      return addCleanupListener(twillController,program,tempDir);
    }
  }
);
}

Fixed version (ground truth):
@Override public ProgramController call() throws Exception {
  return launch(program,options,localizeResources,tempDir,new ApplicationLauncher(){
    @Override public TwillController launch(    TwillApplication twillApplication,    Iterable<String> extraClassPaths,    Iterable<? extends Class<?>> extraDependencies){
      TwillPreparer twillPreparer=twillRunner.prepare(twillApplication);
      twillPreparer.withEnv(Collections.singletonMap("String_Node_Str","String_Node_Str"));
      if (options.isDebug()) {
        twillPreparer.enableDebugging();
      }
      LOG.info("String_Node_Str",program.getId(),options.isDebug(),programOptions,logbackURI);
      if (schedulerQueueName != null && !schedulerQueueName.isEmpty()) {
        LOG.info("String_Node_Str",program.getId(),schedulerQueueName);
        twillPreparer.setSchedulerQueue(schedulerQueueName);
      }
      if (logbackURI != null) {
        twillPreparer.withResources(logbackURI);
      }
      String logLevelConf=cConf.get(Constants.COLLECT_APP_CONTAINER_LOG_LEVEL).toUpperCase();
      if ("String_Node_Str".equals(logLevelConf)) {
        twillPreparer.addJVMOptions("String_Node_Str");
      }
 else {
        LogEntry.Level logLevel=LogEntry.Level.ERROR;
        if ("String_Node_Str".equals(logLevelConf)) {
          logLevel=LogEntry.Level.TRACE;
        }
 else {
          try {
            logLevel=LogEntry.Level.valueOf(logLevelConf.toUpperCase());
          }
 catch (          Exception e) {
            LOG.warn("String_Node_Str",logLevelConf);
          }
        }
        twillPreparer.addLogHandler(new ApplicationLogHandler(new PrinterLogHandler(new PrintWriter(System.out)),logLevel));
      }
      String yarnAppClassPath=hConf.get(YarnConfiguration.YARN_APPLICATION_CLASSPATH,Joiner.on("String_Node_Str").join(YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH));
      if (User.isHBaseSecurityEnabled(hConf) || UserGroupInformation.isSecurityEnabled()) {
        twillPreparer.addSecureStore(secureStoreUpdater.update());
      }
      Iterable<Class<?>> dependencies=Iterables.concat(Collections.singletonList(HBaseTableUtilFactory.getHBaseTableUtilClass()),getKMSSecureStore(cConf),extraDependencies);
      twillPreparer.withDependencies(dependencies).withClassPaths(Iterables.concat(extraClassPaths,Splitter.on(',').trimResults().split(hConf.get(YarnConfiguration.YARN_APPLICATION_CLASSPATH,"String_Node_Str")))).withApplicationClassPaths(Splitter.on("String_Node_Str").trimResults().split(yarnAppClassPath)).withBundlerClassAcceptor(new HadoopClassExcluder(){
        @Override public boolean accept(        String className,        URL classUrl,        URL classPathUrl){
          return super.accept(className,classUrl,classPathUrl) && !className.startsWith("String_Node_Str");
        }
      }
).withApplicationArguments("String_Node_Str" + RunnableOptions.JAR,programJarName,"String_Node_Str" + RunnableOptions.HADOOP_CONF_FILE,HADOOP_CONF_FILE_NAME,"String_Node_Str" + RunnableOptions.CDAP_CONF_FILE,CDAP_CONF_FILE_NAME,"String_Node_Str" + RunnableOptions.APP_SPEC_FILE,APP_SPEC_FILE_NAME,"String_Node_Str" + RunnableOptions.PROGRAM_OPTIONS,programOptions,"String_Node_Str" + RunnableOptions.PROGRAM_ID,GSON.toJson(program.getId().toEntityId()));
      File tmpDir=new File(cConf.get(Constants.CFG_LOCAL_DATA_DIR),cConf.get(Constants.AppFabric.TEMP_DIR));
      File jarCacheDir=new File(tmpDir,"String_Node_Str");
      File programTypeDir=new File(jarCacheDir,program.getType().name().toLowerCase());
      DirUtils.mkdirs(programTypeDir);
      twillPreparer.withApplicationArguments("String_Node_Str" + programTypeDir.getAbsolutePath());
      jarCacheTracker.registerLaunch(programTypeDir,program.getType());
      twillPreparer.withApplicationArguments("String_Node_Str" + cConf.get(Constants.AppFabric.PROGRAM_MAX_START_SECONDS),"String_Node_Str" + cConf.get(Constants.AppFabric.PROGRAM_MAX_STOP_SECONDS));
      TwillController twillController;
      ClassLoader oldClassLoader=ClassLoaders.setContextClassLoader(new CombineClassLoader(AbstractDistributedProgramRunner.this.getClass().getClassLoader(),Iterables.transform(dependencies,new Function<Class<?>,ClassLoader>(){
        @Override public ClassLoader apply(        Class<?> input){
          return input.getClassLoader();
        }
      }
)));
      try {
        twillController=twillPreparer.start();
      }
  finally {
        ClassLoaders.setContextClassLoader(oldClassLoader);
      }
      return addCleanupListener(twillController,program,tempDir);
    }
  }
);
}