Buggy code:
Text setText ; Text getText ; static final String [ ] EVENT_NAMES = new String [ ] { "None" , "KeyDown" , "KeyUp" , "MouseDown" , "MouseUp" , "MouseMove" , "MouseEnter" , "MouseExit" , "MouseDoubleClick" , "Paint" , "Move" , "Resize" , "Dispose" , "Selection" , "DefaultSelection" , "FocusIn" , "FocusOut" , "Expand" , "Collapse" , "Iconify" , "Deiconify" , "Close" , "Show" , "Hide" , "Modify" , "Verify" , "Activate" , "Deactivate" , "Help" , "DragDetect" , "Arm" , "Traverse" , "MouseHover" , "HardKeyDown" , "HardKeyUp" , "MenuDetect" , "SetData" , "MouseWheel" } ; Tab ( ControlExample instance ) { } void createControlGroup ( ) { } void createSetGetGroup ( ) { } void createControlWidgets ( ) { } void createColorGroup ( ) { } void createOtherGroup ( ) { } void createEventConsolePopup ( ) { } void createExampleGroup ( ) { } void createExampleWidgets ( ) { } void createListenerSelectionDialog ( ) { final Shell dialog = new Shell ( tabFolderPage . getShell ( ) , ( ( SWT . DIALOG_TRIM ) | ( SWT . APPLICATION_MODAL ) ) ) ; dialog . setText ( ControlExample . getResourceString ( "Select_Listeners" ) ) ; dialog . setLayout ( new GridLayout ( 2 , false ) ) ; final Table table = new Table ( dialog , ( ( ( SWT . BORDER ) | ( SWT . V_SCROLL ) ) | ( SWT . CHECK ) ) ) ; GridData data = new GridData ( GridData . FILL_BOTH ) ; data . verticalSpan = 2 ; table . setLayoutData ( data ) ; for ( int i = 0 ; i < ( Tab . EVENT_NAMES . length ) ; i ++ ) { TableItem item = new TableItem ( table , SWT . NONE ) ; item . setText ( Tab . EVENT_NAMES [ i ] ) ; item . setChecked ( eventsFilter [ i ] ) ; } final String [ ] customNames = getCustomEventNames ( ) ; for ( int i = 0 ; i < ( customNames . length ) ; i ++ ) { TableItem item = new TableItem ( table , SWT . NONE ) ; item . setText ( customNames [ i ] ) ; item . setChecked ( eventsFilter [ ( ( Tab . EVENT_NAMES . length ) + i ) ] ) ; } Button selectAll = new Button ( dialog , SWT . PUSH ) ; selectAll . setText ( ControlExample . getResourceString ( "Select_All" ) ) ; selectAll . setLayoutData ( new GridData ( GridData . HORIZONTAL_ALIGN_FILL ) ) ; selectAll . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { TableItem [ ] items = table . getItems ( ) ; for ( int i = 0 ; i < ( Tab . EVENT_NAMES . length ) ; i ++ ) { items [ i ] . setChecked ( true ) ; } for ( int i = 0 ; i < ( customNames . length ) ; i ++ ) { items [ ( ( Tab . EVENT_NAMES . length ) + i ) ] . setChecked ( true ) ; } } } ) ; Button deselectAll = new Button ( dialog , SWT . PUSH ) ; deselectAll . setText ( ControlExample . getResourceString ( "Deselect_All" ) ) ; deselectAll . setLayoutData ( new GridData ( ( ( GridData . HORIZONTAL_ALIGN_FILL ) | ( GridData . VERTICAL_ALIGN_BEGINNING ) ) ) ) ; deselectAll . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { TableItem [ ] items = table . getItems ( ) ; for ( int i = 0 ; i < ( Tab . EVENT_NAMES . length ) ; i ++ ) { items [ i ] . setChecked ( false ) ; } for ( int i = 0 ; i < ( customNames . length ) ; i ++ ) { items [ ( ( Tab . EVENT_NAMES . length ) + i ) ] . setChecked ( false ) ; } } } ) ; <START_BUG> Label filler = new Label ( dialog , SWT . NONE ) ; <END_BUG> Button ok = new Button ( dialog , SWT . PUSH ) ; ok . setText ( ControlExample . getResourceString ( "OK" ) ) ; dialog . setDefaultButton ( ok ) ; ok . setLayoutData ( new GridData ( GridData . HORIZONTAL_ALIGN_FILL ) ) ; ok . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { TableItem [ ] items = table . getItems ( ) ; for ( int i = 0 ; i < ( Tab . EVENT_NAMES . length ) ; i ++ ) { eventsFilter [ i ] = items [ i ] . getChecked ( ) ; } for ( int i = 0 ; i < ( customNames . length ) ; i ++ ) { eventsFilter [ ( ( Tab . EVENT_NAMES . length ) + i ) ] = items [ ( ( Tab . EVENT_NAMES . length ) + i ) ] . getChecked ( ) ; } dialog . dispose ( ) ; } } ) ; dialog . pack ( ) ; dialog . open ( ) ; while ( ! ( dialog . isDisposed ( ) ) ) { if ( ! ( dialog . getDisplay ( ) . readAndDispatch ( ) ) ) dialog . getDisplay ( ) . sleep ( ) ; } } void createListenersGroup ( ) { } String [ ] getMethodNames ( ) { } void createSetGetDialog ( int x , int y , String [ ] methodNames ) { } void resetLabels ( ) { } String setMethodName ( String methodRoot ) { } String parameterInfo ( String methodRoot ) { } void getValue ( ) { } Class getReturnType ( String methodRoot ) { } void setValue ( ) { }

Fix:
new Label ( dialog , SWT . NONE ) ;