gets the argument name used in the command table for a parameter
769660
def get_arg_name(self, param):
        
        if self.current_command in self.cmdtab:
            for arg in self.cmdtab[self.current_command].arguments:

                for name in self.cmdtab[self.current_command].arguments[arg].options_list:
                    if name == param:
                        return arg
        return None
35615
function getCommand(argv) {
  let command = argv._[0] || 'help';

  // Allow shorthand "-v" for version
  if (argv.v) {
    command = 'version';
  }

  // Allow shorthand "-h" for help
  if (argv.h) {
    command = 'help';
  }

  return command;
}
794078
def get_cmdline_varargs(argv=None):
    
    if argv is None:
        argv = sys.argv
    scriptname = argv[0]
    if scriptname == '':
        # python invoked by iteself
        pos_start = 0
        pos_end = 0
    else:
        pos_start = pos_end = 1
        for idx in range(pos_start, len(argv)):
            if argv[idx].startswith('-'):
                pos_end = idx
                break
        else:
            pos_end = len(argv)
    cmdline_varargs = argv[pos_start:pos_end]
    return cmdline_varargs
1209133
def get_proc_name(cmd):
    
    if isinstance(cmd, Iterable) and not isinstance(cmd, str):
        cmd = " ".join(cmd)

    return cmd.split()[0].replace('(', '').replace(')', '')
736557
public String getCmdLineArg() {
        StringBuilder builder = new StringBuilder("  --server-groups=");
        boolean foundSelected = false;
        for (JCheckBox serverGroup : serverGroups) {
            if (serverGroup.isSelected()) {
                foundSelected = true;
                builder.append(serverGroup.getText());
                builder.append(",");
            }
        }
        builder.deleteCharAt(builder.length() - 1); // remove trailing comma

        if (!foundSelected) return "";
        return builder.toString();
    }
1202239
def valid_command_names_from(*args)
      arg_string = args.delete_if { |value| value =~ /^-/ }.join ' '
      commands.keys.find_all { |name| name if /^#{name}\b/.match arg_string }
    end
85490
def cmdline_params(self, surface_sample_file_name, cell_file_name):
        
        parameters = []

        parameters += [surface_sample_file_name]
        parameters += [cell_file_name]
        parameters += [self._OUTPUT_FILE_NAME]

        return map(str, parameters)
244831
def _get_args(self, executable, *args):
        """"""
        args = list(args)
        args.insert(0, executable)
        if self.username:
            args.append("--username={}".format(self.username))
        if self.host:
            args.append("--host={}".format(self.host))
        if self.port:
            args.append("--port={}".format(self.port))

        args.append(self.dbname)
        #args.extend(other_args)
        return args
421185
private int getTotalCommandBytes(SubProcessCommandLineArgs commands) {
    int size = 0;
    for (SubProcessCommandLineArgs.Command c : commands.getParameters()) {
      size += c.value.length();
    }
    return size;
  }
1274802
def get_python_args(fname, python_args, interact, debug, end_args):
    """"""
    p_args = []
    if python_args is not None:
        p_args += python_args.split()
    if interact:
        p_args.append('-i')
    if debug:
        p_args.extend(['-m', 'pdb'])
    if fname is not None:
        if os.name == 'nt' and debug:
            # When calling pdb on Windows, one has to replace backslashes by
            # slashes to avoid confusion with escape characters (otherwise, 
            # for example, '\t' will be interpreted as a tabulation):
            p_args.append(osp.normpath(fname).replace(os.sep, '/'))
        else:
            p_args.append(fname)
    if end_args:
        p_args.extend(shell_split(end_args))
    return p_args
929257
def _get_args(op, name):
    
    # Could use multipledispatch here to avoid the pasta
    if isinstance(op, ops.Selection):
        assert name is not None, 'name is None'
        result = op.selections

        # if Selection.selections is always columnar, could use an
        # OrderedDict to prevent scanning the whole thing
        return [col for col in result if col._name == name]
    elif isinstance(op, ops.Aggregation):
        assert name is not None, 'name is None'
        return [
            col
            for col in itertools.chain(op.by, op.metrics)
            if col._name == name
        ]
    else:
        return op.args
396210
private function getParameterNamesReturnedBy(Node\Expr\FuncCall $getArgsCall)
    {
        $scope = $this->getCurrentScope();
        if (!$scope) {
            return array();
        }

        $allParameterNames = $scope->getParameterNames();
        $argumentNumber = isset($getArgsCall->args[0]) ? $getArgsCall->args[0] : null;
        if ($argumentNumber
            && $this->functionAnalyzer->isFunctionCallByStaticName($getArgsCall, 'func_get_arg')
            && $argumentNumber->value
            && $argumentNumber->value instanceof Node\Scalar\LNumber
        ) {
            $argumentNumber = $argumentNumber->value->value;

            return isset($allParameterNames[$argumentNumber])
                ? array($allParameterNames[$argumentNumber])
                : array();
        }

        return $allParameterNames;
    }
950454
def getDisplayName(self):
        """"""
        displayName = self.name
        if self.arguments:
            displayName += "(" + ", ".join(self.arguments) + ")"
        return displayName
251256
def getCmdParams(cmd, request, **fields):
    """"""
    drCode = None
    params = None
    drAppId = None
    # Fetch the parameters if cmd is found in dict
    if isinstance(cmd, int):
        drCode = cmd    # Enable to craft commands with non standard code
        if cmd in DR_cmd_def:
            params = DR_cmd_def[drCode]
        else:
            params = ('Unknown', 'UK', {0: (128, 0)})
            warning(
                'No Diameter command with code %d found in DR_cmd_def dictionary' %  # noqa: E501
                cmd)
    else:  # Assume command is a string
        if len(cmd) > 3:     # Assume full command name given
            fpos = 0
        else:         # Assume abbreviated name is given and take only the first two letters  # noqa: E501
            cmd = cmd[:2]
            fpos = 1
        for k, f in DR_cmd_def.items():
            if f[fpos][:len(
                    cmd)] == cmd:   # Accept only a prefix of the full name
                drCode = k
                params = f
                break
        if not drCode:
            warning(
                'Diameter command with name %s not found in DR_cmd_def dictionary.' %  # noqa: E501
                cmd)
            return (fields, 'Unknown')
    # The drCode is set/overridden in any case
    fields['drCode'] = drCode
    # Processing of drAppId
    if 'drAppId' in fields:
        val = fields['drAppId']
        if isinstance(val, str):   # Translate into application Id code
            found = False
            for k, v in six.iteritems(AppIDsEnum):
                if v.find(val) != -1:
                    drAppId = k
                    fields['drAppId'] = drAppId
                    found = True
                    break
            if not found:
                del(fields['drAppId'])
                warning(
                    'Application ID with name %s not found in AppIDsEnum dictionary.' %  # noqa: E501
                    val)
                return (fields, 'Unknown')
        else:   # Assume type is int
            drAppId = val
    else:  # Application Id shall be taken from the params found based on cmd
        drAppId = next(iter(params[2]))   # The first record is taken
        fields['drAppId'] = drAppId
    # Set the command name
    name = request and params[0] + '-Request' or params[0] + '-Answer'
    # Processing of flags (only if not provided manually)
    if 'drFlags' not in fields:
        if drAppId in params[2]:
            flags = params[2][drAppId]
            fields['drFlags'] = request and flags[0] or flags[1]
    return (fields, name)
1167058
def name(self, *args):
        '''
        
        '''
        if len(args):
            self.__name = args[0]
        else:
            return self.__name
854488
private static String getFileName(String[] args)
	{
		String fileName = null;
		for (int i=0; i<args.length; i++)
		{
			if (!args[i].startsWith("-"))
			{
				fileName = args[i];
				break;
			}
		}
		return fileName;
	}
259317
private String getArgumentName(final String arg) {
        int pos = arg.indexOf("=");
        if (pos == -1) {
            pos = arg.indexOf(":");
        }
        return arg.substring(0, pos != -1 ? pos : arg.length());
    }