<commit_before>angular.module('Boser')
.controller('CrawlerCtrl', ['$scope','$http', function ($scope, $http) {
	
	/*
	 * inizializzazione
	 */
	$scope.startBtnDisabled = false;
	$scope.crawlerStarting = false;
	$http({
		method: 'GET',
		url: 'rest/crawler'
	}).success(function(result) {
		$scope.crawler = result;
	});
	
	$scope.startInstance = function() {
		$scope.startBtnDisabled = true;
		$scope.crawlerStarting = true;
		$http({
    		method: 'PUT',
    		url: 'rest/crawler/start'
    	}).success(function (response) {
    		/*
    		 * se tutto va bene si aggiorna la lista
    		 */
    		console.log("ok "+response);
    		$scope.crawlerStarting = false;
    		$scope.crawler = response;
    	}).error(function(data, status, headers, config, statusText) {
    		console.log("ko");
    	});
	}
	
    
}]);<commit_msg>workaround per bug UNDERTOW-367<commit_after>angular.module('Boser')
.controller('CrawlerCtrl', ['$scope','$http', function ($scope, $http) {
	
	/*
	 * inizializzazione
	 */
	$scope.startBtnDisabled = false;
	$scope.crawlerStarting = false;
	$http({
		method: 'GET',
		url: 'rest/crawler'
	}).success(function(result) {
		$scope.crawler = result;
	});
	
	$scope.startInstance = function() {
		$scope.startBtnDisabled = true;
		$scope.crawlerStarting = true;
		$http({
    		method: 'PUT',
    		url: 'rest/crawler/start',
			data: {'fakeParam': 'fakeValue'},
			headers: {'Content-Type': 'application/x-www-form-urlencoded'},
		    transformRequest: function(obj) {
		        var str = [];
		        for(var p in obj)
		        str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
		        return str.join("&");
		    }
    	}).success(function (response) {
    		/*
    		 * se tutto va bene si aggiorna la lista
    		 */
    		console.log("ok "+response);
    		$scope.crawlerStarting = false;
    		$scope.crawler = response;
    	}).error(function(data, status, headers, config, statusText) {
    		console.log("ko");
    	});
	}
	
    
}]);
{'fraction_non_alphanumeric': 0.1737820190858865, 'fraction_numerical': 0.0015067805123053742, 'mean_word_length': 2.9919839679358717, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '7382717', 'n_tokens_mistral': 763, 'n_tokens_neox': 710, 'n_words': 125}