Program: 48105
Project: 48105
Buggy source:
/** 
 * Sends start PAOS and answers all successor messages to the server associated with this instance. Messages are exchanged until the server replies with a   {@code StartPAOSResponse} message.
 * @param message The StartPAOS message which is sent in the first message.
 * @return The {@code StartPAOSResponse} message from the server.
 * @throws DispatcherException In case there errors with the message conversion or the dispatcher.
 * @throws PAOSException In case there were errors in the transport layer.
 */
public StartPAOSResponse sendStartPAOS(StartPAOS message) throws DispatcherException, PAOSException {
  Object msg=message;
  try {
    boolean firstLoop=true;
    while (true) {
      if (!firstLoop && tlsHandler.isSameChannel()) {
        throw new PAOSException("String_Node_Str");
      }
      firstLoop=false;
      StreamHttpClientConnection conn=openHttpStream();
      HttpContext ctx=new BasicHttpContext();
      HttpRequestExecutor httpexecutor=new HttpRequestExecutor();
      DefaultConnectionReuseStrategy reuse=new DefaultConnectionReuseStrategy();
      boolean isReusable;
      do {
        String resource=tlsHandler.getResource();
        BasicHttpEntityEnclosingRequest req=new BasicHttpEntityEnclosingRequest("String_Node_Str",resource);
        req.setParams(conn.getParams());
        HttpRequestHelper.setDefaultHeader(req,tlsHandler.getServerAddress());
        req.setHeader(HEADER_KEY_PAOS,HEADER_VALUE_PAOS);
        req.setHeader("String_Node_Str","String_Node_Str");
        ContentType reqContentType=ContentType.create("String_Node_Str","String_Node_Str");
        HttpUtils.dumpHttpRequest(logger,"String_Node_Str",req);
        String reqMsgStr=createPAOSResponse(msg);
        StringEntity reqMsg=new StringEntity(reqMsgStr,reqContentType);
        req.setEntity(reqMsg);
        req.setHeader(reqMsg.getContentType());
        req.setHeader("String_Node_Str",Long.toString(reqMsg.getContentLength()));
        HttpResponse response=httpexecutor.execute(req,conn,ctx);
        int statusCode=response.getStatusLine().getStatusCode();
        conn.receiveResponseEntity(response);
        HttpEntity entity=response.getEntity();
        byte[] entityData=FileUtils.toByteArray(entity.getContent());
        HttpUtils.dumpHttpResponse(logger,response,entityData);
        checkHTTPStatusCode(msg,statusCode);
        Object requestObj=processPAOSRequest(new ByteArrayInputStream(entityData));
        if (requestObj instanceof StartPAOSResponse) {
          StartPAOSResponse startPAOSResponse=(StartPAOSResponse)requestObj;
          WSHelper.checkResult(startPAOSResponse);
          return startPAOSResponse;
        }
        msg=dispatcher.deliver(requestObj);
        isReusable=reuse.keepAlive(response,ctx);
      }
 while (isReusable);
    }
  }
 catch (  HttpException ex) {
    throw new PAOSException("String_Node_Str",ex);
  }
catch (  IOException ex) {
    throw new PAOSException(ex);
  }
catch (  SOAPException ex) {
    throw new PAOSException("String_Node_Str",ex);
  }
catch (  URISyntaxException ex) {
    throw new PAOSException("String_Node_Str",ex);
  }
catch (  MarshallingTypeException ex) {
    throw new DispatcherException("String_Node_Str",ex);
  }
catch (  InvocationTargetException ex) {
    throw new DispatcherException("String_Node_Str",ex);
  }
catch (  TransformerException ex) {
    throw new DispatcherException(ex);
  }
catch (  WSException ex) {
    throw new PAOSException(ex);
  }
}

Fixed version (ground truth):
/** 
 * Sends start PAOS and answers all successor messages to the server associated with this instance. Messages are exchanged until the server replies with a   {@code StartPAOSResponse} message.
 * @param message The StartPAOS message which is sent in the first message.
 * @return The {@code StartPAOSResponse} message from the server.
 * @throws DispatcherException In case there errors with the message conversion or the dispatcher.
 * @throws PAOSException In case there were errors in the transport layer.
 */
public StartPAOSResponse sendStartPAOS(StartPAOS message) throws DispatcherException, PAOSException {
  Object msg=message;
  try {
    boolean firstLoop=true;
    while (true) {
      if (!firstLoop && tlsHandler.isSameChannel()) {
        throw new PAOSException("String_Node_Str");
      }
      firstLoop=false;
      StreamHttpClientConnection conn=openHttpStream();
      HttpContext ctx=new BasicHttpContext();
      HttpRequestExecutor httpexecutor=new HttpRequestExecutor();
      DefaultConnectionReuseStrategy reuse=new DefaultConnectionReuseStrategy();
      boolean isReusable;
      do {
        String resource=tlsHandler.getResource();
        BasicHttpEntityEnclosingRequest req=new BasicHttpEntityEnclosingRequest("String_Node_Str",resource);
        req.setParams(conn.getParams());
        HttpRequestHelper.setDefaultHeader(req,tlsHandler.getServerAddress());
        req.setHeader(HEADER_KEY_PAOS,headerValuePaos);
        req.setHeader("String_Node_Str","String_Node_Str");
        ContentType reqContentType=ContentType.create("String_Node_Str","String_Node_Str");
        HttpUtils.dumpHttpRequest(logger,"String_Node_Str",req);
        String reqMsgStr=createPAOSResponse(msg);
        StringEntity reqMsg=new StringEntity(reqMsgStr,reqContentType);
        req.setEntity(reqMsg);
        req.setHeader(reqMsg.getContentType());
        req.setHeader("String_Node_Str",Long.toString(reqMsg.getContentLength()));
        HttpResponse response=httpexecutor.execute(req,conn,ctx);
        int statusCode=response.getStatusLine().getStatusCode();
        conn.receiveResponseEntity(response);
        HttpEntity entity=response.getEntity();
        byte[] entityData=FileUtils.toByteArray(entity.getContent());
        HttpUtils.dumpHttpResponse(logger,response,entityData);
        checkHTTPStatusCode(msg,statusCode);
        Object requestObj=processPAOSRequest(new ByteArrayInputStream(entityData));
        if (requestObj instanceof StartPAOSResponse) {
          StartPAOSResponse startPAOSResponse=(StartPAOSResponse)requestObj;
          WSHelper.checkResult(startPAOSResponse);
          return startPAOSResponse;
        }
        msg=dispatcher.deliver(requestObj);
        isReusable=reuse.keepAlive(response,ctx);
      }
 while (isReusable);
    }
  }
 catch (  HttpException ex) {
    throw new PAOSException("String_Node_Str",ex);
  }
catch (  IOException ex) {
    throw new PAOSException(ex);
  }
catch (  SOAPException ex) {
    throw new PAOSException("String_Node_Str",ex);
  }
catch (  URISyntaxException ex) {
    throw new PAOSException("String_Node_Str",ex);
  }
catch (  MarshallingTypeException ex) {
    throw new DispatcherException("String_Node_Str",ex);
  }
catch (  InvocationTargetException ex) {
    throw new DispatcherException("String_Node_Str",ex);
  }
catch (  TransformerException ex) {
    throw new DispatcherException(ex);
  }
catch (  WSException ex) {
    throw new PAOSException(ex);
  }
}