Program: 103443
Project: 103443
Buggy source:
/** 
 * Check if the remote part supports Jingle video.
 * @param calleeAddress Contact address
 * @return true if contact support Jingle video, false otherwise
 * @throws OperationFailedException with the corresponding code if we failto create the video call.
 */
protected Call createOutgoingVideoCall(String calleeAddress) throws OperationFailedException {
  boolean supported=false;
  String fullCalleeURI=null;
  if (calleeAddress.indexOf('/') > 0) {
    fullCalleeURI=calleeAddress;
  }
 else {
    fullCalleeURI=parentProvider.getConnection().getRoster().getPresence(calleeAddress).getFrom();
  }
  if (logger.isInfoEnabled())   logger.info("String_Node_Str");
  DiscoverInfo di=null;
  try {
    di=parentProvider.getDiscoveryManager().discoverInfo(fullCalleeURI);
    if (di.containsFeature(InputEvtIQ.NAMESPACE)) {
      if (logger.isInfoEnabled())       logger.info(fullCalleeURI + "String_Node_Str");
      supported=true;
    }
 else {
      if (logger.isInfoEnabled())       logger.info(fullCalleeURI + "String_Node_Str");
    }
  }
 catch (  XMPPException ex) {
    logger.warn("String_Node_Str" + fullCalleeURI,ex);
  }
  if (parentProvider.getConnection() == null) {
    throw new OperationFailedException("String_Node_Str" + "String_Node_Str",OperationFailedException.INTERNAL_ERROR);
  }
  CallJabberImpl call=new CallJabberImpl(basicTelephony);
  call.setLocalVideoAllowed(true,getMediaUseCase());
  call.setLocalInputEvtAware(supported);
  basicTelephony.createOutgoingCall(call,calleeAddress);
  return call;
}

Fixed version (ground truth):
/** 
 * Check if the remote part supports Jingle video.
 * @param calleeAddress Contact address
 * @param videoDevice specific video device to use (null to use defaultdevice)
 * @return true if contact support Jingle video, false otherwise
 * @throws OperationFailedException with the corresponding code if we failto create the video call.
 */
@Override protected Call createOutgoingVideoCall(String calleeAddress,MediaDevice videoDevice) throws OperationFailedException {
  boolean supported=false;
  String fullCalleeURI=null;
  if (calleeAddress.indexOf('/') > 0) {
    fullCalleeURI=calleeAddress;
  }
 else {
    fullCalleeURI=parentProvider.getConnection().getRoster().getPresence(calleeAddress).getFrom();
  }
  if (logger.isInfoEnabled())   logger.info("String_Node_Str");
  DiscoverInfo di=null;
  try {
    di=parentProvider.getDiscoveryManager().discoverInfo(fullCalleeURI);
    if (di.containsFeature(InputEvtIQ.NAMESPACE)) {
      if (logger.isInfoEnabled())       logger.info(fullCalleeURI + "String_Node_Str");
      supported=true;
    }
 else {
      if (logger.isInfoEnabled())       logger.info(fullCalleeURI + "String_Node_Str");
    }
  }
 catch (  XMPPException ex) {
    logger.warn("String_Node_Str" + fullCalleeURI,ex);
  }
  if (parentProvider.getConnection() == null) {
    throw new OperationFailedException("String_Node_Str" + "String_Node_Str",OperationFailedException.INTERNAL_ERROR);
  }
  CallJabberImpl call=new CallJabberImpl(basicTelephony);
  if (videoDevice != null) {
    call.setVideoDevice(videoDevice);
  }
  call.setLocalVideoAllowed(true,getMediaUseCase());
  call.setLocalInputEvtAware(supported);
  basicTelephony.createOutgoingCall(call,calleeAddress);
  return call;
}