Program: 5744
Project: 5744
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);
      Iterables.addAll(additionalClassPaths,extraClassPaths);
      twillPreparer.withEnv(ImmutableMap.of("String_Node_Str","String_Node_Str","String_Node_Str",ApplicationConstants.LOG_DIR_EXPANSION_VAR));
      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.addJVMOptions("String_Node_Str" + LOGBACK_FILE_NAME);
      }
      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));
      }
      if (User.isHBaseSecurityEnabled(hConf) || UserGroupInformation.isSecurityEnabled()) {
        twillPreparer.addSecureStore(secureStoreUpdater.update());
      }
      Iterable<Class<?>> dependencies=Iterables.concat(Collections.singletonList(HBaseTableUtilFactory.getHBaseTableUtilClass()),getKMSSecureStore(cConf),extraDependencies);
      Iterable<String> yarnAppClassPath=Arrays.asList(hConf.getStrings(YarnConfiguration.YARN_APPLICATION_CLASSPATH,YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH));
      twillPreparer.withDependencies(dependencies).withClassPaths(Iterables.concat(additionalClassPaths,yarnAppClassPath)).withApplicationClassPaths(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()));
      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);
    }
  }
);
}

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);
      Iterables.addAll(additionalClassPaths,extraClassPaths);
      twillPreparer.withEnv(ImmutableMap.of("String_Node_Str","String_Node_Str","String_Node_Str",ApplicationConstants.LOG_DIR_EXPANSION_VAR));
      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.addJVMOptions("String_Node_Str" + LOGBACK_FILE_NAME);
      }
      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));
      }
      if (User.isHBaseSecurityEnabled(hConf) || UserGroupInformation.isSecurityEnabled()) {
        twillPreparer.addSecureStore(secureStoreUpdater.update());
      }
      Iterable<Class<?>> dependencies=Iterables.concat(Collections.singletonList(HBaseTableUtilFactory.getHBaseTableUtilClass()),getKMSSecureStore(cConf),extraDependencies);
      Iterable<String> yarnAppClassPath=Arrays.asList(hConf.getTrimmedStrings(YarnConfiguration.YARN_APPLICATION_CLASSPATH,YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH));
      twillPreparer.withDependencies(dependencies).withClassPaths(Iterables.concat(additionalClassPaths,yarnAppClassPath)).withApplicationClassPaths(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()));
      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);
    }
  }
);
}