Source:
<code><START> public Session createSession( <END> QueryId queryId, SessionContext context) { Identity identity = context.getIdentity(); accessControl.checkCanSetUser(identity.getPrincipal().orElse(null), identity.getUser()); Session.SessionBuilder sessionBuilder = Session.builder(sessionPropertyManager) .setQueryId(queryId) .setIdentity(identity) .setSource(context.getSource()) .setCatalog(context.getCatalog()) .setSchema(context.getSchema()) .setRemoteUserAddress(context.getRemoteUserAddress()) .setUserAgent(context.getUserAgent()) .setClientInfo(context.getClientInfo()); if (context.getTimeZoneId() != null) { sessionBuilder.setTimeZoneKey(getTimeZoneKey(context.getTimeZoneId())); } if (context.getLanguage() != null) { sessionBuilder.setLocale(Locale.forLanguageTag(context.getLanguage())); } for (Map.Entry<String, String> entry : context.getSystemProperties().entrySet()) { sessionBuilder.setSystemProperty(entry.getKey(), entry.getValue()); } for (Map.Entry<String, Map<String, String>> catalogProperties : context.getCatalogSessionProperties().entrySet()) { String catalog = catalogProperties.getKey(); for (Map.Entry<String, String> entry : catalogProperties.getValue().entrySet()) { sessionBuilder.setCatalogSessionProperty(catalog, entry.getKey(), entry.getValue()); } } for (Map.Entry<String, String> preparedStatement : context.getPreparedStatements().entrySet()) { sessionBuilder.addPreparedStatement(preparedStatement.getKey(), preparedStatement.getValue()); } if (context.supportClientTransaction()) { sessionBuilder.setClientTransactionSupport(); } Session session = sessionBuilder.build(); if (context.getTransactionId().isPresent()) { session = session.beginTransactionId(context.getTransactionId().get(), transactionManager, accessControl); } return session; }</code><technical_language>short, need wrap</technical_language>

Target:
public Session createSession(QueryId queryId, SessionContext context) { Identity identity = context.getIdentity(); accessControl.checkCanSetUser(identity.getPrincipal().orElse(null), identity.getUser()); SessionBuilder sessionBuilder = Session.builder(sessionPropertyManager) .setQueryId(queryId) .setIdentity(identity) .setSource(context.getSource()) .setCatalog(context.getCatalog()) .setSchema(context.getSchema()) .setRemoteUserAddress(context.getRemoteUserAddress()) .setUserAgent(context.getUserAgent()) .setClientInfo(context.getClientInfo()); if (context.getTimeZoneId() != null) { sessionBuilder.setTimeZoneKey(getTimeZoneKey(context.getTimeZoneId())); } if (context.getLanguage() != null) { sessionBuilder.setLocale(Locale.forLanguageTag(context.getLanguage())); } for (Entry<String, String> entry : context.getSystemProperties().entrySet()) { sessionBuilder.setSystemProperty(entry.getKey(), entry.getValue()); } for (Entry<String, Map<String, String>> catalogProperties : context.getCatalogSessionProperties().entrySet()) { String catalog = catalogProperties.getKey(); for (Entry<String, String> entry : catalogProperties.getValue().entrySet()) { sessionBuilder.setCatalogSessionProperty(catalog, entry.getKey(), entry.getValue()); } } for (Entry<String, String> preparedStatement : context.getPreparedStatements().entrySet()) { sessionBuilder.addPreparedStatement(preparedStatement.getKey(), preparedStatement.getValue()); } if (context.supportClientTransaction()) { sessionBuilder.setClientTransactionSupport(); } Session session = sessionBuilder.build(); if (context.getTransactionId().isPresent()) { session = session.beginTransactionId(context.getTransactionId().get(), transactionManager, accessControl); } return session; }