<commit_before>/*
 * Copyright (c) 2006 Digital Bazaar, Inc.  All rights reserved.
 */
package com.db.common;

/**
 * A generic event object for passing event data.
 * 
 * @author <NAME>
 */
public class EventObject
{
   /**
    * The name of this event.
    */
   protected String mName;
   
   /**
    * The data bundled with this event.
    */
   protected Object mData;
   
   /**
    * Creates a new EventObject with no specified name and null data.
    */
   public EventObject()
   {
      this("", null);
   }

   /**
    * Creates a new EventObject with the given name and null data.
    * 
    * @param name the name of this event.
    */
   public EventObject(String name)
   {
      this(name, null);
   }

   /**
    * Creates a new EventObject with the given name and data.
    * 
    * @param name the name of this event.
    * @param data the data for this event.
    */
   public EventObject(String name, Object data)
   {
      setName(name);
      setData(data);
   }
   
   /**
    * Sets the name of this event.
    * 
    * @param name the name of this event.
    */
   public void setName(String name)
   {
      mName = name;
   }
   
   /**
    * Gets the name of this event.
    * 
    * @return the name of this event.
    */
   public String getName()
   {
      return mName;
   }
   
   /**
    * Sets the data for this event.
    * 
    * @param data the data for this event.
    */
   public void setData(Object data)
   {
      mData = data;
   }
   
   /**
    * Gets the data for this event.
    * 
    * @return the data for this event.
    */
   public Object getData()
   {
      return mData;
   }
}
<commit_msg>Changed data storage to a hashmap in EventObject.<commit_after>/*
 * Copyright (c) 2006 Digital Bazaar, Inc.  All rights reserved.
 */
package com.db.common;

import java.util.HashMap;

/**
 * A generic event object for passing event data.
 * 
 * @author <NAME>
 */
public class EventObject
{
   /**
    * The name of this event.
    */
   protected String mName;
   
   /**
    * A map of data bundled with this event.
    */
   protected HashMap mDataMap;
   
   /**
    * Creates a new EventObject with no specified name.
    */
   public EventObject()
   {
      this("");
   }

   /**
    * Creates a new EventObject with the given name.
    * 
    * @param name the name of this event.
    */
   public EventObject(String name)
   {
      setName(name);
      mDataMap = new HashMap();
   }

   /**
    * Sets the name of this event.
    * 
    * @param name the name of this event.
    */
   public void setName(String name)
   {
      mName = name;
   }
   
   /**
    * Gets the name of this event.
    * 
    * @return the name of this event.
    */
   public String getName()
   {
      return mName;
   }
   
   /**
    * Sets a key-value pair of data for this event.
    * 
    * @param key the key for the data for this event.
    * @param value the value for the data for this event.
    */
   public void setData(Object key, Object value)
   {
      mDataMap.put(key, value);
   }
   
   /**
    * Gets a data value for a key for this event.
    * 
    * @param key the key for the data for this event.
    * @return the data value for the passed key for this event.
    */
   public Object getData(Object key)
   {
      return mDataMap.get(key);
   }
}

{'fraction_non_alphanumeric': 0.10264900662251655, 'fraction_numerical': 0.002408187838651415, 'mean_word_length': 1.8232795242141036, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3622817', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1037, 'n_words': 379}