Program: 162930
Project: 162930
Buggy source:
void putValue(){
  initEntrySizeInChunks();
  int lesserChunks=-1;
  if (newValueSize != valueSize) {
    long newSizeOfEverythingBeforeValue=valueSizeOffset + m.valueSizeMarshaller.sizeEncodingSize(newValueSize);
    long entryStartAddr=entry.address();
    long newValueAddr=m.alignment.alignAddr(entryStartAddr + newSizeOfEverythingBeforeValue);
    long newEntrySize=newValueAddr + newValueSize - entryStartAddr;
    int newSizeInChunks=inChunks(newEntrySize);
    newValueDoesNotFit:     if (newSizeInChunks > entrySizeInChunks) {
      if (newSizeInChunks > m.maxChunksPerEntry) {
        throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + newSizeInChunks + "String_Node_Str"+ m.maxChunksPerEntry+ "String_Node_Str");
      }
      if (freeList.allClear(pos + entrySizeInChunks,pos + newSizeInChunks)) {
        long setFrom=state == PRESENT ? pos + entrySizeInChunks : pos;
        freeList.set(setFrom,pos + newSizeInChunks);
        break newValueDoesNotFit;
      }
      beforeRelocation();
      if (state == PRESENT)       free(pos,entrySizeInChunks);
      int allocatedChunks=inChunks(innerEntrySize(newSizeOfEverythingBeforeValue,newValueSize));
      pos=alloc(allocatedChunks);
      reuse(pos);
      UNSAFE.copyMemory(entryStartAddr,entry.address(),valueSizeOffset);
      writeValueAndPutPos(allocatedChunks);
      return;
    }
 else     if (newSizeInChunks < entrySizeInChunks) {
      if (state == PRESENT)       freeList.clear(pos + newSizeInChunks,pos + entrySizeInChunks);
      lesserChunks=newSizeInChunks;
    }
    upgradeToWriteLock();
    writeNewValueSize();
  }
 else {
    entry.position(valueOffset);
    upgradeToWriteLock();
  }
  writeNewValueAndSwitch();
  if (state != PRESENT) {
    freeList.set(pos,entrySizeInChunks);
    size(size() + 1L);
    beforePutPos();
    hashLookup.putVolatile(pos);
  }
  if (lesserChunks > 0)   freeExtraAllocatedChunks(lesserChunks);
}

Fixed version (ground truth):
void putValue(){
  initEntrySizeInChunks();
  int lesserChunks=-1;
  if (newValueSize != valueSize) {
    long newSizeOfEverythingBeforeValue=valueSizeOffset + m.valueSizeMarshaller.sizeEncodingSize(newValueSize);
    long entryStartAddr=entry.address();
    long newValueAddr=m.alignment.alignAddr(entryStartAddr + newSizeOfEverythingBeforeValue);
    long newEntrySize=newValueAddr + newValueSize - entryStartAddr;
    int newSizeInChunks=inChunks(newEntrySize);
    newValueDoesNotFit:     if (newSizeInChunks > entrySizeInChunks) {
      if (newSizeInChunks > m.maxChunksPerEntry) {
        throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + newSizeInChunks + "String_Node_Str"+ m.maxChunksPerEntry+ "String_Node_Str");
      }
      if (freeList.allClear(pos + entrySizeInChunks,pos + newSizeInChunks)) {
        long setFrom=freeListBitsSet() ? pos + entrySizeInChunks : pos;
        freeList.set(setFrom,pos + newSizeInChunks);
        break newValueDoesNotFit;
      }
      beforeRelocation();
      if (freeListBitsSet())       free(pos,entrySizeInChunks);
      int allocatedChunks=inChunks(innerEntrySize(newSizeOfEverythingBeforeValue,newValueSize));
      pos=alloc(allocatedChunks);
      reuse(pos);
      UNSAFE.copyMemory(entryStartAddr,entry.address(),valueSizeOffset);
      writeValueAndPutPos(allocatedChunks);
      return;
    }
 else     if (newSizeInChunks < entrySizeInChunks) {
      if (freeListBitsSet())       freeList.clear(pos + newSizeInChunks,pos + entrySizeInChunks);
      lesserChunks=newSizeInChunks;
    }
    upgradeToWriteLock();
    writeNewValueSize();
  }
 else {
    entry.position(valueOffset);
    upgradeToWriteLock();
  }
  writeNewValueAndSwitch();
  if (state != PRESENT) {
    if (!freeListBitsSet())     freeList.set(pos,pos + entrySizeInChunks);
    size(size() + 1L);
    beforePutPos();
    hashLookup.putVolatile(pos);
  }
  if (lesserChunks > 0)   freeExtraAllocatedChunks(lesserChunks);
}