Program: 30834
Project: 30834
Buggy source:
public TableReader(CairoConfiguration configuration,CharSequence name){
  LOG.info().$("String_Node_Str").utf8(name).$('\'').$();
  this.ff=configuration.getFilesFacade();
  this.name=ImmutableCharSequence.of(name);
  this.path=new Path().of(configuration.getRoot()).concat(name);
  this.rootLen=path.length();
  try {
    failOnPendingTodo();
    this.txMem=openTxnFile();
    this.metadata=openMetaFile();
    this.columnCount=this.metadata.getColumnCount();
    this.columnCountBits=getColumnBits(columnCount);
    readTxn();
    this.prevStructVersion=structVersion;
switch (this.metadata.getPartitionBy()) {
case PartitionBy.DAY:
      partitionPathGenerator=DAY_GEN;
    reloadMethod=PARTITIONED_RELOAD_METHOD;
  timestampFloorMethod=Dates::floorDD;
intervalLengthMethod=Dates::getDaysBetween;
partitionMin=findPartitionMinimum(TableUtils.fmtDay);
partitionCount=calculatePartitionCount();
break;
case PartitionBy.MONTH:
partitionPathGenerator=MONTH_GEN;
reloadMethod=PARTITIONED_RELOAD_METHOD;
timestampFloorMethod=Dates::floorMM;
intervalLengthMethod=Dates::getMonthsBetween;
partitionMin=findPartitionMinimum(TableUtils.fmtMonth);
partitionCount=calculatePartitionCount();
break;
case PartitionBy.YEAR:
partitionPathGenerator=YEAR_GEN;
reloadMethod=PARTITIONED_RELOAD_METHOD;
timestampFloorMethod=Dates::floorYYYY;
intervalLengthMethod=Dates::getYearsBetween;
partitionMin=findPartitionMinimum(TableUtils.fmtYear);
partitionCount=calculatePartitionCount();
break;
default :
partitionPathGenerator=DEFAULT_GEN;
reloadMethod=NON_PARTITIONED_RELOAD_METHOD;
timestampFloorMethod=null;
intervalLengthMethod=null;
partitionCount=1;
break;
}
int capacity=getColumnBase(partitionCount);
this.columns=new ObjList<>(capacity);
columns.setPos(capacity);
this.partitionRowCounts=new LongList(partitionCount);
this.partitionRowCounts.seed(partitionCount,-1);
this.columnTops=new LongList(capacity / 2);
this.columnTops.setPos(capacity / 2);
}
 catch (CairoException e) {
close();
throw e;
}
}

Fixed version (ground truth):
public TableReader(CairoConfiguration configuration,CharSequence name){
  LOG.info().$("String_Node_Str").utf8(name).$('\'').$();
  this.ff=configuration.getFilesFacade();
  this.name=ImmutableCharSequence.of(name);
  this.path=new Path().of(configuration.getRoot()).concat(name);
  this.rootLen=path.length();
  try {
    failOnPendingTodo();
    this.txMem=openTxnFile();
    this.metadata=openMetaFile();
    this.columnCount=this.metadata.getColumnCount();
    this.columnCountBits=getColumnBits(columnCount);
    readTxn();
    this.prevStructVersion=structVersion;
switch (this.metadata.getPartitionBy()) {
case PartitionBy.DAY:
      partitionPathGenerator=DAY_GEN;
    reloadMethod=PARTITIONED_RELOAD_METHOD;
  timestampFloorMethod=Dates::floorDD;
intervalLengthMethod=Dates::getDaysBetween;
dateFormat=TableUtils.fmtDay;
break;
case PartitionBy.MONTH:
partitionPathGenerator=MONTH_GEN;
reloadMethod=PARTITIONED_RELOAD_METHOD;
timestampFloorMethod=Dates::floorMM;
intervalLengthMethod=Dates::getMonthsBetween;
dateFormat=TableUtils.fmtMonth;
break;
case PartitionBy.YEAR:
partitionPathGenerator=YEAR_GEN;
reloadMethod=PARTITIONED_RELOAD_METHOD;
timestampFloorMethod=Dates::floorYYYY;
intervalLengthMethod=Dates::getYearsBetween;
dateFormat=TableUtils.fmtYear;
break;
default :
partitionPathGenerator=DEFAULT_GEN;
reloadMethod=NON_PARTITIONED_RELOAD_METHOD;
timestampFloorMethod=null;
intervalLengthMethod=null;
dateFormat=null;
partitionCount=1;
break;
}
if (partitionCount == 0) {
partitionMin=findPartitionMinimum(dateFormat);
partitionCount=calculatePartitionCount();
}
int capacity=getColumnBase(partitionCount);
this.columns=new ObjList<>(capacity);
columns.setPos(capacity);
this.partitionRowCounts=new LongList(partitionCount);
this.partitionRowCounts.seed(partitionCount,-1);
this.columnTops=new LongList(capacity / 2);
this.columnTops.setPos(capacity / 2);
if (partitionCount == 0) {
reloadMethod=FIRST_TIME_PARTITIONED_RELOAD_METHOD;
}
}
 catch (CairoException e) {
close();
throw e;
}
}