Method without varargs to increase performance
334327
public <T> T notNull(final T object, final String message) {
        if (object == null) {
            failNull(message);
        }
        return object;
    }
465823
function proxyMethods(exec, query) {
    var methods = [].concat(END_POINT_METHODS).concat(CHAINABLE_METHODS);
    var _iteratorNormalCompletion = true;
    var _didIteratorError = false;
    var _iteratorError = undefined;

    try {
        var _loop = function _loop() {
            var name = _step.value;

            var oldMethod = query[name];
            query[name] = function () {
                var clonedQuery = query.clone();
                proxyMethods(exec, clonedQuery);

                for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
                    args[_key3] = arguments[_key3];
                }

                oldMethod.apply(clonedQuery, args);
                if (CHAINABLE_METHODS.indexOf(name) > -1) {
                    return clonedQuery;
                } else {
                    return exec(clonedQuery.toString());
                }
            };
        };

        for (var _iterator = (0, _getIterator3.default)(methods), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
            _loop();
        }
    } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
    } finally {
        try {
            if (!_iteratorNormalCompletion && _iterator.return) {
                _iterator.return();
            }
        } finally {
            if (_didIteratorError) {
                throw _iteratorError;
            }
        }
    }
}
418408
function (target, methodName, args) {
    return perform(target, function (target) {
        return target.apply(methodName, args);
    }, function (target) {
        return target[methodName].apply(target, args);
    });
}
409693
private String getMethodArgs(Method m)
    {
        StringBuffer sb = new StringBuffer();
        Class [] argTypes = m.getParameterTypes();
        for (int i = 0; i < argTypes.length; i++)
        {
            if (i != 0) sb.append(",");
            sb.append(argTypes[i].toString());
        }
        return sb.toString();
    }
1193468
@Requires({
    "method != null",
    "parameters != null",
    "!parameters.contains(null)"
  })
  public static void copyParameters(MethodModel method,
                                    List<? extends VariableModel> parameters) {
    ArrayList<VariableModel> list = new ArrayList<VariableModel>(parameters);
    for (VariableModel param : list) {
      method.addParameter(new VariableModel(param));
    }
  }
692251
private static void unwrapArgs(final Class<?>[] types, final Object[] args) {
        if (args == null) {
            return;
        }
        try {
            for (int i = 0; i < args.length; ++i) {
                args[i] = ReflectionHelper.unwrap(types[i], args[i]);
            }
        } catch (Exception e) {
            throw new IllegalArgumentException(e);
        }

    }
1142092
private void invokeFactoryMethod(MethodDefinition read, Map<Short, LocalVariableDefinition> structData, LocalVariableDefinition instance)
    {
        if (metadata.getBuilderMethod().isPresent()) {
            ThriftMethodInjection builderMethod = metadata.getBuilderMethod().get();
            read.loadVariable(instance);

            // push parameters on stack
            for (ThriftParameterInjection parameter : builderMethod.getParameters()) {
                read.loadVariable(structData.get(parameter.getId()));
            }

            // invoke the method
            read.invokeVirtual(builderMethod.getMethod())
                    .storeVariable(instance);
        }
    }
68517
def method_missing(m, *args, &block)
      if args.any?
        args = args.first if args.length == 1
        @var << { m.to_sym => args }
        instance_variable_set "@#{m}", args
      else
        instance_variable_get "@#{m}"
      end
    end
175041
public Object callFunctionWithoutNamedValues(PageContext pc, Object coll, Collection.Key key, Object[] args, boolean noNull, Object defaultValue) {
	// MUST make an independent impl for performance reasons
	try {
	    if (!noNull || NullSupportHelper.full(pc)) return callFunctionWithoutNamedValues(pc, coll, key, args);
	    Object obj = callFunctionWithoutNamedValues(pc, coll, key, args);
	    return obj == null ? defaultValue : obj;

	}
	catch (Throwable t) {
	    ExceptionUtil.rethrowIfNecessary(t);
	    return defaultValue;
	}

    }
852728
function varargs(args) {

  var argl = args.length;
  var arga;

  if (!Array.isArray(args)) {
    arga = new Array(argl);
    for (var i = 0; i < argl; i++) {
      arga[i] = args[i];
    }
  }

  return arga;
}
867937
function( object, callback, args ) {
		var name, i = 0, length = object.length;

		if ( args ) {
			if ( length === undefined ) {
				for ( name in object )
					if ( callback.apply( object[ name ], args ) === false )
						break;
			} else
				for ( ; i < length; )
					if ( callback.apply( object[ i++ ], args ) === false )
						break;

		// A special, fast, case for the most common use of each
		} else {
			if ( length === undefined ) {
				for ( name in object )
					if ( callback.call( object[ name ], name, object[ name ] ) === false )
						break;
			} else
				for ( var value = object[0];
					i < length && callback.call( value, i, value ) !== false; value = object[++i] ){}
		}

		return object;
	}
632391
def _lazy(self, method, *args):
        
        if list.__len__(self) == 0:
            self.load()
            setattr(self, method, types.MethodType(getattr(list, method), self))
        return getattr(list, method)(self, *args)
331966
@Override
    public void setMethod(byte[] method) throws UnsupportedMethodException {
        MethodValues val = MethodValues.match(method, 0, method.length);
        if (null == val) {
            throw new UnsupportedMethodException("Illegal method " + GenericUtils.getEnglishString(method));
        }
        setMethod(val);
    }
337055
function variaderize(func) {
    return function (args) {
      var allArgs = isArrayLike(args) ? args : arguments;
      return func(allArgs);
    };
  }
950482
function (name, type, callback) {
        var that = this;
        var performRequest = function () {
            if (!that.HasSparkVariable(name)) {
                callback(null, null, "Variable not found");
                return;
            }

            var token = this.sendMessage("VariableRequest", { name: name });
            var varTransformer = this.transformVariableGenerator(name, callback);
            this.listenFor("VariableValue", null, token, varTransformer, true);
        }.bind(this);

        if (this.hasFnState()) {
            //slight short-circuit, saves ~5 seconds every 100,000 requests...
            performRequest();
        }
        else {
            when(this.ensureWeHaveIntrospectionData())
                .then(
                    performRequest,
                    function (err) { callback(null, null, "Problem requesting variable: " + err);
                });
        }
    }
588769
function cloneArgs(args) {
    var newArgs = {};
    for(var key in args){
      if (key && args.hasOwnProperty(key)) {
        newArgs[key] = args[key];
      }
    }
    newArgs.isCacheableValue = args.isCacheableValue && args.isCacheableValue.bind(newArgs);
    return newArgs;
  }
163636
private void addToStringMethod(boolean keyOnly) {
        TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class);

        Modifiers modifiers = Modifiers.PUBLIC.toSynchronized(true);
        MethodInfo mi = addMethodIfNotFinal(modifiers,
                                            keyOnly ?
                                            TO_STRING_KEY_ONLY_METHOD_NAME :
                                            TO_STRING_METHOD_NAME,
                                            TypeDesc.STRING, null);

        if (mi == null) {
            return;
        }

        CodeBuilder b = new CodeBuilder(mi);
        b.newObject(stringBuilder);
        b.dup();
        b.invokeConstructor(stringBuilder, null);
        b.loadConstant(mStorableType.getName());
        invokeAppend(b, TypeDesc.STRING);

        String detail;
        if (keyOnly) {
            detail = " (key only) {";
        } else {
            detail = " {";
        }

        b.loadConstant(detail);
        invokeAppend(b, TypeDesc.STRING);

        // First pass, just print primary keys.

        LocalVariable commaCountVar = b.createLocalVariable(null, TypeDesc.INT);
        b.loadConstant(-1);
        b.storeLocal(commaCountVar);

        for (StorableProperty property : mInfo.getPrimaryKeyProperties().values()) {
            addPropertyAppendCall(b, property, commaCountVar);
        }

        // Second pass, print non-primary keys.

        if (!keyOnly) {
            for (StorableProperty property : mAllProperties.values()) {
                // Don't print any derived or join properties since they may throw an exception.
                if (!property.isPrimaryKeyMember() &&
                    (!property.isDerived()) && (!property.isJoin()))
                {
                    addPropertyAppendCall(b, property, commaCountVar);
                }
            }
        }

        b.loadConstant('}');
        invokeAppend(b, TypeDesc.CHAR);

        // For key string, also show all the alternate keys. This makes the
        // FetchNoneException message more helpful.
        if (keyOnly) {
            int altKeyCount = mInfo.getAlternateKeyCount();
            for (int i=0; i<altKeyCount; i++) {
                b.loadConstant(-1);
                b.storeLocal(commaCountVar);

                b.loadConstant(", {");
                invokeAppend(b, TypeDesc.STRING);

                StorableKey<S> key = mInfo.getAlternateKey(i);

                for (OrderedProperty<S> op : key.getProperties()) {
                    StorableProperty<S> property = op.getChainedProperty().getPrimeProperty();
                    addPropertyAppendCall(b, property, commaCountVar);
                }

                b.loadConstant('}');
                invokeAppend(b, TypeDesc.CHAR);
            }
        }

        b.invokeVirtual(stringBuilder, TO_STRING_METHOD_NAME, TypeDesc.STRING, null);
        b.returnValue(TypeDesc.STRING);
    }