Buggy code:
public void invokeAction ( int action ) { } boolean isBidi ( ) { } boolean isBidiCaret ( ) { } boolean isFixedLineHeight ( ) { } boolean isLineDelimiter ( int offset ) { } boolean isMirrored ( ) { } boolean isSingleLine ( ) { } void modifyContent ( Event event , boolean updateCaret ) { } void paintObject ( GC gc , int x , int y , int ascent , int descent , StyleRange style ) { } public void paste ( ) { } public void print ( ) { } public Runnable print ( Printer printer ) { } public Runnable print ( Printer printer , StyledTextPrintOptions options ) { } public void redraw ( ) { } public void redraw ( int x , int y , int width , int height , boolean all ) { } void redrawLines ( int startLine , int lineCount ) { } public void redrawRange ( int start , int length , boolean clearBackground ) { } public void removeBidiSegmentListener ( BidiSegmentListener listener ) { } public void removeExtendedModifyListener ( ExtendedModifyListener extendedModifyListener ) { } public void removeLineBackgroundListener ( LineBackgroundListener listener ) { } public void removeLineStyleListener ( LineStyleListener listener ) { } public void removeModifyListener ( ModifyListener modifyListener ) { } public void removePaintObjectListener ( PaintObjectListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void removeVerifyListener ( VerifyListener verifyListener ) { } public void removeVerifyKeyListener ( VerifyKeyListener listener ) { } public void replaceStyleRanges ( int start , int length , StyleRange [ ] ranges ) { } public void replaceTextRange ( int start , int length , String text ) { } void reset ( ) { } void resetCache ( int firstLine , int count ) { } void resetSelection ( ) { } boolean scrollHorizontal ( int pixels , boolean adjustScrollBar ) { } boolean scrollVertical ( int pixels , boolean adjustScrollBar ) { } void scrollText ( int srcY , int destY ) { } public void selectAll ( ) { } void sendKeyEvent ( Event event ) { } StyledTextEvent sendLineEvent ( int eventType , int lineOffset , String line ) { } void sendModifyEvent ( Event event ) { } void sendSelectionEvent ( ) { } public void setAlignment ( int alignment ) { } public void setBackground ( Color color ) { } public void setCaret ( Caret caret ) { } public void setBidiColoring ( boolean mode ) { } void setCaretLocation ( ) { } void setCaretLocation ( Point location , int direction ) { } public void setCaretOffset ( int offset ) { } void setClipboardContent ( int start , int length , int clipboardType ) throws SWTError { } public void setContent ( StyledTextContent newContent ) { } public void setCursor ( Cursor cursor ) { } public void setDoubleClickEnabled ( boolean enable ) { } public void setEditable ( boolean editable ) { } public void setFont ( Font font ) { } public void setForeground ( Color color ) { } public void setHorizontalIndex ( int offset ) { } public void setHorizontalPixel ( int pixel ) { } public void setIndent ( int indent ) { } public void setJustify ( boolean justify ) { } public void setKeyBinding ( int key , int action ) { } public void setLineAlignment ( int startLine , int lineCount , int alignment ) { } public void setLineBackground ( int startLine , int lineCount , Color background ) { } void setLineBullet ( int startLine , int lineCount , Bullet bullet ) { } void setVariableLineHeight ( ) { } public void setLineIndent ( int startLine , int lineCount , int indent ) { } public void setLineJustify ( int startLine , int lineCount , boolean justify ) { } public void setLineSpacing ( int lineSpacing ) { } void setMargins ( int leftMargin , int topMargin , int rightMargin , int bottomMargin ) { } void setMouseWordSelectionAnchor ( ) { } public void setOrientation ( int orientation ) { } void setScrollBars ( boolean vertical ) { } public void setSelection ( int start ) { } public void setSelection ( Point point ) { } public void setSelectionBackground ( Color color ) { } public void setSelectionForeground ( Color color ) { } public void setSelection ( int start , int end ) { } void setSelection ( int start , int length , boolean sendEvent ) { } public void setSelectionRange ( int start , int length ) { } public void setStyleRange ( StyleRange range ) { } public void setStyleRanges ( int start , int length , int [ ] ranges , StyleRange [ ] styles ) { } public void setStyleRanges ( int [ ] ranges , StyleRange [ ] styles ) { } void setStyleRanges ( int start , int length , int [ ] ranges , StyleRange [ ] styles , boolean reset ) { } public void setStyleRanges ( StyleRange [ ] ranges ) { } public void setTabs ( int tabs ) { checkWidget ( ) ; tabLength = tabs ; <START_BUG> renderer . setFont ( getFont ( ) , tabs ) ; <END_BUG> if ( ( caretOffset ) > 0 ) { caretOffset = 0 ; showCaret ( ) ; clearSelection ( false ) ; } resetCache ( 0 , content . getLineCount ( ) ) ; super . redraw ( ) ; } public void setText ( String text ) { } public void setTextLimit ( int limit ) { } public void setTopIndex ( int topIndex ) { } public void setTopPixel ( int pixel ) { } public void setWordWrap ( boolean wrap ) { } boolean showLocation ( Rectangle rect ) { } void showCaret ( ) { } public void showSelection ( ) { } void updateSelection ( int startOffset , int replacedLength , int newLength ) { } }

Fix:
renderer . setFont ( null , tabs ) ;