Source:
<code>public void init() throws Exception { super.init(); serverManager = new ServerConfigurationManager(asServer); webAppAdminClient = new WebAppAdminClient(backendURL, sessionCookie); <START> TENANT_IDLE_TIME = Long.parseLong(asServer.getConfigurationNode(TENANT_IDLE_XPATH).getNodeValue()) <END> * 60 * 1000; WEB_APP_IDLE_TIME = Long.parseLong(asServer.getConfigurationNode(WEB_APP_IDLE_XPATH).getNodeValue()) * 60 * 1000; File sourceFile = new File(CARBON_ARTIFACT_LOCATION); File targetFile = new File(CARBON_REPOSITORY_LOCATION); SUPER_TENANT_DOMAIN = new AutomationContext(PRODUCT_GROUP_NAME, INSTANCE_NAME, SUPER_TENANT_DOMAIN_KEY, USER_KEY).getSuperTenant().getDomain(); TENANT_DOMAIN_1 = new AutomationContext(PRODUCT_GROUP_NAME, INSTANCE_NAME, TENANT_DOMAIN_1_kEY, USER_KEY). getContextTenant().getDomain(); TENANT_DOMAIN_2 = new AutomationContext(PRODUCT_GROUP_NAME, INSTANCE_NAME, TENANT_DOMAIN_2_KEY, USER_KEY). getContextTenant().getDomain(); serverManager.applyConfigurationWithoutRestart(sourceFile, targetFile, true); log.info("carbon.xml replaced with :" + CARBON_ARTIFACT_LOCATION); webAppAdminClient.warFileUplaoder(TENANT_INFO_SERVICE_ARTIFACT_LOCATION); serverManager.restartGracefully(); log.info("Server Restarted after applying carbon.xml and tenant information utility web application"); }</code><technical_language>Improve readability reformatting code</technical_language>

Target:
public void init() throws Exception { super.init(); supperTenantWebAppURL = webAppURL; hostURL = asServer.getInstance().getHosts().get(DEFAULT); serverManager = new ServerConfigurationManager(asServer); webAppAdminClient = new WebAppAdminClient(backendURL, sessionCookie); appAdminClient = new ApplicationAdminClient(backendURL, sessionCookie); tenantIdleTime = Long.parseLong(asServer.getConfigurationNode(TENANT_IDLE_XPATH).getNodeValue()) * 60 * 1000; webAppIdleTime = Long.parseLong(asServer.getConfigurationNode(WEB_APP_IDLE_XPATH).getNodeValue()) * 60 * 1000; artifactsLocation = TestConfigurationProvider.getResourceLocation() + File.separator + "artifacts" + File.separator + "AS" + File.separator + "ghost" + File.separator; String tenantInfoServiceArtifactLocation = artifactsLocation + TENANT_INFO_SERVICE_FILE_NAME; String carbonArtifactLocation = artifactsLocation + CARBON_XML; File sourceFile = new File(carbonArtifactLocation); File targetFile = new File(CARBON_REPOSITORY_LOCATION); superTenantDomain = new AutomationContext(PRODUCT_GROUP_NAME, INSTANCE_NAME, SUPER_TENANT_DOMAIN_KEY, ADMIN_USER_KEY). getSuperTenant().getDomain(); tenantDomain1 = new AutomationContext(PRODUCT_GROUP_NAME, INSTANCE_NAME, TENANT_DOMAIN_1_KEY, ADMIN_USER_KEY). getContextTenant().getDomain(); tenantDomain2 = new AutomationContext(PRODUCT_GROUP_NAME, INSTANCE_NAME, TENANT_DOMAIN_2_KEY, ADMIN_USER_KEY). getContextTenant().getDomain(); serverManager.applyConfigurationWithoutRestart(sourceFile, targetFile, true); log.info("carbon.xml replaced with :" + carbonArtifactLocation); webAppAdminClient.uploadWarFile(tenantInfoServiceArtifactLocation); serverManager.restartGracefully(); log.info("Server Restarted after applying carbon.xml and tenant information utility web application"); }