<commit_before>package chef

import (
	"encoding/json"
	"fmt"
	"strings"
)

// chef.Cookbook defines the relevant parameters of a Chef cookbook. This
// includes the RESTful URL of a cookbook and a slice of all of the cookbooks
// versions. The versions each have two attributes: Url, which represents the
// RESTful URL of the cookbook version and Version, which represents the version
// number (identifier) of the cookbook version
type Cookbook struct {
	Url      string `json:"url"`
	Versions []struct {
		Url     string `json:"url"`
		Version string `json:"version"`
	} `json:"versions"`
}

// chef.CookbookVersion defines the relevant parameters of a specific Chef
// cookbook version. This includes, but is not limited to, information about
// recipes, files, etc, various pieces of metadata about the cookbook at that
// point in time, such as the name of the cookbook, the description, the
// license, etc.
type CookbookVersion struct {
	Recipes []struct {
		CookbookItem
	} `json:"recipes"`
	Files []struct {
		CookbookItem
	} `json:"files"`
	RootFiles []struct {
		CookbookItem
	} `json:"root_file"`
	Metadata struct {
		Name            string            `json:"name"`
		Description     string            `json:"description"`
		LongDescription string            `json:"long_description"`
		Maintainer      string            `json:"maintainer"`
		MaintainerEmail string            `json:"maintainer_email"`
		License         string            `json:"license"`
		Providing       map[string]string `json:"providing"`
		Dependencies    map[string]string `json:dependencies`
	} `json:"metadata"`
	Name      string `json:"cookbook_name"`
	Version   string `json:"version"`<commit_msg>add all cookbook items to CookbookVersion<commit_after>package chef

import (
	"encoding/json"
	"fmt"
	"strings"
)

// chef.Cookbook defines the relevant parameters of a Chef cookbook. This
// includes the RESTful URL of a cookbook and a slice of all of the cookbooks
// versions. The versions each have two attributes: Url, which represents the
// RESTful URL of the cookbook version and Version, which represents the version
// number (identifier) of the cookbook version
type Cookbook struct {
	Url      string `json:"url"`
	Versions []struct {
		Url     string `json:"url"`
		Version string `json:"version"`
	} `json:"versions"`
}

// chef.CookbookVersion defines the relevant parameters of a specific Chef
// cookbook version. This includes, but is not limited to, information about
// recipes, files, etc, various pieces of metadata about the cookbook at that
// point in time, such as the name of the cookbook, the description, the
// license, etc.
type CookbookVersion struct {
	Files []struct {
		CookbookItem
	} `json:"files"`
	Definitions []struct {
		CookbookItem
	} `json: "definitions"`
	Libraries []struct {
		CookbookItem
	} `json: "libraries"`
	Attributes []struct {
		CookbookItem
	} `json:"attributes"`
	Recipes []struct {
		CookbookItem
	} `json:"recipes"`
	Providers []struct {
		CookbookItem
	} `json: "providers"`
	Resources []struct {
		CookbookItem
	} `json: "resources"`
	Templates []struct {
		CookbookItem
	} `json: "templates"`
	RootFiles []struct {
		CookbookItem
	} `json:"root_file"`
	Metadata struct {
		Name            string            `json:"name"`
		Description     string            `json:"description"`
		LongDescription string            `json:"long_description"`
		Maintainer      string            `json:"maintainer"`
		MaintainerEmail string            `json:"maintainer_email"`
		License         string            `json:"license"`
		Providing       map[string]string `json:"providing"`
		Dependencies    map[string]string `json:dependencies`
	} `json:"metadata"`
	Name      string `json:"cookbook_name"`
	Version   string `json:"version"`
{'fraction_non_alphanumeric': 0.10182975338106603, 'fraction_numerical': 0.0, 'mean_word_length': 3.485136741973841, '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': '6144576', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1043, 'n_words': 373}