<commit_before>package main

import (
	"io/ioutil"
	"log"
	"os"
	"strings"
	"syscall"
	"time"
)

func processEvent() {
	restartProc()
}

func runKqueue() {
	fd, err := syscall.Kqueue()
	evTrackList := make([]syscall.Kevent_t, 1024)
	if err != nil {
		log.Fatal("error initializing Kqueue: ", err)
		return
	}

	addFilesToKqueue(evTrackList, path)

	// configure timeout
	timeout := syscall.Timespec{
		Sec:  0,
		Nsec: 0,
	}

	// wait for events
	for {
		// create kevent
		events := make([]syscall.Kevent_t, 10)
		_, err := syscall.Kevent(fd, evTrackList, events, &timeout)
		if err != nil {
			log.Println("Error creating kevent")
		}
		// check if there was an event and process it<commit_msg>removed unused packages added printing stack trace errors<commit_after>package main

import (
	"io/ioutil"
	"log"
	"runtime/debug"
	"strings"
	"syscall"
)

func processEvent() {
	restartProc()
}

func runKqueue() {
	fd, err := syscall.Kqueue()
	evTrackList := make([]syscall.Kevent_t, 1024)
	if err != nil {
		log.Fatal("error initializing Kqueue: ", err)
		return
	}

	addFilesToKqueue(evTrackList, path)

	// configure timeout
	timeout := syscall.Timespec{
		Sec:  0,
		Nsec: 0,
	}

	// wait for events
	for {
		// create kevent
		events := make([]syscall.Kevent_t, 10)
		_, err := syscall.Kevent(fd, evTrackList, events, &timeout)
		if err != nil {
			debug.PrintStack()
			log.Fatal("Error creating kevent: ", err)
		}
		// check if there was an event and process it
{'fraction_non_alphanumeric': 0.13915416098226466, 'fraction_numerical': 0.010914051841746248, 'mean_word_length': 3.584375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '467299', 'n_tokens_mistral': 607, 'n_tokens_neox': 534, 'n_words': 141}