<commit_before>package com.gh4a.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AnimationUtils;

import com.gh4a.BaseActivity;
import com.gh4a.R;
import com.gh4a.utils.RxUtils;
import com.gh4a.utils.UiUtils;
import com.gh4a.widget.SwipeRefreshLayout;
import com.philosophicalhacker.lib.RxLoader;

import fr.castorflex.android.smoothprogressbar.SmoothProgressBar;
import io.reactivex.SingleTransformer;

public abstract class LoadingFragmentBase extends Fragment implements
        BaseActivity.RefreshableChild, SwipeRefreshLayout.ChildScrollDelegate {
    private ViewGroup mContentContainer;
    private View mContentView;
    private SmoothProgressBar mProgress;
    private final int[] mProgressColors = new int[2];
    private boolean mContentShown = true;
    private RxLoader mRxLoader;

    public LoadingFragmentBase() {
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        mRxLoader = new RxLoader(getActivity(), getLoaderManager());
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.loading_fragment, container, false);

        mContentContainer = view.findViewById(R.id.content_container);<commit_msg>Initialize RxLoader instance earlier.<commit_after>package com.gh4a.fragment;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AnimationUtils;

import com.gh4a.BaseActivity;
import com.gh4a.R;
import com.gh4a.utils.RxUtils;
import com.gh4a.utils.UiUtils;
import com.gh4a.widget.SwipeRefreshLayout;
import com.philosophicalhacker.lib.RxLoader;

import fr.castorflex.android.smoothprogressbar.SmoothProgressBar;
import io.reactivex.SingleTransformer;

public abstract class LoadingFragmentBase extends Fragment implements
        BaseActivity.RefreshableChild, SwipeRefreshLayout.ChildScrollDelegate {
    private ViewGroup mContentContainer;
    private View mContentView;
    private SmoothProgressBar mProgress;
    private final int[] mProgressColors = new int[2];
    private boolean mContentShown = true;
    private RxLoader mRxLoader;

    public LoadingFragmentBase() {
    }

    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
        mRxLoader = new RxLoader(context, getLoaderManager());
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.loading_fragment, container, false);

        mContentContainer = view.findViewById(R.id.content_container);
{'fraction_non_alphanumeric': 0.07926237463604012, 'fraction_numerical': 0.00517631834357813, 'mean_word_length': 4.74721189591078, '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': '5627082', 'n_tokens_mistral': 883, 'n_tokens_neox': 841, 'n_words': 187}