Buggy code:
public class Gossiper implements IFailureDetectionEventListener { static final ApplicationState [ ] STATES = ApplicationState . values ( ) ; private ScheduledFuture < ? > scheduledGossipTask ; public static final int intervalInMillis = 1000 ; public static final int QUARANTINE_DELAY = ( StorageService . RING_DELAY ) * 2 ; private static Logger logger = LoggerFactory . getLogger ( Gossiper . class ) ; public static final Gossiper instance = new Gossiper ( ) ; private long aVeryLongTime ; private long FatClientTimeout ; private Random random = new Random ( ) ; private Comparator < InetAddress > inetcomparator = new Comparator < InetAddress > ( ) { public int compare ( InetAddress addr1 , InetAddress addr2 ) { } } ; private List < IEndpointStateChangeSubscriber > subscribers = new CopyOnWriteArrayList < IEndpointStateChangeSubscriber > ( ) ; private Set < InetAddress > liveEndpoints = new ConcurrentSkipListSet < InetAddress > ( inetcomparator ) ; private Map < InetAddress , Long > unreachableEndpoints = new ConcurrentHashMap < InetAddress , Long > ( ) ; private Set < InetAddress > seeds = new ConcurrentSkipListSet < InetAddress > ( inetcomparator ) ; Map < InetAddress , EndpointState > endpointStateMap = new ConcurrentHashMap < InetAddress , EndpointState > ( ) ; private Map < InetAddress , Long > justRemovedEndpoints = new ConcurrentHashMap < InetAddress , Long > ( ) ; private final ConcurrentMap < InetAddress , Integer > versions = new org . cliffc . high_scale_lib . NonBlockingHashMap < InetAddress , Integer > ( ) ; private class GossipTask implements Runnable { public void run ( ) { try { MessagingService . instance ( ) . waitUntilListening ( ) ; endpointStateMap . get ( FBUtilities . getLocalAddress ( ) ) . getHeartBeatState ( ) . updateHeartBeat ( ) ; if ( Gossiper . logger . isTraceEnabled ( ) ) Gossiper . logger . trace ( ( "My<seq2seq4repair_space>heartbeat<seq2seq4repair_space>is<seq2seq4repair_space>now<seq2seq4repair_space>" + ( endpointStateMap . get ( FBUtilities . getLocalAddress ( ) ) . getHeartBeatState ( ) . getHeartBeatVersion ( ) ) ) ) ; final List < GossipDigest > gDigests = new ArrayList < GossipDigest > ( ) ; Gossiper . instance . makeRandomGossipDigest ( gDigests ) ; if ( ( gDigests . size ( ) ) > 0 ) { MessageProducer prod = new MessageProducer ( ) { <START_BUG> public Message getMessage ( int version ) throws IOException { <END_BUG> return makeGossipDigestSynMessage ( gDigests , version ) ; } } ; boolean gossipedToSeed = doGossipToLiveMember ( prod ) ; doGossipToUnreachableMember ( prod ) ; if ( ( ! gossipedToSeed ) || ( ( liveEndpoints . size ( ) ) < ( seeds . size ( ) ) ) ) doGossipToSeed ( prod ) ; if ( Gossiper . logger . isTraceEnabled ( ) ) Gossiper . logger . trace ( "Performing<seq2seq4repair_space>status<seq2seq4repair_space>check<seq2seq4repair_space>..." ) ; doStatusCheck ( ) ; } } catch ( Exception e ) { Gossiper . logger . error ( "Gossip<seq2seq4repair_space>error" , e ) ; } } } private Gossiper ( ) { } public void register ( IEndpointStateChangeSubscriber subscriber ) { } public void unregister ( IEndpointStateChangeSubscriber subscriber ) { } public void setVersion ( InetAddress address , int version ) { } public Integer getVersion ( InetAddress address ) { } public Set < InetAddress > getLiveMembers ( ) { } public Set < InetAddress > getUnreachableMembers ( ) { } public long getEndpointDowntime ( InetAddress ep ) { } public void convict ( InetAddress endpoint ) { } int getMaxEndpointStateVersion ( EndpointState epState ) { } private void evictFromMembership ( InetAddress endpoint ) { } public void removeEndpoint ( InetAddress endpoint ) { } private void makeRandomGossipDigest ( List < GossipDigest > gDigests ) { } public boolean isKnownEndpoint ( InetAddress endpoint ) { } public int getCurrentGenerationNumber ( InetAddress endpoint ) { } Message makeGossipDigestSynMessage ( List < GossipDigest > gDigests , int version ) throws IOException { } Message makeGossipDigestAckMessage ( GossipDigestAckMessage gDigestAckMessage , int version ) throws IOException { } Message makeGossipDigestAck2Message ( GossipDigestAck2Message gDigestAck2Message , int version ) throws IOException { } private boolean sendGossip ( MessageProducer prod , Set < InetAddress > epSet ) { } private boolean doGossipToLiveMember ( MessageProducer prod ) { } private void doGossipToUnreachableMember ( MessageProducer prod ) { } private void doGossipToSeed ( MessageProducer prod ) { } private void doStatusCheck ( ) { } public EndpointState getEndpointStateForEndpoint ( InetAddress ep ) { } EndpointState getStateForVersionBiggerThan ( InetAddress forEndpoint , int version ) { } public int compareEndpointStartup ( InetAddress addr1 , InetAddress addr2 ) { } void notifyFailureDetector ( List < GossipDigest > gDigests ) { } void notifyFailureDetector ( Map < InetAddress , EndpointState > remoteEpStateMap ) { } void notifyFailureDetector ( InetAddress endpoint , EndpointState remoteEndpointState ) { } private void markAlive ( InetAddress addr , EndpointState localState ) { } private void markDead ( InetAddress addr , EndpointState localState ) { } private void handleMajorStateChange ( InetAddress ep , EndpointState epState ) { } void applyStateLocally ( Map < InetAddress , EndpointState > epStateMap ) { } private void applyNewStates ( InetAddress addr , EndpointState localState , EndpointState remoteState ) { } private void doNotifications ( InetAddress addr , ApplicationState state , VersionedValue value ) { } private void requestAll ( GossipDigest gDigest , List < GossipDigest > deltaGossipDigestList , int remoteGeneration ) { } private void sendAll ( GossipDigest gDigest , Map < InetAddress , EndpointState > deltaEpStateMap , int maxRemoteVersion ) { } void examineGossiper ( List < GossipDigest > gDigestList , List < GossipDigest > deltaGossipDigestList , Map < InetAddress , EndpointState > deltaEpStateMap ) { } public void start ( int generationNbr ) { } public void addSavedEndpoint ( InetAddress ep ) { } public void addLocalApplicationState ( ApplicationState state , VersionedValue value ) { } public void stop ( ) { } public boolean isEnabled ( ) { } public void initializeNodeUnsafe ( InetAddress addr , int generationNbr ) { } }

Fix:
public Message getMessage ( Integer version ) throws IOException {