Buggy code:
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 ) { } void createRenderTable ( ) { } 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 ) { } static int getChannelWidth ( int mask ) { } 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 ) { } char fixMnemonic ( char [ ] text ) { } 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 ) { } String getCodePage ( ) { } public int getFillRule ( ) { } public Font getFont ( ) { } int getFontHeight ( ) { } 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 xGC ) { } void initCairo ( ) { } public boolean isClipped ( ) { } public boolean isDisposed ( ) { } boolean isIdentity ( int matrix ) { } public void setAlpha ( int alpha ) { } public void setAntialias ( int antialias ) { } public static GC motif_new ( Drawable drawable , GCData data ) { } public static GC motif_new ( int xGC , GCData data ) { } public void setBackground ( Color color ) { } public void setBackgroundPattern ( Pattern pattern ) { } static void setCairoFont ( int cairo , Font 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 setFillRule ( int rule ) { } public void setFont ( Font font ) { } 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 ) ; int xDisplay = data . display ; XGCValues values = new XGCValues ( ) ; OS . XGetGCValues ( xDisplay , handle , ( ( ( OS . GCLineWidth ) | ( OS . GCCapStyle ) ) | ( OS . GCJoinStyle ) ) , values ) ; int line_style = ( ( data . lineStyle ) == ( SWT . LINE_SOLID ) ) ? OS . LineSolid : OS . LineOnOffDash ; OS . XSetLineAttributes ( data . display , 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 ) { } void setText ( 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 ) ) ;