<commit_before>package v2.core;

import v2.core.exporters.Exporter;
import v2.core.protocols.Detection;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;


/**
 * A router is an high-level abstraction of a BGP speaker. along with links, the router is one 
 * of the most basic components of a topology. A router contains information about its current state, such 
 * as the current routes available to the destination and the its current selected route. It is based on a 
 * node and uses its ID as the AS number. Besides state, a router keeps track of its current available
 * connections, storing the links with all of its neighbors. Each router is associated with a protocol that
 * is used to process incoming messages. 
 */
public class Router extends Node implements Destination {

    /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
     *
     *  Private Fields
     *
     * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

    private Topology topology = null;    // topology to which the router belongs to
    private final Map<Router, Link> inLinks;
    private RouteTable table = null;

    private final MRAITimer mraiTimer;
    private Detection detection;    // detection method deployed by the router

    /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
     *<commit_msg>Fix: "Router" now creates a route table right away<commit_after>package v2.core;

import v2.core.exporters.Exporter;
import v2.core.protocols.Detection;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;


/**
 * A router is an high-level abstraction of a BGP speaker. along with links, the router is one 
 * of the most basic components of a topology. A router contains information about its current state, such 
 * as the current routes available to the destination and the its current selected route. It is based on a 
 * node and uses its ID as the AS number. Besides state, a router keeps track of its current available
 * connections, storing the links with all of its neighbors. Each router is associated with a protocol that
 * is used to process incoming messages. 
 */
public class Router extends Node implements Destination {

    /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
     *
     *  Private Fields
     *
     * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

    private Topology topology = null;    // topology to which the router belongs to
    private final Map<Router, Link> inLinks;
    private RouteTable table = new RouteTable();

    private final MRAITimer mraiTimer;
    private Detection detection;    // detection method deployed by the router

    /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
     *
{'fraction_non_alphanumeric': 0.1415062478892266, 'fraction_numerical': 0.002026342451874367, 'mean_word_length': 2.5346062052505967, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 42, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7451990', 'n_tokens_mistral': 910, 'n_tokens_neox': 877, 'n_words': 307}