whether a non top level `define(` is call in the AST
499910
function(path) {
			return (
				n.Identifier.check(path.node.callee) &&
				path.node.callee.name === "define" &&
				!n.Program.check(path.parent.parent.node)
			);
		}
578168
function first_in_statement(stack) {
      var node = stack.parent(-1);
      for (var i = 0, p; p = stack.parent(i); i++) {
          if (p instanceof AST_Statement && p.body === node)
              return true;
          if ((p instanceof AST_Sequence      && p.expressions[0] === node) ||
              (p.TYPE == "Call"               && p.expression === node ) ||
              (p instanceof AST_Dot           && p.expression === node ) ||
              (p instanceof AST_Sub           && p.expression === node ) ||
              (p instanceof AST_Conditional   && p.condition === node  ) ||
              (p instanceof AST_Binary        && p.left === node       ) ||
              (p instanceof AST_UnaryPostfix  && p.expression === node )
          ) {
              node = p;
          } else {
              return false;
          }
      }
  }
1009334
private boolean isEligibleDefinitionSite(String name, Node definitionSite) {
    switch (definitionSite.getToken()) {
      case GETPROP:
      case MEMBER_FUNCTION_DEF:
      case STRING_KEY:
        break;

      default:
        // No other node types are supported.
        throw new IllegalArgumentException(definitionSite.toString());
    }

    // Exporting a method prevents rewrite.
    CodingConvention codingConvention = compiler.getCodingConvention();
    if (codingConvention.isExported(name)) {
      return false;
    }

    if (!isPrototypeMethodDefinition(definitionSite)) {
      return false;
    }

    return true;
  }
185583
def _contains_internal_dynamic_call(contract):
        
        for func in contract.all_functions_called:
            for node in func.nodes:
                for ir in node.irs:
                    if isinstance(ir, (InternalDynamicCall)):
                        return True
        return False
97157
function isLLCallcode (node) {
  return isMemberAccess(node,
          exactMatch(util.escapeRegExp(lowLevelCallTypes.CALLCODE.type)),
          undefined, exactMatch(basicTypes.ADDRESS), exactMatch(lowLevelCallTypes.CALLCODE.ident))
}
985623
function ast_mangle(ast, do_toplevel) {
        var w = ast_walker(), walk = w.walk, scope;

        function get_mangled(name, newMangle) {
                if (!do_toplevel && !scope.parent) return name; // don't mangle toplevel
                return scope.get_mangled(name, newMangle);
        };

        function _lambda(name, args, body) {
                if (name) name = get_mangled(name);
                body = with_scope(body.scope, function(){
                        args = args.map(function(name){ return get_mangled(name) });
                        return body.map(walk);
                });
                return [ this[0], name, args, body ];
        };

        function with_scope(s, cont) {
                var _scope = scope;
                scope = s;
                for (var i in s.names) if (HOP(s.names, i)) {
                        get_mangled(i, true);
                }
                try { var ret = cont(); ret.scope = s; return ret; }
                finally { scope = _scope; };
        };

        function _vardefs(defs) {
                return defs.map(function(d){
                        return [ get_mangled(d[0]), walk(d[1]) ];
                });
        };

        return w.with_walkers({
                "function": _lambda,
                "defun": _lambda,
                "var": function(defs) {
                        return [ "var", _vardefs(defs) ];
                },
                "const": function(defs) {
                        return [ "const", _vardefs(defs) ];
                },
                "name": function(name) {
                        return [ "name", get_mangled(name) ];
                },
                "try": function(t, c, f) {
                        return [ "try",
                                 t.map(walk),
                                 c ? with_scope(c.scope, function(){
                                         return [ get_mangled(c[0]), c[1].map(walk) ];
                                 }) : null,
                                 f != null ? f.map(walk) : null ];
                },
                "toplevel": function(body) {
                        return with_scope(this.scope, function(){
                                return [ "toplevel", body.map(walk) ];
                        });
                },
                "for-in": function(has_var, name, obj, stat) {
                        return [ "for-in", has_var, get_mangled(name), walk(obj), walk(stat) ];
                }
        }, function() {
                return walk(ast_add_scope(ast));
        });
}
874952
function isNullOrUndefined(node) {
		return (node.type === "Literal" && node.value === null) ||
			(node.type === "Identifier" && node.name === "undefined") ||
			(node.type === "UnaryExpression" && node.operator === "void");
	}
953333
function isBuiltinFunctionCall (node) {
  return (isLocalCall(node) && builtinFunctions[getLocalCallName(node) + '(' + getFunctionCallTypeParameterType(node) + ')'] === true) || isAbiNamespaceCall(node)
}
1193868
function isStaticMethodCall(node) {
  if (node.type === 'CallExpression') {
    if (node.callee.type === 'MemberExpression' &&
        isConstructor(node.callee.object) &&
        node.callee.property.type === 'Identifier') {
      return true;
    }
  }
  return false;
}
434204
def define(&block)
      if block && block.arity > 0
        block.call @ns
      elsif block
        @ns.instance_eval(&block)
      end
      @ns
    end
532852
function isVarOnTop(node, statements) {
            const l = statements.length;
            let i = 0;

            // skip over directives
            for (; i < l; ++i) {
                if (!looksLikeDirective(statements[i]) && !looksLikeImport(statements[i])) {
                    break;
                }
            }

            for (; i < l; ++i) {
                if (!isVariableDeclaration(statements[i])) {
                    return false;
                }
                if (statements[i] === node) {
                    return true;
                }
            }

            return false;
        }
150404
def is_definition(cursor):
    
    defn = cursor.get_definition()
    return (defn is not None) and (cursor.location == defn.location)
1313714
private void processDefineCall(NodeTraversal t, Node n, Node parent) {
    Node left = n.getFirstChild();
    Node args = left.getNext();
    if (verifyDefine(t, parent, left, args)) {
      Node nameNode = args;

      maybeAddNameToSymbolTable(left);
      maybeAddStringToSymbolTable(nameNode);

      this.defineCalls.add(n);
    }
  }
1090607
function isDirective(node, sourceCode) {
    return (
        node.type === "ExpressionStatement" &&
        (
            node.parent.type === "Program" ||
            (
                node.parent.type === "BlockStatement" &&
                astUtils.isFunction(node.parent.parent)
            )
        ) &&
        node.expression.type === "Literal" &&
        typeof node.expression.value === "string" &&
        !astUtils.isParenthesised(sourceCode, node.expression)
    );
}
764449
private boolean allDefinitionsEquivalent(Collection<Node> definitions) {
    Node first = null;
    for (Node n : definitions) {
      if (first == null) {
        first = n;
      } else if (!compiler.areNodesEqualForInlining(first, n)) {
        return false;
      } // else continue
    }
    return true;
  }
792630
private void validateDefinesDeclaration(Node n, JSDocInfo info) {
    if (info != null && info.isDefine() && n.isLet()) {
      report(n, INVALID_DEFINE_ON_LET);
    }
  }
1068916
function isIIFEStatement(node) {
    if (node.type === "ExpressionStatement") {
        let call = node.expression;

        if (call.type === "UnaryExpression") {
            call = call.argument;
        }
        return call.type === "CallExpression" && astUtils.isFunction(call.callee);
    }
    return false;
}