<commit_before>var request = require('request');
var moment = require('moment');

module.exports = function(from, to, callback) {
	request('http://transport.opendata.ch/v1/connections?limit=1&from='+from+'&to='+to, function(error, res, body) {
		if(error){
			callback(error, []);
		}else {
			var connection = JSON.parse(body);
			if(connection.connections){
				var sections = connection.connections[0].sections;
				var stations = [];
				var time = new Date(connection.connections[0].from.departure);
				moment().utcOffset(time);
				var hour = moment(time).subtract(1, 'days').format('hh');
				var minutes = moment(time).subtract(1, 'days').format('mm');
				var departure = hour + " Uhr " + minutes;
				stations.push("Zug fährt von " + from + " auf Gleis " + connection.connections[0].from.platform + " um " + departure + " ab");
				for (var i in sections) {
					var arrival = sections[i].arrival;
					var arrivalTime = new Date(arrival.arrival);
					moment().utcOffset(arrivalTime);
					var hour = moment(arrivalTime).subtract(1, 'days').format('hh');
					var minutes = moment(arrivalTime).subtract(1, 'days').format('mm');
					var departureTime = hour + " Uhr " + minutes;
					stations.push("Ankunft in " + arrival.station.name + " auf Gleis " + arrival.platform + " um " + departureTime);
				}
			}else{
				callback(new Error("No connections found."),[]);
			}
			callback(error, stations);
		}
	});
}<commit_msg>der Zug<commit_after>var request = require('request');
var moment = require('moment');

module.exports = function(from, to, callback) {
	request('http://transport.opendata.ch/v1/connections?limit=1&from='+from+'&to='+to, function(error, res, body) {
		if(error){
			callback(error, []);
		}else {
			var connection = JSON.parse(body);
			if(connection.connections){
				var sections = connection.connections[0].sections;
				var stations = [];
				var time = new Date(connection.connections[0].from.departure);
				moment().utcOffset(time);
				var hour = moment(time).subtract(1, 'days').format('hh');
				var minutes = moment(time).subtract(1, 'days').format('mm');
				var departure = hour + " Uhr " + minutes;
				stations.push("Der Zug fährt von " + from + " auf Gleis " + connection.connections[0].from.platform + " um " + departure + " ab");
				for (var i in sections) {
					var arrival = sections[i].arrival;
					var arrivalTime = new Date(arrival.arrival);
					moment().utcOffset(arrivalTime);
					var hour = moment(arrivalTime).subtract(1, 'days').format('hh');
					var minutes = moment(arrivalTime).subtract(1, 'days').format('mm');
					var departureTime = hour + " Uhr " + minutes;
					stations.push("Ankunft in " + arrival.station.name + " auf Gleis " + arrival.platform + " um " + departureTime);
				}
			}else{
				callback(new Error("No connections found."),[]);
			}
			callback(error, stations);
		}
	});
}
{'fraction_non_alphanumeric': 0.17433751743375175, 'fraction_numerical': 0.006276150627615063, 'mean_word_length': 3.904273504273504, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5958274', 'n_tokens_mistral': 1086, 'n_tokens_neox': 912, 'n_words': 192}