<commit_before>package org.score.samples.openstack.actions;

import com.hp.score.lang.ExecutionRuntimeServices;
import org.score.samples.utility.InputBindingUtility;
import org.score.samples.utility.InputBindingUtility.BindingConflict;
import org.springframework.core.DefaultParameterNameDiscoverer;
import org.springframework.core.ParameterNameDiscoverer;
import org.apache.log4j.Logger;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import java.util.List;
import java.util.Map;

/**
 * Date: 7/22/2014
 *
 * @author <NAME>
 */
public class OOActionRunner {
	private final static Logger logger = Logger.getLogger(OOActionRunner.class);
	public final static String ACTION_RUNTIME_EVENT_TYPE = "action_runtime_event";
	public final static String ACTION_EXCEPTION_EVENT_TYPE = "action_exception_event";
	private Class actionClass;
	private Method actionMethod;

	/**
	 * Wrapper method for running actions. A method is a valid action if it returns a Map<String, String>
	 * and its parameters are serializable.
	 *
	 * @param executionContext executionContext object populated by score
	 * @param executionRuntimeServices executionRuntimeServices object populated by score
	 * @param className full path of the actual action class
	 * @param methodName method name of the actual action
	 */
	public void run(
			Map<String, Serializable> executionContext,
			ExecutionRuntimeServices executionRuntimeServices,
			String className,
			String methodName,
			Boolean nullAllowed) {
		try {
			logger.info("run method invocation");

			Object[] actualParameters = extractMethodData(executionContext, executionRuntimeServices, className, methodName);

			nullAllowed = nullAllowed == null ? true : nullAllowed;
			verifyActionInputs(actualParameters, nullAllowed);
<commit_msg>refactored exception names<commit_after>package org.score.samples.openstack.actions;

import com.hp.score.lang.ExecutionRuntimeServices;
import org.score.samples.utility.InputBindingUtility;
import org.score.samples.utility.InputBindingUtility.BindingConflict;
import org.springframework.core.DefaultParameterNameDiscoverer;
import org.springframework.core.ParameterNameDiscoverer;
import org.apache.log4j.Logger;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import java.util.List;
import java.util.Map;

/**
 * Date: 7/22/2014
 *
 * @author <NAME>
 */
public class OOActionRunner {
	private final static Logger logger = Logger.getLogger(OOActionRunner.class);
	public final static String ACTION_RUNTIME_EVENT_TYPE = "ACTION_RUNTIME_EVENT";
	public final static String ACTION_EXCEPTION_EVENT_TYPE = "ACTION_EXCEPTION_EVENT";
	private Class actionClass;
	private Method actionMethod;

	/**
	 * Wrapper method for running actions. A method is a valid action if it returns a Map<String, String>
	 * and its parameters are serializable.
	 *
	 * @param executionContext executionContext object populated by score
	 * @param executionRuntimeServices executionRuntimeServices object populated by score
	 * @param className full path of the actual action class
	 * @param methodName method name of the actual action
	 */
	public void run(
			Map<String, Serializable> executionContext,
			ExecutionRuntimeServices executionRuntimeServices,
			String className,
			String methodName,
			Boolean nullAllowed) {
		try {
			logger.info("run method invocation");

			Object[] actualParameters = extractMethodData(executionContext, executionRuntimeServices, className, methodName);

			nullAllowed = nullAllowed == null ? true : nullAllowed;
			verifyActionInputs(actualParameters, nullAllowed);

{'fraction_non_alphanumeric': 0.07636068237205523, 'fraction_numerical': 0.004332520985648524, 'mean_word_length': 5.655855855855856, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2283108', 'n_tokens_mistral': 1026, 'n_tokens_neox': 958, 'n_words': 280}