<commit_before>package com.gh4a.activities;

import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.ActionBar;

import com.gh4a.BaseActivity;
import com.gh4a.Constants;
import com.gh4a.R;
import com.gh4a.fragment.CommitListFragment;

public class CommitHistoryActivity extends BaseActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (hasErrorView()) {
            return;
        }

        setContentView(R.layout.generic_list);

        Bundle extras = getIntent().getExtras();
        String filePath = extras.getString(Constants.Object.PATH);

        if (savedInstanceState == null) {
            CommitListFragment fragment = CommitListFragment.newInstance(
                    extras.getString(Constants.Repository.OWNER),
                    extras.getString(Constants.Repository.NAME),
                    extras.getString(Constants.Object.REF),
                    filePath);

            FragmentManager fm = getSupportFragmentManager();
            fm.beginTransaction().add(R.id.content_container, fragment).commit();
        }

        ActionBar actionBar = getSupportActionBar();
        actionBar.setTitle(R.string.history);
        actionBar.setSubtitle(filePath);
    }
}<commit_msg>Add back navigation to commit history activity.<commit_after>package com.gh4a.activities;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.ActionBar;

import com.gh4a.BaseActivity;
import com.gh4a.Constants;
import com.gh4a.R;
import com.gh4a.fragment.CommitListFragment;
import com.gh4a.utils.IntentUtils;

public class CommitHistoryActivity extends BaseActivity {
    private String mRepoOwner;
    private String mRepoName;
    private String mRef;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (hasErrorView()) {
            return;
        }

        setContentView(R.layout.generic_list);

        Bundle extras = getIntent().getExtras();
        String filePath = extras.getString(Constants.Object.PATH);
        mRepoOwner = extras.getString(Constants.Repository.OWNER);
        mRepoName = extras.getString(Constants.Repository.NAME);
        mRef = extras.getString(Constants.Object.REF);

        if (savedInstanceState == null) {
            CommitListFragment fragment = CommitListFragment.newInstance(mRepoOwner,
                    mRepoName, mRef, filePath);

            FragmentManager fm = getSupportFragmentManager();
            fm.beginTransaction().add(R.id.content_container, fragment).commit();
        }

        ActionBar actionBar = getSupportActionBar();
        actionBar.setTitle(R.string.history);
        actionBar.setSubtitle(filePath);
        actionBar.setDisplayHomeAsUpEnabled(true);
    }

    @Override
    protected Intent navigateUp() {
        return IntentUtils.getRepoActivityIntent(this, mRepoOwner, mRepoName, mRef);
    }
}
{'fraction_non_alphanumeric': 0.0949119373776908, 'fraction_numerical': 0.004892367906066536, 'mean_word_length': 3.0355263157894736, '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': '6265645', 'n_tokens_mistral': 849, 'n_tokens_neox': 818, 'n_words': 148}