<commit_before>#include "condor_common.h"
#include <string.h>
#include <sys/errno.h>
#include "condor_event.h"
#include "user_log.h"

#define ESCAPE { errorNumber=(errno==EAGAIN) ? ULOG_NO_EVENT : ULOG_UNK_ERROR;\
					 return 0; }

ULogEvent *
instantiateEvent (ULogEventNumber event)
{
	switch (event)
	{
	  case ULOG_SUBMIT:
		return new SubmitEvent;

	  case ULOG_EXECUTE:
		return new ExecuteEvent;

	  case ULOG_EXECUTABLE_ERROR:
		return new ExecutableErrorEvent;

	  case ULOG_CHECKPOINTED:
		return new CheckpointedEvent;

	  case ULOG_JOB_EVICTED:
		return new JobEvictedEvent;

	  case ULOG_JOB_TERMINATED:
		return new JobTerminatedEvent;

	  case ULOG_IMAGE_SIZE:
		return new JobImageSizeEvent;

	  default:
		return 0;
	}

	return 0;
}


ULogEvent::
ULogEvent()
{
	struct tm *tm;
	time_t     clock;

	eventNumber = (ULogEventNumber) - 1;<commit_msg>Fixed the InstantiateEvent function to support ShadowExceptionEvent.<commit_after>#include "condor_common.h"
#include <string.h>
#include <sys/errno.h>
#include "condor_event.h"
#include "user_log.h"

#define ESCAPE { errorNumber=(errno==EAGAIN) ? ULOG_NO_EVENT : ULOG_UNK_ERROR;\
					 return 0; }

ULogEvent *
instantiateEvent (ULogEventNumber event)
{
	switch (event)
	{
	  case ULOG_SUBMIT:
		return new SubmitEvent;

	  case ULOG_EXECUTE:
		return new ExecuteEvent;

	  case ULOG_EXECUTABLE_ERROR:
		return new ExecutableErrorEvent;

	  case ULOG_CHECKPOINTED:
		return new CheckpointedEvent;

	  case ULOG_JOB_EVICTED:
		return new JobEvictedEvent;

	  case ULOG_JOB_TERMINATED:
		return new JobTerminatedEvent;

	  case ULOG_IMAGE_SIZE:
		return new JobImageSizeEvent;

	  case ULOG_SHADOW_EXCEPTION:
		return new ShadowExceptionEvent;

	  default:
		return 0;
	}

	return 0;
}


ULogEvent::
ULogEvent()
{
	struct tm *tm;
	time_t     clock;

	eventNumber = (ULogEventNumber) - 1;
{'fraction_non_alphanumeric': 0.08378378378378379, 'fraction_numerical': 0.004324324324324324, 'mean_word_length': 4.396501457725948, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2629028', 'n_tokens_mistral': 754, 'n_tokens_neox': 674, 'n_words': 156}