Source:
<code>protected void handleRefresh (MessageContext messageContext, Registry registry, String accessTokenRegistryPath) throws ConnectException { SynapseLog synLog = getLog(messageContext); Set propertyKeySet = messageContext.getPropertyKeySet(); propertyKeySet.remove("Accept-Encoding"); if (synLog.isTraceOrDebugEnabled()) { synLog.traceOrDebug("Start : Salesforce Refresh Access Token mediator."); if (synLog.isTraceTraceEnabled()) { synLog.traceTrace("Message : " + messageContext.getEnvelope()); } } String refreshUrl = getRefreshUrl(messageContext); HttpGet httpget = new HttpGet(refreshUrl); CloseableHttpResponse httpResponse = null; try { httpResponse = httpClient.execute(httpget); if (Pattern.matches("4[0-9][0-9]", String.valueOf(httpResponse.getStatusLine().getStatusCode()))) { throw new ConnectException("Refresh call returned HTTP Status code " + httpResponse.getStatusLine().getStatusCode() + ". " + httpResponse.getStatusLine().getReasonPhrase()); } if (httpResponse.getEntity() == null) { throw new ConnectException("Empty response received for refresh access token call"); } <START> synLog.auditLog("%%%%%%%%%%%% refresh call response : " + httpResponse.toString()); <END> extractAndSetPropertyAndRegistryResource(messageContext, httpResponse, registry, accessTokenRegistryPath); } catch (IOException e) { synLog.error(e); throw new ConnectException(e, "Error while executing GET request to refresh the access token"); } finally { propertyKeySet.remove("Cache-Control"); propertyKeySet.remove("Pragma"); httpget.releaseConnection(); if (httpResponse != null) { try { httpResponse.close(); } catch (IOException e) { synLog.error(e); } } } }</code><technical_language>%</technical_language>

Target:
protected void handleRefresh (MessageContext messageContext, Registry registry, String accessTokenRegistryPath) throws ConnectException { SynapseLog synLog = getLog(messageContext); Set propertyKeySet = messageContext.getPropertyKeySet(); propertyKeySet.remove("Accept-Encoding"); if (synLog.isTraceOrDebugEnabled()) { synLog.traceOrDebug("Start : Salesforce Refresh Access Token mediator."); if (synLog.isTraceTraceEnabled()) { synLog.traceTrace("Message : " + messageContext.getEnvelope()); } } String refreshUrl = getRefreshUrl(messageContext); HttpGet httpget = new HttpGet(refreshUrl); CloseableHttpResponse httpResponse = null; try { httpResponse = httpClient.execute(httpget); if (Pattern.matches("4[0-9][0-9]", String.valueOf(httpResponse.getStatusLine().getStatusCode()))) { throw new ConnectException("Refresh call returned HTTP Status code " + httpResponse.getStatusLine().getStatusCode() + ". " + httpResponse.getStatusLine().getReasonPhrase()); } if (httpResponse.getEntity() == null) { throw new ConnectException("Empty response received for refresh access token call"); } synLog.auditLog("Refresh call response : " + httpResponse.toString()); extractAndSetPropertyAndRegistryResource(messageContext, httpResponse, registry, accessTokenRegistryPath); } catch (IOException e) { synLog.error(e); throw new ConnectException(e, "Error while executing GET request to refresh the access token"); } finally { propertyKeySet.remove("Cache-Control"); propertyKeySet.remove("Pragma"); httpget.releaseConnection(); if (httpResponse != null) { try { httpResponse.close(); } catch (IOException e) { synLog.error(e); } } } }