Buggy code:
void drawBitmapTransparentByClipping ( int srcHdc , int maskHdc , int srcX , int srcY , int srcWidth , int srcHeight , int destX , int destY , int destWidth , int destHeight , boolean simple , int imgWidth , int imgHeight ) { } void drawBitmapTransparent ( Image srcImage , int srcX , int srcY , int srcWidth , int srcHeight , int destX , int destY , int destWidth , int destHeight , boolean simple , BITMAP bm , int imgWidth , int imgHeight ) { } void drawBitmap ( Image srcImage , int srcX , int srcY , int srcWidth , int srcHeight , int destX , int destY , int destWidth , int destHeight , boolean simple , BITMAP bm , int imgWidth , int imgHeight ) { } public void drawLine ( int x1 , int y1 , int x2 , int y2 ) { } public void drawOval ( int x , int y , int width , int height ) { } public void drawPoint ( int x , int y ) { } public void drawPolygon ( int [ ] pointArray ) { } public void drawPolyline ( int [ ] pointArray ) { } 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 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 ) { } public int getAdvanceWidth ( char ch ) { } public Color getBackground ( ) { } public int getCharWidth ( char ch ) { } public Rectangle getClipping ( ) { } public void getClipping ( Region region ) { } int getCodePage ( ) { } public Font getFont ( ) { } public FontMetrics getFontMetrics ( ) { } public Color getForeground ( ) { } public int getLineCap ( ) { } public int getLineJoin ( ) { } public int getLineStyle ( ) { } public int getLineWidth ( ) { } public int getStyle ( ) { } public boolean getXORMode ( ) { } void init ( Drawable drawable , GCData data , int hDC ) { } public int hashCode ( ) { } public boolean isClipped ( ) { } public boolean isDisposed ( ) { } public void setBackground ( Color color ) { } public void setClipping ( int x , int y , int width , int height ) { } public void setClipping ( Rectangle rect ) { } public void setClipping ( Region region ) { } public void setFont ( Font font ) { } public void setForeground ( Color color ) { } public void setLineCap ( int cap ) { } public void setLineJoin ( int join ) { } public void setLineStyle ( int lineStyle ) { if ( ( handle ) == 0 ) SWT . error ( ERROR_GRAPHIC_DISPOSED ) ; int style = - 1 ; switch ( lineStyle ) { case SWT . LINE_SOLID : style = OS . PS_SOLID ; break ; case SWT . LINE_DASH : style = OS . PS_DASH ; break ; case SWT . LINE_DOT : style = OS . PS_DOT ; break ; case SWT . LINE_DASHDOT : style = OS . PS_DASHDOT ; break ; case SWT . LINE_DASHDOTDOT : style = OS . PS_DASHDOTDOT ; break ; default : SWT . error ( ERROR_INVALID_ARGUMENT ) ; } OS . SetBkMode ( handle , ( style == ( OS . PS_SOLID ) ? OS . OPAQUE : OS . TRANSPARENT ) ) ; <START_BUG> setPen ( ( - 1 ) , ( - 1 ) , lineStyle , ( - 1 ) , ( - 1 ) ) ; <END_BUG> } public void setLineWidth ( int lineWidth ) { } void setPen ( int newColor , int newWidth , int lineStyle , int capStyle , int joinStyle ) { } 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 ( ) { } public static GC win32_new ( Drawable drawable , GCData data ) { } public static GC win32_new ( int hDC , GCData data ) { } }

Fix:
setPen ( ( - 1 ) , ( - 1 ) , style , ( - 1 ) , ( - 1 ) ) ;