<commit_before>package xyz.brassgoggledcoders.boilerplate.utils;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class People {
	private static People INSTANCE;
	private Map<String, Person> everyone;
	private Map<PersonType, List<Person>> peopleByTypes;

	static People getInstance() {
		if(INSTANCE == null) {
			INSTANCE = new People();
		}
		return INSTANCE;
	}

	private People() {
		everyone = new HashMap<>();
		peopleByTypes = new HashMap<>();
		for(PersonType personType : PersonType.values()) {
			peopleByTypes.put(personType, new ArrayList<>());
		}
		addPeople();
	}

	private void addPeople() {
		addPerson(new Person("SkySom", "27672103-b8c7-400d-8817-49de433336dd", PersonType.BGC));
		addPerson(new Person("warlordjones", "c2e83bd4-e8df-40d6-a639-58ba8b05401e", PersonType.BGC));

		addPerson(new Person("decebaldecebal", "5eed1615-0ec9-4f4b-a4c9-58454ad5b04f", PersonType.CONTRIBUTOR));

		addPerson(new Person("BluSunrize", "f34afdfb-996b-4020-b8a2-b740e2937b29", PersonType.FRIEND));
		addPerson(new Person("Glazzmaker", "3df99427-2e78-4f4d-828c-95f09fe60144", PersonType.FRIEND));
		addPerson(new Person("UndertheBridge", "434bf509-ce83-4787-8176-32d202f8c6f6", PersonType.FRIEND));
	}

	public static void addPerson(Person person) {
		getInstance().everyone.put(person.name, person);
		person.personTypeList.stream().forEach(type -> getInstance().peopleByTypes.get(type).add(person));
	}

	public static Map<String, Person> getEveryone() {
		return getInstance().everyone;
	}

	public static List<Person> getPeopleByPersonType(PersonType personType) {
		return getInstance().peopleByTypes.get(personType);<commit_msg>Because calling getInstance while in the process of creating is bad<commit_after>package xyz.brassgoggledcoders.boilerplate.utils;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class People {
	private static People INSTANCE;
	private Map<String, Person> everyone;
	private Map<PersonType, List<Person>> peopleByTypes;

	static People getInstance() {
		if(INSTANCE == null) {
			INSTANCE = new People();
			INSTANCE.addPeople();
		}
		return INSTANCE;
	}

	private People() {
		everyone = new HashMap<>();
		peopleByTypes = new HashMap<>();
		for(PersonType personType : PersonType.values()) {
			peopleByTypes.put(personType, new ArrayList<>());
		}
	}

	private void addPeople() {
		addPerson(new Person("SkySom", "27672103-b8c7-400d-8817-49de433336dd", PersonType.BGC));
		addPerson(new Person("warlordjones", "c2e83bd4-e8df-40d6-a639-58ba8b05401e", PersonType.BGC));

		addPerson(new Person("decebaldecebal", "5eed1615-0ec9-4f4b-a4c9-58454ad5b04f", PersonType.CONTRIBUTOR));

		addPerson(new Person("BluSunrize", "f34afdfb-996b-4020-b8a2-b740e2937b29", PersonType.FRIEND));
		addPerson(new Person("Glazzmaker", "3df99427-2e78-4f4d-828c-95f09fe60144", PersonType.FRIEND));
		addPerson(new Person("UndertheBridge", "434bf509-ce83-4787-8176-32d202f8c6f6", PersonType.FRIEND));
	}

	public static void addPerson(Person person) {
		getInstance().everyone.put(person.name, person);
		person.personTypeList.stream().forEach(type -> getInstance().peopleByTypes.get(type).add(person));
	}

	public static Map<String, Person> getEveryone() {
		return getInstance().everyone;
	}

	public static List<Person> getPeopleByPersonType(PersonType personType) {
		return getInstance().peopleByTypes.get(personType);
{'fraction_non_alphanumeric': 0.13664772727272728, 'fraction_numerical': 0.07386363636363637, 'mean_word_length': 5.944773175542406, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, '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': '5451877', 'n_tokens_mistral': 1433, 'n_tokens_neox': 1244, 'n_words': 213}