<commit_before>package fi.jyu.ln.luontonurkka;

import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.database.sqlite.SQLiteDatabase;
import android.location.Location;
import android.os.Bundle;
import android.os.Handler;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;

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

import fi.jyu.ln.luontonurkka.tools.GridParser;
import fi.jyu.ln.luontonurkka.tools.SettingsManager;

public class Loader extends AppCompatActivity {

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

        /*
         * create database helper and initialize the database
         */
        DatabaseHelper myDbHelper;
        myDbHelper = DatabaseHelper.getInstance(this);
        Log.d(getClass().toString(), "DB helper opened");
        /*
         * Database must be initialized before it can be used. This will ensure
         * that the database exists and is the current version.
         */
        myDbHelper.initializeDataBase();
        Log.d(getClass().toString(), "DB initialized");
        myDbHelper.close();
        Log.d(getClass().toString(), "DB helper closed");

        final Intent intent = new Intent(this, TabbedListActivity.class);
        //reading grid csv to hashmap
        GridParser p = new GridParser();
        InputStream is = getResources().openRawResource(R.raw.grid_sorted);
        p.openFile(is);
        try {
            HashMap<String, String> grid = p.parseFile();
            p.closeFile();
        } catch (IOException e) {
            e.printStackTrace();
        }

        SettingsManager sm = new SettingsManager(this);
        Log.d(getClass().toString(), sm.getBool(getString(R.string.setting_map_default)) + "");
        final Intent intent;
        if(sm.getBool(getString(R.string.setting_map_default))) {
            intent = new Intent(this, MapsActivity.class);
        } else {
            intent = new Intent(this, TabbedListActivity.class);
        }

        final Handler handler = new Handler();
        handler.postDelayed(new Runnable() {
            @Override<commit_msg>Where did those lines comefrom?<commit_after>package fi.jyu.ln.luontonurkka;

import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.database.sqlite.SQLiteDatabase;
import android.location.Location;
import android.os.Bundle;
import android.os.Handler;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;

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

import fi.jyu.ln.luontonurkka.tools.GridParser;
import fi.jyu.ln.luontonurkka.tools.SettingsManager;

public class Loader extends AppCompatActivity {

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

        /*
         * create database helper and initialize the database
         */
        DatabaseHelper myDbHelper;
        myDbHelper = DatabaseHelper.getInstance(this);
        Log.d(getClass().toString(), "DB helper opened");
        /*
         * Database must be initialized before it can be used. This will ensure
         * that the database exists and is the current version.
         */
        myDbHelper.initializeDataBase();
        Log.d(getClass().toString(), "DB initialized");
        myDbHelper.close();
        Log.d(getClass().toString(), "DB helper closed");

        SettingsManager sm = new SettingsManager(this);
        Log.d(getClass().toString(), sm.getBool(getString(R.string.setting_map_default)) + "");
        final Intent intent;
        if(sm.getBool(getString(R.string.setting_map_default))) {
            intent = new Intent(this, MapsActivity.class);
        } else {
            intent = new Intent(this, TabbedListActivity.class);
        }

        final Handler handler = new Handler();
        handler.postDelayed(new Runnable() {
            @Override
{'fraction_non_alphanumeric': 0.10514834205933682, 'fraction_numerical': 0.0008726003490401396, 'mean_word_length': 3.1269126912691267, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '3221442', 'n_tokens_mistral': 1261, 'n_tokens_neox': 1245, 'n_words': 280}