Program: 38182
Project: 38182
Buggy source:
/** 
 * Runs the smoothing and step procedures. Checks if its smoothing after ratio calculation or (parameters[5])[1])just normal smoothing. Changes some parameters depending on ratio calculation or not. runs smoothing with the incoming parameters  and runs stepping if it should.
 * @param parameters Contains all parameters needed to run smoothing snd step
 * @param isRatioCalc If ratio calculation or not.
 * @throws ProcessException
 */
private void runSmoothing(String[] parameters,boolean isRatioCalc) throws ProcessException {
  String[] parameterArray;
  int stepSize=0;
  File[] filesToSmooth;
  File file;
  if (isRatioCalc) {
    parameterArray=parse(parameters[7]);
    stepSize=1;
    filesToSmooth=new File(sortedDirForFile + "String_Node_Str").listFiles();
    file=new File(sortedDirForFile + "String_Node_Str");
  }
 else {
    filesToSmooth=new File(sortedDirForFile + "String_Node_Str").listFiles();
    file=new File(sortedDirForFile + "String_Node_Str");
    if (parameters[6].equals("String_Node_Str")) {
      stepSize=1;
    }
 else {
      try {
        stepSize=Integer.parseInt(parse(parameters[5])[1]);
      }
 catch (      NumberFormatException e) {
        throw new ProcessException("String_Node_Str");
      }
    }
    parameterArray=parse(parameters[4]);
  }
  int[] intParams=new int[parameterArray.length];
  for (int i=0; i < parameterArray.length; i++) {
    try {
      intParams[i]=Integer.parseInt(parameterArray[i]);
    }
 catch (    NumberFormatException e) {
      throw new ProcessException("String_Node_Str");
    }
  }
  if (!file.exists()) {
    file.mkdirs();
  }
  SmoothingAndStep smooth=new SmoothingAndStep();
  if (filesToSmooth != null) {
    for (int i=0; i < filesToSmooth.length; i++) {
      if (filesToSmooth[i].isFile() && isSgr(filesToSmooth[i].getName())) {
        String inFile=filesToSmooth[i].getAbsoluteFile().toString();
        String outFile=filesToSmooth[i].getName();
        if (stepSize != 1) {
          outFile=outFile.substring(0,outFile.length() - 4) + "String_Node_Str" + stepSize+ "String_Node_Str";
        }
 else {
        }
        outFile=file.toString() + "String_Node_Str" + outFile;
        smooth.smoothing(intParams,inFile,outFile,stepSize);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Runs the smoothing and step procedures. Checks if its smoothing after ratio calculation or (parameters[5])[1])just normal smoothing. Changes some parameters depending on ratio calculation or not. runs smoothing with the incoming parameters  and runs stepping if it should.
 * @param parameters Contains all parameters needed to run smoothing snd step
 * @param isRatioCalc If ratio calculation or not.
 * @throws ProcessException
 */
private void runSmoothing(String[] parameters,boolean isRatioCalc) throws ProcessException {
  String[] parameterArray;
  int stepSize=0;
  File[] filesToSmooth;
  File file;
  if (isRatioCalc) {
    parameterArray=parse(parameters[7]);
    stepSize=1;
    filesToSmooth=new File(sortedDirForFile + "String_Node_Str").listFiles();
    file=new File(sortedDirForFile + "String_Node_Str");
  }
 else {
    filesToSmooth=new File(sortedDirForFile + "String_Node_Str").listFiles();
    file=new File(sortedDirForFile + "String_Node_Str");
    if (parameters[6].equals("String_Node_Str")) {
      stepSize=1;
    }
 else {
      try {
        stepSize=Integer.parseInt(parse(parameters[5])[1]);
      }
 catch (      NumberFormatException e) {
        throw new ProcessException("String_Node_Str");
      }
    }
    parameterArray=parse(parameters[4]);
  }
  int[] intParams=new int[parameterArray.length];
  for (int i=0; i < parameterArray.length; i++) {
    try {
      intParams[i]=Integer.parseInt(parameterArray[i]);
    }
 catch (    NumberFormatException e) {
      throw new ProcessException("String_Node_Str");
    }
  }
  if (!file.exists()) {
    file.mkdirs();
  }
  SmoothingAndStep smooth=new SmoothingAndStep();
  if (filesToSmooth != null) {
    for (int i=0; i < filesToSmooth.length; i++) {
      if (filesToSmooth[i].isFile() && isSgr(filesToSmooth[i].getName())) {
        String inFile=filesToSmooth[i].getAbsoluteFile().toString();
        String outFile=filesToSmooth[i].getName();
        SmoothingParameterChecker smoothChecker=SmoothingParameterChecker.SmoothingParameterCheckerFactory(parameters[4]);
        outFile=outFile.substring(0,outFile.length() - 4) + "String_Node_Str" + smoothChecker.getSmoothType()+ "String_Node_Str"+ smoothChecker.getWindowSize()+ "String_Node_Str"+ smoothChecker.getMinProbe();
        if (stepSize != 1) {
          outFile=outFile + "String_Node_Str" + stepSize+ "String_Node_Str";
        }
 else {
          outFile=outFile + "String_Node_Str";
        }
        outFile=file.toString() + "String_Node_Str" + outFile;
        smooth.smoothing(intParams,inFile,outFile,stepSize);
      }
    }
  }
}