Checks if the argument is a known argument to the task.

@param arg
@return
12642
private boolean isKnownArgument(String arg) {
        final String argName = getArgName(arg);
        for (String key : knownArgs) {
            if (key.equalsIgnoreCase(argName)) {
                return true;
            }
        }
        return false;
    }
293495
def verify_arguments(self, args=None, kwargs=None):
        

        args = self.args if args is None else args
        kwargs = self.kwargs if kwargs is None else kwargs

        try:
            verify_arguments(self._target, self._method_name, args, kwargs)
        except VerifyingBuiltinDoubleArgumentError:
            if doubles.lifecycle.ignore_builtin_verification():
                raise
289549
private static boolean isPotentialVarArgsMethod(Method method, Object[] arguments) {
        return doesParameterTypesMatchForVarArgsInvocation(method.isVarArgs(), method.getParameterTypes(), arguments);
    }
1069943
private static boolean parseInputArgs(String[] args) {
    CommandLineParser parser = new BasicParser();
    CommandLine cmd;
    try {
      cmd = parser.parse(OPTIONS, args);
    } catch (ParseException e) {
      System.out.println("Failed to parse input args: " + e);
      return false;
    }
    sNoTimeout = cmd.hasOption("noTimeout");
    sHelp = cmd.hasOption("help");
    return true;
  }
52500
public static void isNotEmpty( String argument,
                                   String name ) {
        isNotZeroLength(argument, name);
        if (argument != null && argument.trim().length() == 0) {
            throw new IllegalArgumentException(CommonI18n.argumentMayNotBeNullOrZeroLengthOrEmpty.text(name));
        }
    }
565661
private boolean isNamedParam(String arg) {
        return arg.startsWith("--") && (arg.indexOf('=') > 2 && validFirstChar(arg.charAt(2)));
    }
478371
private static boolean determineVerbosity( String[] args ) {
        if (args != null && args.length > 0) {
            for (int i = 0; i < args.length; i++) {
                if ("-c".equals(args[i])) {
                    return false;
                }
            }
        }
        return true;
    }
834928
public Boolean visit(final CompilationUnit n, final Object arg) {
        final Boolean result = super.visit(n, arg);
        return result != null && result;
    }
319588
function validateArgs(args) {
    if (args.length === 0) {
      grunt.log.error('Unable to run task: no action specified (e.g. run or update)');
      return false;
    } else if (args.length === 1) {
      grunt.log.error('Unable to run task: no target specified');
      return false;
    } else if (args.length > 3) {
      grunt.log.error('Unable to run task: too many arguments (up to 4 allowed)');
      return false;
    }

    return true;
  }
1360321
protected String getSingleArgParameterAsString(Object arg) {
        if (arg instanceof String) {
            return (String) arg;
        }
        return arg == null ? "null" : arg.toString();
    }
765939
function checkArgument(i) {
  let l;

  if (l = checkBrackets(i)) tokens[i].argument_child = 1;
  else if (l = checkParentheses(i)) tokens[i].argument_child = 2;
  else if (l = checkSingleValueDeclaration(i)) tokens[i].argument_child = 3;
  else if (l = checkFunctionsList(i)) tokens[i].argument_child = 4;
  else if (l = checkFunction(i)) tokens[i].argument_child = 5;
  else if (l = checkVariablesList(i)) tokens[i].argument_child = 6;
  else if (l = checkVariable(i)) tokens[i].argument_child = 7;
  else if (l = checkSC(i)) tokens[i].argument_child = 8;
  else if (l = checkDelim(i)) tokens[i].argument_child = 9;
  else if (l = checkDeclDelim(i)) tokens[i].argument_child = 10;
  else if (l = checkString(i)) tokens[i].argument_child = 11;
  else if (l = checkPercentage(i)) tokens[i].argument_child = 12;
  else if (l = checkDimension(i)) tokens[i].argument_child = 13;
  else if (l = checkNumber(i)) tokens[i].argument_child = 14;
  else if (l = checkUri(i)) tokens[i].argument_child = 15;
  else if (l = checkInterpolation(i)) tokens[i].argument_child = 16;
  else if (l = checkIdent(i)) tokens[i].argument_child = 17;
  else if (l = checkVhash(i)) tokens[i].argument_child = 18;
  else if (l = checkCustomProperty(i)) tokens[i].argument_child = 19;
  else if (l = checkOperator(i)) tokens[i].argument_child = 20;
  else if (l = checkUnary(i)) tokens[i].argument_child = 21;
  else if (l = checkParentSelector(i)) tokens[i].argument_child = 22;
  else if (l = checkImportant(i)) tokens[i].argument_child = 23;
  else if (l = checkGlobal(i)) tokens[i].argument_child = 24;
  else if (l = checkDefault(i)) tokens[i].argument_child = 25;
  else if (l = checkOptional(i)) tokens[i].argument_child = 26;

  return l;
}
44058
private static boolean determineVerbosity(String[] args) {
		if (args != null && args.length > 0) {
            for (String arg : args) {
                if ("-c".equals(arg)) {
                    return false;
                }
            }
		}
		return true;
	}
1261
public static int checkArgPositive(final int arg, final String argNameOrErrorMsg) {
        if (arg <= 0) {
            if (argNameOrErrorMsg.indexOf(' ') == N.INDEX_NOT_FOUND) {
                throw new IllegalArgumentException("'" + argNameOrErrorMsg + "' can not be zero or negative: " + arg);
            } else {
                throw new IllegalArgumentException(argNameOrErrorMsg);
            }
        }

        return arg;
    }
235466
public static boolean isNumberStr(String arg) {
        if (StringUtils.isEmpty(arg)) {
            return false;
        }
        return check(arg, NUMBER_STR_PARTER);
    }
475206
def _has_argument(func):
    
    if hasattr(inspect, 'signature'):
        # New way in python 3.3
        sig = inspect.signature(func)
        return bool(sig.parameters)
    else:
        # Old way
        return bool(inspect.getargspec(func).args)
260596
private boolean wellKnownTypeArgument(NewClassTree tree, VisitorState state) {
    Type type = getType(tree);
    if (type == null) {
      return false;
    }
    type = state.getTypes().asSuper(type, state.getSymbolFromString("java.lang.ThreadLocal"));
    if (type == null) {
      return false;
    }
    if (type.getTypeArguments().isEmpty()) {
      return false;
    }
    Type argType = getOnlyElement(type.getTypeArguments());
    if (WELL_KNOWN_TYPES.contains(argType.asElement().getQualifiedName().toString())) {
      return true;
    }
    if (isSubtype(argType, state.getTypeFromString("java.text.DateFormat"), state)) {
      return true;
    }
    return false;
  }
157984
private static String[] harvestApplicationWithArguments(String arg)
    {
        List<String> args = new ArrayList<>();

        if (arg.trim().length() >= 0)
        {
            String appl = "", data = "";

            /* Find the first occurrence of either '(' or ',' */
            int firstc = arg.indexOf(',');
            int firstp = arg.indexOf('(');

            if (firstc != -1 && (firstp == -1 || firstc < firstp))
            {
                /* comma found, no parenthesis */
                /* or both found, but comma found first */
                String[] split = arg.split(",");
                appl = split[0];
                for (int i = 1; i < split.length; i++)
                    data += split[i] + (i + 1 < split.length ? "," : "");
            }
            else if (firstc == -1 && firstp == -1)
            {
                /* Neither found */
                data = "";
            }
            else
            {
                /* Final remaining case is parenthesis found first */
                String[] split = arg.split("\\(");
                appl = split[0];
                for (int i = 1; i < split.length; i++)
                    data += split[i] + (i + 1 < split.length ? "(" : "");
                int end = data.lastIndexOf(')');
                if (end == -1)
                {
                    // ast_log(LOG_WARNING, "No closing parenthesis found?
                    // '%s(%s'\n", appl, data);
                }
                else if (end == data.length() - 1)
                {
                    data = data.substring(0, end);
                }
                data = processQuotesAndSlashes(data, ',', '|');
            }

            if (!appl.trim().equals(""))
            {
                args.add(appl.trim());
                if (!data.trim().equals(""))
                {
                    String[] dataSplit = data.split("\\|");
                    for (String aDataSplit : dataSplit)
                    {
                        args.add(aDataSplit.trim());
                    }
                }
            }
        }

        return args.toArray(new String[args.size()]);
    }