Buggy code:
public class PerspectiveRegistry implements IPerspectiveRegistry { private ArrayList children = new ArrayList ( 10 ) ; private String defaultPerspID ; private static final String EXT = "_persp.xml" ; private static final String ID_DEF_PERSP = "PerspectiveRegistry.DEFAULT_PERSP" ; private static final String PERSP = "_persp" ; private static final char SPACE_DELIMITER = '<seq2seq4repair_space>' ; private ArrayList perspToRemove = new ArrayList ( 5 ) ; public PerspectiveRegistry ( ) { } public void addPerspective ( PerspectiveDescriptor desc ) { } public PerspectiveDescriptor createPerspective ( String label , PerspectiveDescriptor originalDescriptor ) { } public void revertPerspectives ( ArrayList perspToRevert ) { } public void deletePerspectives ( ArrayList perspToDelete ) { } public void deletePerspective ( IPerspectiveDescriptor in ) { } void deleteCustomDefinition ( PerspectiveDescriptor desc ) { } boolean hasCustomDefinition ( PerspectiveDescriptor desc ) { } public IPerspectiveDescriptor findPerspectiveWithId ( String id ) { } public IPerspectiveDescriptor findPerspectiveWithLabel ( String label ) { } public String getDefaultPerspective ( ) { } public IPerspectiveDescriptor [ ] getPerspectives ( ) { } public void load ( ) { } private void loadCustom ( ) { Reader reader = null ; IPreferenceStore store = WorkbenchPlugin . getDefault ( ) . getPreferenceStore ( ) ; String customPerspectives = store . getString ( PERSPECTIVES ) ; String [ ] perspectivesList = StringConverter . asArray ( customPerspectives ) ; for ( int i = 0 ; i < ( perspectivesList . length ) ; i ++ ) { try { String xmlString = store . getString ( ( ( perspectivesList [ i ] ) + ( PerspectiveRegistry . PERSP ) ) ) ; if ( ( xmlString != null ) && ( ( xmlString . length ( ) ) != 0 ) ) reader = new StringReader ( xmlString ) ; XMLMemento memento = XMLMemento . createReadRoot ( reader ) ; PerspectiveDescriptor newPersp = new PerspectiveDescriptor ( null , null , null ) ; newPersp . restoreState ( memento ) ; String id = newPersp . getId ( ) ; IPerspectiveDescriptor oldPersp = findPerspectiveWithId ( id ) ; if ( oldPersp == null ) children . add ( newPersp ) ; reader . close ( ) ; } catch ( IOException e ) { unableToLoadPerspective ( null ) ; } catch ( WorkbenchException e ) { unableToLoadPerspective ( e . getStatus ( ) ) ; } } IPath path = WorkbenchPlugin . getDefault ( ) . getStateLocation ( ) ; File folder = path . toFile ( ) ; if ( folder . isDirectory ( ) ) { File [ ] fileList = folder . listFiles ( ) ; int nSize = fileList . length ; for ( int nX = 0 ; nX < nSize ; nX ++ ) { File file = fileList [ nX ] ; if ( file . getName ( ) . endsWith ( PerspectiveRegistry . EXT ) ) { InputStream stream = null ; try { stream = new FileInputStream ( file ) ; <START_BUG> reader = new InputStreamReader ( stream , "utf-8" ) ; <END_BUG> XMLMemento memento = XMLMemento . createReadRoot ( reader ) ; PerspectiveDescriptor newPersp = new PerspectiveDescriptor ( null , null , null ) ; newPersp . restoreState ( memento ) ; IPerspectiveDescriptor oldPersp = findPerspectiveWithId ( newPersp . getId ( ) ) ; if ( oldPersp == null ) children . add ( newPersp ) ; saveCustomPersp ( newPersp , memento ) ; file . delete ( ) ; reader . close ( ) ; stream . close ( ) ; } catch ( IOException e ) { unableToLoadPerspective ( null ) ; } catch ( WorkbenchException e ) { unableToLoadPerspective ( e . getStatus ( ) ) ; } } } } } private void unableToLoadPerspective ( IStatus status ) { } public void saveCustomPersp ( PerspectiveDescriptor realDesc , XMLMemento memento ) throws IOException { } public IMemento getCustomPersp ( String id ) throws IOException , WorkbenchException { } private void loadPredefined ( ) { } public void setDefaultPerspective ( String id ) { } public boolean validateLabel ( String label ) { } private void verifyDefaultPerspective ( ) { } }

Fix:
reader = new BufferedReader ( new InputStreamReader ( stream , "utf-8" ) ) ;