Variables that live outside the current file
339954
function each(obj, cb) {
      if (!obj)
        return;

      if (!Array.isArray(obj) && typeof obj === "object")
        obj = Object.keys(obj);

      obj.forEach(cb);
    }
296594
function collectUnusedVariables(scope, unusedVars) {
	            var variables = scope.variables;
	            var childScopes = scope.childScopes;
	            var i, l;
	            if (scope.type !== "TDZ" && (scope.type !== "global" || config.vars === "all")) {
	                for (i = 0, l = variables.length; i < l; ++i) {
	                    var variable = variables[i];
	
	                    // skip a variable of class itself name in the class scope
	                    if (scope.type === "class" && scope.block.id === variable.identifiers[0]) {
	                        continue;
	                    }
	
	                    // skip function expression names and variables marked with markVariableAsUsed()
	                    if (scope.functionExpressionScope || variable.eslintUsed) {
	                        continue;
	                    }
	
	                    // skip implicit "arguments" variable
	                    if (scope.type === "function" && variable.name === "arguments" && variable.identifiers.length === 0) {
	                        continue;
	                    }
	
	                    // explicit global variables don't have definitions.
	                    var def = variable.defs[0];
	
	                    if (def) {
	                        var type = def.type;
	                        // skip catch variables
	                        if (type === "CatchClause") {
	                            if (config.caughtErrors === "none") {
	                                continue;
	                            }
	
	                            // skip ignored parameters
	                            if (config.caughtErrorsIgnorePattern && config.caughtErrorsIgnorePattern.test(def.name.name)) {
	                                continue;
	                            }
	                        }
	                        if (type === "Parameter") {
	                            // skip any setter argument
	                            if (def.node.parent.type === "Property" && def.node.parent.kind === "set") {
	                                continue;
	                            }
	
	                            // if "args" option is "none", skip any parameter
	                            if (config.args === "none") {
	                                continue;
	                            }
	
	                            // skip ignored parameters
	                            if (config.argsIgnorePattern && config.argsIgnorePattern.test(def.name.name)) {
	                                continue;
	                            }
	
	                            // if "args" option is "after-used", skip all but the last parameter
	                            if (config.args === "after-used" && def.index < def.node.params.length - 1) {
	                                continue;
	                            }
	                        } else {
	                            // skip ignored variables
	                            if (config.varsIgnorePattern && config.varsIgnorePattern.test(def.name.name)) {
	                                continue;
	                            }
	                        }
	                        if (def.node.type === 'VariableDeclarator') {
				        		// Variables can be marked as 'exported' in a comment if they are used as global variables
								var comments = def.parent.leadingComments;
								var report = true;
								if (Array.isArray(comments)) {
									for (var k = 0, len = comments.length; k < len; k++) {
										if (comments[k].type === "Block" && comments[k].value.toLowerCase().indexOf('exported') >= 0){ //$NON-NLS-1$
											report = false;
											break;
										}
									}
								}
								if (!report) {
									continue;
								}
							}
	                    }
	                    if (!isUsedVariable(variable) && !isExported(variable)) {
	                    	if(def) {
	                    		type = def.type;
	                    		variable.data = {
		                    		0: variable.identifiers[0].name,
		                    		nls: 'no-unused-vars-unused',
		                    		pid: 'no-unused-vars-unused'
		                    	};
		                    	if(type === "Parameter") {
		                    		continue;
		                    	}
		                    	if(type === "ImportBinding") {
		                    		variable.data.pid = 'no-unused-vars-import';
		                    	} else if(def.node.type === "FunctionDeclaration") {
		                    		var tern = context.getTern();
		                    		var refQuery = {
		                    			end: def.node.id.start
		                    		};
		                    		var filename = tern.file.name;
		                    		var refs = tern.findRefs(refQuery, tern.file);
		                    		var result = [];
		                    		if (refs && Array.isArray(refs.refs)) {
		                    			// filtering the refs from the current file - remove the one that matches the current node
		                    			refs.refs.forEach(function(match) {
		                    				if (match.file !== filename) {
		                    					// any match in a different file is a good match
		                    					result.push(match);
		                    				}
		                    			});
		                    		}
		                    		if (result.length > 0) {
		                    			continue;
		                    		}
		                    		variable.data.pid = variable.data.nls = 'no-unused-vars-unused-funcdecl';
		                    	} else if(typeof variable.isread === "boolean" && !variable.isread) {
		                    		variable.data.pid = variable.data.nls = 'no-unused-vars-unread';
		                    	}
	                    	}
	                        unusedVars.push(variable);
	                    }
	                }
	            }
	            for (i = 0, l = childScopes.length; i < l; ++i) {
	                collectUnusedVariables(childScopes[i], unusedVars);
	            }
	            return unusedVars;
	        }
1115474
function(directive, directiveName, currentFile, variables) {
			if (this._inConditional()) {
				if (!this._isConditional(directiveName)) {
					this.currentConditional.addDirective(directive);
					return {output: ""};
				}
			}

			var attributes = this._parseAttributes(directive);

			function interpolate() {
				for (var i = 0; i < attributes.length; i++) {
					var attribute = attributes[i];
					attribute.name = this._interpolate(attribute.name, variables, false);
					attribute.value = this._interpolate(attribute.value, variables, false);
				}
			}

			switch (directiveName) {
				case "if":
					interpolate.apply(this);
					return this._handleIf(attributes);
				case "elif":
					interpolate.apply(this);
					return this._handleElseIf(attributes);
				case "else":
					interpolate.apply(this);
					return this._handleElse();
				case "endif":
					interpolate.apply(this);
					return this._handleEndIf(currentFile, variables);
				case "set":
					interpolate.apply(this);
					return this._handleSet(attributes);
				case "echo":
					interpolate.apply(this);
					return this._handleEcho(attributes, variables);
				case "include":
					interpolate.apply(this);
					return this._handleInclude(attributes, currentFile, variables);
			}

			return {error: "Could not find parse directive #" + directiveName};
		}
621943
function findVariables(string) {
  // Do not parse empty files. Otherwise gonzales.parse will fail
  if (!string) {
    return [];
  }

  var out = [],
      ast = gonzales.parse(string, {
        syntax: 'less'
      });

  ast.traverseByType('value', function(subAst) {
    subAst.traverseByType('variable', function(node) {
      out.push(node.content.toString());
    });
  });

  return out;
}
337978
def open_outside_spyder(self, fnames):
        """"""
        for path in sorted(fnames):
            path = file_uri(path)
            ok = programs.start_file(path)
            if not ok:
                self.sig_edit.emit(path)
455384
function setLocalVariable( $varName, $varValue, $rootNamespace )
    {
        $this->CurrentLocalVariablesNames[$rootNamespace][$varName] = 1;
        $this->setVariable( $varName, $varValue, $rootNamespace );
    }
461665
private function SaveGlobalVariablesToJson()
    {
        $variables = array();
        
        foreach($this->symbols->headers as $header)
        {
            if(!$header->HasGlobalVariables())
                continue;
            
            foreach($header->namespaces as $namespace)
            {
                if(!$namespace->HasGlobalVariables())
                    continue;
                
                foreach($namespace->global_variables as $variable)
                {
                    if(trim($variable->description))
                    {
                        $variables[$header->name][$namespace->name]
                            [$variable->name] = [
                                "type" => $variable->original_type,
                                "description" => $variable->description
                            ]
                        ;
                    }
                    else
                    {
                        $variables[$header->name][$namespace->name]
                            [$variable->name] = [
                                "type" => $variable->original_type
                            ]
                        ;
                    }
                }
            }
        }
        
        if(count($variables) > 0)
        {
            file_put_contents(
                $this->definitions_path . "variables.json", 
                Json::Encode($variables)
            );

            unset($variables);
        }
    }
1239747
def __is_outside_of_builddir(project, path_to_check):
    """"""
    bdir = project.builddir
    cprefix = os.path.commonprefix([path_to_check, bdir])
    return cprefix != bdir
221558
function createLocalVariablesList()
    {
        $this->LocalVariablesNamesStack[] = array();
        $this->CurrentLocalVariablesNames =& $this->LocalVariablesNamesStack[ count( $this->LocalVariablesNamesStack ) - 1];
    }
4369
public void readExternal(java.io.ObjectInput in)
        throws java.io.IOException, ClassNotFoundException
    {
        _realmName= (String)in.readObject();
        _config=(String)in.readObject();
        if (_config!=null)
            load(_config);
    }
515194
def variables(
            self,
            name=None,
            function=None,
            decl_type=None,
            header_dir=None,
            header_file=None,
            recursive=None,
            allow_empty=None):

        """"""
        return (
            self._find_multiple(
                self._impl_matchers[
                    scopedef_t.variable],
                name=name,
                function=function,
                decl_type=decl_type,
                header_dir=header_dir,
                header_file=header_file,
                recursive=recursive,
                allow_empty=allow_empty)
        )
55714
def build_vars(path=None):
        """"""
        init_vars = {
            "__name__": "__main__",
            "__package__": None,
            "reload": reload,
        }
        if path is not None:
            init_vars["__file__"] = fixpath(path)
        # put reserved_vars in for auto-completion purposes
        for var in reserved_vars:
            init_vars[var] = None
        return init_vars
1130261
def local_variable_action(self, text, loc, var):
        """"""
        exshared.setpos(loc, text)
        if DEBUG > 0:
            print("LOCAL_VAR:",var, var.name, var.type)
            if DEBUG == 2: self.symtab.display()
            if DEBUG > 2: return
        index = self.symtab.insert_local_var(var.name, var.type, self.shared.function_vars)
        self.shared.function_vars += 1
        return index
952053
function cleanSuperGlobalVariables()
    {
        if (isset($_GET)) $_GET = array();
        if (isset($_POST)) $_POST = array();
        if (isset($_COOKIE)) $_COOKIE = array();
        if (isset($_FILES)) $_FILES = array();
        if (isset($_ENV)) $_ENV = array();
        if (isset($_REQUEST)) $_REQUEST = array();
        if (isset($_SERVER)) $_SERVER = array();
        if (isset($_SESSION)) $_SESSION = array();
        if (isset($GLOBALS)) $GLOBALS = array();
    }
1240720
def currentFolder(self, value):
        """"""
        if value in self.folders:
            if value.lower() != 'root':
                self._currentFolder = value
                self._location = "%s/%s" % (self.root, value)
            else:
                self._currentFolder = value
                self._location = self.root
            self.__init(folder=value)
608964
def _ctypes_ex_variables(executable):
    
    result = []
    for p in executable.ordered_parameters:
        _ctypes_code_parameter(result, p, "indices")
        _ctypes_code_parameter(result, p, "variable")
        _ctypes_code_parameter(result, p, "out")

    if type(executable).__name__ == "Function":
        #For functions, we still create a subroutine-type interface and then just add an extra
        #output-type parameter for the function's return type.
        _ctypes_code_parameter(result, executable, "indices")
        _ctypes_code_parameter(result, executable, "variable")
        _ctypes_code_parameter(result, executable, "out")
        
    return result
1363208
def environment(variables)
      before do
        variables.each do |key, value|
          if value.nil?
            _environment.delete(key.to_s)
          else
            _environment[key.to_s] = value.to_s
          end
        end
      end
    end