Buggy code:
public abstract class AbstractOutgoingFileTransfer implements ISendFileTransfer , IOutgoingFileTransfer { public static final int DEFAULT_BUF_LENGTH = 4096 ; private static final int FILETRANSFER_ERRORCODE = 1001 ; protected Job job ; protected URL remoteFileURL ; protected IFileID remoteFileID ; protected IFileTransferListener listener ; protected int buff_length = AbstractOutgoingFileTransfer . DEFAULT_BUF_LENGTH ; protected boolean done = false ; protected long bytesSent = 0 ; protected InputStream localFileContents ; protected OutputStream remoteFileContents ; protected Exception exception ; protected IFileTransferInfo fileTransferInfo ; protected Map options = null ; protected IConnectContext connectContext ; protected Proxy proxy ; protected URL getRemoteFileURL ( ) { } protected void setInputStream ( InputStream ins ) { } protected void setOutputStream ( OutputStream outs ) { } protected IFileTransferInfo getFileTransferInfo ( ) { } protected Map getOptions ( ) { } public AbstractOutgoingFileTransfer ( ) { } public class FileTransferJob extends Job { public FileTransferJob ( String name ) { } protected IStatus run ( IProgressMonitor monitor ) { } } protected IStatus getFinalStatus ( Throwable exception1 ) { } protected void hardClose ( ) { } public ID getID ( ) { } protected void fireTransferSendDoneEvent ( ) { } protected void fireTransferSendDataEvent ( ) { } public long getBytesSent ( ) { } public void cancel ( ) { } public Exception getException ( ) { } public double getPercentComplete ( ) { } public boolean isDone ( ) { } public Object getAdapter ( Class adapter ) { } protected abstract void openStreams ( ) throws SendFileTransferException { } public Namespace getOutgoingNamespace ( ) { } public IFileTransferListener getListener ( ) { } protected void setupAndScheduleJob ( ) { } protected void fireSendStartEvent ( ) { } protected abstract void setupProxy ( Proxy proxy ) { } protected void setupProxies ( ) { if ( ( proxy ) == null ) { try { IProxyService proxyService = Activator . getDefault ( ) . getProxyService ( ) ; <START_BUG> if ( proxyService != null ) { <END_BUG> URL target = getRemoteFileURL ( ) ; String type = IProxyData . SOCKS_PROXY_TYPE ; if ( target . getProtocol ( ) . equalsIgnoreCase ( HTTP_PROXY_TYPE ) ) { type = IProxyData . HTTP_PROXY_TYPE ; } else if ( target . getProtocol ( ) . equalsIgnoreCase ( HTTPS_PROXY_TYPE ) ) { type = IProxyData . HTTPS_PROXY_TYPE ; } final IProxyData proxyData = proxyService . getProxyDataForHost ( target . getHost ( ) , type ) ; if ( proxyData != null ) { proxy = new Proxy ( ( type . equalsIgnoreCase ( SOCKS_PROXY_TYPE ) ? Type . SOCKS : Type . HTTP ) , new org . eclipse . ecf . core . util . ProxyAddress ( proxyData . getHost ( ) , proxyData . getPort ( ) ) , proxyData . getUserId ( ) , proxyData . getPassword ( ) ) ; } } } catch ( Exception e ) { Activator . logNoProxyWarning ( e ) ; } catch ( NoClassDefFoundError e ) { Activator . logNoProxyWarning ( e ) ; } } if ( ( proxy ) != null ) setupProxy ( proxy ) ; } public void sendOutgoingRequest ( IFileID targetReceiver , IFileTransferInfo localFileToSend , IFileTransferListener transferListener , Map ops ) throws SendFileTransferException { } public void sendOutgoingRequest ( IFileID targetReceiver , final File localFileToSend , IFileTransferListener transferListener , Map ops ) throws SendFileTransferException { } public void addListener ( IIncomingFileTransferRequestListener l ) { } public boolean removeListener ( IIncomingFileTransferRequestListener l ) { } public void setConnectContextForAuthentication ( IConnectContext connectContext ) { } public void setProxy ( Proxy proxy ) { } }

Fix:
if ( ( proxyService != null ) && ( proxyService . isProxiesEnabled ( ) ) ) {