will accumulate in a new list.
517148
private List<Entry> getPendingWrites() {
    synchronized (this) {
      List<Entry> save = this.pendingWrites;
      this.pendingWrites = new LinkedList<>();
      return save;
    }
  }
1145150
public void prepareCommit() {

        if (m_baseCollection instanceof List) {
            List<?> list = (List<?>)m_baseCollection;
            list.clear();
        } else if (m_baseCollection instanceof SortedMap) {
            SortedMap<?, ?> map = (SortedMap<?, ?>)m_baseCollection;
            map.clear();
        }
    }
197012
private void initializeList() {
		FavouritesCommService.getSearchFavourites(new DataCallback<List<SearchFavourite>>() {
			public void execute(List<SearchFavourite> result) {
				favouriteItems.getDataAsRecordList().removeList(favouriteItems.getRecords());
				for (SearchFavourite sf : result) {
					favouriteItems.addData(new FavouriteListRecord(sf));
				}
			}
		});
	}
1141704
public void put(String name, List<String> list) {
        remove(name);
        for (String v : list)
            if (v != null)
                add(name, v);
    }
295455
def insert(self, index, x):
        
        self.check_insertion(x)

        self.real_list.insert(index, x)
        self._items |= {x}
1107511
def addList(self, source_id, dir_path, is_recurcive=False, timestamp_reception=None, training_metadata=[]):
        """"""
        if not path.isdir(dir_path):
            raise ValueError(dir_path + ' is not a directory')
        files_to_send = _get_files_from_dir(dir_path, is_recurcive)
        succeed_upload = {}
        failed_upload = {}
        for file_path in files_to_send:
            try:
                resp = self.add(source_id=source_id,
                    file_path=file_path, profile_reference="",
                    timestamp_reception=timestamp_reception, training_metadata=training_metadata)
                if resp['code'] != 200 and resp['code'] != 201:
                    failed_upload[file_path] = ValueError('Invalid response: ' + str(resp))
                else:
                    succeed_upload[file_path] = resp
            except BaseException as e:
                failed_upload[file_path] = e
        result = {
            'success': succeed_upload,
            'fail': failed_upload
        }
        return result
822908
function callNext(list, results, propogate) {
    var ret = new Promise().callback();
    forEach(list, function (listItem) {
        ret = ret.chain(propogate ? listItem : bindIgnore(null, listItem));
        if (!propogate) {
            ret.addCallback(function (res) {
                results.push(res);
                res = null;
            });
        }
    });
    return propogate ? ret.promise() : ret.chain(results);
}
719765
public void markListDelivered(List list)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "markListDelivered", list);

    int len = list.size();
    for (int i = 0; i < len; i++)
    {
      AIValueTick valueTick = (AIValueTick) list.get(i);
      valueTick.setDelivered(true);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "markListDelivered");

  }
1207842
function addToList(i, L, R) {
    R[L[i + 1]] = R[i];
    L[R[i]] = L[i + 1];
    R[i] = i + 1;
    L[i + 1] = i;
}
343325
private void add_to_freelist(long addr, int size)
    {
        int list_index;

        if (size <= last_quick_size_block) {
            list_index = calculate_list_index_for_dealloc(size);
        } else {
            list_index = last_ql_index;
        }
        add_new_block_to_freelist(addr, size, list_index);
    }
1369271
def append(self, list_name, value):
        """"""
        with self.lock:
            l = self.lists.get(list_name)
            if l:
                l.append(value)
            else:
                l = [value]
            self.lists[list_name] = l
1281270
def extend(self, sequence):
        """"""
        self.__field.validate(sequence)
        return list.extend(self, sequence)
1210702
def extend(self, collection):
        """"""
        l_ids = set([a.Id for a in self])
        for acces in collection:
            if not acces.Id in l_ids:
                list.append(self,acces)
                info = collection.get_info(Id=acces.Id)
                if info:
                    self.infos[acces.Id] = info
1061462
def add(self, val):
        """"""
        _maxes, _lists = self._maxes, self._lists

        if _maxes:
            pos = bisect_right(_maxes, val)

            if pos == len(_maxes):
                pos -= 1
                _maxes[pos] = val
                _lists[pos].append(val)
            else:
                insort(_lists[pos], val)

            self._expand(pos)
        else:
            _maxes.append(val)
            _lists.append([val])

        self._len += 1
674455
function(aContexts, oBindingInfo, bSuppressInvalidate) {
			for (var i = 0; i < aContexts.length; i++) {
				this.addListItem(aContexts[i], oBindingInfo, bSuppressInvalidate);
			}
		}
1215310
def lcumsum (inlist):
    
    newlist = copy.deepcopy(inlist)
    for i in range(1,len(newlist)):
        newlist[i] = newlist[i] + newlist[i-1]
    return newlist
959361
def new_page(record, values = [])
      idx = @page_counter
      @page_counter += 1
      mark_page_as_modified(IDListPage.new(self, record, idx, values))
      idx
    end