methods that translate to operations /////////////////////////////////////
342876
@Override
  @SuppressWarnings("deprecation")
  public <T extends CoreExecution> void performOperation(CoreAtomicOperation<T> operation) {
    if (operation instanceof AtomicOperation) {
      performOperation((AtomicOperation) operation);
    } else {
      super.performOperation(operation);
    }
  }
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);
            }
        }
    }
327702
def method_missing(method, *args, &block)
      raise ArgumentError.new("wrong number of arguments (#{args.size} for 1)") if args.size != 1
      raise NoMethodError.new("Undefined translation method #{method}") unless MapMethods.respond_to?(method)
      @maps << {name: method, field: args[0], block: block}
    end
1254124
private void applyOperations(long fromIndex, long toIndex) {
    for (long i = fromIndex + 1; i <= toIndex; i++) {
      BackupOperation operation = operations.poll();
      if (operation == null) {
        requestRestore(context.primary());
        break;
      }

      if (context.nextIndex(operation.index())) {
        switch (operation.type()) {
          case EXECUTE:
            applyExecute((ExecuteOperation) operation);
            break;
          case HEARTBEAT:
            applyHeartbeat((HeartbeatOperation) operation);
            break;
          case EXPIRE:
            applyExpire((ExpireOperation) operation);
            break;
          case CLOSE:
            applyClose((CloseOperation) operation);
            break;
        }

      } else if (operation.index() < i) {
        continue;
      } else {
        requestRestore(context.primary());
        break;
      }
    }
  }
314767
public static Map<Method, OperationId> getMethodMap(Class<?> serviceInterface) {
    if (!serviceInterface.isInterface()) {
      Map<Method, OperationId> operations = new HashMap<>();
      for (Class<?> iface : serviceInterface.getInterfaces()) {
        operations.putAll(findMethods(iface));
      }
      return operations;
    }
    return findMethods(serviceInterface);
  }
1236750
def method_missing(method, *args, &block) #:nodoc:
      method_in_snake_case = method.to_s.snake_case # this way Java/JRuby styles are compatible

      if @operations.keys.include?(method_in_snake_case)
        op_name, param_types = @operations[method_in_snake_case]
        @connection.invoke @object_name,
                           op_name,
                           args.to_java(:Object),
                           param_types.to_java(:String)
      else
        super
      end
    end
26282
private static void getMethodsRecursive(Class<?> service, List<Method> methods) {
    Collections.addAll(methods, service.getDeclaredMethods());
  }
1173981
private static Map<OperationKey, Method> fetchOpkeyToMethod(Class<?> mbeanClass) {
		Map<OperationKey, Method> opkeyToMethod = new HashMap<>();
		Method[] methods = mbeanClass.getMethods();
		for (Method method : methods) {
			if (method.isAnnotationPresent(JmxOperation.class)) {
				JmxOperation annotation = method.getAnnotation(JmxOperation.class);
				String opName = annotation.name();
				if (opName.equals("")) {
					opName = method.getName();
				}
				Class<?>[] paramTypes = method.getParameterTypes();
				Annotation[][] paramAnnotations = method.getParameterAnnotations();

				assert paramAnnotations.length == paramTypes.length;

				String[] paramTypesNames = new String[paramTypes.length];
				for (int i = 0; i < paramTypes.length; i++) {
					paramTypesNames[i] = paramTypes[i].getName();
				}
				opkeyToMethod.put(new OperationKey(opName, paramTypesNames), method);
			}
		}
		return opkeyToMethod;
	}
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}})
155903
function processOperators (ops) {
    if (!ops) return {};
    var operators = {};
    for (var i=0,k,prec;prec=ops[i]; i++) {
        for (k=1;k < prec.length;k++) {
            operators[prec[k]] = {precedence: i+1, assoc: prec[0]};
        }
    }
    return operators;
}
152375
@SuppressWarnings("unchecked")
  public <T extends CoreExecution> void performOperation(CoreAtomicOperation<T> operation) {
    LOG.debugPerformingAtomicOperation(operation, this);
    operation.execute((T) this);
  }
456775
private void addOps(Map<Key, List<TableOperation>> operations, Table schemaTable, Row row)
    {
        Key key = ((TableImpl) schemaTable).createKey(row, false);

        TableOperation ops = tableAPI.getTableOperationFactory().createPut(row, Choice.NONE, true);

        if (operations.containsKey(key))
        {
            operations.get(key).add(ops);

        }
        else
        {
            List<TableOperation> operation = new ArrayList<TableOperation>();
            operation.add(ops);
            operations.put(key, operation);
        }
    }
347301
function Operation(spec, options, fn) {
  if (typeof options === 'function') {
    fn = [].slice.call(arguments).slice(1);
    options = {};
  } else if (Array.isArray(options)) {
    fn = options;
    options = {};
  } else if (!Array.isArray(fn)) {
    fn = [].slice.call(arguments).slice(2);
  }

  if (!(this instanceof Operation)) {
    return new Operation(spec, options, fn);
  }

  if (typeof spec !== 'object') {
    throw new Error('operation spec must be an object');
  }

  debug('create operation', spec);

  this.spec = spec;
  this.options = options || {};
  this.fn = fn;
  this.middleware = {};
}
1181459
function ToDate(amount, unit, method) {
  this.amount = amount;
  this.method = method;
  this.unit = unit;
}
70702
private void processNewOperation(StorageOperation operation) {
        if (operation instanceof MergeSegmentOperation) {
            this.operations.add(operation);
            this.mergeTransactionCount.incrementAndGet();
        } else if (operation instanceof StreamSegmentSealOperation) {
            this.operations.add(operation);
            this.hasSealPending.set(true);
        } else if (operation instanceof StreamSegmentTruncateOperation) {
            this.operations.add(operation);
            this.truncateCount.incrementAndGet();
        } else if (operation instanceof CachedStreamSegmentAppendOperation) {
            // Aggregate the Append Operation.
            AggregatedAppendOperation aggregatedAppend = getOrCreateAggregatedAppend(
                    operation.getStreamSegmentOffset(), operation.getSequenceNumber());
            aggregateAppendOperation((CachedStreamSegmentAppendOperation) operation, aggregatedAppend);
        }
    }
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;
  }
596950
def operate(operator, other)
      if other.is_a?(Numeric)
        new(value.send(operator, other), unit)
      elsif other.respond_to?(:composition)
        if compatible_with?(other)
          converted = other.convert_to(unit)
          new(value.send(operator, converted.value),
              unit.send(operator, converted.unit))
        else
          new(value.send(operator, other.value),
              unit.send(operator, other.unit))
        end
      end
    end