Program: 45158
Project: 45158
Buggy source:
private double determineChangeCount(Launcher launcher,FilePath workspace,TaskListener listener,Date lastBuildDate,Date currentDate,File changelogFile) throws IOException, InterruptedException {
  SimpleDateFormat scm_datetime_formatter=new SimpleDateFormat(SURROUND_DATETIME_FORMAT_STR);
  double changesCount=0;
  if (server != null)   listener.getLogger().println("String_Node_Str" + server);
  String dateRange=scm_datetime_formatter.format(lastBuildDate);
  dateRange=dateRange.concat("String_Node_Str");
  dateRange=dateRange.concat(scm_datetime_formatter.format(currentDate));
  ArgumentListBuilder cmd=new ArgumentListBuilder();
  cmd.add(getSurroundSCMExecutable());
  cmd.add("String_Node_Str");
  cmd.add("String_Node_Str");
  cmd.add("String_Node_Str".concat(dateRange));
  cmd.addMasked("String_Node_Str".concat(userName).concat("String_Node_Str").concat(password));
  if (rsaKeyPath != null && !rsaKeyPath.isEmpty()) {
    cmd.add("String_Node_Str".concat(rsaKeyPath));
  }
 else {
    cmd.add("String_Node_Str".concat(server).concat("String_Node_Str").concat(serverPort));
  }
  cmd.add("String_Node_Str".concat(branch));
  cmd.add("String_Node_Str".concat(repository));
  cmd.add("String_Node_Str");
  listener.getLogger().println("String_Node_Str" + cmd.toString() + "String_Node_Str"+ dateRange+ "String_Node_Str");
  FileOutputStream os=new FileOutputStream(changelogFile);
  try {
    BufferedOutputStream bos=new BufferedOutputStream(os);
    try {
      int cmdResult=launcher.launch().cmds(cmd).stdout(bos).pwd(workspace).join();
      if (cmdResult != 0) {
        listener.fatalError("String_Node_Str" + cmdResult);
      }
    }
  finally {
      bos.close();
    }
  }
  finally {
    os.close();
  }
  BufferedReader br=null;
  String line=null;
  try {
    br=new BufferedReader(new FileReader(changelogFile));
    line=br.readLine();
    if (line != null) {
      listener.getLogger().println(line);
      String num=line.substring(6);
      try {
        changesCount=Double.valueOf(num.trim());
      }
 catch (      NumberFormatException nfe) {
        listener.fatalError("String_Node_Str" + nfe.getMessage());
      }
    }
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
  }
 finally {
    if (br != null) {
      br.close();
    }
  }
  listener.getLogger().println("String_Node_Str" + changesCount);
  return changesCount;
}

Fixed version (ground truth):
private double determineChangeCount(Launcher launcher,FilePath workspace,TaskListener listener,Date lastBuildDate,Date currentDate,File changelogFile) throws IOException, InterruptedException {
  SimpleDateFormat scm_datetime_formatter=new SimpleDateFormat(SURROUND_DATETIME_FORMAT_STR);
  double changesCount=0;
  if (server != null)   listener.getLogger().println("String_Node_Str" + server);
  String dateRange=scm_datetime_formatter.format(lastBuildDate);
  dateRange=dateRange.concat("String_Node_Str");
  dateRange=dateRange.concat(scm_datetime_formatter.format(currentDate));
  ArgumentListBuilder cmd=new ArgumentListBuilder();
  cmd.add(getSurroundSCMExecutable());
  cmd.add("String_Node_Str");
  cmd.add("String_Node_Str");
  cmd.add("String_Node_Str".concat(dateRange));
  cmd.addMasked("String_Node_Str".concat(userName).concat("String_Node_Str").concat(password));
  if (rsaKeyPath != null && !rsaKeyPath.isEmpty()) {
    cmd.add("String_Node_Str".concat(rsaKeyPath));
  }
 else {
    cmd.add("String_Node_Str".concat(server).concat("String_Node_Str").concat(serverPort));
  }
  cmd.add("String_Node_Str".concat(branch));
  cmd.add("String_Node_Str".concat(repository));
  cmd.add("String_Node_Str");
  listener.getLogger().println("String_Node_Str" + cmd.toString() + "String_Node_Str"+ dateRange+ "String_Node_Str");
  FileOutputStream os=new FileOutputStream(changelogFile);
  try {
    BufferedOutputStream bos=new BufferedOutputStream(os);
    try {
      int cmdResult=launcher.launch().cmds(cmd).stdout(bos).pwd(workspace).join();
      if (cmdResult != 0) {
        listener.fatalError("String_Node_Str" + cmdResult);
      }
    }
  finally {
      bos.close();
    }
  }
  finally {
    os.close();
  }
  BufferedReader br=null;
  String line=null;
  InputStreamReader is=new InputStreamReader(new FileInputStream(changelogFile),"String_Node_Str");
  try {
    br=new BufferedReader(is);
    line=br.readLine();
    if (line != null) {
      listener.getLogger().println(line);
      String num=line.substring(6);
      try {
        changesCount=Double.valueOf(num.trim());
      }
 catch (      NumberFormatException nfe) {
        listener.fatalError("String_Node_Str" + nfe.getMessage());
      }
    }
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
  }
 finally {
    if (br != null) {
      br.close();
    }
  }
  listener.getLogger().println("String_Node_Str" + changesCount);
  return changesCount;
}