Program: 30800
Project: 30800
Buggy source:
public static void validate(FilesFacade ff,ReadOnlyMemory metaMem,CharSequenceIntHashMap nameIndex){
  try {
    final int columnCount=metaMem.getInt(META_OFFSET_COUNT);
    long offset=getColumnNameOffset(columnCount);
    if (offset < columnCount || (columnCount > 0 && (offset < 0 || offset >= ff.length(metaMem.getFd())))) {
      throw validationException(metaMem).put("String_Node_Str").put(columnCount);
    }
    final int timestampIndex=metaMem.getInt(META_OFFSET_TIMESTAMP_INDEX);
    if (timestampIndex < -1 || timestampIndex >= columnCount) {
      throw validationException(metaMem).put("String_Node_Str");
    }
    if (timestampIndex != -1) {
      int timestampType=getColumnType(metaMem,timestampIndex);
      if (timestampType != ColumnType.TIMESTAMP) {
        throw validationException(metaMem).put("String_Node_Str").put(ColumnType.nameOf(timestampType));
      }
    }
    for (int i=0; i < columnCount; i++) {
      int type=getColumnType(metaMem,i);
      if (ColumnType.sizeOf(type) == -1) {
        throw validationException(metaMem).put("String_Node_Str").put(type).put("String_Node_Str").put(i).put(']');
      }
    }
    for (int i=0; i < columnCount; i++) {
      CharSequence name=metaMem.getStr(offset);
      if (name == null || name.length() < 1) {
        throw validationException(metaMem).put("String_Node_Str").put(i).put(']');
      }
      String s=name.toString();
      if (!nameIndex.put(s,i)) {
        throw validationException(metaMem).put("String_Node_Str").put(s).put("String_Node_Str").put(i).put(']');
      }
      offset+=ReadOnlyMemory.getStorageLength(name);
    }
  }
 catch (  CairoException e) {
    nameIndex.clear();
    throw e;
  }
}

Fixed version (ground truth):
public static void validate(FilesFacade ff,ReadOnlyMemory metaMem,CharSequenceIntHashMap nameIndex){
  try {
    final int columnCount=metaMem.getInt(META_OFFSET_COUNT);
    long offset=getColumnNameOffset(columnCount);
    if (offset < columnCount || (columnCount > 0 && (offset < 0 || offset >= ff.length(metaMem.getFd())))) {
      throw validationException(metaMem).put("String_Node_Str").put(columnCount);
    }
    final int timestampIndex=metaMem.getInt(META_OFFSET_TIMESTAMP_INDEX);
    if (timestampIndex < -1 || timestampIndex >= columnCount) {
      throw validationException(metaMem).put("String_Node_Str");
    }
    if (timestampIndex != -1) {
      int timestampType=getColumnType(metaMem,timestampIndex);
      if (timestampType != ColumnType.TIMESTAMP) {
        throw validationException(metaMem).put("String_Node_Str").put(ColumnType.nameOf(timestampType));
      }
    }
    for (int i=0; i < columnCount; i++) {
      int type=getColumnType(metaMem,i);
      if (ColumnType.sizeOf(type) == -1) {
        throw validationException(metaMem).put("String_Node_Str").put(type).put("String_Node_Str").put(i).put(']');
      }
      if (isColumnIndexed(metaMem,i)) {
        if (type != ColumnType.SYMBOL) {
          throw validationException(metaMem).put("String_Node_Str").put("String_Node_Str").put(i).put(']');
        }
        if (getIndexBlockCapacity(metaMem,i) < 2) {
          throw validationException(metaMem).put("String_Node_Str").put(getIndexBlockCapacity(metaMem,i)).put("String_Node_Str").put(i).put(']');
        }
      }
    }
    for (int i=0; i < columnCount; i++) {
      CharSequence name=metaMem.getStr(offset);
      if (name == null || name.length() < 1) {
        throw validationException(metaMem).put("String_Node_Str").put(i).put(']');
      }
      String s=name.toString();
      if (!nameIndex.put(s,i)) {
        throw validationException(metaMem).put("String_Node_Str").put(s).put("String_Node_Str").put(i).put(']');
      }
      offset+=ReadOnlyMemory.getStorageLength(name);
    }
  }
 catch (  CairoException e) {
    nameIndex.clear();
    throw e;
  }
}