@ignore

Creates multiple instances of actionType each given one action plus the next
actionType instance
177254
function initWithActions (actionType, actions) {
    var prev = actions[0].copy()
      , now
      , i
    for (i=1; i<actions.length; i++) {
        now = actions[i].copy()
        if (now) {
            prev = new actionType({one: prev, two: now})
        } else {
            break
        }
    }

    return prev
}
1073147
def _get_action_type(self, action):
        '''
        
        '''
        action_name = next(iter(action or {'': None}))
        if ':' not in action_name:
            action_name = '{}:{}'.format(self.CALL_TYPE, action_name)

        return action_name.split(':')[0] or None
1370703
function detectConflictActions(instance) {
  // Get all props and check reserved words
  let propNames = Object.getOwnPropertyNames(instance.__proto__);

  // Check internal action conflicts
  _.each(propNames, function(name) {
    assert(
      !~RESERVED_METHODS.indexOf(name),
      `Action: \`${name}\` is reserved by baiji.Controller, please rename it`
    );
  });
}
289070
public void add(final AtomicAction action) {
        if (action instanceof Action) {
            Action a = (Action)action;
            peforms.addAll(a.peforms);
            backouts.addAll(a.backouts);
            cleanUps.addAll(a.cleanUps);
        } else {
            add(new ActionBlock() {
                @Override
                public void execute() throws ActionException {
                    action.perform();
                }
            }, new ActionBlock() {
                @Override
                public void execute() throws ActionException {
                    action.backout();
                }
            }, new ActionBlock() {
                @Override
                public void execute() throws ActionException {
                    action.cleanup();
                }
            });
        }
    }
30913
private Map<ResourceType, MetricsIntValue> createTypeToCountMap(
      Collection<ResourceType> resourceTypes, String actionType) {
    Map<ResourceType, MetricsIntValue> m =
        new HashMap<ResourceType, MetricsIntValue>();
    for (ResourceType t : resourceTypes) {
      String name = (actionType + "_" + t).toLowerCase();
      MetricsIntValue value = new MetricsIntValue(name, registry);
      m.put(t, value);
    }
    return m;
  }
421117
@Override
  public void init(FilterConfig config)
      throws ServletException {
    if(config.getInitParameter("ignorePrefix") != null) {
      ignorePath = config.getInitParameter("ignorePrefix");
    }
  }
1321598
def filter_actions_by_only_exclude(callbacks, action)
      callbacks.select do |callback, options|
        if options && (only = options[:only])
          # If there is an only, make sure the action is in the list.
          [only].flatten.include?(action.to_sym)
        else
          # If no only, include it
          true
        end
      end
    end
943867
function(actionType, threadId, uniqueId) {
                switch (actionType) {

                    case chatMessageVOTypes.DELIVERY:
                        if (threadCallbacks[threadId]) {
                            var lastThreadCallbackIndex = Object.keys(threadCallbacks[threadId])
                                .indexOf(uniqueId);
                            if (lastThreadCallbackIndex !== undefined) {
                                while (lastThreadCallbackIndex > -1) {
                                    var tempUniqueId = Object.entries(threadCallbacks[threadId])[lastThreadCallbackIndex][0];
                                    if (sendMessageCallbacks[tempUniqueId] && sendMessageCallbacks[tempUniqueId].onDeliver) {
                                        if (threadCallbacks[threadId][tempUniqueId] && threadCallbacks[threadId][tempUniqueId].onSent) {
                                            sendMessageCallbacks[tempUniqueId].onDeliver(
                                                {
                                                    uniqueId: tempUniqueId
                                                });
                                            delete(sendMessageCallbacks[tempUniqueId].onDeliver);
                                            threadCallbacks[threadId][tempUniqueId].onDeliver = true;
                                        }
                                    }

                                    lastThreadCallbackIndex -= 1;
                                }
                            }
                        }
                        break;

                    case chatMessageVOTypes.SEEN:
                        if (threadCallbacks[threadId]) {
                            var lastThreadCallbackIndex = Object.keys(threadCallbacks[threadId])
                                .indexOf(uniqueId);
                            if (lastThreadCallbackIndex !== undefined) {
                                while (lastThreadCallbackIndex > -1) {
                                    var tempUniqueId = Object.entries(threadCallbacks[threadId])[lastThreadCallbackIndex][0];

                                    if (sendMessageCallbacks[tempUniqueId] && sendMessageCallbacks[tempUniqueId].onSeen) {
                                        if (threadCallbacks[threadId][tempUniqueId] && threadCallbacks[threadId][tempUniqueId].onSent) {
                                            if (!threadCallbacks[threadId][tempUniqueId].onDeliver) {
                                                sendMessageCallbacks[tempUniqueId].onDeliver(
                                                    {
                                                        uniqueId: tempUniqueId
                                                    });
                                                delete(sendMessageCallbacks[tempUniqueId].onDeliver);
                                                threadCallbacks[threadId][tempUniqueId].onDeliver = true;
                                            }

                                            sendMessageCallbacks[tempUniqueId].onSeen(
                                                {
                                                    uniqueId: tempUniqueId
                                                });

                                            delete(sendMessageCallbacks[tempUniqueId].onSeen);
                                            threadCallbacks[threadId][tempUniqueId].onSeen = true;

                                            if (threadCallbacks[threadId][tempUniqueId].onSent &&
                                                threadCallbacks[threadId][tempUniqueId].onDeliver &&
                                                threadCallbacks[threadId][tempUniqueId].onSeen) {
                                                delete threadCallbacks[threadId][tempUniqueId];
                                                delete sendMessageCallbacks[tempUniqueId];
                                            }
                                        }
                                    }

                                    lastThreadCallbackIndex -= 1;
                                }
                            }
                        }
                        break;

                    default:
                        break;
                }
            }
1190262
public static Action composite(final Collection<Applicable> applicables) {
        return new Action(input -> {
            for (Applicable action : applicables) {
                action.apply(input);
            }

            return input;
        });
    }
1203613
function (action, options) {
            var ret = this.callBase();

            if (action === "create" && ret.hasOwnProperty(this.idField) && [this.idField] === null) {
                delete ret[this.idField];
            }

            return ret;
        }
1131639
function mergeActions(actions, userActions) {
  const overrides = {};
  for (const key in userActions) {
    if (userActions.hasOwnProperty(key) && actions.hasOwnProperty(key)) {
      overrides[key] = userActions[key];
    }
  }

  return {...actions, ...overrides};
}
1330194
public static <T extends Content> IgnoringPrompt<T> create(ContentType type, SendableMessage promptMessage) {
        return new IgnoringPrompt<>(type, promptMessage);
    }
196501
def _handle_actionpush(self, length):
        """"""
        init_pos = self._src.tell()
        while self._src.tell() < init_pos + length:
            obj = _make_object("ActionPush")
            obj.Type = unpack_ui8(self._src)
            # name and how to read each type
            push_types = {
                0: ("String", self._get_struct_string),
                1: ("Float", lambda: unpack_float(self._src)),
                2: ("Null", lambda: None),
                4: ("RegisterNumber", lambda: unpack_ui8(self._src)),
                5: ("Boolean", lambda: unpack_ui8(self._src)),
                6: ("Double", lambda: unpack_double(self._src)),
                7: ("Integer", lambda: unpack_ui32(self._src)),
                8: ("Constant8", lambda: unpack_ui8(self._src)),
                9: ("Constant16", lambda: unpack_ui16(self._src)),
            }
            name, func = push_types[obj.Type]
            setattr(obj, name, func())
            yield obj
409078
function convertActionBinding(localResolver, implicitReceiver, action, bindingId) {
    if (!localResolver) {
        localResolver = new DefaultLocalResolver();
    }
    var /** @type {?} */ actionWithoutBuiltins = convertPropertyBindingBuiltins({
        createLiteralArrayConverter: function (argCount) {
            // Note: no caching for literal arrays in actions.
            return function (args) { return literalArr(args); };
        },
        createLiteralMapConverter: function (keys) {
            // Note: no caching for literal maps in actions.
            return function (args) { return literalMap(/** @type {?} */ (keys.map(function (key, i) { return [key, args[i]]; }))); };
        },
        createPipeConverter: function (name) {
            throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: " + name);
        }
    }, action);
    var /** @type {?} */ visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId);
    var /** @type {?} */ actionStmts = [];
    flattenStatements(actionWithoutBuiltins.visit(visitor, _Mode.Statement), actionStmts);
    prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);
    var /** @type {?} */ lastIndex = actionStmts.length - 1;
    var /** @type {?} */ preventDefaultVar = null;
    if (lastIndex >= 0) {
        var /** @type {?} */ lastStatement = actionStmts[lastIndex];
        var /** @type {?} */ returnExpr = convertStmtIntoExpression(lastStatement);
        if (returnExpr) {
            // Note: We need to cast the result of the method call to dynamic,
            // as it might be a void method!
            preventDefaultVar = createPreventDefaultVar(bindingId);
            actionStmts[lastIndex] =
                preventDefaultVar.set(returnExpr.cast(DYNAMIC_TYPE).notIdentical(literal(false)))
                    .toDeclStmt(null, [StmtModifier.Final]);
        }
    }
    return new ConvertActionBindingResult(actionStmts, preventDefaultVar);
}
857821
public T next(T ignoreReplicaSet) {
        if (entry == null) return null;
        entry = entry.next;
        if (entry.element.equals(ignoreReplicaSet)) {
            return entry.next.element;
        } else {
            return entry.element;
        }
    }
254963
private void generateCancel(final ActionRef action, Featurable menu)
    {
        menu.getFeature(Actionable.class).setAction(() ->
        {
            clearMenus();
            final Collection<ActionRef> parents = previous.get(action);
            createMenus(parents, parents);
        });
    }
676631
function removeAction(action, ctrl) {
      if (this.actionExists(action, ctrl)) {
        this.removeActionIcon(action, ctrl);
        delete ctrl.actionListService.actionsToIndex[action.name];
        delete ctrl.actionListService.onToggle[action.name];
        var i = ctrl.actionListService.actionsToDisplay.indexOf(action.name);
        ctrl.actionListService.actionsToDisplay.splice(i, 1);
        i = ctrl.actionListService.requiredActionsList.indexOf(action.name);
        ctrl.actionListService.requiredActionsList.splice(i, 1);
      }
    }