Returns true if the variable is a formal parameter.
502190
private static boolean variableIsParameter(Var variable) {
    Node variableParent = variable.getParentNode();

    return variableParent != null && variableParent.isParamList();
  }
559487
function isAfterLastUsedArg(variable) {
            const def = variable.defs[0];
            const params = context.getDeclaredVariables(def.node);
            const posteriorParams = params.slice(params.indexOf(variable) + 1);

            // If any used parameters occur after this parameter, do not report.
            return !posteriorParams.some(v => v.references.length > 0 || v.eslintUsed);
        }
1165708
public boolean containsKey(Object key) {
    if(wrappedBindings.containsKey(key)) {
      return true;
    }
    if (key instanceof String) {
      return variableContext.containsVariable((String) key);
    }
    else {
      return false;
    }
  }
93278
private static boolean isDeclaration(Node n) {
    switch (n.getParent().getToken()) {
      case LET:
      case CONST:
      case VAR:
      case CATCH:
        return true;
      case FUNCTION:
        return n == n.getParent().getFirstChild();

      case PARAM_LIST:
        return n.getGrandparent().isFunction();

      default:
        return false;
    }
  }
466943
function isUsedVariable(variable) {
            const functionNodes = getFunctionDefinitions(variable),
                isFunctionDefinition = functionNodes.length > 0;
            let rhsNode = null;

            return variable.references.some(ref => {
                if (isForInRef(ref)) {
                    return true;
                }

                const forItself = isReadForItself(ref, rhsNode);

                rhsNode = getRhsNode(ref, rhsNode);

                return (
                    isReadRef(ref) &&
                    !forItself &&
                    !(isFunctionDefinition && isSelfReference(ref, functionNodes))
                );
            });
        }
723158
public static Matcher<ExpressionTree> isVariable() {
    return new Matcher<ExpressionTree>() {
      @Override
      public boolean matches(ExpressionTree expressionTree, VisitorState state) {
        Symbol symbol = ASTHelpers.getSymbol(expressionTree);
        if (symbol == null) {
          return false;
        }
        return symbol.getKind() == ElementKind.LOCAL_VARIABLE
            || symbol.getKind() == ElementKind.PARAMETER;
      }
    };
  }
322815
public boolean isGlobalVariable(@Nullable final String variableName) {
    boolean result = false;
    if (variableName != null) {
      final String normalized = PreprocessorUtils.normalizeVariableName(variableName);
      result = this.globalVarTable.containsKey(normalized) || mapVariableNameToSpecialVarProcessor.containsKey(normalized);
    }
    return result;
  }
913192
public final void formalParameterDecls() throws RecognitionException {
		int formalParameterDecls_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 57) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:570:5: ( ( variableModifier )* type ( formalParameterDeclsRest )? )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:570:7: ( variableModifier )* type ( formalParameterDeclsRest )?
			{
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:570:7: ( variableModifier )*
			loop79:
			while (true) {
				int alt79=2;
				int LA79_0 = input.LA(1);
				if ( (LA79_0==58||LA79_0==83) ) {
					alt79=1;
				}

				switch (alt79) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:570:7: variableModifier
					{
					pushFollow(FOLLOW_variableModifier_in_formalParameterDecls2047);
					variableModifier();
					state._fsp--;
					if (state.failed) return;
					}
					break;

				default :
					break loop79;
				}
			}

			pushFollow(FOLLOW_type_in_formalParameterDecls2050);
			type();
			state._fsp--;
			if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:570:30: ( formalParameterDeclsRest )?
			int alt80=2;
			int LA80_0 = input.LA(1);
			if ( (LA80_0==Identifier||LA80_0==48) ) {
				alt80=1;
			}
			switch (alt80) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:570:30: formalParameterDeclsRest
					{
					pushFollow(FOLLOW_formalParameterDeclsRest_in_formalParameterDecls2052);
					formalParameterDeclsRest();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 57, formalParameterDecls_StartIndex); }

		}
	}
132003
boolean partialIsVariable(MultistepExprHolder testee, int lengthToTest)
  {
  	if(1 == lengthToTest)
  	{
  		WalkingIterator wi = (WalkingIterator)testee.m_exprOwner.getExpression();
  		if(wi.getFirstWalker() instanceof FilterExprWalker)
  			return true;
  	}
  	return false;
  }
494922
private static boolean validParameter(final Parameter p) {
        if (p.getNamespace() == null) {
            return false;
        }
        if (p.getValue() == null) {
            return false;
        }
        return true;
    }
1080447
public function isTerminal()
    {
        if ($this instanceof NumberNode) {
            return true;
        }

        if ($this instanceof IntegerNode) {
            return true;
        }

        if ($this instanceof RationalNode) {
            return true;
        }

        if ($this instanceof VariableNode) {
            return true;
        }

        if ($this instanceof ConstantNode) {
            return true;
        }

        return false;
    }
1066701
public boolean isCustomVariable(CobolPrimitiveType < ? > type, String name) {
        if (type.isCustomVariable()) {
            return true;
        }
        if (customVariables != null && customVariables.contains(name)) {
            return true;
        }
        if (customChoiceStrategy != null
                && customChoiceStrategy.getVariableNames() != null
                && customChoiceStrategy.getVariableNames().contains(name)) {
            return true;
        }
        return false;
    }
430516
def is_magic(self):
        """"""
        return (self.name.startswith('__') and
                self.name.endswith('__') and
                self.name not in VARIADIC_MAGIC_METHODS)
860509
private boolean validTypeOfVarExpression(Node expr) {
 // The expression must have two children:
    // - The typeOfVar keyword
    // - A string
    if (!checkParameterCount(expr, Keywords.TYPEOFVAR)) {
      return false;
    }
    if (!getCallArgument(expr, 0).isString()) {
      warnInvalid("name", expr);
      warnInvalidInside(Keywords.TYPEOFVAR.name, expr);
      return false;
    }
    return true;
  }
691740
public function isVariadic() {
    $parameters = $this->getParameters();
    $last_parameter = $parameters[count($parameters) - 1];
    // In a variadic function, the last parameter is the only one which is
    // allowed to be variadic.
    return $last_parameter->getVariadic() !== NULL;
  }
463450
public static boolean isNumberic(Object obj) {
        if (obj == null) {
            Log.e("isNumeric", "parameter can't be null.");
            return false;
        }

        try {
            Double.parseDouble(obj.toString());
        } catch (Exception e) {
            return false;
        }

        return true;
    }
598687
function isRelayVariables(variables: mixed): boolean {
  return (
    typeof variables === 'object' &&
    variables !== null &&
    !Array.isArray(variables)
  );
}