methods that translate to operations /////////////////////////////////////
975487
@Override
  public void signal(String signalName, Object signalData) {
    if (getActivity() == null) {
      throw new PvmException("cannot signal execution " + this.id + ": it has no current activity");
    }

    SignallableActivityBehavior activityBehavior = (SignallableActivityBehavior) activity.getActivityBehavior();
    try {
      activityBehavior.signal(this, signalName, signalData);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new PvmException("couldn't process signal '" + signalName + "' on activity '" + activity.getId() + "': " + e.getMessage(), e);
    }
  }
989272
public static void translate(Syntax syntax,
            Definition source, int[] moves, int[] symbols, Definition target, int modifier) throws GenericException {
        IntBitSet[] stoppers;
        List<Definition> targets;
        int i;

        if (moves.length - 1 != symbols.length) {
            throw new IllegalArgumentException();
        }

        stoppers = new IntBitSet[moves.length];
        targets = new ArrayList<Definition>();
        targets.add(target);
        for (i = 0; i < symbols.length; i++) {
            stoppers[i] = new IntBitSet();
            stoppers[i].add(symbols[i]);
        }
        stoppers[i] = new IntBitSet();
        stoppers[i].add(target.getAttribute().symbol);

        translate(syntax, modifier, source, targets, moves, stoppers);
    }
1367367
function operate(input, direct, method) {
    var node = input[0],
      state = /er/.test(method) ? _indeterminate : /bl/.test(method) ? _disabled : _checked,
      active = method == _update ? {
        checked: node[_checked],
        disabled: node[_disabled],
        indeterminate: input.attr(_indeterminate) == 'true' || input.attr(_determinate) == 'false'
      } : node[state];

    // Check, disable or indeterminate
    if (/^(ch|di|in)/.test(method) && !active) {
      on(input, state);

    // Uncheck, enable or determinate
    } else if (/^(un|en|de)/.test(method) && active) {
      off(input, state);

    // Update
    } else if (method == _update) {

      // Handle states
      for (var state in active) {
        if (active[state]) {
          on(input, state, true);
        } else {
          off(input, state, true);
        };
      };

    } else if (!direct || method == 'toggle') {

      // Helper or label was clicked
      if (!direct) {
        input[_callback]('ifClicked');
      };

      // Toggle checked state
      if (active) {
        if (node[_type] !== _radio) {
          off(input, state);
        };
      } else {
        on(input, state);
      };
    };
  }
174918
private static void pushOp(String operation, Stack<MetricExpression> expressions, Stack<String> operations) {
        if (operation.equals("(")) {
            operations.push(operation);
            return;
        }

        if (operation.equals(")")) {
            while (!operations.isEmpty()) {
                String op = operations.pop();
                if (op.equals("("))
                    return;
                doOperation(op, expressions, operations);
            }
        }


        if (operation.equals("*") || operation.equals("/")) {
            if (operations.isEmpty())
                operations.push(operation);
            else {
                String op1 = operations.peek();
                if (!op1.equals("(")) {
                    if (op1.equals("+") || op1.equals("-")) {
                        operations.push(operation);
                    } else {
                        doOperation(operations.pop(), expressions, operations);
                        operations.push(operation);
                    }
                } else {
                    operations.push(operation);
                }

            }
        }
        if (operation.equals("+") || operation.equals("-")) {
            if (operations.isEmpty())
                operations.push(operation);
            else {
                String op1 = operations.peek();
                if (!op1.equals("(")) {
                    doOperation(operations.pop(), expressions, operations);
                }
                operations.push(operation);
            }
        }
    }
991742
@Override
    public void applyImplicitParameters(ReaderContext context, Operation operation, Method method) {
        // copied from io.swagger.servlet.extensions.ServletReaderExtension
        final ApiImplicitParams implicitParams = method.getAnnotation(ApiImplicitParams.class);
        if (implicitParams != null && implicitParams.value().length > 0) {
            for (ApiImplicitParam param : implicitParams.value()) {
                final Parameter p = readImplicitParam(context.getSwagger(), param);
                if (p != null) {
                    if (p instanceof BodyParameter && param.format() != null)
                        p.getVendorExtensions().put("format", param.format());
                    operation.parameter(p);
                }
            }
        }
    }
422238
def operations
      validate_operations
      @operations ||= @raw_operations.map do |operation, properties|
        Operation.new(verb: operation, properties: properties, path: self)
      end
    end
12499
private <T> T execute(Operation<T> operation) throws Exception {
    return execute(operation, null);
  }
954570
private void processMethods(Set<ExecutableElement> hookMethodsFromInterfaces) {
    List<ExecutableElement> templateMethods = ElementFilter
        .methodsIn(component.getEnclosedElements())
        .stream()
        .filter(ComponentGeneratorsUtil::isMethodVisibleInTemplate)
        .filter(method -> !isHookMethod(component, method, hookMethodsFromInterfaces))
        .collect(Collectors.toList());

    templateMethods.forEach(method -> {
      String methodName = method.getSimpleName().toString();
      String exposedMethodName = exposeExistingJavaMethodToJs(method);
      optionsBuilder.addStatement("options.addMethod($S, p.$L)", methodName, exposedMethodName);
    });
  }
267275
private static Map<Method, OperationId> findMethods(Class<?> type) {
    Map<Method, OperationId> operations = new HashMap<>();
    for (Method method : type.getDeclaredMethods()) {
      OperationId operationId = getOperationId(method);
      if (operationId != null) {
        if (operations.values().stream().anyMatch(operation -> operation.id().equals(operationId.id()))) {
          throw new IllegalStateException("Duplicate operation name '" + operationId.id() + "'");
        }
        operations.put(method, operationId);
      }
    }
    for (Class<?> iface : type.getInterfaces()) {
      operations.putAll(findMethods(iface));
    }
    return operations;
  }
1217661
public void setOperations(java.util.Collection<BatchReadOperation> operations) {
        if (operations == null) {
            this.operations = null;
            return;
        }

        this.operations = new java.util.ArrayList<BatchReadOperation>(operations);
    }
242722
def _op(self, operation, other, *allowed):
		""""""
		
		f = self._field
		
		if self._combining:  # We are a field-compound query fragment, e.g. (Foo.bar & Foo.baz).
			return reduce(self._combining,
					(q._op(operation, other, *allowed) for q in f))  # pylint:disable=protected-access
		
		# Optimize this away in production; diagnosic aide.
		if __debug__ and _complex_safety_check(f, {operation} | set(allowed)):  # pragma: no cover
			raise NotImplementedError("{self!r} does not allow {op} comparison.".format(self=self, op=operation))
		
		if other is not None:
			other = f.transformer.foreign(other, (f, self._document))
		
		return Filter({self._name: {operation: other}})
1043456
def call(obj, args, ctx)
      # Find out operation type (query, mutation, etc.)
      op_type = ctx.query.selected_operation.operation_type.to_sym

      # Ensure there is a registered resolver for it
      unless (resolver = ctx[:__giraph_resolver__][op_type])
        raise UnknownOperation, "No resolver found for '#{op_type}' op type"
      end

      # Call the requested method on resolver
      resolver.public_send(@method_name, obj, args, ctx)
    end
1211828
def operation(self, name):
        
        try:
            return self.operations[name]
        except Exception, e:
            raise MethodNotFound(name)
814730
function generateOperations (plural) {
    var operations = [];

    controller.methods().forEach(function (verb) {
      var operation = {};
      var titlePlural = capitalize(controller.model().plural());
      var titleSingular = capitalize(controller.model().singular());

      // Don't do head, post/put for single/plural
      if (verb === 'head') return;
      if (verb === 'post' && !plural) return;
      if (verb === 'put' && plural) return;

      // Use the full word
      if (verb === 'del') verb = 'delete';

      operation.httpMethod = verb.toUpperCase();

      if (plural) operation.nickname = verb + titlePlural;
      else operation.nickname = verb + titleSingular + 'ById';

      operation.responseClass = titleSingular; // TODO sometimes an array!

      if (plural) operation.summary = capitalize(verb) + ' some ' + controller.model().plural();
      else operation.summary = capitalize(verb) + ' a ' + controller.model().singular() + ' by its unique ID';

      operation.parameters = generateParameters(verb, plural);
      operation.errorResponses = generateErrorResponses(plural);

      operations.push(operation);
    });

    return operations;
  }
321623
function(from, to, op) {
    if (op) this.iterN(from - this.first, to - from, op)
    else this.iterN(this.first, this.first + this.size, from)
  }
66643
def _get_op_handler(operation):
        
        try:
            mod_to_import, attr_path = operation.split('#')
            op = import_module(mod_to_import)
            for part in attr_path.split('.'):
                op = getattr(op, part)
            if isinstance(op, types.FunctionType):
                return op
            return six.get_method_function(op)
        except (ValueError, AttributeError):
            raise ValueError("The operation '{}' is invalid.".format(operation))
1081275
@Override
	protected GroupCombineOperatorBase<?, OUT, ?> translateToDataFlow(Operator<IN> input) {

		String name = getName() != null ? getName() : "GroupCombine at " + defaultName;

		// distinguish between grouped reduce and non-grouped reduce
		if (grouper == null) {
			// non grouped reduce
			UnaryOperatorInformation<IN, OUT> operatorInfo = new UnaryOperatorInformation<>(getInputType(), getResultType());
			GroupCombineOperatorBase<IN, OUT, GroupCombineFunction<IN, OUT>> po =
					new GroupCombineOperatorBase<>(function, operatorInfo, new int[0], name);

			po.setInput(input);
			// the parallelism for a non grouped reduce can only be 1
			po.setParallelism(1);
			return po;
		}

		if (grouper.getKeys() instanceof SelectorFunctionKeys) {

			@SuppressWarnings("unchecked")
			SelectorFunctionKeys<IN, ?> selectorKeys = (SelectorFunctionKeys<IN, ?>) grouper.getKeys();

			if (grouper instanceof SortedGrouping) {

				SortedGrouping<IN> sortedGrouping = (SortedGrouping<IN>) grouper;
				SelectorFunctionKeys<IN, ?> sortKeys = sortedGrouping.getSortSelectionFunctionKey();
				Ordering groupOrder = sortedGrouping.getGroupOrdering();

				PlanUnwrappingSortedGroupCombineOperator<IN, OUT, ?, ?> po =
					translateSelectorFunctionSortedReducer(selectorKeys, sortKeys, groupOrder, function, getResultType(), name, input);

				po.setParallelism(this.getParallelism());
				return po;
			} else {
				PlanUnwrappingGroupCombineOperator<IN, OUT, ?> po = translateSelectorFunctionReducer(
						selectorKeys, function, getResultType(), name, input);

				po.setParallelism(this.getParallelism());
				return po;
			}
		}
		else if (grouper.getKeys() instanceof Keys.ExpressionKeys) {

			int[] logicalKeyPositions = grouper.getKeys().computeLogicalKeyPositions();
			UnaryOperatorInformation<IN, OUT> operatorInfo = new UnaryOperatorInformation<>(getInputType(), getResultType());
			GroupCombineOperatorBase<IN, OUT, GroupCombineFunction<IN, OUT>> po =
					new GroupCombineOperatorBase<>(function, operatorInfo, logicalKeyPositions, name);

			po.setInput(input);
			po.setParallelism(getParallelism());

			// set group order
			if (grouper instanceof SortedGrouping) {
				SortedGrouping<IN> sortedGrouper = (SortedGrouping<IN>) grouper;

				int[] sortKeyPositions = sortedGrouper.getGroupSortKeyPositions();
				Order[] sortOrders = sortedGrouper.getGroupSortOrders();

				Ordering o = new Ordering();
				for (int i = 0; i < sortKeyPositions.length; i++) {
					o.appendOrdering(sortKeyPositions[i], null, sortOrders[i]);
				}
				po.setGroupOrder(o);
			}

			return po;
		}
		else {
			throw new UnsupportedOperationException("Unrecognized key type.");
		}
	}