Buggy code:
public static final int FNM_DOTMATCH = 4 ; public static final int FNM_CASEFOLD = 8 ; public static final int FNM_SYSCASE = ( Dir . CASEFOLD_FILESYSTEM ) ? Dir . FNM_CASEFOLD : 0 ; public static final int FNM_NOMATCH = 1 ; public static final int FNM_ERROR = 2 ; public static final byte [ ] EMPTY = new byte [ 0 ] ; public static final byte [ ] SLASH = new byte [ ] { '//' } ; public static final byte [ ] STAR = new byte [ ] { '*' } ; public static final byte [ ] DOUBLE_STAR = new byte [ ] { '*' , '*' } ; private static boolean isdirsep ( byte c ) { } private static int rb_path_next ( byte [ ] _s , int s , int send ) { } private static int fnmatch_helper ( byte [ ] bytes , int pstart , int pend , byte [ ] string , int sstart , int send , int flags ) { } public static int fnmatch ( byte [ ] bytes , int pstart , int pend , byte [ ] string , int sstart , int send , int flags ) { } private static boolean isDoubleStarAndSlash ( byte [ ] bytes , int pos ) { } private static int nextSlashIndex ( byte [ ] bytes , int start , int end ) { } public static int range ( byte [ ] _pat , int pat , int pend , char test , int flags ) { } public static List < ByteList > push_glob ( String cwd , ByteList globByteList , int flags ) { } private static class GlobPattern { final byte [ ] bytes ; final int begin ; final int end ; int flags ; int index ; public GlobPattern ( ByteList bytelist , int flags ) { } public GlobPattern ( byte [ ] bytes , int index , int end , int flags ) { } public int findClosingIndexOf ( int leftTokenIndex ) { } public boolean hasNext ( ) { } public void reset ( ) { } public void setIndex ( int value ) { } public int index ( ) { } public int indexOf ( byte c ) { } public byte next ( ) { } } public static interface GlobFunc { int call ( byte [ ] ptr , int p , int len , Object ary ) { } } private static class GlobArgs { Dir . GlobFunc func ; int c = - 1 ; List < ByteList > v ; public GlobArgs ( Dir . GlobFunc func , List < ByteList > arg ) { } } public static final Dir . GlobFunc push_pattern = new Dir . GlobFunc ( ) { @ SuppressWarnings ( "unchecked" ) public int call ( byte [ ] ptr , int p , int len , Object ary ) { } } ; public static final Dir . GlobFunc glob_caller = new Dir . GlobFunc ( ) { public int call ( byte [ ] ptr , int p , int len , Object ary ) { } } ; private static int push_braces ( String cwd , List < ByteList > result , Dir . GlobPattern pattern ) { } private static int push_globs ( String cwd , List < ByteList > ary , Dir . GlobPattern pattern ) { } private static boolean has_magic ( byte [ ] bytes , int begin , int end , int flags ) { } private static int remove_backslashes ( byte [ ] bytes , int index , int len ) { } private static int strchr ( byte [ ] bytes , int begin , int end , byte ch ) { } private static byte [ ] extract_path ( byte [ ] bytes , int begin , int end ) { } private static byte [ ] extract_elem ( byte [ ] bytes , int begin , int end ) { } private static boolean beginsWithDriveLetter ( byte [ ] path , int begin , int end ) { } private static boolean isRoot ( byte [ ] base ) { int length = base . length ; <START_BUG> return ( ( length == 0 ) || ( ( length == 1 ) && ( Dir . isdirsep ( base [ 0 ] ) ) ) ) || ( ( length < 4 ) && ( Dir . beginsWithDriveLetter ( base , 0 , length ) ) ) ; <END_BUG> } private static boolean isJarFilePath ( byte [ ] bytes , int begin , int end ) { } private static boolean isAbsolutePath ( byte [ ] path , int begin , int length ) { } private static String [ ] files ( File directory ) { } private static final class DirGlobber { public final ByteList link ; public final JarEntry jarEntry ; public DirGlobber ( ByteList link , JarEntry jarEntry ) { } } private static int addToResultIfExists ( String cwd , byte [ ] bytes , int begin , int end , int flags , Dir . GlobFunc func , Dir . GlobArgs arg ) { } private static ZipEntry getZipEntryFor ( byte [ ] bytes , int begin , int end ) { } private static int glob_helper ( String cwd , byte [ ] bytes , int begin , int end , int sub , int flags , Dir . GlobFunc func , Dir . GlobArgs arg ) { } private static ByteList fixBytesForJarInUTF8 ( byte [ ] buf , int offset , int len ) { } private static byte [ ] getBytesInUTF8 ( String s ) { } private static String newStringFromUTF8 ( byte [ ] buf , int offset , int len ) { } private static String newStringFromUTF8 ( byte [ ] buf ) { } }

Fix:
return ( ( length == 0 ) || ( ( length == 1 ) && ( Dir . isdirsep ( base [ 0 ] ) ) ) ) || ( ( length == 3 ) && ( Dir . beginsWithDriveLetter ( base , 0 , length ) ) ) ;