<commit_before>import java.util.*;

public class Table {

    public static class Entry {
        public Integer iface;
        public IPAddress destinationIP;
        public IPAddress nextHop;

        public Entry(String d, String n, Integer i) {
            iface = i;
            destinationIP = new IPAddress(d);
            nextHop = new IPAddress(n);
        }
    }

    HashMap<IPAddress, Entry> table;

    public Table() {
        table = new HashMap<IPAddress, Entry>();
    }

    public void add(String destinationIP, String nextHop, Integer iface) {
        table.put(new IPAddress(destinationIP), new Entry(destinationIP, nextHop, iface));
    }

    public boolean isEmpty() {
        return table.size() == 0;
    }

    public void print() {
        System.out.println("-------------------------------------------------");
        System.out.println("|   Destination   |     Next Hop    | Interface |");
        System.out.println("-------------------------------------------------");

        for (Map.Entry<IPAddress, Entry> item : table.entrySet()) {
            Entry e = item.getValue();
            System.out.printf("| %15s | %15s | %5d     |\n", e.destinationIP, e.nextHop, e.iface);
        }

        System.out.println("-------------------------------------------------\n");
    }

    public Entry findDestinationIP(IPAddress ip) {
        if (table.containsKey(ip)) {
            return table.get(ip);
        }
    }
}

<commit_msg>Table HashMap keys should be strings<commit_after>import java.util.*;

public class Table {

    public static class Entry {
        public Integer iface;
        public IPAddress destinationIP;
        public IPAddress nextHop;

        public Entry(String d, String n, Integer i) {
            iface = i;
            destinationIP = new IPAddress(d);
            nextHop = new IPAddress(n);
        }
    }

    HashMap<String, Entry> table;

    public Table() {
        table = new HashMap<String, Entry>();
    }

    public void add(String destinationIP, String nextHop, Integer iface) {
        table.put(destinationIP, new Entry(destinationIP, nextHop, iface));
    }

    public boolean isEmpty() {
        return table.size() == 0;
    }

    public void print() {
        System.out.println("-------------------------------------------------");
        System.out.println("|   Destination   |     Next Hop    | Interface |");
        System.out.println("-------------------------------------------------");

        for (Map.Entry<String, Entry> item : table.entrySet()) {
            Entry e = item.getValue();
            System.out.printf("| %15s | %15s | %5d     |\n", e.destinationIP, e.nextHop, e.iface);
        }

        System.out.println("-------------------------------------------------\n");
    }

    public Entry findDestinationIP(IPAddress ip) {
        if (table.containsKey(ip.toString())) {
            return table.get(ip.toString());
        } else  {
            return new Entry("0.0.0.0", "0.0.0.0", 0);
        }
    }
}


{'fraction_non_alphanumeric': 0.2113095238095238, 'fraction_numerical': 0.006944444444444444, 'mean_word_length': 1.5208333333333333, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2578348', 'n_tokens_mistral': 823, 'n_tokens_neox': 792, 'n_words': 204}