<commit_before>package javaschool.app;

import asg.cliche.Command;
import asg.cliche.Shell;
import asg.cliche.ShellDependent;
import asg.cliche.ShellFactory;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class PhoneBook implements ShellDependent {

    private List<Record> list = new ArrayList<>();
    private Shell theShell;

    public static void main(String[] args) {

    }

    @Override
    public void cliSetShell(Shell theShell) {
        this.theShell = theShell;
    }

    @Command
    public void add(String name) {
        Record record = new Record();
        record.setName(name);
        list.add(record);
    }

    @Command
    public void edit(String name) throws IOException {
        Record record = lookup(name);
        if (record == null) {
            System.out.printf("Record with name \"%s\" not found.\n", name);
        } else {
            ShellFactory.createSubshell(record.getName(), theShell, "Editing " + record.getName(), record)
                    .commandLoop();
        }
    }

    @Command
    public List<Record> list() {
        return list;
    }

    @Command
    public void clear() {
        list.clear();
    }

    private Record lookup(String name) throws NullPointerException {
        for (Record record: list) {
            if (name.equals(record.getName())) {
                return record;
            }
        }
        return null;
    }
}
<commit_msg>removed throws declaration in lookup<commit_after>package javaschool.app;

import asg.cliche.Command;
import asg.cliche.Shell;
import asg.cliche.ShellDependent;
import asg.cliche.ShellFactory;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class PhoneBook implements ShellDependent {

    private List<Record> list = new ArrayList<>();
    private Shell theShell;

    public static void main(String[] args) {

    }

    @Override
    public void cliSetShell(Shell theShell) {
        this.theShell = theShell;
    }

    @Command
    public void add(String name) {
        Record record = new Record();
        record.setName(name);
        list.add(record);
    }

    @Command
    public void edit(String name) throws IOException {
        Record record = lookup(name);
        if (record == null) {
            System.out.printf("Record with name \"%s\" not found.\n", name);
        } else {
            ShellFactory.createSubshell(record.getName(), theShell, "Editing " + record.getName(), record)
                    .commandLoop();
        }
    }

    @Command
    public List<Record> list() {
        return list;
    }

    @Command
    public void clear() {
        list.clear();
    }

    private Record lookup(String name) {
        for (Record record: list) {
            if (name.equals(record.getName())) {
                return record;
            }
        }
        return null;
    }
}

{'fraction_non_alphanumeric': 0.10359617288023755, 'fraction_numerical': 0.0, 'mean_word_length': 1.9408341416100874, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '463', 'n_tokens_mistral': 869, 'n_tokens_neox': 820, 'n_words': 214}