Program: 111950
Project: 111950
Buggy source:
/** 
 * Reads the meta data block in the footer of the file
 * @param configuration
 * @param file the parquet File
 * @param filter the filter to apply to row groups
 * @return the metadata blocks in the footer
 * @throws IOException if an error occurs while reading the file
 */
public static final ParquetMetadata readFooter(Configuration configuration,FileStatus file,MetadataFilter filter) throws IOException {
  FileSystem fileSystem=file.getPath().getFileSystem(configuration);
  FSDataInputStream f=fileSystem.open(file.getPath());
  try {
    long l=file.getLen();
    if (Log.DEBUG)     LOG.debug("String_Node_Str" + l);
    int FOOTER_LENGTH_SIZE=4;
    if (l < MAGIC.length + FOOTER_LENGTH_SIZE + MAGIC.length) {
      throw new RuntimeException(file.getPath() + "String_Node_Str");
    }
    long footerLengthIndex=l - FOOTER_LENGTH_SIZE - MAGIC.length;
    if (Log.DEBUG)     LOG.debug("String_Node_Str" + footerLengthIndex);
    f.seek(footerLengthIndex);
    int footerLength=readIntLittleEndian(f);
    byte[] magic=new byte[MAGIC.length];
    f.readFully(magic);
    if (!Arrays.equals(MAGIC,magic)) {
      throw new RuntimeException(file.getPath() + "String_Node_Str" + Arrays.toString(MAGIC)+ "String_Node_Str"+ Arrays.toString(magic));
    }
    long footerIndex=footerLengthIndex - footerLength;
    if (Log.DEBUG)     LOG.debug("String_Node_Str" + footerLength + "String_Node_Str"+ footerIndex);
    if (footerIndex < MAGIC.length || footerIndex >= footerLengthIndex) {
      throw new RuntimeException("String_Node_Str");
    }
    f.seek(footerIndex);
    return ParquetMetadataConverter.readParquetMetadata(f,filter);
  }
  finally {
    f.close();
  }
}

Fixed version (ground truth):
/** 
 * Reads the meta data block in the footer of the file
 * @param configuration
 * @param file the parquet File
 * @param filter the filter to apply to row groups
 * @return the metadata blocks in the footer
 * @throws IOException if an error occurs while reading the file
 */
public static final ParquetMetadata readFooter(Configuration configuration,FileStatus file,MetadataFilter filter) throws IOException {
  FileSystem fileSystem=file.getPath().getFileSystem(configuration);
  FSDataInputStream f=fileSystem.open(file.getPath());
  try {
    long l=file.getLen();
    if (Log.DEBUG)     LOG.debug("String_Node_Str" + l);
    int FOOTER_LENGTH_SIZE=4;
    if (l < MAGIC.length + FOOTER_LENGTH_SIZE + MAGIC.length) {
      throw new RuntimeException(file.getPath() + "String_Node_Str");
    }
    long footerLengthIndex=l - FOOTER_LENGTH_SIZE - MAGIC.length;
    if (Log.DEBUG)     LOG.debug("String_Node_Str" + footerLengthIndex);
    f.seek(footerLengthIndex);
    int footerLength=readIntLittleEndian(f);
    byte[] magic=new byte[MAGIC.length];
    f.readFully(magic);
    if (!Arrays.equals(MAGIC,magic)) {
      throw new RuntimeException(file.getPath() + "String_Node_Str" + Arrays.toString(MAGIC)+ "String_Node_Str"+ Arrays.toString(magic));
    }
    long footerIndex=footerLengthIndex - footerLength;
    if (Log.DEBUG)     LOG.debug("String_Node_Str" + footerLength + "String_Node_Str"+ footerIndex);
    if (footerIndex < MAGIC.length || footerIndex >= footerLengthIndex) {
      throw new RuntimeException("String_Node_Str");
    }
    f.seek(footerIndex);
    return converter.readParquetMetadata(f,filter);
  }
  finally {
    f.close();
  }
}