<commit_before>package st.alr.mqttitude;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;


import st.alr.mqttitude.model.Contact;
import st.alr.mqttitude.support.Defaults;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.ApplicationInfo;
import android.os.BatteryManager;
import android.provider.Settings.Secure;

import com.bugsnag.android.Bugsnag;


public class App extends Application {
    private static App instance;
    private SimpleDateFormat dateFormater;
    private Map<String,Contact> contacts;


    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        this.dateFormater = new SimpleDateFormat("HH:mm:ss", getResources().getConfiguration().locale);
        this.contacts = new HashMap<String,Contact>();

        Bugsnag.register(this, Defaults.BUGSNAG_API_KEY);
        Bugsnag.setNotifyReleaseStages("production", "testing");
        

    }
    

    public static Context getContext() {
        return instance;
    }
    public static Map<String, Contact> getContacts() {
        return instance.contacts;
    }

    public static String formatDate(Date d) {
        return instance.dateFormater.format(d);
    }
    
    public static boolean isDebugBuild() {
        return 0 != (instance.getApplicationInfo().flags &= ApplicationInfo.FLAG_DEBUGGABLE);
    }
    
    public static String getAndroidId() {
        return Secure.getString(instance.getContentResolver(), Secure.ANDROID_ID);
    }
<commit_msg>Fixed #262<commit_after>package st.alr.mqttitude;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;


import st.alr.mqttitude.model.Contact;
import st.alr.mqttitude.support.Defaults;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.ApplicationInfo;
import android.os.BatteryManager;
import android.provider.Settings.Secure;

import com.bugsnag.android.Bugsnag;


public class App extends Application {
    private static App instance;
    private SimpleDateFormat dateFormater;
    private Map<String,Contact> contacts;


    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        this.dateFormater = new SimpleDateFormat("yy/MM/d HH:mm:ss", getResources().getConfiguration().locale);
        this.contacts = new HashMap<String,Contact>();

        Bugsnag.register(this, Defaults.BUGSNAG_API_KEY);
        Bugsnag.setNotifyReleaseStages("production", "testing");
        

    }
    

    public static Context getContext() {
        return instance;
    }
    public static Map<String, Contact> getContacts() {
        return instance.contacts;
    }

    public static String formatDate(Date d) {
        return instance.dateFormater.format(d);
    }
    
    public static boolean isDebugBuild() {
        return 0 != (instance.getApplicationInfo().flags &= ApplicationInfo.FLAG_DEBUGGABLE);
    }
    
    public static String getAndroidId() {
        return Secure.getString(instance.getContentResolver(), Secure.ANDROID_ID);
    }

{'fraction_non_alphanumeric': 0.10063849194283978, 'fraction_numerical': 0.0015202189115232593, 'mean_word_length': 3.563106796116505, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '1980990', 'n_tokens_mistral': 951, 'n_tokens_neox': 925, 'n_words': 198}