<commit_before>package org.tndata.android.compass.task;

import android.app.Activity;
import android.content.Context;
import android.os.AsyncTask;
import android.text.Html;

import org.json.JSONException;
import org.json.JSONObject;
import org.tndata.android.compass.CompassApplication;
import org.tndata.android.compass.util.Constants;
import org.tndata.android.compass.util.NetworkHelper;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;

public class BehaviorProgressTask extends AsyncTask<String, Void, Void> {

    private Context mContext;
    private BehaviorProgressTaskListener mCallback;
    private String token;

    public interface BehaviorProgressTaskListener {
        public void behaviorProgressSaved();
    }

    public BehaviorProgressTask(Context context, BehaviorProgressTaskListener callback) {
        mContext = context;
        mCallback = callback;
        token = ((CompassApplication) ((Activity) mContext).getApplication()).getToken();<commit_msg>ensure that context is an Activity<commit_after>package org.tndata.android.compass.task;

import android.app.Activity;
import android.content.Context;
import android.os.AsyncTask;
import android.text.Html;

import org.json.JSONException;
import org.json.JSONObject;
import org.tndata.android.compass.CompassApplication;
import org.tndata.android.compass.util.Constants;
import org.tndata.android.compass.util.NetworkHelper;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;

public class BehaviorProgressTask extends AsyncTask<String, Void, Void> {

    private Context mContext;
    private BehaviorProgressTaskListener mCallback;
    private String token;

    public interface BehaviorProgressTaskListener {
        public void behaviorProgressSaved();
    }

    public BehaviorProgressTask(Context context, BehaviorProgressTaskListener callback) {
        if (!(context instanceof Activity)) {
            throw new IllegalStateException("Context Must be an Activity");
        }
        mContext = context;
        mCallback = callback;
        token = ((CompassApplication) ((Activity) mContext).getApplication()).getToken();
{'fraction_non_alphanumeric': 0.08847299021692896, 'fraction_numerical': 0.0, 'mean_word_length': 4.778869778869779, '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': '4265683', 'n_tokens_mistral': 630, 'n_tokens_neox': 611, 'n_words': 149}