Program: 168173
Project: 168173
Buggy source:
public void searchRecords(int congress,String senText,String repText,int progressSize,String politicalAffiliation) throws IOException, NullPointerException {
  if ((null == senText || senText.isEmpty()) && (null == repText || repText.isEmpty()))   return;
  String memText=(null == senText || senText.isEmpty()) ? repText : senText;
  ConsoleView.printlInConsoleln("String_Node_Str" + memText);
  String memberDir=this.outputDir + File.separator + memText;
  if (!new File(memberDir).exists()) {
    new File(memberDir).mkdir();
  }
  if (null != monitor && !monitor.isCanceled()) {
    monitor.subTask("String_Node_Str" + memText + "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",repText).data("String_Node_Str",senText).data("String_Node_Str","String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str",crawlSenateRecords).data("String_Node_Str",crawlHouseRepRecords).data("String_Node_Str",crawlExtension).data("String_Node_Str",crawlDailyDigest).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") || link.text().contains("String_Node_Str") || link.text().contains("String_Node_Str")|| link.text().contains("String_Node_Str"))     relevantLinks.add(link);
  }
  if (relevantLinks.size() == 0) {
    ConsoleView.printlInConsoleln("String_Node_Str");
    return;
  }
  links=relevantLinks;
  String memberAttribs=memText.split("String_Node_Str")[1].replace("String_Node_Str","String_Node_Str").trim();
  String memberState=memberAttribs;
  if (-1 != memberAttribs.indexOf('-')) {
    memberState=memberAttribs.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="String_Node_Str";
    String recordType="String_Node_Str";
    if (link.text().contains("String_Node_Str")) {
      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();
      recordType="String_Node_Str";
    }
 else     if (link.text().contains("String_Node_Str")) {
      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();
      recordType="String_Node_Str";
    }
 else     if (link.text().contains("String_Node_Str")) {
      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();
      recordType="String_Node_Str";
    }
 else     if (link.text().contains("String_Node_Str")) {
      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();
      recordType="String_Node_Str";
    }
    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=memText.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");
      shortTitle.replaceAll("String_Node_Str","String_Node_Str");
      String fileName=congress + "String_Node_Str" + lastName+ "String_Node_Str"+ memberAttribs+ "String_Node_Str"+ recordDate+ "String_Node_Str"+ shortTitle+ "String_Node_Str"+ (System.currentTimeMillis() % 1000)+ "String_Node_Str";
      writeToFile(memberDir,fileName,contents);
      csvWriter.write(congress + "String_Node_Str" + recordDate+ "String_Node_Str"+ lastName+ "String_Node_Str"+ politicalAffiliation+ "String_Node_Str"+ recordType+ "String_Node_Str"+ memberState+ "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 searchRecords(int congress,String senText,String repText,int progressSize,String politicalAffiliation) throws IOException, NullPointerException {
  if ((null == senText || senText.isEmpty()) && (null == repText || repText.isEmpty()))   return;
  String memText=(null == senText || senText.isEmpty()) ? repText : senText;
  ConsoleView.printlInConsoleln("String_Node_Str" + memText);
  String memberDir=this.outputDir + File.separator + memText;
  if (!new File(memberDir).exists()) {
    new File(memberDir).mkdir();
  }
  if (null != monitor && !monitor.isCanceled()) {
    monitor.subTask("String_Node_Str" + memText + "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",repText).data("String_Node_Str",senText).data("String_Node_Str","String_Node_Str").data("String_Node_Str","String_Node_Str").data("String_Node_Str",crawlSenateRecords).data("String_Node_Str",crawlHouseRepRecords).data("String_Node_Str",crawlExtension).data("String_Node_Str",crawlDailyDigest).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") || link.text().contains("String_Node_Str") || link.text().contains("String_Node_Str")|| link.text().contains("String_Node_Str"))     relevantLinks.add(link);
  }
  String memberAttribs=memText.substring(memText.lastIndexOf('(') + 1,memText.length() - 1).trim();
  String memberState=memberAttribs;
  String district=memberAttribs;
  if (-1 != memberAttribs.indexOf('-')) {
    String[] temp=memberAttribs.split("String_Node_Str");
    memberState=temp[1];
    if (temp.length >= 3)     district=temp[2];
  }
  String lastName=memText.split("String_Node_Str")[0];
  String[] tempName=(memText.lastIndexOf('(') != -1) ? memText.substring(0,memText.lastIndexOf('(')).split("String_Node_Str") : lastName.split("String_Node_Str");
  String tempRepName=tempName[1] + "String_Node_Str" + tempName[0];
  if (relevantLinks.size() == 0) {
    ConsoleView.printlInConsoleln("String_Node_Str");
    if (isSenate)     csvWriter.write(congress + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ tempRepName+ "String_Node_Str"+ politicalAffiliation+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ memberState+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
 else     csvWriter.write(congress + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ tempRepName+ "String_Node_Str"+ politicalAffiliation+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ memberState+ "String_Node_Str"+ district+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    return;
  }
  links=relevantLinks;
  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="String_Node_Str";
    String recordType="String_Node_Str";
    if (link.text().contains("String_Node_Str")) {
      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();
      recordType="String_Node_Str";
    }
 else     if (link.text().contains("String_Node_Str")) {
      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();
      recordType="String_Node_Str";
    }
 else     if (link.text().contains("String_Node_Str")) {
      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();
      recordType="String_Node_Str";
    }
 else     if (link.text().contains("String_Node_Str")) {
      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();
      recordType="String_Node_Str";
    }
    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[] 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");
      shortTitle.replaceAll("String_Node_Str","String_Node_Str");
      String fileName=congress + "String_Node_Str" + tempRepName+ "String_Node_Str"+ memberAttribs+ "String_Node_Str"+ recordDate+ "String_Node_Str"+ shortTitle+ "String_Node_Str"+ (System.currentTimeMillis() % 1000)+ "String_Node_Str";
      writeToFile(memberDir,fileName,contents);
      if (isSenate)       csvWriter.write(congress + "String_Node_Str" + recordDate+ "String_Node_Str"+ tempRepName+ "String_Node_Str"+ politicalAffiliation+ "String_Node_Str"+ recordType+ "String_Node_Str"+ memberState+ "String_Node_Str"+ title+ "String_Node_Str"+ fileName);
 else       csvWriter.write(congress + "String_Node_Str" + recordDate+ "String_Node_Str"+ tempRepName+ "String_Node_Str"+ politicalAffiliation+ "String_Node_Str"+ recordType+ "String_Node_Str"+ memberState+ "String_Node_Str"+ district+ "String_Node_Str"+ title+ "String_Node_Str"+ fileName);
      csvWriter.newLine();
      csvWriter.flush();
    }
    tempCount++;
    tempCount=updateWork(maxDocs,links.size(),progressSize,tempCount);
  }
}