<commit_before>(function($) {

	var _ajax = $.ajax;

	$.ajaxRequest = function(options) {
		/* 默认设置 */
		var settings = {
			cache : false,
			dataType : "html",
			type : "POST"
		}
		$.extend(settings, options);
		
		var callbacks = {
			error : function(XMLHttpRequest, textStatus, errorThrown) {
			},
			success : function(data, textStatus) {
			},
			statusCode : {
				606 : function() {
					alert("session invalid!");
				}
			}
		};
		$.extend(callbacks, options);

		/* 扩展增强处理 */
		var _opt = $.extend(settings, {
			error : function(XMLHttpRequest, textStatus, errorThrown) {
				/* 错误方法增强处理 */
				callbacks.error(XMLHttpRequest, textStatus, errorThrown);
			},
			success : function(data, textStatus) {
				/* 成功回调方法增强处理 */
				callbacks.success(data, textStatus);
			},
			statusCode:callbacks.statusCode
		});

		_ajax(_opt);
	};

})(jQuery);<commit_msg>ajax.ex 优化<commit_after>(function($) {

	var _ajax = $.ajax;

	$.ajaxRequest = function(options) {
		/* 默认设置 */
		var settings = {
			cache : false,
			dataType : "html",
			type : "POST",
			error : function(XMLHttpRequest, textStatus, errorThrown) {
			},
			success : function(data, textStatus) {
			},
			statusCode : {
				606 : function() {
					alert("session invalid!");
				}
			}
		}
		
		var json = $.extend({},settings, options);
		
		$.extend(settings, options);
		
		/* 扩展增强处理 */
		var _opt = $.extend(json, {
			error : function(XMLHttpRequest, textStatus, errorThrown) {
				/* 错误方法增强处理 */
				settings.error(XMLHttpRequest, textStatus, errorThrown);
			},
			success : function(data, textStatus) {
				/* 成功回调方法增强处理 */
				settings.success(data, textStatus);
			},
			statusCode:settings.statusCode
		});

		_ajax(_opt);
	};

})(jQuery);
{'fraction_non_alphanumeric': 0.16125290023201855, 'fraction_numerical': 0.0034802784222737818, 'mean_word_length': 2.974654377880184, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7371775', 'n_tokens_mistral': 755, 'n_tokens_neox': 640, 'n_words': 108}