Buggy code:
public final class GC extends Resource { public int handle ; Drawable drawable ; GCData data ; static final int FOREGROUND = 1 << 0 ; static final int BACKGROUND = 1 << 1 ; static final int FONT = 1 << 2 ; static final int LINE_STYLE = 1 << 3 ; static final int LINE_WIDTH = 1 << 4 ; static final int LINE_CAP = 1 << 5 ; static final int LINE_JOIN = 1 << 6 ; static final int ALPHA = 1 << 7 ; static final int CLIPPING = 1 << 8 ; static final int TRANSFORM = 1 << 9 ; static final int DRAW = ( ( ( ( ( ( ( GC . FOREGROUND ) | ( GC . LINE_STYLE ) ) | ( GC . LINE_WIDTH ) ) | ( GC . LINE_CAP ) ) | ( GC . LINE_JOIN ) ) | ( GC . ALPHA ) ) | ( GC . CLIPPING ) ) | ( GC . TRANSFORM ) ; static final int FILL = ( ( ( GC . BACKGROUND ) | ( GC . ALPHA ) ) | ( GC . CLIPPING ) ) | ( GC . TRANSFORM ) ; static final int IMAGE = ( ( GC . ALPHA ) | ( GC . CLIPPING ) ) | ( GC . TRANSFORM ) ; static final double [ ] LINE_DOT_ZERO = new double [ ] { 3 , 3 } ; static final double [ ] LINE_DASH_ZERO = new double [ ] { 18 , 6 } ; static final double [ ] LINE_DASHDOT_ZERO = new double [ ] { 9 , 6 , 3 , 6 } ; static final double [ ] LINE_DASHDOTDOT_ZERO = new double [ ] { 9 , 3 , 3 , 3 , 3 , 3 } ; GC ( ) { } public GC ( Drawable drawable ) { } public GC ( Drawable drawable , int style ) { } static int checkStyle ( int style ) { } void checkGC ( int mask ) { } 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 ) { } 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 image , int srcX , int srcY , int srcWidth , int srcHeight , int destX , int destY , int destWidth , int destHeight , boolean simple ) { } public void drawLine ( int x1 , int y1 , int x2 , int y2 ) { } 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 ) { } void drawPolyLineSegment ( int [ ] pointArray , boolean closed , boolean stroked ) { if ( ( pointArray . length ) < 4 ) return ; int list = OS . gcnew_PointCollection ( ( ( pointArray . length ) // 2 ) ) ; double offset = 0 ; <START_BUG> if ( ( ( data . lineWidth ) == 0 ) || ( ( ( data . lineWidth ) % 2 ) == 1 ) ) <END_BUG> offset = 0.5 ; for ( int i = 0 ; i < ( pointArray . length ) ; i += 2 ) { int point = OS . gcnew_Point ( ( ( pointArray [ i ] ) + offset ) , ( ( pointArray [ ( i + 1 ) ] ) + offset ) ) ; OS . PointCollection_Add ( list , point ) ; OS . GCHandle_Free ( point ) ; } int poly = OS . gcnew_PolyLineSegment ( list , stroked ) ; OS . GCHandle_Free ( list ) ; int figure = OS . gcnew_PathFigure ( ) ; int startPoint = OS . gcnew_Point ( pointArray [ 0 ] , pointArray [ 1 ] ) ; OS . PathFigure_StartPoint ( figure , startPoint ) ; OS . PathFigure_IsClosed ( figure , closed ) ; int segments = OS . PathFigure_Segments ( figure ) ; OS . PathSegmentCollection_Add ( segments , poly ) ; int path = OS . gcnew_PathGeometry ( ) ; if ( ! stroked ) OS . PathGeometry_FillRule ( path , ( ( data . fillRule ) == ( SWT . FILL_EVEN_ODD ) ? OS . FillRule_EvenOdd : OS . FillRule_Nonzero ) ) ; int figures = OS . PathGeometry_Figures ( path ) ; OS . PathFigureCollection_Add ( figures , figure ) ; OS . DrawingContext_DrawGeometry ( handle , ( stroked ? 0 : data . currentBrush ) , ( stroked ? data . pen : 0 ) , path ) ; OS . GCHandle_Free ( figures ) ; OS . GCHandle_Free ( path ) ; OS . GCHandle_Free ( segments ) ; OS . GCHandle_Free ( figure ) ; OS . GCHandle_Free ( startPoint ) ; OS . GCHandle_Free ( poly ) ; } public void drawPolyline ( int [ ] pointArray ) { }

Fix:
if ( stroked && ( ( ( data . lineWidth ) == 0 ) || ( ( ( data . lineWidth ) % 2 ) == 1 ) ) )