[Demonstration 1]

[Buggy Method]
@Override
public org.apache.parquet.hadoop.api.ReadSupport.ReadContext init(InitContext context) {
    Configuration configuration = context.getConfiguration();
    MessageType fileSchema = context.getFileSchema();
    String columnNames = configuration.get(IOConstants.COLUMNS);
    Map<String, String> contextMetadata = new HashMap<String, String>();
    boolean indexAccess = configuration.getBoolean(PARQUET_COLUMN_INDEX_ACCESS, false);
    if (columnNames != null) {
        List<String> columnNamesList = getColumnNames(columnNames);
        String columnTypes = configuration.get(IOConstants.COLUMNS_TYPES);
        List<TypeInfo> columnTypesList = getColumnTypes(columnTypes);
        MessageType tableSchema;
        if (indexAccess) {
            List<Integer> indexSequence = new ArrayList<Integer>();
            // Generates a sequence list of indexes
            for (int i = 0; i < columnNamesList.size(); i++) {
                indexSequence.add(i);
            }
            tableSchema = getSchemaByIndex(fileSchema, columnNamesList, indexSequence);
        } else {
            tableSchema = getSchemaByName(fileSchema, columnNamesList, columnTypesList);
        }
        contextMetadata.put(HIVE_TABLE_AS_PARQUET_SCHEMA, tableSchema.toString());
        contextMetadata.put(PARQUET_COLUMN_INDEX_ACCESS, String.valueOf(indexAccess));
        this.hiveTypeInfo = TypeInfoFactory.getStructTypeInfo(columnNamesList, columnTypesList);
        List<String> groupPaths = ColumnProjectionUtils.getNestedColumnPaths(configuration);
        List<Integer> indexColumnsWanted = ColumnProjectionUtils.getReadColumnIDs(configuration);
        if (!ColumnProjectionUtils.isReadAllColumns(configuration) && !indexColumnsWanted.isEmpty()) {
            MessageType requestedSchemaByUser = getProjectedSchema(tableSchema, columnNamesList, indexColumnsWanted, groupPaths);
            return new ReadContext(requestedSchemaByUser, contextMetadata);
        } else {
            return new ReadContext(tableSchema, contextMetadata);
        }
    } else {
        contextMetadata.put(HIVE_TABLE_AS_PARQUET_SCHEMA, fileSchema.toString());
        return new ReadContext(fileSchema, contextMetadata);
    }
}

[Buggy Hunk]
List<String> groupPaths = ColumnProjectionUtils.getNestedColumnPaths(configuration);

[Patch]
Set<String> groupPaths = ColumnProjectionUtils.getNestedColumnPaths(configuration);

[Demonstration 2]

[Buggy Method]
@Override
public void setConfiguration(Configuration configuration) {
    this.configuration = configuration.getConfiguration();
}

[Buggy Hunk]
this.configuration = configuration.getConfiguration();

[Patch]
this.configuration.putAll(configuration.getConfiguration());

[Demonstration 3]

[Buggy Method]
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    mTransferedRecipe = mListener.getFavouriteRecipe();
    final RecipeEntity recipe = new RecipeEntity();
    mRecipeDao.open();
    // // TODO: 20.12.15 Handle insertion of duplicate entries
    // if already exists -> handle it somehow
    if (mRecipeDao.findById(mTransferedRecipe.getId()) != null) {
        mRecipeDao.close();
        return null;
    }
    recipe.setId(mTransferedRecipe.getId());
    recipe.setTitle(mTransferedRecipe.getTitle());
    recipe.setPublisherName(mTransferedRecipe.getPublisherName());
    recipe.setSourceUrl(mTransferedRecipe.getSourceUrl());
    recipe.setImageUrl(mTransferedRecipe.getImageUrl());
    recipe.setSocialRank(mTransferedRecipe.getSocialRank());
    mRecipeDao.insert(recipe);
    // insert recipe ingredients
    mIngredientDao.open();
    for (String ingredientName : mTransferedRecipe.getIngredients()) {
        IngredientEntity ingredient = new IngredientEntity();
        ingredient.setName(ingredientName);
        ingredient.setRecipeId(recipe.getId());
        mIngredientDao.insert(ingredient);
    }
    mIngredientDao.close();
    mRecipeDao.close();
    getFragmentManager().beginTransaction().replace(R.id.fragment_placeholder, new FavouritesListFragment()).commit();
    return null;
}

[Buggy Hunk]
.replace(R.id.fragment_placeholder, new FavouritesListFragment())

[Patch]
.replace(R.id.fragment_favourites_placeholder, new FavouritesListFragment())