<commit_before>package goutility

import "fmt"

const (
	UnspecifiedCode        = -1
	UnspecifiedCodeContext = "goutility"
)

type ErrorCode int

type ErrorType struct {
	message string

	code        ErrorCode
	codeContext string
}

func MakeError(message string) ErrorType {
	return MakeErrorWithCode(message, UnspecifiedCode, UnspecifiedCodeContext)
}

func MakeErrorWithCode(message string, code ErrorCode, codeContext string) ErrorType {
	return ErrorType{
		message:     message,
		code:        code,
		codeContext: codeContext,
	}
}

func (this ErrorType) Error() string {
	return fmt.Sprintf("Context: %s, Code: %d, %s", this.Code(), this.CodeContext(), this.Message())
}

func (this ErrorType) Message() string {
	return this.message
}

func (this ErrorType) Code() ErrorCode {
	return this.code
}

func (this ErrorType) CodeContext() string {
	return this.codeContext
}
<commit_msg>fixed parameters to match swapped order<commit_after>package goutility

import "fmt"

const (
	UnspecifiedCode        = -1
	UnspecifiedCodeContext = "goutility"
)

type ErrorCode int

type ErrorType struct {
	message string

	code        ErrorCode
	codeContext string
}

func MakeError(message string) ErrorType {
	return MakeErrorWithCode(message, UnspecifiedCode, UnspecifiedCodeContext)
}

func MakeErrorWithCode(message string, code ErrorCode, codeContext string) ErrorType {
	return ErrorType{
		message:     message,
		code:        code,
		codeContext: codeContext,
	}
}

func (this ErrorType) Error() string {
	return fmt.Sprintf("Context: %s, Code: %d, %s", this.CodeContext(), this.Code(), this.Message())
}

func (this ErrorType) Message() string {
	return this.message
}

func (this ErrorType) Code() ErrorCode {
	return this.code
}

func (this ErrorType) CodeContext() string {
	return this.codeContext
}

{'fraction_non_alphanumeric': 0.09623893805309734, 'fraction_numerical': 0.0011061946902654867, 'mean_word_length': 4.515243902439025, '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': '6353887', 'n_tokens_mistral': 571, 'n_tokens_neox': 558, 'n_words': 165}