<commit_before>package com.appnexus.opensdk.mediatedviews;

import android.support.annotation.NonNull;
import android.util.Pair;

import com.appnexus.opensdk.TargetingParameters;
import com.appnexus.opensdk.utils.Clog;

import java.util.HashMap;

/**
 * Created by ramit on 01/02/16.
 */
public class RubiconSettings {

    @NonNull
    public static HashMap<String, String> getTargetingParams(TargetingParameters targetingParameters) {
        HashMap<String,String> mTargetingInfo = new HashMap<String, String>();
        mTargetingInfo.put("GENDER", targetingParameters.getGender().toString());
        mTargetingInfo.put("AGE", targetingParameters.getAge());
        if(targetingParameters.getCustomKeywords().size() > 0) {
            mTargetingInfo.put("NBA_KV", getCustomKeywords(targetingParameters));
        }
        return mTargetingInfo;
    }

    private static String getCustomKeywords(TargetingParameters targetingParameters){
        String customKeywordString = "";
        try {
            for (Pair<String, String> keyword : targetingParameters.getCustomKeywords()) {
                customKeywordString = customKeywordString + keyword.first + "=" + keyword.second + ",";
            }
            if (customKeywordString.trim().length() > 0) {
                customKeywordString = customKeywordString.substring(0, customKeywordString.length() - 1);
            }
        }catch (StringIndexOutOfBoundsException e){
            Clog.e(Clog.mediationLogTag, "Exception parsing the custom keywords: " + customKeywordString);
        }
        return customKeywordString;
    }
}
<commit_msg>Parsed ID json object to get id, pubId and serverName<commit_after>package com.appnexus.opensdk.mediatedviews;

import android.support.annotation.NonNull;
import android.util.Pair;

import com.appnexus.opensdk.TargetingParameters;
import com.appnexus.opensdk.utils.Clog;

import java.util.HashMap;

/**
 * Created by ramit on 01/02/16.
 */
public class RubiconSettings {

    @NonNull
    public static HashMap<String, String> getTargetingParams(TargetingParameters targetingParameters) {
        HashMap<String,String> mTargetingInfo = new HashMap<String, String>();

        mTargetingInfo.put("GENDER", targetingParameters.getGender().toString());
        if(targetingParameters.getAge() != null) {
            mTargetingInfo.put("AGE", targetingParameters.getAge());
        }
        if(targetingParameters.getCustomKeywords().size() > 0) {
            mTargetingInfo.put("NBA_KV", getCustomKeywords(targetingParameters));
        }
        return mTargetingInfo;
    }

    private static String getCustomKeywords(TargetingParameters targetingParameters){
        String customKeywordString = "";
        try {
            for (Pair<String, String> keyword : targetingParameters.getCustomKeywords()) {
                customKeywordString = customKeywordString + keyword.first + "=" + keyword.second + ",";
            }
            if (customKeywordString.trim().length() > 0) {
                customKeywordString = customKeywordString.substring(0, customKeywordString.length() - 1);
            }
        }catch (StringIndexOutOfBoundsException e){
            Clog.e(Clog.mediationLogTag, "Exception parsing the custom keywords: " + customKeywordString);
        }
        return customKeywordString;
    }
}

{'fraction_non_alphanumeric': 0.10510510510510511, 'fraction_numerical': 0.006006006006006006, 'mean_word_length': 3.27599486521181, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '1121124', 'n_tokens_mistral': 916, 'n_tokens_neox': 899, 'n_words': 167}