<commit_before>//
//  PacketReceiver.cpp
//  ns_sketch
//
//  Created by <NAME> on 13.11.2015.
//  Copyright (c) 2015 tommigrohn. All rights reserved.
//

#include <iostream>
#include "PacketReceiver.h"

PacketReceiver::PacketReceiver() {}

void PacketReceiver::process() {
    auto it = hostNode->getPackets().begin();
    while (it != hostNode->getPackets().end()) {
        if (it->getDestination() == hostNode->getAddress()) {
            /* Some debugging output... */
            std::cout << hostNode->getAddress() << " received " << it->getData() << std::endl;
            hostNode->getPackets().erase(it);
        }
        it++;
    }
}<commit_msg>attempt to fix segfault<commit_after>//
//  PacketReceiver.cpp
//  ns_sketch
//
//  Created by <NAME> on 13.11.2015.
//  Copyright (c) 2015 tommigrohn. All rights reserved.
//

#include <iostream>
#include "PacketReceiver.h"

PacketReceiver::PacketReceiver() {}

void PacketReceiver::process() {
    auto it = hostNode->getPackets().begin();
    while (it != hostNode->getPackets().end()) {
        if (it->getDestination() == hostNode->getAddress()) {
            /* Some debugging output... */
            std::cout << hostNode->getAddress() << " received " << it->getData() << std::endl;
            it = hostNode->getPackets().erase(it);
        } else it++;
        
    }
}
{'fraction_non_alphanumeric': 0.18474195961106957, 'fraction_numerical': 0.01795063575168287, 'mean_word_length': 2.6557377049180326, 'pattern_counts': {'":': 0, '<': 23, '<?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': '2204187', 'n_tokens_mistral': 438, 'n_tokens_neox': 414, 'n_words': 87}