Program: 60208
Project: 60208
Buggy source:
boolean storeLoadedValue(K key,int hash,LoadingValueReference<K,V> oldValueReference,V newValue){
  lock();
  try {
    long now=map.ticker.read();
    preWriteCleanup(now);
    int newCount=this.count + 1;
    AtomicReferenceArray<ReferenceEntry<K,V>> table=this.table;
    int index=hash & (table.length() - 1);
    ReferenceEntry<K,V> first=table.get(index);
    for (ReferenceEntry<K,V> e=first; e != null; e=e.getNext()) {
      K entryKey=e.getKey();
      if (e.getHash() == hash && entryKey != null && map.keyEquivalence.equivalent(key,entryKey)) {
        ValueReference<K,V> valueReference=e.getValueReference();
        V entryValue=valueReference.get();
        if (entryValue == null || oldValueReference == valueReference) {
          ++modCount;
          if (oldValueReference.isActive()) {
            RemovalCause cause=(entryValue == null) ? RemovalCause.COLLECTED : RemovalCause.REPLACED;
            enqueueNotification(key,hash,oldValueReference,cause);
            newCount--;
          }
          setValue(e,key,newValue,now);
          this.count=newCount;
          evictEntries();
          return true;
        }
        valueReference=new WeightedStrongValueReference<K,V>(newValue,0);
        enqueueNotification(key,hash,valueReference,RemovalCause.REPLACED);
        return false;
      }
    }
    ++modCount;
    ReferenceEntry<K,V> newEntry=newEntry(key,hash,first);
    setValue(newEntry,key,newValue,now);
    table.set(index,newEntry);
    this.count=newCount;
    evictEntries();
    return true;
  }
  finally {
    unlock();
    postWriteCleanup();
  }
}

Fixed version (ground truth):
boolean storeLoadedValue(K key,int hash,LoadingValueReference<K,V> oldValueReference,V newValue){
  lock();
  try {
    long now=map.ticker.read();
    preWriteCleanup(now);
    int newCount=this.count + 1;
    AtomicReferenceArray<ReferenceEntry<K,V>> table=this.table;
    int index=hash & (table.length() - 1);
    ReferenceEntry<K,V> first=table.get(index);
    for (ReferenceEntry<K,V> e=first; e != null; e=e.getNext()) {
      K entryKey=e.getKey();
      if (e.getHash() == hash && entryKey != null && map.keyEquivalence.equivalent(key,entryKey)) {
        ValueReference<K,V> valueReference=e.getValueReference();
        V entryValue=valueReference.get();
        if (oldValueReference == valueReference || (entryValue == null && valueReference != UNSET)) {
          ++modCount;
          if (oldValueReference.isActive()) {
            RemovalCause cause=(entryValue == null) ? RemovalCause.COLLECTED : RemovalCause.REPLACED;
            enqueueNotification(key,hash,oldValueReference,cause);
            newCount--;
          }
          setValue(e,key,newValue,now);
          this.count=newCount;
          evictEntries();
          return true;
        }
        valueReference=new WeightedStrongValueReference<K,V>(newValue,0);
        enqueueNotification(key,hash,valueReference,RemovalCause.REPLACED);
        return false;
      }
    }
    ++modCount;
    ReferenceEntry<K,V> newEntry=newEntry(key,hash,first);
    setValue(newEntry,key,newValue,now);
    table.set(index,newEntry);
    this.count=newCount;
    evictEntries();
    return true;
  }
  finally {
    unlock();
    postWriteCleanup();
  }
}