Check if argument matches parameter.
498845
protected function checkArgumentNameMatchParam()
    {
        $validator  = new DoesArgumentNameMatchParamValidator;
        $validator->initialize($this->context);

        return $validator->validate($this->validationValue, new DoesArgumentNameMatchParam);
    }
1144561
private boolean matches(ParameterizedType requiredType, ParameterizedType beanType) {
        if (!requiredType.getRawType().equals(beanType.getRawType())) {
            return false;
        }
        if (requiredType.getActualTypeArguments().length != beanType.getActualTypeArguments().length) {
            throw new IllegalArgumentException("Invalid argument combination " + requiredType + "; " + beanType);
        }
        for (int i = 0; i < requiredType.getActualTypeArguments().length; i++) {
            if (!parametersMatch(requiredType.getActualTypeArguments()[i], beanType.getActualTypeArguments()[i])) {
                return false;
            }
        }
        return true;
    }
565661
private boolean isNamedParam(String arg) {
        return arg.startsWith("--") && (arg.indexOf('=') > 2 && validFirstChar(arg.charAt(2)));
    }
677286
def is_valid(cls, arg):
        """"""
        return isinstance(arg, (int, long)) and (not isinstance(arg, bool))
1233225
def _match_data_to_parameter(cls, data):
    
    in_value = data["in"]
    for cls in [QueryParameter, HeaderParameter, FormDataParameter,
                PathParameter, BodyParameter]:
        if in_value == cls.IN:
            return cls
    return None
472803
def find_parameter(self, name):
        """"""
        name = self.normalize_name(name)
        arg = self.args.get(name)
        return None if arg is None else arg.parameter
675207
def match_function(self, args, kwargs, match_args=(), star_arg=None, kwd_args=(), dubstar_arg=None):
        """"""
        self.match_in_args_kwargs(match_args, args, kwargs, allow_star_args=star_arg is not None)
        if star_arg is not None:
            self.match(star_arg, args + "[" + str(len(match_args)) + ":]")
        self.match_in_kwargs(kwd_args, kwargs)
        with self.down_a_level():
            if dubstar_arg is None:
                self.add_check("not " + kwargs)
            else:
                self.match(dubstar_arg, kwargs)
678424
def validate_args(**args):
	
	if not args['query']:
		print("\nMissing required query argument.")
		sys.exit()

	for key in DEFAULTS:
		if key not in args:
			args[key] = DEFAULTS[key]

	return args
1270380
def __args_check(self, valid, args=None, kwargs=None):
        '''
        
        '''
        if not isinstance(valid, list):
            valid = [valid]
        for cond in valid:
            if not isinstance(cond, dict):
                # Invalid argument
                continue
            # whitelist args, kwargs
            cond_args = cond.get('args', [])
            good = True
            for i, cond_arg in enumerate(cond_args):
                if args is None or len(args) <= i:
                    good = False
                    break
                if cond_arg is None:  # None == '.*' i.e. allow any
                    continue
                if not self.match_check(cond_arg, six.text_type(args[i])):
                    good = False
                    break
            if not good:
                continue
            # Check kwargs
            cond_kwargs = cond.get('kwargs', {})
            for k, v in six.iteritems(cond_kwargs):
                if kwargs is None or k not in kwargs:
                    good = False
                    break
                if v is None:  # None == '.*' i.e. allow any
                    continue
                if not self.match_check(v, six.text_type(kwargs[k])):
                    good = False
                    break
            if good:
                return True
        return False
670042
function checkArgs(args) {
  if (args.length !== 2) {
    console.warn(`WWWW Checking claudia args: args.length !== 2, is: ${args.length}`, inspect({args}));
  }
}
612056
public boolean matchesFilter(String filter, int param) {

        filter = filter.toLowerCase();
        return m_parameters[param].toLowerCase().contains(filter);
    }
1307554
public void checkParameters(Class[] arguments) {
        // lets check that the argument types are valid
        if (!isValidMethod(arguments)) {
            throw new IllegalArgumentException(
                    "Parameters to method: "
                    + getName()
                    + " do not match types: "
                    + InvokerHelper.toString(getParameterTypes())
                    + " for arguments: "
                    + InvokerHelper.toString(arguments));
        }
    }
253360
def is_quoted(arg: str) -> bool:
    
    return len(arg) > 1 and arg[0] == arg[-1] and arg[0] in constants.QUOTES
547605
def params_match?(params, match)
      return true if params == match
      parsed = parse_range_params(params)
      parsed == parsed.merge(parse_range_params(match))
    end
815964
def p_arguments(p):
    """'"""
    p[0] = { 'args' : p[1], }
    if len(p) > 2:
        if p[2] == '(':
            p[0]['tests'] = p[3]
        else:
            p[0]['tests'] = [ p[2] ]
229970
private SemanticStatus argumentsMatch(final String[] myargs,
            final String[] other) {
        String my_arg, arg;
        boolean varargs = false;
        for (int i = 0, j = 0;; i++, j++) {

            boolean my_last = (i == (myargs.length - 1));
            boolean other_last = (j == (other.length - 1));

            if (myargs[i].endsWith(VARARGS_SUFFIX)) {
                my_arg = varargsRoot(myargs[i]);
                // stay at position in argument list
                i = i - 1;
                varargs = true;
            } else {
                my_arg = myargs[i];
            }

            arg = other[j];
            final SemanticStatus status = argumentsMatch(my_arg, arg);
            if (status != VALID) return status;

            if (my_last && other_last) {
                break;
            } else if (my_last && !varargs) {
                // You have arguments left to match, I don't.
                return TOO_MANY_ARGUMENTS;
            } else if (other_last) {
                // I have arguments left to match, you don't.
                return TOO_FEW_ARGUMENTS;
            }
        }
        return VALID;
    }
417170
def has_kwargs(function):
    
    '''

    if six.PY2:
        return inspect.getargspec(function).keywords is not None
    else:
        sig = inspect.signature(function)

        for param in sig.parameters.values():
            if param.kind == param.VAR_KEYWORD:
                return True

        return False