Buggy code:
public class Test_org_eclipse_swt_custom_StyledText extends Test_org_eclipse_swt_widgets_Canvas { StyledText text ; static final RGB RED = new RGB ( 255 , 0 , 0 ) ; static final RGB BLUE = new RGB ( 0 , 0 , 255 ) ; static final RGB GREEN = new RGB ( 0 , 255 , 0 ) ; static final RGB YELLOW = new RGB ( 255 , 255 , 0 ) ; static final RGB CYAN = new RGB ( 0 , 255 , 255 ) ; static final RGB PURPLE = new RGB ( 255 , 0 , 255 ) ; static final String PLATFORM_LINE_DELIMITER = System . getProperty ( "line.separator" ) ; Hashtable colors = new Hashtable ( ) ; private boolean listenerCalled ; private boolean listener2Called ; public Test_org_eclipse_swt_custom_StyledText ( String name ) { } public static void main ( String [ ] args ) { } protected void setUp ( ) { } protected void tearDown ( ) { } private StyleRange [ ] defaultStyles ( ) { } protected void getLineBackgrounds ( ) { } private String textString ( ) { } private boolean isBidi ( ) { } private StyleRange getStyle ( int start , int length , RGB fg , RGB bg ) { } private Color getColor ( RGB rgb ) { } protected void initializeColors ( ) { } public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI ( ) { } public void test_addExtendedModifyListenerLorg_eclipse_swt_custom_ExtendedModifyListener ( ) { } public void test_setKeyBindingII ( ) { } public void test_addBidiSegmentListenerLorg_eclipse_swt_custom_BidiSegmentListener ( ) { String line = "Line1" ; boolean exceptionThrown = false ; BidiSegmentListener listener = new BidiSegmentListener ( ) { public void lineGetSegments ( BidiSegmentEvent event ) { listenerCalled = true ; } } ; try { text . addBidiSegmentListener ( null ) ; } catch ( IllegalArgumentException e ) { exceptionThrown = true ; } assertTrue ( "Expected<seq2seq4repair_space>exception<seq2seq4repair_space>not<seq2seq4repair_space>thrown" , exceptionThrown ) ; listenerCalled = false ; text . setText ( line ) ; text . addBidiSegmentListener ( listener ) ; text . getLocationAtOffset ( 0 ) ; <START_BUG> if ( isBidi ( ) ) { <END_BUG> assertTrue ( "Listener<seq2seq4repair_space>not<seq2seq4repair_space>called" , listenerCalled ) ; } else { assertTrue ( "Listener<seq2seq4repair_space>called<seq2seq4repair_space>when<seq2seq4repair_space>it<seq2seq4repair_space>shouldn't<seq2seq4repair_space>be" , ( ( listenerCalled ) == false ) ) ; } listenerCalled = false ; text . removeBidiSegmentListener ( listener ) ; text . getLocationAtOffset ( 0 ) ; assertTrue ( "Listener<seq2seq4repair_space>not<seq2seq4repair_space>removed" , ( ( listenerCalled ) == false ) ) ; } public void test_addLineBackgroundListenerLorg_eclipse_swt_custom_LineBackgroundListener ( ) { } public void test_addLineStyleListenerLorg_eclipse_swt_custom_LineStyleListener ( ) { } public void test_addModifyListenerLorg_eclipse_swt_events_ModifyListener ( ) { } public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener ( ) { } public void test_addVerifyKeyListenerLorg_eclipse_swt_custom_VerifyKeyListener ( ) { } public void test_addVerifyListenerLorg_eclipse_swt_events_VerifyListener ( ) { } public void test_appendLjava_lang_String ( ) { } public void test_computeSizeIIZ ( ) { } public void test_copy ( ) { } public void test_cut ( ) { } public void test_getBidiColoring ( ) { } public void test_getCaretOffset ( ) { } public void test_getContent ( ) { } public void test_getDoubleClickEnabled ( ) { } public void test_getEditable ( ) { } public void test_getHorizontalIndex ( ) { } public void test_getHorizontalPixel ( ) { } public void test_getKeyBindingI ( ) { } public void test_getCharCount ( ) { } public void test_getLineBackgroundI ( ) { } public void test_getLineCount ( ) { } public void test_getLineAtOffsetI ( ) { } public void test_getLineDelimiter ( ) { } public void test_getLineHeight ( ) { } public void test_getLocationAtOffsetI ( ) { } public void test_getOffsetAtLineI ( ) { } public void test_getOffsetAtLocationLorg_eclipse_swt_graphics_Point ( ) { } public void test_getOrientation ( ) { } public void test_getSelection ( ) { } public void test_getSelectionBackground ( ) { } public void test_getSelectionForeground ( ) { } public void test_getSelectionRange ( ) { } public void test_getSelectionCount ( ) { } public void test_getSelectionText ( ) { } public void test_getStyleRangeAtOffsetI ( ) { } public void test_getStyleRanges ( ) { } public void test_getStyleRangesII ( ) { } public void test_getTabs ( ) { } public void test_getText ( ) { } public void test_getTextII ( ) { } public void test_getTextRangeII ( ) { } public void test_getTextLimit ( ) { } public void test_getTopIndex ( ) { } public void test_getTopPixel ( ) { } public void test_getWordWrap ( ) { } public void test_insertLjava_lang_String ( ) { } public void test_invokeActionI ( ) { } public void test_paste ( ) { } public void test_print ( ) { } public void test_printLorg_eclipse_swt_printing_Printer ( ) { } public void test_printLorg_eclipse_swt_printing_PrinterLorg_eclipse_swt_custom_StyledTextPrintOptions ( ) { } public void test_redraw ( ) { } public void test_redrawIIIIZ ( ) { } public void test_redrawRangeIIZ ( ) { } public void test_removeBidiSegmentListenerLorg_eclipse_swt_custom_BidiSegmentListener ( ) { } public void test_removeExtendedModifyListenerLorg_eclipse_swt_custom_ExtendedModifyListener ( ) { } public void test_removeLineBackgroundListenerLorg_eclipse_swt_custom_LineBackgroundListener ( ) { } public void test_removeLineStyleListenerLorg_eclipse_swt_custom_LineStyleListener ( ) { } public void test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener ( ) { } public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener ( ) { } public void test_removeVerifyListenerLorg_eclipse_swt_events_VerifyListener ( ) { } public void test_removeVerifyKeyListenerLorg_eclipse_swt_custom_VerifyKeyListener ( ) { } public void test_replaceStyleRangesII$Lorg_eclipse_swt_custom_StyleRange ( ) { } public void test_replaceTextRangeIILjava_lang_String ( ) { } public void test_selectAll ( ) { } public void test_setCaretLorg_eclipse_swt_widgets_Caret ( ) { } public void test_setBidiColoringZ ( ) { } public void test_setCaretOffsetI ( ) { } public void test_setContentLorg_eclipse_swt_custom_StyledTextContent ( ) { } public void test_setDoubleClickEnabledZ ( ) { } public void test_setEditableZ ( ) { } public void test_setFontLorg_eclipse_swt_graphics_Font ( ) { } public void test_setHorizontalIndexI ( ) { } public void test_setHorizontalPixelI ( ) { } public void test_setLineBackgroundIILorg_eclipse_swt_graphics_Color ( ) { } public void test_setOrientationI ( ) { } public void test_setSelectionI ( ) { } public void test_setSelectionLorg_eclipse_swt_graphics_Point ( ) { } public void test_setSelectionII ( ) { } public void test_setSelectionBackgroundLorg_eclipse_swt_graphics_Color ( ) { } public void test_setSelectionForegroundLorg_eclipse_swt_graphics_Color ( ) { } public void test_setSelectionRangeII ( ) { } public void test_setStyleRangeLorg_eclipse_swt_custom_StyleRange ( ) { } public void test_setStyleRanges$Lorg_eclipse_swt_custom_StyleRange ( ) { } public void test_setTabsI ( ) { }

Fix:
if ( ( isBidi ( ) ) || ( SWT . getPlatform ( ) . equals ( "gtk" ) ) ) {