Initializes any callbacks for streams which have defined
        the plotted object as a source.
557915
def _construct_callbacks(self):
        
        cb_classes = set()
        registry = list(Stream.registry.items())
        callbacks = Stream._callbacks['bokeh']
        for source in self.link_sources:
            streams = [
                s for src, streams in registry for s in streams
                if src is source or (src._plot_id is not None and
                                     src._plot_id == source._plot_id)]
            cb_classes |= {(callbacks[type(stream)], stream) for stream in streams
                           if type(stream) in callbacks and stream.linked
                           and stream.source is not None}
        cbs = []
        sorted_cbs = sorted(cb_classes, key=lambda x: id(x[0]))
        for cb, group in groupby(sorted_cbs, lambda x: x[0]):
            cb_streams = [s for _, s in group]
            cbs.append(cb(self, cb_streams, source))
        return cbs
1079607
def initialize_dynamic(obj):
    
    dmaps = obj.traverse(lambda x: x, specs=[DynamicMap])
    for dmap in dmaps:
        if dmap.unbounded:
            # Skip initialization until plotting code
            continue
        if not len(dmap):
            dmap[dmap._initial_key()]
737333
@Override
	public void initUpstream()
	{
		for (Entity entity : interaction.getParticipant())
		{
			addToUpstream(entity, getGraph());
		}
		for (Control control : interaction.getControlledOf())
		{
			addToUpstream(control, getGraph());
		}
	}
546339
protected void init() {
        this.gridHeader = createGridHeader();
        this.grid = createGrid();
        buildLayout();
        setSizeFull();
        setImmediate(true);
        if (doSubscribeToEventBus()) {
            eventBus.subscribe(this);
        }
    }
949353
void init(BuildSource source) {
        this.sqlInfo = source.getSqlInfo();
        this.join = sqlInfo.getJoin();
        this.params = sqlInfo.getParams();
        this.context = source.getParamObj();
        this.prefix = source.getPrefix();
        this.suffix = source.getSuffix();
    }
813713
function() {
    var projection = this.projection;
    
    this.datasources.forEach(function(datasource) {
      datasource.load && datasource.load(function(error) {
        datasource.project && datasource.project(projection);
      });
    });
  }
61998
private void initData(final List<ChartData> DATA) {
        if (null == DATA || DATA.isEmpty()) {
            for (int i = 0; i < (getNoOfSectors() + 1); i++) { addData(new ChartData(0d)); }
        } else {
            setData(DATA);
        }
    }
81374
private static void initStreams() {
		Log.info("Initializing Streams...");
		MetadataCommand command = (MetadataCommand) PreConfigurationContext.getCommandByName("-metadata");
		BatchCommand batchCommand = (BatchCommand) PreConfigurationContext.getCommandByName("-batchSize");
		
		AsyncAnnotationAuditOutputStream asyncAnnotationStream = new AsyncAnnotationAuditOutputStream(
                new AuditProcessOutputStream(Context.getConfigContext()), annotationTransformer);
		
        AuditProcessOutputStream processStream =  new AuditProcessOutputStream(Context.getConfigContext());
        
        
		if (command.isAsync()) {
		    MetadataLookupStream metadataStream;
		    if(batchCommand.getBatchSize() > 0) {
	            BatchProcessStream batchStream = new BatchProcessStream(processStream, batchCommand.getBatchSize());
	            metadataStream = new MetadataLookupStream(batchStream);
		    } else {
		        metadataStream = new MetadataLookupStream(processStream);
		    }
			
			AsyncAuditOutputStream asyncStream = new AsyncAuditOutputStream(metadataStream, asyncAnnotationStream);
			auditStream = new AuditEventOutputStream(asyncStream, configContext);
		} else {
		    AsyncAuditOutputStream asyncStream;
		    if(batchCommand.getBatchSize() > 0) {
                BatchProcessStream batchStream = new BatchProcessStream(processStream, batchCommand.getBatchSize());
                asyncStream = new AsyncAuditOutputStream(batchStream, asyncAnnotationStream);
            } else {
                asyncStream = new AsyncAuditOutputStream(processStream, asyncAnnotationStream);
            }
			MetadataLookupStream metadataStream = new MetadataLookupStream(asyncStream);
			auditStream = new AuditEventOutputStream(metadataStream, configContext);
		}

		Log.info("Audit Streams Initialized.");
	}
1144714
public void initBasedOnOptions() {
    inputSourceMaps.putAll(options.inputSourceMaps);
    // Create the source map if necessary.
    if (options.sourceMapOutputPath != null) {
      sourceMap = options.sourceMapFormat.getInstance();
      sourceMap.setPrefixMappings(options.sourceMapLocationMappings);
      if (options.applyInputSourceMaps) {
        sourceMap.setSourceFileMapping(this);
        if (options.sourceMapIncludeSourcesContent) {
          for (SourceMapInput inputSourceMap : inputSourceMaps.values()) {
            addSourceMapSourceFiles(inputSourceMap);
          }
        }
      }
    }
  }
1168399
@Override
	public void registerExtenderCallbacks(final IBurpExtenderCallbacks callbacks) {

		// keep a reference to our callbacks object
		this.callbacks = callbacks;

		// obtain an extension helpers object
		helpers = callbacks.getHelpers();

		//get the output streams for info and error messages
		stdout = callbacks.getStdout();
		stderr = callbacks.getStderr();
		
		//put this into the local instance variable
		instance = this;

		//initialize the extension
		initialize();

		// set our extension name
		callbacks.setExtensionName(extensionName);

		callbacks.printOutput("Loaded " + extensionName);
	}
174705
function Sink(callback) {

  _.bindAll(this);

  this._dataPackets = [];

  this.writable = true;
  this.callback = callback;

  this.on('err', this._onError);

  Stream.apply(this);
}
1325228
void init() {
        if (dataSource == null) {
            if (connectionType.equals(ConnectionType.POOLED)) {
                HikariConfig config = new HikariConfig();
                config.setMaximumPoolSize(maximumPoolSize);
                config.setDataSourceClassName(dataSourceClass);
                config.addDataSourceProperty("url", url);
                config.addDataSourceProperty("user", user);
                config.addDataSourceProperty("password", password);
                config.setPoolName(CONNECTION_POOL_NAME);
                config.setAutoCommit(autoCommit);
                config.setMaximumPoolSize(maximumPoolSize);
              //  config.setConnectionTestQuery("SELECT 1");
                
                if (connectionTimeout != null) {
                    config.setConnectionTimeout(connectionTimeout);
                }
                if (idleTimeout != null) {
                    config.setIdleTimeout(idleTimeout);
                }
                if (maxLifetime != null) {
                    config.setMaxLifetime(maxLifetime);
                }
                if (minimumIdle != null) {
                    config.setMinimumIdle(minimumIdle);
                }

                ds = new HikariDataSource(config);
                dataSource = ds;

            } else if (connectionType.equals(ConnectionType.JNDI)) {
                if (null == jndiDataSource) {
                    throw new InitializationException("Could not obtain the db connection: jndi data source is null");
                }
                String DATASOURCE_CONTEXT = jndiDataSource;
                try {
                    Context initialContext = new InitialContext();
                    dataSource = (DataSource) initialContext.lookup(DATASOURCE_CONTEXT);
                    if (dataSource == null) {
                        Log.error("Failed to lookup datasource.");
                        throw new InitializationException(
                                "Could not obtain the db connection: Failed to lookup datasource: " + jndiDataSource);
                    }
                } catch (NamingException ex) {
                    throw new InitializationException("Could not obtain the db connection: jndi lookup failed", ex);
                }
            }
        }
    }
825620
public final <T1 extends SourceFile, T2 extends SourceFile> void init(
      List<T1> externs, List<T2> sources, CompilerOptions options) {
    JSModule module = new JSModule(JSModule.STRONG_MODULE_NAME);
    for (SourceFile source : sources) {
      module.add(new CompilerInput(source));
    }

    List<JSModule> modules = new ArrayList<>(1);
    modules.add(module);
    initModules(externs, modules, options);
    addFilesToSourceMap(sources);
  }
1151535
public void init(StreamImpl source)
  {
    _disableClose = false;
    _isDisableCloseSource = false;
    _readTime = 0;

    if (_source != null && _source != source) {
      close();
    }

    if (source == null) {
      throw new IllegalArgumentException();
    }

    _source = source;

    if (source.canRead()) {
      if (_tempRead == null) {
        _tempRead = TempBuffer.create();
        _readBuffer = _tempRead.buffer();
      }
    }
    _readOffset = 0;
    _readLength = 0;

    _readEncoding = null;
    _readEncodingName = "ISO-8859-1";
  }
616205
public void init() throws Exception {
		filter = bundleContext.createFilter(getFilter(dsName));
		
		tracker = new ServiceTracker<DataSource, DataSource>(bundleContext, filter, null);
		tracker.open();
		
		proxy = (DataSource) Proxy.newProxyInstance(
				DataSourceProxyFactory.class.getClassLoader(),
				new Class<?>[] { DataSource.class }, this);
	}
943183
private void init(InputSource is) throws FunctionLibException {

	try {

	    xmlReader = XMLUtil.createXMLReader();
	    xmlReader.setContentHandler(this);
	    xmlReader.setErrorHandler(this);
	    xmlReader.setEntityResolver(new FunctionLibEntityResolver());
	    xmlReader.parse(is);
	}
	catch (IOException e) {

	    throw new FunctionLibException("IO Exception: " + e.getMessage());
	}
	catch (SAXException e) {
	    throw new FunctionLibException("SaxException: " + e.getMessage());
	}

    }
437768
private void init(Class<?> type) {

    ParameterizedType parameterizedType =
      stream(nullSafeArray(type.getGenericInterfaces(), Type.class))
        .filter(this::isParameterizedFunctionType)
        .findFirst()
        .map(it -> (ParameterizedType) it)
        .orElseGet(() -> {

          Type genericSuperclass = type.getGenericSuperclass();

          return isParameterizedFunctionType(genericSuperclass) ? (ParameterizedType) genericSuperclass : null;

        });

    this.sourceType = parameterizedType != null
      ? ClassUtils.toRawType(parameterizedType.getActualTypeArguments()[0])
      : Object.class;

    this.targetType = parameterizedType != null
      ? ClassUtils.toRawType(parameterizedType.getActualTypeArguments()[1])
      : Object.class;
  }