<commit_before>package program

import (
    "strconv"
    "strings"
)

// Imports returns all of the Go imports for this program.
func (p *Program) Imports() []string {
    imports := p.imports

    // Add "last-minute" import
    add_import := func(imp string) {
        imp = strconv.Quote(imp)
        for _, i := range imports {
            if i == imp {
                return
            }
        }

        imports = append(imports, imp)
    }

    // Imports packages for unions if at least an union is defined
    for _, t := range p.typesAlreadyDefined {
        _, ok := p.Unions[t]
        if ok {
            add_import("refect")
            add_import("unsafe")
            break<commit_msg>Change import "refect" to "reflect"<commit_after>package program

import (
    "strconv"
    "strings"
)

// Imports returns all of the Go imports for this program.
func (p *Program) Imports() []string {
    imports := p.imports

    // Add "last-minute" import
    add_import := func(imp string) {
        imp = strconv.Quote(imp)
        for _, i := range imports {
            if i == imp {
                return
            }
        }

        imports = append(imports, imp)
    }

    // Imports packages for unions if at least an union is defined
    for _, t := range p.typesAlreadyDefined {
        _, ok := p.Unions[t]
        if ok {
            add_import("reflect")
            add_import("unsafe")
            break
{'fraction_non_alphanumeric': 0.10438413361169102, 'fraction_numerical': 0.0, 'mean_word_length': 1.739047619047619, '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': '4180505', 'n_tokens_mistral': 427, 'n_tokens_neox': 414, 'n_words': 129}