Program: 40739
Project: 40739
Buggy source:
@SuppressWarnings("String_Node_Str") public static int run(Path signalData,Path output,Float regularizationFactor,Boolean addIntercept,Boolean regularizeIntercept,Integer iterationsMaximum,Configuration baseConf) throws IOException, ClassNotFoundException, InterruptedException {
  Configuration conf=new Configuration(baseConf);
  float thisRegularizationFactor=null == regularizationFactor ? DEFAULT_REGULARIZATION_FACTOR : regularizationFactor;
  boolean thisAddIntercept=null == addIntercept ? true : addIntercept;
  boolean thisRegularizeIntercept=null == regularizeIntercept ? false : regularizeIntercept;
  int thisIterationsMaximum=null == iterationsMaximum ? DEFAULT_ADMM_ITERATIONS_MAX : iterationsMaximum;
  int iterationNumber=0;
  boolean isFinalIteration=false;
  conf.set("String_Node_Str","String_Node_Str");
  conf.setInt("String_Node_Str",6000000);
  conf.setInt("String_Node_Str",4096);
  conf.setInt("String_Node_Str",4096);
  FileSystem fs=output.getFileSystem(conf);
  HadoopUtil.delete(conf,output);
  String intermediateHdfsBaseString=output.toString() + "String_Node_Str";
  while (!isFinalIteration) {
    long preStatus=0;
    Path previousHdfsResultsPath=new Path(intermediateHdfsBaseString + ITERATION_FOLDER_NAME + (iterationNumber - 1));
    Path currentHdfsResultsPath=new Path(intermediateHdfsBaseString + ITERATION_FOLDER_NAME + iterationNumber);
    long curStatus=doAdmmIteration(conf,previousHdfsResultsPath,currentHdfsResultsPath,signalData,iterationNumber,thisAddIntercept,thisRegularizeIntercept,thisRegularizationFactor);
    isFinalIteration=convergedOrMaxed(curStatus,preStatus,iterationNumber,thisIterationsMaximum);
    if (isFinalIteration) {
      Path finalOutput=new Path(output,ITERATION_FOLDER_NAME_FINAL);
      fs.delete(finalOutput);
      fs.rename(currentHdfsResultsPath,finalOutput);
    }
    iterationNumber++;
  }
  return 0;
}

Fixed version (ground truth):
public static int run(Path signalData,Path output,Float regularizationFactor,Boolean addIntercept,Boolean regularizeIntercept,Integer iterationsMaximum,Configuration baseConf) throws IOException, ClassNotFoundException, InterruptedException {
  Configuration conf=new Configuration(baseConf);
  float thisRegularizationFactor=null == regularizationFactor ? DEFAULT_REGULARIZATION_FACTOR : regularizationFactor;
  boolean thisAddIntercept=null == addIntercept ? true : addIntercept;
  boolean thisRegularizeIntercept=null == regularizeIntercept ? false : regularizeIntercept;
  int thisIterationsMaximum=null == iterationsMaximum ? DEFAULT_ADMM_ITERATIONS_MAX : iterationsMaximum;
  int iterationNumber=0;
  boolean isFinalIteration=false;
  conf.set("String_Node_Str","String_Node_Str");
  conf.setInt("String_Node_Str",6000000);
  conf.setInt("String_Node_Str",4096);
  conf.setInt("String_Node_Str",4096);
  FileSystem fs=output.getFileSystem(conf);
  HadoopUtil.delete(conf,output);
  String intermediateHdfsBaseString=output.toString() + "String_Node_Str";
  while (!isFinalIteration) {
    long preStatus=0;
    Path previousHdfsResultsPath=new Path(intermediateHdfsBaseString + ITERATION_FOLDER_NAME + (iterationNumber - 1));
    Path currentHdfsResultsPath=new Path(intermediateHdfsBaseString + ITERATION_FOLDER_NAME + iterationNumber);
    long curStatus=doAdmmIteration(conf,previousHdfsResultsPath,currentHdfsResultsPath,signalData,iterationNumber,thisAddIntercept,thisRegularizeIntercept,thisRegularizationFactor);
    Log.info("String_Node_Str",curStatus);
    isFinalIteration=convergedOrMaxed(curStatus,preStatus,iterationNumber,thisIterationsMaximum);
    if (isFinalIteration) {
      Path finalOutput=new Path(output,FINAL_MODEL);
      fs.delete(finalOutput,true);
      fs.rename(new Path(currentHdfsResultsPath,"String_Node_Str"),finalOutput);
    }
    iterationNumber++;
  }
  return 0;
}