Buggy code:
public class PubSubView extends ViewPart { protected TableViewer viewer ; protected MenuManager menuManager ; protected ISharedObjectContainer container ; private BaseSelectionListenerAction subscribeAction ; protected TableViewer sharedListViewer ; protected MenuManager sharedListMenuManager ; private BaseSelectionListenerAction appendAction ; protected final Vector sharedLists = new Vector ( ) ; public void init ( IViewSite site ) throws PartInitException { super . init ( site ) ; <START_BUG> final Action shareSomethingAction = new Action ( "Share<seq2seq4repair_space>something..." ) { <END_BUG> public void run ( ) { try { IMasterModel sds = SharedModelFactory . getInstance ( ) . createSharedDataSource ( container , IDFactory . getDefault ( ) . createGUID ( ) , new AppendableList ( ) , ID ) ; if ( sds == null ) MessageDialog . openError ( getSite ( ) . getShell ( ) , "Error" , "Could<seq2seq4repair_space>not<seq2seq4repair_space>share<seq2seq4repair_space>anything." ) ; else { sharedLists . add ( sds ) ; sharedListViewer . add ( sds ) ; } } catch ( SharedObjectCreateException e ) { e . printStackTrace ( ) ; } catch ( IDInstantiationException e ) { throw new RuntimeException ( e ) ; } } } ; shareSomethingAction . setEnabled ( false ) ; IMenuManager mgr = site . getActionBars ( ) . getMenuManager ( ) ; mgr . add ( new Action ( "Start" ) { public void run ( ) { container = CollabClient . getContainer ( ResourcesPlugin . getWorkspace ( ) . getRoot ( ) ) ; if ( ( container ) == null ) { MessageDialog . openError ( getSite ( ) . getShell ( ) , "Error" , "Collaboration<seq2seq4repair_space>environment<seq2seq4repair_space>not<seq2seq4repair_space>found." ) ; return ; } IPublishedServiceDirectory directory = ( ( IPublishedServiceDirectory ) ( container . getAdapter ( IPublishedServiceDirectory . class ) ) ) ; viewer . setInput ( directory ) ; setEnabled ( false ) ; shareSomethingAction . setEnabled ( true ) ; } } ) ; mgr . add ( shareSomethingAction ) ; menuManager = new MenuManager ( ) ; subscribeAction = new BaseSelectionListenerAction ( "Subscribe" ) { public void run ( ) { PublishedServiceDescriptor desc = ( ( PublishedServiceDescriptor ) ( getStructuredSelection ( ) . getFirstElement ( ) ) ) ; IPublishedServiceRequestor requestor = ( ( IPublishedServiceRequestor ) ( container . getAdapter ( IPublishedServiceRequestor . class ) ) ) ; requestor . subscribe ( desc . getContainerID ( ) , desc . getSharedObjectID ( ) , new PubSubView . SubscriptionViewOpener ( ) ) ; } protected boolean updateSelection ( IStructuredSelection selection ) { return ! ( selection . isEmpty ( ) ) ; } } ; subscribeAction . setEnabled ( false ) ; menuManager . add ( subscribeAction ) ; sharedListMenuManager = new MenuManager ( ) ; appendAction = new BaseSelectionListenerAction ( "Append..." ) { public void run ( ) { InputDialog dlg = new InputDialog ( getSite ( ) . getShell ( ) , "Append<seq2seq4repair_space>to<seq2seq4repair_space>Shared<seq2seq4repair_space>List" , "Enter<seq2seq4repair_space>element<seq2seq4repair_space>to<seq2seq4repair_space>append:" , null , null ) ; dlg . open ( ) ; String value = dlg . getValue ( ) ; if ( value != null ) { LocalAgent model = ( ( LocalAgent ) ( getStructuredSelection ( ) . getFirstElement ( ) ) ) ; AppendableList list = ( ( AppendableList ) ( model . getData ( ) ) ) ; if ( list . add ( value ) ) { try { model . update ( value ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } } } protected boolean updateSelection ( IStructuredSelection selection ) { return ! ( selection . isEmpty ( ) ) ; } } ; appendAction . setEnabled ( false ) ; sharedListMenuManager . add ( appendAction ) ; } public void createPartControl ( Composite parent ) { } public void setFocus ( ) { } public void dispose ( ) { } protected class ContentProvider implements IPublishedServiceDirectoryListener , IStructuredContentProvider { private Viewer viewer ; public Object [ ] getElements ( Object inputElement ) { } public void inputChanged ( Viewer viewer , Object oldInput , Object newInput ) { } public void dispose ( ) { } public void publishedServiceDirectoryChanged ( final PublishedServiceDirectoryChangeEvent event ) { } } protected class SubscriptionViewOpener implements ISubscriptionCallback { public void subscribed ( final ISubscription subscription ) { } public void requestFailed ( final Throwable t ) { } } }

Fix:
final Action shareSomethingAction = new Action ( "Share<seq2seq4repair_space>something" ) {