Buggy code:
public final class Display { private static final Thread shutdown_hook = new Thread ( ) { public void run ( ) { } } ; private static final DisplayImplementation display_impl ; private static final DisplayMode initial_mode ; private static Canvas parent ; private static DisplayMode current_mode ; private static long timeThen ; private static int x = - 1 ; private static ByteBuffer [ ] cached_icons ; private static int y = - 1 ; private static int width = 0 ; private static int height = 0 ; private static String title = "Game" ; private static boolean fullscreen ; private static int swap_interval ; private static DrawableLWJGL drawable ; private static boolean window_created ; private static boolean parent_resized ; private static boolean window_resized ; private static boolean window_resizable ; private static float r ; private static float g ; private static float b ; private static final ComponentListener component_listener = new ComponentAdapter ( ) { public void componentResized ( ComponentEvent e ) { } } ; public static Drawable getDrawable ( ) { } private static DisplayImplementation createDisplayImplementation ( ) { } private Display ( ) { } public static DisplayMode [ ] getAvailableDisplayModes ( ) throws LWJGLException { } public static DisplayMode getDesktopDisplayMode ( ) { } public static DisplayMode getDisplayMode ( ) { } public static void setDisplayMode ( DisplayMode mode ) throws LWJGLException { } private static DisplayMode getEffectiveMode ( ) { <START_BUG> return ( ! ( Display . isFullscreen ( ) ) ) && ( ( Display . parent ) != null ) ? Display . current_mode = new DisplayMode ( Display . parent . getWidth ( ) , Display . parent . getHeight ( ) ) : Display . current_mode ; <END_BUG> } private static int getWindowX ( ) { } private static int getWindowY ( ) { } private static void createWindow ( ) throws LWJGLException { } private static void releaseDrawable ( ) { } private static void destroyWindow ( ) { } private static void switchDisplayMode ( ) throws LWJGLException { } public static void setDisplayConfiguration ( float gamma , float brightness , float contrast ) throws LWJGLException { } private static long timeLate ; public static void sync ( int fps ) { } public static String getTitle ( ) { } public static Canvas getParent ( ) { } public static void setParent ( Canvas parent ) throws LWJGLException { } public static void setFullscreen ( boolean fullscreen ) throws LWJGLException { } public static void setDisplayModeAndFullscreen ( DisplayMode mode ) throws LWJGLException { } private static void setDisplayModeAndFullscreenInternal ( boolean fullscreen , DisplayMode mode ) throws LWJGLException { } public static boolean isFullscreen ( ) { } public static void setTitle ( String newTitle ) { } public static boolean isCloseRequested ( ) { } public static boolean isVisible ( ) { } public static boolean isActive ( ) { } public static boolean isDirty ( ) { } public static void processMessages ( ) { } public static void swapBuffers ( ) throws LWJGLException { } public static void update ( ) { } public static void update ( boolean processMessages ) { } static void pollDevices ( ) { } public static void releaseContext ( ) throws LWJGLException { } public static boolean isCurrent ( ) throws LWJGLException { } public static void makeCurrent ( ) throws LWJGLException { } private static void removeShutdownHook ( ) { } private static void registerShutdownHook ( ) { } public static void create ( ContextType type ) throws LWJGLException { } public static void create ( ) throws LWJGLException { } public static void create ( PixelFormat pixel_format ) throws LWJGLException { } public static void create ( PixelFormat pixel_format , Drawable shared_drawable ) throws LWJGLException { } public static void create ( PixelFormat pixel_format , ContextAttribs attribs ) throws LWJGLException { } public static void create ( PixelFormat pixel_format , Drawable shared_drawable , ContextAttribs attribs ) throws LWJGLException { } public static void create ( org . lwjgl . opengles . PixelFormat pixel_format ) throws LWJGLException { } public static void create ( org . lwjgl . opengles . PixelFormat pixel_format , Drawable shared_drawable ) throws LWJGLException { } public static void create ( org . lwjgl . opengles . PixelFormat pixel_format , org . lwjgl . opengles . ContextAttribs attribs ) throws LWJGLException { } public static void create ( org . lwjgl . opengles . PixelFormat pixel_format , Drawable shared_drawable , org . lwjgl . opengles . ContextAttribs attribs ) throws LWJGLException { } public static void setInitialBackground ( float red , float green , float blue ) { } private static void makeCurrentAndSetSwapInterval ( ) throws LWJGLException { } private static void initContext ( ) { } static DisplayImplementation getImplementation ( ) { } static boolean getPrivilegedBoolean ( final String property_name ) { } private static void initControls ( ) { } public static void destroy ( ) { } private static void reset ( ) { } public static boolean isCreated ( ) { } public static void setSwapInterval ( int value ) { } public static void setVSyncEnabled ( boolean sync ) { } public static void setLocation ( int new_x , int new_y ) { } private static void reshape ( ) { } public static String getAdapter ( ) { } public static String getVersion ( ) { } public static int setIcon ( ByteBuffer [ ] icons ) { } public static void setResizable ( boolean resizable ) { } public static boolean isResizable ( ) { } public static boolean wasResized ( ) { } public static int getWidth ( ) { } public static int getHeight ( ) { } }

Fix:
return ( ! ( Display . isFullscreen ( ) ) ) && ( ( Display . parent ) != null ) ? new DisplayMode ( Display . parent . getWidth ( ) , Display . parent . getHeight ( ) ) : Display . current_mode ;