Buggy code:
public abstract class PluginActionBuilder extends RegistryReader { public static final String TAG_MENU = "menu" ; public static final String TAG_ACTION = "action" ; public static final String TAG_SEPARATOR = "separator" ; public static final String TAG_GROUP_MARKER = "groupMarker" ; public static final String TAG_FILTER = "filter" ; public static final String TAG_VISIBILITY = "visibility" ; public static final String TAG_ENABLEMENT = "enablement" ; public static final String TAG_SELECTION = "selection" ; public static final String ATT_TARGET_ID = "targetID" ; public static final String ATT_ID = "id" ; public static final String ATT_LABEL = "label" ; public static final String ATT_ENABLES_FOR = "enablesFor" ; public static final String ATT_NAME = "name" ; public static final String ATT_PATH = "path" ; protected String targetID ; protected String targetContributionTag ; protected PluginActionBuilder . BasicContribution currentContribution ; protected ArrayList cache ; public PluginActionBuilder ( ) { } public final void contribute ( IMenuManager menu , IToolBarManager toolbar , boolean appendIfMissing ) { } protected abstract ActionDescriptor createActionDescriptor ( IConfigurationElement element ) { } protected PluginActionBuilder . BasicContribution createContribution ( ) { } protected String getTargetID ( IConfigurationElement element ) { } protected void readContributions ( String id , String tag , String extensionPoint ) { } protected boolean readElement ( IConfigurationElement element ) { } protected static class BasicContribution { protected ArrayList menus ; protected ArrayList actions ; public void addMenu ( IConfigurationElement element ) { } public void addAction ( ActionDescriptor desc ) { } public void contribute ( IMenuManager menu , boolean menuAppendIfMissing , IToolBarManager toolbar , boolean toolAppendIfMissing ) { } protected void contributeMenu ( IConfigurationElement menuElement , IMenuManager mng , boolean appendIfMissing ) { } protected void contributeMenuAction ( ActionDescriptor ad , IMenuManager menu , boolean appendIfMissing ) { } protected void contributeSeparator ( IMenuManager menu , IConfigurationElement element ) { } protected void contributeGroupMarker ( IMenuManager menu , IConfigurationElement element ) { } protected void contributeToolbarAction ( ActionDescriptor ad , IToolBarManager toolbar , boolean appendIfMissing ) { <START_BUG> String tpath = ad . getToolbarPath ( ) ; <END_BUG> String tgroup = ad . getToolbarGroup ( ) ; if ( ( tpath == null ) && ( tgroup == null ) ) return ; if ( tgroup == null ) tgroup = IWorkbenchActionConstants . MB_ADDITIONS ; IContributionItem sep = null ; sep = toolbar . find ( tgroup ) ; if ( sep == null ) { if ( appendIfMissing ) { addGroup ( toolbar , tgroup ) ; } else { WorkbenchPlugin . log ( ( "Invalid<seq2seq4repair_space>Toolbar<seq2seq4repair_space>Extension<seq2seq4repair_space>(Group<seq2seq4repair_space>is<seq2seq4repair_space>invalid):<seq2seq4repair_space>" + ( ad . getId ( ) ) ) ) ; return ; } } try { insertAfter ( toolbar , tgroup , ad . getAction ( ) ) ; } catch ( IllegalArgumentException e ) { WorkbenchPlugin . log ( ( "Invalid<seq2seq4repair_space>Toolbar<seq2seq4repair_space>Extension<seq2seq4repair_space>(Group<seq2seq4repair_space>is<seq2seq4repair_space>missing):<seq2seq4repair_space>" + ( ad . getId ( ) ) ) ) ; } } protected void insertMenuGroup ( IMenuManager menu , AbstractGroupMarker marker ) { } protected void insertAfter ( IContributionManager mgr , String refId , PluginAction action ) { } protected void insertAfter ( IContributionManager mgr , String refId , IContributionItem item ) { } protected void addGroup ( IContributionManager mgr , String name ) { } } }

Fix:
String tpath = ad . getToolbarId ( ) ;