Program: 6428
Project: 6428
Buggy source:
@Override protected void startUp() throws Exception {
  File tempDir=createTempDirectory();
  cleanupTask=createCleanupTask(tempDir);
  try {
    Job job=createJob(new File(tempDir,"String_Node_Str"));
    Configuration mapredConf=job.getConfiguration();
    classLoader=new MapReduceClassLoader(injector,cConf,mapredConf,context.getProgram().getClassLoader(),context.getPlugins(),context.getPluginInstantiator());
    cleanupTask=createCleanupTask(cleanupTask,classLoader);
    mapredConf.setClassLoader(new WeakReferenceDelegatorClassLoader(classLoader));
    ClassLoaders.setContextClassLoader(mapredConf.getClassLoader());
    context.setJob(job);
    beforeSubmit(job);
    Map<String,String> localizedUserResources=localizeUserResources(job,tempDir);
    String jobName=job.getJobName();
    if (!jobName.isEmpty()) {
      LOG.warn("String_Node_Str",jobName);
    }
    job.setJobName(getJobName(context));
    Location tempLocation=createTempLocationDirectory();
    cleanupTask=createCleanupTask(cleanupTask,tempLocation);
    if (!MapReduceTaskContextProvider.isLocal(mapredConf)) {
      File pluginArchive=context.getPluginArchive();
      if (pluginArchive != null) {
        job.addCacheArchive(pluginArchive.toURI());
        mapredConf.set(Constants.Plugin.ARCHIVE,pluginArchive.getName());
      }
    }
    setOutputClassesIfNeeded(job);
    setMapOutputClassesIfNeeded(job);
    TaskType.MAP.setResources(mapredConf,context.getMapperResources());
    TaskType.REDUCE.setResources(mapredConf,context.getReducerResources());
    MapperWrapper.wrap(job);
    ReducerWrapper.wrap(job);
    File jobJar=buildJobJar(job,tempDir);
    job.setJar(jobJar.toURI().toString());
    Location programJar=programJarLocation;
    if (!MapReduceTaskContextProvider.isLocal(mapredConf)) {
      programJar=copyProgramJar(tempLocation);
      job.addCacheFile(programJar.toURI());
      List<String> paths=new ArrayList<>();
      paths.add("String_Node_Str");
      paths.add("String_Node_Str");
      Location launcherJar=createLauncherJar(Joiner.on("String_Node_Str").join(MapReduceContainerHelper.getMapReduceClassPath(mapredConf,paths)),tempLocation);
      job.addCacheFile(launcherJar.toURI());
      URI frameworkURI=MapReduceContainerHelper.getFrameworkURI(mapredConf);
      if (frameworkURI != null) {
        job.addCacheArchive(frameworkURI);
      }
      mapredConf.unset(MRJobConfig.MAPREDUCE_APPLICATION_FRAMEWORK_PATH);
      mapredConf.set(MRJobConfig.MAPREDUCE_APPLICATION_CLASSPATH,launcherJar.getName());
      mapredConf.set(YarnConfiguration.YARN_APPLICATION_CLASSPATH,launcherJar.getName());
    }
    MapReduceContextConfig contextConfig=new MapReduceContextConfig(mapredConf);
    Transaction tx=txClient.startLong();
    try {
      CConfiguration cConfCopy=cConf;
      contextConfig.set(context,cConfCopy,tx,programJar.toURI(),localizedUserResources);
      LOG.info("String_Node_Str",context);
      job.submit();
      this.job=job;
      this.transaction=tx;
    }
 catch (    Throwable t) {
      Transactions.invalidateQuietly(txClient,tx);
      throw t;
    }
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",context,t);
    cleanupTask.run();
    throw t;
  }
}

Fixed version (ground truth):
@Override protected void startUp() throws Exception {
  File tempDir=createTempDirectory();
  cleanupTask=createCleanupTask(tempDir);
  try {
    Job job=createJob(new File(tempDir,"String_Node_Str"));
    Configuration mapredConf=job.getConfiguration();
    classLoader=new MapReduceClassLoader(injector,cConf,mapredConf,context.getProgram().getClassLoader(),context.getPlugins(),context.getPluginInstantiator());
    cleanupTask=createCleanupTask(cleanupTask,classLoader);
    mapredConf.setClassLoader(new WeakReferenceDelegatorClassLoader(classLoader));
    ClassLoaders.setContextClassLoader(mapredConf.getClassLoader());
    context.setJob(job);
    beforeSubmit(job);
    Map<String,String> localizedUserResources=localizeUserResources(job,tempDir);
    String jobName=job.getJobName();
    if (!jobName.isEmpty()) {
      LOG.warn("String_Node_Str",jobName);
    }
    job.setJobName(getJobName(context));
    Location tempLocation=createTempLocationDirectory();
    cleanupTask=createCleanupTask(cleanupTask,tempLocation);
    if (!MapReduceTaskContextProvider.isLocal(mapredConf)) {
      Location pluginArchive=createPluginArchive(tempLocation);
      if (pluginArchive != null) {
        job.addCacheArchive(pluginArchive.toURI());
        mapredConf.set(Constants.Plugin.ARCHIVE,pluginArchive.getName());
      }
    }
    setOutputClassesIfNeeded(job);
    setMapOutputClassesIfNeeded(job);
    TaskType.MAP.setResources(mapredConf,context.getMapperResources());
    TaskType.REDUCE.setResources(mapredConf,context.getReducerResources());
    MapperWrapper.wrap(job);
    ReducerWrapper.wrap(job);
    File jobJar=buildJobJar(job,tempDir);
    job.setJar(jobJar.toURI().toString());
    Location programJar=programJarLocation;
    if (!MapReduceTaskContextProvider.isLocal(mapredConf)) {
      programJar=copyProgramJar(tempLocation);
      job.addCacheFile(programJar.toURI());
      List<String> paths=new ArrayList<>();
      paths.add("String_Node_Str");
      paths.add("String_Node_Str");
      Location launcherJar=createLauncherJar(Joiner.on("String_Node_Str").join(MapReduceContainerHelper.getMapReduceClassPath(mapredConf,paths)),tempLocation);
      job.addCacheFile(launcherJar.toURI());
      URI frameworkURI=MapReduceContainerHelper.getFrameworkURI(mapredConf);
      if (frameworkURI != null) {
        job.addCacheArchive(frameworkURI);
      }
      mapredConf.unset(MRJobConfig.MAPREDUCE_APPLICATION_FRAMEWORK_PATH);
      mapredConf.set(MRJobConfig.MAPREDUCE_APPLICATION_CLASSPATH,launcherJar.getName());
      mapredConf.set(YarnConfiguration.YARN_APPLICATION_CLASSPATH,launcherJar.getName());
    }
    MapReduceContextConfig contextConfig=new MapReduceContextConfig(mapredConf);
    Transaction tx=txClient.startLong();
    try {
      CConfiguration cConfCopy=cConf;
      contextConfig.set(context,cConfCopy,tx,programJar.toURI(),localizedUserResources);
      LOG.info("String_Node_Str",context);
      job.submit();
      this.job=job;
      this.transaction=tx;
    }
 catch (    Throwable t) {
      Transactions.invalidateQuietly(txClient,tx);
      throw t;
    }
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",context,t);
    cleanupTask.run();
    throw t;
  }
}