Source:
<code>public void startup() throws InstantiationException { try { logger.info("starting"); logger.info("Setting up JVM metrics."); jvmMetrics.start(); NetworkConfig networkConfig = new NetworkConfig(properties); StoreConfig storeConfig = new StoreConfig(properties); MetricsConfig metricsConfig = new MetricsConfig(properties); properties.verify(); logger.info("Setting up metrics reporters."); List<String> reporterFactoryNames = metricsConfig.getMetricsReporterFactoryClassNames(); try { <START> <END> for (String factoryClass : reporterFactoryNames) { MetricsReporterFactory factory = Utils.getObj(factoryClass); MetricsReporter reporter = factory.getMetricsReporter(factoryClass, "Data Node", metricsConfig); reporters.put(factoryClass, reporter); } logger.info("Got metrics reporters: {}", reporters.keySet()); } catch (Exception e) { logger.error("Error while creating reporters. Logging and proceeding " + e); } scheduler.startup(); DataNodeId nodeId = clusterMap.getDataNodeId(networkConfig.hostName, networkConfig.port); if (nodeId == null) throw new IllegalArgumentException("The node is not present in the clustermap. Failing to start the datanode"); StoreKeyFactory factory = Utils.getObj(storeConfig.storeKeyFactory, clusterMap); networkServer = new SocketServer(networkConfig); networkServer.start(); storeManager = new StoreManager(storeConfig, scheduler, registryMap, clusterMap.getReplicaIds(nodeId), factory); storeManager.start(); requests = new AmbryRequests(storeManager, networkServer.getRequestResponseChannel(), clusterMap); requestHandlerPool = new RequestHandlerPool(7, networkServer.getRequestResponseChannel(), requests); logger.info("Starting all the metrics reporters"); for (Map.Entry<String, MetricsReporter> reporterEntry : reporters.entrySet()) { reporterEntry.getValue().register("data node", registryMap); reporterEntry.getValue().start(); } logger.info("started"); } catch (Exception e) { logger.error("Error during startup {}", e); throw new InstantiationException("failure during startup " + e); } }</code><technical_language>whitespace</technical_language>

Target:
public void startup() throws InstantiationException { try { logger.info("starting"); logger.info("Setting up JVM metrics."); jvmMetrics.start(); logger.info("creating configs"); NetworkConfig networkConfig = new NetworkConfig(properties); StoreConfig storeConfig = new StoreConfig(properties); MetricsConfig metricsConfig = new MetricsConfig(properties); properties.verify(); logger.info("Setting up metrics reporters."); List<String> reporterFactoryNames = metricsConfig.getMetricsReporterFactoryClassNames(); try { for (String factoryClass : reporterFactoryNames) { MetricsReporterFactory factory = Utils.getObj(factoryClass); MetricsReporter reporter = factory.getMetricsReporter(factoryClass, "Data Node", metricsConfig); reporters.put(factoryClass, reporter); } logger.info("Got metrics reporters: {}", reporters.keySet()); } catch (Exception e) { logger.error("Error while creating reporters. Logging and proceeding " + e); } scheduler.startup(); logger.info("check if node exist in clustermap host port {}", networkConfig.hostName, networkConfig.port); DataNodeId nodeId = clusterMap.getDataNodeId(networkConfig.hostName, networkConfig.port); if (nodeId == null) throw new IllegalArgumentException("The node is not present in the clustermap. Failing to start the datanode"); StoreKeyFactory factory = Utils.getObj(storeConfig.storeKeyFactory, clusterMap); networkServer = new SocketServer(networkConfig); networkServer.start(); storeManager = new StoreManager(storeConfig, scheduler, registryMap, clusterMap.getReplicaIds(nodeId), factory); storeManager.start(); requests = new AmbryRequests(storeManager, networkServer.getRequestResponseChannel(), clusterMap); requestHandlerPool = new RequestHandlerPool(7, networkServer.getRequestResponseChannel(), requests); logger.info("Starting all the metrics reporters"); for (Map.Entry<String, MetricsReporter> reporterEntry : reporters.entrySet()) { reporterEntry.getValue().register("data node", registryMap); reporterEntry.getValue().start(); } logger.info("started"); } catch (Exception e) { logger.error("Error during startup {}", e); throw new InstantiationException("failure during startup " + e); } }