Determines whether a function call is a Promise.reject() call
@param {ASTNode} node A CallExpression node
@returns {boolean} `true` if the call is a Promise.reject() call
168986
function isPromiseRejectCall(node) {
            return node.callee.type === "MemberExpression" &&
                node.callee.object.type === "Identifier" && node.callee.object.name === "Promise" &&
                node.callee.property.type === "Identifier" && node.callee.property.name === "reject";
        }
428554
function isSuperLocalCall (node) {
  return isMemberAccess(node, basicRegex.FUNCTIONTYPE, exactMatch('super'), basicRegex.CONTRACTTYPE, undefined)
}
967599
function isPromise(input) {
	return (
		(
			typeof Promise !== 'undefined' &&
			input instanceof Promise
		) ||
		(
			input !== null &&
			typeof input === 'object' &&
			typeof input.then === 'function' &&
			typeof input.catch === 'function'
		)
	);
}
46508
function dryCallNew(node) {
			if (hasExcessParens(node.callee) && precedence(node.callee) >= precedence(node) && !(
					node.type === "CallExpression" &&
					node.callee.type === "FunctionExpression" &&

					// One set of parentheses are allowed for a function expression
					!hasDoubleExcessParens(node.callee)
				)) {
				report(node.callee);
			}
			if (node.arguments.length === 1) {
				if (hasDoubleExcessParens(node.arguments[0]) && precedence(node.arguments[0]) >= precedence({
						type: "AssignmentExpression"
					})) {
					report(node.arguments[0]);
				}
			} else {
				[].forEach.call(node.arguments, function(arg) {
					if (hasExcessParens(arg) && precedence(arg) >= precedence({
							type: "AssignmentExpression"
						})) {
						report(arg);
					}
				});
			}
		}
19680
function rejected(reason) {
            var p = new Promise();
            p.then = then;
            states.reject(p, reason);
            return p;

            function then(_, onRejected) {
                try {
                    return resolve(typeof onRejected == 'function' ? onRejected(reason) : rejected(reason));
                } catch (e) {
                    return rejected(e);
                }
            }
        }
227586
private function isNewFunctionCall(Node $node)
    {
        return $node instanceof Node\Stmt\Function_
            && ($lowerCasedFunction = $this->extractNormalizedFunctionName($node))
            && array_key_exists($lowerCasedFunction, self::$lowerCasedNewFunctions);
    }
820733
function checkFunction(node) {
            const scope = context.getScope();
            const regExpVar = astUtils.getVariableByName(scope, "RegExp");
            const shadowed = regExpVar && regExpVar.defs.length > 0;

            if (node.callee.type === "Identifier" && node.callee.name === "RegExp" && isString(node.arguments[0]) && !shadowed) {
                checkRegex(node, node.arguments[0].value, node.arguments[0].range[0] + 1);
            }
        }
826078
function callPromise(fn, args) {
	return new Promise((resolve, reject) => {
		// promisified callback
		function callback(err,other) {
			// check if the 'err' is boolean, if so then this is a 'exists' callback special case
			if (err && (typeof err !== 'boolean')) return reject(err);
			// convert arguments to proper array, ignoring error argument
			let args = Array.prototype.slice.call(arguments, 1);
			// if arguments length is one or more resolve arguments as array,
			// otherwise resolve the argument as is.
			return resolve(args.length < 2 ? args[0] : args);
		}
		fn.apply(null, args.concat([callback]));
	});
}
1287215
function isCallToMethod(node, version, method) {
    return methodDataUtil.isAliasOfMethod(version, method, astUtil.getMethodName(node))
}
190870
function isMethodCall(node) {
                    var nodeParentType = node.parent.type,
                        nodeParentParentParentType = node.parent.parent.parent.type;

                    if (nodeParentType === "CallExpression" && nodeParentParentParentType === "BlockStatement" && !variable) {
                        return true;
                    } else {
                        return false;
                    }
                }
175522
function(node) {
    // Make sure that this is a call expression
    if (!node || node.type !== 'CallExpression' ) {
      return;
    }
    // Get the callee property
    var property;
    if (node.callee && node.callee.property) {
      property = node.callee.property;
    }
    // Return the identifier name of the callee
    if (property && property.type === 'Identifier') {
      return property.name;
    }
  }
1275701
function isComputedMacro(node) {
  var type = node.type;
  if (type !== "CallExpression") {
    return false;
  }
  var callee = node.callee;
  var calleeType = callee.type;
  if (calleeType === "MemberExpression") {
    if (callee.object.name === "computed") {
      return true;
    }
    if (callee.object.type === "MemberExpression") {
      var coon = callee.object.object.name;
      var copn = callee.object.property.name || callee.object.property.value;
      if (isEmber(coon) && copn === "computed") {
        return true;
      }
    }
  }
  return false;
}
262978
function doesMemberExpressionContainCallExpression(node) {
            let currentNode = node.object;
            let currentNodeType = node.object.type;

            while (currentNodeType === "MemberExpression") {
                currentNode = currentNode.object;
                currentNodeType = currentNode.type;
            }

            return currentNodeType === "CallExpression";
        }
563247
function ignoreSubAst(node) {
        return node.type === 'CallExpression' && node.callee.type === 'MemberExpression' &&
            node.callee.object.type === 'Identifier' && node.callee.object.name === JALANGI_VAR &&
            node.callee.property.type === 'Identifier' && node.callee.property.name === 'I';
    }
874952
function isNullOrUndefined(node) {
		return (node.type === "Literal" && node.value === null) ||
			(node.type === "Identifier" && node.name === "undefined") ||
			(node.type === "UnaryExpression" && node.operator === "void");
	}
615010
function hasNestedDefine(ast) {
	var result = false;

	types.visit(ast, {
		visitCallExpression: function(path) {
			if (this.isDefineExpression(path)) {
				result = true;
				this.abort();
			}

			this.traverse(path);
		},

		// whether a non top level `define(` is call in the AST
		isDefineExpression: function(path) {
			return (
				n.Identifier.check(path.node.callee) &&
				path.node.callee.name === "define" &&
				!n.Program.check(path.parent.parent.node)
			);
		}
	});

	return result;
}
1335465
static boolean isDirectCallNodeReplacementPossible(Node fnNode) {
    // Only inline single-statement functions
    Node block = NodeUtil.getFunctionBody(fnNode);

    // Check if this function is suitable for direct replacement of a CALL node:
    // a function that consists of single return that returns an expression.
    if (!block.hasChildren()) {
      // special case empty functions.
      return true;
    } else if (block.hasOneChild()) {
      // Only inline functions that return something.
      if (block.getFirstChild().isReturn()
          && block.getFirstFirstChild() != null) {
        return true;
      }
    }

    return false;
  }