Program: 168216
Project: 168216
Buggy source:
private void getBooks(String author,String aurl,String apath,String mainAuthor) throws IOException {
  try {
    Document doc=Jsoup.connect(aurl).timeout(10 * 1000).get();
    Elements subLists=doc.select("String_Node_Str");
    if (subLists != null && subLists.size() > 0) {
      getBooksList(author,aurl,doc,apath,mainAuthor);
      return;
    }
    Elements booksList=doc.getElementsByTag("String_Node_Str");
    int count=0;
    String bookname="String_Node_Str";
    int i=0;
    if (booksList != null) {
      int size=booksList.size();
      for (i=0; i < size; i++) {
        Element bookItem=booksList.get(i);
        String bookText=bookItem.getElementsByTag("String_Node_Str").attr("String_Node_Str");
        if (bookText.contains("String_Node_Str"))         continue;
        bookname=bookItem.text();
        if (bookText.isEmpty() || bookText == null)         continue;
        if (skipBooks.contains(bookname))         continue;
        if (authorNames.contains(bookname) || (bookname.toLowerCase()).equals(mainAuthor.toLowerCase()))         continue;
        getBooks(bookname,bookText,apath,mainAuthor);
        count++;
      }
    }
    if (count == 0) {
      if (doc.select("String_Node_Str") != null)       bookname=doc.select("String_Node_Str").first().text();
 else       if (doc.select("String_Node_Str") != null && doc.select("String_Node_Str").size() > 0)       bookname=doc.select("String_Node_Str").first().text();
 else       if (doc.select("String_Node_Str") != null && doc.select("String_Node_Str").size() > 0)       bookname=doc.select("String_Node_Str").first().text();
 else       bookname=author;
      getContent(aurl,bookname,apath);
    }
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str" + author + e);
    appendLog("String_Node_Str" + author);
  }
}

Fixed version (ground truth):
private void getBooks(String author,String aurl,String apath,String mainAuthor) throws IOException {
  try {
    Document doc=Jsoup.connect(aurl).timeout(10 * 1000).get();
    Elements subLists=doc.select("String_Node_Str");
    if (subLists != null && subLists.size() > 0) {
      getBooksList(author,aurl,doc,apath,mainAuthor);
      return;
    }
    Elements booksList=doc.getElementsByTag("String_Node_Str");
    int count=0;
    String bookname="String_Node_Str";
    int i=0;
    if (booksList != null) {
      int size=booksList.size();
      for (i=0; i < size; i++) {
        Element bookItem=booksList.get(i);
        String bookText=bookItem.getElementsByTag("String_Node_Str").attr("String_Node_Str");
        if (bookText.contains("String_Node_Str"))         continue;
        bookname=bookItem.text();
        if (bookText.isEmpty() || bookText == null)         continue;
        if (skipBooks.contains(bookname))         continue;
        if (authorNames.contains(bookname) || (bookname.toLowerCase()).equals(mainAuthor.toLowerCase()))         continue;
        getBooks(bookname,bookText,apath,mainAuthor);
        count++;
      }
    }
    if (count == 0) {
      if (doc.select("String_Node_Str") != null && doc.select("String_Node_Str").size() > 0)       bookname=doc.select("String_Node_Str").first().text();
 else       if (doc.select("String_Node_Str") != null && doc.select("String_Node_Str").size() > 0)       bookname=doc.select("String_Node_Str").first().text();
 else       if (doc.select("String_Node_Str") != null && doc.select("String_Node_Str").size() > 0)       bookname=doc.select("String_Node_Str").first().text();
 else       bookname=author;
      getContent(aurl,bookname,apath);
    }
  }
 catch (  Exception e) {
    appendLog("String_Node_Str" + author);
  }
}