TODO: Expand all function that work on entries to work with the Budget.
487982
private Entry insert(ClusKernel pointToInsert, ClusKernel carriedBuffer,
            Node currentNode, Entry parentEntry, Budget budget, long timestamp) {
        assert (currentNode != null);
        assert (currentNode.isLeaf()
                || currentNode.getEntries()[0].getChild() != null);

        currentNode.makeOlder(timestamp, this.negLambda);

        // This variable will be changed from to null to an actual reference
        // in the following if-else block if we have to insert something here,
        // either because this is a leaf, or because of split propagation.
        Entry toInsertHere = null;

        if (currentNode.isLeaf()) {
            // At the end of the function the entry will be inserted.
            toInsertHere = new Entry(this.numberDimensions,
                    pointToInsert, timestamp, parentEntry, currentNode);
        } else {

            Entry bestEntry = currentNode.nearestEntry(pointToInsert);
            bestEntry.aggregateCluster(pointToInsert, timestamp,
                    this.negLambda);

            boolean isCarriedBufferEmpty = carriedBuffer.isEmpty();

            Entry bestBufferEntry = null;
            if (!isCarriedBufferEmpty) {
                bestBufferEntry = currentNode.nearestEntry(carriedBuffer);
                bestBufferEntry.aggregateCluster(carriedBuffer, timestamp,
                        this.negLambda);
            }

            if (!budget.hasMoreTime()) {
                bestEntry.aggregateToBuffer(pointToInsert, timestamp,
                        this.negLambda);
                if (!isCarriedBufferEmpty) {
                    bestBufferEntry.aggregateToBuffer(carriedBuffer,
                            timestamp, this.negLambda);
                }
                return null;
            }

            // If the way of the buffer differs from the way of the point to
            // be inserted, leave the buffer here.
            if (!isCarriedBufferEmpty && (bestEntry != bestBufferEntry)) {
                bestBufferEntry.aggregateToBuffer(carriedBuffer, timestamp,
                        this.negLambda);
                carriedBuffer.clear();
            }
            // Take the buffer of the best entry for the point to be inserted
            // along.
            ClusKernel takeAlongBuffer = bestEntry.emptyBuffer(timestamp,
                    this.negLambda);
            carriedBuffer.add(takeAlongBuffer);

            // Recursive call.
            toInsertHere = insert(pointToInsert, carriedBuffer,
                    bestEntry.getChild(), bestEntry, budget, timestamp);
        }

        // If the above block has a new Entry for this place insert it.
        if (toInsertHere != null) {
            return this.insertHere(toInsertHere, currentNode, parentEntry,
                    carriedBuffer, budget, timestamp);
        }

        // If nothing else needs to be done in all the above levels
        // return null to signalize it.
        return null;
    }
272674
def append(self, x):
        
        super(EntriesList, self).append(x)

        if self.entries_collection is not None:
            self.entries_collection.add_entry(self.date, x)
204667
def prop_budget(self, budget):
        

        if self.maplesat:
            pysolvers.maplechrono_pbudget(self.maplesat, budget)
204442
@Override
    public boolean addAll(int location, Collection<? extends E> collection) {
        // int totalNeededSize = size() + collection.size();
        // int overhead = totalNeededSize - maxSize;
        // if(overhead > 0) {
        // removeRange(0, overhead);
        // }
        // return super.addAll(location, collection);
        if(location == size()){
            return super.addAll(location, collection);
        }
        throw new UnsupportedOperationException();
    }
662278
function expandToItem(treeId,itemId) {
	var ul = document.getElementById(treeId);
	if (ul == null) { return false; }
	var ret = expandCollapseList(ul,nodeOpenClass,itemId);
	if (ret) {
		var o = document.getElementById(itemId);
		if (o.scrollIntoView) {
			o.scrollIntoView(false);
		}
	}
}
1114882
function expandForAll(array, makeMask) {
			var files = [];
			ensureArray(array).forEach(function(item) {
				files = files.concat(grunt.file.expand(makeMask(item)));
			});
			return files;
		}
583111
def conf_budget(self, budget):
        

        if self.glucose:
            pysolvers.glucose41_cbudget(self.glucose, budget)
1004586
private void addEntryToResult(Map<LocalDate, List<Entry<?>>> result, Entry<?> entry, LocalDate startDate, LocalDate endDate) {
        LocalDate entryStartDate = entry.getStartDate();
        LocalDate entryEndDate = entry.getEndDate();

        // entry does not intersect with time interval
        if (entryEndDate.isBefore(startDate) || entryStartDate.isAfter(endDate)) {
            return;
        }

        if (entryStartDate.isAfter(startDate)) {
            startDate = entryStartDate;
        }

        if (entryEndDate.isBefore(endDate)) {
            endDate = entryEndDate;
        }

        LocalDate date = startDate;
        do {
            result.computeIfAbsent(date, it -> new ArrayList<>()).add(entry);
            date = date.plusDays(1);
        } while (!date.isAfter(endDate));
    }
23967
function expand (resource, e) {
    e && [].concat(e)
      .forEach(function (innerResource) {
        var plural = pluralize(innerResource)
        if (db.get(plural).value()) {
          var prop = innerResource + 'Id'
          resource[innerResource] = db.get(plural).getById(resource[prop]).value()
        }
      })
  }
217198
def conf_budget(self, budget):
        

        if self.maplesat:
            pysolvers.maplecm_cbudget(self.maplesat, budget)
390
def prop_budget(self, budget):
        

        if self.minisat:
            pysolvers.minisatgh_pbudget(self.minisat, budget)
374190
def expand_value(self, **kwargs):
        
        selection = []
        for v in self.get_value(**kwargs):
            for choice in self.choices:
                if v==choice and choice not in selection:
                    selection.append(choice)
                elif fnmatch(choice, v) and choice not in selection:
                    selection.append(choice)

        return selection
1202025
def prop_budget(self, budget):
        

        if self.minicard:
            pysolvers.minicard_pbudget(self.minicard, budget)
539027
function mix(self, ref, expanded) {
	switch (typeof(ref)) {
		case 'undefined': return self;
		case 'function': return expanded ? ref : undefined;
		case 'object':
			if (isValueObject(ref)) return (ref !== null) ? ref.valueOf() : null;
			if (expanded && ((ref instanceof Promise) || (self instanceof Promise))) return ref;
			if (typeof(self) != 'object' || isValueObject(self)) self = {};
			Object.keys(ref).forEach(function(key) {
				self[key] = mix(self[key], ref[key], expanded)
			})
			return self
	}
	return ref;
}
153955
public <T extends Function> T addFunction(T function) {
		addItem(function, functions, "functions");
		return function;
	}
336846
def expandf(m, format):  # noqa A002
    """"""

    _assert_expandable(format, True)
    return _apply_replace_backrefs(m, format, flags=FORMAT)
316659
function expand( day ) {
  switch ( day ) {
  case 'weekend':
  case 'weekday':
    return _( days ).pickBy( value => value.type === day ).keys();
  default:
    return [ day ];
  }
}