Program: 116671
Project: 116671
Buggy source:
protected void sendToApplicationMember(MessageContext synCtx,org.apache.axis2.clustering.Member currentMember,DynamicLoadbalanceFaultHandler faultHandler,boolean newSession){
  org.apache.axis2.context.MessageContext axis2MsgCtx=((Axis2MessageContext)synCtx).getAxis2MessageContext();
  axis2MsgCtx.removeProperty(NhttpConstants.REST_URL_POSTFIX);
  String transport=axis2MsgCtx.getTransportIn().getName();
  String address=synCtx.getTo().getAddress();
  int incomingPort=extractPort(synCtx,transport);
  EndpointReference to=getEndpointReferenceAfterURLRewrite(currentMember,transport,address,incomingPort);
  synCtx.setTo(to);
  Endpoint endpoint=getEndpoint(to,currentMember,synCtx);
  if (isFailover()) {
    faultHandler.setTo(to);
    faultHandler.setCurrentMember(currentMember);
    faultHandler.setCurrentEp(endpoint);
    synCtx.pushFaultHandler(faultHandler);
    synCtx.getEnvelope().build();
  }
  if (isSessionAffinityBasedLB() && newSession) {
    prepareEndPointSequence(synCtx,endpoint);
    synCtx.setProperty(SynapseConstants.PROP_SAL_ENDPOINT_CURRENT_MEMBER,currentMember);
    synCtx.setProperty(SynapseConstants.PROP_SAL_ENDPOINT_CURRENT_DISPATCHER,dispatcher);
    synCtx.setProperty(SynapseConstants.PROP_SAL_ENDPOINT_FIRST_MESSAGE_IN_SESSION,Boolean.TRUE);
  }
  Map<String,String> memberHosts;
  if ((memberHosts=(Map<String,String>)currentMember.getProperties().get(HttpSessionDispatcher.HOSTS)) == null) {
    currentMember.getProperties().put(HttpSessionDispatcher.HOSTS,memberHosts=new HashMap<String,String>());
  }
  memberHosts.put(extractTargetHost(synCtx),"String_Node_Str");
  setupTransportHeaders(synCtx);
  setupLoadBalancerContextProperties(synCtx);
  try {
    if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str",to.getAddress()));
    }
    endpoint.send(synCtx);
    incrementInFlightRequestCount(synCtx);
  }
 catch (  Exception e) {
    if (e.getMessage().toLowerCase().contains("String_Node_Str")) {
      log.fatal("String_Node_Str",e);
      System.exit(121);
    }
 else {
      throw new SynapseException(e);
    }
  }
}

Fixed version (ground truth):
protected void sendToApplicationMember(MessageContext synCtx,org.apache.axis2.clustering.Member currentMember,DynamicLoadbalanceFaultHandler faultHandler,boolean newSession){
  org.apache.axis2.context.MessageContext axis2MsgCtx=((Axis2MessageContext)synCtx).getAxis2MessageContext();
  axis2MsgCtx.removeProperty(NhttpConstants.REST_URL_POSTFIX);
  String transport=axis2MsgCtx.getTransportIn().getName();
  String address=synCtx.getTo().getAddress();
  int incomingPort=extractPort(synCtx,transport);
  EndpointReference to=getEndpointReferenceAfterURLRewrite(currentMember,transport,address,incomingPort);
  synCtx.setTo(to);
  Endpoint endpoint=getEndpoint(to,currentMember,synCtx);
  if (isFailover()) {
    faultHandler.setTo(to);
    faultHandler.setCurrentMember(currentMember);
    faultHandler.setCurrentEp(endpoint);
    synCtx.pushFaultHandler(faultHandler);
    synCtx.getEnvelope().build();
  }
  if (isSessionAffinityBasedLB() && newSession) {
    prepareEndPointSequence(synCtx,endpoint);
    synCtx.setProperty(SynapseConstants.PROP_SAL_ENDPOINT_CURRENT_MEMBER,currentMember);
    synCtx.setProperty(SynapseConstants.PROP_SAL_ENDPOINT_CURRENT_DISPATCHER,dispatcher);
    synCtx.setProperty(SynapseConstants.PROP_SAL_ENDPOINT_FIRST_MESSAGE_IN_SESSION,Boolean.TRUE);
  }
  Map<String,String> memberHosts;
  if ((memberHosts=(Map<String,String>)currentMember.getProperties().get(HttpSessionDispatcher.HOSTS)) == null) {
    currentMember.getProperties().put(HttpSessionDispatcher.HOSTS,memberHosts=new HashMap<String,String>());
  }
  memberHosts.put(extractTargetHost(synCtx),"String_Node_Str");
  setupTransportHeaders(synCtx);
  setupLoadBalancerContextProperties(synCtx,currentMember);
  try {
    if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str",to.getAddress()));
    }
    endpoint.send(synCtx);
    incrementInFlightRequestCount(synCtx);
  }
 catch (  Exception e) {
    if (e.getMessage().toLowerCase().contains("String_Node_Str")) {
      log.fatal("String_Node_Str",e);
      System.exit(121);
    }
 else {
      throw new SynapseException(e);
    }
  }
}