Buggy code:
public class ImageList { int handle ; int style ; int refCount ; Image [ ] images ; public ImageList ( int style ) { } public int add ( Image image ) { } public int addRef ( ) { } int copyBitmap ( int hImage , int width , int height ) { BITMAP bm = new BITMAP ( ) ; OS . GetObject ( hImage , sizeof , bm ) ; int hDC = OS . GetDC ( 0 ) ; int hdc1 = OS . CreateCompatibleDC ( hDC ) ; OS . SelectObject ( hdc1 , hImage ) ; int hdc2 = OS . CreateCompatibleDC ( hDC ) ; int hBitmap ; <START_BUG> if ( ( ( ( bm . bmBitsPixel ) == 32 ) && ( ( OS . COMCTL32_MAJOR ) >= 6 ) ) && ( OS . IsAppThemed ( ) ) ) { <END_BUG> BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ( ) ; bmiHeader . biSize = BITMAPINFOHEADER . sizeof ; bmiHeader . biWidth = width ; bmiHeader . biHeight = - height ; bmiHeader . biPlanes = 1 ; bmiHeader . biBitCount = ( ( short ) ( 24 ) ) ; if ( OS . IsWinCE ) bmiHeader . biCompression = OS . BI_BITFIELDS ; else bmiHeader . biCompression = OS . BI_RGB ; byte [ ] bmi = new byte [ ( BITMAPINFOHEADER . sizeof ) + ( OS . IsWinCE ? 12 : 0 ) ] ; OS . MoveMemory ( bmi , bmiHeader , BITMAPINFOHEADER . sizeof ) ; if ( OS . IsWinCE ) { int redMask = 65280 ; int greenMask = 16711680 ; int blueMask = - 16777216 ; int offset = BITMAPINFOHEADER . sizeof ; bmi [ offset ] = ( ( byte ) ( ( redMask & - 16777216 ) > > 24 ) ) ; bmi [ ( offset + 1 ) ] = ( ( byte ) ( ( redMask & 16711680 ) > > 16 ) ) ; bmi [ ( offset + 2 ) ] = ( ( byte ) ( ( redMask & 65280 ) > > 8 ) ) ; bmi [ ( offset + 3 ) ] = ( ( byte ) ( ( redMask & 255 ) > > 0 ) ) ; bmi [ ( offset + 4 ) ] = ( ( byte ) ( ( greenMask & - 16777216 ) > > 24 ) ) ; bmi [ ( offset + 5 ) ] = ( ( byte ) ( ( greenMask & 16711680 ) > > 16 ) ) ; bmi [ ( offset + 6 ) ] = ( ( byte ) ( ( greenMask & 65280 ) > > 8 ) ) ; bmi [ ( offset + 7 ) ] = ( ( byte ) ( ( greenMask & 255 ) > > 0 ) ) ; bmi [ ( offset + 8 ) ] = ( ( byte ) ( ( blueMask & - 16777216 ) > > 24 ) ) ; bmi [ ( offset + 9 ) ] = ( ( byte ) ( ( blueMask & 16711680 ) > > 16 ) ) ; bmi [ ( offset + 10 ) ] = ( ( byte ) ( ( blueMask & 65280 ) > > 8 ) ) ; bmi [ ( offset + 11 ) ] = ( ( byte ) ( ( blueMask & 255 ) > > 0 ) ) ; } int [ ] pBits = new int [ 1 ] ; hBitmap = OS . CreateDIBSection ( 0 , bmi , DIB_RGB_COLORS , pBits , 0 , 0 ) ; } else { hBitmap = OS . CreateCompatibleBitmap ( hDC , width , height ) ; } OS . SelectObject ( hdc2 , hBitmap ) ; if ( ( width != ( bm . bmWidth ) ) || ( height != ( bm . bmHeight ) ) ) { if ( ! ( OS . IsWinCE ) ) OS . SetStretchBltMode ( hdc2 , COLORONCOLOR ) ; OS . StretchBlt ( hdc2 , 0 , 0 , width , height , hdc1 , 0 , 0 , bm . bmWidth , bm . bmHeight , SRCCOPY ) ; } else { OS . BitBlt ( hdc2 , 0 , 0 , width , height , hdc1 , 0 , 0 , SRCCOPY ) ; } OS . DeleteDC ( hdc1 ) ; OS . DeleteDC ( hdc2 ) ; OS . ReleaseDC ( 0 , hDC ) ; return hBitmap ; } int copyIcon ( int hImage , int width , int height ) { } int copyWithAlpha ( int hBitmap , int background , byte [ ] alphaData , int destWidth , int destHeight ) { } int createMaskFromAlpha ( ImageData data , int destWidth , int destHeight ) { } int createMask ( int hBitmap , int destWidth , int destHeight , int background , int transparentPixel ) { } public void dispose ( ) { } public Image get ( int index ) { } public int getStyle ( ) { } public int getHandle ( ) { } public Point getImageSize ( ) { } public int indexOf ( Image image ) { } public void put ( int index , Image image ) { } public void remove ( int index ) { } public int removeRef ( ) { } void set ( int index , Image image , int count ) { } public int size ( ) { } }

Fix:
if ( ( ( bm . bmBitsPixel ) == 32 ) && ( ( OS . COMCTL32_MAJOR ) >= 6 ) ) {