Buggy code:
public class Link extends Control { String text ; TextLayout layout ; Color linkColor ; Color disabledColor ; Point [ ] offsets ; Point selection ; String [ ] ids ; int [ ] mnemonics ; int focusIndex ; int mouseDownIndex ; int font ; static final RGB LINK_FOREGROUND = new RGB ( 0 , 51 , 153 ) ; static final int LinkProc ; static final TCHAR LinkClass = new TCHAR ( 0 , OS . WC_LINK , true ) ; public Link ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { checkWidget ( ) ; if ( ( wHint != ( SWT . DEFAULT ) ) && ( wHint < 0 ) ) wHint = 0 ; if ( ( hHint != ( SWT . DEFAULT ) ) && ( hHint < 0 ) ) hHint = 0 ; int width ; int height ; if ( ( OS . COMCTL32_MAJOR ) >= 6 ) { int hDC = OS . GetDC ( handle ) ; int newFont = OS . SendMessage ( handle , WM_GETFONT , 0 , 0 ) ; int oldFont = OS . SelectObject ( hDC , newFont ) ; TCHAR buffer = new TCHAR ( getCodePage ( ) , parse ( text ) , false ) ; RECT rect = new RECT ( ) ; <START_BUG> int flags = OS . DT_CALCRECT ; <END_BUG> if ( wHint != ( SWT . DEFAULT ) ) { flags |= OS . DT_WORDBREAK ; rect . right = wHint ; } OS . DrawText ( hDC , buffer , buffer . length ( ) , rect , flags ) ; width = ( rect . right ) - ( rect . left ) ; height = rect . bottom ; if ( newFont != 0 ) OS . SelectObject ( hDC , oldFont ) ; OS . ReleaseDC ( handle , hDC ) ; } else { int layoutWidth = layout . getWidth ( ) ; if ( wHint == 0 ) { layout . setWidth ( 1 ) ; Rectangle rect = layout . getBounds ( ) ; width = 0 ; height = rect . height ; } else { layout . setWidth ( wHint ) ; Rectangle rect = layout . getBounds ( ) ; width = rect . width ; height = rect . height ; } layout . setWidth ( layoutWidth ) ; } if ( wHint != ( SWT . DEFAULT ) ) width = wHint ; if ( hHint != ( SWT . DEFAULT ) ) height = hHint ; int border = getBorderWidth ( ) ; width += border * 2 ; height += border * 2 ; return new Point ( width , height ) ; } void createHandle ( ) { } void createWidget ( ) { } void drawWidget ( GC gc , RECT rect ) { } void enableWidget ( boolean enabled ) { } void initAccessible ( ) { } String getNameText ( ) { } Rectangle [ ] getRectangles ( int linkIndex ) { } public String getText ( ) { } String parse ( String string ) { } int parseMnemonics ( char [ ] buffer , int start , int end , StringBuffer result ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setText ( String string ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_CHAR ( int wParam , int lParam ) { } LRESULT WM_GETDLGCODE ( int wParam , int lParam ) { } LRESULT WM_GETFONT ( int wParam , int lParam ) { } LRESULT WM_KEYDOWN ( int wParam , int lParam ) { } LRESULT WM_KILLFOCUS ( int wParam , int lParam ) { } LRESULT WM_LBUTTONDOWN ( int wParam , int lParam ) { } LRESULT WM_LBUTTONUP ( int wParam , int lParam ) { } LRESULT WM_MOUSEMOVE ( int wParam , int lParam ) { } LRESULT WM_PAINT ( int wParam , int lParam ) { } LRESULT WM_PRINTCLIENT ( int wParam , int lParam ) { } LRESULT WM_SETFOCUS ( int wParam , int lParam ) { } LRESULT WM_SETFONT ( int wParam , int lParam ) { } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT wmColorChild ( int wParam , int lParam ) { } LRESULT wmNotifyChild ( NMHDR hdr , int wParam , int lParam ) { } }

Fix:
int flags = ( OS . DT_CALCRECT ) | ( OS . DT_NOPREFIX ) ;