Program: 20890
Project: 20890
Buggy source:
@Override public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws PluginException {
  this.setBrowserExclusive();
  br.getHeaders().put("String_Node_Str","String_Node_Str");
  String basicauth=HTACCESSController.getInstance().get(downloadLink.getDownloadURL());
  if (basicauth == null) {
    basicauth=downloadLink.getStringProperty("String_Node_Str",null);
    if (basicauth != null)     basicauth="String_Node_Str" + Encoding.Base64Encode(basicauth);
  }
  if (basicauth != null) {
    br.getHeaders().put("String_Node_Str",basicauth);
  }
  br.setFollowRedirects(true);
  URLConnectionAdapter urlConnection=null;
  try {
    urlConnection=prepareConnection(br,downloadLink);
    if (urlConnection.getResponseCode() == 401 || urlConnection.getResponseCode() == 403) {
      if (basicauth != null) {
        HTACCESSController.getInstance().remove(downloadLink.getDownloadURL());
      }
      urlConnection.disconnect();
      basicauth=getBasicAuth(downloadLink);
      if (basicauth == null)       throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND,JDL.L("String_Node_Str","String_Node_Str"));
      br.getHeaders().put("String_Node_Str",basicauth);
      urlConnection=prepareConnection(br,downloadLink);
      if (urlConnection.getResponseCode() == 401) {
        urlConnection.disconnect();
        HTACCESSController.getInstance().remove(downloadLink.getDownloadURL());
        throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND,JDL.L("String_Node_Str","String_Node_Str"));
      }
 else {
        HTACCESSController.getInstance().add(downloadLink.getDownloadURL(),basicauth);
      }
    }
    if (urlConnection.getResponseCode() == 404 || !urlConnection.isOK()) {
      urlConnection.disconnect();
      throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    }
    if (downloadLink.getFinalFileName() == null)     downloadLink.setFinalFileName(Plugin.getFileNameFromHeader(urlConnection));
    downloadLink.setDownloadSize(urlConnection.getLongContentLength());
    this.contentType=urlConnection.getContentType();
    urlConnection.disconnect();
    return AvailableStatus.TRUE;
  }
 catch (  PluginException e2) {
    throw e2;
  }
catch (  Exception e) {
    JDLogger.exception(e);
  }
 finally {
    if (urlConnection != null)     urlConnection.disconnect();
  }
  throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
}

Fixed version (ground truth):
@Override public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws PluginException {
  this.setBrowserExclusive();
  br.getHeaders().put("String_Node_Str","String_Node_Str");
  String basicauth=HTACCESSController.getInstance().get(downloadLink.getDownloadURL());
  if (basicauth == null) {
    basicauth=downloadLink.getStringProperty("String_Node_Str",null);
    if (basicauth != null)     basicauth="String_Node_Str" + Encoding.Base64Encode(basicauth);
  }
  if (basicauth != null) {
    br.getHeaders().put("String_Node_Str",basicauth);
  }
  br.setFollowRedirects(true);
  URLConnectionAdapter urlConnection=null;
  try {
    urlConnection=prepareConnection(br,downloadLink);
    if (urlConnection.getResponseCode() == 401 || urlConnection.getResponseCode() == 403) {
      if (basicauth != null) {
        HTACCESSController.getInstance().remove(downloadLink.getDownloadURL());
      }
      urlConnection.disconnect();
      basicauth=getBasicAuth(downloadLink);
      if (basicauth == null)       throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND,JDL.L("String_Node_Str","String_Node_Str"));
      br.getHeaders().put("String_Node_Str",basicauth);
      urlConnection=prepareConnection(br,downloadLink);
      if (urlConnection.getResponseCode() == 401) {
        urlConnection.disconnect();
        HTACCESSController.getInstance().remove(downloadLink.getDownloadURL());
        throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND,JDL.L("String_Node_Str","String_Node_Str"));
      }
 else {
        HTACCESSController.getInstance().add(downloadLink.getDownloadURL(),basicauth);
      }
    }
    if (urlConnection.getResponseCode() == 404 || !urlConnection.isOK()) {
      urlConnection.disconnect();
      throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    }
    if (downloadLink.getFinalFileName() == null)     downloadLink.setFinalFileName(Plugin.getFileNameFromHeader(urlConnection));
    downloadLink.setDownloadSize(urlConnection.getLongContentLength());
    this.contentType=urlConnection.getContentType();
    if (contentType.startsWith("String_Node_Str")) {
      br.followConnection();
      ArrayList<String> follow=HTMLParser.findUrls(br.toString());
      if (follow.size() != 1 || downloadLink.getBooleanProperty("String_Node_Str",false))       return AvailableStatus.FALSE;
      downloadLink.setUrlDownload(follow.get(0).trim());
      downloadLink.setProperty("String_Node_Str",true);
      return downloadLink.getAvailableStatus();
    }
 else {
      urlConnection.disconnect();
    }
    return AvailableStatus.TRUE;
  }
 catch (  PluginException e2) {
    throw e2;
  }
catch (  Exception e) {
    JDLogger.exception(e);
  }
 finally {
    if (urlConnection != null)     urlConnection.disconnect();
  }
  throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
}