<commit_before>//This Hack allows to disable the Browser Cache completely.
		   var oldCreateElement = document.createElement;
		   document.createElement = function(){
    	   
    		   if(window.jQuery
    			&& !jQuery.ui5strapDisableCache
    			  && jQuery.sap 
    			   && jQuery.sap.includeStyleSheet 
    			   && jQuery.sap.includeScript
    			   && jQuery.sap._loadJSResourceAsync){
    			   
    			   jQuery.ajaxSetup({
                       data: {
                           "ui5strap-version": Math.random()
                       }
                    });
    			   var oldIncludeStyleSheet = jQuery.sap.includeStyleSheet;
    			   jQuery.sap.includeStyleSheet = function(vUrl, sId, fnLoadCallback, fnErrorCallback){
    				    var cUrl = vUrl;
                       
                       if(typeof vUrl === 'object'){
                           cUrl = vUrl.url;
                       }
                       
                       cUrl += (cUrl.indexOf("?") === -1 ? "?" : "&") + "ui5strap-app-version=" + Math.random();
                       
                       if(typeof vUrl === 'object'){
                           vUrl.url = cUrl;
                       }
                       else{
                           vUrl = cUrl;
                       }
                       
    				   oldIncludeStyleSheet.call(jQuery.sap, vUrl, sId, fnLoadCallback, fnErrorCallback);
    			   };
    			   
    			   var oldIncludeScript = jQuery.sap.includeScript;
    			   
    			   jQuery.sap.includeScript = function(vUrl, sId, fnLoadCallback, fnErrorCallback){
    				    var cUrl = vUrl;
                       
                       if(typeof vUrl === 'object'){
                           cUrl = vUrl.url;
                       }
                       
                       cUrl += (cUrl.indexOf("?") === -1 ? "?" : "&") + "ui5strap-app-version=" + Math.random();
                       
                       if(typeof vUrl === 'object'){
                           vUrl.url = cUrl;
                       }
                       else{
                    	   vUrl = cUrl;
                       }
                       console.log("x",cUrl);
    				   oldIncludeScript.call(jQuery.sap, vUrl, sId, fnLoadCallback, fnErrorCallback);
    			   };
    			   
    			   
    			   var old_loadJSResourceAsync = jQuery.sap._loadJSResourceAsync;
    			   jQuery.sap._loadJSResourceAsync = function(sResource, bIgnoreErrors){
    				   sResource += (sResource.indexOf("?") === -1 ? "?" : "&") + "ui5strap-app-version=" + Math.random();
    				   old_loadJSResourceAsync.call(jQuery.sap, sResource, bIgnoreErrors);
    			   }
    			   
    			   console.log("T");
    			   jQuery.ui5strapDisableCache = true;
    		   }
    		   
    		    return oldCreateElement.apply(document, arguments);
    	   };<commit_msg>ui5strap cache control<commit_after>//This Hack allows to disable the Browser Cache completely.
(function() {

	var oldCreateElement = document.createElement;
	document.createElement = function() {

		if (window.jQuery && jQuery.sap && jQuery.sap.includeStyleSheet
				&& jQuery.sap.includeScript && jQuery.sap._loadJSResourceAsync) {
			
			var randomString = function randString(x){
			    var s = "";
			    while(s.length<x&&x>0){
			        var r = Math.random();
			        s+= (r<0.1?Math.floor(r*100):String.fromCharCode(Math.floor(r*26) + (r>0.5?97:65)));
			    }
			    return s;
			};
			
			var version = randomString(8),
				paramName = "__v";
			
			var ajaxGlobalData = {};
			ajaxGlobalData[paramName] = version;
			
			//Ajax Requests
			jQuery.ajaxSetup({
				data : ajaxGlobalData
			});
			
			//Include Style Sheet
			var oldIncludeStyleSheet = jQuery.sap.includeStyleSheet;
			jQuery.sap.includeStyleSheet = function(vUrl, sId, fnLoadCallback,
					fnErrorCallback) {
				var cUrl = vUrl;

				if (typeof vUrl === 'object') {
					cUrl = vUrl.url;
				}

				cUrl += (cUrl.indexOf("?") === -1 ? "?" : "&")
						+ paramName + "=" + version;

				if (typeof vUrl === 'object') {
					vUrl.url = cUrl;
				} else {
					vUrl = cUrl;
				}

				oldIncludeStyleSheet.call(jQuery.sap, vUrl, sId,
						fnLoadCallback, fnErrorCallback);
			};

			//Include Script
			var oldIncludeScript = jQuery.sap.includeScript;
			jQuery.sap.includeScript = function(vUrl, sId, fnLoadCallback,
					fnErrorCallback) {
				var cUrl = vUrl;

				if (typeof vUrl === 'object') {
					cUrl = vUrl.url;
				}

				cUrl += (cUrl.indexOf("?") === -1 ? "?" : "&")
						+ paramName + "=" + version;

				if (typeof vUrl === 'object') {
					vUrl.url = cUrl;
				} else {
					vUrl = cUrl;
				}
				console.log("x", cUrl);
				oldIncludeScript.call(jQuery.sap, vUrl, sId, fnLoadCallback,
						fnErrorCallback);
			};

			//Load JS Resource Async
			//ATTENTION: This method is experimental. 
			//This means this code can stop working in future UI5 Versions.
			var old_loadJSResourceAsync = jQuery.sap._loadJSResourceAsync;
			jQuery.sap._loadJSResourceAsync = function(sResource, bIgnoreErrors) {
				sResource += (sResource.indexOf("?") === -1 ? "?" : "&")
						+ paramName + "=" + version;
				old_loadJSResourceAsync.call(jQuery.sap, sResource,
						bIgnoreErrors);
			}

			//Set back to original create Element function.
			document.createElement = oldCreateElement;
		}

		return oldCreateElement.apply(document, arguments);
	};

}());
{'fraction_non_alphanumeric': 0.124051101647843, 'fraction_numerical': 0.005369376041473801, 'mean_word_length': 1.6545454545454545, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 5, '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': '2116990', 'n_tokens_mistral': 1902, 'n_tokens_neox': 1592, 'n_words': 290}