Returns the {@link Scope} in which this {@code Name} is defined.
@return the scope in which this name is defined, or {@code null}
if it's not defined in the current lexical scope chain
979837
public Scope getDefiningScope() {
        Scope enclosing = getEnclosingScope();
        String name = getIdentifier();
        return enclosing == null ? null : enclosing.getDefiningScope(name);
    }
1158040
private JSType getVarNameType(Scope scope, String name) {
    Var var = scope.getVar(name);
    JSType type = null;
    if (var != null) {
      Node nameDefinitionNode = var.getNode();
      if (nameDefinitionNode != null) {
        type = nameDefinitionNode.getJSType();
      }
    }
    if (type == null) {
      // TODO(bradfordcsmith): Consider throwing an error if the type cannot be found.
      type = unknownType;
    }
    return type;
  }
1350030
public LDC_Scope getLdc_scope() {
    if (EventMention_Type.featOkTst && ((EventMention_Type)jcasType).casFeat_ldc_scope == null)
      jcasType.jcas.throwFeatMissing("ldc_scope", "de.julielab.jules.types.ace.EventMention");
    return (LDC_Scope)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((EventMention_Type)jcasType).casFeatCode_ldc_scope)));}
364265
public TypeUsage.Builder scope(Optional<? extends QualifiedName> scope) {
    if (scope.isPresent()) {
      return scope(scope.get());
    } else {
      return clearScope();
    }
  }
43457
public boolean createChildScope(String name) {
        if (!scope.hasChildScope(name)) {
            return scope.createChildScope(name);
        }
        return false;
    }
746451
public List<List<String>> getAllScopes() {
    this.checkInitialized();
    final ImmutableList.Builder<List<String>> builder = ImmutableList.<List<String>>builder();
    final Consumer<Integer> _function = (Integer it) -> {
      List<String> _get = this.scopes.get(it);
      StringConcatenation _builder = new StringConcatenation();
      _builder.append("No scopes are available for index: ");
      _builder.append(it);
      builder.add(Preconditions.<List<String>>checkNotNull(_get, _builder));
    };
    this.scopes.keySet().forEach(_function);
    return builder.build();
  }
1330924
public List<String> getScopes(final int scopeIndex) {
    this.checkInitialized();
    return this.scopes.getOrDefault(Integer.valueOf(scopeIndex), SemanticHighlightingRegistry.UNKNOWN_SCOPES);
  }
4613
public final boolean hasSlot(String name) {
    S scope = thisScope();
    while (scope != null) {
      if (scope.hasOwnSlot(name)) {
        return true;
      }
      scope = scope.getParent();
    }
    return false;
  }
784435
@Nullable
    private ScopeBlock findPreviousSiblingScopeBlock(ScopeBlock sb) {
        ScopeBlock parent = sb.getParent();
        if (parent == null) {
            return null;
        }

        List<ScopeBlock> children = parent.getChildren();
        if (children == null) {
            return null;
        }

        ScopeBlock lastSibling = null;
        for (ScopeBlock sibling : children) {
            if (sibling.equals(sb)) {
                return lastSibling;
            }
            lastSibling = sibling;
        }

        return null;
    }
1330557
public Node getScopeRoot() {
    int roots = scopeRoots.size();
    if (roots > 0) {
      return scopeRoots.get(roots - 1);
    } else {
      AbstractScope<?, ?> s = scopes.peek();
      return s != null ? s.getRootNode() : null;
    }
  }
47033
public IBasicScope getBasicScope(ScopeType type, String name) {
        return children.getBasicScope(type, name);
    }
1106575
public String getHeader(String name) {

		String nameToSearch = getCorrectHeaderName(name);
		String value = null;
		if (this.message.getHeader(nameToSearch) != null) {
			value = ((SIPHeader) this.message.getHeader(nameToSearch))
					.getValue();
		}
		if(logger.isDebugEnabled()) {
			logger.debug("getHeader "+ name+ ", value="+ value	);
		}
		return value;
	}
1120155
@Override
    public NGScope scope() {
        NGScope isolateScope = NGScope.create();
        isolateScope.put(getName(), "=");
        return isolateScope;
    }
1288264
private boolean isGlobalVarReference(String name, Scope s) {
    Var v = s.getVar(name);
    if (v == null && externsScope != null) {
      v = externsScope.getVar(name);
    }
    return v != null && !v.isLocal();
  }
977755
public CompletableFuture<String> getScope(final String scopeName) {
        Preconditions.checkNotNull(scopeName);
        return streamStore.getScopeConfiguration(scopeName);
    }
872973
function getScope(scopeManager, currentNode) {

    // On Program node, get the outermost scope to avoid return Node.js special function scope or ES modules scope.
    const inner = currentNode.type !== "Program";

    for (let node = currentNode; node; node = node.parent) {
        const scope = scopeManager.acquire(node, inner);

        if (scope) {
            if (scope.type === "function-expression-name") {
                return scope.childScopes[0];
            }
            return scope;
        }
    }

    return scopeManager.scopes[0];
}
863923
function () {
      let scope = context.getScope();
      while (scope) {
        const node = scope.block && scope.block.parent && scope.block.parent.parent;
        if (node && utils.isES5Component(node)) {
          return node;
        }
        scope = scope.upper;
      }
      return null;
    }