Buggy code:
public class TarArchiveEntry implements ArchiveEntry , TarConstants { private String name ; private int mode ; private int userId ; private int groupId ; private long size ; private long modTime ; private byte linkFlag ; private String linkName ; private String magic ; private String version ; private String userName ; private String groupName ; private int devMajor ; private int devMinor ; private File file ; public static final int MAX_NAMELEN = 31 ; public static final int DEFAULT_DIR_MODE = 16877 ; public static final int DEFAULT_FILE_MODE = 33188 ; public static final int MILLIS_PER_SECOND = 1000 ; private TarArchiveEntry ( ) { } public TarArchiveEntry ( String name ) { } public TarArchiveEntry ( String name , boolean preserveLeadingSlashes ) { } public TarArchiveEntry ( String name , byte linkFlag ) { } public TarArchiveEntry ( File file ) { } public TarArchiveEntry ( File file , String fileName ) { } public TarArchiveEntry ( byte [ ] headerBuf ) { } public boolean equals ( TarArchiveEntry it ) { } public boolean equals ( Object it ) { } public int hashCode ( ) { } public boolean isDescendent ( TarArchiveEntry desc ) { } public String getName ( ) { } public void setName ( String name ) { } public void setMode ( int mode ) { } public String getLinkName ( ) { } public int getUserId ( ) { } public void setUserId ( int userId ) { } public int getGroupId ( ) { } public void setGroupId ( int groupId ) { } public String getUserName ( ) { } public void setUserName ( String userName ) { } public String getGroupName ( ) { } public void setGroupName ( String groupName ) { } public void setIds ( int userId , int groupId ) { } public void setNames ( String userName , String groupName ) { } public void setModTime ( long time ) { } public void setModTime ( Date time ) { } public Date getModTime ( ) { } public Date getLastModifiedDate ( ) { } public File getFile ( ) { } public int getMode ( ) { } public long getSize ( ) { } public void setSize ( long size ) { } public boolean isGNULongNameEntry ( ) { } public boolean isDirectory ( ) { } public TarArchiveEntry [ ] getDirectoryEntries ( ) { } public void writeEntryHeader ( byte [ ] outbuf ) { } public void parseTarHeader ( byte [ ] header ) { } private static String normalizeFileName ( String fileName , boolean preserveLeadingSlashes ) { <START_BUG> String osname = System . getProperty ( "os.name" ) . toLowerCase ( Locale . US ) ; <END_BUG> if ( osname != null ) { if ( osname . startsWith ( "windows" ) ) { if ( ( fileName . length ( ) ) > 2 ) { char ch1 = fileName . charAt ( 0 ) ; char ch2 = fileName . charAt ( 1 ) ; if ( ( ch2 == ':' ) && ( ( ( ch1 >= 'a' ) && ( ch1 <= 'z' ) ) || ( ( ch1 >= 'A' ) && ( ch1 <= 'Z' ) ) ) ) { fileName = fileName . substring ( 2 ) ; } } } else if ( ( osname . indexOf ( "netware" ) ) > ( - 1 ) ) { int colon = fileName . indexOf ( ':' ) ; if ( colon != ( - 1 ) ) { fileName = fileName . substring ( ( colon + 1 ) ) ; } } } fileName = fileName . replace ( File . separatorChar , '//' ) ; while ( ( ! preserveLeadingSlashes ) && ( fileName . startsWith ( "//" ) ) ) { fileName = fileName . substring ( 1 ) ; } return fileName ; } }

Fix:
String osname = System . getProperty ( "os.name" ) . toLowerCase ( Locale . ENGLISH ) ;