<commit_before>package com.michaldabski.panoramiotest.photo_activity;

import android.app.Activity;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.v4.view.ViewPager;

import com.michaldabski.panoramiotest.R;
import com.michaldabski.panoramiotest.models.Photo;

import java.util.ArrayList;
import java.util.List;

public class PhotoActivity extends Activity
{
    public static final String
            ARG_PHOTOS_ARRAY = "photos",
            ARG_SELECTED_INDEX = "selected_photo";

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

        Bundle extras = getIntent().getExtras();
        Parcelable[] parcelableArray = extras.getParcelableArray(ARG_PHOTOS_ARRAY);
        List<Photo> photos = new ArrayList<Photo>(parcelableArray.length);
        for (Parcelable parcelable : parcelableArray)
            photos.add((Photo) parcelable);

        ViewPager viewPager = (ViewPager) findViewById(R.id.viewPager);
        viewPager.setPageTransformer(false, new PhotoPageTransformer());
        viewPager.setAdapter(new PhotoPagerAdapter(getFragmentManager(), photos));
        // if activity just launched, show photo selected by user
        if (savedInstanceState == null)
            viewPager.setCurrentItem(extras.getInt(ARG_SELECTED_INDEX));
    }
}
<commit_msg>Reverse drawing order of pages<commit_after>package com.michaldabski.panoramiotest.photo_activity;

import android.app.Activity;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.v4.view.ViewPager;

import com.michaldabski.panoramiotest.R;
import com.michaldabski.panoramiotest.models.Photo;

import java.util.ArrayList;
import java.util.List;

public class PhotoActivity extends Activity
{
    public static final String
            ARG_PHOTOS_ARRAY = "photos",
            ARG_SELECTED_INDEX = "selected_photo";

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

        Bundle extras = getIntent().getExtras();
        Parcelable[] parcelableArray = extras.getParcelableArray(ARG_PHOTOS_ARRAY);
        List<Photo> photos = new ArrayList<Photo>(parcelableArray.length);
        for (Parcelable parcelable : parcelableArray)
            photos.add((Photo) parcelable);

        ViewPager viewPager = (ViewPager) findViewById(R.id.viewPager);
        viewPager.setPageTransformer(true, new PhotoPageTransformer());
        viewPager.setAdapter(new PhotoPagerAdapter(getFragmentManager(), photos));
        // if activity just launched, show photo selected by user
        if (savedInstanceState == null)
            viewPager.setCurrentItem(extras.getInt(ARG_SELECTED_INDEX));
    }
}

{'fraction_non_alphanumeric': 0.091164095371669, 'fraction_numerical': 0.0007012622720897616, 'mean_word_length': 3.8438030560271645, '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': '2501026', 'n_tokens_mistral': 855, 'n_tokens_neox': 819, 'n_words': 158}