Program: 7090
Project: 7090
Buggy source:
@Override protected void startUp() throws Exception {
  final Job job=Job.getInstance(new Configuration(hConf));
  job.setJobName(getJobName(context));
  Configuration mapredConf=job.getConfiguration();
  if (UserGroupInformation.isSecurityEnabled()) {
    mapredConf.unset("String_Node_Str");
    mapredConf.setBoolean(Job.JOB_AM_ACCESS_DISABLED,false);
    Credentials credentials=UserGroupInformation.getCurrentUser().getCredentials();
    LOG.info("String_Node_Str",credentials.getAllTokens());
    job.getCredentials().addAll(credentials);
  }
  ClassLoader classLoader=new MapReduceClassLoader(context.getProgram().getClassLoader());
  ClassLoaders.setContextClassLoader(classLoader);
  job.getConfiguration().setClassLoader(classLoader);
  context.setJob(job);
  runUserCodeInTx(new TransactionExecutor.Subroutine(){
    @Override public void apply() throws Exception {
      beforeSubmit();
      setInputDatasetIfNeeded(job);
      setOutputDatasetIfNeeded(job);
    }
  }
,"String_Node_Str");
  Location pluginArchive=createPluginArchive(context.getAdapterSpecification(),context.getProgram().getId());
  try {
    if (pluginArchive != null) {
      job.addCacheArchive(pluginArchive.toURI());
    }
    classLoader=new MapReduceClassLoader(context.getProgram().getClassLoader(),context.getAdapterSpecification(),context.getPluginInstantiator());
    ClassLoaders.setContextClassLoader(classLoader);
    job.getConfiguration().setClassLoader(classLoader);
    setOutputClassesIfNeeded(job);
    setMapOutputClassesIfNeeded(job);
    mapredConf.setBoolean("String_Node_Str",true);
    mapredConf.setBoolean(Job.MAPREDUCE_JOB_USER_CLASSPATH_FIRST,true);
    mapredConf.setBoolean(Job.MAPREDUCE_JOB_CLASSLOADER,true);
    String yarnAppClassPath=mapredConf.get(YarnConfiguration.YARN_APPLICATION_CLASSPATH,Joiner.on(',').join(YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH));
    mapredConf.set(YarnConfiguration.YARN_APPLICATION_CLASSPATH,"String_Node_Str" + yarnAppClassPath);
    Resources mapperResources=context.getMapperResources();
    Resources reducerResources=context.getReducerResources();
    if (mapperResources != null) {
      mapredConf.setInt(Job.MAP_MEMORY_MB,mapperResources.getMemoryMB());
      mapredConf.set(Job.MAP_JAVA_OPTS,"String_Node_Str" + (int)(mapperResources.getMemoryMB() * 0.8) + "String_Node_Str");
      setVirtualCores(mapredConf,mapperResources.getVirtualCores(),"String_Node_Str");
    }
    if (reducerResources != null) {
      mapredConf.setInt(Job.REDUCE_MEMORY_MB,reducerResources.getMemoryMB());
      mapredConf.set(Job.REDUCE_JAVA_OPTS,"String_Node_Str" + (int)(reducerResources.getMemoryMB() * 0.8) + "String_Node_Str");
      setVirtualCores(mapredConf,reducerResources.getVirtualCores(),"String_Node_Str");
    }
    MapperWrapper.wrap(job);
    ReducerWrapper.wrap(job);
    Location jobJar=buildJobJar(context);
    try {
      Location programJarCopy=copyProgramJar();
      try {
        job.setJar(jobJar.toURI().toString());
        job.addCacheFile(programJarCopy.toURI());
        MapReduceContextConfig contextConfig=new MapReduceContextConfig(job.getConfiguration());
        Transaction tx=txClient.startLong();
        try {
          CConfiguration cConfCopy=cConf;
          if (pluginArchive != null) {
            cConfCopy=CConfiguration.copy(cConf);
            cConfCopy.set(Constants.AppFabric.APP_TEMPLATE_DIR,pluginArchive.getName());
          }
          contextConfig.set(context,cConfCopy,tx,programJarCopy.toURI());
          LOG.info("String_Node_Str",context);
          job.submit();
          this.job=job;
          this.transaction=tx;
          this.cleanupTask=createCleanupTask(jobJar,programJarCopy,pluginArchive);
        }
 catch (        Throwable t) {
          Transactions.invalidateQuietly(txClient,tx);
          throw Throwables.propagate(t);
        }
      }
 catch (      Throwable t) {
        Locations.deleteQuietly(programJarCopy);
        throw Throwables.propagate(t);
      }
    }
 catch (    Throwable t) {
      Locations.deleteQuietly(jobJar);
      throw Throwables.propagate(t);
    }
  }
 catch (  Throwable t) {
    if (pluginArchive != null) {
      Locations.deleteQuietly(pluginArchive);
    }
    LOG.error("String_Node_Str",context,t);
    throw Throwables.propagate(t);
  }
}

Fixed version (ground truth):
@Override protected void startUp() throws Exception {
  final Job job=Job.getInstance(new Configuration(hConf));
  job.setJobName(getJobName(context));
  Configuration mapredConf=job.getConfiguration();
  if (UserGroupInformation.isSecurityEnabled()) {
    mapredConf.unset("String_Node_Str");
    mapredConf.setBoolean(Job.JOB_AM_ACCESS_DISABLED,false);
    Credentials credentials=UserGroupInformation.getCurrentUser().getCredentials();
    LOG.info("String_Node_Str",credentials.getAllTokens());
    job.getCredentials().addAll(credentials);
  }
  classLoader=new MapReduceClassLoader(context.getProgram().getClassLoader());
  job.getConfiguration().setClassLoader(new WeakReferenceDelegatorClassLoader(classLoader));
  ClassLoaders.setContextClassLoader(job.getConfiguration().getClassLoader());
  context.setJob(job);
  runUserCodeInTx(new TransactionExecutor.Subroutine(){
    @Override public void apply() throws Exception {
      beforeSubmit();
      setInputDatasetIfNeeded(job);
      setOutputDatasetIfNeeded(job);
    }
  }
,"String_Node_Str");
  Location pluginArchive=createPluginArchive(context.getAdapterSpecification(),context.getProgram().getId());
  try {
    if (pluginArchive != null) {
      job.addCacheArchive(pluginArchive.toURI());
    }
    classLoader=new MapReduceClassLoader(context.getProgram().getClassLoader(),context.getAdapterSpecification(),context.getPluginInstantiator());
    job.getConfiguration().setClassLoader(new WeakReferenceDelegatorClassLoader(classLoader));
    ClassLoaders.setContextClassLoader(job.getConfiguration().getClassLoader());
    setOutputClassesIfNeeded(job);
    setMapOutputClassesIfNeeded(job);
    mapredConf.setBoolean("String_Node_Str",true);
    mapredConf.setBoolean(Job.MAPREDUCE_JOB_USER_CLASSPATH_FIRST,true);
    mapredConf.setBoolean(Job.MAPREDUCE_JOB_CLASSLOADER,true);
    String yarnAppClassPath=mapredConf.get(YarnConfiguration.YARN_APPLICATION_CLASSPATH,Joiner.on(',').join(YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH));
    mapredConf.set(YarnConfiguration.YARN_APPLICATION_CLASSPATH,"String_Node_Str" + yarnAppClassPath);
    Resources mapperResources=context.getMapperResources();
    Resources reducerResources=context.getReducerResources();
    if (mapperResources != null) {
      mapredConf.setInt(Job.MAP_MEMORY_MB,mapperResources.getMemoryMB());
      mapredConf.set(Job.MAP_JAVA_OPTS,"String_Node_Str" + (int)(mapperResources.getMemoryMB() * 0.8) + "String_Node_Str");
      setVirtualCores(mapredConf,mapperResources.getVirtualCores(),"String_Node_Str");
    }
    if (reducerResources != null) {
      mapredConf.setInt(Job.REDUCE_MEMORY_MB,reducerResources.getMemoryMB());
      mapredConf.set(Job.REDUCE_JAVA_OPTS,"String_Node_Str" + (int)(reducerResources.getMemoryMB() * 0.8) + "String_Node_Str");
      setVirtualCores(mapredConf,reducerResources.getVirtualCores(),"String_Node_Str");
    }
    MapperWrapper.wrap(job);
    ReducerWrapper.wrap(job);
    Location jobJar=buildJobJar(context);
    try {
      Location programJarCopy=copyProgramJar();
      try {
        job.setJar(jobJar.toURI().toString());
        job.addCacheFile(programJarCopy.toURI());
        MapReduceContextConfig contextConfig=new MapReduceContextConfig(job.getConfiguration());
        Transaction tx=txClient.startLong();
        try {
          CConfiguration cConfCopy=cConf;
          if (pluginArchive != null) {
            cConfCopy=CConfiguration.copy(cConf);
            cConfCopy.set(Constants.AppFabric.APP_TEMPLATE_DIR,pluginArchive.getName());
          }
          contextConfig.set(context,cConfCopy,tx,programJarCopy.toURI());
          LOG.info("String_Node_Str",context);
          job.submit();
          this.job=job;
          this.transaction=tx;
          this.cleanupTask=createCleanupTask(jobJar,programJarCopy,pluginArchive);
        }
 catch (        Throwable t) {
          Transactions.invalidateQuietly(txClient,tx);
          throw Throwables.propagate(t);
        }
      }
 catch (      Throwable t) {
        Locations.deleteQuietly(programJarCopy);
        throw Throwables.propagate(t);
      }
    }
 catch (    Throwable t) {
      Locations.deleteQuietly(jobJar);
      throw Throwables.propagate(t);
    }
  }
 catch (  Throwable t) {
    if (pluginArchive != null) {
      Locations.deleteQuietly(pluginArchive);
    }
    LOG.error("String_Node_Str",context,t);
    throw Throwables.propagate(t);
  }
}