Buggy code:
int id ; int x ; int y ; boolean autoHide = true ; boolean hasLocation ; boolean visible ; static final int TIMER_ID = 100 ; public ToolTip ( Shell parent , int style ) { } static int checkStyle ( int style ) { } public void addSelectionListener ( SelectionListener listener ) { } void destroyWidget ( ) { } public boolean getAutoHide ( ) { } public String getMessage ( ) { } public Shell getParent ( ) { } public String getText ( ) { } public boolean getVisible ( ) { } int hwndToolTip ( ) { } public boolean isVisible ( ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setAutoHide ( boolean autoHide ) { } public void setLocation ( int x , int y ) { } public void setLocation ( Point location ) { } public void setMessage ( String string ) { } public void setText ( String string ) { } public void setVisible ( boolean visible ) { checkWidget ( ) ; if ( OS . IsWinCE ) return ; if ( visible == ( getVisible ( ) ) ) return ; if ( ( item ) == null ) { int hwnd = parent . handle ; TOOLINFO lpti = new TOOLINFO ( ) ; lpti . cbSize = TOOLINFO . sizeof ; lpti . uId = id ; lpti . hwnd = hwnd ; int hwndToolTip = hwndToolTip ( ) ; if ( ( text . length ( ) ) != 0 ) { int icon = OS . TTI_NONE ; if ( ( ( style ) & ( SWT . ICON_INFORMATION ) ) != 0 ) icon = OS . TTI_INFO ; if ( ( ( style ) & ( SWT . ICON_WARNING ) ) != 0 ) icon = OS . TTI_WARNING ; if ( ( ( style ) & ( SWT . ICON_ERROR ) ) != 0 ) icon = OS . TTI_ERROR ; TCHAR pszTitle = new TCHAR ( parent . getCodePage ( ) , text , true ) ; OS . SendMessage ( hwndToolTip , TTM_SETTITLE , icon , pszTitle ) ; } else { OS . SendMessage ( hwndToolTip , TTM_SETTITLE , 0 , 0 ) ; } int maxWidth = 0 ; if ( ( OS . IsWinCE ) || ( ( OS . WIN32_VERSION ) < ( OS . VERSION ( 4 , 10 ) ) ) ) { RECT rect = new RECT ( ) ; OS . SystemParametersInfo ( SPI_GETWORKAREA , 0 , rect , 0 ) ; maxWidth = ( ( rect . right ) - ( rect . left ) ) // 4 ; } else { int hmonitor = OS . MonitorFromWindow ( hwnd , MONITOR_DEFAULTTONEAREST ) ; MONITORINFO lpmi = new MONITORINFO ( ) ; lpmi . cbSize = MONITORINFO . sizeof ; OS . GetMonitorInfo ( hmonitor , lpmi ) ; maxWidth = ( ( lpmi . rcWork_right ) - ( lpmi . rcWork_left ) ) // 4 ; } OS . SendMessage ( hwndToolTip , TTM_SETMAXTIPWIDTH , 0 , maxWidth ) ; if ( visible ) { int nX = x ; int nY = y ; if ( ! ( hasLocation ) ) { POINT pt = new POINT ( ) ; if ( OS . GetCursorPos ( pt ) ) { nX = pt . x ; nY = pt . y ; } } <START_BUG> int lParam = nX | ( nY << 16 ) ; <END_BUG> OS . SendMessage ( hwndToolTip , TTM_TRACKPOSITION , 0 , lParam ) ; POINT pt = new POINT ( ) ; OS . GetCursorPos ( pt ) ; RECT rect = new RECT ( ) ; OS . GetClientRect ( hwnd , rect ) ; OS . MapWindowPoints ( hwnd , 0 , rect , 2 ) ; if ( ! ( OS . PtInRect ( rect , pt ) ) ) { int hCursor = OS . GetCursor ( ) ; OS . SetCursor ( 0 ) ; OS . SetCursorPos ( rect . left , rect . top ) ; OS . SendMessage ( hwndToolTip , TTM_TRACKACTIVATE , 1 , lpti ) ; OS . SetCursorPos ( pt . x , pt . y ) ; OS . SetCursor ( hCursor ) ; } else { OS . SendMessage ( hwndToolTip , TTM_TRACKACTIVATE , 1 , lpti ) ; } int time = OS . SendMessage ( hwndToolTip , TTM_GETDELAYTIME , TTDT_AUTOPOP , 0 ) ; OS . SetTimer ( hwndToolTip , ToolTip . TIMER_ID , time , 0 ) ; } else { OS . SendMessage ( hwndToolTip , TTM_TRACKACTIVATE , 0 , lpti ) ; OS . SendMessage ( hwndToolTip , TTM_SETTITLE , 0 , 0 ) ; OS . SendMessage ( hwndToolTip , TTM_SETMAXTIPWIDTH , 0 , 32767 ) ; OS . SendMessage ( hwndToolTip , TTM_POP , 0 , 0 ) ; OS . KillTimer ( hwndToolTip , ToolTip . TIMER_ID ) ; } return ; } if ( ( ( item ) != null ) && ( ( OS . SHELL32_MAJOR ) >= 5 ) ) { if ( visible ) { NOTIFYICONDATA iconData = ( OS . IsUnicode ) ? ( ( NOTIFYICONDATA ) ( new NOTIFYICONDATAW ( ) ) ) : new NOTIFYICONDATAA ( ) ; TCHAR buffer1 = new TCHAR ( 0 , text , true ) ; TCHAR buffer2 = new TCHAR ( 0 , message , true ) ; if ( OS . IsUnicode ) { char [ ] szInfoTitle = ( ( NOTIFYICONDATAW ) ( iconData ) ) . szInfoTitle ; int length1 = Math . min ( ( ( szInfoTitle . length ) - 1 ) , buffer1 . length ( ) ) ;

Fix:
int lParam = ( nX & 65535 ) | ( ( nY << 16 ) & - 65536 ) ;