Program: 85942
Project: 85942
Buggy source:
private String downloadFile(File pLocalFile,String pURL) throws IOException, LoginException, NoSuchAlgorithmException {
  FilterInputStream in=null;
  OutputStream out=null;
  HttpURLConnection conn=null;
  try {
    URL url=new URL(pURL);
    output.printInfo(LangHelper.getLocalizedMessage("String_Node_Str",locale) + "String_Node_Str" + pLocalFile.getName()+ "String_Node_Str"+ LangHelper.getLocalizedMessage("String_Node_Str",locale)+ "String_Node_Str"+ url.getHost());
    performHeadHTTPMethod(url);
    out=new BufferedOutputStream(new FileOutputStream(pLocalFile),BUFFER_CAPACITY);
    conn=(HttpURLConnection)url.openConnection();
    conn.setUseCaches(false);
    conn.setAllowUserInteraction(true);
    conn.setRequestProperty("String_Node_Str","String_Node_Str");
    conn.setRequestMethod("String_Node_Str");
    byte[] encoded=Base64.encodeBase64((login + "String_Node_Str" + password).getBytes("String_Node_Str"));
    conn.setRequestProperty("String_Node_Str","String_Node_Str" + new String(encoded,"String_Node_Str"));
    conn.connect();
    manageHTTPCode(conn);
    MessageDigest md=MessageDigest.getInstance("String_Node_Str");
    in=output.getMonitor(conn.getContentLength(),new DigestInputStream(new BufferedInputStream(conn.getInputStream(),BUFFER_CAPACITY),md));
    byte[] data=new byte[CHUNK_SIZE];
    int length;
    while ((length=in.read(data)) != -1) {
      out.write(data,0,length);
    }
    out.flush();
    byte[] digest=md.digest();
    return Base64.encodeBase64String(digest);
  }
  finally {
    if (out != null) {
      out.close();
    }
    if (in != null) {
      in.close();
    }
    if (conn != null) {
      conn.disconnect();
    }
  }
}

Fixed version (ground truth):
private String downloadFile(File pLocalFile,String pURL) throws IOException, LoginException, NoSuchAlgorithmException {
  FilterInputStream in=null;
  OutputStream out=null;
  HttpURLConnection conn=null;
  try {
    URL url=new URL(pURL.replace("String_Node_Str","String_Node_Str"));
    output.printInfo(LangHelper.getLocalizedMessage("String_Node_Str",locale) + "String_Node_Str" + pLocalFile.getName()+ "String_Node_Str"+ LangHelper.getLocalizedMessage("String_Node_Str",locale)+ "String_Node_Str"+ url.getHost());
    performHeadHTTPMethod(url);
    out=new BufferedOutputStream(new FileOutputStream(pLocalFile),BUFFER_CAPACITY);
    conn=(HttpURLConnection)url.openConnection();
    conn.setUseCaches(false);
    conn.setAllowUserInteraction(true);
    conn.setRequestProperty("String_Node_Str","String_Node_Str");
    conn.setRequestMethod("String_Node_Str");
    byte[] encoded=Base64.encodeBase64((login + "String_Node_Str" + password).getBytes("String_Node_Str"));
    conn.setRequestProperty("String_Node_Str","String_Node_Str" + new String(encoded,"String_Node_Str"));
    conn.connect();
    manageHTTPCode(conn);
    MessageDigest md=MessageDigest.getInstance("String_Node_Str");
    in=output.getMonitor(conn.getContentLength(),new DigestInputStream(new BufferedInputStream(conn.getInputStream(),BUFFER_CAPACITY),md));
    byte[] data=new byte[CHUNK_SIZE];
    int length;
    while ((length=in.read(data)) != -1) {
      out.write(data,0,length);
    }
    out.flush();
    byte[] digest=md.digest();
    return Base64.encodeBase64String(digest);
  }
  finally {
    if (out != null) {
      out.close();
    }
    if (in != null) {
      in.close();
    }
    if (conn != null) {
      conn.disconnect();
    }
  }
}