Program: 31532
Project: 31532
Buggy source:
public LastVarRecordMap(RecordMetadata masterMetadata,RecordMetadata slaveMetadata,ObjList<CharSequence> keyColumns,int pageSize){
  this.pageSize=Numbers.ceilPow2(pageSize);
  this.maxRecordSize=pageSize - 4;
  final int ksz=keyColumns.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(keyColumns.getQuick(i));
    masterKeyTypes.add(masterMetadata.getColumn(idx).getType());
    masterKeyIndexes.add(idx);
    idx=slaveMetadata.getColumnIndex(keyColumns.getQuick(i));
    slaveKeyIndexes.add(idx);
    slaveKeyTypes.add(slaveMetadata.getColumn(idx).getType());
    keyCols.add(slaveMetadata.getColumn(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.getColumn(i).getName());
    fixedOffsets.add(varOffset);
    slaveValueIndexes.add(i);
    ColumnType type=slaveMetadata.getColumn(i).getType();
    slaveValueTypes.add(type);
switch (type) {
case INT:
case FLOAT:
      varOffset+=4;
    break;
case LONG:
case DOUBLE:
case DATE:
  varOffset+=8;
break;
case BOOLEAN:
case BYTE:
varOffset++;
break;
case SHORT:
varOffset+=2;
break;
default :
varColumns.add(i);
varOffset+=4;
break;
}
}
if (varOffset > maxRecordSize) {
throw new JournalRuntimeException("String_Node_Str");
}
this.varOffset=varOffset;
this.map=new MultiMap(valueMetadata,keyCols,null);
this.metadata=new SelectedColumnsMetadata(slaveMetadata,slaveColumnNames,EMPTY_MAP);
this.record=new MapRecord(this.metadata);
}

Fixed version (ground truth):
public LastVarRecordMap(RecordMetadata masterMetadata,RecordMetadata slaveMetadata,ObjList<CharSequence> keyColumns,int pageSize){
  this.pageSize=Numbers.ceilPow2(pageSize);
  this.maxRecordSize=pageSize - 4;
  this.bits=Numbers.msb(this.pageSize);
  this.mask=this.pageSize - 1;
  final int ksz=keyColumns.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(keyColumns.getQuick(i));
    masterKeyTypes.add(masterMetadata.getColumn(idx).getType());
    masterKeyIndexes.add(idx);
    idx=slaveMetadata.getColumnIndex(keyColumns.getQuick(i));
    slaveKeyIndexes.add(idx);
    slaveKeyTypes.add(slaveMetadata.getColumn(idx).getType());
    keyCols.add(slaveMetadata.getColumn(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.getColumn(i).getName());
    fixedOffsets.add(varOffset);
    slaveValueIndexes.add(i);
    ColumnType type=slaveMetadata.getColumn(i).getType();
    slaveValueTypes.add(type);
switch (type) {
case INT:
case FLOAT:
      varOffset+=4;
    break;
case LONG:
case DOUBLE:
case DATE:
  varOffset+=8;
break;
case BOOLEAN:
case BYTE:
varOffset++;
break;
case SHORT:
varOffset+=2;
break;
default :
varColumns.add(i);
varOffset+=4;
break;
}
}
if (varOffset > maxRecordSize) {
throw new JournalRuntimeException("String_Node_Str");
}
this.varOffset=varOffset;
this.map=new MultiMap(valueMetadata,keyCols,null);
this.metadata=new SelectedColumnsMetadata(slaveMetadata,slaveColumnNames,EMPTY_MAP);
this.record=new MapRecord(this.metadata);
}