<commit_before>package main

import (
	"archive/tar"
	"bufio"
	"compress/gzip"
	"fmt"
	"io"
	"net/http"
	"os"
	"regexp"
	"sort"
	"strconv"
	"strings"
)

const (
	OLD_SRC_URL = "https://go.googlecode.com/files/"
	NEW_SRC_URL = "https://storage.googleapis.com/golang/"
	OLD_SRC_DIR = "src/pkg"
	NEW_SRC_DIR = "src"
	// expects go version, source file and line number
	SOURCE_URL       = "https://github.com/golang/go/blob/go%s/%s#L%s"
	INTERFACE_REGEXP = `^\s*type\s+([A-Z]\w*)\s+interface\s*{`
)

type Interface struct {
	Name    string
	Package string
}

type Location struct {
	SourceFile string
	LineNumber string
	Link       string
}

type InterfaceList map[Interface]map[string]Location

func NewInterfaceList() InterfaceList {
	return make(map[Interface]map[string]Location)
}

func (il InterfaceList) AddInterface(name, pkg, version, sourceFile, lineNumber string) {
	interf := Interface{<commit_msg>Updated URL to download old archives<commit_after>package main

import (
	"archive/tar"
	"bufio"
	"compress/gzip"
	"fmt"
	"io"
	"net/http"
	"os"
	"regexp"
	"sort"
	"strconv"
	"strings"
)

const (
	OLD_SRC_URL = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/go/"
	NEW_SRC_URL = "https://storage.googleapis.com/golang/"
	OLD_SRC_DIR = "src/pkg"
	NEW_SRC_DIR = "src"
	// expects go version, source file and line number
	SOURCE_URL       = "https://github.com/golang/go/blob/go%s/%s#L%s"
	INTERFACE_REGEXP = `^\s*type\s+([A-Z]\w*)\s+interface\s*{`
)

type Interface struct {
	Name    string
	Package string
}

type Location struct {
	SourceFile string
	LineNumber string
	Link       string
}

type InterfaceList map[Interface]map[string]Location

func NewInterfaceList() InterfaceList {
	return make(map[Interface]map[string]Location)
}

func (il InterfaceList) AddInterface(name, pkg, version, sourceFile, lineNumber string) {
	interf := Interface{
{'fraction_non_alphanumeric': 0.13997879109225875, 'fraction_numerical': 0.0005302226935312832, 'mean_word_length': 4.422413793103448, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '297191', 'n_tokens_mistral': 719, 'n_tokens_neox': 694, 'n_words': 144}