Buggy code:
int getOffsetAtPoint ( int x , int y , int [ ] trailing , boolean inTextOnly ) { } public int getOrientation ( ) { } int getPartialBottomIndex ( ) { } int getPartialTopIndex ( ) { } String getPlatformDelimitedText ( StyledText . TextWriter writer ) { } public int [ ] getRanges ( ) { } public int [ ] getRanges ( int start , int length ) { } public int getRightMargin ( ) { } public Point getSelection ( ) { } public Point getSelectionRange ( ) { } public int [ ] getSelectionRanges ( ) { } public Color getSelectionBackground ( ) { } public int getSelectionCount ( ) { } public Color getSelectionForeground ( ) { } public String getSelectionText ( ) { } public int getStyle ( ) { } int [ ] getBidiSegments ( int lineOffset , String line ) { } int [ ] getBidiSegmentsCompatibility ( String line , int lineOffset ) { } public StyleRange getStyleRangeAtOffset ( int offset ) { } public StyleRange [ ] getStyleRanges ( ) { } public StyleRange [ ] getStyleRanges ( boolean includeRanges ) { } public StyleRange [ ] getStyleRanges ( int start , int length ) { } public StyleRange [ ] getStyleRanges ( int start , int length , boolean includeRanges ) { } public int getTabs ( ) { } public String getText ( ) { } public String getText ( int start , int end ) { } public Rectangle getTextBounds ( int start , int end ) { } public String getTextRange ( int start , int length ) { } public int getTextLimit ( ) { } public int getTopIndex ( ) { } public int getTopMargin ( ) { } public int getTopPixel ( ) { } int getVerticalIncrement ( ) { } int getVerticalScrollOffset ( ) { } int getVisualLineIndex ( TextLayout layout , int offsetInLine ) { } int getCaretDirection ( ) { } int getCaretLine ( ) { } int getWrapWidth ( ) { } int getWordNext ( int offset , int movement ) { } int getWordPrevious ( int offset , int movement ) { } public boolean getWordWrap ( ) { } Point getPointAtOffset ( int offset ) { } public void insert ( String string ) { } int insertBlockSelectionText ( String text , boolean fillWithSpaces ) { } void insertBlockSelectionText ( char key , int action ) { } void installDefaultContent ( ) { } void installListeners ( ) { } void internalRedrawRange ( int start , int length ) { } void handleCompositionOffset ( Event event ) { } void handleCompositionSelection ( Event event ) { } void handleCompositionChanged ( Event event ) { } void handleDispose ( Event event ) { } void handleHorizontalScroll ( Event event ) { } void handleKey ( Event event ) { } void handleKeyDown ( Event event ) { } void handleKeyUp ( Event event ) { } void handleMouseDown ( Event event ) { } void handleMouseMove ( Event event ) { } void handleMouseUp ( Event event ) { } void handlePaint ( Event event ) { } void handleResize ( Event event ) { } void handleTextChanged ( TextChangedEvent event ) { } void handleTextChanging ( TextChangingEvent event ) { } void handleTextSet ( TextChangedEvent event ) { } void handleTraverse ( Event event ) { } void handleVerticalScroll ( Event event ) { } void initializeAccessible ( ) { } Label getAssociatedLabel ( ) { } String stripMnemonic ( String string ) { } char _findMnemonic ( String string ) { } public void invokeAction ( int action ) { } boolean invokeBlockAction ( int action ) { switch ( action ) { case ST . LINE_UP : case ST . LINE_DOWN : case ST . LINE_START : case ST . LINE_END : case ST . COLUMN_PREVIOUS : case ST . COLUMN_NEXT : case ST . PAGE_UP : case ST . PAGE_DOWN : case ST . WORD_PREVIOUS : case ST . WORD_NEXT : case ST . TEXT_START : case ST . TEXT_END : case ST . WINDOW_START : case ST . WINDOW_END : <START_BUG> clearBlockSelection ( true , ( ( blockXLocation ) != ( - 1 ) ) ) ; <END_BUG> return false ; case ST . SELECT_LINE_UP : doBlockLineVertical ( true ) ; return true ; case ST . SELECT_LINE_DOWN : doBlockLineVertical ( false ) ; return true ; case ST . SELECT_LINE_START : doBlockLineHorizontal ( false ) ; return true ; case ST . SELECT_LINE_END : doBlockLineHorizontal ( true ) ; return false ; case ST . SELECT_COLUMN_PREVIOUS : doBlockColumn ( false ) ; return true ; case ST . SELECT_COLUMN_NEXT : doBlockColumn ( true ) ; return true ; case ST . SELECT_WORD_PREVIOUS : doBlockWord ( false ) ; return true ; case ST . SELECT_WORD_NEXT : doBlockWord ( true ) ; return true ; case ST . SELECT_ALL : return false ; case ST . SELECT_PAGE_UP : case ST . SELECT_PAGE_DOWN : case ST . SELECT_TEXT_START : case ST . SELECT_TEXT_END : case ST . SELECT_WINDOW_START : case ST . SELECT_WINDOW_END : return true ; case ST . CUT : case ST . COPY : case ST . PASTE : return false ; case ST . DELETE_PREVIOUS : case ST . DELETE_NEXT : if ( ( blockXLocation ) != ( - 1 ) ) { insertBlockSelectionText ( ( ( char ) ( 0 ) ) , action ) ; return true ; } return false ; case ST . DELETE_WORD_PREVIOUS : case ST . DELETE_WORD_NEXT : return ( blockXLocation ) != ( - 1 ) ; } return false ; } boolean isBidi ( ) { } boolean isBidiCaret ( ) { } boolean isFixedLineHeight ( ) { } boolean isLineDelimiter ( int offset ) { } boolean isMirrored ( ) { } boolean isSingleLine ( ) { } void modifyContent ( Event event , boolean updateCaret ) { }

Fix:
clearBlockSelection ( false , false ) ;