<commit_before>define(['parser/parser', 'util'], function(Parser, util) {
    'use strict';

	var UnixParser = util.createClass(Parser, function () {
		this.data = {};
	});

	UnixParser.prototype.parse = function (input) {
		var hop = 0,
			me = this;

		input = this.prepare(input);

		this.data.nodes = [];
		this.data.links = [];
		this.data.graphs = 1;

		util.forEach(input, function (tokens) {
			var node = {},
				token = 0;
			if (tokens[token] == 'traceroute' || tokens[token] == 'traceroute:') {
				// Diagnostics, ignore
			} else {
				// Either next hop line or alternative route to same hop
				if (parseInt(tokens[token]) == hop + 1) {
					hop++;
					token++;
				}
				node.group = 0;
				node.depth = hop;
				node.hostname = tokens[token++];
				node.ip = tokens[token++];
				node.name = node.hostname + node.ip;
				node.latencies = [];
				for (; token < tokens.length; token+=2) {
					node.latencies.push(tokens[token]);
				}
				me.data.nodes.push(node);<commit_msg>Safety check on latency parsing<commit_after>define(['parser/parser', 'util'], function(Parser, util) {
    'use strict';

	var UnixParser = util.createClass(Parser, function () {
		this.data = {};
	});

	UnixParser.prototype.parse = function (input) {
		var hop = 0,
			me = this;

		input = this.prepare(input);

		this.data.nodes = [];
		this.data.links = [];
		this.data.graphs = 1;

		util.forEach(input, function (tokens) {
			var node = {},
				token = 0;
			if (tokens[token] == 'traceroute' || tokens[token] == 'traceroute:') {
				// Diagnostics, ignore
			} else {
				// Either next hop line or alternative route to same hop
				if (parseInt(tokens[token]) == hop + 1) {
					hop++;
					token++;
				}
				node.group = 0;
				node.depth = hop;
				node.hostname = tokens[token++];
				node.ip = tokens[token++];
				node.name = node.hostname + node.ip;
				node.latencies = [];
				for (; token < tokens.length; token+=2) {
					if (tokens[token] != '*') {
						node.latencies.push(parseFloat(tokens[token]));
					}
				}
				me.data.nodes.push(node);
{'fraction_non_alphanumeric': 0.17515769044153323, 'fraction_numerical': 0.005822416302765648, 'mean_word_length': 2.83271375464684, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1855676', 'n_tokens_mistral': 859, 'n_tokens_neox': 687, 'n_words': 153}