Buggy code:
public final class Image extends Resource implements Drawable { public int type ; public int handle ; int transparentPixel = - 1 ; GC memGC ; byte [ ] alphaData ; int alpha = - 1 ; ImageData data ; int width = - 1 ; int height = - 1 ; static final int DEFAULT_SCANLINE_PAD = 4 ; Image ( ) { } public Image ( Device device , int width , int height ) { } public Image ( Device device , Image srcImage , int flag ) { } public Image ( Device device , Rectangle bounds ) { } public Image ( Device device , ImageData data ) { } public Image ( Device device , ImageData source , ImageData mask ) { } public Image ( Device device , InputStream stream ) { } public Image ( Device device , String filename ) { } int createDIBFromDDB ( int hDC , int hBitmap , int width , int height ) { } int [ ] createGdipImage ( ) { } public void dispose ( ) { } public boolean equals ( Object object ) { } public Color getBackground ( ) { if ( isDisposed ( ) ) SWT . error ( ERROR_GRAPHIC_DISPOSED ) ; if ( ( transparentPixel ) == ( - 1 ) ) return null ; int hDC = device . internal_new_GC ( null ) ; BITMAP bm = new BITMAP ( ) ; OS . GetObject ( handle , sizeof , bm ) ; int hdcMem = OS . CreateCompatibleDC ( hDC ) ; int hOldObject = OS . SelectObject ( hdcMem , handle ) ; int red = 0 ; int green = 0 ; int blue = 0 ; if ( ( bm . bmBitsPixel ) <= 8 ) { if ( OS . IsWinCE ) { byte [ ] pBits = new byte [ 1 ] ; OS . MoveMemory ( pBits , bm . bmBits , 1 ) ; byte oldValue = pBits [ 0 ] ; int mask = ( 255 << ( 8 - ( bm . bmBitsPixel ) ) ) & 255 ; pBits [ 0 ] = ( ( byte ) ( ( ( transparentPixel ) << ( 8 - ( bm . bmBitsPixel ) ) ) | ( ( pBits [ 0 ] ) & ( ~ mask ) ) ) ) ; OS . MoveMemory ( bm . bmBits , pBits , 1 ) ; int color = OS . GetPixel ( hdcMem , 0 , 0 ) ; pBits [ 0 ] = oldValue ; OS . MoveMemory ( bm . bmBits , pBits , 1 ) ; blue = ( color & 16711680 ) > > 16 ; green = ( color & 65280 ) > > 8 ; red = color & 255 ; } else { byte [ ] color = new byte [ 4 ] ; OS . GetDIBColorTable ( hdcMem , transparentPixel , 1 , color ) ; blue = ( color [ 0 ] ) & 255 ; green = ( color [ 1 ] ) & 255 ; red = ( color [ 2 ] ) & 255 ; } } else { switch ( bm . bmBitsPixel ) { case 16 : blue = ( ( transparentPixel ) & 31 ) << 3 ; green = ( ( transparentPixel ) & 992 ) > > 2 ; red = ( ( transparentPixel ) & 31744 ) > > 7 ; break ; case 24 : blue = ( ( transparentPixel ) & 16711680 ) > > 16 ; green = ( ( transparentPixel ) & 65280 ) > > 8 ; red = ( transparentPixel ) & 255 ; break ; case 32 : blue = ( ( transparentPixel ) & - 16777216 ) > > > 24 ; green = ( ( transparentPixel ) & 16711680 ) > > 16 ; red = ( ( transparentPixel ) & 65280 ) > > 8 ; break ; default : return null ; } } OS . SelectObject ( hdcMem , hOldObject ) ; OS . DeleteDC ( hdcMem ) ; device . internal_dispose_GC ( hDC , null ) ; <START_BUG> return Color . win32_new ( device , ( ( ( 33554432 | ( blue << 16 ) ) | ( green << 8 ) ) | red ) ) ; <END_BUG> } public Rectangle getBounds ( ) { } public ImageData getImageData ( ) { } public int hashCode ( ) { } void init ( Device device , int width , int height ) { } static int createDIB ( int width , int height , int depth ) { } static void GetIconInfo ( Image image , ICONINFO info ) { } static int [ ] init ( Device device , Image image , ImageData i ) { } static int [ ] init ( Device device , Image image , ImageData source , ImageData mask ) { } void init ( Device device , ImageData i ) { } public int internal_new_GC ( GCData data ) { } public void internal_dispose_GC ( int hDC , GCData data ) { } public boolean isDisposed ( ) { } public void setBackground ( Color color ) { } public String toString ( ) { } public static Image win32_new ( Device device , int type , int handle ) { } }

Fix:
return Color . win32_new ( device , ( ( ( blue << 16 ) | ( green << 8 ) ) | red ) ) ;