<commit_before>package com.example.owncloud.ui.activity;

import android.os.AsyncTask;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

import com.example.owncloud.R;
import com.example.owncloud.ui.dialog.LoadingDialog;

import java.lang.ref.WeakReference;

public class LogHistoryActivity extends AppCompatActivity {
    private static final String DIALOG_WAIT_TAG = "DIALOG_WAIT";

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

        TextView logTV = (TextView) findViewById(R.id.logTV);


        new LoadingLogTask(logTV).execute();

    }

    private class LoadingLogTask extends AsyncTask <String, Void, String> {
        private final WeakReference<TextView> textViewReference;

        public LoadingLogTask(TextView logTV) {
            textViewReference = new WeakReference<TextView>(logTV);
        }

        @Override
        protected void onPostExecute(String result) {
            showLoadingDialog();
        }

        @Override
        protected void onPreExecute() {
            dismissLoadingDialog();
        }

        protected String doInBackground(String... args) {
            try {<commit_msg>fix loading<commit_after>package com.example.owncloud.ui.activity;

import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

import com.example.owncloud.R;
import com.example.owncloud.ui.dialog.LoadingDialog;

import java.lang.ref.WeakReference;

public class LogHistoryActivity extends AppCompatActivity {
    private static final String DIALOG_WAIT_TAG = "DIALOG_WAIT";

    private static final String KEY_LOG_TEXT = "LOG_TEXT";

    private static final String TAG = LogHistoryActivity.class.getSimpleName();

    private String mLogText;

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

        TextView logTV = (TextView) findViewById(R.id.logTV);


        if (savedInstanceState == null) {
            LoadingLogTask task = new LoadingLogTask(logTV);
            task.execute();
        } else {
            mLogText = savedInstanceState.getString(KEY_LOG_TEXT);
            logTV.setText(mLogText);
        }
    }

    private class LoadingLogTask extends AsyncTask <String, Void, String> {
        private final WeakReference<TextView> textViewReference;

        public LoadingLogTask(TextView logTV) {
            textViewReference = new WeakReference<TextView>(logTV);
        }

        @Override
        protected void onPostExecute(String result) {
            dismissLoadingDialog();
        }

        @Override
        protected void onPreExecute() {
            showLoadingDialog();
        }

        protected String doInBackground(String... args) {
            try {
{'fraction_non_alphanumeric': 0.08581060373889059, 'fraction_numerical': 0.002451731535396874, 'mean_word_length': 3.1526717557251906, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4446011', 'n_tokens_mistral': 896, 'n_tokens_neox': 847, 'n_words': 186}