if(!heard_from.contains(sender)) {  // already received gossip from sender; discard it
if(log.isTraceEnabled()) log.trace("already received stable msg from " + sender);
return;
}
Digest copy;
<BUG>synchronized(digest) {
int num_elements_expected=digest.size(), num_elements_updated;
num_elements_updated=updateLocalDigest(d, sender);
if(num_elements_updated != num_elements_expected)</BUG>
return;

if(!heard_from.contains(sender)) {  // already received gossip from sender; discard it
if(log.isTraceEnabled()) log.trace("already received stable msg from " + sender);
return;
}
Digest copy;
synchronized(digest) {
boolean success=updateLocalDigest(d, sender);
if(!success) // we can only remove the sender from heard_from if *all* elements of my digest were updated
return;
