<commit_before>package dns

import (
	"github.com/chzyer/adrs/utils"
	"gopkg.in/logex.v1"
)

type DNSHeader struct {
	ID         uint16
	QR         H_QRTYPE
	OpCode     H_OPCODE
	AA         H_AA
	underlying []byte
}

func NewHeader(b []byte) (h *DNSHeader, err error) {
	rr := utils.NewRecordReader(b)
	h = new(DNSHeader)
	h.ID, err = rr.ReadUint16()
	if err != nil {
		err = logex.Trace(err)
		return
	}
	option, err := rr.ReadUint16()
	if err != nil {
		err = logex.Trace(err)
		return
	}
	h.QR = H_QRTYPE(option >> 15)
	h.OpCode = H_OPCODE(uint8(option>>11) & uint8(15))
	h.AA = AA(uint8(option>>10) & 1)
	return
}
<commit_msg>fix build failure<commit_after>package dns

import (
	"github.com/chzyer/adrs/utils"
	"gopkg.in/logex.v1"
)

type DNSHeader struct {
	ID         uint16
	QR         HQRTYPE
	OpCode     HOPCODE
	AA         HAA
	underlying []byte
}

func NewHeader(b []byte) (h *DNSHeader, err error) {
	rr := utils.NewRecordReader(b)
	h = new(DNSHeader)
	h.ID, err = rr.ReadUint16()
	if err != nil {
		err = logex.Trace(err)
		return
	}
	option, err := rr.ReadUint16()
	if err != nil {
		err = logex.Trace(err)
		return
	}
	h.QR = H_QRTYPE(option >> 15)
	h.OpCode = H_OPCODE(uint8(option>>11) & uint8(15))
	h.AA = AA(uint8(option>>10) & 1)
	return
}

{'fraction_non_alphanumeric': 0.14591593973037273, 'fraction_numerical': 0.03013481363996828, 'mean_word_length': 3.0319488817891376, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '52252', 'n_tokens_mistral': 588, 'n_tokens_neox': 556, 'n_words': 116}