Program: 111946
Project: 111946
Buggy source:
public static ParquetMetadata fromParquetMetadata(FileMetaData parquetMetadata) throws IOException {
  MessageType messageType=fromParquetSchema(parquetMetadata.getSchema());
  List<BlockMetaData> blocks=new ArrayList<BlockMetaData>();
  List<RowGroup> row_groups=parquetMetadata.getRow_groups();
  if (row_groups != null) {
    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");
        }
        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),fromParquetStatistics(parquetMetadata.getCreated_by(),metaData.statistics,messageType.getType(path.toArray()).asPrimitiveType().getPrimitiveTypeName()),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 org.apache.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();
  if (row_groups != null) {
    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");
        }
        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),fromParquetStatistics(parquetMetadata.getCreated_by(),metaData.statistics,messageType.getType(path.toArray()).asPrimitiveType().getPrimitiveTypeName()),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 org.apache.parquet.hadoop.metadata.FileMetaData(messageType,keyValueMetaData,parquetMetadata.getCreated_by()),blocks);
}