<commit_before>package main

import (
	"log"
	"sync"

	"github.com/miekg/dns"
)

type currentIPs struct {
	ipv4std []dns.RR
	ipv4non []dns.RR
	ipv6std []dns.RR
	ipv6non []dns.RR
	mtx     sync.RWMutex
}

// latest holds the slices of current ip addresses
var latest currentIPs

// getLatestaRR returns a pointer to the latest slice of current dns.RR type
// dns.A records to pass back to the remote client
func getv4stdRR() []dns.RR { return latest.ipv4std }
func getv4nonRR() []dns.RR { return latest.ipv4non }
func getv6stdRR() []dns.RR { return latest.ipv6std }
func getv6nonRR() []dns.RR { return latest.ipv6non }

// updateDNS updates the current slices of dns.RR so incoming requests get a
// fast answer
func updateDNS(s *Seeder) {

	var rr4std, rr4non, rr6std, rr6non []dns.RR

	s.mtx.RLock()

	// loop over each dns recprd type we need
	for t := range []int{DNSV4STD, DNSV4NON, DNSV6STD, DNSV6NON} {

		numRR := 0

		for k, tw := range s.theList {
			// when we reach max exit
			if numRR >= 15 {
				break<commit_msg>Bug fix<commit_after>package main

import (
	"log"
	"sync"

	"github.com/miekg/dns"
)

type currentIPs struct {
	ipv4std []dns.RR
	ipv4non []dns.RR
	ipv6std []dns.RR
	ipv6non []dns.RR
	mtx     sync.RWMutex
}

// latest holds the slices of current ip addresses
var latest currentIPs

// getLatestaRR returns a pointer to the latest slice of current dns.RR type
// dns.A records to pass back to the remote client
func getv4stdRR() []dns.RR { return latest.ipv4std }
func getv4nonRR() []dns.RR { return latest.ipv4non }
func getv6stdRR() []dns.RR { return latest.ipv6std }
func getv6nonRR() []dns.RR { return latest.ipv6non }

// updateDNS updates the current slices of dns.RR so incoming requests get a
// fast answer
func updateDNS(s *Seeder) {

	var rr4std, rr4non, rr6std, rr6non []dns.RR

	s.mtx.RLock()

	// loop over each dns recprd type we need
	for t := range []int{DNSV4STD, DNSV4NON, DNSV6STD, DNSV6NON} {

		numRR := 0

		for _, tw := range s.theList {
			// when we reach max exit
			if numRR >= 15 {
				break
{'fraction_non_alphanumeric': 0.10948191593352884, 'fraction_numerical': 0.022482893450635387, 'mean_word_length': 3.430735930735931, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5118217', 'n_tokens_mistral': 834, 'n_tokens_neox': 800, 'n_words': 251}