Source:
<code>public DatastreamServer(Properties properties) throws DatastreamException { if (isInitialized()) { LOG.warn("Attempt to initialize DatastreamServer while it is already initialized."); return; } LOG.info("Start to initialize DatastreamServer. Properties: " + properties); LOG.info("Creating coordinator."); VerifiableProperties verifiableProperties = new VerifiableProperties(properties); String[] connectorTypes = verifiableProperties.getString(CONFIG_CONNECTOR_TYPES).split(","); if (connectorTypes.length == 0) { String errorMessage = "No connectors specified in connectorTypes"; LOG.error(errorMessage); <START> throw new DatastreamRuntimeException(errorMessage); <END> } CoordinatorConfig coordinatorConfig = new CoordinatorConfig(properties); coordinatorConfig.setAssignmentChangeThreadPoolThreadCount(connectorTypes.length); _coordinator = new Coordinator(coordinatorConfig); LOG.info("Loading connectors."); _bootstrapConnectors = new HashMap<>(); for (String connectorStr : connectorTypes) { initializeConnector(connectorStr, verifiableProperties.getDomainProperties(CONFIG_CONNECTOR_PREFIX + connectorStr)); } LOG.info("Setting up DMS endpoint server."); ZkClient zkClient = new ZkClient(coordinatorConfig.getZkAddress(), coordinatorConfig.getZkSessionTimeout(), coordinatorConfig.getZkConnectionTimeout()); _datastreamStore = new ZookeeperBackedDatastreamStore(zkClient, coordinatorConfig.getCluster()); int httpPort = verifiableProperties.getIntInRange(CONFIG_HTTP_PORT, 1024, 65535); _nettyLauncher = new DatastreamNettyStandaloneLauncher(httpPort, new DatastreamResourceFactory(this), "com.linkedin.datastream.server.dms", "com.linkedin.datastream.server.diagnostics"); verifiableProperties.verify(); _isInitialized = true; LOG.info("DatastreamServer initialized successfully."); }</code><technical_language>new logAndThrow() mentioned above</technical_language>

Target:
public DatastreamServer(Properties properties) throws DatastreamException { if (isInitialized()) { LOG.warn("Attempt to initialize DatastreamServer while it is already initialized."); return; } LOG.info("Start to initialize DatastreamServer. Properties: " + properties); LOG.info("Creating coordinator."); VerifiableProperties verifiableProperties = new VerifiableProperties(properties); String[] connectorTypes = verifiableProperties.getString(CONFIG_CONNECTOR_TYPES).split(","); if (connectorTypes.length == 0) { String errorMessage = "No connectors specified in connectorTypes"; ErrorLogger.logAndThrowDatastreamRuntimeException(LOG, errorMessage, null); } CoordinatorConfig coordinatorConfig = new CoordinatorConfig(properties); coordinatorConfig.setAssignmentChangeThreadPoolThreadCount(connectorTypes.length); _coordinator = new Coordinator(coordinatorConfig); LOG.info("Loading connectors."); _bootstrapConnectors = new HashMap<>(); for (String connectorStr : connectorTypes) { initializeConnector(connectorStr, verifiableProperties.getDomainProperties(CONFIG_CONNECTOR_PREFIX + connectorStr)); } LOG.info("Setting up DMS endpoint server."); ZkClient zkClient = new ZkClient(coordinatorConfig.getZkAddress(), coordinatorConfig.getZkSessionTimeout(), coordinatorConfig.getZkConnectionTimeout()); _datastreamStore = new ZookeeperBackedDatastreamStore(zkClient, coordinatorConfig.getCluster()); int httpPort = verifiableProperties.getIntInRange(CONFIG_HTTP_PORT, 1024, 65535); _nettyLauncher = new DatastreamNettyStandaloneLauncher(httpPort, new DatastreamResourceFactory(this), "com.linkedin.datastream.server.dms", "com.linkedin.datastream.server.diagnostics"); verifiableProperties.verify(); _isInitialized = true; LOG.info("DatastreamServer initialized successfully."); }