Program: 112051
Project: 112051
Buggy source:
public ParquetMetadata fromParquetMetadata(FileMetaData parquetMetadata) throws IOException {
  MessageType messageType=fromParquetSchema(parquetMetadata.getSchema());
  List<BlockMetaData> blocks=new ArrayList<BlockMetaData>();
  List<RowGroup> row_groups=parquetMetadata.getRow_groups();
  for (  RowGroup rowGroup : row_groups) {
    BlockMetaData blockMetaData=new BlockMetaData();
    blockMetaData.setRowCount(rowGroup.getNum_rows());
    blockMetaData.setTotalByteSize(rowGroup.getTotal_byte_size());
    List<ColumnChunk> columns=rowGroup.getColumns();
    String filePath=columns.get(0).getFile_path();
    for (    ColumnChunk columnChunk : columns) {
      if ((filePath == null && columnChunk.getFile_path() != null) || (filePath != null && !filePath.equals(columnChunk.getFile_path()))) {
        throw new ParquetDecodingException("String_Node_Str");
      }
      parquet.format.ColumnMetaData metaData=columnChunk.meta_data;
      ColumnPath path=getPath(metaData);
      ColumnChunkMetaData column=ColumnChunkMetaData.get(path,messageType.getType(path.toArray()).asPrimitiveType().getPrimitiveTypeName(),CompressionCodecName.fromParquet(metaData.codec),fromFormatEncodings(metaData.encodings),metaData.data_page_offset,metaData.dictionary_page_offset,metaData.num_values,metaData.total_uncompressed_size,metaData.total_compressed_size);
      blockMetaData.addColumn(column);
    }
    blockMetaData.setPath(filePath);
    blocks.add(blockMetaData);
  }
  Map<String,String> keyValueMetaData=new HashMap<String,String>();
  List<KeyValue> key_value_metadata=parquetMetadata.getKey_value_metadata();
  if (key_value_metadata != null) {
    for (    KeyValue keyValue : key_value_metadata) {
      keyValueMetaData.put(keyValue.key,keyValue.value);
    }
  }
  return new ParquetMetadata(new parquet.hadoop.metadata.FileMetaData(messageType,keyValueMetaData,parquetMetadata.getCreated_by()),blocks);
}

Fixed version (ground truth):
public ParquetMetadata fromParquetMetadata(FileMetaData parquetMetadata) throws IOException {
  MessageType messageType=fromParquetSchema(parquetMetadata.getSchema());
  List<BlockMetaData> blocks=new ArrayList<BlockMetaData>();
  List<RowGroup> row_groups=parquetMetadata.getRow_groups();
  for (  RowGroup rowGroup : row_groups) {
    BlockMetaData blockMetaData=new BlockMetaData();
    blockMetaData.setRowCount(rowGroup.getNum_rows());
    blockMetaData.setTotalByteSize(rowGroup.getTotal_byte_size());
    List<ColumnChunk> columns=rowGroup.getColumns();
    String filePath=columns.get(0).getFile_path();
    for (    ColumnChunk columnChunk : columns) {
      if ((filePath == null && columnChunk.getFile_path() != null) || (filePath != null && !filePath.equals(columnChunk.getFile_path()))) {
        throw new ParquetDecodingException("String_Node_Str");
      }
      parquet.format.ColumnMetaData metaData=columnChunk.meta_data;
      ColumnPath path=getPath(metaData);
      ColumnChunkMetaData column=ColumnChunkMetaData.get(path,messageType.getType(path.toArray()).asPrimitiveType().getPrimitiveTypeName(),CompressionCodecName.fromParquet(metaData.codec),fromFormatEncodings(metaData.encodings),metaData.data_page_offset,metaData.dictionary_page_offset,metaData.num_values,metaData.total_compressed_size,metaData.total_uncompressed_size);
      blockMetaData.addColumn(column);
    }
    blockMetaData.setPath(filePath);
    blocks.add(blockMetaData);
  }
  Map<String,String> keyValueMetaData=new HashMap<String,String>();
  List<KeyValue> key_value_metadata=parquetMetadata.getKey_value_metadata();
  if (key_value_metadata != null) {
    for (    KeyValue keyValue : key_value_metadata) {
      keyValueMetaData.put(keyValue.key,keyValue.value);
    }
  }
  return new ParquetMetadata(new parquet.hadoop.metadata.FileMetaData(messageType,keyValueMetaData,parquetMetadata.getCreated_by()),blocks);
}