Lazily initializes the bundles. This is (currently) necessary because
this object may be created before the locale to be used is known.
429770
protected void initBundles() {
        if (commonBundle == null) {
            Locale locale = configuration.getLocale();
            this.commonBundle = ResourceBundle.getBundle(commonBundleName, locale);
            this.docletBundle = ResourceBundle.getBundle(docletBundleName, locale);
        }
    }
337658
private Collection<Locale> initLocales() {

        Collection<Locale> locales = null;
        switch (m_bundleType) {
            case DESCRIPTOR:
                locales = new ArrayList<Locale>(1);
                locales.add(Descriptor.LOCALE);
                break;
            case XML:
            case PROPERTY:
                locales = OpenCms.getLocaleManager().getAvailableLocales(m_cms, m_resource);
                break;
            default:
                throw new IllegalArgumentException();
        }
        return locales;

    }
46995
public void init(Configuration configuration)
			throws Exception
	{
		String baseName = configuration.getBootstrapPropertyResolver().getProperty("ResourceBundleFactory.Bundle");
		if (baseName != null)
		{
			this.baseName = baseName;
		}
	}
898927
public function init()
    {
        parent::init();

        // Add in our Twig extensions
        Craft::$app->view->registerTwigExtension(new AgnosticFetchTwigExtension());

        Event::on(CraftVariable::class, CraftVariable::EVENT_INIT, function(Event $event) {
            /** @var CraftVariable $variable */
            $variable = $event->sender;
            $variable->set('agnosticfetch', AgnosticFetchVariable::class);
        });
    }
1283417
public void init(ResourceBundle resourceBundle, String strResourceName, boolean bReturnKeyOnMissing)
    {
        m_resourceBundle = resourceBundle;
        m_strResourceName = strResourceName;
        m_bReturnKeyOnMissing = bReturnKeyOnMissing;
    }
1233262
void setInitializationData(Bundle contributingBundle, ServiceReference<?> urlConverterSR) {
		if (this.contributingBundle != null || this.urlConverterSR != null) {
			throw new IllegalStateException();
		}
		this.contributingBundle = contributingBundle;
		this.urlConverterSR = urlConverterSR;
	}
98766
@Override
	public void init(ResourceBundlesHandler bundler, Boolean useRandomParam, String media, boolean alternate,
			boolean displayAlternateStyles, String title) {
		init(bundler, useRandomParam);

		this.media = null == media ? "screen" : media;
		this.displayAlternateStyles = displayAlternateStyles;
		this.alternate = alternate;
		this.title = title;
		if (displayAlternateStyles && alternate) {
			throw new IllegalArgumentException(
					"You can't use the displayAlternateStyle and alternate properties together.");
		}
		if (displayAlternateStyles && StringUtils.isNotEmpty(title)) {
			this.title = null;
			LOGGER.warn("As you are using the displayAlternateStyle property, the title value will be overrided.");
		}
	}
181477
private void initialize(ULocale locale) {
        ICUResourceBundle bundle = (ICUResourceBundle)ICUResourceBundle.getBundleInstance(
                ICUData.ICU_ZONE_BASE_NAME, locale);
        _zoneStrings = (ICUResourceBundle)bundle.get(ZONE_STRINGS_BUNDLE);

        // TODO: Access is synchronized, can we use a non-concurrent map?
        _tzNamesMap = new ConcurrentHashMap<String, ZNames>();
        _mzNamesMap = new ConcurrentHashMap<String, ZNames>();
        _namesFullyLoaded = false;

        _namesTrie = new TextTrieMap<NameInfo>(true);
        _namesTrieFullyLoaded = false;

        // Preload zone strings for the default time zone
        TimeZone tz = TimeZone.getDefault();
        String tzCanonicalID = ZoneMeta.getCanonicalCLDRID(tz);
        if (tzCanonicalID != null) {
            loadStrings(tzCanonicalID);
        }
    }
54878
private void initResourceBundlesFromFullMapping(List<JoinableResourceBundle> resourceBundles) {

		if (LOGGER.isInfoEnabled()) {
			LOGGER.info("Building bundles from the full bundle mapping. Only modified bundles will be processed.");
		}
		Properties mappingProperties = resourceBundleHandler.getJawrBundleMapping();
		FullMappingPropertiesBasedBundlesHandlerFactory factory = new FullMappingPropertiesBasedBundlesHandlerFactory(
				resourceType, resourceReaderHandler, jawrConfig.getGeneratorRegistry(), chainFactory);

		resourceBundles.addAll(factory.getResourceBundles(mappingProperties));
	}
396579
function init() {
        // This function is called during Ghost's initialization.
        // Reading translation file for messages from core .js files and keeping its content in memory
        // The English file is always loaded, until back-end translations are enabled in future versions.
        // Before that, see previous tasks on issue #6526 (error codes or identifiers, error message
        // translation at the point of display...)
        coreStrings = fs.readFileSync(path.join(__dirname, '..', '..', 'translations', 'en.json'));

        // if translation file is not valid, you will see an error
        try {
            coreStrings = JSON.parse(coreStrings);
        } catch (err) {
            coreStrings = undefined;
            throw err;
        }

        _private.initializeIntl();
    }
1272750
@Override
    protected void initializeImpl()
    {
        //get encoding
        this.responseDataEncoding=this.getConfigurationValue(AbstractHTTPResponseHandler.RESPONSE_DATA_ENCODING_PROPERTY_KEY);
        if(this.responseDataEncoding==null)
        {
            this.responseDataEncoding=IOHelper.getDefaultEncoding();
        }
    }
202082
public void init(Object bundleContext, String servicePid, Dictionary<String, String> dictionary) {
    	this.bundleContext = bundleContext;
    	this.servicePid = servicePid;
    	this.setProperties(dictionary);
    }
709601
private void initCompositeBundleMap(List<JoinableResourceBundle> bundles) {
		for (JoinableResourceBundle bundle : bundles) {
			if (bundle.isComposite()) {
				List<JoinableResourceBundle> childBundles = ((CompositeResourceBundle) bundle).getChildBundles();
				for (JoinableResourceBundle childBundle : childBundles) {
					List<JoinableResourceBundle> associatedBundles = compositeResourceBundleMap
							.get(childBundle.getId());
					if (associatedBundles == null) {
						associatedBundles = new ArrayList<>();
					}
					associatedBundles.add(bundle);
					compositeResourceBundleMap.put(childBundle.getId(), associatedBundles);
				}
			}
		}
	}
1059479
private static synchronized void lazyInit() {
		if (registry==null) {
			InputStream isXml = ProteinModification.class.getResourceAsStream(DIR_XML_PTM_LIST);
			lazyInit(isXml);
		}
	}
1167566
public void startBundle(Bundle bundle)
    {
        if (bundle != null)
            if ((bundle.getState() != Bundle.ACTIVE) && (bundle.getState() != Bundle.STARTING))
        {
            try {
                bundle.start();
            } catch (BundleException e) {
                e.printStackTrace();
            }
        }
    }
1020466
synchronized void activateLazily() {
        if (cacheManager != null)
            return; // lazy initialization has already completed

        final boolean trace = TraceComponent.isAnyTracingEnabled();
        
        Properties vendorProperties = new Properties();
        
        String uriValue = (String) configurationProperties.get("uri");
        final URI uri;
        if (uriValue != null)
            try {
                uri = new URI(uriValue);
            } catch (URISyntaxException e) {
                throw new IllegalArgumentException(Tr.formatMessage(tc, "INCORRECT_URI_SYNTAX", e), e);
            }
        else
            uri = null;
        
        for (Map.Entry<String, Object> entry : configurationProperties.entrySet()) {
            String key = entry.getKey();
            Object value = entry.getValue();

            //properties start with properties.0.
            if (key.length () > TOTAL_PREFIX_LENGTH && key.charAt(BASE_PREFIX_LENGTH) == '.' && key.startsWith(BASE_PREFIX)) {
                key = key.substring(TOTAL_PREFIX_LENGTH);
                if (!key.equals("config.referenceType")) 
                    vendorProperties.setProperty(key, (String) value);
            }
        }

        // load JCache provider from configured library, which is either specified as a libraryRef or via a bell
        final ClassLoader cl = library.getClassLoader();

        try {
            AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
                ClassLoader loader = new CachingProviderClassLoader(cl);

                if (trace && tc.isDebugEnabled())
                    CacheHashMap.tcInvoke("Caching", "getCachingProvider", loader);

                cachingProvider = Caching.getCachingProvider(loader);

                tcCachingProvider = "CachingProvider" + Integer.toHexString(System.identityHashCode(cachingProvider));

                if (trace && tc.isDebugEnabled()) {
                    CacheHashMap.tcReturn("Caching", "getCachingProvider", tcCachingProvider, cachingProvider);
                    Tr.debug(this, tc, "caching provider class is " + cachingProvider.getClass().getName());
                    CacheHashMap.tcInvoke(tcCachingProvider, "getCacheManager", uri, null, vendorProperties);
                }

                cacheManager = cachingProvider.getCacheManager(uri, null, vendorProperties);

                return null;
            });

            tcCacheManager = "CacheManager" + Integer.toHexString(System.identityHashCode(cacheManager));

            if (trace && tc.isDebugEnabled()) {
                CacheHashMap.tcReturn(tcCachingProvider, "getCacheManager", tcCacheManager, cacheManager);
                CacheHashMap.tcInvoke(tcCachingProvider, "isSupported", "STORE_BY_REFERENCE");
            }

            supportsStoreByReference = cachingProvider.isSupported(OptionalFeature.STORE_BY_REFERENCE);

            if (trace && tc.isDebugEnabled())
                CacheHashMap.tcReturn(tcCachingProvider, "isSupported", supportsStoreByReference);
        } catch (CacheException x) {
            if (library.getFiles().isEmpty()) {
                Tr.error(tc, "ERROR_CONFIG_EMPTY_LIBRARY", library.id(), Tr.formatMessage(tc, "SESSION_CACHE_CONFIG_MESSAGE", RuntimeUpdateListenerImpl.sampleConfig));
            }
            throw x;
        } catch (Error | RuntimeException x) {
            // deactivate will not be invoked if activate fails, so ensure CachingProvider is closed on error paths
            if (cachingProvider != null) {
                CacheHashMap.tcInvoke(tcCachingProvider, "close");
                cachingProvider.close();
                CacheHashMap.tcReturn(tcCachingProvider, "close");
            }
            throw x;
        }
    }
882905
@Override
	public void init(ResourceBundlesHandler bundler, Boolean useRandomParam, Boolean async, Boolean defer,
			String crossorigin) {
		init(bundler, DEFAULT_TYPE, useRandomParam, async, defer, crossorigin);
	}