<commit_before>/*
 * Copyright 2015-2016 the original author or authors.
 *
 * All rights reserved. This program and the accompanying materials are
 * made available under the terms of the Eclipse Public License v1.0 which
 * accompanies this distribution and is available at
 *
 * http://www.eclipse.org/legal/epl-v10.html
 */

package org.junit.gen5.engine;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * {@link EngineExecutionListener} that records all events and makes them
 * available to tests.
 *
 * @see ExecutionEvent
 */
public class ExecutionEventRecordingEngineExecutionListener implements EngineExecutionListener {

	public final List<ExecutionEvent> executionEvents = new CopyOnWriteArrayList<>();

	@Override
	public void dynamicTestRegistered(TestDescriptor testDescriptor) {
		addEvent(ExecutionEvent.dynamicTestRegistered(testDescriptor));
	}

	@Override
	public void executionSkipped(TestDescriptor testDescriptor, String reason) {
		addEvent(ExecutionEvent.executionSkipped(testDescriptor, reason));
	}

	@Override
	public void executionStarted(TestDescriptor testDescriptor) {
		addEvent(ExecutionEvent.executionStarted(testDescriptor));
	}

	@Override
	public void executionFinished(TestDescriptor testDescriptor, TestExecutionResult result) {
		addEvent(ExecutionEvent.executionFinished(testDescriptor, result));
	}

	public List<ExecutionEvent> getExecutionEvents() {
		return executionEvents;
	}

	private void addEvent(ExecutionEvent dynamicTestRegistered) {
		executionEvents.add(dynamicTestRegistered);
	}

}<commit_msg>Minor rename<commit_after>/*
 * Copyright 2015-2016 the original author or authors.
 *
 * All rights reserved. This program and the accompanying materials are
 * made available under the terms of the Eclipse Public License v1.0 which
 * accompanies this distribution and is available at
 *
 * http://www.eclipse.org/legal/epl-v10.html
 */

package org.junit.gen5.engine;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * {@link EngineExecutionListener} that records all events and makes them
 * available to tests.
 *
 * @see ExecutionEvent
 */
public class ExecutionEventRecordingEngineExecutionListener implements EngineExecutionListener {

	public final List<ExecutionEvent> executionEvents = new CopyOnWriteArrayList<>();

	@Override
	public void dynamicTestRegistered(TestDescriptor testDescriptor) {
		addEvent(ExecutionEvent.dynamicTestRegistered(testDescriptor));
	}

	@Override
	public void executionSkipped(TestDescriptor testDescriptor, String reason) {
		addEvent(ExecutionEvent.executionSkipped(testDescriptor, reason));
	}

	@Override
	public void executionStarted(TestDescriptor testDescriptor) {
		addEvent(ExecutionEvent.executionStarted(testDescriptor));
	}

	@Override
	public void executionFinished(TestDescriptor testDescriptor, TestExecutionResult result) {
		addEvent(ExecutionEvent.executionFinished(testDescriptor, result));
	}

	public List<ExecutionEvent> getExecutionEvents() {
		return executionEvents;
	}

	private void addEvent(ExecutionEvent event) {
		executionEvents.add(event);
	}

}
{'fraction_non_alphanumeric': 0.07979572294924991, 'fraction_numerical': 0.008298755186721992, 'mean_word_length': 6.090497737556561, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7595217', 'n_tokens_mistral': 854, 'n_tokens_neox': 801, 'n_words': 219}