Combine multiple EventStore event IDs into a single Databus event key.  To get the most compact encoded string,
sort the event ID list before encoding it.
974115
static String encode(List<String> eventIds) {
        checkArgument(!eventIds.isEmpty(), "Empty event ID list.");
        if (eventIds.size() == 1) {
            return checkValid(eventIds.get(0));
        }
        // Concatenate the event IDs using a simple scheme that efficiently encodes events that are the same length and
        // share a common prefix.
        StringBuilder buf = new StringBuilder();
        String prevId = null;
        for (String eventId : eventIds) {
            checkValid(eventId);
            int commonPrefixLength;
            if (prevId == null) {
                // First event ID
                buf.append(eventId);
            } else if (prevId.length() == eventId.length() &&
                    (commonPrefixLength = getCommonPrefixLength(prevId, eventId)) > 0) {
                // Event ID is same length and shares a common prefix with the previous.  Just add the part that's different.
                buf.append(DELIM_SHARED_PREFIX).append(eventId.substring(commonPrefixLength));
            } else {
                buf.append(DELIM_REGULAR).append(eventId);
            }
            prevId = eventId;
        }
        return buf.toString();
    }
401727
public String getEventId() {
    if (Event_Type.featOkTst && ((Event_Type)jcasType).casFeat_eventId == null)
      jcasType.jcas.throwFeatMissing("eventId", "de.unihd.dbs.uima.types.heideltime.Event");
    return jcasType.ll_cas.ll_getStringValue(addr, ((Event_Type)jcasType).casFeatCode_eventId);}
427140
def per_event_source_id(event_space):
    
    def f(event):
        if is_event(event):
            v = peel(event)
            if v['source']['space'] == event_space:
                return v['source']['id']
            else:
                return None
        else:
            return None
    return _wrap_none(f)
694319
def merge_headers(event):
    
    headers = event.get('headers') or {}
    multi_headers = (event.get('multiValueHeaders') or {}).copy()
    for h in set(headers.keys()):
        if h not in multi_headers:
            multi_headers[h] = [headers[h]]
    for h in multi_headers.keys():
        multi_headers[h] = ', '.join(multi_headers[h])
    return multi_headers
413636
public static EventType getEventType(Key key)
    {
        Key ek = findAncestor(Repository.EVENTTYPE, key);
        return EventType.values()[(int)ek.getId()-1];
    }
518966
def _combine_by_key(combine, merge, num_partitions)
        num_partitions ||= default_reduce_partitions

        # Combine key
        combined = new_rdd_from_command(combine.shift, *combine)

        # Merge items
        shuffled = combined.partition_by(num_partitions)
        merge_comm = shuffled.add_command(merge.shift, *merge)

        PipelinedRDD.new(shuffled, merge_comm)
      end
382692
function (events)
		{
			var event = {};
			for (e in events)
			{
				var ref=events[e],
					e = 'event-'+e.replace('-','.');
				event[e]=ref;
				event[e].class=ref.class || 'wnEvent';
				event[e].eventName = e.split('-').pop();
				if (this.hasEvent(e))
				{
					_.merge(event[e],this.getEvent(e));
				}
				_eventsConfig[e]=_eventsConfig[e] || {};
				_.merge(_eventsConfig[e], event[e]);
			}
			return this;
		}
342148
def _merge_data_trace_events(self, event):
        """"""
        if isinstance(event, events.TraceDataTraceEvent):
            # Record the first data trace event.
            if self._pending_data_trace is None:
                self._pending_data_trace = event
            else:
                # We've got the second in a pair. If the comparator numbers are the same, then
                # we can merge the two events. Otherwise we just add them to the pending event
                # queue separately.
                if event.comparator == self._pending_data_trace.comparator:
                    # Merge the two data trace events.
                    ev = events.TraceDataTraceEvent(cmpn=event.comparator,
                        pc=(event.pc or self._pending_data_trace.pc),
                        addr=(event.address or self._pending_data_trace.address),
                        value=(event.value or self._pending_data_trace.value),
                        rnw=(event.is_read or self._pending_data_trace.is_read),
                        sz=(event.transfer_size or self._pending_data_trace.transfer_size),
                        ts=self._pending_data_trace.timestamp)
                else:
                    ev = self._pending_data_trace
                self._pending_events.append(ev)
                self._pending_data_trace = None
            return True
        # If we get a non-data-trace event while waiting for a second data trace event, then
        # just place the pending data trace event in the pending event queue.
        elif self._pending_data_trace is not None:
            self._pending_events.append(self._pending_data_trace)
            self._pending_data_trace = None
        return False
1327116
def _get_events_data(object_key: str) -> List[dict]:
    
    events_data = []
    key = _keys.events_data(object_key)
    for event_id in _get_events_list(object_key):
        event_dict = literal_eval(DB.get_hash_value(key, event_id))
        events_data.append(event_dict)
    return events_data
552449
function(eventHash) {
      // coped from Backbone
      var delegateEventSplitter = /^(\S+)\s*(.*)$/;
      var namespacedEvents = {};
      var behaviorId = this.cid;
      _.each(eventHash, function(value, key) {
        var splitEventKey = key.match(delegateEventSplitter);
        var eventName = splitEventKey[1];
        var selector = splitEventKey[2];
        var namespacedEventName = eventName + '.behavior.' + behaviorId;
        namespacedEvents[[namespacedEventName, selector].join(' ')] = value;
      });
      return namespacedEvents;
    }
108276
function(sortedInputEvents, protoIRs) {
      var handledEvents = [];
      protoIRs.forEach(function(protoIR) {
        protoIR.associatedEvents.forEach(function(event) {
          if (handledEvents.indexOf(event) >= 0) {
            console.error('double-handled event', event.typeName,
                parseInt(event.start), parseInt(event.end), protoIR);
            return;
          }
          handledEvents.push(event);
        });
      });

      sortedInputEvents.forEach(function(event) {
        if (handledEvents.indexOf(event) < 0) {
          console.error('UNHANDLED INPUT EVENT!',
              event.typeName, parseInt(event.start), parseInt(event.end));
        }
      });
    }
915844
def get_event_source_mapping_ids(EventSourceArn, FunctionName,
                                 region=None, key=None, keyid=None, profile=None):
    '''
    

    '''

    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    try:
        mappings = []
        for maps in __utils__['boto3.paged_call'](conn.list_event_source_mappings,
                                                   EventSourceArn=EventSourceArn,
                                                   FunctionName=FunctionName):
            mappings.extend([mapping['UUID']
                             for mapping in maps['EventSourceMappings']])
        return mappings
    except ClientError as e:
        return {'error': __utils__['boto3.get_error'](e)}
493599
public static String getConnectionEventString(int eventID) {
        switch (eventID) {

            case ConnectionEvent.CONNECTION_CLOSED: 
                return "CONNECTION CLOSED (" + eventID + ')'; 

            case ConnectionEvent.LOCAL_TRANSACTION_STARTED: 
                return "LOCAL TRANSACTION STARTED (" + eventID + ')'; 

            case ConnectionEvent.LOCAL_TRANSACTION_COMMITTED: 
                return "LOCAL TRANSACTION COMMITTED (" + eventID + ')'; 

            case ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK: 
                return "LOCAL TRANSACTION ROLLEDBACK (" + eventID + ')'; 

            case ConnectionEvent.CONNECTION_ERROR_OCCURRED: 
                return "CONNECTION ERROR OCCURRED (" + eventID + ')'; 

            case WSConnectionEvent.CONNECTION_ERROR_OCCURRED_NO_EVENT:
                return "CONNECTION ERROR OCCURRED NO EVENT (" + eventID + ')';

            case WSConnectionEvent.SINGLE_CONNECTION_ERROR_OCCURRED:
                return "SINGLE CONNECTION ERROR OCCURRED (" + eventID + ')';
        }

        return "UNKNOWN CONNECTION EVENT CONSTANT (" + eventID + ')'; 
    }
586932
public List<Object> getStickyEvents(Class<?> eventType, String eventId) {
        final List<Object> result = new ArrayList<>();

        synchronized (stickyEventMap) {
            for (Map.Entry<Object, String> entry : stickyEventMap.entrySet()) {
                if (N.equals(entry.getValue(), eventId) && eventType.isAssignableFrom(entry.getKey().getClass())) {
                    result.add(entry.getKey());
                }
            }
        }

        return result;
    }
1100004
public EventFilter withEventStatusCodes(EventStatusCode... eventStatusCodes) {
        java.util.ArrayList<String> eventStatusCodesCopy = new java.util.ArrayList<String>(eventStatusCodes.length);
        for (EventStatusCode value : eventStatusCodes) {
            eventStatusCodesCopy.add(value.toString());
        }
        if (getEventStatusCodes() == null) {
            setEventStatusCodes(eventStatusCodesCopy);
        } else {
            getEventStatusCodes().addAll(eventStatusCodesCopy);
        }
        return this;
    }
333483
protected String getBulkData(List<SimpleDataEvent> events) {
    StringBuilder builder = new StringBuilder();
    for (SimpleDataEvent event : events) {
      builder.append(JSONUtils.getElasticSearchBulkHeader(event, this.indexName, this.typeName));
      builder.append("\n");
      builder.append(JSONUtils.getElasticSearchAddDocument(event.pairs()));
      builder.append("\n");
    }
    return builder.toString();
  }
1083785
private void getNextEventIndex() {
        for (int i = next + 1; i < events.size(); i++) {
            String evName = getValueOr(events.get(i), "event", "");
            if (evName.equals(eventType)) {
                next = i;
                return;
            }
        }
        next = events.size();
    }