Buggy code:
public class JNIGeneratorApp { Class mainClass ; ProgressMonitor progress ; String mainClassName ; String outputDir ; String classpath ; MetaData metaData ; public JNIGeneratorApp ( ) { } public String getClasspath ( ) { } public Class getMainClass ( ) { } public String getMainClassName ( ) { } public MetaData getMetaData ( ) { } String getMetaDataDir ( ) { } public String getOutputDir ( ) { } public void generateAll ( ) { } void generateSTATS_C ( Class [ ] classes ) { } void generateSTATS_H ( Class [ ] classes ) { } void generateSTRUCTS_H ( Class [ ] classes ) { } void generateSTRUCTS_C ( Class [ ] classes ) { } void generateSWT_C ( Class [ ] classes ) { } void generateMetaData ( Class [ ] classes ) { } public void generate ( ) { } public void generate ( ProgressMonitor progress ) { } boolean compare ( InputStream is1 , InputStream is2 ) throws IOException { } void output ( byte [ ] bytes , String fileName ) throws IOException { } String getPackageName ( String className ) { } String [ ] getClassNames ( String mainClassName ) { String pkgName = getPackageName ( mainClassName ) ; String classpath = getClasspath ( ) ; if ( classpath == null ) classpath = System . getProperty ( "java.class.path" ) ; String pkgPath = pkgName . replace ( '.' , File . separatorChar ) ; String pkgZipPath = pkgName . replace ( '.' , '//' ) ; ArrayList classes = new ArrayList ( ) ; int start = 0 ; int index = 0 ; while ( index < ( classpath . length ( ) ) ) { index = classpath . indexOf ( File . pathSeparatorChar , start ) ; if ( index == ( - 1 ) ) index = classpath . length ( ) ; String path = classpath . substring ( start , index ) ; if ( path . toLowerCase ( ) . endsWith ( ".jar" ) ) { ZipFile zipFile = null ; try { zipFile = new ZipFile ( path ) ; Enumeration entries = zipFile . entries ( ) ; while ( entries . hasMoreElements ( ) ) { ZipEntry entry = ( ( ZipEntry ) ( entries . nextElement ( ) ) ) ; String name = entry . getName ( ) ; <START_BUG> if ( ( name . startsWith ( pkgZipPath ) ) && ( name . endsWith ( ".class" ) ) ) { <END_BUG> String className = name . substring ( ( ( pkgZipPath . length ( ) ) + 1 ) , ( ( name . length ( ) ) - 6 ) ) ; className . replace ( '//' , '.' ) ; classes . add ( className ) ; } } } catch ( IOException e ) { } finally { try { if ( zipFile != null ) zipFile . close ( ) ; } catch ( IOException ex ) { } } } else { File file = new File ( ( ( path + ( File . separator ) ) + pkgPath ) ) ; if ( file . exists ( ) ) { String [ ] entries = file . list ( ) ; for ( int i = 0 ; i < ( entries . length ) ; i ++ ) { String entry = entries [ i ] ; File f = new File ( file , entry ) ; if ( ! ( f . isDirectory ( ) ) ) { if ( f . getAbsolutePath ( ) . endsWith ( ".class" ) ) { String className = entry . substring ( 0 , ( ( entry . length ( ) ) - 6 ) ) ; classes . add ( className ) ; } } } } } start = index + 1 ; } return ( ( String [ ] ) ( classes . toArray ( new String [ classes . size ( ) ] ) ) ) ; } public Class [ ] getClasses ( ) { } public Class [ ] getNativesClasses ( ) { } public Class [ ] getStructureClasses ( ) { } public void setClasspath ( String classpath ) { } public void setMainClassName ( String str ) { } public void setOutputDir ( String str ) { } public static String getDefaultMainClass ( ) { } public static String getDefaultPlatform ( ) { } public static void main ( String [ ] args ) { } }

Fix:
if ( ( ( name . startsWith ( pkgZipPath ) ) && ( ( name . indexOf ( '//' , ( ( pkgZipPath . length ( ) ) + 1 ) ) ) == ( - 1 ) ) ) && ( name . endsWith ( ".class" ) ) ) {