Buggy code:
static int checkStyle ( int style ) { } public static GC gtk_new ( Drawable drawable , GCData data ) { } void checkGC ( int mask ) { } int convertRgn ( int rgn , double [ ] matrix ) { } public void copyArea ( Image image , int x , int y ) { } public void copyArea ( int srcX , int srcY , int width , int height , int destX , int destY ) { } public void copyArea ( int srcX , int srcY , int width , int height , int destX , int destY , boolean paint ) { } void createLayout ( ) { } void disposeLayout ( ) { } public void dispose ( ) { } public void drawArc ( int x , int y , int width , int height , int startAngle , int arcAngle ) { } public void drawFocus ( int x , int y , int width , int height ) { } public void drawImage ( Image image , int x , int y ) { } public void drawImage ( Image image , int srcX , int srcY , int srcWidth , int srcHeight , int destX , int destY , int destWidth , int destHeight ) { } void drawImage ( Image srcImage , int srcX , int srcY , int srcWidth , int srcHeight , int destX , int destY , int destWidth , int destHeight , boolean simple ) { int [ ] width = new int [ 1 ] ; int [ ] height = new int [ 1 ] ; OS . gdk_drawable_get_size ( srcImage . pixmap , width , height ) ; int imgWidth = width [ 0 ] ; int imgHeight = height [ 0 ] ; if ( simple ) { srcWidth = destWidth = imgWidth ; srcHeight = destHeight = imgHeight ; } else { simple = ( ( ( ( ( srcX == 0 ) && ( srcY == 0 ) ) && ( srcWidth == destWidth ) ) && ( destWidth == imgWidth ) ) && ( srcHeight == destHeight ) ) && ( destHeight == imgHeight ) ; if ( ( ( srcX + srcWidth ) > imgWidth ) || ( ( srcY + srcHeight ) > imgHeight ) ) { SWT . error ( ERROR_INVALID_ARGUMENT ) ; } } int cairo = data . cairo ; if ( cairo != 0 ) { if ( ( data . alpha ) != 0 ) { srcImage . createSurface ( ) ; Cairo . cairo_save ( cairo ) ; Cairo . cairo_rectangle ( cairo , destX , destY , destWidth , destHeight ) ; Cairo . cairo_clip ( cairo ) ; Cairo . cairo_translate ( cairo , ( destX - srcX ) , ( destY - srcY ) ) ; if ( ( srcWidth != destWidth ) || ( srcHeight != destHeight ) ) { Cairo . cairo_scale ( cairo , ( destWidth // ( ( float ) ( srcWidth ) ) ) , ( destHeight // ( ( float ) ( srcHeight ) ) ) ) ; } int filter = Cairo . CAIRO_FILTER_GOOD ; switch ( data . interpolation ) { case SWT . DEFAULT : filter = Cairo . CAIRO_FILTER_GOOD ; break ; case SWT . NONE : filter = Cairo . CAIRO_FILTER_NEAREST ; break ; case SWT . LOW : filter = Cairo . CAIRO_FILTER_FAST ; break ; case SWT . HIGH : filter = Cairo . CAIRO_FILTER_BEST ; break ; } int pattern = Cairo . cairo_pattern_create_for_surface ( srcImage . surface ) ; if ( pattern == 0 ) SWT . error ( ERROR_NO_HANDLES ) ; if ( ( srcWidth != destWidth ) || ( srcHeight != destHeight ) ) { <START_BUG> if ( ( Cairo . cairo_version ( ) ) >= ( Cairo . CAIRO_VERSION_ENCODE ( 1 , 4 , 2 ) ) ) { <END_BUG> int surface = Cairo . cairo_image_surface_create ( CAIRO_FORMAT_ARGB32 , ( imgWidth * 3 ) , ( imgHeight * 3 ) ) ; int cr = Cairo . cairo_create ( surface ) ; Cairo . cairo_set_source_surface ( cr , srcImage . surface , imgWidth , imgHeight ) ; Cairo . cairo_paint ( cr ) ; Cairo . cairo_scale ( cr , ( - 1 ) , ( - 1 ) ) ; Cairo . cairo_set_source_surface ( cr , srcImage . surface , ( - imgWidth ) , ( - imgHeight ) ) ; Cairo . cairo_paint ( cr ) ; Cairo . cairo_set_source_surface ( cr , srcImage . surface , ( ( - imgWidth ) * 3 ) , ( - imgHeight ) ) ; Cairo . cairo_paint ( cr ) ; Cairo . cairo_set_source_surface ( cr , srcImage . surface , ( - imgWidth ) , ( ( - imgHeight ) * 3 ) ) ; Cairo . cairo_paint ( cr ) ; Cairo . cairo_set_source_surface ( cr , srcImage . surface , ( ( - imgWidth ) * 3 ) , ( ( - imgHeight ) * 3 ) ) ; Cairo . cairo_paint ( cr ) ; Cairo . cairo_scale ( cr , 1 , ( - 1 ) ) ; Cairo . cairo_set_source_surface ( cr , srcImage . surface , ( - imgWidth ) , imgHeight ) ; Cairo . cairo_paint ( cr ) ; Cairo . cairo_set_source_surface ( cr , srcImage . surface , ( ( - imgWidth ) * 3 ) , imgHeight ) ; Cairo . cairo_paint ( cr ) ; Cairo . cairo_scale ( cr , ( - 1 ) , ( - 1 ) ) ; Cairo . cairo_set_source_surface ( cr , srcImage . surface , imgWidth , ( - imgHeight ) ) ; Cairo . cairo_paint ( cr ) ; Cairo . cairo_set_source_surface ( cr , srcImage . surface , imgWidth , ( ( - imgHeight ) * 3 ) ) ; Cairo . cairo_paint ( cr ) ;

Fix:
if ( ( Cairo . cairo_version ( ) ) >= ( Cairo . CAIRO_VERSION_ENCODE ( 1 , 4 , 0 ) ) ) {