Program: 94496
Project: 94496
Buggy source:
protected void runRequest() throws Exception {
  Trace.entering(Activator.PLUGIN_ID,DebugOptions.METHODS_ENTERING,this.getClass(),"String_Node_Str");
  setupProxies();
  httpClient.getHttpConnectionManager().getParams().setSoTimeout(DEFAULT_CONNECTION_TIMEOUT);
  httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
  String urlString=directoryOrFile.toString();
  setupAuthentication(urlString);
  setupHostAndPort(urlString);
  getMethod=new GetMethod(hostConfigHelper.getTargetRelativePath());
  getMethod.setFollowRedirects(true);
  getMethod.getParams().setParameter(CredentialsProvider.PROVIDER,new ECFCredentialsProvider());
  getMethod.addRequestHeader("String_Node_Str","String_Node_Str");
  long lastModified=0;
  long fileLength=-1;
  try {
    Trace.trace(Activator.PLUGIN_ID,"String_Node_Str" + urlString);
    int code=httpClient.executeMethod(getHostConfiguration(),getMethod);
    Trace.trace(Activator.PLUGIN_ID,"String_Node_Str" + code);
    if (code == HttpURLConnection.HTTP_OK) {
      fileLength=getMethod.getResponseContentLength();
      lastModified=getLastModifiedTimeFromHeader();
    }
 else     if (code == HttpURLConnection.HTTP_NOT_FOUND) {
      throw new FileNotFoundException(urlString);
    }
 else     if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
      throw new LoginException(Messages.HttpClientRetrieveFileTransfer_Unauthorized);
    }
 else     if (code == HttpURLConnection.HTTP_FORBIDDEN) {
      throw new LoginException("String_Node_Str");
    }
 else     if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
      throw new LoginException(Messages.HttpClientRetrieveFileTransfer_Proxy_Auth_Required);
    }
 else {
      throw new IOException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_ERROR_GENERAL_RESPONSE_CODE,new Integer(code)));
    }
    remoteFiles=new IRemoteFile[1];
    remoteFiles[0]=new URLRemoteFile(lastModified,fileLength,fileID);
  }
 catch (  Exception e) {
    Trace.throwing(Activator.PLUGIN_ID,DebugOptions.EXCEPTIONS_THROWING,this.getClass(),"String_Node_Str",e);
    throw e;
  }
 finally {
    getMethod.releaseConnection();
  }
}

Fixed version (ground truth):
protected void runRequest() throws Exception {
  Trace.entering(Activator.PLUGIN_ID,DebugOptions.METHODS_ENTERING,this.getClass(),"String_Node_Str");
  setupProxies();
  httpClient.getHttpConnectionManager().getParams().setSoTimeout(DEFAULT_CONNECTION_TIMEOUT);
  httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
  String urlString=directoryOrFile.toString();
  setupAuthentication(urlString);
  setupHostAndPort(urlString);
  headMethod=new HeadMethod(hostConfigHelper.getTargetRelativePath());
  headMethod.setFollowRedirects(true);
  headMethod.getParams().setParameter(CredentialsProvider.PROVIDER,new ECFCredentialsProvider());
  headMethod.addRequestHeader("String_Node_Str","String_Node_Str");
  long lastModified=0;
  long fileLength=-1;
  try {
    Trace.trace(Activator.PLUGIN_ID,"String_Node_Str" + urlString);
    int code=httpClient.executeMethod(getHostConfiguration(),headMethod);
    Trace.trace(Activator.PLUGIN_ID,"String_Node_Str" + code);
    if (code == HttpURLConnection.HTTP_OK) {
      fileLength=headMethod.getResponseContentLength();
      lastModified=getLastModifiedTimeFromHeader();
    }
 else     if (code == HttpURLConnection.HTTP_NOT_FOUND) {
      throw new FileNotFoundException(urlString);
    }
 else     if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
      throw new LoginException(Messages.HttpClientRetrieveFileTransfer_Unauthorized);
    }
 else     if (code == HttpURLConnection.HTTP_FORBIDDEN) {
      throw new LoginException("String_Node_Str");
    }
 else     if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
      throw new LoginException(Messages.HttpClientRetrieveFileTransfer_Proxy_Auth_Required);
    }
 else {
      throw new IOException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_ERROR_GENERAL_RESPONSE_CODE,new Integer(code)));
    }
    remoteFiles=new IRemoteFile[1];
    remoteFiles[0]=new URLRemoteFile(lastModified,fileLength,fileID);
  }
 catch (  Exception e) {
    Trace.throwing(Activator.PLUGIN_ID,DebugOptions.EXCEPTIONS_THROWING,this.getClass(),"String_Node_Str",e);
    throw e;
  }
 finally {
    headMethod.releaseConnection();
  }
}