Source:
<code>public DatabaseServerV4Response convert(DatabaseServerConfig source) { DatabaseServerV4Response response = new DatabaseServerV4Response(); response.setId(source.getId()); response.setCrn(source.getResourceCrn().toString()); response.setName(source.getName()); response.setDescription(source.getDescription()); response.setHost(source.getHost()); response.setPort(source.getPort()); response.setDatabaseVendor(source.getDatabaseVendor().databaseType()); response.setDatabaseVendorDisplayName(source.getDatabaseVendor().displayName()); response.setConnectionDriver(source.getConnectionDriver()); response.setConnectionUserName(getConversionService().convert(source.getConnectionUserNameSecret(), SecretResponse.class)); response.setConnectionPassword(getConversionService().convert(source.getConnectionPasswordSecret(), SecretResponse.class)); response.setCreationDate(source.getCreationDate()); response.setEnvironmentCrn(source.getEnvironmentId()); response.setResourceStatus(source.getResourceStatus()); if (source.getDbStack().isPresent()) { DBStack dbStack = source.getDbStack().get(); response.setStatus(dbStack.getStatus()); response.setStatusReason(dbStack.getStatusReason()); if (dbStack.getSslConfig() != null) { SslConfig sslConfig = dbStack.getSslConfig(); SslConfigV4Response sslConfigV4Response = new SslConfigV4Response(); sslConfigV4Response.setSslCertificates(sslConfig.getSslCertificates()); sslConfigV4Response.setSslCertificateType(sslConfig.getSslCertificateType()); sslConfigV4Response.setSslMode(NONE.equals(sslConfig.getSslCertificateType()) ? DISABLED : ENABLED); response.setSslConfig(sslConfigV4Response); } else { response.setSslConfig(new SslConfigV4Response()); } } else if (source.getHost() != null && source.getPort() != null) { response.setStatus(Status.AVAILABLE); response.setSslConfig(new SslConfigV4Response()); } else { response.setStatus(Status.UNKNOWN); response.setSslConfig(new SslConfigV4Response()); <START> } <END> return response; }</code><technical_language>if (response.sslConfig == null) { response.setSslConfig(new SslConfigV4Response()); }</technical_language>

Target:
public DatabaseServerV4Response convert(DatabaseServerConfig source) { DatabaseServerV4Response response = new DatabaseServerV4Response(); response.setId(source.getId()); response.setCrn(source.getResourceCrn().toString()); response.setName(source.getName()); response.setDescription(source.getDescription()); response.setHost(source.getHost()); response.setPort(source.getPort()); response.setDatabaseVendor(source.getDatabaseVendor().databaseType()); response.setDatabaseVendorDisplayName(source.getDatabaseVendor().displayName()); response.setConnectionDriver(source.getConnectionDriver()); response.setConnectionUserName(getConversionService().convert(source.getConnectionUserNameSecret(), SecretResponse.class)); response.setConnectionPassword(getConversionService().convert(source.getConnectionPasswordSecret(), SecretResponse.class)); response.setCreationDate(source.getCreationDate()); response.setEnvironmentCrn(source.getEnvironmentId()); response.setResourceStatus(source.getResourceStatus()); if (source.getDbStack().isPresent()) { DBStack dbStack = source.getDbStack().get(); response.setStatus(dbStack.getStatus()); response.setStatusReason(dbStack.getStatusReason()); if (dbStack.getSslConfig() != null) { SslConfig sslConfig = dbStack.getSslConfig(); SslConfigV4Response sslConfigV4Response = new SslConfigV4Response(); sslConfigV4Response.setSslCertificates(sslConfig.getSslCertificates()); sslConfigV4Response.setSslCertificateType(sslConfig.getSslCertificateType()); sslConfigV4Response.setSslMode(NONE.equals(sslConfig.getSslCertificateType()) ? DISABLED : ENABLED); response.setSslConfig(sslConfigV4Response); } } else if (source.getHost() != null && source.getPort() != null) { response.setStatus(Status.AVAILABLE); } else { response.setStatus(Status.UNKNOWN); } if (response.getSslConfig() == null) { response.setSslConfig(new SslConfigV4Response()); } return response; }