Source:
<code>public static String getTCPConnectionURL(String userName, String accessKey) throws FileNotFoundException, XMLStreamException, AndesException { String CARBON_PORT = String.valueOf(AndesConfigurationManager.readValue(AndesConfiguration.TRANSPORTS_AMQP_DEFAULT_CONNECTION_PORT)); String CARBON_SSL_PORT = String.valueOf(AndesConfigurationManager.readValue(AndesConfiguration.TRANSPORTS_AMQP_SSL_CONNECTION_PORT)); <START> if(qpidPath != null){ <END> ANDES_CONF_DIR = Paths.get(qpidPath).toString(); } File confFile = new File(System.getProperty(ServerConstants.CARBON_HOME) + ANDES_CONF_DIR + ANDES_CONF_FILE); OMElement docRootNode = new StAXOMBuilder(new FileInputStream(confFile)). getDocumentElement(); OMElement connectorNode = docRootNode.getFirstChildWithName( new QName(ANDES_CONF_CONNECTOR_NODE)); OMElement sslNode = connectorNode.getFirstChildWithName( new QName(ANDES_CONF_SSL_NODE)); JKSStore keyStore = AndesConfigurationManager.readValue(AndesConfiguration .TRANSPORTS_AMQP_SSL_CONNECTION_KEYSTORE); JKSStore trustStore = AndesConfigurationManager.readValue(AndesConfiguration .TRANSPORTS_AMQP_SSL_CONNECTION_TRUSTSTORE); if (isSSLOnly()) { return "amqp://" + userName + ":" + accessKey + "@" + CARBON_CLIENT_ID + "/" + CARBON_VIRTUAL_HOST_NAME + "?brokerlist='tcp://" + CARBON_DEFAULT_HOSTNAME + ":" + CARBON_SSL_PORT + "?ssl='true'&trust_store='" + trustStore.getStoreLocation() + "'&trust_store_password='" + trustStore.getPassword() + "'&key_store='" + keyStore.getStoreLocation() + "'&key_store_password='" + trustStore.getPassword() + "''"; } else { return "amqp://" + userName + ":" + accessKey + "@" + CARBON_CLIENT_ID + "/" + CARBON_VIRTUAL_HOST_NAME + "?brokerlist='tcp://" + CARBON_DEFAULT_HOSTNAME + ":" + CARBON_PORT + "'"; } }</code><technical_language>Needs format this</technical_language>

Target:
public static String getTCPConnectionURL(String userName, String accessKey) throws FileNotFoundException, XMLStreamException, AndesException { String CARBON_PORT = String.valueOf(AndesConfigurationManager.readValue(AndesConfiguration.TRANSPORTS_AMQP_DEFAULT_CONNECTION_PORT)); String CARBON_SSL_PORT = String.valueOf(AndesConfigurationManager.readValue(AndesConfiguration.TRANSPORTS_AMQP_SSL_CONNECTION_PORT)); if (qpidPath != null) { andesConfDir = Paths.get(qpidPath).toString(); } File confFile = new File(System.getProperty(ServerConstants.CARBON_HOME) + andesConfDir + ANDES_CONF_FILE); OMElement docRootNode = new StAXOMBuilder(new FileInputStream(confFile)). getDocumentElement(); OMElement connectorNode = docRootNode.getFirstChildWithName( new QName(ANDES_CONF_CONNECTOR_NODE)); OMElement sslNode = connectorNode.getFirstChildWithName( new QName(ANDES_CONF_SSL_NODE)); JKSStore keyStore = AndesConfigurationManager.readValue(AndesConfiguration .TRANSPORTS_AMQP_SSL_CONNECTION_KEYSTORE); JKSStore trustStore = AndesConfigurationManager.readValue(AndesConfiguration .TRANSPORTS_AMQP_SSL_CONNECTION_TRUSTSTORE); if (isSSLOnly()) { return "amqp://" + userName + ":" + accessKey + "@" + CARBON_CLIENT_ID + "/" + CARBON_VIRTUAL_HOST_NAME + "?brokerlist='tcp://" + CARBON_DEFAULT_HOSTNAME + ":" + CARBON_SSL_PORT + "?ssl='true'&trust_store='" + trustStore.getStoreLocation() + "'&trust_store_password='" + trustStore.getPassword() + "'&key_store='" + keyStore.getStoreLocation() + "'&key_store_password='" + trustStore.getPassword() + "''"; } else { return "amqp://" + userName + ":" + accessKey + "@" + CARBON_CLIENT_ID + "/" + CARBON_VIRTUAL_HOST_NAME + "?brokerlist='tcp://" + CARBON_DEFAULT_HOSTNAME + ":" + CARBON_PORT + "'"; } }