Buggy code:
private final transient ConcurrentHashMap < Long , DedupChunkInterface > flushingBuffers = new ConcurrentHashMap < Long , DedupChunkInterface > ( 1024 , 0.75F , ( ( Main . writeThreads ) * 3 ) ) ; private static transient BlockingQueue < Runnable > worksQueue = new LinkedBlockingQueue < Runnable > ( HashFunctionPool . max_hash_cluster ) ; private static transient RejectedExecutionHandler executionHandler = new BlockPolicy ( ) ; private boolean deleted = false ; protected static transient ThreadPoolExecutor executor = new ThreadPoolExecutor ( Main . writeThreads , Main . writeThreads , 10 , TimeUnit . SECONDS , SparseDedupFile . worksQueue , SparseDedupFile . executionHandler ) ; private boolean dirty = false ; protected boolean toOccured = false ; protected boolean errOccured = false ; public boolean isCopyExt ; private boolean reconstructed = false ; public static void registerListener ( Object obj ) { } private LoadingCache < Long , DedupChunkInterface > writeBuffers = CacheBuilder . newBuilder ( ) . maximumSize ( ( ( SparseDedupFile . maxWriteBuffers ) + 1 ) ) . concurrencyLevel ( writeThreads ) . expireAfterAccess ( 10 , TimeUnit . SECONDS ) . removalListener ( new RemovalListener < Long , DedupChunkInterface > ( ) { public void onRemoval ( RemovalNotification < Long , DedupChunkInterface > removal ) { } } ) . build ( new CacheLoader < Long , DedupChunkInterface > ( ) { public DedupChunkInterface load ( Long key ) throws IOException , FileClosedException { } } ) ; private boolean closed = true ; public static synchronized void flushThreadPool ( ) { } public SparseDedupFile ( MetaDataDedupFile mf ) throws IOException { } private DedupChunkInterface load ( Long key ) throws IOException , FileClosedException { } @ Override public DedupFile snapshot ( MetaDataDedupFile snapmf ) throws IOException , HashtableFullException { } @ Override public DedupFile snapshot ( MetaDataDedupFile snapmf , boolean propigate ) throws IOException , HashtableFullException { } @ Override public void copyTo ( String path ) throws IOException { } @ Override public void copyTo ( String path , boolean propigate ) throws IOException { } private boolean overLaps ( long pos , long sz , boolean sharedRequested ) { } @ Override public boolean delete ( ) { } @ Override public boolean delete ( boolean propigate ) { } @ Override public boolean isClosed ( ) { } public int writeCache ( ) throws IOException , HashtableFullException { } public void setMetaDataDedupFile ( MetaDataDedupFile mf ) { } @ Override public void writeCache ( WritableCacheBuffer writeBuffer ) throws IOException , DataArchivedException , HashtableFullException , FileClosedException { } @ Override public void updateMap ( DedupChunkInterface writeBuffer , int doop ) throws IOException , FileClosedException { } @ Override public void updateMap ( DedupChunkInterface writeBuffer , int doop , boolean propigate ) throws IOException , FileClosedException { } public SparseDataChunk getSparseDataChunk ( long pos ) throws IOException , FileClosedException { } public int putSparseDataChunk ( long pos , SparseDataChunk buf ) throws IOException , FileClosedException { } @ Override public DedupChunkInterface getWriteBuffer ( long position ) throws IOException , FileClosedException { } private DedupChunkInterface marshalWriteBuffer ( long chunkPos ) throws IOException , FileClosedException { } @ Override public long getNumberofChunks ( ) throws IOException , FileClosedException { } public void sync ( boolean force ) throws IOException , FileClosedException { } @ Override public void sync ( boolean force , boolean propigate ) throws IOException , FileClosedException { } @ Override public DedupFileChannel getChannel ( int flags ) throws IOException { } @ Override public void unRegisterChannel ( DedupFileChannel channel , int flags ) { } @ Override public void registerChannel ( DedupFileChannel channel ) throws IOException { } @ Override public boolean hasOpenChannels ( ) { } public int openChannelsSize ( ) { } @ Override public void forceClose ( ) throws IOException { } @ Override public String getGUID ( ) { } @ Override public MetaDataDedupFile getMetaFile ( ) { } @ Override public void removeLock ( DedupFileLock lock ) { } @ Override public void removeLock ( DedupFileLock lock , boolean propigate ) { } @ Override public DedupFileLock addLock ( DedupFileChannel ch , long position , long len , boolean shared ) throws IOException { } @ Override public DedupFileLock addLock ( DedupFileChannel ch , long position , long len , boolean shared , boolean propigate ) throws IOException { } public String getDatabasePath ( ) { } @ Override public String getDatabaseDirPath ( ) { } private void initDB ( ) throws IOException { } @ Override public void optimize ( ) throws HashtableFullException { } @ Override public long lastModified ( ) throws IOException { } @ Override public DedupChunk getHash ( long location , boolean create ) throws IOException , FileClosedException { } @ Override public void removeHash ( long location ) throws IOException { } @ Override public void removeHash ( long location , boolean propigate ) throws IOException { } @ Override public void truncate ( long size ) throws IOException { } @ Override public void truncate ( long size , boolean propigate ) throws IOException { } private DedupChunk createNewChunk ( long location ) { } @ Override public long getChuckPosition ( long location ) { } @ Override public boolean isAbsolute ( ) { } public boolean isDirty ( ) { } @ Override public void putBufferIntoFlush ( DedupChunkInterface writeBuffer ) { } @ Override public void removeBufferFromFlush ( DedupChunkInterface writeBuffer ) { DedupChunkInterface _wb = this . flushingBuffers . remove ( writeBuffer . getFilePosition ( ) ) ; if ( SDFSLogger . isDebug ( ) ) { <START_BUG> if ( ( _wb . hashCode ( ) ) != ( writeBuffer . hashCode ( ) ) ) { <END_BUG> SDFSLogger . getLog ( ) . info ( "on<seq2seq4repair_space>remove<seq2seq4repair_space>hashcodes<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>equal" ) ; } } } @ Override public void trim ( long start , int len ) throws IOException { } ReentrantReadWriteLock globalLock = new ReentrantReadWriteLock ( ) ; public Lock getReadLock ( ) { } public Lock getWriteLock ( ) { } }

Fix:
if ( ( _wb != null ) && ( ( _wb . hashCode ( ) ) != ( writeBuffer . hashCode ( ) ) ) ) {