Program: 32246
Project: 32246
Buggy source:
/** 
 * Try to open a video service by using the video streaming parameters supplied. Only information from codecs, width and height are used during video format negotiation.
 * @param isEncrypted    Specify true if packets on this service have to be encrypted
 * @param parameters VideoStreamingParameters that are desired. Does not guarantee this is what will be accepted.
 * @return If the service is opened successfully, an instance of VideoStreamingParams isreturned which contains accepted video format. If the service is opened with legacy mode (i.e. without any negotiation) then an instance of VideoStreamingParams is returned. If the service was not opened then null is returned.
 */
@SuppressWarnings("String_Node_Str") private VideoStreamingParameters tryStartVideoStream(boolean isEncrypted,VideoStreamingParameters parameters){
  if (sdlSession == null) {
    DebugTool.logWarning("String_Node_Str");
    return null;
  }
  if (getWiProVersion() >= 5 && !_systemCapabilityManager.isCapabilitySupported(SystemCapabilityType.VIDEO_STREAMING)) {
    DebugTool.logWarning("String_Node_Str");
    return null;
  }
  if (parameters == null) {
    DebugTool.logWarning("String_Node_Str");
    return null;
  }
  sdlSession.setDesiredVideoParams(parameters);
  navServiceStartResponseReceived=false;
  navServiceStartResponse=false;
  navServiceStartRejectedParams=null;
  sdlSession.startService(SessionType.NAV,sdlSession.getSessionId(),isEncrypted);
  FutureTask<Void> fTask=createFutureTask(new CallableMethod(RESPONSE_WAIT_TIME));
  ScheduledExecutorService scheduler=createScheduler();
  scheduler.execute(fTask);
  while (!navServiceStartResponseReceived && !fTask.isDone())   ;
  scheduler.shutdown();
  if (navServiceStartResponse) {
    return sdlSession.getAcceptedVideoParams();
  }
  if (navServiceStartRejectedParams != null) {
    StringBuilder builder=new StringBuilder();
    for (    String paramName : navServiceStartRejectedParams) {
      if (builder.length() > 0) {
        builder.append("String_Node_Str");
      }
      builder.append(paramName);
    }
    DebugTool.logWarning("String_Node_Str" + builder.toString());
  }
 else {
    DebugTool.logWarning("String_Node_Str");
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Try to open a video service by using the video streaming parameters supplied. Only information from codecs, width and height are used during video format negotiation.
 * @param isEncrypted    Specify true if packets on this service have to be encrypted
 * @param parameters VideoStreamingParameters that are desired. Does not guarantee this is what will be accepted.
 * @return If the service is opened successfully, an instance of VideoStreamingParams isreturned which contains accepted video format. If the service is opened with legacy mode (i.e. without any negotiation) then an instance of VideoStreamingParams is returned. If the service was not opened then null is returned.
 */
@SuppressWarnings("String_Node_Str") private VideoStreamingParameters tryStartVideoStream(boolean isEncrypted,VideoStreamingParameters parameters){
  if (sdlSession == null) {
    DebugTool.logWarning("String_Node_Str");
    return null;
  }
  if (getWiProVersion() >= 5 && !_systemCapabilityManager.isCapabilitySupported(SystemCapabilityType.VIDEO_STREAMING)) {
    DebugTool.logWarning("String_Node_Str");
    return null;
  }
  if (parameters == null) {
    DebugTool.logWarning("String_Node_Str");
    return null;
  }
  sdlSession.setDesiredVideoParams(parameters);
  navServiceStartResponseReceived=false;
  navServiceStartResponse=false;
  navServiceStartRejectedParams=null;
  sdlSession.startService(SessionType.NAV,sdlSession.getSessionId(),isEncrypted);
  FutureTask<Void> fTask=createFutureTask(new CallableMethod(RESPONSE_WAIT_TIME));
  ScheduledExecutorService scheduler=createScheduler();
  scheduler.execute(fTask);
  while (!navServiceStartResponseReceived && !fTask.isDone())   ;
  scheduler.shutdown();
  if (navServiceStartResponse) {
    if (getWiProVersion() < 5) {
      sdlSession.setAcceptedVideoParams(parameters);
    }
    return sdlSession.getAcceptedVideoParams();
  }
  if (navServiceStartRejectedParams != null) {
    StringBuilder builder=new StringBuilder();
    for (    String paramName : navServiceStartRejectedParams) {
      if (builder.length() > 0) {
        builder.append("String_Node_Str");
      }
      builder.append(paramName);
    }
    DebugTool.logWarning("String_Node_Str" + builder.toString());
  }
 else {
    DebugTool.logWarning("String_Node_Str");
  }
  return null;
}