Can't use preCtorInit because the mount point may not exist until the constructor has run.
435481
function mountTo_update(winjsComponent, propName, oldValue, newValue) {
                var data = winjsComponent.data[propName] || {};
                var version = (data.version || 0) + 1;
                winjsComponent.data[propName] = {
                    // *mountComponent* may run asynchronously and we may queue it multiple
                    // times before it runs. *version* allows us to ensure only the latest
                    // version runs and the others are no ops.
                    version: version,
                    // *element* is the element to which we last mounted the component.
                    element: data.element
                };

                var mountComponent = function () {
                    if (version === winjsComponent.data[propName].version) {
                        var oldElement = winjsComponent.data[propName].element;

                        if (newValue) {
                            var newElement = getMountPoint(winjsComponent);
                            if (oldElement && oldElement !== newElement) {
                                ReactDOM.unmountComponentAtNode(oldElement);
                            }

                            ReactDOM.render(newValue, newElement);
                            winjsComponent.data[propName].element = newElement;
                        } else if (oldValue) {
                            oldElement && ReactDOM.unmountComponentAtNode(oldElement);
                            winjsComponent.data[propName].element = null;
                        }
                    }
                };

                // *isDeclarativeControlContainer* is a hook some WinJS controls provide
                // (e.g. HubSection, PivotItem) to ensure that processing runs on the
                // control only when the control is ready for it. This enables lazy loading
                // of HubSections/PivotItems (e.g. load off screen items asynchronously in
                // batches). Additionally, doing processing thru this hook guarantees that
                // the processing won't run until the control is in the DOM.
                var winControl = winjsComponent.winControl;
                var queueProcessing = winControl.constructor.isDeclarativeControlContainer;
                if (queueProcessing && typeof queueProcessing === "function") {
                    queueProcessing(winControl, mountComponent);
                } else {
                    mountComponent();
                }
            }
1211672
def mount(dev, mountpoint, flags='', log=None):
    ''''''
    ensureDirectory(mountpoint)
    systemCall('mount %s %s %s' % (flags, dev, mountpoint),
               log=log)
1190581
function initTernServer(dir, files) {
            initTernModule();
            numResolvedFiles = 0;
            numAddedFiles = 0;
            stopAddingFiles = false;
            numInitialFiles = files.length;

            ternPromise.done(function (ternModule) {
                var msg = {
                    type        : MessageIds.TERN_INIT_MSG,
                    dir         : dir,
                    files       : files,
                    env         : ternEnvironment,
                    timeout     : PreferencesManager.get("jscodehints.inferenceTimeout")
                };
                _ternNodeDomain.exec("invokeTernCommand", msg);
            });
            rootTernDir = dir + "/";
        }
404093
public void init ()
    {
        if (_initers == null) {
            log.warning("Refusing repeat init() request.");
            return;
        }

        ObserverList<InitComponent> list = _initers.toObserverList();
        _initers = null;
        list.apply(new ObserverList.ObserverOp<InitComponent>() {
            public boolean apply (InitComponent comp) {
                log.debug("Initializing component", "comp", comp);
                comp.init();
                return true;
            }
        });
    }
912759
function (init) {
		var series = this,
			points = series.points,
			startAngleRad = series.startAngleRad;

		if (!init) {
			each(points, function (point) {
				var graphic = point.graphic,
					args = point.shapeArgs;

				if (graphic) {
					// start values
					graphic.attr({
						r: series.center[3] / 2, // animate from inner radius (#779)
						start: startAngleRad,
						end: startAngleRad
					});

					// animate
					graphic.animate({
						r: args.r,
						start: args.start,
						end: args.end
					}, series.options.animation);
				}
			});

			// delete this function to allow it only once
			series.animate = null;
		}
	}
1141806
@Override
    public void contextInitialized(ServletContextEvent event) {
        try {
            initEurekaEnvironment();
            initEurekaServerContext();

            ServletContext sc = event.getServletContext();
            sc.setAttribute(EurekaServerContext.class.getName(), serverContext);
        } catch (Throwable e) {
            logger.error("Cannot bootstrap eureka server :", e);
            throw new RuntimeException("Cannot bootstrap eureka server :", e);
        }
    }
88603
private void ensureInitialized() {
    if (!mInitialized) {
     lock.lock();
      try {
        if (!mInitialized) {
          mInternalPath = Environment.getDataDirectory();
          mExternalPath = Environment.getExternalStorageDirectory();
          updateStats();
          mInitialized = true;
        }
      } finally {
        lock.unlock();
      }
    }
  }
897505
function() {
			var self = this, opt, preinitOpt, err;

			preinitOpt = self.getOption('preinit');
			if (typeof(preinitOpt) == "function") {
				preinitOpt(self);
			} else {
				plupload.each(preinitOpt, function(func, name) {
					self.bind(name, func);
				});
			}

			bindEventListeners.call(self);

			// Check for required options
			plupload.each(['container', 'browse_button', 'drop_element'], function(el) {
				if (self.getOption(el) === null) {
					err = {
						code : plupload.INIT_ERROR,
						message : plupload.sprintf(plupload.translate("%s specified, but cannot be found."), el)
					}
					return false;
				}
			});

			if (err) {
				return self.trigger('Error', err);
			}


			if (!settings.browse_button && !settings.drop_element) {
				return self.trigger('Error', {
					code : plupload.INIT_ERROR,
					message : plupload.translate("You must specify either browse_button or drop_element.")
				});
			}


			initControls.call(self, settings, function(inited) {
				var initOpt = self.getOption('init');
				if (typeof(initOpt) == "function") {
					initOpt(self);
				} else {
					plupload.each(initOpt, function(func, name) {
						self.bind(name, func);
					});
				}

				if (inited) {
					self.runtime = Runtime.getInfo(getRUID()).type;
					self.trigger('Init', { runtime: self.runtime });
					self.trigger('PostInit');
				} else {
					self.trigger('Error', {
						code : plupload.INIT_ERROR,
						message : plupload.translate('Init error.')
					});
				}
			});
		}
719843
def mount(cls, mount_point, lower_dir, upper_dir, mount_table=None):
        """"""
        ensure_directories(mount_point, lower_dir, upper_dir)
        # Load the mount table if it isn't given
        if not mount_table:
            mount_table = MountTable.load()
        # Check if the mount_point is in use
        if mount_table.is_mounted(mount_point):
            # Throw an error if it is
            raise AlreadyMounted()
        # Build mount options
        options = "rw,lowerdir=%s,upperdir=%s" % (lower_dir, upper_dir)
        # Run the actual mount
        subwrap.run(['mount', '-t', 'overlayfs', '-o', options,
            'olyfs%s' % random_name(), mount_point])
        return cls(mount_point, lower_dir, upper_dir)
1330877
function init(pluginInterface) {
    const pi = pluginInterface;

    // Static contents call
    pi.http.endpoint('get', '*', (req, res, next) => {
        let path = req.path;
        if (path.charAt(path.length-1)=='/') path += 'index.html';

        const pt = pathm.join(pathm.dirname(__filename), 'htdocs', path);
        fs.readFile(pt, (err, data)=>{
            if (err) {
                res.status(404).send('No such resource');
                return;
            }
            if (path==='/js/customize.js') {
                data = data.toString();
                data = data.split('__%%RSA_PUB_KEY%%__')
                    .join('"'+pi.crypt.getPubKey()+'"');
            }
            res.set('Content-Type', mime.getType(path)); // 'text/html; charset=UTF-8'
            res.status(200);

            res.send(data);
        });
    });
}
1213745
def preloop(self):
        """"""
        if not self.parser:
            self.stdout.write("Welcome to imagemounter {version}".format(version=__version__))
            self.stdout.write("\n")

            self.parser = ImageParser()
            for p in self.args.paths:
                self.onecmd('disk "{}"'.format(p))
1264422
function initComponentsDir (config, dir) {
    // iterate over file names in directory
    _.each(fs.readdirSync(dir), file => {
        // get absolute file
        var absDir = `${dir}/${file}`
        // stat file to check if it is directory
        var stat = fs.statSync(absDir)
        // if file is directory them in should contain component
        if (stat.isDirectory()) {
            initComponentDir(config, absDir, file)
        }
        // ignore anything else
        else {
            debug('initComponentsDir: ignoring %s', absFile)
        }
    })
}
77150
function initTernModule() {
            var moduleDeferred = $.Deferred();
            ternPromise = moduleDeferred.promise();
            
            function prepareTern() {  
                _ternNodeDomain.exec("setInterface", {
                    messageIds : MessageIds
                });

                _ternNodeDomain.exec("invokeTernCommand", {
                    type: MessageIds.SET_CONFIG,
                    config: config
                });
                moduleDeferred.resolveWith(null, [_ternNodeDomain]);
            }
            
            if (_ternNodeDomain) {
                _ternNodeDomain.exec("resetTernServer");
                moduleDeferred.resolveWith(null, [_ternNodeDomain]);
            } else {
                _ternNodeDomain     = new NodeDomain("TernNodeDomain", _domainPath);
                _ternNodeDomain.on("data", function (evt, data) {
                    if (config.debug) {
                        console.log("Message received", data.type);
                    }

                    var response = data,
                        type = response.type;

                    if (type === MessageIds.TERN_COMPLETIONS_MSG ||
                            type === MessageIds.TERN_CALLED_FUNC_TYPE_MSG) {
                        // handle any completions the tern server calculated
                        handleTernCompletions(response);
                    } else if (type === MessageIds.TERN_GET_FILE_MSG) {
                        // handle a request for the contents of a file
                        handleTernGetFile(response);
                    } else if (type === MessageIds.TERN_JUMPTODEF_MSG) {
                        handleJumptoDef(response);
                    } else if (type === MessageIds.TERN_SCOPEDATA_MSG) {
                        handleScopeData(response);
                    } else if (type === MessageIds.TERN_REFS) {
                        handleRename(response);
                    } else if (type === MessageIds.TERN_PRIME_PUMP_MSG) {
                        handlePrimePumpCompletion(response);
                    } else if (type === MessageIds.TERN_GET_GUESSES_MSG) {
                        handleGetGuesses(response);
                    } else if (type === MessageIds.TERN_UPDATE_FILE_MSG) {
                        handleUpdateFile(response);
                    } else if (type === MessageIds.TERN_INFERENCE_TIMEDOUT) {
                        handleTimedOut(response);
                    } else if (type === MessageIds.TERN_WORKER_READY) {
                        moduleDeferred.resolveWith(null, [_ternNodeDomain]);
                    } else if (type === "RE_INIT_TERN") {
                        // Ensure the request is because of a node restart
                        if (currentModule) {
                            prepareTern();
                            // Mark the module with resetForced, then creation of TernModule will 
                            // happen again as part of '_maybeReset' call
                            currentModule.resetForced = true;
                        }
                    } else {
                        console.log("Tern Module: " + (response.log || response));
                    }
                });
            
                _ternNodeDomain.promise().done(prepareTern);
            }
        }
628370
@Override
    public void afterInitialized(BaseComponent comp) {
        super.afterInitialized(comp);
        PluginContainer container = comp.getAncestor(PluginContainer.class, true);
        plugin = (ElementPlugin) ElementUI.getAssociatedElement(container);
    }
1125034
function PluginInitializationError (message, module) {
    this.message = message;
    this.stack = new Error().stack;
    this.module = module;
}
717238
@PostConstruct
	public void init() {
		findBeans();
		SAXBuilder builder = new SAXBuilder();
		Document doc = null;
		try {
			doc = builder.build(getSchema().getInputStream());
			SchemaParserImpl schemaParser = new SchemaParserImpl();
			schemaParser.parse(doc);
			ParserSource parserSource = new InputStreamParserSource(getProcesses());
			
			ProcessTextProvider textProvider = new ProcessTextProvider(parserSource,schemaParser,this);
			ParsePackage parsePackage = new ParsePackage();
			parsePackage.parse(textProvider);
		} catch (Exception e) {
			throw new WorkflowException(e);
		}
		HashIdLogger.log(this,"postconstruct");
	}
46885
private void init() throws IOException {
    WR = new Path(conf.get("fs.snapshot.waitingroom", "/.WR"));
    WR = WR.makeQualified(dfs);
  }