Program: 45273
Project: 45273
Buggy source:
private NewsItem downloadNewsItem(String baseUrl,SyndEntry se,Date date){
  PrintWriter filtPw=null;
  PrintWriter origPw=null;
  NewsItem ni=null;
  try {
    String origURL=URLCanonicalizer.cleanup(baseUrl,se.getLink());
    String canonicalUrl=URLCanonicalizer.canonicalize(origURL);
    if (_log.isInfoEnabled())     _log.info("String_Node_Str" + canonicalUrl);
    ni=_db.getNewsItemFromURL(canonicalUrl);
    if (ni != null) {
      if (_log.isInfoEnabled())       _log.info("String_Node_Str" + ni.getLocalCopyPath());
      return ni;
    }
    ni=_db.createNewsItem(canonicalUrl,this,date);
    filtPw=_db.getWriterForFilteredArticle(ni);
    origPw=_db.getWriterForOrigArticle(ni);
    try {
      if ((filtPw != null) && (origPw != null)) {
        boolean done=false;
        int numTries=0;
        do {
          numTries++;
          HTMLFilter hf=new HTMLFilter(origURL,filtPw,true);
          hf.run();
          String origText=hf.getOrigHtml();
          if (origText != null) {
            String newUrl=hf.getUrl();
            if (!newUrl.equals(canonicalUrl))             _log.info("String_Node_Str" + canonicalUrl + "String_Node_Str"+ newUrl);
            origPw.println(origText);
            done=true;
          }
 else {
            _log.info("String_Node_Str" + origURL + "String_Node_Str");
            StringUtils.sleep(5);
          }
        }
 while (!done && (numTries < 3));
      }
 else {
        _log.info("String_Node_Str" + origURL);
      }
    }
 catch (    Exception e) {
      if (filtPw != null)       _db.deleteFilteredArticle(ni);
      throw e;
    }
    if (origPw != null)     origPw.close();
    if (filtPw != null)     filtPw.close();
    StringUtils.sleep(1);
    return ni;
  }
 catch (  Exception e) {
    if (origPw != null)     origPw.close();
    if (filtPw != null)     filtPw.close();
    if (_log.isInfoEnabled())     _log.info("String_Node_Str");
    if (_log.isErrorEnabled()) {
      _log.error("String_Node_Str" + se.getLink().trim());
      _log.error("String_Node_Str" + e);
      e.printStackTrace();
    }
    return null;
  }
}

Fixed version (ground truth):
private NewsItem downloadNewsItem(String baseUrl,SyndEntry se,Date date){
  PrintWriter filtPw=null;
  PrintWriter origPw=null;
  NewsItem ni=null;
  try {
    String origURL=URLCanonicalizer.cleanup(baseUrl,se.getLink());
    String canonicalUrl=URLCanonicalizer.canonicalize(origURL);
    if (_log.isInfoEnabled())     _log.info("String_Node_Str" + canonicalUrl);
    ni=_db.getNewsItemFromURL(canonicalUrl);
    if (ni != null) {
      if (_log.isInfoEnabled())       _log.info("String_Node_Str" + ni.getLocalCopyPath());
      return ni;
    }
    ni=_db.createNewsItem(canonicalUrl,this,date);
    filtPw=_db.getWriterForFilteredArticle(ni);
    origPw=_db.getWriterForOrigArticle(ni);
    try {
      if ((filtPw != null) && (origPw != null)) {
        boolean done=false;
        int numTries=0;
        do {
          numTries++;
          HTMLFilter hf=new HTMLFilter(origURL,filtPw,true);
          hf.run();
          String origText=hf.getOrigHtml();
          if (origText != null) {
            String newUrl=hf.getUrl();
            if (!newUrl.equals(canonicalUrl))             _log.info("String_Node_Str" + canonicalUrl + "String_Node_Str"+ newUrl);
            origPw.println(origText);
            done=true;
          }
 else {
            _log.info("String_Node_Str" + origURL + "String_Node_Str");
            StringUtils.sleep(5);
          }
        }
 while (!done && (numTries < 3));
      }
 else {
        _log.info("String_Node_Str" + origURL);
      }
    }
 catch (    Exception e) {
      if (filtPw != null)       _db.deleteFilteredArticle(ni);
      throw e;
    }
    if (origPw != null)     origPw.close();
    if (filtPw != null)     filtPw.close();
    StringUtils.sleep(1);
    return ni;
  }
 catch (  Exception e) {
    if (origPw != null)     origPw.close();
    if (filtPw != null)     filtPw.close();
    if (_log.isInfoEnabled())     _log.info("String_Node_Str");
    _log.error("String_Node_Str" + se.getLink().trim(),e);
    return null;
  }
}