<commit_before>package couk.doridori.android.lib.util;

import android.content.Intent;

/**
 * @author <NAME>
 *         Date: 29/11/2012
 */
public class Verifier
{
    public static void throwIfAnyNull(Object... objects) throws NullPointerException
    {
        for (int i = 0; i < objects.length; i++)
        {
            if (null == objects[i])
            {
                String errorMsg = "Arg " + i + " == null!!";
                XLog.e(errorMsg);
                throw new NullPointerException(errorMsg);
            }
        }
    }

    public static boolean anyIntentKeysMissing(Intent intent, String... keys)
    {
        boolean anyMissing = false;

        for (String key : keys)
        {
            if (!intent.getExtras().containsKey(key))
            {
                anyMissing = true;
                XLog.w("Intent extra missing with key : "+key);
            }
        }

        return anyMissing;
    }
}<commit_msg>verifier additions -throws with data<commit_after>package couk.doridori.android.lib.util;

import android.content.Intent;

/**
 * @author <NAME>
 *         Date: 29/11/2012
 */
public class Verifier
{
    public static void throwIfAnyNull(Object... objects) throws NullPointerException
    {
        for (int i = 0; i < objects.length; i++)
        {
            if (null == objects[i])
            {
                String errorMsg = "Arg " + i + " == null!!";
                XLog.e(errorMsg);
                throw new NullPointerException(errorMsg);
            }
        }
    }

    public static void throwIfIntentKeysMissing(Intent intent, String... keys)
    {
        StringBuilder builder = new StringBuilder();
        boolean anyMissing = false;

        for (String key : keys)
        {
            if (!intent.getExtras().containsKey(key))
            {
                anyMissing = true;
                XLog.w("Intent extra missing with key : "+key);
                builder.append(key+" ,");
            }
        }

        if(anyMissing)
            throw new RuntimeException("Intent key(s) missing : "+builder.toString());
    }
}
{'fraction_non_alphanumeric': 0.1150190114068441, 'fraction_numerical': 0.008555133079847909, 'mean_word_length': 1.641154328732748, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '3635034', 'n_tokens_mistral': 599, 'n_tokens_neox': 565, 'n_words': 140}