<commit_before>L.Control.Geocoder.Ptv = L.Class.extend({
	options: {
		// xLocate url
		serviceUrl: 'https://api-xstwo.cloud.ptvgroup.com/services/rest/XLocate/2.0/searchlocations/',
		// token for xServer internet
		token: ''
	},

	initialize: function (options) {
		L.Util.setOptions(this, options);
	},

	runRequest: function (url, request, token, handleSuccess, handleError) {
		$.ajax({
			url: url + request.address + '?xtok=' + token,
			type: 'GET'
		,
		success: function (data, status, xhr) {
				handleSuccess(data);
			},

		error: function (xhr, status, error) {
			handleError(xhr);
		}});
	},

	_buildAddressString: function (address) {
		var street = (address.street + ' ' + address.houseNumber).trim();
		var city = (address.postalCode + ' ' + address.city).trim();
		city = (address.state + ' ' + city).trim();

		if (!street) {
			return city;
		}
		else if (!city) {
			return street;
		}
		else {
			return street + ', ' + city;
		}
	},

	geocode: function (query, cb, context) {
		var url = this.options.serviceUrl;

		var request = {
			address: query
		};

		this.runRequest(url, request, this.options.token,
			L.bind(function (response) {
				var results = [];
				for (var i = response.results.length - 1; i >= 0; i--) {
					var resultAddress = response.results[i];
					var loc = L.latLng(resultAddress.location.roofTop.y, resultAddress.location.roofTop.x);
					results[i] = {<commit_msg>fixed geocoding<commit_after>L.Control.Geocoder.Ptv = L.Class.extend({
	options: {
		// xLocate url
		serviceUrl: 'https://api-xstwo.cloud.ptvgroup.com/services/rest/XLocate/2.0/searchlocations/',
		// token for xServer internet
		token: ''
	},

	initialize: function (options) {
		L.Util.setOptions(this, options);
	},

	runRequest: function (url, request, token, handleSuccess, handleError) {
		$.ajax({
			url: url + request.address + '?xtok=' + token,
			type: 'GET'
		,
		success: function (data, status, xhr) {
				handleSuccess(data);
			},

		error: function (xhr, status, error) {
			handleError(xhr);
		}});
	},

	_buildAddressString: function (address) {
		var street = (address.street + ' ' + address.houseNumber).trim();
		var city = (address.postalCode + ' ' + address.city).trim();
		city = (address.state + ' ' + city).trim();

		if (!street) {
			return city;
		}
		else if (!city) {
			return street;
		}
		else {
			return street + ', ' + city;
		}
	},

	geocode: function (query, cb, context) {
		var url = this.options.serviceUrl;

		var request = {
			address: query
		};

		this.runRequest(url, request, this.options.token,
			L.bind(function (response) {
				var results = [];
				for (var i = response.results.length - 1; i >= 0; i--) {
					var resultAddress = response.results[i];
					var loc = L.latLng(resultAddress.location.referenceCoordinate.y, resultAddress.location.referenceCoordinate.x);
					results[i] = {
{'fraction_non_alphanumeric': 0.1628232005590496, 'fraction_numerical': 0.002795248078266946, 'mean_word_length': 3.2477744807121662, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '5887265', 'n_tokens_mistral': 1138, 'n_tokens_neox': 989, 'n_words': 213}