<commit_before>package com.springapp.mvc;

import java.util.ArrayList;

/**
 * Created by adrianh on 16.02.14.
 */
public class PersonList {
    ArrayList<Person> personList = new ArrayList<Person>();

    PersonList() {
        Person test = new Person("Test", "<EMAIL>", 1);
        this.personList.add(test);
    }

    public void addPerson(Person person) {
        this.personList.add(person);
    }

    public Person getPerson(Person person) {
        return this.personList.get(this.personList.indexOf(person));
    }

    public Person getPersonById(int id) {
        for (int i = 0; i < personList.size(); i++) {
            if (this.personList.get(i).getId() == id) {
                return this.personList.get(i);
            }
        }
        throw new IllegalArgumentException("No person with that id found");
    }
}
<commit_msg>java backend<commit_after>package com.springapp.mvc;

import java.lang.reflect.Array;
import java.util.ArrayList;

/**
 * Created by adrianh on 16.02.14.
 */
public class PersonList extends ArrayList<Person> {
    ArrayList<Person> personList = new ArrayList<Person>();

    PersonList() {
        Person test = new Person("Test", "<EMAIL>", "smint", 1);
        Person adrian = new Person("Adrian", "<EMAIL>", "smint", 2);
        Person person = new Person("Person", "<EMAIL>", "smint", 3);
        Person person1 = new Person("Randy", "<EMAIL>", "IT", 4);
        this.personList.add(test);
        this.personList.add(adrian);
        this.personList.add(person);
        this.personList.add(person1);
    }

    public void addPerson(Person person) {
        this.personList.add(person);
    }

    public Person getPerson(Person person) {
        return this.personList.get(this.personList.indexOf(person));
    }

    public Person getPersonById(int id) {
        for (int i = 0; i < personList.size(); i++) {
            if (this.personList.get(i).getId() == id) {
                return this.personList.get(i);
            }
        }
        throw new IllegalArgumentException("No person with that id found");
    }

    public ArrayList<Person> getPersonList() {
        return this.personList;
    }
}

{'fraction_non_alphanumeric': 0.13842592592592592, 'fraction_numerical': 0.009722222222222222, 'mean_word_length': 2.577814569536424, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 14, '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': '5004431', 'n_tokens_mistral': 662, 'n_tokens_neox': 637, 'n_words': 153}