Program: 103531
Project: 103531
Buggy source:
/** 
 * Starts recording   {@link #call} creating {@link #recorder} first andasking the user for the recording format and file if they are not configured in the "Call Recording" configuration form.
 */
private void startRecording(){
  String savedCallsPath=configuration.getString(Recorder.SAVED_CALLS_PATH);
  if ((savedCallsPath == null) || (savedCallsPath.length() == 0)) {
    callFileChooser.setStartPath(createDefaultFilename(null));
    File selectedFile=callFileChooser.getFileFromDialog();
    if (selectedFile != null) {
      callFilename=selectedFile.getAbsolutePath();
      String callFormat=SoundFileUtils.getExtension(selectedFile);
      if ((callFormat != null) && (callFormat.length() != 0)) {
        if (!isSupportedFormat(selectedFile)) {
          if (SoundFileUtils.isSoundFile(selectedFile)) {
            callFilename=callFilename.substring(0,callFilename.lastIndexOf('.'));
          }
          callFormat=SoundFileUtils.DEFAULT_CALL_RECORDING_FORMAT;
          callFilename+='.' + callFormat;
        }
        configuration.setProperty(Recorder.CALL_FORMAT,callFormat);
      }
    }
 else {
      setSelected(false);
      if (recorder != null) {
        try {
          recorder.stop();
        }
  finally {
          recorder=null;
        }
      }
      return;
    }
  }
 else   callFilename=createDefaultFilename(savedCallsPath);
  Throwable exception=null;
  try {
    Recorder recorder=getRecorder();
    if (recorder != null)     recorder.start(callFilename);
    this.recorder=recorder;
  }
 catch (  IOException ioex) {
    exception=ioex;
  }
catch (  MediaException mex) {
    exception=mex;
  }
catch (  OperationFailedException ofex) {
    exception=ofex;
  }
  if ((recorder == null) || (exception != null)) {
    logger.error("String_Node_Str" + call + "String_Node_Str"+ callFilename,exception);
    if (recorder != null) {
      try {
        recorder.stop();
      }
  finally {
        recorder=null;
      }
    }
  }
  setSelected(recorder != null);
}

Fixed version (ground truth):
/** 
 * Starts recording   {@link #call} creating {@link #recorder} first andasking the user for the recording format and file if they are not configured in the "Call Recording" configuration form.
 * @return <tt>true</tt> if the recording has been started successfully;otherwise, <tt>false</tt>
 */
private boolean startRecording(){
  String savedCallsPath=configuration.getString(Recorder.SAVED_CALLS_PATH);
  if ((savedCallsPath == null) || (savedCallsPath.length() == 0)) {
    if (callFileChooser == null) {
      callFileChooser=GenericFileDialog.create(null,resources.getI18NString("String_Node_Str"),SipCommFileChooser.SAVE_FILE_OPERATION);
      callFileChooser.addFilter(new SipCommFileFilter(){
        public boolean accept(        File f){
          return f.isDirectory() || isSupportedFormat(f);
        }
        public String getDescription(){
          StringBuilder description=new StringBuilder();
          description.append("String_Node_Str");
          Recorder recorder;
          try {
            recorder=getRecorder();
          }
 catch (          OperationFailedException ofex) {
            logger.error("String_Node_Str",ofex);
            recorder=null;
          }
          if (recorder != null) {
            List<String> supportedFormats=recorder.getSupportedFormats();
            if (supportedFormats != null) {
              description.append("String_Node_Str");
              boolean firstSupportedFormat=true;
              for (              String supportedFormat : supportedFormats) {
                if (firstSupportedFormat)                 firstSupportedFormat=false;
 else                 description.append("String_Node_Str");
                description.append("String_Node_Str");
                description.append(supportedFormat);
              }
              description.append(')');
            }
          }
          return description.toString();
        }
      }
);
    }
    callFileChooser.setStartPath(createDefaultFilename(null));
    File selectedFile=callFileChooser.getFileFromDialog();
    if (selectedFile != null) {
      callFilename=selectedFile.getAbsolutePath();
      String callFormat=SoundFileUtils.getExtension(selectedFile);
      if ((callFormat != null) && (callFormat.length() != 0)) {
        if (!isSupportedFormat(selectedFile)) {
          if (SoundFileUtils.isSoundFile(selectedFile)) {
            callFilename=callFilename.substring(0,callFilename.lastIndexOf('.'));
          }
          callFormat=SoundFileUtils.DEFAULT_CALL_RECORDING_FORMAT;
          callFilename+='.' + callFormat;
        }
        configuration.setProperty(Recorder.CALL_FORMAT,callFormat);
      }
    }
 else {
      return false;
    }
  }
 else   callFilename=createDefaultFilename(savedCallsPath);
  Throwable exception=null;
  try {
    Recorder recorder=getRecorder();
    if (recorder != null)     recorder.start(callFilename);
    this.recorder=recorder;
  }
 catch (  IOException ioex) {
    exception=ioex;
  }
catch (  MediaException mex) {
    exception=mex;
  }
catch (  OperationFailedException ofex) {
    exception=ofex;
  }
  if ((recorder == null) || (exception != null)) {
    logger.error("String_Node_Str" + call + "String_Node_Str"+ callFilename,exception);
    return false;
  }
 else   return true;
}