<commit_before>package com.odinarts.android.storagescanner;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.util.Log;
import android.view.View;

public class MainActivity extends FragmentActivity {
    public static final String TAG = "OA.MainActivity";

    private DoWorkFragment mFragment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        Log.i(TAG, "OnCreate:" + ((savedInstanceState == null) ? "" : savedInstanceState.toString()));

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        if(savedInstanceState == null) {
            mFragment = new DoWorkFragment();
            getSupportFragmentManager().beginTransaction()
                    .add(R.id.fragment_container, mFragment).commit();
        }

    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
        mFragment.backButtonWasPressed();
    }

    public void onLargestFilesClick(View v) {
        mFragment.onLargestFilesClick(v);
    }
<commit_msg>Fixed null pointer by adding fragment tag<commit_after>package com.odinarts.android.storagescanner;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.util.Log;
import android.view.View;

public class MainActivity extends FragmentActivity {
    public static final String TAG = "OA.MainActivity";

    private DoWorkFragment mFragment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        Log.i(TAG, "OnCreate:" + ((savedInstanceState == null) ? "" : savedInstanceState.toString()));

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        if(savedInstanceState == null) {
            mFragment = new DoWorkFragment();
            getSupportFragmentManager().beginTransaction()
                    .add(R.id.fragment_container, mFragment, "DoWorkFragment").commit();
        }
        else {
            mFragment = (DoWorkFragment) getSupportFragmentManager().findFragmentByTag("DoWorkFragment");
        }

    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
        mFragment.backButtonWasPressed();
    }

    public void onLargestFilesClick(View v) {
        mFragment.onLargestFilesClick(v);
    }

{'fraction_non_alphanumeric': 0.10159276797244941, 'fraction_numerical': 0.0008609556607834697, 'mean_word_length': 3.179856115107914, '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': '3960908', 'n_tokens_mistral': 647, 'n_tokens_neox': 612, 'n_words': 121}