<commit_before>/**
 * @author <NAME>, <NAME>
 */
 
// Global variables
	var wHeight = getWindowHeight();
	var wWidth = getWindowWidth();
	var pos = getScrollXY();
	
	var streetmode = false;
	var alerted = false;
	
// Screen resolution
//alert("Höhe: " + wHeight + "Breite: " + wWidth);


// Function to change between normal and analysis mode
function changeMode() {
	
	var mapWidth = document.getElementById('map-container').style.width;

	if (mapWidth == "50%") {
		document.getElementById('analyseModeBtn').value ="Aus";
		document.getElementById('analyseModeBtn').style.color ="#1D83C3";
		document.getElementById('analyseModeBtn').style.border ="1px solid #1D83C3";
		document.getElementById('analyseModeBtn').style.background ="#fff";
		
		document.getElementById('map-container').style.display = "block";
		document.getElementById('map-container').style.width = "100%";
		resizeMap();
		document.getElementById('analyser-panel').style.display = "none";
		document.getElementById('analyser-chart').style.display = "none";
		document.getElementById('analyser-table').style.display = "none";
		
		/*document.getElementById('header-nav').style.background = "#fff";*/
		
	} else {
		document.getElementById('analyseModeBtn').value ="An";
		document.getElementById('analyseModeBtn').style.color ="#fff";
		document.getElementById('analyseModeBtn').style.border ="#990000";
		document.getElementById('analyseModeBtn').style.background ="#990000";
		
		document.getElementById('map-container').style.width = "50%";
		resizeMap();
		
		document.getElementById('analyser-panel').style.display = "block";
		document.getElementById('analyser-chart').style.display = "block";
		document.getElementById('analyser-table').style.display = "block";
	
		/*document.getElementById('header-nav').style.background = "#DCE3E7";*/
		
	}
}

/**
 * jQuery-Function to select a time range 
 * additonal: datepicker in german language and timepicker
 */
$(function() {
	var l = getParam('lang');
	if (l == "en") {
		$.timepicker.regional['en'] = {
			timeOnlyTitle : 'Choose time',
			timeText : 'Time',
			hourText : 'Houe',
			minuteText : 'Minute',
			secondText : 'Second',
			currentText : 'Now',
			closeText : 'Choose',
			monthNames : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
			monthNamesShort : ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'],
			dayNames : ['Sunday', 'Monday', 'Thuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
			dayNamesShort : ['Sun', 'Mon', 'Thu', 'Wed', 'Thu', 'Fri', 'Sat'],
			dayNamesMin : ['Sun', 'Mon', 'Thu', 'Wed', 'Thu', 'Fri', 'Sat'],
			weekHeader : 'We',
			weekStatus : 'Week of the month',
			ampm : false
		};
		$.timepicker.setDefaults($.timepicker.regional['en']);
	} else {
		
		$.timepicker.regional['de'] = {
			timeOnlyTitle : 'Uhrzeit auswählen',
			timeText : 'Zeit',
			hourText : 'Stunde',
			minuteText : 'Minute',
			secondText : 'Sekunde',
			currentText : 'Jetzt',
			closeText : 'Auswählen',
			monthNames : ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
			monthNamesShort : ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
			dayNames : ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
			dayNamesShort : ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
			dayNamesMin : ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
			weekHeader : 'Wo',
			weekStatus : 'Woche des Monats',
		ampm : false
		};
		$.timepicker.setDefaults($.timepicker.regional['de']);
		
	}	
	
	
	$("#date-from").datetimepicker({
		
		minDate: new Date(2013,5,8),
		maxDate: "+0",
		changeMonth: false,
		changeYear: false,
		numberOfMonths: 3,
		showWeek: false,
		dateFormat: "dd-mm-yy"
		
	});
	
	$("#date-to").datetimepicker({
		
		changeMonth: false,
		changeYear: false,
		numberOfMonths: 3,
		showWeek: false,
		dateFormat: "dd-mm-yy",
		onClose: function( selectedDate ) {
			$("#date-from").datepicker("option", "maxDate", selectedDate);
		},
		beforeShow: function (selectedDate) {
			var min = $("#date-from").datepicker("getDate");
			$("#date-to").datepicker("option","minDate", min);
			$("#date-to").datepicker("option","maxDate", "+0");
		}
	});

});


/**
 * Window functions (height, width, scroll position)
 * Author: <NAME> 
 */
	function getWindowWidth(){
		var value;
		try {
			value = document.body.clientWidth;
		} catch(e){
			value = window.innerWidth;
		}
		return value; //window.innerWidth;
	}
	function getWindowHeight(){
		var value;
		try {
			value = document.body.clientHeight;
		} catch(e){
			value = window.innerHeight;
		}
		return value; //window.innerHeight;
	}
	
	function getScrollXY() {
		var scrOfX = 0, scrOfY = 0;
		if( typeof( window.pageYOffset ) == 'number' ) {
			//Netscape compliant
			scrOfY = window.pageYOffset;
			scrOfX = window.pageXOffset;
		} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
			//DOM compliant
			scrOfY = document.body.scrollTop;
			scrOfX = document.body.scrollLeft;
		} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
			//IE6 standards compliant mode
			scrOfY = document.documentElement.scrollTop;
			scrOfX = document.documentElement.scrollLeft;
		}
		return [ scrOfX, scrOfY ];
	}



function streetMode(){
  	if(map.getMapTypeId()=="OSM"){
  		var l = getParam('lang');
			if (l == "en") {
				alert("Change map layer to a google map.");
			} else {
  				alert("Ändern Sie die Karte zu einer Google-Karte.");
  		    }
  	}else{
  		if(alerted==false){
  			var l = getParam('lang');
			if (l == "en") {
				alert("Remove the last points with 'rightclick' somewhere in the map, but not at a point!");
			} else {
  				alert("Entfernen Sie den letzten Punkt mir einem Rechtsklick an einem beliebigen Ort auf der Karte, aber nicht auf einem Punkt!");
  		}
  			alerted =true;
  		}
  		if(streetmode==false){ 
  			 
  			// Call enableStreetmode() function
  			enableStreetmode();
  		}else if(streetmode==true){
  			// Call disableStreetmode() function for clearing the overlay and removing Listener
  			disableStreetmode();
  		}
 }}
 
/* Click Handler Styles */
$(document).ready(function(){
	
	$("#boundingBoxBtn").click(function(){
		if (BoundingBox == true){
		  $(this).css("color","#fff");	
		  $(this).css("background","#92C049");	
		} else {
		  $(this).css("color","#92C049");	
		  $(this).css("background","#fff");
		}
	});
	
	$("#streetSelectionBtn").click(function(){
		if(streetmode==true){
		  $(this).css("color","#fff");	
		  $(this).css("background","#92C049");	
		} else {
		  $(this).css("color","#92C049");	
		  $(this).css("background","#fff");	
		}
	});

});<commit_msg>Correction<commit_after>/**
 * @author <NAME>, <NAME>
 */
 
// Global variables
	var wHeight = getWindowHeight();
	var wWidth = getWindowWidth();
	var pos = getScrollXY();
	
	var streetmode = false;
	var alerted = false;
	
// Screen resolution
//alert("Höhe: " + wHeight + "Breite: " + wWidth);


// Function to change between normal and analysis mode
function changeMode() {
	
	var mapWidth = document.getElementById('map-container').style.width;

	if (mapWidth == "50%") {
		document.getElementById('analyseModeBtn').value ="Aus";
		document.getElementById('analyseModeBtn').style.color ="#1D83C3";
		document.getElementById('analyseModeBtn').style.border ="1px solid #1D83C3";
		document.getElementById('analyseModeBtn').style.background ="#fff";
		
		document.getElementById('map-container').style.display = "block";
		document.getElementById('map-container').style.width = "100%";
		resizeMap();
		document.getElementById('analyser-panel').style.display = "none";
		document.getElementById('analyser-chart').style.display = "none";
		document.getElementById('analyser-table').style.display = "none";
		
		/*document.getElementById('header-nav').style.background = "#fff";*/
		
	} else {
		document.getElementById('analyseModeBtn').value ="An";
		document.getElementById('analyseModeBtn').style.color ="#fff";
		document.getElementById('analyseModeBtn').style.border ="#990000";
		document.getElementById('analyseModeBtn').style.background ="#990000";
		
		document.getElementById('map-container').style.width = "50%";
		resizeMap();
		
		document.getElementById('analyser-panel').style.display = "block";
		document.getElementById('analyser-chart').style.display = "block";
		document.getElementById('analyser-table').style.display = "block";
	
		/*document.getElementById('header-nav').style.background = "#DCE3E7";*/
		
	}
}

/**
 * jQuery-Function to select a time range 
 * additonal: datepicker in german language and timepicker
 */
$(function() {
	var l = getParam('lang');
	if (l == "en") {
		$.timepicker.regional['en'] = {
			timeOnlyTitle : 'Choose time',
			timeText : 'Time',
			hourText : 'Houe',
			minuteText : 'Minute',
			secondText : 'Second',
			currentText : 'Now',
			closeText : 'Choose',
			monthNames : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
			monthNamesShort : ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'],
			dayNames : ['Sunday', 'Monday', 'Thuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
			dayNamesShort : ['Sun', 'Mon', 'Thu', 'Wed', 'Thu', 'Fri', 'Sat'],
			dayNamesMin : ['Sun', 'Mon', 'Thu', 'Wed', 'Thu', 'Fri', 'Sat'],
			weekHeader : 'We',
			weekStatus : 'Week of the month',
			ampm : false
		};
		$.timepicker.setDefaults($.timepicker.regional['en']);
	} else {
		
		$.timepicker.regional['de'] = {
			timeOnlyTitle : 'Uhrzeit auswählen',
			timeText : 'Zeit',
			hourText : 'Stunde',
			minuteText : 'Minute',
			secondText : 'Sekunde',
			currentText : 'Jetzt',
			closeText : 'Auswählen',
			monthNames : ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
			monthNamesShort : ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
			dayNames : ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
			dayNamesShort : ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
			dayNamesMin : ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
			weekHeader : 'Wo',
			weekStatus : 'Woche des Monats',
		ampm : false
		};
		$.timepicker.setDefaults($.timepicker.regional['de']);
		
	}	
	
	
	$("#date-from").datetimepicker({
		
		minDate: new Date(2013,5,8),
		maxDate: "+0",
		changeMonth: false,
		changeYear: false,
		numberOfMonths: 3,
		showWeek: false,
		dateFormat: "dd-mm-yy"
		
	});
	
	$("#date-to").datetimepicker({
		
		changeMonth: false,
		changeYear: false,
		numberOfMonths: 3,
		showWeek: false,
		dateFormat: "dd-mm-yy",
		onClose: function( selectedDate ) {
			$("#date-from").datepicker("option", "maxDate", selectedDate);
		},
		beforeShow: function (selectedDate) {
			var min = $("#date-from").datepicker("getDate");
			$("#date-to").datepicker("option","minDate", min);
			$("#date-to").datepicker("option","maxDate", "+0");
		}
	});

});


/**
 * Window functions (height, width, scroll position)
 * Author: <NAME> 
 */
	function getWindowWidth(){
		var value;
		try {
			value = document.body.clientWidth;
		} catch(e){
			value = window.innerWidth;
		}
		return value; //window.innerWidth;
	}
	function getWindowHeight(){
		var value;
		try {
			value = document.body.clientHeight;
		} catch(e){
			value = window.innerHeight;
		}
		return value; //window.innerHeight;
	}
	
	function getScrollXY() {
		var scrOfX = 0, scrOfY = 0;
		if( typeof( window.pageYOffset ) == 'number' ) {
			//Netscape compliant
			scrOfY = window.pageYOffset;
			scrOfX = window.pageXOffset;
		} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
			//DOM compliant
			scrOfY = document.body.scrollTop;
			scrOfX = document.body.scrollLeft;
		} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
			//IE6 standards compliant mode
			scrOfY = document.documentElement.scrollTop;
			scrOfX = document.documentElement.scrollLeft;
		}
		return [ scrOfX, scrOfY ];
	}



function streetMode(){
  	if(map.getMapTypeId()=="OSM"){
  		var l = getParam('lang');
		if (l == "en") {
			alert("Change map layer to a google map.");
		} else {
			alert("Ändern Sie die Karte zu einer Google-Karte.");
	    }
  	}else{
  		if(alerted==false){
  			var l = getParam('lang');
			if (l == "en") {
				alert("Remove the last points with 'rightclick' somewhere in the map, but not at a point!");
			} else {
  				alert("Entfernen Sie den letzten Punkt mir einem Rechtsklick an einem beliebigen Ort auf der Karte, aber nicht auf einem Punkt!");
  		}
  			alerted =true;
  		}
  		if(streetmode==false){ 
  			 
  			// Call enableStreetmode() function
  			enableStreetmode();
  		}else if(streetmode==true){
  			// Call disableStreetmode() function for clearing the overlay and removing Listener
  			disableStreetmode();
  		}
 }}
 
/* Click Handler Styles */
$(document).ready(function(){
	
	$("#boundingBoxBtn").click(function(){
		if (BoundingBox == true){
		  $(this).css("color","#fff");	
		  $(this).css("background","#92C049");	
		} else {
		  $(this).css("color","#92C049");	
		  $(this).css("background","#fff");
		}
	});
	
	$("#streetSelectionBtn").click(function(){
		if(streetmode==true){
		  $(this).css("color","#fff");	
		  $(this).css("background","#92C049");	
		} else {
		  $(this).css("color","#92C049");	
		  $(this).css("background","#fff");	
		}
	});

});
{'fraction_non_alphanumeric': 0.1939994174191669, 'fraction_numerical': 0.009175648121176813, 'mean_word_length': 4.075018477457502, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '614682', 'n_tokens_mistral': 5293, 'n_tokens_neox': 4597, 'n_words': 974}