Program: 168183
Project: 168183
Buggy source:
public void searchSenatorRecords(int congress,String senText,int progressSize,String politicalAffiliation) throws IOException, NullPointerException {
  ConsoleView.printlInConsoleln("String_Node_Str" + senText);
  String senatorDir=this.outputDir + File.separator + senText;
  if (!new File(senatorDir).exists()) {
    new File(senatorDir).mkdir();
  }
  if (null != monitor && !monitor.isCanceled()) {
    monitor.subTask("String_Node_Str" + senText + "String_Node_Str");
  }
  Document doc=Jsoup.connect("String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str" + congress,"String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str",senText).data("String_Node_Str","String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str",dateFrom).data("String_Node_Str",dateTo).data("String_Node_Str",sortType).data("String_Node_Str","String_Node_Str").userAgent("String_Node_Str").timeout(10 * 1000).post();
  Elements links=doc.getElementById("String_Node_Str").getElementsByTag("String_Node_Str");
  Elements relevantLinks=new Elements();
  for (  Element link : links) {
    if (!irrelevantLinks.contains(link.text()))     if (link.text().contains("String_Node_Str"))     relevantLinks.add(link);
  }
  if (relevantLinks.size() == 0) {
    ConsoleView.printlInConsoleln("String_Node_Str");
    return;
  }
  links=relevantLinks;
  String senatorAttribs=senText.split("String_Node_Str")[1].replace("String_Node_Str","String_Node_Str").trim();
  int count=0;
  int tempCount=0;
  for (  Element link : links) {
    if (null != monitor && monitor.isCanceled()) {
      monitor.subTask("String_Node_Str");
      return;
    }
    if (maxDocs == -1)     count=-2000;
    if (count++ >= maxDocs)     break;
    String recordDate=link.text().replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").trim();
    Document record=Jsoup.connect("String_Node_Str" + link.attr("String_Node_Str")).timeout(10 * 1000).get();
    Elements tabLinks=record.getElementById("String_Node_Str").select("String_Node_Str");
    String extractLink="String_Node_Str";
    for (    Element tabLink : tabLinks) {
      if (tabLink.text().equals("String_Node_Str")) {
        extractLink=tabLink.attr("String_Node_Str");
        break;
      }
    }
    String lastName=senText.split("String_Node_Str")[0];
    String[] contents=extract(extractLink,lastName);
    if (contents[1].length() == 0)     count--;
 else {
      String[] split=contents[0].split("String_Node_Str");
      String title=split[0].trim();
      title=title.replaceAll("String_Node_Str","String_Node_Str");
      title=title.replaceAll("String_Node_Str","String_Node_Str");
      String shortTitle=title;
      if (title.length() > 15)       shortTitle=title.substring(0,15).trim().replaceAll("String_Node_Str","String_Node_Str");
      String fileName=congress + "String_Node_Str" + lastName+ "String_Node_Str"+ senatorAttribs+ "String_Node_Str"+ recordDate+ "String_Node_Str"+ shortTitle+ "String_Node_Str"+ (System.currentTimeMillis() % 1000)+ "String_Node_Str";
      writeToFile(senatorDir,fileName,contents);
      csvWriter.write(congress + "String_Node_Str" + recordDate+ "String_Node_Str"+ lastName+ "String_Node_Str"+ politicalAffiliation+ "String_Node_Str"+ senatorAttribs+ "String_Node_Str"+ title+ "String_Node_Str"+ fileName);
      csvWriter.newLine();
      csvWriter.flush();
    }
    tempCount++;
    tempCount=updateWork(maxDocs,links.size(),progressSize,tempCount);
  }
}

Fixed version (ground truth):
public void searchSenatorRecords(int congress,String senText,int progressSize,String politicalAffiliation) throws IOException, NullPointerException {
  ConsoleView.printlInConsoleln("String_Node_Str" + senText);
  if (null == senText)   return;
  String senatorDir=this.outputDir + File.separator + senText;
  if (!new File(senatorDir).exists()) {
    new File(senatorDir).mkdir();
  }
  if (null != monitor && !monitor.isCanceled()) {
    monitor.subTask("String_Node_Str" + senText + "String_Node_Str");
  }
  Document doc=Jsoup.connect("String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str" + congress,"String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str",senText).data("String_Node_Str","String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str",dateFrom).data("String_Node_Str",dateTo).data("String_Node_Str",sortType).data("String_Node_Str","String_Node_Str").userAgent("String_Node_Str").timeout(10 * 1000).post();
  Elements links=doc.getElementById("String_Node_Str").getElementsByTag("String_Node_Str");
  Elements relevantLinks=new Elements();
  for (  Element link : links) {
    if (!irrelevantLinks.contains(link.text()))     if (link.text().contains("String_Node_Str"))     relevantLinks.add(link);
  }
  if (relevantLinks.size() == 0) {
    ConsoleView.printlInConsoleln("String_Node_Str");
    return;
  }
  links=relevantLinks;
  String senatorAttribs=senText.split("String_Node_Str")[1].replace("String_Node_Str","String_Node_Str").trim();
  String senatorState=senatorAttribs;
  if (-1 != senatorAttribs.indexOf('-')) {
    senatorState=senatorAttribs.split("String_Node_Str")[1];
  }
  int count=0;
  int tempCount=0;
  for (  Element link : links) {
    if (null != monitor && monitor.isCanceled()) {
      monitor.subTask("String_Node_Str");
      return;
    }
    if (maxDocs == -1)     count=-2000;
    if (count++ >= maxDocs)     break;
    String recordDate=link.text().replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").trim();
    Document record=Jsoup.connect("String_Node_Str" + link.attr("String_Node_Str")).timeout(10 * 1000).get();
    Elements tabLinks=record.getElementById("String_Node_Str").select("String_Node_Str");
    String extractLink="String_Node_Str";
    for (    Element tabLink : tabLinks) {
      if (tabLink.text().equals("String_Node_Str")) {
        extractLink=tabLink.attr("String_Node_Str");
        break;
      }
    }
    String lastName=senText.split("String_Node_Str")[0];
    String[] contents=extract(extractLink,lastName);
    if (contents[1].length() == 0)     count--;
 else {
      String[] split=contents[0].split("String_Node_Str");
      String title=split[0].trim();
      title=title.replaceAll("String_Node_Str","String_Node_Str");
      title=title.replaceAll("String_Node_Str","String_Node_Str");
      String shortTitle=title;
      if (title.length() > 15)       shortTitle=title.substring(0,15).trim().replaceAll("String_Node_Str","String_Node_Str");
      String fileName=congress + "String_Node_Str" + lastName+ "String_Node_Str"+ senatorAttribs+ "String_Node_Str"+ recordDate+ "String_Node_Str"+ shortTitle+ "String_Node_Str"+ (System.currentTimeMillis() % 1000)+ "String_Node_Str";
      writeToFile(senatorDir,fileName,contents);
      csvWriter.write(congress + "String_Node_Str" + recordDate+ "String_Node_Str"+ lastName+ "String_Node_Str"+ politicalAffiliation+ "String_Node_Str"+ senatorState+ "String_Node_Str"+ title+ "String_Node_Str"+ fileName);
      csvWriter.newLine();
      csvWriter.flush();
    }
    tempCount++;
    tempCount=updateWork(maxDocs,links.size(),progressSize,tempCount);
  }
}