Buggy code:
public class JNIGeneratorAppUI { Display display ; Shell shell ; Composite actionsPanel ; Combo mainClassCb ; Combo outputDirCb ; Table classesLt ; Table membersLt ; Table paramsLt ; ProgressBar progressBar ; Label progressLabel ; FileDialog fileDialog ; TableEditor paramTextEditor ; TableEditor memberTextEditor ; TableEditor classTextEditor ; JNIGeneratorAppUI . FlagsEditor paramListEditor ; JNIGeneratorAppUI . FlagsEditor memberListEditor ; JNIGeneratorAppUI . FlagsEditor classListEditor ; Text paramEditorTx ; Text memberEditorTx ; Text classEditorTx ; List paramEditorLt ; List memberEditorLt ; List classEditorLt ; static class FlagsEditor { Table parent ; int column = - 1 ; TableItem item ; public FlagsEditor ( Table parent ) { } public int getColumn ( ) { } public TableItem getItem ( ) { } public void setColumn ( int column ) { } public void setItem ( TableItem item ) { } } JNIGeneratorApp app ; static final int CLASS_NAME_COLUMN = 0 ; static final int CLASS_FLAGS_COLUMN = 1 ; static final int CLASS_EXCLUDE_COLUMN = 2 ; static final int FIELD_NAME_COLUMN = 0 ; static final int FIELD_FLAGS_COLUMN = 1 ; static final int FIELD_CAST_COLUMN = 2 ; static final int FIELD_ACCESSOR_COLUMN = 3 ; static final int FIELD_EXCLUDE_COLUMN = 4 ; static final int METHOD_NAME_COLUMN = 0 ; static final int METHOD_FLAGS_COLUMN = 1 ; static final int METHOD_ACCESSOR_COLUMN = 2 ; static final int METHOD_EXCLUDE_COLUMN = 3 ; static final int PARAM_INDEX_COLUMN = 0 ; static final int PARAM_TYPE_COLUMN = 1 ; static final int PARAM_FLAGS_COLUMN = 2 ; static final int PARAM_CAST_COLUMN = 3 ; public JNIGeneratorAppUI ( ) { } public JNIGeneratorAppUI ( JNIGeneratorApp app ) { } void cleanup ( ) { } void generateStructsHeader ( ) { } void generateStructs ( ) { } void generateSizeof ( ) { } void generateMetaData ( ) { } void generateNatives ( ) { } void generateAll ( ) { if ( ! ( updateOutputDir ( ) ) ) return ; Cursor cursor = display . getSystemCursor ( CURSOR_WAIT ) ; shell . setCursor ( cursor ) ; shell . setEnabled ( false ) ; Control [ ] children = actionsPanel . getChildren ( ) ; for ( int i = 0 ; i < ( children . length ) ; i ++ ) { Control child = children [ i ] ; if ( child instanceof Button ) child . setEnabled ( false ) ; } <START_BUG> final boolean showProgress = true ; <END_BUG> if ( showProgress ) { progressLabel . setText ( "" ) ; progressBar . setSelection ( 0 ) ; progressLabel . setVisible ( true ) ; progressBar . setVisible ( true ) ; } final boolean [ ] done = new boolean [ 1 ] ; new Thread ( ) { public void run ( ) { try { app . generate ( ( ! showProgress ? null : new ProgressMonitor ( ) { public void setTotal ( final int total ) { display . syncExec ( new Runnable ( ) { public void run ( ) { progressBar . setMaximum ( total ) ; } } ) ; } public void step ( ) { display . syncExec ( new Runnable ( ) { public void run ( ) { progressBar . setSelection ( ( ( progressBar . getSelection ( ) ) + 1 ) ) ; } } ) ; } public void setMessage ( final String message ) { display . syncExec ( new Runnable ( ) { public void run ( ) { progressLabel . setText ( message ) ; progressLabel . update ( ) ; } } ) ; } } ) ) ; } finally { done [ 0 ] = true ; display . wake ( ) ; } } } . start ( ) ; while ( ! ( done [ 0 ] ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } for ( int i = 0 ; i < ( children . length ) ; i ++ ) { Control child = children [ i ] ; if ( child instanceof Button ) child . setEnabled ( true ) ; } if ( showProgress ) { progressBar . setVisible ( false ) ; progressLabel . setVisible ( false ) ; } shell . setEnabled ( true ) ; shell . setCursor ( null ) ; } void generateConstants ( ) { } Class [ ] getSelectedClasses ( ) { } Method [ ] getSelectedMethods ( ) { } Field [ ] getSelectedFields ( ) { } public void open ( ) { } void createMainClassPanel ( Composite panel , Listener updateListener ) { } void createClassesPanel ( Composite panel ) { } void createMembersPanel ( Composite panel ) { } void createParametersPanel ( Composite panel ) { } Button createActionButton ( Composite parent , String text , Listener listener ) { } void createActionButtons ( Composite parent ) { } public void run ( ) { } String getPackageString ( String className ) { } String getClassString ( Class clazz ) { } String getFlagsString ( String [ ] flags ) { } String getMethodString ( Method method ) { } String getFieldString ( Field field ) { } void updateClasses ( ) { } void updateMembers ( ) { } void updateParameters ( ) { } void updateGenerate ( TableItem item ) { } boolean updateOutputDir ( ) { } void updateMainClass ( ) { } public static void main ( String [ ] args ) { } }

Fix:
final boolean showProgress = false ;