Overload the `setExpanded` hook, so the counters are updated
491315
function(ctx, flag, opts) {
		var tree = ctx.tree,
			node = ctx.node;
// Let the base implementation expand/collapse the node, then redraw the title
// after the animation has finished
		return this._super(ctx, flag, opts).always(function(){
			tree.nodeRenderTitle(ctx);
		});
	}
1048164
function forEachExpansion(expansions, fn) {
    let impl = function(expansions) {
        expansions.forEach((expansion) => {
            fn(expansion);
            impl(expansion.expansions);
        });
    };

    impl(expansions);
}
406158
def increment(self, name, value):
        
        counter = self.get(name, CounterType.Increment)
        counter.count = counter.count + value if counter.count != None else value
        self._update()
815017
def _ensure_counter(self):
        """"""
        if self._counter_path not in self._client.kv:
            self._client.kv[self._counter_path] = ''.zfill(self._COUNTER_FILL)
811796
public void refresh(ExtensionComponentSet delta) {
        boolean fireOnChangeListeners = false;
        synchronized (getLoadLock()) {
            if (extensions==null)
                return;     // not yet loaded. when we load it, we'll load everything visible by then, so no work needed

            Collection<ExtensionComponent<T>> found = load(delta);
            if (!found.isEmpty()) {
                List<ExtensionComponent<T>> l = Lists.newArrayList(extensions);
                l.addAll(found);
                extensions = sort(l);
                fireOnChangeListeners = true;
            }
        }
        if (fireOnChangeListeners) {
            fireOnChangeListeners();
        }
    }
1094326
protected void updateExtension(Extension value, String xmlTag, Counter counter, Element element)
   {
      Element root = element;
      Counter innerCount = new Counter(counter.getDepth() + 1);
      findAndReplaceSimpleElement(innerCount, root, "groupId", value.getGroupId(), null);
      findAndReplaceSimpleElement(innerCount, root, "artifactId", value.getArtifactId(), null);
      findAndReplaceSimpleElement(innerCount, root, "version", value.getVersion(), null);
   }
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();
	  }
	}
  }
709602
function changeDelegatedHandler(eventOptions = {}) {
    const { key } = eventOptions;
    const def = defs.get(this);

    if (key && key in def.keys) {
        triggerOne(this, '_asterisk:set', eventOptions);
    }
}
953057
def update_counter(self, bucket, key, value, w=None, dw=None, pw=None,
                       returnvalue=False):
        
        raise NotImplementedError
409660
def expanded_callback(self, output, inputs=[], state=[], events=[]): # pylint: disable=dangerous-default-value
        '''
        
        '''
        self._expanded_callbacks = True
        return self.callback(output, inputs, state, events)
402218
function updateSimple(newList, oldList, rawNewValue ){

    var nlen = newList.length;
    var olen = oldList.length;
    var mlen = Math.min(nlen, olen);

    updateRange(0, mlen, newList, rawNewValue)
    if(nlen < olen){ //need add
      removeRange(nlen, olen-nlen, children);
    }else if(nlen > olen){
      addRange(olen, nlen, newList, rawNewValue);
    }
  }
246856
def increment(self):
        ''''''

        for i in xrange(len(self._counter) - 1, -1, -1):
            self._counter[i] += 1

            if self._counter[i] < 256: break

            # Carry the one
            self._counter[i] = 0

        # Overflow
        else:
            self._counter = [ 0 ] * len(self._counter)
732265
public void expand(boolean notifyItemChanged) {
        int length = mFastAdapter.getItemCount();
        for (int i = length - 1; i >= 0; i--) {
            expand(i, notifyItemChanged);
        }
    }
1307603
function(key, data) {
        var currentData;
        currentData = settings[key] || {};
        settings[key] = _.extend(currentData, data);
      }
198088
function updateHooks() {
    Object.keys(require.extensions).forEach(function (ext) {
      var fn = require.extensions[ext];
      if (typeof fn === 'function' && fn.name !== 'nodeDevHook') {
        require.extensions[ext] = createHook(fn);
      }
    });
  }
23388
function hookExtensions(_exts) {
  _lodashCollectionEach2["default"](oldHandlers, function (old, ext) {
    if (old === undefined) {
      delete require.extensions[ext];
    } else {
      require.extensions[ext] = old;
    }
  });

  oldHandlers = {};

  _lodashCollectionEach2["default"](_exts, function (ext) {
    oldHandlers[ext] = require.extensions[ext];
    registerExtension(ext);
  });
}
790957
public void add(Counter<? extends T> counter) {
        for (Map.Entry<? extends T,Integer> e : counter) {
            T t = e.getKey();
            Integer cur = counts.get(t);
            counts.put(t, (cur == null) ? e.getValue() : cur + e.getValue());
        }
    }