Buggy code:
public class SnippetLauncher { public static void main ( String [ ] args ) { File sourceDir = new File ( "src//org//eclipse//swt//snippets" ) ; boolean hasSource = sourceDir . exists ( ) ; <START_BUG> int count = 300 ; <END_BUG> if ( hasSource ) { File [ ] files = sourceDir . listFiles ( ) ; if ( ( files . length ) > 0 ) count = files . length ; } for ( int i = 1 ; i < count ; i ++ ) { if ( ( ( ( i == 136 ) || ( i == 151 ) ) || ( i == 180 ) ) || ( i == 219 ) ) continue ; String className = "Snippet" + i ; Class clazz = null ; try { clazz = Class . forName ( ( "org.eclipse.swt.snippets." + className ) ) ; } catch ( ClassNotFoundException e ) { } if ( clazz != null ) { System . out . println ( ( "\n" + ( clazz . getName ( ) ) ) ) ; if ( hasSource ) { File sourceFile = new File ( sourceDir , ( className + ".java" ) ) ; try { FileReader reader = new FileReader ( sourceFile ) ; char [ ] buffer = new char [ ( ( int ) ( sourceFile . length ( ) ) ) ] ; reader . read ( buffer ) ; String source = String . valueOf ( buffer ) ; int start = source . indexOf ( "package" ) ; start = source . indexOf ( "//*" , start ) ; int end = source . indexOf ( "*<seq2seq4repair_space>For<seq2seq4repair_space>a<seq2seq4repair_space>list<seq2seq4repair_space>of<seq2seq4repair_space>all" ) ; System . out . println ( source . substring ( start , ( end - 3 ) ) ) ; boolean skip = false ; String platform = SWT . getPlatform ( ) ; if ( ( source . indexOf ( "PocketPC" ) ) != ( - 1 ) ) { platform = "PocketPC" ; skip = true ; } else if ( ( source . indexOf ( "OpenGL" ) ) != ( - 1 ) ) { platform = "OpenGL" ; skip = true ; } else if ( ( source . indexOf ( "JavaXPCOM" ) ) != ( - 1 ) ) { platform = "JavaXPCOM" ; skip = true ; } else { String [ ] platforms = new String [ ] { "win32" , "motif" , "gtk" , "photon" , "carbon" } ; for ( int p = 0 ; p < ( platforms . length ) ; p ++ ) { if ( ( ! ( platforms [ p ] . equals ( platform ) ) ) && ( ( source . indexOf ( ( "." + ( platforms [ p ] ) ) ) ) != ( - 1 ) ) ) { platform = platforms [ p ] ; skip = true ; break ; } } } if ( skip ) { System . out . println ( ( ( "...skipping<seq2seq4repair_space>" + platform ) + "<seq2seq4repair_space>example..." ) ) ; continue ; } } catch ( Exception e ) { } } Method method = null ; String [ ] param = new String [ 0 ] ; if ( i == 81 ) param = new String [ ] { "Shell.Explorer" } ; try { method = clazz . getMethod ( "main" , new Class [ ] { param . getClass ( ) } ) ; } catch ( NoSuchMethodException e ) { System . out . println ( "<seq2seq4repair_space>Did<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>main(String<seq2seq4repair_space>[])" ) ; } if ( method != null ) { try { method . invoke ( clazz , new Object [ ] { param } ) ; } catch ( IllegalAccessException e ) { System . out . println ( "<seq2seq4repair_space>Failed<seq2seq4repair_space>to<seq2seq4repair_space>launch<seq2seq4repair_space>(illegal<seq2seq4repair_space>access)" ) ; } catch ( IllegalArgumentException e ) { System . out . println ( "<seq2seq4repair_space>Failed<seq2seq4repair_space>to<seq2seq4repair_space>launch<seq2seq4repair_space>(illegal<seq2seq4repair_space>argument<seq2seq4repair_space>to<seq2seq4repair_space>main)" ) ; } catch ( InvocationTargetException e ) { System . out . println ( ( "<seq2seq4repair_space>Exception<seq2seq4repair_space>in<seq2seq4repair_space>Snippet:<seq2seq4repair_space>" + ( e . getTargetException ( ) ) ) ) ; } } } } } }

Fix:
int count = 500 ;