Return the name of the parameter to be used in JSDoc, generating one for destructuring
parameters.

@param paramNode child node of a parameter list
@param paramIndex position of child in the list
@return name to use in JSDoc
354666
private String getParameterJSDocName(Node paramNode, int paramIndex) {
    Node nameNode = null;
    if (paramNode != null) {
      checkArgument(paramNode.getParent().isParamList(), paramNode);
      if (paramNode.isRest()) {
        // use `restParam` of `...restParam`
        // restParam might still be a destructuring pattern
        paramNode = paramNode.getOnlyChild();
      } else if (paramNode.isDefaultValue()) {
        // use `defaultParam` of `defaultParam = something`
        // defaultParam might still be a destructuring pattern
        paramNode = paramNode.getFirstChild();
      }
      if (paramNode.isName()) {
        nameNode = paramNode;
      } else {
        checkState(paramNode.isObjectPattern() || paramNode.isArrayPattern(), paramNode);
        nameNode = null; // must generate a fake name
      }
    }
    if (nameNode == null) {
      return "p" + paramIndex;
    } else {
      checkState(nameNode.isName(), nameNode);
      return nameNode.getString();
    }
  }
146851
static String generateParamList(JsDoc jsDoc) {
    ImmutableList<JsDoc.Param> params = jsDoc.params();
    List<String> functionParameters = new ArrayList<>();
    for (JsDoc.Param param : params) {
      if ("param".equals(param.annotationType())) {
        functionParameters.add(param.paramTypeName());
      }
    }
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < functionParameters.size(); i++) {
      sb.append(functionParameters.get(i));
      if (i + 1 < functionParameters.size()) {
        sb.append(", ");
      }
    }
    return sb.toString();
  }
789118
@Override
    public R visitParam(ParamTree node, P p) {
        R r = scan(node.getName(), p);
        r = scanAndReduce(node.getDescription(), p, r);
        return r;
    }
119694
private static void traverseNode(final Node node, final Set<String> params) {
		if (node instanceof BindVariableNode) {
			params.add(((BindVariableNode) node).getExpression());
		} else if (node instanceof ParenBindVariableNode) {
			params.add(((ParenBindVariableNode) node).getExpression());
		} else if (node instanceof EmbeddedValueNode) {
			params.add(((EmbeddedValueNode) node).getExpression());
		} else if (node instanceof IfNode) {
			try {
				String expression = ((IfNode) node).getExpression();
				ognl.Node ognlNode = (ognl.Node) Ognl.parseExpression(expression);
				traverseExpression(ognlNode, params);
			} catch (OgnlException e) {
				e.printStackTrace();
			}
		}

		for (int i = 0; i < node.getChildSize(); i++) {
			Node childNode = node.getChild(i);
			traverseNode(childNode, params);
		}
	}
769777
function structHandlerCustom( $element, &$params )
    {
        $ret = null;
        if ( $this->XMLSchema->isInline( $element ) )
        {
            $ret = $this->appendLineParagraph( $element, $params );
        }
        else
        {
            $ret = $this->appendParagraph( $element, $params );
        }
        return $ret;
    }
958722
public String getTypeGenericName(int typeParamIndex, boolean includeBrackets) {
        String result = typeGenericName[typeParamIndex];
        return includeBrackets && result.length() > 0 ? '<' + result + '>' : result;
    }
750778
public static RESTParameter fromUNode(UNode paramNode) {
        RESTParameter param = new RESTParameter();
        String name = paramNode.getName();
        Utils.require(!Utils.isEmpty(name), "Missing parameter name: " + paramNode);
        param.setName(name);
        
        for (UNode childNode : paramNode.getMemberList()) {
            switch (childNode.getName()) {
            case "_required":
                param.setRequired(Boolean.parseBoolean(childNode.getValue()));
                break;
            case "_type":
                param.setType(childNode.getValue());
                break;
            default:
                // Ignore system properties we don't recognize.
                if (childNode.getName().charAt(0) != '_') {
                    param.add(RESTParameter.fromUNode(childNode));
                }
                break;
            }
        }
        return param;
    }
525392
protected String extractParamValue(Plugin plugin, String paramName) throws MojoExecutionException {
        Xpp3Dom configuration = (Xpp3Dom) plugin.getConfiguration();
        if (configuration == null) {
            return null;
        }
        Xpp3Dom paramDom = configuration.getChild(paramName);
        return paramDom == null ? null : paramDom.getValue();
    }
895379
function(nameParams) {
    if(nameParams && nameParams.match(/^[a-zA-Z0-9_\.]*\(.*\)$/)) {
      var npart = nameParams.substring(0, nameParams.indexOf('('));
      var ppart = Parameters( nameParams.substring(nameParams.indexOf('(')+1, nameParams.lastIndexOf(')')) );

      return {
        name: npart,
        params: ppart
      };

    } else {
      return {
        name: nameParams,
        params: null
      };
    }
  }
1050127
protected boolean readFeatureParameters(Element node){
		try{
			NodeList childrent = node.getChildNodes();
			cpnames = new Vector<String>();
			paras = new Vector<Vector<Integer>>();
			
			for (int i = 0; i < childrent.getLength(); i++)
				if (childrent.item(i) instanceof Element) {
					Element child = (Element) childrent.item(i);
					String value = child.getAttribute("value");
					
					//parse the value and get the parameters
					String [] parastr = value.split(":");
					Vector<Integer> para = new Vector<Integer>();
					for (int j = 3; j < parastr.length; ++j){
						para.add(Integer.parseInt(parastr[j]));
					}
					
					cpnames.add(parastr[2]);
					paras.add(para);
				}
			
		}
		catch (Exception e){
			System.out.println(e.getMessage());
			e.printStackTrace();
			return false;
		}
		return true;
	}
591678
public static Map<String, Object> getCommonParams(JsonNode paramsNode)
  {
    Map<String, Object> parameters = new HashMap<>();

    for (JsonNode child : paramsNode)
    {
      // If there isn't a name then the response from GS must be erroneous.
      if (!child.hasNonNull("name"))
      {
        logger.error("Common Parameter JsonNode encountered with "
                     + "no parameter name!");
        continue;
      }

      // Look up the parameter based on the "name" attribute of the node.
      String paramName = child.path("name").asText();

      // What type of value is it and what's the value?
      if (!child.hasNonNull("value"))
      {
        logger.debug("No value found for Common Parameter {}",
                     child.path("name").asText());
        continue;
      }

      if (STRING_PARAMS.contains(paramName.toUpperCase()))
      {
        parameters.put(paramName, child.path("value").asText());
      }
      else if (INT_PARAMS.contains(paramName.toUpperCase()))
      {
        parameters.put(paramName, child.path("value").asInt());
      }
      else if (BOOLEAN_PARAMS.contains(paramName.toUpperCase()))
      {
        parameters.put(paramName, child.path("value").asBoolean());
      }
      else
      {
        logger.debug("Unknown Common Parameter: {}", paramName);
      }

      logger.debug("Parameter {}: {}",
                   paramName, child.path("value").asText());
    }

    return parameters;
  }
389196
private static void setParamIndexes(BitSet ints, List<AbstractExpression> params) {
        for(AbstractExpression ae : params) {
            assert(ae instanceof ParameterValueExpression);
            ParameterValueExpression pve = (ParameterValueExpression) ae;
            int param = pve.getParameterIndex();
            ints.set(param);
        }
    }
22487
protected String getParameter(final List<String> params, final int index) {

		if (params.size() > index) {

			return params.get(index);
		}

		return null;
	}
1113866
public MethodNode getDeclaredMethod(String name, Parameter[] parameters) {
        for (MethodNode method :  getDeclaredMethods(name)) {
            if (parametersEqual(method.getParameters(), parameters)) {
                return method;
            }
        }
        return null;
    }
287325
func (t *typeParser) parseParamNodes() (params []typeParserParamNode, ok bool) {
	t.skipWhitespace()

	// the params are optional
	if t.index == len(t.input) || t.input[t.index] != '(' {
		return nil, true
	}

	params = []typeParserParamNode{}

	// consume the '('
	t.index++

	t.skipWhitespace()

	for t.input[t.index] != ')' {
		// look for a named param, but if no colon, then we want to backup
		backupIndex := t.index

		// name will be a hex encoded version of a utf-8 string
		name, ok := t.nextIdentifier()
		if !ok {
			return nil, false
		}
		hasName := true

		// TODO handle '=>' used for DynamicCompositeType

		t.skipWhitespace()

		if t.input[t.index] == ':' {
			// there is a name for this parameter

			// consume the ':'
			t.index++

			t.skipWhitespace()
		} else {
			// no name, backup
			hasName = false
			t.index = backupIndex
		}

		// parse the next full parameter
		classNode, ok := t.parseClassNode()
		if !ok {
			return nil, false
		}

		if hasName {
			params = append(
				params,
				typeParserParamNode{name: &name, class: *classNode},
			)
		} else {
			params = append(
				params,
				typeParserParamNode{class: *classNode},
			)
		}

		t.skipWhitespace()

		if t.input[t.index] == ',' {
			// consume the comma
			t.index++

			t.skipWhitespace()
		}
	}

	// consume the ')'
	t.index++

	return params, true
}
1124894
public static void assertParameterNotNull(CodeBuilder b, int paramIndex) {
        b.loadLocal(b.getParameter(paramIndex));
        Label notNull = b.createLabel();
        b.ifNullBranch(notNull, false);
        throwException(b, IllegalArgumentException.class, null);
        notNull.setLocation();
    }
1034331
@SuppressWarnings("unchecked")
  private <T> T parseBoundNamedParameter(final NamedParameterNode<T> np) {
    final T ret;

    @SuppressWarnings("rawtypes")
    final Set<Object> boundSet = c.getBoundSet((NamedParameterNode) np);
    if (!boundSet.isEmpty()) {
      final Set<T> ret2 = new MonotonicSet<>();
      for (final Object o : boundSet) {
        if (o instanceof String) {
          try {
            ret2.add(javaNamespace.parse(np, (String) o));
          } catch (final ParseException e) {
            // Parsability is now pre-checked in bindSet, so it should not be reached!
            throw new IllegalStateException("Could not parse " + o + " which was passed into " + np +
                " FIXME: Parsability is not currently checked by bindSetEntry(Node,String)", e);
          }
        } else if (o instanceof Node) {
          ret2.add((T) o);
        } else {
          throw new IllegalStateException("Unexpected object " + o + " in bound set.  " +
              "Should consist of nodes and strings");
        }
      }
      return (T) ret2;
    }
    final List<Object> boundList = c.getBoundList((NamedParameterNode) np);
    if (boundList != null) {
      final List<T> ret2 = new ArrayList<>();
      for (final Object o : boundList) {
        if (o instanceof String) {
          try {
            ret2.add(javaNamespace.parse(np, (String) o));
          } catch (final ParseException e) {
            // Parsability is now pre-checked in bindList, so it should not be reached!
            throw new IllegalStateException("Could not parse " + o + " which was passed into " + np + " FIXME: " +
                "Parsability is not currently checked by bindList(Node,List)", e);
          }
        } else if (o instanceof Node) {
          ret2.add((T) o);
        } else {
          throw new IllegalStateException("Unexpected object " + o + " in bound list.  Should consist of nodes and " +
              "strings");
        }
      }
      return (T) ret2;
    } else if (namedParameterInstances.containsKey(np)) {
      ret = (T) namedParameterInstances.get(np);
    } else {
      final String value = c.getNamedParameter(np);
      if (value == null) {
        ret = null;
      } else {
        try {
          ret = javaNamespace.parse(np, value);
          namedParameterInstances.put(np, ret);
        } catch (final BindException e) {
          throw new IllegalStateException(
              "Could not parse pre-validated value", e);
        }
      }
    }
    return ret;
  }