Buggy code:
protected static final String [ ] supportedProtocols = new String [ ] { HttpClientRetrieveFileTransfer . HTTP , HttpClientRetrieveFileTransfer . HTTPS } ; private static final String LAST_MODIFIED_HEADER = "Last-Modified" ; private HttpClientRetrieveFileTransfer . GzipGetMethod getMethod = null ; private HttpClient httpClient = null ; private String username ; private String password ; private int responseCode = - 1 ; private volatile boolean doneFired = false ; private String remoteFileName ; protected int httpVersion = 1 ; protected IFileID fileid = null ; protected JREProxyHelper proxyHelper = null ; private HttpClientRetrieveFileTransfer . HostConfigHelper hostConfigHelper ; private SocketEventSource socketEventSource ; private ConnectingSocketMonitor connectingSockets ; private FileTransferJob connectJob ; public HttpClientRetrieveFileTransfer ( HttpClient httpClient ) { } public String getRemoteFileName ( ) { } public synchronized void cancel ( ) { } protected void hardClose ( ) { } protected Credentials getFileRequestCredentials ( ) throws IOException , UnsupportedCallbackException { } protected void setupAuthentication ( String urlString ) throws IOException , UnsupportedCallbackException { } protected void setupHostAndPort ( CredentialsProvider credProvider , String urlString ) { } protected void setRequestHeaderValues ( ) throws InvalidFileRangeSpecificationException { } private void setRangeHeader ( String value ) { } private boolean isHTTP11 ( ) { } public int getResponseCode ( ) { } public ID getID ( ) { } private long getLastModifiedTimeFromHeader ( ) throws IOException { } protected void getResponseHeaderValues ( ) throws IOException { } final class ECFCredentialsProvider extends HttpClientProxyCredentialProvider { protected Proxy getECFProxy ( ) { } protected Credentials getNTLMCredentials ( Proxy lp ) { } } Proxy getProxy ( ) { } protected void setInputStream ( InputStream ins ) { } protected InputStream wrapTransferReadInputStream ( InputStream inputStream , IProgressMonitor monitor ) { } protected boolean hasForceNTLMProxyOption ( ) { } protected void openStreams ( ) throws IncomingFileTransferException { Trace . entering ( PLUGIN_ID , METHODS_ENTERING , this . getClass ( ) , "openStreams" ) ; final String urlString = getRemoteFileURL ( ) . toString ( ) ; this . doneFired = false ; int code = - 1 ; try { httpClient . getHttpConnectionManager ( ) . getParams ( ) . setSoTimeout ( HttpClientRetrieveFileTransfer . DEFAULT_READ_TIMEOUT ) ; httpClient . getHttpConnectionManager ( ) . getParams ( ) . setConnectionTimeout ( HttpClientRetrieveFileTransfer . DEFAULT_CONNECTION_TIMEOUT ) ; httpClient . getParams ( ) . setConnectionManagerTimeout ( HttpClientRetrieveFileTransfer . DEFAULT_CONNECTION_TIMEOUT ) ; setupAuthentication ( urlString ) ; CredentialsProvider credProvider = new HttpClientRetrieveFileTransfer . ECFCredentialsProvider ( ) ; setupHostAndPort ( credProvider , urlString ) ; getMethod = new HttpClientRetrieveFileTransfer . GzipGetMethod ( hostConfigHelper . getTargetRelativePath ( ) ) ; getMethod . setFollowRedirects ( true ) ; getMethod . getParams ( ) . setParameter ( PROVIDER , credProvider ) ; setRequestHeaderValues ( ) ; Trace . trace ( PLUGIN_ID , ( "retrieve=" + urlString ) ) ; if ( ( ( getFileRangeSpecification ( ) ) == null ) && ( ! ( targetHasGzSuffix ( super . getRemoteFileName ( ) ) ) ) ) { Trace . trace ( PLUGIN_ID , "Accept-Encoding:<seq2seq4repair_space>gzip<seq2seq4repair_space>added<seq2seq4repair_space>to<seq2seq4repair_space>request<seq2seq4repair_space>header" ) ; getMethod . setRequestHeader ( HttpClientRetrieveFileTransfer . GzipGetMethod . ACCEPT_ENCODING , HttpClientRetrieveFileTransfer . GzipGetMethod . CONTENT_ENCODING_ACCEPTED ) ; } else { Trace . trace ( PLUGIN_ID , "Accept-Encoding<seq2seq4repair_space>NOT<seq2seq4repair_space>added<seq2seq4repair_space>to<seq2seq4repair_space>header" ) ; } fireConnectStartEvent ( ) ; if ( checkAndHandleDone ( ) ) { return ; } connectingSockets . clear ( ) ; if ( ( connectJob ) == null ) { performConnect ( new NullProgressMonitor ( ) ) ; } else { connectJob . schedule ( ) ; connectJob . join ( ) ; connectJob = null ; } if ( checkAndHandleDone ( ) ) { return ; } code = responseCode ; Trace . trace ( PLUGIN_ID , ( "retrieve<seq2seq4repair_space>resp=" + code ) ) ; boolean ntlmProxyFound = NTLMProxyDetector . detectNTLMProxy ( getMethod ) ; if ( ntlmProxyFound && ( ! ( hasForceNTLMProxyOption ( ) ) ) ) <START_BUG> throw new IncomingFileTransferException ( "NTLM<seq2seq4repair_space>Proxy<seq2seq4repair_space>Not<seq2seq4repair_space>Supported<seq2seq4repair_space>by<seq2seq4repair_space>HttpClient<seq2seq4repair_space>Provider" , HttpClientOptions . NTLM_PROXY_RESPONSE_CODE ) ; <END_BUG> if ( ( code == ( HttpURLConnection . HTTP_PARTIAL ) ) || ( code == ( HttpURLConnection . HTTP_OK ) ) ) { getResponseHeaderValues ( ) ; setInputStream ( getMethod . getResponseBodyAsUnzippedStream ( ) ) ; fireReceiveStartEvent ( ) ; } else if ( code == ( HttpURLConnection . HTTP_NOT_FOUND ) ) { getMethod . releaseConnection ( ) ; throw new IncomingFileTransferException ( NLS . bind ( "File<seq2seq4repair_space>not<seq2seq4repair_space>found:<seq2seq4repair_space>{0}" , urlString ) , code ) ; } else if ( code == ( HttpURLConnection . HTTP_UNAUTHORIZED ) ) { getMethod . releaseConnection ( ) ; throw new IncomingFileTransferException ( Messages . HttpClientRetrieveFileTransfer_Unauthorized , code ) ; } else if ( code == ( HttpURLConnection . HTTP_FORBIDDEN ) ) { getMethod . releaseConnection ( ) ; throw new IncomingFileTransferException ( "Forbidden" , code ) ; } else if ( code == ( HttpURLConnection . HTTP_PROXY_AUTH ) ) { getMethod . releaseConnection ( ) ; throw new IncomingFileTransferException ( Messages . HttpClientRetrieveFileTransfer_Proxy_Auth_Required , code ) ; } else { getMethod . releaseConnection ( ) ; throw new IncomingFileTransferException ( NLS . bind ( HttpClientRetrieveFileTransfer_ERROR_GENERAL_RESPONSE_CODE , new Integer ( code ) ) , code ) ; } } catch ( final Exception e ) { Trace . throwing ( PLUGIN_ID , EXCEPTIONS_THROWING , this . getClass ( ) , "openStreams" , e ) ; if ( code == ( - 1 ) ) { if ( ! ( isDone ( ) ) ) { setDoneException ( e ) ; } fireTransferReceiveDoneEvent ( ) ; } else { IncomingFileTransferException ex = ( ( IncomingFileTransferException ) ( ( e instanceof IncomingFileTransferException ) ? e : new IncomingFileTransferException ( NLS . bind ( HttpClientRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT , urlString ) , e , code ) ) ) ; throw ex ; } } Trace . exiting ( PLUGIN_ID , METHODS_EXITING , this . getClass ( ) , "openStreams" ) ; } private boolean checkAndHandleDone ( ) { } public void setConnectContextForAuthentication ( IConnectContext connectContext ) { } protected static String getHostFromURL ( String url ) { } protected static int getPortFromURL ( String url ) { } protected static boolean urlUsesHttps ( String url ) { }

Fix:
throw new IncomingFileTransferException ( "HttpClient<seq2seq4repair_space>Provider<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>configured<seq2seq4repair_space>to<seq2seq4repair_space>support<seq2seq4repair_space>NTLM<seq2seq4repair_space>proxy<seq2seq4repair_space>authentication." , HttpClientOptions . NTLM_PROXY_RESPONSE_CODE ) ;