Program: 111983
Project: 111983
Buggy source:
/** 
 * Read all of the pages in a given column chunk.
 * @return the list of pages
 */
public ColumnChunkPageReader readAllPages() throws IOException {
  List<Page> pagesInChunk=new ArrayList<Page>();
  DictionaryPage dictionaryPage=null;
  long valuesCountReadSoFar=0;
  while (valuesCountReadSoFar < descriptor.metadata.getValueCount()) {
    PageHeader pageHeader=readPageHeader(this);
switch (pageHeader.type) {
case DICTIONARY_PAGE:
      if (dictionaryPage != null) {
        throw new ParquetDecodingException("String_Node_Str" + descriptor.col);
      }
    dictionaryPage=new DictionaryPage(this.readAsBytesInput(pageHeader.compressed_page_size),pageHeader.uncompressed_page_size,pageHeader.dictionary_page_header.num_values,parquetMetadataConverter.getEncoding(pageHeader.dictionary_page_header.encoding));
  break;
case DATA_PAGE:
pagesInChunk.add(new Page(this.readAsBytesInput(pageHeader.compressed_page_size),pageHeader.data_page_header.num_values,pageHeader.uncompressed_page_size,parquetMetadataConverter.getEncoding(pageHeader.data_page_header.repetition_level_encoding),parquetMetadataConverter.getEncoding(pageHeader.data_page_header.definition_level_encoding),parquetMetadataConverter.getEncoding(pageHeader.data_page_header.encoding)));
valuesCountReadSoFar+=pageHeader.data_page_header.num_values;
break;
default :
if (DEBUG) LOG.debug("String_Node_Str" + pageHeader.type + "String_Node_Str"+ pageHeader.compressed_page_size);
this.skip(pageHeader.compressed_page_size);
break;
}
}
if (valuesCountReadSoFar != descriptor.metadata.getValueCount()) {
throw new IOException("String_Node_Str" + descriptor.metadata.getValueCount() + "String_Node_Str"+ filePath+ "String_Node_Str"+ descriptor.metadata.getFirstDataPageOffset()+ "String_Node_Str"+ valuesCountReadSoFar+ "String_Node_Str"+ pagesInChunk.size()+ "String_Node_Str"+ (descriptor.fileOffset + pos()));
}
BytesDecompressor decompressor=codecFactory.getDecompressor(descriptor.metadata.getCodec());
return new ColumnChunkPageReader(decompressor,pagesInChunk,dictionaryPage);
}

Fixed version (ground truth):
/** 
 * Read all of the pages in a given column chunk.
 * @return the list of pages
 */
public ColumnChunkPageReader readAllPages() throws IOException {
  List<Page> pagesInChunk=new ArrayList<Page>();
  DictionaryPage dictionaryPage=null;
  long valuesCountReadSoFar=0;
  while (valuesCountReadSoFar < descriptor.metadata.getValueCount()) {
    PageHeader pageHeader=readPageHeader();
switch (pageHeader.type) {
case DICTIONARY_PAGE:
      if (dictionaryPage != null) {
        throw new ParquetDecodingException("String_Node_Str" + descriptor.col);
      }
    dictionaryPage=new DictionaryPage(this.readAsBytesInput(pageHeader.compressed_page_size),pageHeader.uncompressed_page_size,pageHeader.dictionary_page_header.num_values,parquetMetadataConverter.getEncoding(pageHeader.dictionary_page_header.encoding));
  break;
case DATA_PAGE:
pagesInChunk.add(new Page(this.readAsBytesInput(pageHeader.compressed_page_size),pageHeader.data_page_header.num_values,pageHeader.uncompressed_page_size,parquetMetadataConverter.getEncoding(pageHeader.data_page_header.repetition_level_encoding),parquetMetadataConverter.getEncoding(pageHeader.data_page_header.definition_level_encoding),parquetMetadataConverter.getEncoding(pageHeader.data_page_header.encoding)));
valuesCountReadSoFar+=pageHeader.data_page_header.num_values;
break;
default :
if (DEBUG) LOG.debug("String_Node_Str" + pageHeader.type + "String_Node_Str"+ pageHeader.compressed_page_size);
this.skip(pageHeader.compressed_page_size);
break;
}
}
if (valuesCountReadSoFar != descriptor.metadata.getValueCount()) {
throw new IOException("String_Node_Str" + descriptor.metadata.getValueCount() + "String_Node_Str"+ filePath+ "String_Node_Str"+ descriptor.metadata.getFirstDataPageOffset()+ "String_Node_Str"+ valuesCountReadSoFar+ "String_Node_Str"+ pagesInChunk.size()+ "String_Node_Str"+ (descriptor.fileOffset + pos()));
}
BytesDecompressor decompressor=codecFactory.getDecompressor(descriptor.metadata.getCodec());
return new ColumnChunkPageReader(decompressor,pagesInChunk,dictionaryPage);
}