<commit_before>package net.binarycreations.apod.archive;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;

import net.binarycreations.apod.R;
import net.binarycreations.apod.app.ApodApp;
import net.binarycreations.apod.archive.ui.ArchivePaginationListener;
import net.binarycreations.apod.archive.ui.AstroPictureAdapter;
import net.binarycreations.apod.detail.AstroDetailActivity;
import net.binarycreations.apod.domain.AstroItem;

import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.TimeZone;

/**
 * Show a list of recent astronomy pictures of the day.
 *
 * @author graham.
 */
public class ArchiveListActivity extends AppCompatActivity implements ArchiveView, ArchivePaginationListener, View
        .OnClickListener {

    private ArchivePresenter mPresenter;

    private Toolbar mToolbar;
    private RecyclerView mAstroList;
    private AstroPictureAdapter mAdapter;
    private boolean mIsLoading;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_astro_list);

        mToolbar = (Toolbar) findViewById(R.id.archive_toolbar);
        setSupportActionBar(mToolbar);

        mAstroList = (RecyclerView) findViewById(R.id.rv_archive_list);
        mAstroList.setHasFixedSize(true);
        mAstroList.setLayoutManager(new LinearLayoutManager(this));

        mAdapter = new AstroPictureAdapter();
        mAdapter.setHasStableIds(true);
        mAdapter.setOnClickListener(this);
        mAdapter.setPaginationListener(this);
        mAstroList.setAdapter(mAdapter);

        mPresenter = ApodApp.getInstance().getArchiveFactory().getArchivePresenter();
        mPresenter.setView(this);

        loadArchivePictures(fromLastWeek(), toToday());
    }

    @Override<commit_msg>Bug-fix: Ids are not stable, remove after bad refactor<commit_after>package net.binarycreations.apod.archive;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;

import net.binarycreations.apod.R;
import net.binarycreations.apod.app.ApodApp;
import net.binarycreations.apod.archive.ui.ArchivePaginationListener;
import net.binarycreations.apod.archive.ui.AstroPictureAdapter;
import net.binarycreations.apod.detail.AstroDetailActivity;
import net.binarycreations.apod.domain.AstroItem;

import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.TimeZone;

/**
 * Show a list of recent astronomy pictures of the day.
 *
 * @author graham.
 */
public class ArchiveListActivity extends AppCompatActivity implements ArchiveView, ArchivePaginationListener, View
        .OnClickListener {

    private ArchivePresenter mPresenter;

    private Toolbar mToolbar;
    private RecyclerView mAstroList;
    private AstroPictureAdapter mAdapter;
    private boolean mIsLoading;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_astro_list);

        mToolbar = (Toolbar) findViewById(R.id.archive_toolbar);
        setSupportActionBar(mToolbar);

        mAstroList = (RecyclerView) findViewById(R.id.rv_archive_list);
        mAstroList.setHasFixedSize(true);
        mAstroList.setLayoutManager(new LinearLayoutManager(this));

        mAdapter = new AstroPictureAdapter();
        mAdapter.setOnClickListener(this);
        mAdapter.setPaginationListener(this);
        mAstroList.setAdapter(mAdapter);

        mPresenter = ApodApp.getInstance().getArchiveFactory().getArchivePresenter();
        mPresenter.setView(this);

        loadArchivePictures(fromLastWeek(), toToday());
    }

    @Override
{'fraction_non_alphanumeric': 0.09078179696616102, 'fraction_numerical': 0.0018669778296382731, 'mean_word_length': 4.537467700258398, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2655865', 'n_tokens_mistral': 1293, 'n_tokens_neox': 1223, 'n_words': 224}