<commit_before>/*!
 * ${copyright}
 */

// Provides class sap.ui.core.support.plugins.Debugging
sap.ui.define(['jquery.sap.global', 'sap/ui/core/support/Plugin'],
	function(jQuery, Plugin) {
		"use strict";


		var $ = jQuery;
		var Debugging = Plugin.extend("sap.ui.core.support.plugins.Debugging", {
			constructor: function(oSupportStub) {
				Plugin.apply(this, ["sapUiSupportDebugging", "Debugging", oSupportStub]);
	
				// tools plugin only!
				if (!this.isToolPlugin()) {
					throw Error();
				}
	
				this._oStub = oSupportStub;

				this._aEventIds = [
					this.getId() + "ReceiveClasses",
					this.getId() + "ReceiveClassMethods",
					this.getId() + "SaveUrlIfNew",
					this.getId() + "AppendUserUrls"
				];
	
				this._breakpointId = "sapUiSupportBreakpoint";
				this._localStorageId = "sapUiSupportLocalStorage";
				this._techInfoId = "sapUiSupportTechInfo";
	
				this._aClasses = [];
				this._mAddedClasses = {};
				this._sSelectedClass = "";
				this._mRebootUrls = {};
	
			}
		});
	
		Debugging.prototype.init = function(oSupportStub) {
			Plugin.prototype.init.apply(this, arguments);
	
			if (this.isToolPlugin()) {
				var _$ = this.$();
				_$.on("click", '#sapUiSupportDebuggingReboot', $.proxy(this._onUseOtherUI5Version, this));
				_$.on("change", '#sapUiSupportDebuggingRebootSelect', this._onUI5VersionDropdownChanged);
				_$.on("keyup", '#sapUiSupportDebuggingClassInput', $.proxy(this._autoComplete, this));
				_$.on("blur", '#sapUiSupportDebuggingClassInput', $.proxy(this._updateSelectOptions, this));
				_$.on("change", '#sapUiSupportDebuggingClassSelect', $.proxy(this._selectOptionsChanged, this));
				_$.on("click", '#sapUiSupportDebuggingAddClass', $.proxy(this._onAddClassClicked, this));
				_$.on("click", '#sapUiSupportDebuggingClassList li div', $.proxy(this._onSelectClass, this));
				_$.on("click", '#sapUiSupportDebuggingClassList li img.remove-class', $.proxy(this._onRemoveClass, this));
				_$.on("keyup", '#sapUiSupportDebuggingMethodInput', $.proxy(this._autoComplete, this));
				_$.on("blur", '#sapUiSupportDebuggingMethodInput', $.proxy(this._updateSelectOptions, this));
				_$.on("change", '#sapUiSupportDebuggingMethodSelect', $.proxy(this._selectOptionsChanged, this));
				_$.on("click", '#sapUiSupportDebuggingAddBreakpoint', $.proxy(this._onAddBreakpointClicked, this));
				_$.on("click", '#sapUiSupportDebuggingBreakpointList li img.remove-breakpoint', $.proxy(this._onRemoveBreakpoint, this));
	
				this.renderContainer();

				this._populateRebootUrls();
	
				this._oStub.sendEvent(this._breakpointId + "RequestClasses", {
					callback: this.getId() + "ReceiveClasses"
				});
	
			}
	
		};
	
		Debugging.prototype.exit = function(oSupportStub) {
			Plugin.prototype.exit.apply(this, arguments);
	
			if (this.isToolPlugin()) {
				var _$ = this.$();
				_$.off("keyup", '#sapUiSupportDebuggingClassInput');
				_$.on("blur", '#sapUiSupportDebuggingClassInput');
				_$.on("change", '#sapUiSupportDebuggingClassSelect');
				_$.on("click", '#sapUiSupportDebuggingAddClass');
				_$.on("click", '#sapUiSupportDebuggingClassList li div');
				_$.on("click", '#sapUiSupportDebuggingClassList li img.remove-class');
				_$.on("keyup", '#sapUiSupportDebuggingMethodInput');
				_$.on("blur", '#sapUiSupportDebuggingMethodInput');
				_$.on("change", '#sapUiSupportDebuggingMethodSelect');
				_$.on("click", '#sapUiSupportDebuggingAddBreakpoint');
				_$.on("click", '#sapUiSupportDebuggingBreakpointList li img.remove-breakpoint');
			}
	
		};
	
		Debugging.prototype.renderContainer = function() {
	
			var rm = sap.ui.getCore().createRenderManager();
	
			rm.write('<div id="sapUiSupportDebuggingRebootContainer" class="sapUiSupportDottedContainer">');
			rm.write('<div>Boot application with different UI5 version on next reload:</div>');
			rm.write('<select id="sapUiSupportDebuggingRebootSelect">');
			rm.write('<option value="none">Disabled (no custom reboot URL)</option>');
			rm.write('<option value="other" id="sapUiSupportDebuggingRebootOther">Other (enter URL to sap-ui-core.js below)...:</option>');
			rm.write('</select>');
			rm.write('<input type="text" id="sapUiSupportDebuggingRebootInput" disabled="disabled"/>');
			rm.write('<button id="sapUiSupportDebuggingReboot">Activate Reboot URL</button>');
			rm.write('</div>');
	
			rm.write('<div id="sapUiSupportDebuggingClassContainer" class="sapUiSupportDottedContainer"></div>');
			rm.write('<div id="sapUiSupportDebuggingMethodContainer" class="sapUiSupportDottedContainer"></div>');
	<commit_msg>[INTERNAL][FIX] core.plugins.Debugging: Detaching events on exit is fixed<commit_after>/*!
 * ${copyright}
 */

// Provides class sap.ui.core.support.plugins.Debugging
sap.ui.define(['jquery.sap.global', 'sap/ui/core/support/Plugin'],
	function(jQuery, Plugin) {
		"use strict";


		var $ = jQuery;
		var Debugging = Plugin.extend("sap.ui.core.support.plugins.Debugging", {
			constructor: function(oSupportStub) {
				Plugin.apply(this, ["sapUiSupportDebugging", "Debugging", oSupportStub]);
	
				// tools plugin only!
				if (!this.isToolPlugin()) {
					throw Error();
				}
	
				this._oStub = oSupportStub;

				this._aEventIds = [
					this.getId() + "ReceiveClasses",
					this.getId() + "ReceiveClassMethods",
					this.getId() + "SaveUrlIfNew",
					this.getId() + "AppendUserUrls"
				];
	
				this._breakpointId = "sapUiSupportBreakpoint";
				this._localStorageId = "sapUiSupportLocalStorage";
				this._techInfoId = "sapUiSupportTechInfo";
	
				this._aClasses = [];
				this._mAddedClasses = {};
				this._sSelectedClass = "";
				this._mRebootUrls = {};
	
			}
		});
	
		Debugging.prototype.init = function(oSupportStub) {
			Plugin.prototype.init.apply(this, arguments);
	
			if (this.isToolPlugin()) {
				var _$ = this.$();
				_$.on("click", '#sapUiSupportDebuggingReboot', $.proxy(this._onUseOtherUI5Version, this));
				_$.on("change", '#sapUiSupportDebuggingRebootSelect', this._onUI5VersionDropdownChanged);
				_$.on("keyup", '#sapUiSupportDebuggingClassInput', $.proxy(this._autoComplete, this));
				_$.on("blur", '#sapUiSupportDebuggingClassInput', $.proxy(this._updateSelectOptions, this));
				_$.on("change", '#sapUiSupportDebuggingClassSelect', $.proxy(this._selectOptionsChanged, this));
				_$.on("click", '#sapUiSupportDebuggingAddClass', $.proxy(this._onAddClassClicked, this));
				_$.on("click", '#sapUiSupportDebuggingClassList li div', $.proxy(this._onSelectClass, this));
				_$.on("click", '#sapUiSupportDebuggingClassList li img.remove-class', $.proxy(this._onRemoveClass, this));
				_$.on("keyup", '#sapUiSupportDebuggingMethodInput', $.proxy(this._autoComplete, this));
				_$.on("blur", '#sapUiSupportDebuggingMethodInput', $.proxy(this._updateSelectOptions, this));
				_$.on("change", '#sapUiSupportDebuggingMethodSelect', $.proxy(this._selectOptionsChanged, this));
				_$.on("click", '#sapUiSupportDebuggingAddBreakpoint', $.proxy(this._onAddBreakpointClicked, this));
				_$.on("click", '#sapUiSupportDebuggingBreakpointList li img.remove-breakpoint', $.proxy(this._onRemoveBreakpoint, this));
	
				this.renderContainer();

				this._populateRebootUrls();
	
				this._oStub.sendEvent(this._breakpointId + "RequestClasses", {
					callback: this.getId() + "ReceiveClasses"
				});
	
			}
	
		};
	
		Debugging.prototype.exit = function(oSupportStub) {
			Plugin.prototype.exit.apply(this, arguments);
	
			if (this.isToolPlugin()) {
				var _$ = this.$();
				_$.off("keyup", '#sapUiSupportDebuggingClassInput');
				_$.off("blur", '#sapUiSupportDebuggingClassInput');
				_$.off("change", '#sapUiSupportDebuggingClassSelect');
				_$.off("click", '#sapUiSupportDebuggingAddClass');
				_$.off("click", '#sapUiSupportDebuggingClassList li div');
				_$.off("click", '#sapUiSupportDebuggingClassList li img.remove-class');
				_$.off("keyup", '#sapUiSupportDebuggingMethodInput');
				_$.off("blur", '#sapUiSupportDebuggingMethodInput');
				_$.off("change", '#sapUiSupportDebuggingMethodSelect');
				_$.off("click", '#sapUiSupportDebuggingAddBreakpoint');
				_$.off("click", '#sapUiSupportDebuggingBreakpointList li img.remove-breakpoint');
			}
	
		};
	
		Debugging.prototype.renderContainer = function() {
	
			var rm = sap.ui.getCore().createRenderManager();
	
			rm.write('<div id="sapUiSupportDebuggingRebootContainer" class="sapUiSupportDottedContainer">');
			rm.write('<div>Boot application with different UI5 version on next reload:</div>');
			rm.write('<select id="sapUiSupportDebuggingRebootSelect">');
			rm.write('<option value="none">Disabled (no custom reboot URL)</option>');
			rm.write('<option value="other" id="sapUiSupportDebuggingRebootOther">Other (enter URL to sap-ui-core.js below)...:</option>');
			rm.write('</select>');
			rm.write('<input type="text" id="sapUiSupportDebuggingRebootInput" disabled="disabled"/>');
			rm.write('<button id="sapUiSupportDebuggingReboot">Activate Reboot URL</button>');
			rm.write('</div>');
	
			rm.write('<div id="sapUiSupportDebuggingClassContainer" class="sapUiSupportDottedContainer"></div>');
			rm.write('<div id="sapUiSupportDebuggingMethodContainer" class="sapUiSupportDottedContainer"></div>');
	
{'fraction_non_alphanumeric': 0.1717182730047972, 'fraction_numerical': 0.0006541648495420846, 'mean_word_length': 5.172947510094213, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, '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': '5394315', 'n_tokens_mistral': 3294, 'n_tokens_neox': 2921, 'n_words': 421}