Program: 63095
Project: 63095
Buggy source:
@SuppressWarnings("String_Node_Str") @Override protected ExecuteResult doWork(ExecutableContext context) throws ExecuteException {
  final String mapReduceJobClass=getMapReduceJobClass();
  String params=getMapReduceParams();
  Preconditions.checkNotNull(mapReduceJobClass);
  Preconditions.checkNotNull(params);
  try {
    Job job;
    final Map<String,String> extra=executableManager.getOutput(getId()).getExtra();
    if (extra.containsKey(ExecutableConstants.MR_JOB_ID)) {
      job=new Cluster(new Configuration()).getJob(JobID.forName(extra.get(ExecutableConstants.MR_JOB_ID)));
      logger.info("String_Node_Str" + extra.get(ExecutableConstants.MR_JOB_ID + "String_Node_Str"));
    }
 else {
      final Constructor<? extends AbstractHadoopJob> constructor=(Constructor<? extends AbstractHadoopJob>)Class.forName(mapReduceJobClass).getConstructor();
      final AbstractHadoopJob hadoopJob=constructor.newInstance();
      hadoopJob.setAsync(true);
      logger.info("String_Node_Str");
      logger.info(params);
      String[] args=params.trim().split("String_Node_Str");
      try {
        ToolRunner.run(hadoopJob,args);
      }
 catch (      Exception ex) {
        StringBuilder log=new StringBuilder();
        logger.error("String_Node_Str" + this.toString(),ex);
        StringWriter stringWriter=new StringWriter();
        ex.printStackTrace(new PrintWriter(stringWriter));
        log.append(stringWriter.toString()).append("String_Node_Str");
        log.append("String_Node_Str").append(2);
        return new ExecuteResult(ExecuteResult.State.ERROR,log.toString());
      }
      job=hadoopJob.getJob();
    }
    final StringBuilder output=new StringBuilder();
    final HadoopCmdOutput hadoopCmdOutput=new HadoopCmdOutput(job,output);
    final String rmWebHost=job.getConfiguration().get("String_Node_Str");
    final String restStatusCheckUrl=rmWebHost + "String_Node_Str";
    String mrJobId=hadoopCmdOutput.getMrJobId();
    HadoopStatusChecker statusChecker=new HadoopStatusChecker(restStatusCheckUrl,mrJobId,output);
    JobStepStatusEnum status=JobStepStatusEnum.NEW;
    while (!isDiscarded()) {
      JobStepStatusEnum newStatus=statusChecker.checkStatus();
      if (status == JobStepStatusEnum.WAITING && (newStatus == JobStepStatusEnum.FINISHED || newStatus == JobStepStatusEnum.ERROR || newStatus == JobStepStatusEnum.RUNNING)) {
        final long waitTime=System.currentTimeMillis() - getStartTime();
        setMapReduceWaitTime(waitTime);
      }
      status=newStatus;
      executableManager.addJobInfo(getId(),hadoopCmdOutput.getInfo());
      if (status.isComplete()) {
        hadoopCmdOutput.updateJobCounter();
        final Map<String,String> info=hadoopCmdOutput.getInfo();
        info.put(ExecutableConstants.SOURCE_RECORDS_COUNT,hadoopCmdOutput.getMapInputRecords());
        info.put(ExecutableConstants.SOURCE_RECORDS_SIZE,hadoopCmdOutput.getHdfsBytesRead());
        info.put(ExecutableConstants.HDFS_BYTES_WRITTEN,hadoopCmdOutput.getHdfsBytesWritten());
        executableManager.addJobInfo(getId(),info);
        if (status == JobStepStatusEnum.FINISHED) {
          return new ExecuteResult(ExecuteResult.State.SUCCEED,output.toString());
        }
 else {
          return new ExecuteResult(ExecuteResult.State.FAILED,output.toString());
        }
      }
      Thread.sleep(context.getConfig().getYarnStatusCheckIntervalSeconds() * 1000);
    }
    return new ExecuteResult(ExecuteResult.State.DISCARDED,output.toString());
  }
 catch (  ReflectiveOperationException e) {
    logger.error("String_Node_Str" + getParam(KEY_MR_JOB),e);
    return new ExecuteResult(ExecuteResult.State.ERROR,e.getLocalizedMessage());
  }
catch (  Exception e) {
    logger.error("String_Node_Str" + this.toString(),e);
    return new ExecuteResult(ExecuteResult.State.ERROR,e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected ExecuteResult doWork(ExecutableContext context) throws ExecuteException {
  final String mapReduceJobClass=getMapReduceJobClass();
  String params=getMapReduceParams();
  Preconditions.checkNotNull(mapReduceJobClass);
  Preconditions.checkNotNull(params);
  try {
    Job job;
    final Map<String,String> extra=executableManager.getOutput(getId()).getExtra();
    if (extra.containsKey(ExecutableConstants.MR_JOB_ID)) {
      job=new Cluster(new Configuration()).getJob(JobID.forName(extra.get(ExecutableConstants.MR_JOB_ID)));
      logger.info("String_Node_Str" + extra.get(ExecutableConstants.MR_JOB_ID + "String_Node_Str"));
    }
 else {
      final Constructor<? extends AbstractHadoopJob> constructor=(Constructor<? extends AbstractHadoopJob>)Class.forName(mapReduceJobClass).getConstructor();
      final AbstractHadoopJob hadoopJob=constructor.newInstance();
      hadoopJob.setAsync(true);
      logger.info("String_Node_Str");
      logger.info(params);
      String[] args=params.trim().split("String_Node_Str");
      try {
        ToolRunner.run(hadoopJob,args);
      }
 catch (      Exception ex) {
        StringBuilder log=new StringBuilder();
        logger.error("String_Node_Str" + this.toString(),ex);
        StringWriter stringWriter=new StringWriter();
        ex.printStackTrace(new PrintWriter(stringWriter));
        log.append(stringWriter.toString()).append("String_Node_Str");
        log.append("String_Node_Str").append(2);
        return new ExecuteResult(ExecuteResult.State.ERROR,log.toString());
      }
      job=hadoopJob.getJob();
    }
    final StringBuilder output=new StringBuilder();
    final HadoopCmdOutput hadoopCmdOutput=new HadoopCmdOutput(job,output);
    String rmWebHost=job.getConfiguration().get("String_Node_Str");
    if (StringUtils.isEmpty(rmWebHost)) {
      return new ExecuteResult(ExecuteResult.State.ERROR,"String_Node_Str");
    }
    if (rmWebHost.startsWith("String_Node_Str") || rmWebHost.startsWith("String_Node_Str")) {
    }
 else {
      rmWebHost="String_Node_Str" + rmWebHost;
    }
    logger.info("String_Node_Str" + rmWebHost);
    final String restStatusCheckUrl=rmWebHost + "String_Node_Str";
    String mrJobId=hadoopCmdOutput.getMrJobId();
    HadoopStatusChecker statusChecker=new HadoopStatusChecker(restStatusCheckUrl,mrJobId,output);
    JobStepStatusEnum status=JobStepStatusEnum.NEW;
    while (!isDiscarded()) {
      JobStepStatusEnum newStatus=statusChecker.checkStatus();
      if (status == JobStepStatusEnum.WAITING && (newStatus == JobStepStatusEnum.FINISHED || newStatus == JobStepStatusEnum.ERROR || newStatus == JobStepStatusEnum.RUNNING)) {
        final long waitTime=System.currentTimeMillis() - getStartTime();
        setMapReduceWaitTime(waitTime);
      }
      status=newStatus;
      executableManager.addJobInfo(getId(),hadoopCmdOutput.getInfo());
      if (status.isComplete()) {
        hadoopCmdOutput.updateJobCounter();
        final Map<String,String> info=hadoopCmdOutput.getInfo();
        info.put(ExecutableConstants.SOURCE_RECORDS_COUNT,hadoopCmdOutput.getMapInputRecords());
        info.put(ExecutableConstants.SOURCE_RECORDS_SIZE,hadoopCmdOutput.getHdfsBytesRead());
        info.put(ExecutableConstants.HDFS_BYTES_WRITTEN,hadoopCmdOutput.getHdfsBytesWritten());
        executableManager.addJobInfo(getId(),info);
        if (status == JobStepStatusEnum.FINISHED) {
          return new ExecuteResult(ExecuteResult.State.SUCCEED,output.toString());
        }
 else {
          return new ExecuteResult(ExecuteResult.State.FAILED,output.toString());
        }
      }
      Thread.sleep(context.getConfig().getYarnStatusCheckIntervalSeconds() * 1000);
    }
    return new ExecuteResult(ExecuteResult.State.DISCARDED,output.toString());
  }
 catch (  ReflectiveOperationException e) {
    logger.error("String_Node_Str" + getParam(KEY_MR_JOB),e);
    return new ExecuteResult(ExecuteResult.State.ERROR,e.getLocalizedMessage());
  }
catch (  Exception e) {
    logger.error("String_Node_Str" + this.toString(),e);
    return new ExecuteResult(ExecuteResult.State.ERROR,e.getLocalizedMessage());
  }
}