<commit_before>package com.thebluealliance.androidclient.gcm.notifications;

import android.content.Context;

import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.thebluealliance.androidclient.R;
import com.thebluealliance.androidclient.helpers.JSONHelper;

public class EventDownNotification extends GenericNotification {

    public EventDownNotification(Context c, String messageData) {
        super(c, NotificationTypes.EVENT_DOWN, messageData);
    }

    @Override
    public void parseMessageData() throws JsonParseException {
        JsonObject jsonData = JSONHelper.getasJsonObject(messageData);
        if (!jsonData.has("event_key")) {
            throw new JsonParseException("Notification data does not contain 'event_key'");
        }
        String eventKey = jsonData.get("event_name").getAsString();
        title = context.getString(R.string.notification_event_down);
        message = context.getString(R.string.notification_event_down_content, eventKey);
    }
}
<commit_msg>EventDown notification doesn't require EventName<commit_after>package com.thebluealliance.androidclient.gcm.notifications;

import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;

import com.thebluealliance.androidclient.R;
import com.thebluealliance.androidclient.helpers.JSONHelper;

import android.content.Context;

public class EventDownNotification extends GenericNotification {

    public EventDownNotification(Context c, String messageData) {
        super(c, NotificationTypes.EVENT_DOWN, messageData);
    }

    @Override
    public void parseMessageData() throws JsonParseException {
        JsonObject jsonData = JSONHelper.getasJsonObject(messageData);
        if (!jsonData.has("event_key")) {
            throw new JsonParseException("Notification data does not contain 'event_key'");
        }
        String eventName = jsonData.has("event_name")
                ? jsonData.get("event_name").getAsString()
                : jsonData.get("event_key").getAsString();
        title = context.getString(R.string.notification_event_down);
        message = context.getString(R.string.notification_event_down_content, eventName);
    }
}

{'fraction_non_alphanumeric': 0.09160997732426304, 'fraction_numerical': 0.0, 'mean_word_length': 4.26491646778043, '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': '3146433', 'n_tokens_mistral': 592, 'n_tokens_neox': 584, 'n_words': 110}