Buggy code:
public ZipArchiveInputStream ( InputStream inputStream , String encoding , boolean useUnicodeExtraFields ) { } public ZipArchiveInputStream ( InputStream inputStream , String encoding , boolean useUnicodeExtraFields , boolean allowStoredEntriesWithDataDescriptor ) { } public ZipArchiveEntry getNextZipEntry ( ) throws IOException { boolean firstEntry = true ; if ( ( closed ) || ( hitCentralDirectory ) ) { return null ; } if ( ( current ) != null ) { closeEntry ( ) ; firstEntry = false ; } try { if ( firstEntry ) { readFirstLocalFileHeader ( LFH_BUF ) ; } else { readFully ( LFH_BUF ) ; } } catch ( EOFException e ) { return null ; } ZipLong sig = new ZipLong ( LFH_BUF ) ; if ( ( sig . equals ( CFH_SIG ) ) || ( sig . equals ( AED_SIG ) ) ) { hitCentralDirectory = true ; skipRemainderOfArchive ( ) ; } if ( ! ( sig . equals ( LFH_SIG ) ) ) { return null ; } int off = ZipConstants . WORD ; current = new ZipArchiveInputStream . CurrentEntry ( ) ; int versionMadeBy = ZipShort . getValue ( LFH_BUF , off ) ; off += ZipConstants . SHORT ; current . entry . setPlatform ( ( ( versionMadeBy > > ( ZipFile . BYTE_SHIFT ) ) & ( ZipFile . NIBLET_MASK ) ) ) ; final GeneralPurposeBit gpFlag = GeneralPurposeBit . parse ( LFH_BUF , off ) ; final boolean hasUTF8Flag = gpFlag . usesUTF8ForNames ( ) ; final ZipEncoding entryEncoding = ( hasUTF8Flag ) ? ZipEncodingHelper . UTF8_ZIP_ENCODING : zipEncoding ; current . hasDataDescriptor = gpFlag . usesDataDescriptor ( ) ; current . entry . setGeneralPurposeBit ( gpFlag ) ; off += ZipConstants . SHORT ; current . entry . setMethod ( ZipShort . getValue ( LFH_BUF , off ) ) ; off += ZipConstants . SHORT ; long time = ZipUtil . dosToJavaTime ( ZipLong . getValue ( LFH_BUF , off ) ) ; current . entry . setTime ( time ) ; off += ZipConstants . WORD ; ZipLong size = null ; ZipLong cSize = null ; if ( ! ( current . hasDataDescriptor ) ) { current . entry . setCrc ( ZipLong . getValue ( LFH_BUF , off ) ) ; off += ZipConstants . WORD ; cSize = new ZipLong ( LFH_BUF , off ) ; off += ZipConstants . WORD ; size = new ZipLong ( LFH_BUF , off ) ; off += ZipConstants . WORD ; } else { off += 3 * ( ZipConstants . WORD ) ; } int fileNameLen = ZipShort . getValue ( LFH_BUF , off ) ; off += ZipConstants . SHORT ; int extraLen = ZipShort . getValue ( LFH_BUF , off ) ; off += ZipConstants . SHORT ; byte [ ] fileName = new byte [ fileNameLen ] ; readFully ( fileName ) ; current . entry . setName ( entryEncoding . decode ( fileName ) , fileName ) ; byte [ ] extraData = new byte [ extraLen ] ; readFully ( extraData ) ; current . entry . setExtra ( extraData ) ; if ( ( ! hasUTF8Flag ) && ( useUnicodeExtraFields ) ) { ZipUtil . setNameAndCommentFromExtraFields ( current . entry , fileName , null ) ; } processZip64Extra ( size , cSize ) ; <START_BUG> if ( ( current . entry . getCompressedSize ( ) ) != ( - 1 ) ) { <END_BUG> if ( ( current . entry . getMethod ( ) ) == ( UNSHRINKING . getCode ( ) ) ) { current . in = new UnshrinkingInputStream ( new ZipArchiveInputStream . BoundedInputStream ( in , current . entry . getCompressedSize ( ) ) ) ; } else if ( ( current . entry . getMethod ( ) ) == ( IMPLODING . getCode ( ) ) ) { current . in = new ExplodingInputStream ( current . entry . getGeneralPurposeBit ( ) . getSlidingDictionarySize ( ) , current . entry . getGeneralPurposeBit ( ) . getNumberOfShannonFanoTrees ( ) , new ZipArchiveInputStream . BoundedInputStream ( in , current . entry . getCompressedSize ( ) ) ) ; } } ( entriesRead ) ++ ; return current . entry ; } private void readFirstLocalFileHeader ( byte [ ] lfh ) throws IOException { } private void processZip64Extra ( ZipLong size , ZipLong cSize ) { } @ Override public ArchiveEntry getNextEntry ( ) throws IOException { } @ Override public boolean canReadEntryData ( ArchiveEntry ae ) { } @ Override public int read ( byte [ ] buffer , int offset , int length ) throws IOException { } private int readStored ( byte [ ] buffer , int offset , int length ) throws IOException { } private int readDeflated ( byte [ ] buffer , int offset , int length ) throws IOException { } private int readFromInflater ( byte [ ] buffer , int offset , int length ) throws IOException { } @ Override public void close ( ) throws IOException { } @ Override 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 drainCurrentEntryData ( ) throws IOException { } private long getBytesInflated ( ) { } private int 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 { } private static final byte [ ] LFH = LFH_SIG . getBytes ( ) ; private static final byte [ ] CFH = CFH_SIG . getBytes ( ) ;

Fix:
if ( ( current . entry . getCompressedSize ( ) ) != ( ZipArchiveEntry . SIZE_UNKNOWN ) ) {