Program: 31502
Project: 31502
Buggy source:
public LastFixRecordMap(RecordMetadata masterMetadata,RecordMetadata slaveMetadata,CharSequenceHashSet masterKeyColumns,CharSequenceHashSet slaveKeyColumns,int pageSize){
  this.pageSize=Numbers.ceilPow2(pageSize);
  this.bits=Numbers.msb(this.pageSize);
  this.mask=this.pageSize - 1;
  final int ksz=masterKeyColumns.size();
  this.masterKeyTypes=new ObjList<>(ksz);
  this.slaveKeyTypes=new ObjList<>(ksz);
  this.masterKeyIndexes=new IntHashSet(ksz);
  this.slaveKeyIndexes=new IntHashSet(ksz);
  ObjList<RecordColumnMetadata> keyCols=new ObjList<>(ksz);
  for (int i=0; i < ksz; i++) {
    int idx;
    idx=masterMetadata.getColumnIndex(masterKeyColumns.get(i));
    masterKeyTypes.add(masterMetadata.getColumnQuick(idx).getType());
    masterKeyIndexes.add(idx);
    idx=slaveMetadata.getColumnIndex(slaveKeyColumns.get(i));
    slaveKeyIndexes.add(idx);
    slaveKeyTypes.add(slaveMetadata.getColumnQuick(idx).getType());
    keyCols.add(slaveMetadata.getColumnQuick(idx));
  }
  this.fixedOffsets=new IntList(ksz - keyCols.size());
  this.slaveValueIndexes=new IntList(ksz - keyCols.size());
  this.slaveValueTypes=new ObjList<>(ksz - keyCols.size());
  ObjList<CharSequence> slaveColumnNames=new ObjList<>();
  int varOffset=0;
  for (int i=0, n=slaveMetadata.getColumnCount(); i < n; i++) {
    if (slaveKeyIndexes.contains(i)) {
      continue;
    }
    slaveColumnNames.add(slaveMetadata.getColumnQuick(i).getName());
    fixedOffsets.add(varOffset);
    slaveValueIndexes.add(i);
    ColumnType type=slaveMetadata.getColumnQuick(i).getType();
    slaveValueTypes.add(type);
switch (type) {
case INT:
case FLOAT:
case SYMBOL:
      varOffset+=4;
    break;
case LONG:
case DOUBLE:
case DATE:
  varOffset+=8;
break;
case BOOLEAN:
case BYTE:
varOffset++;
break;
case SHORT:
varOffset+=2;
break;
}
}
if (varOffset > pageSize) {
throw new JournalRuntimeException("String_Node_Str");
}
this.recordLen=varOffset;
this.map=new MultiMap(valueMetadata,keyCols,null);
this.metadata=new SelectedColumnsMetadata(slaveMetadata,slaveColumnNames);
this.record=new MapRecord(this.metadata);
}

Fixed version (ground truth):
public LastFixRecordMap(RecordMetadata masterMetadata,RecordMetadata slaveMetadata,CharSequenceHashSet masterKeyColumns,CharSequenceHashSet slaveKeyColumns,int pageSize){
  this.pageSize=Numbers.ceilPow2(pageSize);
  this.bits=Numbers.msb(this.pageSize);
  this.mask=this.pageSize - 1;
  final int ksz=masterKeyColumns.size();
  this.masterKeyTypes=new ObjList<>(ksz);
  this.slaveKeyTypes=new ObjList<>(ksz);
  this.masterKeyIndexes=new IntHashSet(ksz);
  this.slaveKeyIndexes=new IntHashSet(ksz);
  ObjList<RecordColumnMetadata> keyCols=new ObjList<>(ksz);
  for (int i=0; i < ksz; i++) {
    int idx;
    idx=masterMetadata.getColumnIndex(masterKeyColumns.get(i));
    masterKeyTypes.add(masterMetadata.getColumnQuick(idx).getType());
    masterKeyIndexes.add(idx);
    idx=slaveMetadata.getColumnIndex(slaveKeyColumns.get(i));
    slaveKeyIndexes.add(idx);
    slaveKeyTypes.add(slaveMetadata.getColumnQuick(idx).getType());
    keyCols.add(slaveMetadata.getColumnQuick(idx));
  }
  this.fixedOffsets=new IntList(ksz - keyCols.size());
  this.slaveValueIndexes=new IntList(ksz - keyCols.size());
  this.slaveValueTypes=new ObjList<>(ksz - keyCols.size());
  ObjList<CharSequence> slaveColumnNames=new ObjList<>();
  int varOffset=0;
  for (int i=0, n=slaveMetadata.getColumnCount(); i < n; i++) {
    if (slaveKeyIndexes.contains(i)) {
      continue;
    }
    slaveColumnNames.add(slaveMetadata.getColumnQuick(i).getName());
    fixedOffsets.add(varOffset);
    slaveValueIndexes.add(i);
    ColumnType type=slaveMetadata.getColumnQuick(i).getType();
    slaveValueTypes.add(type);
switch (type) {
case INT:
case FLOAT:
case SYMBOL:
      varOffset+=4;
    break;
case LONG:
case DOUBLE:
case DATE:
  varOffset+=8;
break;
case BOOLEAN:
case BYTE:
varOffset++;
break;
case SHORT:
varOffset+=2;
break;
}
}
if (varOffset > pageSize) {
throw new JournalRuntimeException("String_Node_Str");
}
this.recordLen=varOffset;
this.map=new MultiMap(valueMetadata,keyCols,null);
this.metadata=new SelectedColumnsMetadata(slaveMetadata,slaveColumnNames);
this.record=new MapRecord(this.metadata);
this.storageFacade=new SelectedColumnsStorageFacade(slaveMetadata,this.metadata,slaveColumnNames);
}