Buggy code:
public void drawOval ( int x , int y , int width , int height ) { } public void drawPath ( Path path ) { } public void drawPoint ( int x , int y ) { } public void drawPolygon ( int [ ] pointArray ) { } public void drawPolyline ( int [ ] pointArray ) { } void drawPolyline ( int cairo , int [ ] pointArray , boolean close ) { } public void drawRectangle ( int x , int y , int width , int height ) { } public void drawRectangle ( Rectangle rect ) { } public void drawRoundRectangle ( int x , int y , int width , int height , int arcWidth , int arcHeight ) { } public void drawString ( String string , int x , int y ) { } public void drawString ( String string , int x , int y , boolean isTransparent ) { } public void drawText ( String string , int x , int y ) { } public void drawText ( String string , int x , int y , boolean isTransparent ) { } public void drawText ( String string , int x , int y , int flags ) { } public boolean equals ( Object object ) { } public void fillArc ( int x , int y , int width , int height , int startAngle , int arcAngle ) { } public void fillGradientRectangle ( int x , int y , int width , int height , boolean vertical ) { } public void fillOval ( int x , int y , int width , int height ) { } public void fillPath ( Path path ) { } public void fillPolygon ( int [ ] pointArray ) { } public void fillRectangle ( int x , int y , int width , int height ) { } public void fillRectangle ( Rectangle rect ) { } public void fillRoundRectangle ( int x , int y , int width , int height , int arcWidth , int arcHeight ) { } int fixMnemonic ( char [ ] buffer ) { } public int getAdvanceWidth ( char ch ) { } public int getAlpha ( ) { } public int getAntialias ( ) { } public Color getBackground ( ) { } public Pattern getBackgroundPattern ( ) { } public int getCharWidth ( char ch ) { } public Rectangle getClipping ( ) { } public void getClipping ( Region region ) { } public int getFillRule ( ) { } public Font getFont ( ) { } public FontMetrics getFontMetrics ( ) { } public Color getForeground ( ) { } public Pattern getForegroundPattern ( ) { } public int getInterpolation ( ) { } public int getLineCap ( ) { } public int [ ] getLineDash ( ) { } public int getLineJoin ( ) { } public int getLineStyle ( ) { } public int getLineWidth ( ) { } public int getStyle ( ) { } public int getTextAntialias ( ) { } public void getTransform ( Transform transform ) { } public boolean getXORMode ( ) { } public int hashCode ( ) { } void init ( Drawable drawable , GCData data , int gdkGC ) { } void initCairo ( ) { } public boolean isClipped ( ) { } public boolean isDisposed ( ) { } boolean isIdentity ( int matrix ) { } public void setAlpha ( int alpha ) { } public void setAntialias ( int antialias ) { } public void setBackground ( Color color ) { } public void setBackgroundPattern ( Pattern pattern ) { } static void setCairoFont ( int cairo , Font font ) { } static void setCairoFont ( int cairo , int font ) { } static void setCairoClip ( int cairo , int clipRgn ) { } static void setCairoPatternColor ( int pattern , int offset , Color c ) { } void setClipping ( int clipRgn ) { } public void setClipping ( int x , int y , int width , int height ) { } public void setClipping ( Path path ) { } public void setClipping ( Rectangle rect ) { } public void setClipping ( Region region ) { } public void setFont ( Font font ) { } public void setFillRule ( int rule ) { } public void setForeground ( Color color ) { } public void setForegroundPattern ( Pattern pattern ) { } public void setInterpolation ( int interpolation ) { } public void setLineCap ( int cap ) { } public void setLineDash ( int [ ] dashes ) { } public void setLineJoin ( int join ) { } public void setLineStyle ( int lineStyle ) { } public void setLineWidth ( int width ) { if ( ( handle ) == 0 ) SWT . error ( ERROR_GRAPHIC_DISPOSED ) ; GdkGCValues values = new GdkGCValues ( ) ; OS . gdk_gc_get_values ( handle , values ) ; int line_style = ( ( data . lineStyle ) == ( SWT . LINE_SOLID ) ) ? OS . GDK_LINE_SOLID : OS . GDK_LINE_ON_OFF_DASH ; OS . gdk_gc_set_line_attributes ( handle , width , line_style , values . cap_style , values . join_style ) ; int cairo = data . cairo ; if ( cairo != 0 ) { <START_BUG> Cairo . cairo_set_line_width ( cairo , width ) ; <END_BUG> } } void setString ( String string , int flags ) { } public void setTextAntialias ( int antialias ) { } public void setTransform ( Transform transform ) { } public void setXORMode ( boolean xor ) { } public Point stringExtent ( String string ) { } public Point textExtent ( String string ) { } public Point textExtent ( String string , int flags ) { } public String toString ( ) { } }

Fix:
Cairo . cairo_set_line_width ( cairo , Math . max ( 1 , width ) ) ;