Buggy code:
public abstract class Device implements Drawable { public static boolean DEBUG ; boolean debug = Device . DEBUG ; boolean tracking = Device . DEBUG ; Error [ ] errors ; Object [ ] objects ; Color [ ] colors ; Font systemFont ; boolean disposed ; static final Object CREATE_LOCK = new Object ( ) ; protected static Device CurrentDevice ; protected static Runnable DeviceFinder ; static synchronized Device getDevice ( ) { } public Device ( ) { } public Device ( DeviceData data ) { } protected void checkDevice ( ) { } protected void create ( DeviceData data ) { } protected void destroy ( ) { } public void dispose ( ) { } void dispose_Object ( Object object ) { } public Rectangle getBounds ( ) { } public DeviceData getDeviceData ( ) { } public Rectangle getClientArea ( ) { } public int getDepth ( ) { } public Point getDPI ( ) { } public FontData [ ] getFontList ( String faceName , boolean scalable ) { checkDevice ( ) ; if ( ! scalable ) return new FontData [ 0 ] ; int typefaces ; if ( faceName != null ) { int length = faceName . length ( ) ; char [ ] chars = new char [ length + 1 ] ; faceName . getChars ( 0 , length , chars , 0 ) ; int str = OS . gcnew_String ( chars ) ; int fontFamily = OS . gcnew_FontFamily ( str ) ; typefaces = OS . FontFamily_GetTypefaces ( fontFamily ) ; OS . GCHandle_Free ( fontFamily ) ; OS . GCHandle_Free ( str ) ; } else { typefaces = OS . Fonts_SystemTypefaces ( ) ; } int count = OS . TypefaceCollection_Count ( typefaces ) ; int index = 0 ; FontData [ ] result = new FontData [ count ] ; int enumerator = OS . TypefaceCollection_GetEnumerator ( typefaces ) ; while ( OS . IEnumerator_MoveNext ( enumerator ) ) { int typeface = OS . TypefaceCollection_Current ( enumerator ) ; int fontFamily = OS . Typeface_FontFamily ( typeface ) ; int style = OS . Typeface_Style ( typeface ) ; int weight = OS . Typeface_Weight ( typeface ) ; int stretch = OS . Typeface_Stretch ( typeface ) ; int str = OS . FontFamily_Source ( fontFamily ) ; int charArray = OS . String_ToCharArray ( str ) ; char [ ] chars = new char [ OS . String_Length ( str ) ] ; <START_BUG> OS . memmove ( chars , charArray , ( ( chars . length ) * 2 ) ) ; <END_BUG> int fontStyle = OS . FontStyles_Normal ; if ( OS . Object_Equals ( style , FontStyles_Italic ) ) fontStyle = OS . FontStyles_Italic ; if ( OS . Object_Equals ( style , FontStyles_Oblique ) ) fontStyle = OS . FontStyles_Oblique ; FontData data = FontData . wpf_new ( new String ( chars ) , fontStyle , OS . FontWeight_ToOpenTypeWeight ( weight ) , OS . FontStretch_ToOpenTypeStretch ( stretch ) , 0 ) ; OS . GCHandle_Free ( charArray ) ; OS . GCHandle_Free ( str ) ; OS . GCHandle_Free ( fontFamily ) ; OS . GCHandle_Free ( style ) ; OS . GCHandle_Free ( weight ) ; OS . GCHandle_Free ( stretch ) ; OS . GCHandle_Free ( typeface ) ; result [ ( index ++ ) ] = data ; } OS . GCHandle_Free ( enumerator ) ; OS . GCHandle_Free ( typefaces ) ; return result ; } public Color getSystemColor ( int id ) { } public Font getSystemFont ( ) { } public boolean getWarnings ( ) { } protected void init ( ) { } public abstract int internal_new_GC ( GCData data ) { } public abstract void internal_dispose_GC ( int hDC , GCData data ) { } public boolean isDisposed ( ) { } void new_Object ( Object object ) { } protected void release ( ) { } public void setWarnings ( boolean warnings ) { } }

Fix:
OS . memcpy ( chars , charArray , ( ( chars . length ) * 2 ) ) ;