Program: 45193
Project: 45193
Buggy source:
public void download(DB_Interface dbi) throws Exception {
  PrintWriter filtPw=dbi.getWriterForFilteredArticle(this);
  PrintWriter origPw=dbi.getWriterForOrigArticle(this);
  String url=getURL();
  try {
    if ((filtPw != null) && (origPw != null)) {
      boolean done=false;
      int numTries=0;
      do {
        numTries++;
        HTMLFilter hf=new HTMLFilter(url,filtPw,true);
        hf.run();
        String origText=hf.getOrigHtml();
        if (origText != null) {
          origPw.println(origText);
          origPw.flush();
          done=true;
          filtPw.flush();
          File filtFile=getFilteredFilePath();
          long len=filtFile.length();
          if (len < 750) {
            boolean flag=getFeed().getIgnoreCommentsHeuristic();
            if (flag == false) {
              try {
                if (filtPw != null)                 filtPw.close();
                filtPw=null;
              }
 catch (              Exception e) {
              }
              String origPath=getOrigFilePath().toString();
              String filtPath=filtFile.toString();
              hf=new HTMLFilter(url,origPath,filtPath.substring(0,filtPath.lastIndexOf(File.separatorChar)));
              hf.setIgnoreCommentsHeuristic(false);
              hf.run();
              _log.info("String_Node_Str" + len + "String_Node_Str"+ filtFile.length());
            }
          }
        }
 else {
          _log.info("String_Node_Str" + url + "String_Node_Str");
          newsrack.util.StringUtils.sleep(5);
        }
      }
 while (!done && (numTries < 3));
    }
 else {
      _log.info("String_Node_Str" + url);
    }
  }
 catch (  Exception e) {
    if (filtPw != null)     dbi.deleteFilteredArticle(this);
    throw e;
  }
 finally {
    try {
      if (origPw != null)       origPw.close();
    }
 catch (    Exception e) {
    }
    try {
      if (filtPw != null)       filtPw.close();
    }
 catch (    Exception e) {
    }
  }
  newsrack.util.StringUtils.sleep(1);
  HTMLFilter.clearCookieJar();
}

Fixed version (ground truth):
public void download(DB_Interface dbi) throws Exception {
  PrintWriter filtPw=dbi.getWriterForFilteredArticle(this);
  PrintWriter origPw=dbi.getWriterForOrigArticle(this);
  String url=getURL();
  try {
    if ((filtPw != null) && (origPw != null)) {
      boolean done=false;
      int numTries=0;
      do {
        numTries++;
        HTMLFilter hf=new HTMLFilter(url,filtPw,true);
        hf.run();
        String origText=hf.getOrigHtml();
        if (origText != null) {
          origPw.println(origText);
          origPw.flush();
          done=true;
          filtPw.flush();
          File filtFile=getFilteredFilePath();
          long len=filtFile.length();
          if (len < 750) {
            boolean flag=getFeed().getIgnoreCommentsHeuristic();
            if (flag == false) {
              try {
                if (filtPw != null)                 filtPw.close();
                filtPw=null;
              }
 catch (              Exception e) {
              }
              String origPath=getOrigFilePath().toString();
              String filtPath=filtFile.toString();
              hf=new HTMLFilter(url,origPath,filtPath.substring(0,filtPath.lastIndexOf(File.separatorChar)));
              hf.setIgnoreCommentsHeuristic(false);
              hf.run();
              _log.info("String_Node_Str" + filtPath + "String_Node_Str"+ len+ "String_Node_Str"+ filtFile.length());
            }
          }
        }
 else {
          _log.info("String_Node_Str" + url + "String_Node_Str");
          newsrack.util.StringUtils.sleep(5);
        }
      }
 while (!done && (numTries < 3));
    }
 else {
      _log.info("String_Node_Str" + url);
    }
  }
 catch (  Exception e) {
    if (filtPw != null)     dbi.deleteFilteredArticle(this);
    throw e;
  }
 finally {
    try {
      if (origPw != null)       origPw.close();
    }
 catch (    Exception e) {
    }
    try {
      if (filtPw != null)       filtPw.close();
    }
 catch (    Exception e) {
    }
  }
  newsrack.util.StringUtils.sleep(1);
  HTMLFilter.clearCookieJar();
}