src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_Helper.js
function (aChildren, aAncestors, mChildren) {
			if (aAncestors.length) {
				aChildren.forEach(function (sPath) {
					var aSegments;

					if (aAncestors.indexOf(sPath) >= 0) {
						mChildren[sPath] = true;
						return;
					}

					aSegments = sPath.split("/");
					aSegments.pop();
					while (aSegments.length) {
						if (aAncestors.indexOf(aSegments.join("/")) >= 0) {
							mChildren[sPath] = true;
							break;
						}
						aSegments.pop();
					}
				});
			}
		}
function (aChildren, aAncestors, mChildren) {
			if (aAncestors.length) {
				aChildren.forEach(function (sPath) {
					var aSegments;

					if (aAncestors.indexOf(sPath) >= 0) {
						mChildren[sPath] = true;
						return;
					}

					aSegments = sPath.split("/");
					aSegments.pop();
					while (aSegments.length) {
						if (aAncestors.indexOf(aSegments.join("/")) >= 0) {
							mChildren[sPath] = true;
							break;
						}
						aSegments.pop();
					}
				});
			}
		}
function ( aChildren , aAncestors , mChildren ) { if ( aAncestors . length ) { aChildren . forEach ( function ( sPath ) { var aSegments ; if ( aAncestors . indexOf ( sPath ) >= 0 ) { mChildren [ sPath ] = true ; return ; } aSegments = sPath . split ( "/" ) ; aSegments . pop ( ) ; while ( aSegments . length ) { if ( aAncestors . indexOf ( aSegments . join ( "/" ) ) >= 0 ) { mChildren [ sPath ] = true ; break ; } aSegments . pop ( ) ; } } ) ; } }
Adds all given children to the given hash set which either appear in the given list or
have some ancestor in it.

Note: "a/b/c" is deemed a child of the ancestors "a/b" and "a", but not "b" or "a/b/c/d".

@param {string[]} aChildren - List of non-empty child paths (unmodified)
@param {string[]} aAncestors - List of ancestor paths (unmodified)
@param {object} mChildren - Hash set of child paths, maps string to <code>true</code>;
is modified
Adds all given children to the given hash set which either appear in the given list or have some ancestor in it .