Program: 32263
Project: 32263
Buggy source:
/** 
 * Takes an RPCRequest and sends it to SDL.  Responses are captured through callback on IProxyListener.  
 * @param request is the RPCRequest being sent
 * @throws SdlException if an unrecoverable error is encountered  if an unrecoverable error is encountered
 */
public void sendRPCRequest(RPCRequest request) throws SdlException {
  if (_proxyDisposed) {
    throw new SdlException("String_Node_Str",SdlExceptionCause.SDL_PROXY_DISPOSED);
  }
  if (request == null) {
    SdlTrace.logProxyEvent("String_Node_Str",SDL_LIB_TRACE_KEY);
    throw new IllegalArgumentException("String_Node_Str");
  }
  SdlTrace.logProxyEvent("String_Node_Str" + request.getFunctionName(),SDL_LIB_TRACE_KEY);
synchronized (CONNECTION_REFERENCE_LOCK) {
    if (getIsConnected()) {
      SdlTrace.logProxyEvent("String_Node_Str",SDL_LIB_TRACE_KEY);
      throw new SdlException("String_Node_Str",SdlExceptionCause.SDL_UNAVAILABLE);
    }
  }
  if (isCorrelationIDProtected(request.getCorrelationID())) {
    SdlTrace.logProxyEvent("String_Node_Str" + request.getCorrelationID(),SDL_LIB_TRACE_KEY);
    throw new SdlException("String_Node_Str" + request.getCorrelationID() + "String_Node_Str",SdlExceptionCause.RESERVED_CORRELATION_ID);
  }
  if (!_appInterfaceRegisterd && !request.getFunctionName().equals(FunctionID.REGISTER_APP_INTERFACE.toString())) {
    SdlTrace.logProxyEvent("String_Node_Str",SDL_LIB_TRACE_KEY);
    throw new SdlException("String_Node_Str",SdlExceptionCause.SDL_UNAVAILABLE);
  }
  if (_advancedLifecycleManagementEnabled) {
    if (request.getFunctionName().equals(FunctionID.REGISTER_APP_INTERFACE.toString()) || request.getFunctionName().equals(FunctionID.UNREGISTER_APP_INTERFACE.toString())) {
      SdlTrace.logProxyEvent("String_Node_Str",SDL_LIB_TRACE_KEY);
      throw new SdlException("String_Node_Str" + request.getFunctionName() + "String_Node_Str",SdlExceptionCause.INCORRECT_LIFECYCLE_MODEL);
    }
  }
  sendRPCRequestPrivate(request);
}

Fixed version (ground truth):
/** 
 * Takes an RPCRequest and sends it to SDL.  Responses are captured through callback on IProxyListener.  
 * @param request is the RPCRequest being sent
 * @throws SdlException if an unrecoverable error is encountered  if an unrecoverable error is encountered
 */
public void sendRPCRequest(RPCRequest request) throws SdlException {
  if (_proxyDisposed) {
    throw new SdlException("String_Node_Str",SdlExceptionCause.SDL_PROXY_DISPOSED);
  }
  if (request == null) {
    SdlTrace.logProxyEvent("String_Node_Str",SDL_LIB_TRACE_KEY);
    throw new IllegalArgumentException("String_Node_Str");
  }
  SdlTrace.logProxyEvent("String_Node_Str" + request.getFunctionName(),SDL_LIB_TRACE_KEY);
synchronized (CONNECTION_REFERENCE_LOCK) {
    if (!getIsConnected()) {
      SdlTrace.logProxyEvent("String_Node_Str",SDL_LIB_TRACE_KEY);
      throw new SdlException("String_Node_Str",SdlExceptionCause.SDL_UNAVAILABLE);
    }
  }
  if (isCorrelationIDProtected(request.getCorrelationID())) {
    SdlTrace.logProxyEvent("String_Node_Str" + request.getCorrelationID(),SDL_LIB_TRACE_KEY);
    throw new SdlException("String_Node_Str" + request.getCorrelationID() + "String_Node_Str",SdlExceptionCause.RESERVED_CORRELATION_ID);
  }
  if (!_appInterfaceRegisterd && !request.getFunctionName().equals(FunctionID.REGISTER_APP_INTERFACE.toString())) {
    SdlTrace.logProxyEvent("String_Node_Str",SDL_LIB_TRACE_KEY);
    throw new SdlException("String_Node_Str",SdlExceptionCause.SDL_UNAVAILABLE);
  }
  if (_advancedLifecycleManagementEnabled) {
    if (request.getFunctionName().equals(FunctionID.REGISTER_APP_INTERFACE.toString()) || request.getFunctionName().equals(FunctionID.UNREGISTER_APP_INTERFACE.toString())) {
      SdlTrace.logProxyEvent("String_Node_Str",SDL_LIB_TRACE_KEY);
      throw new SdlException("String_Node_Str" + request.getFunctionName() + "String_Node_Str",SdlExceptionCause.INCORRECT_LIFECYCLE_MODEL);
    }
  }
  sendRPCRequestPrivate(request);
}