Source:
<code>public boolean initialize(ServiceProviderConfiguration configuration, PlatformConfiguration platformConfiguration) { this.platformConfiguration = platformConfiguration; <START> IParameterSubstitutor parameterSubstitutor = platformConfiguration.getExtendedConfiguration(IParameterSubstitutor.class).iterator().next(); <END> PathResolver pathResolver = platformConfiguration.getExtendedConfiguration(PathResolver.class).iterator().next(); ConfigChangeHandlerManager configChangeHandlerManager = find(platformConfiguration, ConfigChangeHandlerManager.class); TopologyService topologyService = find(platformConfiguration, TopologyService.class); if (configChangeHandlerManager != null) { ConfigChangeHandler clientReconnectWindowHandler = new ClientReconnectWindowConfigChangeHandler(); addToManager(configChangeHandlerManager, clientReconnectWindowHandler, CLIENT_RECONNECT_WINDOW); ConfigChangeHandler nodeLogDirChangeHandler = new NodeLogDirChangeHandler(parameterSubstitutor, pathResolver); addToManager(configChangeHandlerManager, nodeLogDirChangeHandler, NODE_LOG_DIR); addToManager(configChangeHandlerManager, accept(), FAILOVER_PRIORITY); addToManager(configChangeHandlerManager, accept(), NODE_PUBLIC_HOSTNAME); addToManager(configChangeHandlerManager, accept(), NODE_PUBLIC_PORT); addToManager(configChangeHandlerManager, accept(), CLUSTER_NAME); LoggerOverrideConfigChangeHandler loggerOverrideConfigChangeHandler = new LoggerOverrideConfigChangeHandler(topologyService); addToManager(configChangeHandlerManager, loggerOverrideConfigChangeHandler, NODE_LOGGER_OVERRIDES); configChangeHandlerManager.set(TC_PROPERTIES, new SelectingConfigChangeHandler<String>() .selector(Configuration::getKey) .fallback(accept())); loggerOverrideConfigChangeHandler.init(); } NomadPermissionChangeProcessor permissions = find(platformConfiguration, NomadPermissionChangeProcessor.class); if (permissions != null) { permissions.addCheck(new DisallowSettingChanges()); permissions.addCheck(new ServerStateCheck()); } return true; }</code><technical_language>please find () ;-)</technical_language>

Target:
public boolean initialize(ServiceProviderConfiguration configuration, PlatformConfiguration platformConfiguration) { this.platformConfiguration = platformConfiguration; IParameterSubstitutor parameterSubstitutor = findService(platformConfiguration, IParameterSubstitutor.class); PathResolver pathResolver = findService(platformConfiguration, PathResolver.class); ConfigChangeHandlerManager configChangeHandlerManager = findService(platformConfiguration, ConfigChangeHandlerManager.class); TopologyService topologyService = findService(platformConfiguration, TopologyService.class); ConfigChangeHandler clientReconnectWindowHandler = new ClientReconnectWindowConfigChangeHandler(); addToManager(configChangeHandlerManager, clientReconnectWindowHandler, CLIENT_RECONNECT_WINDOW); ConfigChangeHandler nodeLogDirChangeHandler = new NodeLogDirChangeHandler(parameterSubstitutor, pathResolver); addToManager(configChangeHandlerManager, nodeLogDirChangeHandler, NODE_LOG_DIR); addToManager(configChangeHandlerManager, accept(), FAILOVER_PRIORITY); addToManager(configChangeHandlerManager, accept(), NODE_PUBLIC_HOSTNAME); addToManager(configChangeHandlerManager, accept(), NODE_PUBLIC_PORT); addToManager(configChangeHandlerManager, accept(), CLUSTER_NAME); LoggerOverrideConfigChangeHandler loggerOverrideConfigChangeHandler = new LoggerOverrideConfigChangeHandler(topologyService); addToManager(configChangeHandlerManager, loggerOverrideConfigChangeHandler, NODE_LOGGER_OVERRIDES); configChangeHandlerManager.set(TC_PROPERTIES, new SelectingConfigChangeHandler<String>() .selector(Configuration::getKey) .fallback(accept())); loggerOverrideConfigChangeHandler.init(); NomadPermissionChangeProcessor permissions = findService(platformConfiguration, NomadPermissionChangeProcessor.class); permissions.addCheck(new DisallowSettingChanges()); permissions.addCheck(new ServerStateCheck()); return true; }