Program: 7911
Project: 7911
Buggy source:
@Override public Cancellable submit(final MapReduce job,com.continuuity.weave.filesystem.Location jobJarLocation,final BasicMapReduceContext context,final JobFinishCallback callback) throws Exception {
  final Job jobConf=Job.getInstance(conf);
  context.setJob(jobConf);
  job.beforeSubmit(context);
  DataSet inputDataset=setInputDataSetIfNeeded(jobConf,context);
  DataSet outputDataset=setOutputDataSetIfNeeded(jobConf,context);
  boolean useDataSetAsInputOrOutput=inputDataset != null || outputDataset != null;
  if (useDataSetAsInputOrOutput) {
    MapReduceContextAccessor.setRunId(jobConf.getConfiguration(),context.getRunId().getId());
    MapReduceContextAccessor.put(context.getRunId().getId(),context);
  }
  jobConf.addArchiveToClassPath(new Path(jobJarLocation.toURI().getPath()));
  new Thread(){
    @Override public void run(){
      try {
        LoggingContextAccessor.setLoggingContext(context.getLoggingContext());
        boolean success;
        try {
          LOG.info("String_Node_Str",context.toString());
          success=jobConf.waitForCompletion(true);
        }
 catch (        InterruptedException e) {
          throw Throwables.propagate(e);
        }
catch (        Exception e) {
          throw Throwables.propagate(e);
        }
        job.onFinish(success,context);
      }
 catch (      Exception e) {
        throw Throwables.propagate(e);
      }
 finally {
        callback.onFinished(true);
      }
    }
  }
.start();
  return new Cancellable(){
    @Override public void cancel(){
      try {
        jobConf.killJob();
      }
 catch (      Exception e) {
        throw Throwables.propagate(e);
      }
    }
  }
;
}

Fixed version (ground truth):
@Override public Cancellable submit(final MapReduce job,Location jobJarLocation,final BasicMapReduceContext context,final JobFinishCallback callback) throws Exception {
  final Job jobConf=Job.getInstance(conf);
  context.setJob(jobConf);
  job.beforeSubmit(context);
  DataSet inputDataset=setInputDataSetIfNeeded(jobConf,context);
  DataSet outputDataset=setOutputDataSetIfNeeded(jobConf,context);
  boolean useDataSetAsInputOrOutput=inputDataset != null || outputDataset != null;
  if (useDataSetAsInputOrOutput) {
    MapReduceContextAccessor.setRunId(jobConf.getConfiguration(),context.getRunId().getId());
    MapReduceContextAccessor.put(context.getRunId().getId(),context);
  }
  jobConf.addArchiveToClassPath(new Path(jobJarLocation.toURI().getPath()));
  new Thread(){
    @Override public void run(){
      try {
        LoggingContextAccessor.setLoggingContext(context.getLoggingContext());
        boolean success;
        try {
          LOG.info("String_Node_Str",context.toString());
          success=jobConf.waitForCompletion(true);
        }
 catch (        InterruptedException e) {
          throw Throwables.propagate(e);
        }
catch (        Exception e) {
          throw Throwables.propagate(e);
        }
        job.onFinish(success,context);
      }
 catch (      Exception e) {
        throw Throwables.propagate(e);
      }
 finally {
        callback.onFinished(true);
      }
    }
  }
.start();
  return new Cancellable(){
    @Override public void cancel(){
      try {
        jobConf.killJob();
      }
 catch (      Exception e) {
        throw Throwables.propagate(e);
      }
    }
  }
;
}