<commit_before>(function(debugParams) {

	var view = {
		map: L.map("map"),
		marker: null,
		hashBounds: null,
		bitsControl: {
			input: $("#bitsInput"),
			label: $("#bitsOutput")
		},
		debugLine: {
			hashLabel: $("#hashLabel")
		}
	};

	var controller = {
		onLocationChange: function(ev) {
			var point = ev.latlng;
			debugParams.lat = point.lat;
			debugParams.lng = point.lng;

			controller.updateMarker(point);
			controller.requestHashData();
		},

		onBitsChanged: function() {
			debugParams.bits = view.bitsControl.input.val();
			view.bitsControl.label.text(debugParams.bits);
			controller.requestHashData();
		},

		requestHashData: function() {
			$.getJSON("/hashes/point?" + $.param(debugParams), controller.whenHashReceived);
		},

		whenHashReceived: function(hashData) {
			view.debugLine.hashLabel.text(hashData.binary);
			controller.setHashBounds(hashData.bbox)
		},

		setHashBounds: function(bbox) {
			var bounds = [[bbox.minLat, bbox.minLng], [bbox.maxLat, bbox.maxLng]];
			if (null == view.hashBounds) {
				view.hashBounds = L.rectangle(bounds, {color: "#D8C358", fillOpacity: 0.75, weight: 1});
				view.hashBounds.addTo(view.map);
			} else {
				view.hashBounds.setBounds(bounds);
			}
			view.map.fitBounds(bounds);
		},

		setMarker: function(point) {
			view.marker = L.marker(point).addTo(view.map);
			view.marker.bindPopup(controller.pointAsString(point));
			view.marker.on("mouseover", function(e) {view.marker.openPopup();});
			view.marker.on("mouseout", function(e) {view.marker.closePopup();});
		},

		updateMarker: function(point) {
			view.marker.setLatLng(point).setPopupContent(controller.pointAsString(point)).update();
		},

		pointAsString: function(point) {
			return "(" + point.lat + ", " + point.lng + ")";
		},

		initMap: function(center) {
			view.map.setView(center, 12);
			L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
				attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
				}).addTo(view.map);
			view.map.on('click', controller.onLocationChange);
		},

		initBitsControl: function() {
			view.bitsControl.label.text(debugParams.bits);
			view.bitsControl.input.val(debugParams.bits);
			view.bitsControl.input.on('change', controller.onBitsChanged);
		},

		initView: function() {
			var mapCenter = [debugParams.lat, debugParams.lng];

			controller.initMap(mapCenter);
			controller.setMarker(mapCenter);
			controller.initBitsControl();

			controller.onLocationChange({latlng: debugParams});
		}
	};

	controller.initView();

})({lat:50.0675, lng: 19.925, bits: 24});
<commit_msg>Decreased fillOpacity of bounfing box, highlighted its borders<commit_after>(function(debugParams) {

	var view = {
		map: L.map("map"),
		marker: null,
		hashBounds: null,
		bitsControl: {
			input: $("#bitsInput"),
			label: $("#bitsOutput")
		},
		debugLine: {
			hashLabel: $("#hashLabel")
		}
	};

	var controller = {
		onLocationChange: function(ev) {
			var point = ev.latlng;
			debugParams.lat = point.lat;
			debugParams.lng = point.lng;

			controller.updateMarker(point);
			controller.requestHashData();
		},

		onBitsChanged: function() {
			debugParams.bits = view.bitsControl.input.val();
			view.bitsControl.label.text(debugParams.bits);
			controller.requestHashData();
		},

		requestHashData: function() {
			$.getJSON("/hashes/point?" + $.param(debugParams), controller.whenHashReceived);
		},

		whenHashReceived: function(hashData) {
			view.debugLine.hashLabel.text(hashData.binary);
			controller.setHashBounds(hashData.bbox)
		},

		setHashBounds: function(bbox) {
			var bounds = [[bbox.minLat, bbox.minLng], [bbox.maxLat, bbox.maxLng]];
			if (null == view.hashBounds) {
				view.hashBounds = L.rectangle(bounds, {color: "#EC3F0F", fillOpacity: 0.25, weight: 2});
				view.hashBounds.addTo(view.map);
			} else {
				view.hashBounds.setBounds(bounds);
			}
			view.map.fitBounds(bounds);
		},

		setMarker: function(point) {
			view.marker = L.marker(point).addTo(view.map);
			view.marker.bindPopup(controller.pointAsString(point));
			view.marker.on("mouseover", function(e) {view.marker.openPopup();});
			view.marker.on("mouseout", function(e) {view.marker.closePopup();});
		},

		updateMarker: function(point) {
			view.marker.setLatLng(point).setPopupContent(controller.pointAsString(point)).update();
		},

		pointAsString: function(point) {
			return "(" + point.lat + ", " + point.lng + ")";
		},

		initMap: function(center) {
			view.map.setView(center, 12);
			L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
				attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
				}).addTo(view.map);
			view.map.on('click', controller.onLocationChange);
		},

		initBitsControl: function() {
			view.bitsControl.label.text(debugParams.bits);
			view.bitsControl.input.val(debugParams.bits);
			view.bitsControl.input.on('change', controller.onBitsChanged);
		},

		initView: function() {
			var mapCenter = [debugParams.lat, debugParams.lng];

			controller.initMap(mapCenter);
			controller.setMarker(mapCenter);
			controller.initBitsControl();

			controller.onLocationChange({latlng: debugParams});
		}
	};

	controller.initView();

})({lat:50.0675, lng: 19.925, bits: 24});

{'fraction_non_alphanumeric': 0.1743677505229131, 'fraction_numerical': 0.008366609621601065, 'mean_word_length': 4.270541082164328, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2216093', 'n_tokens_mistral': 2091, 'n_tokens_neox': 1795, 'n_words': 253}