Buggy code:
public abstract class AbstractUIPlugin extends Plugin { private static final String FN_DIALOG_SETTINGS = "dialog_settings.xml" ; private DialogSettings dialogSettings = null ; private AbstractUIPlugin . CompatibilityPreferenceStore preferenceStore ; private ImageRegistry imageRegistry = null ; private class CompatibilityPreferenceStore implements IPersistentPreferenceStore { private boolean listenerAdded = false ; private Preferences prefs = null ; private ListenerList listeners = new ListenerList ( ) ; private boolean silentRunning = false ; public CompatibilityPreferenceStore ( ) { } void initialize ( ) { } private Preferences getPrefs ( ) { } public void addPropertyChangeListener ( final IPropertyChangeListener listener ) { } public void removePropertyChangeListener ( IPropertyChangeListener listener ) { } public void firePropertyChangeEvent ( String name , Object oldValue , Object newValue ) { } public boolean contains ( String name ) { } public boolean getBoolean ( String name ) { } public boolean getDefaultBoolean ( String name ) { } public double getDefaultDouble ( String name ) { } public float getDefaultFloat ( String name ) { } public int getDefaultInt ( String name ) { } public long getDefaultLong ( String name ) { } public String getDefaultString ( String name ) { } public double getDouble ( String name ) { } public float getFloat ( String name ) { } public int getInt ( String name ) { } public long getLong ( String name ) { } public String getString ( String name ) { } public boolean isDefault ( String name ) { } public boolean needsSaving ( ) { } public void putValue ( String name , String value ) { } public void setDefault ( String name , double value ) { } public void setDefault ( String name , float value ) { } public void setDefault ( String name , int value ) { } public void setDefault ( String name , long value ) { } public void setDefault ( String name , String value ) { } public void setDefault ( String name , boolean value ) { } public void setToDefault ( String name ) { } public void setValue ( String name , double value ) { } public void setValue ( String name , float value ) { } public void setValue ( String name , int value ) { } public void setValue ( String name , long value ) { } public void setValue ( String name , String value ) { } public void setValue ( String name , boolean value ) { } public void save ( ) throws IOException { } } public AbstractUIPlugin ( IPluginDescriptor descriptor ) { } public AbstractUIPlugin ( ) { } protected ImageRegistry createImageRegistry ( ) { <START_BUG> return new ImageRegistry ( ) ; <END_BUG> } public IDialogSettings getDialogSettings ( ) { } public ImageRegistry getImageRegistry ( ) { } public IPreferenceStore getPreferenceStore ( ) { } public IWorkbench getWorkbench ( ) { } protected void initializeDefaultPreferences ( IPreferenceStore store ) { } protected void initializeDefaultPluginPreferences ( ) { } protected void initializeImageRegistry ( ImageRegistry reg ) { } protected void loadDialogSettings ( ) { } protected void loadPreferenceStore ( ) { } protected void refreshPluginActions ( ) { } protected void saveDialogSettings ( ) { } protected void savePreferenceStore ( ) { } public void startup ( ) throws CoreException { } public void shutdown ( ) throws CoreException { } public void start ( BundleContext context ) throws Exception { } public void stop ( BundleContext context ) throws Exception { } public static ImageDescriptor imageDescriptorFromPlugin ( String pluginId , String imageFilePath ) { } }

Fix:
return new ImageRegistry ( Display . getDefault ( ) ) ;