<commit_before>package com.croconaut.ratemebuddy.utils;

import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.provider.ContactsContract;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
import android.view.View;
import android.view.inputmethod.InputMethodManager;

import com.croconaut.ratemebuddy.R;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.UUID;

public class CommonUtils {
    private static final String TAG = CommonUtils.class.getName();

    //extras for activities
    public static final String EXTRA_TARGET_CROCO_ID = "targetCrocoID";
    public static final String EXTRA_CLEAR_NOTIF_MESS_PROFILES = "extraCleanMessProfiles";
    public static final String HOPS_JSON_ARRAY = "HOPS_JSON_ARRAY";
    public static final String DIRECTORY_WIFON = "wifon";
    public static final String DIRECTORY_EXPORT_HOPS = "hops";
    public static final String FILE_NAME_PROFILE = "profile.wifon";
    public static final String PROFILE_DIRECTORY_MYSELF = "wifon/myself";

    public static final String CEO_CROCO_ID = "66:bc:0c:51:4a:0a";

    private static final String PREF_UNIQUE_ID = "PREF_UNIQUE_ID";

    public synchronized static String getMyId(Context context) {
        String uniqueID;
        SharedPreferences sharedPrefs = context.getSharedPreferences(
                PREF_UNIQUE_ID, Context.MODE_PRIVATE);
        uniqueID = sharedPrefs.getString(PREF_UNIQUE_ID, null);
        if (uniqueID == null) {
            uniqueID = UUID.randomUUID().toString();
            SharedPreferences.Editor editor = sharedPrefs.edit();
            editor.putString(PREF_UNIQUE_ID, uniqueID);
            editor.apply();
        }

        return uniqueID;<commit_msg>Make the "authors croco id" generic. This is all what needs to be done on the client side.<commit_after>package com.croconaut.ratemebuddy.utils;

import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.provider.ContactsContract;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
import android.view.View;
import android.view.inputmethod.InputMethodManager;

import com.croconaut.ratemebuddy.R;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.UUID;

public class CommonUtils {
    private static final String TAG = CommonUtils.class.getName();

    //extras for activities
    public static final String EXTRA_TARGET_CROCO_ID = "targetCrocoID";
    public static final String EXTRA_CLEAR_NOTIF_MESS_PROFILES = "extraCleanMessProfiles";
    public static final String HOPS_JSON_ARRAY = "HOPS_JSON_ARRAY";
    public static final String DIRECTORY_WIFON = "wifon";
    public static final String DIRECTORY_EXPORT_HOPS = "hops";
    public static final String FILE_NAME_PROFILE = "profile.wifon";
    public static final String PROFILE_DIRECTORY_MYSELF = "wifon/myself";

    public static final String CEO_CROCO_ID = "00:00:00:00:00:00";

    private static final String PREF_UNIQUE_ID = "PREF_UNIQUE_ID";

    public synchronized static String getMyId(Context context) {
        String uniqueID;
        SharedPreferences sharedPrefs = context.getSharedPreferences(
                PREF_UNIQUE_ID, Context.MODE_PRIVATE);
        uniqueID = sharedPrefs.getString(PREF_UNIQUE_ID, null);
        if (uniqueID == null) {
            uniqueID = UUID.randomUUID().toString();
            SharedPreferences.Editor editor = sharedPrefs.edit();
            editor.putString(PREF_UNIQUE_ID, uniqueID);
            editor.apply();
        }

        return uniqueID;
{'fraction_non_alphanumeric': 0.08471377647305514, 'fraction_numerical': 0.00398406374501992, 'mean_word_length': 4.470183486238532, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '828896', 'n_tokens_mistral': 1426, 'n_tokens_neox': 1387, 'n_words': 330}