<commit_before>package com.anysoftkeyboard.ui.settings;

import android.app.ProgressDialog;
import android.os.AsyncTask;

import com.menny.android.anysoftkeyboard.R;

abstract class UserWordsEditorAsyncTask extends AsyncTask<Void, Void, Void>
{
    /**
     * 
     */
    private final UserDictionaryEditorActivity mUserWordsEditorActivity;

    /**
     * @param userDictionaryEditorActivity
     */
    UserWordsEditorAsyncTask(UserDictionaryEditorActivity userDictionaryEditorActivity) {
        mUserWordsEditorActivity = userDictionaryEditorActivity;
    }

    private ProgressDialog progresDialog;

    @Override
    protected void onPreExecute() {
        super.onPreExecute();

        progresDialog = new ProgressDialog(mUserWordsEditorActivity);
        progresDialog.setTitle("");
        progresDialog.setMessage(mUserWordsEditorActivity.getText(R.string.user_dictionary_read_please_wait));
        progresDialog.setCancelable(false);
        progresDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);

        progresDialog.setOwnerActivity(mUserWordsEditorActivity);

        progresDialog.show();
    }

    protected void onPostExecute(Void result) {
        if (progresDialog.isShowing())
            progresDialog.dismiss();
        applyResults(result);
    }

    protected abstract void applyResults(Void result);
}<commit_msg>weird exception, probably a token got dead...<commit_after>package com.anysoftkeyboard.ui.settings;

import android.app.ProgressDialog;
import android.os.AsyncTask;

import com.menny.android.anysoftkeyboard.R;

abstract class UserWordsEditorAsyncTask extends AsyncTask<Void, Void, Void> {
	/**
     * 
     */
	private final UserDictionaryEditorActivity mUserWordsEditorActivity;

	/**
	 * @param userDictionaryEditorActivity
	 */
	UserWordsEditorAsyncTask(
			UserDictionaryEditorActivity userDictionaryEditorActivity) {
		mUserWordsEditorActivity = userDictionaryEditorActivity;
	}

	private ProgressDialog progresDialog;

	@Override
	protected void onPreExecute() {
		super.onPreExecute();

		progresDialog = new ProgressDialog(mUserWordsEditorActivity);
		progresDialog.setTitle("");
		progresDialog.setMessage(mUserWordsEditorActivity
				.getText(R.string.user_dictionary_read_please_wait));
		progresDialog.setCancelable(false);
		progresDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);

		progresDialog.setOwnerActivity(mUserWordsEditorActivity);

		progresDialog.show();
	}

	protected void onPostExecute(Void result) {
		try {
			if (progresDialog.isShowing())
				progresDialog.dismiss();
		} catch (IllegalArgumentException e) {
			// just swallowing it.
		}
		applyResults(result);
	}

	protected abstract void applyResults(Void result);
}
{'fraction_non_alphanumeric': 0.08520841018074511, 'fraction_numerical': 0.0, 'mean_word_length': 4.603305785123967, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6125771', 'n_tokens_mistral': 807, 'n_tokens_neox': 740, 'n_words': 125}