Buggy code:
public Object [ ] getRelatedObjects ( String fileName ) { } } private Map contentTypeToEditorMappings = new HashMap ( ) ; private Map extensionImages = new HashMap ( ) ; private List sortedEditorsFromPlugins = new ArrayList ( ) ; private Map mapIDtoEditor = initialIdToEditorMap ( 10 ) ; private EditorRegistry . EditorMap typeEditorMappings ; private ListenerList propChangeListeners = new ListenerList ( ) ; private static final Comparator comparer = new Comparator ( ) { private Collator collator = Collator . getInstance ( ) ; public int compare ( Object arg0 , Object arg1 ) { } } ; private EditorRegistry . RelatedRegistry relatedRegistry ; public EditorRegistry ( ) { } public void addEditorFromPlugin ( EditorDescriptor editor , List extensions , List filenames , List contentTypeVector , boolean bDefault ) { } private void addExternalEditorsToEditorMap ( ) { } public void addPropertyListener ( IPropertyListener l ) { } public IEditorDescriptor findEditor ( String id ) { } private void firePropertyChange ( final int type ) { } public IEditorDescriptor getDefaultEditor ( ) { } public IEditorDescriptor getDefaultEditor ( String filename ) { } private ImageDescriptor getDefaultImage ( ) { } public IEditorDescriptor [ ] getEditors ( String filename ) { } public IFileEditorMapping [ ] getFileEditorMappings ( ) { } public ImageDescriptor getImageDescriptor ( String filename ) { } private FileEditorMapping getMappingFor ( String ext ) { } private FileEditorMapping [ ] getMappingForFilename ( String filename ) { } public IEditorDescriptor [ ] getSortedEditorsFromOS ( ) { } public IEditorDescriptor [ ] getSortedEditorsFromPlugins ( ) { } private HashMap initialIdToEditorMap ( int initialSize ) { } private void addSystemEditors ( HashMap map ) { } private void initializeFromStorage ( ) { } private void setProductDefaults ( String defaultEditors ) { } private boolean readEditors ( Map editorTable ) { } public void readResources ( Map editorTable , Reader reader ) throws WorkbenchException { } private boolean contains ( List editorsArray , IEditorDescriptor editorDescriptor ) { } private boolean readResources ( Map editorTable ) { } private boolean loadAssociations ( ) { } private String mappingKeyFor ( String type ) { } private String mappingKeyFor ( FileEditorMapping mapping ) { } private void rebuildEditorMap ( ) { } private void rebuildInternalEditorMap ( ) { } public void removePropertyListener ( IPropertyListener l ) { } public void saveAssociations ( ) { } public void setFileEditorMappings ( FileEditorMapping [ ] newResourceTypes ) { } public void setDefaultEditor ( String fileName , String editorId ) { } private Object [ ] sortEditors ( List unsortedList ) { } private void sortInternalEditors ( ) { } private static class EditorMap { HashMap defaultMap = new HashMap ( ) ; HashMap map = new HashMap ( ) ; public void putDefault ( String key , FileEditorMapping value ) { } public void put ( String key , FileEditorMapping value ) { } public FileEditorMapping get ( String key ) { } public FileEditorMapping [ ] allMappings ( ) { } public FileEditorMapping [ ] userMappings ( ) { } } public boolean isSystemInPlaceEditorAvailable ( String filename ) { } public boolean isSystemExternalEditorAvailable ( String filename ) { } public ImageDescriptor getSystemExternalEditorImageDescriptor ( String filename ) { } private void removeEditorFromMapping ( HashMap map , IEditorDescriptor desc ) { } public void removeExtension ( IExtension source , Object [ ] objects ) { } public void addExtension ( IExtensionTracker tracker , IExtension extension ) { } private IExtensionPoint getExtensionPointFilter ( ) { } public IEditorDescriptor getDefaultEditor ( String fileName , IContentType contentType ) { } private IEditorDescriptor getEditorForContentType ( String filename , IContentType contentType ) { } public IEditorDescriptor [ ] getEditors ( String fileName , IContentType contentType ) { IEditorDescriptor [ ] editors = new IEditorDescriptor [ 0 ] ; IEditorDescriptor [ ] filenameEditors = editors ; IEditorDescriptor [ ] extensionEditors = editors ; FileEditorMapping [ ] mapping = getMappingForFilename ( fileName ) ; if ( ( mapping [ 0 ] ) != null ) { editors = mapping [ 0 ] . getEditors ( ) ; if ( editors != null ) filenameEditors = editors ; } if ( ( mapping [ 1 ] ) != null ) { editors = mapping [ 1 ] . getEditors ( ) ; if ( editors != null ) extensionEditors = editors ; } editors = new IEditorDescriptor [ ( filenameEditors . length ) + ( extensionEditors . length ) ] ; System . arraycopy ( filenameEditors , 0 , editors , 0 , filenameEditors . length ) ; System . arraycopy ( extensionEditors , 0 , editors , filenameEditors . length , extensionEditors . length ) ; ArrayList list = new ArrayList ( editors . length ) ; if ( contentType != null ) { Object [ ] editorsByForContentType = findRelatedObjects ( contentType , fileName , relatedRegistry ) ; if ( ( editorsByForContentType != null ) && ( ( editorsByForContentType . length ) > 0 ) ) list . addAll ( Arrays . asList ( editorsByForContentType ) ) ; } for ( int i = 0 ; i < ( editors . length ) ; i ++ ) { if ( ! ( list . contains ( editors [ i ] ) ) ) list . add ( editors [ i ] ) ; } ArrayList filtered = new ArrayList ( ) ; for ( Iterator i = list . iterator ( ) ; i . hasNext ( ) ; ) { Object next = i . next ( ) ; <START_BUG> if ( WorkbenchActivityHelper . filterItem ( next ) ) <END_BUG> continue ; filtered . add ( next ) ; } editors = ( ( IEditorDescriptor [ ] ) ( filtered . toArray ( new IEditorDescriptor [ filtered . size ( ) ] ) ) ) ; return editors ; } public ImageDescriptor getImageDescriptor ( String filename , IContentType contentType ) { } private Object [ ] findRelatedObjects ( IContentType type , String fileName , EditorRegistry . RelatedRegistry registry ) { } }

Fix:
if ( ( next == null ) || ( WorkbenchActivityHelper . filterItem ( next ) ) )