Initializes the analyzer once before any analysis is performed.

@param engine a reference to the dependency-check engine
@throws InitializationException thrown when the analyzer is unable to
connect to Artifactory
341487
@Override
    public void prepareFileTypeAnalyzer(Engine engine) throws InitializationException {
        LOGGER.debug("Initializing Artifactory analyzer");
        final boolean enabled = isEnabled();
        LOGGER.debug("Artifactory analyzer enabled: {}", enabled);
        if (enabled) {
            searcher = new ArtifactorySearch(getSettings());
            final boolean preflightRequest = searcher.preflightRequest();
            if (!preflightRequest) {
                setEnabled(false);
                throw new InitializationException("There was an issue connecting to Artifactory . Disabling analyzer.");
            }
        }
    }
288241
@Override
    public void prepareFileTypeAnalyzer(Engine engine) throws InitializationException {
        LOGGER.debug("Initializing Central analyzer");
        LOGGER.debug("Central analyzer enabled: {}", isEnabled());
        if (isEnabled()) {
            try {
                searcher = new CentralSearch(getSettings());
            } catch (MalformedURLException ex) {
                setEnabled(false);
                throw new InitializationException("The configured URL to Maven Central is malformed", ex);
            }
        }
    }
1291049
public static void initialize()
        throws CacheReloadException
    {
        if (InfinispanCache.get().exists(JAASSystem.IDCACHE)) {
            InfinispanCache.get().<Long, JAASSystem>getCache(JAASSystem.IDCACHE).clear();
        } else {
            InfinispanCache.get().<Long, JAASSystem>getCache(JAASSystem.IDCACHE)
                            .addListener(new CacheLogListener(JAASSystem.LOG));
        }
        if (InfinispanCache.get().exists(JAASSystem.NAMECACHE)) {
            InfinispanCache.get().<String, JAASSystem>getCache(JAASSystem.NAMECACHE).clear();
        } else {
            InfinispanCache.get().<String, JAASSystem>getCache(JAASSystem.NAMECACHE)
                            .addListener(new CacheLogListener(JAASSystem.LOG));
        }
        JAASSystem.getJAASSystemFromDB(JAASSystem.SQL_SELECT, null);
    }
316003
private static void init(){
		String junittest = System.getProperty("JUNITTEST");
		if (junittest!=null && (junittest.equalsIgnoreCase("true")))
			return;
		StartBuiltInProducers.startbuiltin();
		//ensure plugins are loaded.
		PluginRepository.getInstance();
		//ensure accumulators are initialized.
		AccumulatorRepository.getInstance();
		//ensure thresholds are initialized.
		ThresholdRepository.getInstance();
	}
357170
public void initialization(Closure<?> closure) {
        if (initialization != null) {
            throw new GradleException("Initialization is already set");
        }
        initialization = (Initialization) project.configure(new Initialization(), closure);
    }
951002
public void initialize() {
        val pair = buildLoggerContext(environment, resourceLoader);
        pair.ifPresent(it -> {
            this.logConfigurationFile = it.getKey();
            this.loggerContext = it.getValue();
        });
    }
1123658
@Override
    protected void prepareFileTypeAnalyzer(Engine engine) throws InitializationException {
        if (engine.getMode() != Mode.EVIDENCE_COLLECTION) {
            try {
                final Settings settings = engine.getSettings();
                final String[] tmp = settings.getArray(Settings.KEYS.ECOSYSTEM_SKIP_CPEANALYZER);
                if (tmp != null) {
                    final List<String> skipEcosystems = Arrays.asList(tmp);
                    if (skipEcosystems.contains(DEPENDENCY_ECOSYSTEM)
                            && !settings.getBoolean(Settings.KEYS.ANALYZER_NODE_AUDIT_ENABLED)) {
                        LOGGER.debug("NodePackageAnalyzer enabled without a corresponding vulnerability analyzer");
                        final String msg = "Invalid Configuration: enabling the Node Package Analyzer without "
                                + "using the Node Audit Analyzer is not supported.";
                        throw new InitializationException(msg);
                    } else if (!skipEcosystems.contains(DEPENDENCY_ECOSYSTEM)) {
                        LOGGER.warn("Using the CPE Analyzer with Node.js can result in many false positives.");
                    }
                }
            } catch (InvalidSettingException ex) {
                throw new InitializationException("Unable to read configuration settings", ex);
            }
        }
    }
573984
public static void registerPluginAnalysisEngines(DetectorFactoryCollection detectorFactoryCollection,
            IAnalysisCache analysisCache) throws IOException {
        for (Iterator<Plugin> i = detectorFactoryCollection.pluginIterator(); i.hasNext();) {
            Plugin plugin = i.next();

            Class<? extends IAnalysisEngineRegistrar> engineRegistrarClass = plugin.getEngineRegistrarClass();
            if (engineRegistrarClass != null) {
                try {
                    IAnalysisEngineRegistrar engineRegistrar = engineRegistrarClass.newInstance();
                    engineRegistrar.registerAnalysisEngines(analysisCache);
                } catch (InstantiationException e) {
                    IOException ioe = new IOException("Could not create analysis engine registrar for plugin "
                            + plugin.getPluginId());
                    ioe.initCause(e);
                    throw ioe;
                } catch (IllegalAccessException e) {
                    IOException ioe = new IOException("Could not create analysis engine registrar for plugin "
                            + plugin.getPluginId());
                    ioe.initCause(e);
                    throw ioe;
                }
            }
        }
    }
441838
public synchronized void init() {
        log.info("initializing mixer2 engine...");
        try {
            jaxbContext = JAXBContext.newInstance("org.mixer2.jaxb.xhtml");
        } catch (JAXBException e) {
            log.fatal("can't make newInstance of JAXBContext.", e);
        }
        log.info("completed initializing mixer2 engine.");
    }
1031241
@Override
	public void initialize() throws RepositoryException{
		initialized = true;
		try {

			queryEngine = configuration.loadQueryEngine();
			queryEngine.connect();
		}
		catch (Exception e){
			throw new RepositoryException(e);
		}
	}
131711
public void initialize(UimaContext context)
			throws ResourceInitializationException {

		super.initialize(context);

		this.context = context;

		mLogger = context.getLogger();

		if (mLogger.isLoggable(Level.INFO)) {
			mLogger.log(Level.INFO, "Initializing the CoGrOO annotator.");
		}

		ComponentFactory factory = ComponentFactory.create(new Locale("pt",
				"BR"));
		cogroo = factory.createPipe();
	}
870685
@Override
    public void prepareFileTypeAnalyzer(Engine engine) throws InitializationException {
        LOGGER.debug("Initializing Nexus Analyzer");
        LOGGER.debug("Nexus Analyzer enabled: {}", isEnabled());
        if (isEnabled()) {
            final boolean useProxy = useProxy();
            LOGGER.debug("Using proxy: {}", useProxy);
            try {
                searcher = new NexusSearch(getSettings(), useProxy);
                if (!searcher.preflightRequest()) {
                    setEnabled(false);
                    throw new InitializationException("There was an issue getting Nexus status. Disabling analyzer.");
                }
            } catch (MalformedURLException mue) {
                setEnabled(false);
                throw new InitializationException("Malformed URL to Nexus", mue);
            }
        }
    }
771128
@Override
    public void registerAnalysisEngines(IAnalysisCache analysisCache) {
        for (IClassAnalysisEngine<?> engine : classAnalysisEngineList) {
            engine.registerWith(analysisCache);
        }

        for (IMethodAnalysisEngine<?> engine : methodAnalysisEngineList) {
            engine.registerWith(analysisCache);
        }

        for (IDatabaseFactory<?> databaseFactory : databaseFactoryList) {
            databaseFactory.registerWith(analysisCache);
        }

        // if (!Subtypes.DO_NOT_USE) {
        // new
        // ReflectionDatabaseFactory<Subtypes>(Subtypes.class).registerWith(analysisCache);
        // }
    }
907097
@PostConstruct
    public synchronized void initialize() {
        final FwCoreDirection direction = assistCoreDirection();
        developmentHere = direction.isDevelopmentHere();

        final JsonResourceProvider provider = direction.assistJsonResourceProvider();
        mappingOption = OptionalThing.ofNullable(extractMappingOption(provider), () -> {
            throw new IllegalStateException("Not found the JSON mapping option.");
        });
        printControlState = OptionalThing.of(preparePrintState(provider)); // fixedly exists for now
        yourEngineCreator = OptionalThing.ofNullable(extractYourEngineCreator(provider), () -> {
            throw new IllegalStateException("Not found the your engine creator.");
        });

        // should be last because of using other instance variable
        realJsonEngine = createDefaultJsonEngine();
        showBootLogging();
    }
1072545
@Override
    public void visitClass(ClassDescriptor classDescriptor) throws CheckedAnalysisException {

        // Just get the ClassContext from the analysis cache
        // and apply the detector to it.

        IAnalysisCache analysisCache = Global.getAnalysisCache();
        ClassContext classContext = analysisCache.getClassAnalysis(ClassContext.class, classDescriptor);
        Profiler profiler = analysisCache.getProfiler();
        profiler.start(detector.getClass());
        try {
            detector.visitClassContext(classContext);
        } finally {
            profiler.end(detector.getClass());
        }
    }
702626
@Override
    public void initialize(Settings settings) {
        super.initialize(settings);
        if (this.isEnabled()) {
            this.filters = settings.getArray(Settings.KEYS.ANALYZER_RETIREJS_FILTERS);
        }
    }
697016
public static void initialize()
    {
        if (InfinispanCache.get().exists(Association.IDCACHE)) {
            InfinispanCache.get().<Long, Association>getCache(Association.IDCACHE).clear();
        } else {
            InfinispanCache.get().<Long, Association>getCache(Association.IDCACHE)
                            .addListener(new CacheLogListener(Association.LOG));
        }
    }