Program: 80305
Project: 80305
Buggy source:
/** 
 * Create Hadoop job according to arguments from main.
 */
@SuppressWarnings("String_Node_Str") public synchronized Job createJob(String[] args) throws IOException {
  Configuration conf=new Configuration();
  conf.setInt(GuaguaMapReduceConstants.MAPRED_TASK_TIMEOUT,conf.getInt(GuaguaMapReduceConstants.MAPRED_TASK_TIMEOUT,1200000));
  GuaguaOptionsParser parser=new GuaguaOptionsParser(conf,args);
  String hdpVersion=HDPUtils.getHdpVersionForHDP224();
  if (hdpVersion != null && hdpVersion.length() != 0) {
    conf.set("String_Node_Str",hdpVersion);
    HDPUtils.addFileToClassPath(HDPUtils.findContainingFile("String_Node_Str"),conf);
    HDPUtils.addFileToClassPath(HDPUtils.findContainingFile("String_Node_Str"),conf);
    HDPUtils.addFileToClassPath(HDPUtils.findContainingFile("String_Node_Str"),conf);
    HDPUtils.addFileToClassPath(HDPUtils.findContainingFile("String_Node_Str"),conf);
  }
  CommandLine cmdLine=parser.getCommandLine();
  checkInputSetting(conf,cmdLine);
  checkZkServerSetting(conf,cmdLine);
  checkWorkerClassSetting(conf,cmdLine);
  checkMasterClassSetting(conf,cmdLine);
  checkIterationCountSetting(conf,cmdLine);
  checkResultClassSetting(conf,cmdLine);
  String name=checkMapReduceNameSetting(cmdLine);
  @SuppressWarnings("String_Node_Str") Class<? extends InputFormat> inputFormatClass=checkInputFormatSetting(cmdLine);
  conf.setBoolean(GuaguaMapReduceConstants.MAPRED_MAP_TASKS_SPECULATIVE_EXECUTION,false);
  conf.setBoolean(GuaguaMapReduceConstants.MAPRED_REDUCE_TASKS_SPECULATIVE_EXECUTION,false);
  conf.setInt(GuaguaMapReduceConstants.MAPREDUCE_JOB_MAX_SPLIT_LOCATIONS,conf.getInt(GuaguaMapReduceConstants.MAPREDUCE_JOB_MAX_SPLIT_LOCATIONS,100));
  conf.setInt(GuaguaMapReduceConstants.IO_SORT_MB,0);
  conf.setInt(GuaguaMapReduceConstants.MAPREDUCE_JOB_COUNTERS_LIMIT,conf.getInt(GuaguaMapReduceConstants.MAPREDUCE_JOB_COUNTERS_LIMIT,512));
  conf.setInt(GuaguaMapReduceConstants.MAPRED_JOB_REDUCE_MEMORY_MB,0);
  String childJavaOpts=conf.get(GuaguaMapReduceConstants.MAPRED_CHILD_JAVA_OPTS,"String_Node_Str");
  if (childJavaOpts == null || childJavaOpts.length() == 0) {
    conf.set(GuaguaMapReduceConstants.MAPRED_CHILD_JAVA_OPTS,GuaguaMapReduceConstants.MAPRED_DEFAULT_CHILD_JAVA_OPTS);
  }
 else {
    String newChildJavaOpts=GuaguaMapReduceConstants.MAPRED_DEFAULT_CHILD_JAVA_OPTS + "String_Node_Str" + childJavaOpts;
    conf.set(GuaguaMapReduceConstants.MAPRED_CHILD_JAVA_OPTS,newChildJavaOpts.trim());
  }
  Job job=new Job(conf,name);
  job.setJarByClass(GuaguaMapReduceClient.class);
  job.setMapperClass(GuaguaMapper.class);
  job.setMapOutputKeyClass(Text.class);
  job.setMapOutputValueClass(Text.class);
  job.setInputFormatClass(inputFormatClass);
  job.setOutputFormatClass(GuaguaOutputFormat.class);
  job.setNumReduceTasks(0);
  return job;
}

Fixed version (ground truth):
/** 
 * Create Hadoop job according to arguments from main.
 */
@SuppressWarnings("String_Node_Str") public synchronized Job createJob(String[] args) throws IOException {
  Configuration conf=new Configuration();
  conf.setInt(GuaguaMapReduceConstants.MAPRED_TASK_TIMEOUT,conf.getInt(GuaguaMapReduceConstants.MAPRED_TASK_TIMEOUT,1200000));
  GuaguaOptionsParser parser=new GuaguaOptionsParser(conf,args);
  String hdpVersion=HDPUtils.getHdpVersionForHDP224();
  if (hdpVersion != null && hdpVersion.length() != 0) {
    conf.set("String_Node_Str",hdpVersion);
    HDPUtils.addFileToClassPath(HDPUtils.findContainingFile("String_Node_Str"),conf);
    HDPUtils.addFileToClassPath(HDPUtils.findContainingFile("String_Node_Str"),conf);
    HDPUtils.addFileToClassPath(HDPUtils.findContainingFile("String_Node_Str"),conf);
    HDPUtils.addFileToClassPath(HDPUtils.findContainingFile("String_Node_Str"),conf);
  }
  CommandLine cmdLine=parser.getCommandLine();
  checkInputSetting(conf,cmdLine);
  checkZkServerSetting(conf,cmdLine);
  checkWorkerClassSetting(conf,cmdLine);
  checkMasterClassSetting(conf,cmdLine);
  checkIterationCountSetting(conf,cmdLine);
  checkResultClassSetting(conf,cmdLine);
  String name=checkMapReduceNameSetting(cmdLine);
  @SuppressWarnings("String_Node_Str") Class<? extends InputFormat> inputFormatClass=checkInputFormatSetting(cmdLine);
  conf.setBoolean(GuaguaMapReduceConstants.MAPRED_MAP_TASKS_SPECULATIVE_EXECUTION,false);
  conf.setBoolean(GuaguaMapReduceConstants.MAPRED_REDUCE_TASKS_SPECULATIVE_EXECUTION,false);
  int maxSplits=conf.getInt(GuaguaMapReduceConstants.MAPREDUCE_JOB_MAX_SPLIT_LOCATIONS,100);
  if (maxSplits < 100) {
    maxSplits=100;
  }
  conf.setInt(GuaguaMapReduceConstants.MAPREDUCE_JOB_MAX_SPLIT_LOCATIONS,maxSplits);
  conf.setInt(GuaguaMapReduceConstants.IO_SORT_MB,0);
  conf.setInt(GuaguaMapReduceConstants.MAPREDUCE_JOB_COUNTERS_LIMIT,conf.getInt(GuaguaMapReduceConstants.MAPREDUCE_JOB_COUNTERS_LIMIT,512));
  conf.setInt(GuaguaMapReduceConstants.MAPRED_JOB_REDUCE_MEMORY_MB,0);
  String childJavaOpts=conf.get(GuaguaMapReduceConstants.MAPRED_CHILD_JAVA_OPTS,"String_Node_Str");
  if (childJavaOpts == null || childJavaOpts.length() == 0) {
    conf.set(GuaguaMapReduceConstants.MAPRED_CHILD_JAVA_OPTS,GuaguaMapReduceConstants.MAPRED_DEFAULT_CHILD_JAVA_OPTS);
  }
 else {
    String newChildJavaOpts=GuaguaMapReduceConstants.MAPRED_DEFAULT_CHILD_JAVA_OPTS + "String_Node_Str" + childJavaOpts;
    conf.set(GuaguaMapReduceConstants.MAPRED_CHILD_JAVA_OPTS,newChildJavaOpts.trim());
  }
  Job job=new Job(conf,name);
  job.setJarByClass(GuaguaMapReduceClient.class);
  job.setMapperClass(GuaguaMapper.class);
  job.setMapOutputKeyClass(Text.class);
  job.setMapOutputValueClass(Text.class);
  job.setInputFormatClass(inputFormatClass);
  job.setOutputFormatClass(GuaguaOutputFormat.class);
  job.setNumReduceTasks(0);
  return job;
}