Buggy code:
public class ZipArchiveInputStream extends ArchiveInputStream { private static final int SHORT = 2 ; private static final int WORD = 4 ; private final ZipEncoding zipEncoding ; private final boolean useUnicodeExtraFields ; private final InputStream in ; private final Inflater inf = new Inflater ( true ) ; private final CRC32 crc = new CRC32 ( ) ; private final byte [ ] buf = new byte [ ZipArchiveOutputStream . BUFFER_SIZE ] ; private ZipArchiveEntry current = null ; private boolean closed = false ; private boolean hitCentralDirectory = false ; private int offsetInBuffer = 0 ; private long readBytesOfEntry = 0 ; private long bytesReadFromStream = 0 ; private int lengthOfLastRead = 0 ; private boolean hasDataDescriptor = false ; private ByteArrayInputStream lastStoredEntry = null ; private boolean allowStoredEntriesWithDataDescriptor = false ; private static final int LFH_LEN = 30 ; public ZipArchiveInputStream ( InputStream inputStream ) { } public ZipArchiveInputStream ( InputStream inputStream , String encoding , boolean useUnicodeExtraFields ) { } public ZipArchiveInputStream ( InputStream inputStream , String encoding , boolean useUnicodeExtraFields , boolean allowStoredEntriesWithDataDescriptor ) { } public ZipArchiveEntry getNextZipEntry ( ) throws IOException { if ( ( closed ) || ( hitCentralDirectory ) ) { return null ; } if ( ( current ) != null ) { closeEntry ( ) ; } byte [ ] lfh = new byte [ ZipArchiveInputStream . LFH_LEN ] ; try { readFully ( lfh ) ; } catch ( EOFException e ) { return null ; } ZipLong sig = new ZipLong ( lfh ) ; if ( sig . equals ( CFH_SIG ) ) { hitCentralDirectory = true ; return null ; } if ( ! ( sig . equals ( LFH_SIG ) ) ) { return null ; } int off = ZipArchiveInputStream . WORD ; current = new ZipArchiveEntry ( ) ; int versionMadeBy = ZipShort . getValue ( lfh , off ) ; off += ZipArchiveInputStream . SHORT ; current . setPlatform ( ( ( versionMadeBy > > ( ZipFile . BYTE_SHIFT ) ) & ( ZipFile . NIBLET_MASK ) ) ) ; final GeneralPurposeBit gpFlag = GeneralPurposeBit . parse ( lfh , off ) ; final boolean hasUTF8Flag = gpFlag . usesUTF8ForNames ( ) ; final ZipEncoding entryEncoding = ( hasUTF8Flag ) ? ZipEncodingHelper . UTF8_ZIP_ENCODING : zipEncoding ; hasDataDescriptor = gpFlag . usesDataDescriptor ( ) ; current . setGeneralPurposeBit ( gpFlag ) ; off += ZipArchiveInputStream . SHORT ; current . setMethod ( ZipShort . getValue ( lfh , off ) ) ; off += ZipArchiveInputStream . SHORT ; long time = ZipUtil . dosToJavaTime ( ZipLong . getValue ( lfh , off ) ) ; current . setTime ( time ) ; off += ZipArchiveInputStream . WORD ; if ( ! ( hasDataDescriptor ) ) { current . setCrc ( ZipLong . getValue ( lfh , off ) ) ; off += ZipArchiveInputStream . WORD ; current . setCompressedSize ( ZipLong . getValue ( lfh , off ) ) ; off += ZipArchiveInputStream . WORD ; current . setSize ( ZipLong . getValue ( lfh , off ) ) ; off += ZipArchiveInputStream . WORD ; } else { off += 3 * ( ZipArchiveInputStream . WORD ) ; } int fileNameLen = ZipShort . getValue ( lfh , off ) ; off += ZipArchiveInputStream . SHORT ; int extraLen = ZipShort . getValue ( lfh , off ) ; off += ZipArchiveInputStream . SHORT ; byte [ ] fileName = new byte [ fileNameLen ] ; readFully ( fileName ) ; <START_BUG> current . setName ( entryEncoding . decode ( fileName ) ) ; <END_BUG> byte [ ] extraData = new byte [ extraLen ] ; readFully ( extraData ) ; current . setExtra ( extraData ) ; if ( ( ! hasUTF8Flag ) && ( useUnicodeExtraFields ) ) { ZipUtil . setNameAndCommentFromExtraFields ( current , fileName , null ) ; } return current ; } public ArchiveEntry getNextEntry ( ) throws IOException { } public boolean canReadEntryData ( ArchiveEntry ae ) { } public int read ( byte [ ] buffer , int start , int length ) throws IOException { } public void close ( ) throws IOException { } public long skip ( long value ) throws IOException { } public static boolean matches ( byte [ ] signature , int length ) { } private static boolean checksig ( byte [ ] signature , byte [ ] expected ) { } private void closeEntry ( ) throws IOException { } private void fill ( ) throws IOException { } private void readFully ( byte [ ] b ) throws IOException { } private void readDataDescriptor ( ) throws IOException { } private boolean supportsDataDescriptorFor ( ZipArchiveEntry entry ) { } private void readStoredEntry ( ) throws IOException { } }

Fix:
current . setName ( entryEncoding . decode ( fileName ) , fileName ) ;