Recursive method to update the count in the outlines.
428970
void traverseOutlineCount(PdfOutline outline) {
        ArrayList kids = outline.getKids();
        PdfOutline parent = outline.parent();
        if (kids.isEmpty()) {
            if (parent != null) {
                parent.setCount(parent.getCount() + 1);
            }
        }
        else {
            for (int k = 0; k < kids.size(); ++k) {
                traverseOutlineCount((PdfOutline)kids.get(k));
            }
            if (parent != null) {
                if (outline.isOpen()) {
                    parent.setCount(outline.getCount() + parent.getCount() + 1);
                }
                else {
                    parent.setCount(parent.getCount() + 1);
                    outline.setCount(-outline.getCount());
                }
            }
        }
    }
955051
def update_subtotals(self, current, sub_key):
        

        if not self.sub_counts.get(sub_key):
            self.sub_counts[sub_key] = {}
        for item in current:
            try:
                self.sub_counts[sub_key][item] += 1
            except KeyError:
                self.sub_counts[sub_key][item] = 1
815859
def _refresh_outlineexplorer(self, index=None, update=True, clear=False):
        """"""
        oe = self.outlineexplorer
        if oe is None:
            return
        if index is None:
            index = self.get_stack_index()
        if self.data:
            finfo = self.data[index]
            oe.setEnabled(True)
            if finfo.editor.oe_proxy is None:
                finfo.editor.oe_proxy = OutlineExplorerProxyEditor(
                    finfo.editor, finfo.filename)
            oe.set_current_editor(finfo.editor.oe_proxy,
                                  update=update, clear=clear)
            if index != self.get_stack_index():
                # The last file added to the outline explorer is not the
                # currently focused one in the editor stack. Therefore,
                # we need to force a refresh of the outline explorer to set
                # the current editor to the currently focused one in the
                # editor stack. See PR #8015.
                self._refresh_outlineexplorer(update=False)
                return
        self._sync_outlineexplorer_file_order()
1188164
function() {
			var parent = this.parent;
			var ix = parent.children.indexOf(this);
			var items = utils.flatten(arguments);
			spliceFn.apply(parent.children, [ix, 1].concat(items));
			
			// update parent
			items.forEach(function(item) {
				item.parent = parent;
			});
		}
1331057
function updateColsCount()
	{
		$this->_colsCount = sizeof($this->flds);
		foreach($this->_belongsTo as $foreignTable)
			$this->_colsCount += sizeof($foreignTable->TableInfo()->flds);
		foreach($this->_hasMany as $foreignTable)
			$this->_colsCount += sizeof($foreignTable->TableInfo()->flds);
	}
856397
protected void updatePatternSet(PatternSet value, String xmlTag, Counter counter, Element element)
   {
      boolean shouldExist = value != null;
      Element root = updateElement(counter, element, xmlTag, shouldExist);
      if (shouldExist)
      {
         Counter innerCount = new Counter(counter.getDepth() + 1);
         findAndReplaceSimpleLists(innerCount, root, value.getIncludes(), "includes", "include");
         findAndReplaceSimpleLists(innerCount, root, value.getExcludes(), "excludes", "exclude");
      }
   }
681933
private void updateCurrentAndNextSectionOfBuffer(int i) {
		int next = iterators.length + i;
		timestamps[i] = timestamps[next];
		values[i] = values[next];
		if (iterators[i].hasNext()) {
			putDataPoint(next, (Entry<Long, Double>) iterators[i].next());
		} else {
			markEndTimeSeries(i);
		}
	}
1168120
def setColumnCount( self, count ):
        
        super(XColorTreeWidget, self).setColumnCount(count)
        
        header = self.header()
        header.setResizeMode(0, header.Stretch)
        for i in range(1, count):
            header.setResizeMode(i, header.Fixed)
552818
function () {
            var self = this;
            self.renderChildren.apply(self, arguments);    // only sync child sub tree at root node
            // only sync child sub tree at root node
            if (self === self.get('tree')) {
                updateSubTreeStatus(self, self, -1, 0);
            }
        }
411330
private void updateStatistics() {
        final PNCounterService service = getService();
        final LocalPNCounterStatsImpl stats = service.getLocalPNCounterStats(name);
        if (delta > 0) {
            stats.incrementIncrementOperationCount();
        } else if (delta < 0) {
            stats.incrementDecrementOperationCount();
        }
        stats.setValue(getBeforeUpdate ? (response.getValue() + delta) : response.getValue());
    }
1263571
private void update() {
        if (!predefinedPriori) {
            for (int c = 0; c < k; c++) {
                priori[c] = (nc[c] + EPSILON) / (n + k * EPSILON);
            }
        }

        if (model == Model.MULTINOMIAL || model == Model.POLYAURN) {
            for (int c = 0; c < k; c++) {
                for (int t = 0; t < p; t++) {
                    condprob[c][t] = (ntc[c][t] + sigma) / (nt[c] + sigma * p);
                }
            }
        } else {
            for (int c = 0; c < k; c++) {
                for (int t = 0; t < p; t++) {
                    condprob[c][t] = (ntc[c][t] + sigma) / (nc[c] + sigma * 2);
                }
            }
        }
    }
613637
def update(self, data):
        """"""
        for character in data:
            if PY3:
                ch = character
            else:
                ch = ord(character)
            self.count += 1

            # incr accumulators for triplets
            if self.lastch[1] > -1:
                self.acc[self.tran3(ch, self.lastch[0], self.lastch[1], 0)] +=1
            if self.lastch[2] > -1:
                self.acc[self.tran3(ch, self.lastch[0], self.lastch[2], 1)] +=1
                self.acc[self.tran3(ch, self.lastch[1], self.lastch[2], 2)] +=1
            if self.lastch[3] > -1:
                self.acc[self.tran3(ch, self.lastch[0], self.lastch[3], 3)] +=1
                self.acc[self.tran3(ch, self.lastch[1], self.lastch[3], 4)] +=1
                self.acc[self.tran3(ch, self.lastch[2], self.lastch[3], 5)] +=1
                self.acc[self.tran3(self.lastch[3], self.lastch[0], ch, 6)] +=1
                self.acc[self.tran3(self.lastch[3], self.lastch[2], ch, 7)] +=1

            # adjust last seen chars
            self.lastch = [ch] + self.lastch[:3]
864011
def mark(self, lineno, count=1):
        
        self.sourcelines[lineno] = self.sourcelines.get(lineno, 0) + count
903542
protected void decrementCursorCount(long count) {
    this.trie.nodes.update(index, data -> data.setCursorCount(Math.max(data.cursorCount - count, 0)));
    if (null != getParent()) {
      getParent().decrementCursorCount(count);
    }
  }
282174
private void updateCounter() {

        m_counter.replaceData(
            Collections.singletonMap(
                CmsVaadinUtils.getMessageText(Messages.GUI_MODULES_STATISTICS_ROW_COUNT_0),
                String.valueOf(getContainerDataSource().size())));
    }
1274602
def update_count(self):
        
        node_rating_count = self.node.rating_count
        node_rating_count.rating_count = self.node.rating_set.count()
        node_rating_count.rating_avg = self.node.rating_set.aggregate(rate=Avg('value'))['rate']

        # if all ratings are deleted the value will be None!
        if node_rating_count.rating_avg is None:
            # set to 0 otherwise we'll get an exception
            node_rating_count.rating_avg = 0

        node_rating_count.save()
188804
public void incrementCount2D(K first, K second, double count) {
    if (depth != 2) {
      wrongDepth(); //throws exception
    }

    this.addToTotal(count);
    GeneralizedCounter<K> next = this.conditionalizeHelper(first);
    next.incrementCount1D(second, count);
  }