src/sap.ui.core/src/sap/ui/core/util/reflection/BaseTreeModifier.js
function (vControl, oAppComponent, mAdditionalSelectorInformation) {
			var sControlId = vControl;
			if (typeof sControlId !== "string") {
				sControlId = (vControl) ? this.getId(vControl) : undefined;
			} else if (!oAppComponent) {
				throw new Error("App Component instance needed to get a selector from string ID");
			}

			if (mAdditionalSelectorInformation && (mAdditionalSelectorInformation.id || mAdditionalSelectorInformation.idIsLocal)) {
				throw new Error("A selector of control with the ID '" + sControlId + "' was requested, " +
					"but core properties were overwritten by the additionally passed information.");
			}

			var bValidId = this.checkControlId(sControlId, oAppComponent);
			if (!bValidId) {
				throw new Error("Generated ID attribute found - to offer flexibility a stable control ID is needed to assign the changes to, but for this control the ID was generated by SAPUI5 " + sControlId);
			}

			var oSelector = Object.assign({}, mAdditionalSelectorInformation, {
				id: "",
				idIsLocal: false
			});

			if (this.hasLocalIdSuffix(sControlId, oAppComponent)) {
				// get local Id for control at root component and use it as selector ID
				var sLocalId = oAppComponent.getLocalId(sControlId);
				oSelector.id = sLocalId;
				oSelector.idIsLocal = true;
			} else {
				oSelector.id = sControlId;
			}

			return oSelector;
		}
function (vControl, oAppComponent, mAdditionalSelectorInformation) {
			var sControlId = vControl;
			if (typeof sControlId !== "string") {
				sControlId = (vControl) ? this.getId(vControl) : undefined;
			} else if (!oAppComponent) {
				throw new Error("App Component instance needed to get a selector from string ID");
			}

			if (mAdditionalSelectorInformation && (mAdditionalSelectorInformation.id || mAdditionalSelectorInformation.idIsLocal)) {
				throw new Error("A selector of control with the ID '" + sControlId + "' was requested, " +
					"but core properties were overwritten by the additionally passed information.");
			}

			var bValidId = this.checkControlId(sControlId, oAppComponent);
			if (!bValidId) {
				throw new Error("Generated ID attribute found - to offer flexibility a stable control ID is needed to assign the changes to, but for this control the ID was generated by SAPUI5 " + sControlId);
			}

			var oSelector = Object.assign({}, mAdditionalSelectorInformation, {
				id: "",
				idIsLocal: false
			});

			if (this.hasLocalIdSuffix(sControlId, oAppComponent)) {
				// get local Id for control at root component and use it as selector ID
				var sLocalId = oAppComponent.getLocalId(sControlId);
				oSelector.id = sLocalId;
				oSelector.idIsLocal = true;
			} else {
				oSelector.id = sControlId;
			}

			return oSelector;
		}
function ( vControl , oAppComponent , mAdditionalSelectorInformation ) { var sControlId = vControl ; if ( typeof sControlId !== "string" ) { sControlId = ( vControl ) ? this . getId ( vControl ) : undefined ; } else if ( ! oAppComponent ) { throw new Error ( "App Component instance needed to get a selector from string ID" ) ; } if ( mAdditionalSelectorInformation && ( mAdditionalSelectorInformation . id || mAdditionalSelectorInformation . idIsLocal ) ) { throw new Error ( "A selector of control with the ID '" + sControlId + "' was requested, " + "but core properties were overwritten by the additionally passed information." ) ; } var bValidId = this . checkControlId ( sControlId , oAppComponent ) ; if ( ! bValidId ) { throw new Error ( "Generated ID attribute found - to offer flexibility a stable control ID is needed to assign the changes to, but for this control the ID was generated by SAPUI5 " + sControlId ) ; } var oSelector = Object . assign ( { } , mAdditionalSelectorInformation , { id : "" , idIsLocal : false } ) ; if ( this . hasLocalIdSuffix ( sControlId , oAppComponent ) ) { // get local Id for control at root component and use it as selector ID var sLocalId = oAppComponent . getLocalId ( sControlId ) ; oSelector . id = sLocalId ; oSelector . idIsLocal = true ; } else { oSelector . id = sControlId ; } return oSelector ; }
Function for determining the selector that is used later to apply a change for a given control.
The function distinguishes between local IDs generated starting with 1.40 and the global IDs generated in previous versions.

@param {sap.ui.base.ManagedObject|Element|string} vControl - Control or ID string for which the selector should be determined
@param {sap.ui.core.Component} oAppComponent - Application component, needed only if vControl is a string or XML node
@param {object} [mAdditionalSelectorInformation] - Additional mapped data which is added to the selector
@returns {object} oSelector
@returns {string} oSelector.id - ID used for determination of the flexibility target
@returns {boolean} oSelector.idIsLocal - <code>true</code> if the selector.id has to be concatenated with the application component ID while applying the change
@throws {Error} In case no control could be determined an error is thrown
@public
Function for determining the selector that is used later to apply a change for a given control . The function distinguishes between local IDs generated starting with 1 . 40 and the global IDs generated in previous versions .