<commit_before>package com.rhm.pwn.debug;

import android.app.job.JobInfo;
import android.app.job.JobScheduler;
import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.text.method.ScrollingMovementMethod;
import android.util.Log;
import android.widget.TextView;

import java.util.List;

import io.reactivex.Completable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
import com.rhm.pwn.R;
import com.rhm.pwn.model.PWNDatabase;
import com.rhm.pwn.model.PWNTask;

public class DebugActivity extends AppCompatActivity {
    List<PWNTask> list;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_debug);
        Toolbar toolbar = findViewById(R.id.toolbar);
        TextView text = findViewById(R.id.debugTextView);
        text.setMovementMethod(new ScrollingMovementMethod());
        setSupportActionBar(toolbar);

        Completable.fromAction(() -> {
                    list = PWNDatabase.getInstance(DebugActivity.this)
                            .urlCheckDao().getTasks();

                }
        ).observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(() -> {
                    JobScheduler js = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);
                    List<JobInfo> jobs = js.getAllPendingJobs();

                    String msg = "Pending Jobs:";
                    for(JobInfo job: jobs) {
                        Long minLatS = job.getMinLatencyMillis()/1000;
                        String timeFormatter= "%d hours, or %d mins, or %02d secs";
                        String minLatHuman = String.format(timeFormatter, (minLatS/60/60), minLatS/60, minLatS);
//                        Long deadlineS = job.getMaxExecutionDelayMillis()/1000;
//                        String deadlineHuman = String.format(timeFormatter, deadlineS/60/60, deadlineS/60, deadlineS%60);
                        msg += minLatHuman;
//                        msg += String.format("Job#%d, minLat:%s, deadline:%s",job.getId(), minLatHuman, deadlineHuman);
                    }
                    msg += "\r\nJob history:";
                    for (PWNTask p : list) {
                        msg += p.toString() + "\r\n";
                    }
                    msg += "\r\n";
                    text.setText(msg);
                });
    }

}<commit_msg>More cleanup<commit_after>package com.rhm.pwn.debug;

import android.app.job.JobInfo;
import android.app.job.JobScheduler;
import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.text.method.ScrollingMovementMethod;
import android.util.Log;
import android.widget.TextView;

import java.util.List;

import io.reactivex.Completable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
import com.rhm.pwn.R;
import com.rhm.pwn.model.PWNDatabase;
import com.rhm.pwn.model.PWNTask;

public class DebugActivity extends AppCompatActivity {
    List<PWNTask> list;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_debug);
        Toolbar toolbar = findViewById(R.id.toolbar);
        TextView text = findViewById(R.id.debugTextView);
        text.setMovementMethod(new ScrollingMovementMethod());
        setSupportActionBar(toolbar);

        Completable.fromAction(() -> {
                    list = PWNDatabase.getInstance(DebugActivity.this)
                            .urlCheckDao().getTasks();

                }
        ).observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(() -> {
                    JobScheduler js = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);
                    List<JobInfo> jobs = js.getAllPendingJobs();

                    String msg = "Pending Job";
                    for(JobInfo job: jobs) {
                        Long minLatS = job.getMinLatencyMillis()/1000;
                        String timeFormatter= "%d hours, or %d mins, or %02d secs";
                        String minLatHuman = String.format(timeFormatter, (minLatS/60/60), minLatS/60, minLatS);
                        msg += "Id# "+job.getId()+"\r\n"+minLatHuman+"\r\n";
                    }
                    msg += "\r\nJob history:";
                    for (PWNTask p : list) {
                        msg += p.toString() + "\r\n";
                    }
                    msg += "\r\n";
                    text.setText(msg);
                });
    }

}
{'fraction_non_alphanumeric': 0.11172161172161173, 'fraction_numerical': 0.00814000814000814, 'mean_word_length': 2.064214463840399, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '4622865', 'n_tokens_mistral': 1441, 'n_tokens_neox': 1358, 'n_words': 241}