<commit_before>package nerd.tuxmobil.fahrplan.congress;

import android.app.Application;
import android.support.v4.util.SparseArrayCompat;
import android.util.Log;

import org.ligi.tracedroid.TraceDroid;

import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TimeZone;

import info.metadude.android.eventfahrplan.commons.logging.Logging;
import nerd.tuxmobil.fahrplan.congress.models.DateInfos;
import nerd.tuxmobil.fahrplan.congress.models.Lecture;
import nerd.tuxmobil.fahrplan.congress.models.Meta;
import nerd.tuxmobil.fahrplan.congress.repositories.AppRepository;
import nerd.tuxmobil.fahrplan.congress.utils.ConferenceTimeFrame;

public class MyApp extends Application {

    public static Application app = null;

    public static final boolean DEBUG = false;

    public static List<Lecture> lectureList = null;

    public static Meta meta;

    public static DateInfos dateInfos = null;

    private static final long first_day_start = getMilliseconds("Europe/Paris",
            BuildConfig.SCHEDULE_FIRST_DAY_START_YEAR,
            BuildConfig.SCHEDULE_FIRST_DAY_START_MONTH,
            BuildConfig.SCHEDULE_FIRST_DAY_START_DAY);

    private static final long last_day_end = getMilliseconds("Europe/Paris",
            BuildConfig.SCHEDULE_LAST_DAY_END_YEAR,
            BuildConfig.SCHEDULE_LAST_DAY_END_MONTH,
            BuildConfig.SCHEDULE_LAST_DAY_END_DAY);

    public static final ConferenceTimeFrame conferenceTimeFrame =
            new ConferenceTimeFrame(first_day_start, last_day_end);

    public static int roomCount = 0;

    /**
     * maps room title to room index
     */
    public static final Map<String, Integer> roomsMap = new HashMap<>();

    /**
     * maps column index to room index
     */
    public static SparseArrayCompat<Integer> roomList = new SparseArrayCompat<>();

    public enum TASKS {
        NONE,
        FETCH,
        PARSE,
        FETCH_CANCELLED
    }

    // requestCodes für startActivityForResult
    public final static int ALARMLIST = 1;
    public final static int EVENTVIEW = 2;
    public final static int CHANGELOG = 3;
    public final static int STARRED = 4;
    public final static int SETTINGS = 5;

    public static TASKS task_running = TASKS.NONE;

    public static int lectureListDay = 0;

    @Override
    public void onCreate() {
        super.onCreate();
        TraceDroid.init(this);
        app = this;
        task_running = TASKS.NONE;
        lectureList = null;
        AppRepository.INSTANCE.initialize(
                getApplicationContext(),
                Logging.Companion.get()
        );
    }

    private static long getMilliseconds(String timeZoneId, int year, int month, int day) {
        TimeZone zone = TimeZone.getTimeZone(timeZoneId);
        Calendar calendar = new GregorianCalendar(zone);
        int zeroBasedMonth = month - 1;
        calendar.set(year, zeroBasedMonth, day, 0, 0, 0);<commit_msg>Reorder modifiers to comply with Java language specification.<commit_after>package nerd.tuxmobil.fahrplan.congress;

import android.app.Application;
import android.support.v4.util.SparseArrayCompat;
import android.util.Log;

import org.ligi.tracedroid.TraceDroid;

import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TimeZone;

import info.metadude.android.eventfahrplan.commons.logging.Logging;
import nerd.tuxmobil.fahrplan.congress.models.DateInfos;
import nerd.tuxmobil.fahrplan.congress.models.Lecture;
import nerd.tuxmobil.fahrplan.congress.models.Meta;
import nerd.tuxmobil.fahrplan.congress.repositories.AppRepository;
import nerd.tuxmobil.fahrplan.congress.utils.ConferenceTimeFrame;

public class MyApp extends Application {

    public static Application app = null;

    public static final boolean DEBUG = false;

    public static List<Lecture> lectureList = null;

    public static Meta meta;

    public static DateInfos dateInfos = null;

    private static final long first_day_start = getMilliseconds("Europe/Paris",
            BuildConfig.SCHEDULE_FIRST_DAY_START_YEAR,
            BuildConfig.SCHEDULE_FIRST_DAY_START_MONTH,
            BuildConfig.SCHEDULE_FIRST_DAY_START_DAY);

    private static final long last_day_end = getMilliseconds("Europe/Paris",
            BuildConfig.SCHEDULE_LAST_DAY_END_YEAR,
            BuildConfig.SCHEDULE_LAST_DAY_END_MONTH,
            BuildConfig.SCHEDULE_LAST_DAY_END_DAY);

    public static final ConferenceTimeFrame conferenceTimeFrame =
            new ConferenceTimeFrame(first_day_start, last_day_end);

    public static int roomCount = 0;

    /**
     * maps room title to room index
     */
    public static final Map<String, Integer> roomsMap = new HashMap<>();

    /**
     * maps column index to room index
     */
    public static SparseArrayCompat<Integer> roomList = new SparseArrayCompat<>();

    public enum TASKS {
        NONE,
        FETCH,
        PARSE,
        FETCH_CANCELLED
    }

    // requestCodes für startActivityForResult
    public static final int ALARMLIST = 1;
    public static final int EVENTVIEW = 2;
    public static final int CHANGELOG = 3;
    public static final int STARRED = 4;
    public static final int SETTINGS = 5;

    public static TASKS task_running = TASKS.NONE;

    public static int lectureListDay = 0;

    @Override
    public void onCreate() {
        super.onCreate();
        TraceDroid.init(this);
        app = this;
        task_running = TASKS.NONE;
        lectureList = null;
        AppRepository.INSTANCE.initialize(
                getApplicationContext(),
                Logging.Companion.get()
        );
    }

    private static long getMilliseconds(String timeZoneId, int year, int month, int day) {
        TimeZone zone = TimeZone.getTimeZone(timeZoneId);
        Calendar calendar = new GregorianCalendar(zone);
        int zeroBasedMonth = month - 1;
        calendar.set(year, zeroBasedMonth, day, 0, 0, 0);
{'fraction_non_alphanumeric': 0.07660626029654036, 'fraction_numerical': 0.003953871499176277, 'mean_word_length': 3.195577055977885, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '5449664', 'n_tokens_mistral': 1857, 'n_tokens_neox': 1789, 'n_words': 434}