Buggy code:
public class FileEditorsPreferencePage extends PreferencePage implements Listener , IWorkbenchPreferencePage { private static final String DATA_EDITOR = "editor" ; private static final String DATA_FROM_CONTENT_TYPE = "type" ; protected Table resourceTypeTable ; protected Button addResourceTypeButton ; protected Button removeResourceTypeButton ; protected Table editorTable ; protected Button addEditorButton ; protected Button removeEditorButton ; protected Button defaultEditorButton ; protected Label editorLabel ; protected IWorkbench workbench ; protected List imagesToDispose ; protected Map editorsToImages ; public void addResourceType ( String newName , String newExtension ) { } protected Control createContents ( Composite parent ) { } public void dispose ( ) { } protected IPreferenceStore doGetPreferenceStore ( ) { } protected void fillEditorTable ( ) { editorTable . removeAll ( ) ; FileEditorMapping resourceType = getSelectedResourceType ( ) ; if ( resourceType != null ) { IEditorDescriptor [ ] array = resourceType . getEditors ( ) ; for ( int i = 0 ; i < ( array . length ) ; i ++ ) { IEditorDescriptor editor = array [ i ] ; TableItem item = new TableItem ( editorTable , SWT . NULL ) ; item . setData ( FileEditorsPreferencePage . DATA_EDITOR , editor ) ; String defaultString = null ; if ( resourceType != null ) { if ( ( ( resourceType . getDefaultEditor ( ) ) == editor ) && ( resourceType . isDeclaredDefaultEditor ( editor ) ) ) defaultString = WorkbenchMessages . FileEditorPreference_defaultLabel ; } if ( defaultString != null ) { item . setText ( ( ( ( editor . getLabel ( ) ) + "<seq2seq4repair_space>" ) + defaultString ) ) ; } else { item . setText ( editor . getLabel ( ) ) ; } item . setImage ( getImage ( editor ) ) ; } EditorRegistry registry = ( ( EditorRegistry ) ( WorkbenchPlugin . getDefault ( ) . getEditorRegistry ( ) ) ) ; IContentType [ ] contentTypes = Platform . getContentTypeManager ( ) . findContentTypesFor ( resourceType . getLabel ( ) ) ; for ( int i = 0 ; i < ( contentTypes . length ) ; i ++ ) { array = registry . getEditorsForContentType ( contentTypes [ i ] ) ; for ( int j = 0 ; j < ( array . length ) ; j ++ ) { IEditorDescriptor editor = array [ j ] ; TableItem [ ] items = editorTable . getItems ( ) ; TableItem foundItem = null ; for ( int k = 0 ; k < ( items . length ) ; k ++ ) { if ( items [ k ] . getData ( FileEditorsPreferencePage . DATA_EDITOR ) . equals ( editor ) ) { foundItem = items [ k ] ; break ; } } if ( foundItem == null ) { TableItem item = new TableItem ( editorTable , SWT . NULL ) ; item . setData ( FileEditorsPreferencePage . DATA_EDITOR , editor ) ; item . setData ( FileEditorsPreferencePage . DATA_FROM_CONTENT_TYPE , contentTypes [ i ] ) ; setLockedItemText ( item , editor . getLabel ( ) ) ; item . setImage ( getImage ( editor ) ) ; } else { foundItem . setData ( FileEditorsPreferencePage . DATA_FROM_CONTENT_TYPE , contentTypes [ i ] ) ; <START_BUG> setLockedItemText ( foundItem , editor . getLabel ( ) ) ; <END_BUG> } } } } } private void setLockedItemText ( TableItem item , String baseLabel ) { } protected void fillResourceTypeTable ( ) { } protected Image getImage ( IEditorDescriptor editor ) { } protected FileEditorMapping getSelectedResourceType ( ) { } protected IEditorDescriptor [ ] getAssociatedEditors ( ) { } public void handleEvent ( Event event ) { } public void init ( IWorkbench aWorkbench ) { } protected TableItem newResourceTableItem ( IFileEditorMapping mapping , int index , boolean selected ) { } public boolean performOk ( ) { } public void promptForEditor ( ) { } public void promptForResourceType ( ) { } public void removeSelectedEditor ( ) { } public void removeSelectedResourceType ( ) { } public void setSelectedEditorAsDefault ( ) { } public void updateEnabledState ( ) { } private boolean isEditorRemovable ( ) { } private boolean isEditorRemovable ( TableItem item ) { } public void updateSelectedResourceType ( ) { } }

Fix:
setLockedItemText ( foundItem , foundItem . getText ( ) ) ;