Buggy code:
public class ZipArchiveEntry extends ZipEntry implements Cloneable , ArchiveEntry { public static final int PLATFORM_UNIX = 3 ; public static final int PLATFORM_FAT = 0 ; private static final int SHORT_MASK = 65535 ; private static final int SHORT_SHIFT = 16 ; private int method = - 1 ; private long size = SIZE_UNKNOWN ; private int internalAttributes = 0 ; private int platform = ZipArchiveEntry . PLATFORM_FAT ; private long externalAttributes = 0 ; private LinkedHashMap < ZipShort , ZipExtraField > extraFields = null ; private UnparseableExtraFieldData unparseableExtra = null ; private String name = null ; private byte [ ] rawName = null ; private GeneralPurposeBit gpb = new GeneralPurposeBit ( ) ; public ZipArchiveEntry ( String name ) { } public ZipArchiveEntry ( ZipEntry entry ) throws ZipException { } public ZipArchiveEntry ( ZipArchiveEntry entry ) throws ZipException { } protected ZipArchiveEntry ( ) { } public ZipArchiveEntry ( File inputFile , String entryName ) { } @ Override public Object clone ( ) { } public int getMethod ( ) { } public void setMethod ( int method ) { } public int getInternalAttributes ( ) { } public void setInternalAttributes ( int value ) { } public long getExternalAttributes ( ) { } public void setExternalAttributes ( long value ) { } public void setUnixMode ( int mode ) { } public int getUnixMode ( ) { } public int getPlatform ( ) { } protected void setPlatform ( int platform ) { } public void setExtraFields ( ZipExtraField [ ] fields ) { } public ZipExtraField [ ] getExtraFields ( ) { } public ZipExtraField [ ] getExtraFields ( boolean includeUnparseable ) { } public void addExtraField ( ZipExtraField ze ) { } public void addAsFirstExtraField ( ZipExtraField ze ) { if ( ze instanceof UnparseableExtraFieldData ) { unparseableExtra = ( ( UnparseableExtraFieldData ) ( ze ) ) ; } else { <START_BUG> LinkedHashMap copy = extraFields ; <END_BUG> extraFields = new LinkedHashMap < ZipShort , ZipExtraField > ( ) ; extraFields . put ( ze . getHeaderId ( ) , ze ) ; if ( copy != null ) { copy . remove ( ze . getHeaderId ( ) ) ; extraFields . putAll ( copy ) ; } } setExtra ( ) ; } public void removeExtraField ( ZipShort type ) { } public void removeUnparseableExtraFieldData ( ) { } public ZipExtraField getExtraField ( ZipShort type ) { } public UnparseableExtraFieldData getUnparseableExtraFieldData ( ) { } @ Override public void setExtra ( byte [ ] extra ) throws RuntimeException { } protected void setExtra ( ) { } public void setCentralDirectoryExtra ( byte [ ] b ) { } public byte [ ] getLocalFileDataExtra ( ) { } public byte [ ] getCentralDirectoryExtra ( ) { } @ Override public String getName ( ) { } public boolean isDirectory ( ) { } protected void setName ( String name ) { } @ Override public long getSize ( ) { } @ Override public void setSize ( long size ) { } protected void setName ( String name , byte [ ] rawName ) { } public byte [ ] getRawName ( ) { } @ Override public int hashCode ( ) { } public GeneralPurposeBit getGeneralPurposeBit ( ) { } public void setGeneralPurposeBit ( GeneralPurposeBit b ) { } private void mergeExtraFields ( ZipExtraField [ ] f , boolean local ) throws ZipException { } public Date getLastModifiedDate ( ) { } @ Override public boolean equals ( Object obj ) { } }

Fix:
LinkedHashMap < ZipShort , ZipExtraField > copy = extraFields ;