Sets up the skeleton of the AST (the externs and root).
481342
private void initAST() {
    jsRoot = IR.root();
    externsRoot = IR.root();
    externAndJsRoot = IR.root(externsRoot, jsRoot);
  }
1084921
public function setup() {
		// do parent
		parent::setup();
		if ( ! isset( $this->struct['screen'] ) ) {
			$this->struct['screen'] = ( $this->parent ? $this->parent->slug : null );
		}
	}
1023633
public void setup(int width, int height, ScanCallback callback)
	{
		width_ = width; height_ = height;
		ySortedEdges_ = null;
		activeEdgesTable_ = null;
		numEdges_ = 0;
		callback_ = callback;
		if (scanBuffer_ == null)
			scanBuffer_ = new int[128 * 3];
		
		startAddingEdges();
	}
852193
public void setRoot(int root)
  {

    super.setRoot(root);

  	m_exprObj = FilterExprIteratorSimple.executeFilterExpr(root, 
  	                  m_lpi.getXPathContext(), m_lpi.getPrefixResolver(), 
  	                  m_lpi.getIsTopLevel(), m_lpi.m_stackFrame, m_expr);

  }
582640
def add_child(self, child):
        ''''''
        super(RootNode, self).add_child(child)
        child.attr_wrapper = self.attr_wrapper
982603
def _make_nodes(root):
    '''
    
    '''
    dirs = (
        ('{0}/etc'.format(root), 'root', 'root', '755'),
        ('{0}/dev'.format(root), 'root', 'root', '755'),
        ('{0}/proc'.format(root), 'root', 'root', '755'),
        ('{0}/dev/pts'.format(root), 'root', 'root', '755'),
        ('{0}/dev/shm'.format(root), 'root', 'root', '1755'),
    )

    nodes = (
        ('{0}/dev/null'.format(root), 'c', 1, 3, 'root', 'root', '666'),
        ('{0}/dev/zero'.format(root), 'c', 1, 5, 'root', 'root', '666'),
        ('{0}/dev/random'.format(root), 'c', 1, 8, 'root', 'root', '666'),
        ('{0}/dev/urandom'.format(root), 'c', 1, 9, 'root', 'root', '666'),
        ('{0}/dev/tty'.format(root), 'c', 5, 0, 'root', 'root', '666'),
        ('{0}/dev/tty0'.format(root), 'c', 4, 0, 'root', 'root', '666'),
        ('{0}/dev/console'.format(root), 'c', 5, 1, 'root', 'root', '600'),
        ('{0}/dev/full'.format(root), 'c', 1, 7, 'root', 'root', '666'),
        ('{0}/dev/initctl'.format(root), 'p', 0, 0, 'root', 'root', '600'),
        ('{0}/dev/ptmx'.format(root), 'c', 5, 2, 'root', 'root', '666'),
    )

    for path in dirs:
        __salt__['file.mkdir'](*path)

    for path in nodes:
        __salt__['file.mknod'](*path)
1093375
public function setup() {

		// run parents to setup sanitization filters
		parent::setup();
		if ( isset( $this->struct['value'] ) ) {
			$this->set_value( $this->struct['value'] );
		}
		// base attributes defined
		$this->attributes['name'] = $this->name();
		$this->attributes['id']   = $this->id() . '-control';
	}
1180131
def prepare(self):
    
    self.src_folder = self.get_src_folder()
    st = os.stat('%s/gradlew' % self.path)
    os.chmod('%s/gradlew' % self.path, st.st_mode | stat.S_IEXEC)
1258864
def add_node_parents(root: ast.AST) -> None:
    
    for node in ast.walk(root):
        for child in ast.iter_child_nodes(node):
            child.parent = node
234552
public void setIncludeRoot(File includeroot) {

        this.includeroot = includeroot;

        if (!includeroot.exists()) {
            throw new BuildException("includeroot doesn't exist: "
                    + includeroot);
        }
        if (!includeroot.isDirectory()) {
            throw new BuildException("includeroot must be a directory: "
                    + includeroot);
        }
    }
808811
public void setRoot(int context, Object environment)
  {
    super.setRoot(context, environment);

    try
    {
      if (null != m_exprs)
      {
        int n = m_exprs.length;
        DTMIterator newIters[] = new DTMIterator[n];
  
        for (int i = 0; i < n; i++)
        {
          DTMIterator iter = m_exprs[i].asIterator(m_execContext, context);
          newIters[i] = iter;
          iter.nextNode();
        }
        m_iterators = newIters;
      }
    }
    catch(Exception e)
    {
      throw new org.apache.xml.utils.WrappedRuntimeException(e);
    }
  }
1270386
def setup_callables(self):
        
        defaults = self.get_default_callables()
        for key, value in list(defaults.items()):
            self._postponed_callables.setdefault(key, value)
        for key in self.callables:
            value = self._postponed_callables.pop(key)
            value.setup_callable_system(self.system, init=True)
            setattr(self, key, value)
1083025
def setup_tree(self):
        """"""
        self.tree.insert("", tk.END, text="Example 1", iid="1")
        self.tree.insert("", tk.END, text="Example 2", iid="2")
        self.tree.insert("2", tk.END, text="Example Child")
        self.tree.heading("#0", text="Example heading")
54953
def setup_top(self):
        """"""
        self.top_grammar = SchemaNode("grammar")
        self.top_grammar.attr = {
            "xmlns": "http://relaxng.org/ns/structure/1.0",
            "datatypeLibrary": "http://www.w3.org/2001/XMLSchema-datatypes"}
        self.tree = SchemaNode("start")
76323
def build(self):
        
        self.children = BasicFactory.build(self.root, self)
        collated = BasicFactory.collate(self.children)
        self.children = collated[0]
        self.attributes = collated[2]
        self.imports = collated[1]
        self.elements = collated[3]
        self.types = collated[4]
        self.groups = collated[5]
        self.agrps = collated[6]
644116
def set_roots(self, uproot_with=None):
        ''' 

        '''

        # Check for TREE_DIR
        self.treedir = os.environ.get('TREE_DIR', None) if not uproot_with else uproot_with
        if not self.treedir:
            treefilepath = os.path.dirname(os.path.abspath(__file__))
            if 'python/' in treefilepath:
                self.treedir = treefilepath.rsplit('/', 2)[0]
            else:
                self.treedir = treefilepath
            self.treedir = treefilepath
            os.environ['TREE_DIR'] = self.treedir

        # Check sas_base_dir
        if 'SAS_BASE_DIR' in os.environ:
            self.sasbasedir = os.environ["SAS_BASE_DIR"]
        else:
            self.sasbasedir = os.path.expanduser('~/sas')

        # make the directories
        if not os.path.isdir(self.sasbasedir):
            os.makedirs(self.sasbasedir)
463831
def setup():
    

    init_tasks()

    run_hook("before_setup")

    # Create shared folder
    env.run("mkdir -p %s" % (paths.get_shared_path()))
    env.run("chmod 755 %s" % (paths.get_shared_path()))

    # Create backup folder
    env.run("mkdir -p %s" % (paths.get_backup_path()))
    env.run("chmod 750 %s" % (paths.get_backup_path()))

    # Create uploads folder
    env.run("mkdir -p %s" % (paths.get_upload_path()))
    env.run("chmod 775 %s" % (paths.get_upload_path()))

    run_hook("setup")
    run_hook("after_setup")