Program: 5197
Project: 5197
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.getApplicationSpecification().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());
      }
    }
    TaskType.MAP.setResources(mapredConf,context.getMapperResources());
    TaskType.REDUCE.setResources(mapredConf,context.getReducerResources());
    MapperWrapper.wrap(job);
    ReducerWrapper.wrap(job);
    PartitionerWrapper.wrap(job);
    RawComparatorWrapper.CombinerGroupComparatorWrapper.wrap(job);
    RawComparatorWrapper.GroupComparatorWrapper.wrap(job);
    RawComparatorWrapper.KeyComparatorWrapper.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());
      Location launcherJar=createLauncherJar(tempLocation);
      job.addCacheFile(launcherJar.toURI());
      List<String> classpath=new ArrayList<>();
      classpath.add(launcherJar.getName());
      Location logbackLocation=ProgramRunners.createLogbackJar(tempLocation);
      if (logbackLocation != null) {
        job.addCacheFile(logbackLocation.toURI());
        classpath.add(logbackLocation.getName());
        mapredConf.set("String_Node_Str","String_Node_Str" + ApplicationConstants.LOG_DIR_EXPANSION_VAR);
        mapredConf.set("String_Node_Str","String_Node_Str" + ApplicationConstants.LOG_DIR_EXPANSION_VAR);
        mapredConf.set("String_Node_Str","String_Node_Str" + ApplicationConstants.LOG_DIR_EXPANSION_VAR);
      }
      List<String> jarFiles=new ArrayList<>();
      try (JarFile jobJarFile=new JarFile(jobJar)){
        Enumeration<JarEntry> entries=jobJarFile.entries();
        while (entries.hasMoreElements()) {
          JarEntry entry=entries.nextElement();
          if (entry.getName().startsWith("String_Node_Str") && entry.getName().endsWith("String_Node_Str")) {
            jarFiles.add("String_Node_Str" + entry.getName());
          }
        }
      }
       Collections.sort(jarFiles);
      classpath.addAll(jarFiles);
      classpath.add("String_Node_Str");
      for (      URI jarURI : CConfigurationUtil.getExtraJars(cConf)) {
        if ("String_Node_Str".equals(jarURI.getScheme())) {
          Location extraJarLocation=copyFileToLocation(new File(jarURI.getPath()),tempLocation);
          job.addCacheFile(extraJarLocation.toURI());
        }
 else {
          job.addCacheFile(jarURI);
        }
        classpath.add(LocalizationUtils.getLocalizedName(jarURI));
      }
      MapReduceContainerHelper.addMapReduceClassPath(mapredConf,classpath);
      mapredConf.set(MRJobConfig.MAPREDUCE_APPLICATION_CLASSPATH,Joiner.on("String_Node_Str").join(classpath));
      mapredConf.set(YarnConfiguration.YARN_APPLICATION_CLASSPATH,Joiner.on("String_Node_Str").join(classpath));
    }
    MapReduceContextConfig contextConfig=new MapReduceContextConfig(mapredConf);
    Transaction tx=txClient.startLong();
    try {
      CConfiguration cConfCopy=cConf;
      contextConfig.set(context,cConfCopy,tx,programJar.toURI(),localizedUserResources);
      job.submit();
      LOG.info("String_Node_Str",context);
      this.job=job;
      this.transaction=tx;
    }
 catch (    Throwable t) {
      Transactions.invalidateQuietly(txClient,tx);
      throw t;
    }
  }
 catch (  Throwable t) {
    cleanupTask.run();
    if (t instanceof TransactionFailureException && t.getCause() instanceof Exception && !(t instanceof TransactionConflictException)) {
      throw (Exception)t.getCause();
    }
    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.getApplicationSpecification().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());
      }
    }
    TaskType.MAP.setResources(mapredConf,context.getMapperResources());
    TaskType.REDUCE.setResources(mapredConf,context.getReducerResources());
    MapperWrapper.wrap(job);
    ReducerWrapper.wrap(job);
    PartitionerWrapper.wrap(job);
    RawComparatorWrapper.CombinerGroupComparatorWrapper.wrap(job);
    RawComparatorWrapper.GroupComparatorWrapper.wrap(job);
    RawComparatorWrapper.KeyComparatorWrapper.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());
      Location launcherJar=createLauncherJar(tempLocation);
      job.addCacheFile(launcherJar.toURI());
      List<String> classpath=new ArrayList<>();
      classpath.add(launcherJar.getName());
      Location logbackLocation=ProgramRunners.createLogbackJar(tempLocation);
      if (logbackLocation != null) {
        job.addCacheFile(logbackLocation.toURI());
        classpath.add(logbackLocation.getName());
        mapredConf.set("String_Node_Str","String_Node_Str" + ApplicationConstants.LOG_DIR_EXPANSION_VAR);
        mapredConf.set("String_Node_Str","String_Node_Str" + ApplicationConstants.LOG_DIR_EXPANSION_VAR);
        mapredConf.set("String_Node_Str","String_Node_Str" + ApplicationConstants.LOG_DIR_EXPANSION_VAR);
      }
      List<String> jarFiles=new ArrayList<>();
      try (JarFile jobJarFile=new JarFile(jobJar)){
        Enumeration<JarEntry> entries=jobJarFile.entries();
        while (entries.hasMoreElements()) {
          JarEntry entry=entries.nextElement();
          if (entry.getName().startsWith("String_Node_Str") && entry.getName().endsWith("String_Node_Str")) {
            jarFiles.add("String_Node_Str" + entry.getName());
          }
        }
      }
       Collections.sort(jarFiles);
      classpath.addAll(jarFiles);
      classpath.add("String_Node_Str");
      for (      URI jarURI : CConfigurationUtil.getExtraJars(cConf)) {
        if ("String_Node_Str".equals(jarURI.getScheme())) {
          Location extraJarLocation=copyFileToLocation(new File(jarURI.getPath()),tempLocation);
          job.addCacheFile(extraJarLocation.toURI());
        }
 else {
          job.addCacheFile(jarURI);
        }
        classpath.add(LocalizationUtils.getLocalizedName(jarURI));
      }
      MapReduceContainerHelper.addMapReduceClassPath(mapredConf,classpath);
      mapredConf.set(MRJobConfig.MAPREDUCE_APPLICATION_CLASSPATH,Joiner.on("String_Node_Str").join(classpath));
      mapredConf.set(YarnConfiguration.YARN_APPLICATION_CLASSPATH,Joiner.on("String_Node_Str").join(classpath));
    }
    MapReduceContextConfig contextConfig=new MapReduceContextConfig(mapredConf);
    Transaction tx=txClient.startLong();
    try {
      CConfiguration cConfCopy=cConf;
      contextConfig.set(context,cConfCopy,tx,programJar.toURI(),localizedUserResources);
      job.submit();
      LOG.info("String_Node_Str",context);
      this.job=job;
      this.transaction=tx;
    }
 catch (    Throwable t) {
      Transactions.invalidateQuietly(txClient,tx);
      throw t;
    }
  }
 catch (  LinkageError e) {
    throw new Exception(e.getMessage(),e);
  }
catch (  Throwable t) {
    cleanupTask.run();
    if (t instanceof TransactionFailureException && t.getCause() instanceof Exception && !(t instanceof TransactionConflictException)) {
      throw (Exception)t.getCause();
    }
    throw t;
  }
}