<commit_before>package events.event;

import gestures.Gesture;

import java.util.EventObject;
import java.util.List;

import coordinates.Coordinate;
import coordinates.CoordinateSeries;

import model.FiniteStateMachine;

/**
 * A class to describe an event generated when a FiniteStateMachine has reached an accepting state
 * @author <NAME>
 *
 */
public class AcceptingStateEvent extends EventObject {

	/**
	 * Automatically generated serialVersionUID
	 */
	private static final long serialVersionUID = -3796844397739483225L;
	
	protected Gesture gesture;
	protected CoordinateSeries stateCoordinates;

	/**
	 * Create a new instance of the AcceptingStateEvent object
	 * @param source The source of the event
	 */
	public AcceptingStateEvent(FiniteStateMachine source) {
		super(source);
		gesture = source.getGesture();
		stateCoordinates = new CoordinateSeries(source.getStateCoordinates());
	}
	
	/**
	 * Get the gesture associated with the event
	 * @return The gesture causing the event
	 */
	public Gesture getGesture() {
		return gesture;
	}
	
	/**
	 * Get the list of state coordinates
	 * @return the List of Coordinates
	 */
	public CoordinateSeries getStateCoordinates() {
		return stateCoordinates;
	}
}<commit_msg>AcceptingStateEvent now stores its creation time<commit_after>package events.event;

import gestures.Gesture;

import java.util.EventObject;
import java.util.List;

import coordinates.Coordinate;
import coordinates.CoordinateSeries;

import model.FiniteStateMachine;

/**
 * A class to describe an event generated when a FiniteStateMachine has reached an accepting state
 * @author <NAME>
 *
 */
public class AcceptingStateEvent extends EventObject {

	/**
	 * Automatically generated serialVersionUID
	 */
	private static final long serialVersionUID = -3796844397739483225L;
	
	protected Gesture gesture;
	protected CoordinateSeries stateCoordinates;
	
	protected long time = -1;

	/**
	 * Create a new instance of the AcceptingStateEvent object
	 * @param source The source of the event
	 */
	public AcceptingStateEvent(FiniteStateMachine source) {
		super(source);
		gesture = source.getGesture();
		
		List<Coordinate> coordinates = source.getStateCoordinates();
		stateCoordinates = new CoordinateSeries(coordinates);
		time = coordinates.get(coordinates.size()-1).getTime();
	}
	
	/**
	 * Get the gesture associated with the event
	 * @return The gesture causing the event
	 */
	public Gesture getGesture() {
		return gesture;
	}
	
	/**
	 * Get the list of state coordinates
	 * @return the List of Coordinates
	 */
	public CoordinateSeries getStateCoordinates() {
		return stateCoordinates;
	}
	
	/**
	 * Get the time at which the event was created at
	 * @return
	 */
	public long getTime() {
		return time;
	}
}
{'fraction_non_alphanumeric': 0.08142493638676845, 'fraction_numerical': 0.014540167211922937, 'mean_word_length': 4.333333333333333, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '4934426', 'n_tokens_mistral': 835, 'n_tokens_neox': 744, 'n_words': 248}