Buggy code:
public class DocShare extends AbstractShare { private static final Hashtable docsharechannels = new Hashtable ( ) ; public static DocShare getDocShare ( ID containerID ) { } public static DocShare addDocShare ( ID containerID , IChannelContainerAdapter channelAdapter ) throws ECFException { } public static DocShare removeDocShare ( ID containerID ) { } ID initiatorID ; ID receiverID ; ID ourID ; ITextEditor editor ; String startContent = null ; Object stateLock = new Object ( ) ; IDocumentListener documentListener = new IDocumentListener ( ) { public void documentAboutToBeChanged ( DocumentEvent event ) { } public void documentChanged ( DocumentEvent event ) { } } ; public DocShare ( IChannelContainerAdapter adapter ) throws ECFException { } public ID getInitiatorID ( ) { } public ID getReceiverID ( ) { } public ID getOurID ( ) { } public ITextEditor getTextEditor ( ) { } public boolean isSharing ( ) { } public ID getOtherID ( ) { } public boolean isInitiator ( ) { } public void startShare ( final ID our , final String fromName , final ID toID , final String fileName , final ITextEditor editorPart ) { Assert . isNotNull ( our ) ; final String fName = ( fromName == null ) ? our . getName ( ) : fromName ; Assert . isNotNull ( toID ) ; <START_BUG> Assert . isNotNull ( fileName ) ; <END_BUG> Assert . isNotNull ( editorPart ) ; Display . getDefault ( ) . syncExec ( new Runnable ( ) { public void run ( ) { try { final String content = editorPart . getDocumentProvider ( ) . getDocument ( editorPart . getEditorInput ( ) ) . get ( ) ; send ( toID , new StartMessage ( our , fName , toID , content , fileName ) ) ; localStartShare ( our , our , toID , editorPart ) ; } catch ( final Exception e ) { logError ( DocShare_ERROR_STARTING_EDITOR_TITLE , e ) ; showErrorToUser ( DocShare_ERROR_STARTING_EDITOR_TITLE , NLS . bind ( DocShare_ERROR_STARTING_EDITOR_MESSAGE , e . getLocalizedMessage ( ) ) ) ; } } } ) ; } public void stopShare ( ) { } void send ( ID toID , Message message ) throws Exception { } protected void handleMessage ( ID fromContainerID , byte [ ] data ) { } protected void handleStartMessage ( final StartMessage message ) { } void modifyStartContent ( int offset , int length , String text ) { } protected void handleUpdateMessage ( final UpdateMessage message ) { } protected void handleStopMessage ( StopMessage message ) { } void setEditorToRefuseInput ( ) { } void setEditorToAcceptInput ( ) { } IEditorInput getEditorInput ( ) { } boolean openReceiverDialog ( ID fromID , String fromUsername , String fileName ) { } protected void handleDisconnectEvent ( IChannelDisconnectEvent cde ) { } IFileStore getTempFileStore ( String fromUsername , String fileName , String content ) throws IOException , CoreException { } public synchronized void dispose ( ) { } void logError ( IStatus status ) { } void showErrorToUser ( String title , String message ) { } void logError ( String exceptionString , Throwable e ) { } StyledText getTextControl ( ) { } void setEditorEditable ( final boolean editable ) { } String getEditorIdForFileName ( String fileName ) { } IDocument getDocumentFromEditor ( ) { } void localStartShare ( ID our , ID initiator , ID receiver , ITextEditor edt ) { } void localStopShare ( ) { } void sendUpdateMessage ( DocumentEvent event ) { } void sendStopMessage ( ) { } void sendStopMessage ( ID other ) { } }

Fix:
Assert . isNotNull ( fName ) ;