<commit_before>package main

import (
	"bufio"
	"io"
	"strings"
)

type ServerProperties map[string]string

var defaultSettings = ServerProperties{
	"allow-flight":                 "false",
	"allow-nether":                 "true",
	"announce-player-achievements": "true",
	"difficulty":                   "1",
	"enable-query":                 "false",
	"enable-rcon":                  "false",
	"enable-command-block":         "false",
	"force-gamemode":               "false",
	"gamemode":                     "0",
	"generate-structures":          "true",
	"generator-settings":           "",
	"hardcore":                     "false",
	"level-name":                   "world",
	"level-seed":                   "",
	"level-type":                   "DEFAULT",
	"max-build-height":             "256",
	"max-players":                  "20",
	"max-tick-time":                "60000",
	"max-world-size":               "29999984",
	"motd":                         "A MineWebGen Server",
	"network-compression-threshold": "256",
	"online-mode":                   "false",
	"op-permission-level":           "4",
	"player-idle-timeout":           "0",
	"pvp":                  "true",
	"query.port":           "25565",
	"rcon.password":        "",
	"rcon.port":            "25575",
	"resource-pack":        "",
	"resource-pack-hash":   "",
	"server-ip":            "",
	"server-port":          "25565",
	"snooper-enabled":      "false",
	"spawn-animals":        "true",
	"spawn-monsters":       "true",
	"spawn-npcs":           "true",
	"spawn-protection":     "16",
	"use-native-transport": "true",
	"view-distance":        "10",
	"white-list":           "false",
	"verify-names":         "true",
	"admin-slot":           "false",
	"public":               "true",
	"server-name":          "",
	"max-connections":      "3",
	"grow-trees":           "true",
}

func DefaultSettings() ServerProperties {
	m := make(ServerProperties)
	for k, v := range defaultSettings {
		m[k] = v
	}
	return m
}

func (s ServerProperties) ReadFrom(r io.Reader) error {
	br := bufio.NewReader(r)
	data := make(map[string]string)
	for {
		l, err := br.ReadString('\n')
		if err != nil {
			if err == io.EOF {
				return data, nil
			}
			return nil, err
		}
		if l[0] == '#' {
			continue
		}<commit_msg>Fixed extra return values<commit_after>package main

import (
	"bufio"
	"io"
	"strings"
)

type ServerProperties map[string]string

var defaultSettings = ServerProperties{
	"allow-flight":                 "false",
	"allow-nether":                 "true",
	"announce-player-achievements": "true",
	"difficulty":                   "1",
	"enable-query":                 "false",
	"enable-rcon":                  "false",
	"enable-command-block":         "false",
	"force-gamemode":               "false",
	"gamemode":                     "0",
	"generate-structures":          "true",
	"generator-settings":           "",
	"hardcore":                     "false",
	"level-name":                   "world",
	"level-seed":                   "",
	"level-type":                   "DEFAULT",
	"max-build-height":             "256",
	"max-players":                  "20",
	"max-tick-time":                "60000",
	"max-world-size":               "29999984",
	"motd":                         "A MineWebGen Server",
	"network-compression-threshold": "256",
	"online-mode":                   "false",
	"op-permission-level":           "4",
	"player-idle-timeout":           "0",
	"pvp":                  "true",
	"query.port":           "25565",
	"rcon.password":        "",
	"rcon.port":            "25575",
	"resource-pack":        "",
	"resource-pack-hash":   "",
	"server-ip":            "",
	"server-port":          "25565",
	"snooper-enabled":      "false",
	"spawn-animals":        "true",
	"spawn-monsters":       "true",
	"spawn-npcs":           "true",
	"spawn-protection":     "16",
	"use-native-transport": "true",
	"view-distance":        "10",
	"white-list":           "false",
	"verify-names":         "true",
	"admin-slot":           "false",
	"public":               "true",
	"server-name":          "",
	"max-connections":      "3",
	"grow-trees":           "true",
}

func DefaultSettings() ServerProperties {
	m := make(ServerProperties)
	for k, v := range defaultSettings {
		m[k] = v
	}
	return m
}

func (s ServerProperties) ReadFrom(r io.Reader) error {
	br := bufio.NewReader(r)
	data := make(map[string]string)
	for {
		l, err := br.ReadString('\n')
		if err != nil {
			if err == io.EOF {
				return nil
			}
			return err
		}
		if l[0] == '#' {
			continue
		}
{'fraction_non_alphanumeric': 0.1775433970555922, 'fraction_numerical': 0.02021533728850802, 'mean_word_length': 1.722488038277512, 'pattern_counts': {'":': 92, '<': 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': '1496059', 'n_tokens_mistral': 1606, 'n_tokens_neox': 1506, 'n_words': 285}