Source:
private Map<String, Object> getPropertiesMapForXSLT(Map<String, String> properties, MessageContext synCtx) { Map<String, Object> propertyValues = new HashMap<>(); if (!properties.isEmpty()) { Object value; org.apache.axis2.context.MessageContext axis2MsgCtx = ((Axis2MessageContext) synCtx) .getAxis2MessageContext(); HashMap functionProperties = new HashMap(); Stack<TemplateContext> templeteContextStack = ((Stack) synCtx .getProperty(SynapseConstants.SYNAPSE__FUNCTION__STACK)); if (templeteContextStack != null && !templeteContextStack.isEmpty()) { TemplateContext templateContext = templeteContextStack.peek(); functionProperties.putAll(templateContext.getMappedValues()); } for (Map.Entry<String, String> property : properties.entrySet()) { switch (property.getValue()) { case DEFAULT_CONTEXT: case SYNAPSE_CONTEXT: value = synCtx.getProperty(property.getKey()); break; case TRANSPORT_CONTEXT: value = ((Map) axis2MsgCtx.getProperty(TRANSPORT_HEADERS)).get(property .getKey()); break; case AXIS2_CONTEXT: value = axis2MsgCtx.getProperty(property.getKey()); break; case AXIS2_CLIENT_CONTEXT: value = axis2MsgCtx.getOptions().getProperty(property.getKey()); break; case OPERATIONS_CONTEXT: value = axis2MsgCtx.getOperationContext().getProperty(property.getKey()); break; case FUNCTION_CONTEXT: value = functionProperties.get(property.getKey()); break; default: log.warn(property.getValue() + " scope is not found. Setting it to an " + "empty " + "value."); value = EMPTY_STRING; } if (value == null) { log.warn(property.getKey() + " not found. Setting it to an empty value."); value = EMPTY_STRING; } propertyValues.put(property.getValue() + "_" + property.getKey(), value); } } return propertyValues; }

Target:
private Map<String, Object> getPropertiesMapForXSLT(Map<String, String> properties, MessageContext synCtx) { Map<String, Object> propertyValues = new HashMap<>(); if (!properties.isEmpty()) { Object value; org.apache.axis2.context.MessageContext axis2MsgCtx = ((Axis2MessageContext) synCtx) .getAxis2MessageContext(); HashMap functionProperties = new HashMap(); Stack<TemplateContext> templeteContextStack = ((Stack) synCtx .getProperty(SynapseConstants.SYNAPSE__FUNCTION__STACK)); if (templeteContextStack != null && !templeteContextStack.isEmpty()) { TemplateContext templateContext = templeteContextStack.peek(); functionProperties.putAll(templateContext.getMappedValues()); } for (Map.Entry<String, String> property : properties.entrySet()) { switch (property.getValue()) { case DEFAULT_CONTEXT: case SYNAPSE_CONTEXT: value = synCtx.getProperty(property.getKey()); break; case TRANSPORT_CONTEXT: value = ((Map) axis2MsgCtx.getProperty(TRANSPORT_HEADERS)).get(property .getKey()); break; case AXIS2_CONTEXT: value = axis2MsgCtx.getProperty(property.getKey()); break; case AXIS2_CLIENT_CONTEXT: value = axis2MsgCtx.getOptions().getProperty(property.getKey()); break; case OPERATIONS_CONTEXT: value = axis2MsgCtx.getOperationContext().getProperty(property.getKey()); break; case FUNCTION_CONTEXT: value = functionProperties.get(property.getKey()); break; default: log.warn(property.getValue() + " scope is not found. Setting it to an " + "empty value."); value = EMPTY_STRING; } if (value == null) { log.warn(property.getKey() + " not found. Setting it to an empty value."); value = EMPTY_STRING; } propertyValues.put(property.getValue() + "_" + property.getKey(), value); } } return propertyValues; }