<commit_before>package com.pixable.pixalytics.core;

import java.util.HashMap;
import java.util.Map;

/**
 * An event that is to be tracked, that has a name and a set of properties (key-value pairs).
 */
public class Event extends Trackable {

    /**
     * Use the {@link Event.Builder}.
     *
     * @param eventName
     * @param properties
     */
    private Event(String eventName, Map<String, Object> properties) {
        super(eventName, properties, Type.EVENT);
    }

    public static class Builder {
        private String name = null;
        private final Map<String, Object> properties = new HashMap<>();

        /**
         * Sets the name of the Event object. This parameter is compulsory.
         */
        public Builder name(String name) {
            this.name = name;
            return this;
        }

        /**
         * Adds a property. Add as many properties (key-value pairs) as you wish.
         */
        public Builder property(String name, String value) {
            properties.put(name, value);
            return this;
        }

        /**
         * Adds a bunch of properties
         */
        public Builder properties(Map<String, String> properties) {
            this.properties.putAll(properties);
            return this;
        }

        public Event build() {
            if (name == null) {
                throw new IllegalStateException("No name was provided for this event");
            } else {
                return new Event(name, properties);
            }
        }
    }
}<commit_msg>Set Properties in Event also object<commit_after>package com.pixable.pixalytics.core;

import java.util.HashMap;
import java.util.Map;

/**
 * An event that is to be tracked, that has a name and a set of properties (key-value pairs).
 */
public class Event extends Trackable {

    /**
     * Use the {@link Event.Builder}.
     *
     * @param eventName
     * @param properties
     */
    private Event(String eventName, Map<String, Object> properties) {
        super(eventName, properties, Type.EVENT);
    }

    public static class Builder {
        private String name = null;
        private final Map<String, Object> properties = new HashMap<>();

        /**
         * Sets the name of the Event object. This parameter is compulsory.
         */
        public Builder name(String name) {
            this.name = name;
            return this;
        }

        /**
         * Adds a property. Add as many properties (key-value pairs) as you wish.
         */
        public Builder property(String name, String value) {
            properties.put(name, value);
            return this;
        }

        /**
         * Adds a bunch of properties
         */
        public Builder properties(Map<String, Object> properties) {
            this.properties.putAll(properties);
            return this;
        }

        public Event build() {
            if (name == null) {
                throw new IllegalStateException("No name was provided for this event");
            } else {
                return new Event(name, properties);
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.09369024856596558, 'fraction_numerical': 0.0, 'mean_word_length': 1.758347978910369, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '258884', 'n_tokens_mistral': 800, 'n_tokens_neox': 778, 'n_words': 275}