<commit_before>package io.pivotal.arca.adapters;

import android.annotation.TargetApi;
import android.content.Context;
import android.database.Cursor;
import android.database.DataSetObserver;
import android.os.Build;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;

import java.util.Collection;

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public class RecyclerViewCursorAdapter extends RecyclerView.Adapter<RecyclerViewCursorAdapter.ViewHolder> {

    private final ModernCursorAdapter mCursorAdapter;

    public RecyclerViewCursorAdapter(final Context context, final int layout, final Collection<Binding> bindings) {
        mCursorAdapter = new ModernCursorAdapter(context, layout, bindings);
        mCursorAdapter.registerDataSetObserver(new RecyclerViewDataSetObserver());
        setHasStableIds(true);
    }

    @Override
    public RecyclerViewCursorAdapter.ViewHolder onCreateViewHolder(final ViewGroup parent, final int viewType) {
        final View view = mCursorAdapter.newView(parent.getContext(), mCursorAdapter.getCursor(), parent);
        return new ViewHolder(view);
    }

    @Override
    public void onBindViewHolder(final RecyclerViewCursorAdapter.ViewHolder holder, final int position) {
        final Cursor cursor = (Cursor) mCursorAdapter.getItem(position);
        mCursorAdapter.bindView(holder.getView(), holder.getView().getContext(), cursor);
    }

    @Override
    public int getItemCount() {
        return mCursorAdapter.getCount();
    }

    @Override
    public long getItemId(final int position) {
        return mCursorAdapter.getItemId(position);
    }

    public Object getItem(final int position) {
        return mCursorAdapter.getItem(position);
    }

    public void setViewBinder(final ViewBinder viewBinder) {
        mCursorAdapter.setViewBinder(viewBinder);
    }

    public Cursor swapCursor(final Cursor newCursor) {
        return mCursorAdapter.swapCursor(newCursor);
    }

    public Cursor getCursor() {
        return mCursorAdapter.getCursor();<commit_msg>Update RecyclerViewAdapter to use cursor view type<commit_after>package io.pivotal.arca.adapters;

import android.annotation.TargetApi;
import android.content.Context;
import android.database.Cursor;
import android.database.DataSetObserver;
import android.os.Build;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;

import java.util.Collection;

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public class RecyclerViewCursorAdapter extends RecyclerView.Adapter<RecyclerViewCursorAdapter.ViewHolder> {

    private final ModernCursorAdapter mCursorAdapter;

    public RecyclerViewCursorAdapter(final ModernCursorAdapter cursorAdapter) {
        cursorAdapter.registerDataSetObserver(new RecyclerViewDataSetObserver());
        mCursorAdapter = cursorAdapter;
        setHasStableIds(true);
    }

    public RecyclerViewCursorAdapter(final Context context, final int layout, final Collection<Binding> bindings) {
        this(new ModernCursorAdapter(context, layout, bindings));
    }

    @Override
    public RecyclerViewCursorAdapter.ViewHolder onCreateViewHolder(final ViewGroup parent, final int viewType) {
        final View view = mCursorAdapter.newView(parent.getContext(), mCursorAdapter.getCursor(), parent);
        return new ViewHolder(view);
    }

    @Override
    public void onBindViewHolder(final RecyclerViewCursorAdapter.ViewHolder holder, final int position) {
        final Cursor cursor = (Cursor) mCursorAdapter.getItem(position);
        mCursorAdapter.bindView(holder.getView(), holder.getView().getContext(), cursor);
    }

    @Override
    public int getItemViewType(final int position) {
        return mCursorAdapter.getItemViewType(position);
    }

    @Override
    public int getItemCount() {
        return mCursorAdapter.getCount();
    }

    @Override
    public long getItemId(final int position) {
        return mCursorAdapter.getItemId(position);
    }

    public Object getItem(final int position) {
        return mCursorAdapter.getItem(position);
    }

    public void setViewBinder(final ViewBinder viewBinder) {
        mCursorAdapter.setViewBinder(viewBinder);
    }

    public Cursor swapCursor(final Cursor newCursor) {
        return mCursorAdapter.swapCursor(newCursor);
    }

    public Cursor getCursor() {
        return mCursorAdapter.getCursor();
{'fraction_non_alphanumeric': 0.08064879477359765, 'fraction_numerical': 0.0004505519261094841, 'mean_word_length': 4.254437869822485, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3233370', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1174, 'n_words': 262}