Overriding expand() rather than onexpand() to eliminate the visual slowness due to a possible backend trip.
772414
function()
    {
        function callback()
        {
            WebInspector.SidebarPane.prototype.expand.call(this);
        }

        this._stylesSidebarPane._refreshUpdate(null, true, callback.bind(this));
    }
509093
function expandWildcard (name, scripts) {
  const n = swapColonAndSlash(name)
  return Object.keys(scripts)
    .map(swapColonAndSlash)
    .filter(x => minimatch(x, n))
    .map(swapColonAndSlash)
}
1007877
function expandGlobs(main, cwd) {
  if (!main) { return; }
  // expand each glob in main (coerce it to array first)
  var globs = [].concat(main).map(function(pattern) {
    return glob.sync(pattern, {cwd: cwd});
  });
  // flatten globs to single array
  return [].concat.apply([], globs);
}
489260
private static float computeTranslation(float viewSize, float drawableSize, float currentTranslation, float delta) {
		final float sideFreeSpace = (viewSize - drawableSize) / 2F;

		if(sideFreeSpace > 0) {
			return sideFreeSpace - currentTranslation;
		} else if(currentTranslation + delta > 0) {
			return -currentTranslation;
		} else if(currentTranslation + delta < viewSize - drawableSize) {
			return viewSize - drawableSize - currentTranslation;
		}

		return delta;
	}
336846
def expandf(m, format):  # noqa A002
    """"""

    _assert_expandable(format, True)
    return _apply_replace_backrefs(m, format, flags=FORMAT)
305179
function nodeExpand(node: Node, actor) {
  return async ({ dispatch, getState }: ThunkArg) => {
    dispatch({ type: "NODE_EXPAND", data: { node } });
    dispatch(nodeLoadProperties(node, actor));
  };
}
320868
private void expand(boolean immediately) {
	if (locked == false && inAction == false && collapsed) {
	  inAction = true;
	  CollapsiblePanelListener[] array =
		  listeners.getListeners(CollapsiblePanelListener.class);
	  for (CollapsiblePanelListener cpl : array) {
		cpl.panelWillExpand(new CollapsiblePanelEvent(this));
	  }
	  pixels = incremental;
	  if (isAnimationEnabled() && immediately == false) {
		calculatedHeight = getSize().height;
		if (isFillMode()) {
		  setEndHeights();
		} else {
		  endHeight = getPreferredSize(false).height;
		}
		getExpandTimer().start();
	  } else {
		changeStatus();
	  }
	}
  }
703015
function(oThis, sDir, bUpdateFocus){
		RoadMapRenderer.scrollToNextStep(oThis, sDir, function(sFirstVisibleNodeId){
			var iIdx = sFirstVisibleNodeId.lastIndexOf("-expandend");
			if (iIdx != -1) {
				sFirstVisibleNodeId = sFirstVisibleNodeId.substring(0, iIdx);
			}
			oThis.setProperty("firstVisibleStep", sFirstVisibleNodeId, true);

			if (bUpdateFocus) {
				refreshFocus(oThis, sDir);
			}
		});
	}
1280453
private void expandNodes(DeLiCluTree index, SpatialPrimitiveDistanceFunction<V> distFunction, SpatialObjectPair nodePair, DataStore<KNNList> knns) {
    DeLiCluNode node1 = index.getNode(((SpatialDirectoryEntry) nodePair.entry1).getPageID());
    DeLiCluNode node2 = index.getNode(((SpatialDirectoryEntry) nodePair.entry2).getPageID());

    if(node1.isLeaf()) {
      expandLeafNodes(distFunction, node1, node2, knns);
    }
    else {
      expandDirNodes(distFunction, node1, node2);
    }

    index.setExpanded(nodePair.entry2, nodePair.entry1);
  }
982159
function widen(widening, width) {
  widening = widening || 0;

  return function(d, i, array) {
    if(array.length > 2) throw "array.length > 2 unsupported. array.length = " + array.length;
    width = width || (array[array.length-1] - array[0]);
    return d + (i*2-1)*width*widening;
  };
}
378005
function _expand (obj, cfg_so_far, cb) {
  traverse(obj).forEach(function (x) {
    if (_.isString (x)) {
      var nx = _type_conversion (interpolator.parse (x, cfg_so_far));
      if (nx != x) this.update (nx);
    }
  });
  
  cb (null, obj);
}
350796
function(jRef, bWidth, iValue, fDoBefore, fDoAfter){
		if (fDoBefore) {
			var iVal = fDoBefore(jRef);
			if (iVal != undefined) {
				iValue = iVal;
			}
		}
		var _fDoAfter = fDoAfter ? function(){fDoAfter(jRef);} : function(){};
		if (jQuery.fx.off) {
			if (bWidth) {
				jRef.width(iValue);
			} else {
				jRef.height(iValue);
			}
			_fDoAfter();
		} else {
			var oParam = bWidth ? {width: iValue} : {height: iValue};
			jRef.stop(true, true).animate(oParam, 200, 'linear', _fDoAfter);
		}
	}
891431
function expandAst(ast, data, lines) {
    if (lines == undefined)
        lines = [];
    
    // If there is a child "key" get the value associated with it. 
    let keyNode = ast.child("key");
    let key = keyNode ? keyNode.allText : "";
    let val = data ? (key in data ? data[key] : "") : "";

    // Functions are not supported
    if (typeof(val) == 'function')
        throw new Exception('Functions are not supported');

    switch (ast.rule.name) 
    {
        case "document":    
        case "sectionContent":
            ast.children.forEach(function(c) { 
                expandAst(c, data, lines); });
            return lines;

        case "comment":
            return lines;

        case "plainText":
            lines.push(ast.allText);
            return lines;

        case "section":        
            let content = ast.child("sectionContent");
            if (typeof val === "boolean" || typeof val === "number" || typeof val === "string") {
                if (val) 
                    expandAst(content, data, lines);
            }
            else if (val instanceof Array) {
                for (let x of val)
                    expandAst(content, mergeObjects(data, x), lines);
            }                
            else {
                expandAst(content, mergeObjects(data, val), lines);
            }
            return lines;

        case "invertedSection":
            if (!val || ((val instanceof Array) && val.length == 0))
                expandAst(ast.child("sectionContent"), data, lines);
            return lines;

        case "escapedVar":
            if (val) 
                lines.push(
                    expand(escapeHtmlChars(String(val)), data));
            return lines;
        
        case "unescapedVar":
            if (val) 
                lines.push(
                    expand(String(val), data));
            return lines;
    }
            
    throw "Unrecognized AST node " + ast.rule.name;
}
331695
@UiThread
    protected void expandView() {
        setExpanded(true);
        onExpansionToggled(false);

        if (mParentViewHolderExpandCollapseListener != null) {
            mParentViewHolderExpandCollapseListener.onParentExpanded(getAdapterPosition());
        }
    }
1323943
def expand(self, line, do_expand, force=False, vislevels=0, level=-1):
        """"""

        lastchild = self.GetLastChild(line, level)
        line += 1

        while line <= lastchild:
            if force:
                if vislevels > 0:
                    self.ShowLines(line, line)
                else:
                    self.HideLines(line, line)
            elif do_expand:
                self.ShowLines(line, line)

            if level == -1:
                level = self.GetFoldLevel(line)

            if level & stc.STC_FOLDLEVELHEADERFLAG:
                if force:
                    self.SetFoldExpanded(line, vislevels - 1)
                    line = self.expand(line, do_expand, force, vislevels - 1)

                else:
                    expandsub = do_expand and self.GetFoldExpanded(line)
                    line = self.expand(line, expandsub, force, vislevels - 1)
            else:
                line += 1

        return line
868361
def expand_indicators(indicator):
        
        if indicator.count(' : ') > 0:
            # handle all multi-valued indicators types (file hashes and custom indicators)
            indicator_list = []

            # group 1 - lazy capture everything to first <space>:<space> or end of line
            iregx_pattern = r'^(.*?(?=\s\:\s|$))?'
            iregx_pattern += r'(?:\s\:\s)?'  # remove <space>:<space>
            # group 2 - look behind for <space>:<space>, lazy capture everything
            #           to look ahead (optional <space>):<space> or end of line
            iregx_pattern += r'((?<=\s\:\s).*?(?=(?:\s)?\:\s|$))?'
            iregx_pattern += r'(?:(?:\s)?\:\s)?'  # remove (optional <space>):<space>
            # group 3 - look behind for <space>:<space>, lazy capture everything
            #           to look ahead end of line
            iregx_pattern += r'((?<=\s\:\s).*?(?=$))?$'
            iregx = re.compile(iregx_pattern)

            indicators = iregx.search(indicator)
            if indicators is not None:
                indicator_list = list(indicators.groups())
        else:
            # handle all single valued indicator types (address, host, etc)
            indicator_list = [indicator]

        return indicator_list
26364
function() {
        this._elConsole.style.display = "none";
        if(this._elFt) {
            this._elFt.style.display = "none";
        }
        this._btnCollapse.value = "Expand";
        this.isCollapsed = true;
    }