Buggy code:
public class XMPPOutgoingFileTransfer implements IOutgoingFileTransfer { private static final int BUFFER_SIZE = 4096 ; ID sessionID ; XMPPID remoteTarget ; IFileTransferInfo transferInfo ; IFileTransferListener listener ; FileTransferManager manager ; File localFile ; long fileSize ; OutgoingFileTransfer outgoingFileTransfer ; long amountWritten = 0 ; Status status ; Exception exception ; public XMPPOutgoingFileTransfer ( FileTransferManager manager , XMPPID remoteTarget , IFileTransferInfo fileTransferInfo , IFileTransferListener listener ) { } private ID createSessionID ( ) { } public synchronized ID getRemoteTargetID ( ) { } public ID getID ( ) { } private void fireTransferListenerEvent ( IFileTransferEvent event ) { } private void setStatus ( Status s ) { } private void setException ( Exception e ) { } private Status getStatus ( ) { } NegotiationProgress progress = new NegotiationProgress ( ) ; public synchronized void startSend ( File localFile , String description ) throws XMPPException { this . localFile = localFile ; this . fileSize = localFile . length ( ) ; setStatus ( INITIAL ) ; outgoingFileTransfer . sendFile ( localFile . getAbsolutePath ( ) , this . fileSize , description , progress ) ; Thread transferThread = new Thread ( new Runnable ( ) { public void run ( ) { setStatus ( outgoingFileTransfer . getStatus ( ) ) ; boolean negotiation = true ; while ( negotiation ) { try { Thread . sleep ( 300 ) ; } catch ( InterruptedException e ) { return ; } Status s = progress . getStatus ( ) ; setStatus ( s ) ; final boolean negotiated = getStatus ( ) . equals ( NEGOTIATED ) ; if ( ( ( ( ( s . equals ( NEGOTIATED ) ) || ( s . equals ( CANCLED ) ) ) || ( s . equals ( COMPLETE ) ) ) || ( s . equals ( ERROR ) ) ) || ( s . equals ( REFUSED ) ) ) { fireTransferListenerEvent ( new IOutgoingFileTransferResponseEvent ( ) { private static final long serialVersionUID = - 5940612388464073240L ; public boolean requestAccepted ( ) { return negotiated ; } public IOutgoingFileTransfer getSource ( ) { return XMPPOutgoingFileTransfer . this ; } public String toString ( ) { StringBuffer buf = new StringBuffer ( "OutgoingFileTransferResponseEvent[" ) ; buf . append ( "requestAccepted=" ) . append ( requestAccepted ( ) ) . append ( "]" ) ; return buf . toString ( ) ; } } ) ; negotiation = false ; } } OutputStream outs = progress . getOutputStream ( ) ; if ( outs == null ) return ; InputStream inputStream = null ; try { inputStream = new FileInputStream ( XMPPOutgoingFileTransfer . this . localFile ) ; writeToStream ( inputStream , outs ) ; } catch ( FileNotFoundException e ) { setStatus ( FileTransfer . Status . ERROR ) ; setException ( e ) ; } catch ( XMPPException e ) { setStatus ( FileTransfer . Status . ERROR ) ; setException ( e ) ; } finally { setStatus ( COMPLETE ) ; try { if ( inputStream != null ) { inputStream . close ( ) ; } } catch ( IOException e ) { } try { outs . flush ( ) ; outs . close ( ) ; } catch ( IOException e ) { } fireTransferListenerEvent ( new IOutgoingFileTransferSendDoneEvent ( ) { private static final long serialVersionUID = - 6315336868737148845L ; public IOutgoingFileTransfer getSource ( ) { return XMPPOutgoingFileTransfer . this ; } public String toString ( ) { StringBuffer buf = new StringBuffer ( "IOutgoingFileTransferSendDoneEvent[" ) ; buf . append ( ( "isDone=" + ( getSource ( ) . isDone ( ) ) ) ) ; buf . append ( ";bytesSent=" ) . append ( getSource ( ) . getBytesSent ( ) ) . append ( "]" ) ; return buf . toString ( ) ; } } ) ; } } <START_BUG> } , "XMPP<seq2seq4repair_space>file<seq2seq4repair_space>send" ) ; <END_BUG> transferThread . start ( ) ; } public synchronized void cancel ( ) { } public synchronized File getLocalFile ( ) { } public Object getAdapter ( Class adapter ) { } public long getBytesSent ( ) { } public Exception getException ( ) { } public double getPercentComplete ( ) { } public boolean isDone ( ) { } public ID getSessionID ( ) { } protected void writeToStream ( final InputStream in , final OutputStream out ) throws XMPPException { } }

Fix:
} , "ECF<seq2seq4repair_space>XMPP<seq2seq4repair_space>file<seq2seq4repair_space>send" ) ;