Program: 47154
Project: 47154
Buggy source:
/** 
 * Determine the mime type specific for this renderer, given a generic mime type. This translation takes into account all configured "Supported" lines and mime type aliases for this renderer.
 * @param mimeType The mime type to look up. Special values are <code>HTTPResource.VIDEO_TRANSCODE</code> and <code>HTTPResource.AUDIO_TRANSCODE</code>, which will be translated to the mime type of the transcoding profile configured for this renderer.
 * @return The mime type.
 */
public String getMimeType(String mimeType){
  if (mimeType == null) {
    return null;
  }
  String matchedMimeType=null;
  if (isMediaParserV2()) {
    if (HTTPResource.VIDEO_TRANSCODE.equals(mimeType)) {
      if (isTranscodeToMPEGPSMPEG2AC3()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.MPEGPS,FormatConfiguration.MPEG2,FormatConfiguration.AC3);
      }
 else       if (isTranscodeToMPEGTSH264AC3()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.MPEGTS,FormatConfiguration.H264,FormatConfiguration.AC3);
      }
 else       if (isTranscodeToMPEGTSH264AAC()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.MPEGTS,FormatConfiguration.H264,FormatConfiguration.AAC);
      }
 else       if (isTranscodeToMPEGTSH265AC3()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.MPEGTS,FormatConfiguration.H265,FormatConfiguration.AC3);
      }
 else       if (isTranscodeToMPEGTSH265AAC()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.MPEGTS,FormatConfiguration.H265,FormatConfiguration.AAC);
      }
 else       if (isTranscodeToMPEGTSMPEG2AC3()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.MPEGTS,FormatConfiguration.MPEG2,FormatConfiguration.AC3);
      }
 else       if (isTranscodeToWMV()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.WMV,FormatConfiguration.WMV,FormatConfiguration.WMA);
      }
    }
 else     if (HTTPResource.AUDIO_TRANSCODE.equals(mimeType)) {
      if (isTranscodeToWAV()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.WAV,null,null);
      }
 else       if (isTranscodeToMP3()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.MP3,null,null);
      }
 else {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.LPCM,null,null);
        if (matchedMimeType != null) {
          if (isTranscodeAudioTo441()) {
            matchedMimeType+="String_Node_Str";
          }
 else {
            matchedMimeType+="String_Node_Str";
          }
        }
      }
    }
  }
  if (matchedMimeType == null) {
    if (HTTPResource.VIDEO_TRANSCODE.equals(mimeType)) {
      if (isTranscodeToWMV()) {
        matchedMimeType=HTTPResource.WMV_TYPEMIME;
      }
 else {
        matchedMimeType=HTTPResource.MPEG_TYPEMIME;
      }
    }
 else     if (HTTPResource.AUDIO_TRANSCODE.equals(mimeType)) {
      if (isTranscodeToWAV()) {
        matchedMimeType=HTTPResource.AUDIO_WAV_TYPEMIME;
      }
 else       if (isTranscodeToMP3()) {
        matchedMimeType=HTTPResource.AUDIO_MP3_TYPEMIME;
      }
 else {
        matchedMimeType=HTTPResource.AUDIO_LPCM_TYPEMIME;
        if (isTranscodeAudioTo441()) {
          matchedMimeType+="String_Node_Str";
        }
 else {
          matchedMimeType+="String_Node_Str";
        }
      }
    }
  }
  if (matchedMimeType == null) {
    matchedMimeType=mimeType;
  }
  if (mimes.containsKey(matchedMimeType)) {
    return mimes.get(matchedMimeType);
  }
  return matchedMimeType;
}

Fixed version (ground truth):
/** 
 * Determine the mime type specific for this renderer, given a generic mime type. This translation takes into account all configured "Supported" lines and mime type aliases for this renderer.
 * @param mimeType The mime type to look up. Special values are <code>HTTPResource.VIDEO_TRANSCODE</code> and <code>HTTPResource.AUDIO_TRANSCODE</code>, which will be translated to the mime type of the transcoding profile configured for this renderer.
 * @return The mime type.
 */
public String getMimeType(String mimeType){
  if (mimeType == null) {
    return null;
  }
  String matchedMimeType=null;
  if (isMediaParserV2()) {
    if (HTTPResource.VIDEO_TRANSCODE.equals(mimeType)) {
      if (isTranscodeToMPEGTSH264AC3()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.MPEGTS,FormatConfiguration.H264,FormatConfiguration.AC3);
      }
 else       if (isTranscodeToMPEGTSH264AAC()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.MPEGTS,FormatConfiguration.H264,FormatConfiguration.AAC);
      }
 else       if (isTranscodeToMPEGTSH265AC3()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.MPEGTS,FormatConfiguration.H265,FormatConfiguration.AC3);
      }
 else       if (isTranscodeToMPEGTSH265AAC()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.MPEGTS,FormatConfiguration.H265,FormatConfiguration.AAC);
      }
 else       if (isTranscodeToMPEGTSMPEG2AC3()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.MPEGTS,FormatConfiguration.MPEG2,FormatConfiguration.AC3);
      }
 else       if (isTranscodeToWMV()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.WMV,FormatConfiguration.WMV,FormatConfiguration.WMA);
      }
 else {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.MPEGPS,FormatConfiguration.MPEG2,FormatConfiguration.AC3);
      }
    }
 else     if (HTTPResource.AUDIO_TRANSCODE.equals(mimeType)) {
      if (isTranscodeToWAV()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.WAV,null,null);
      }
 else       if (isTranscodeToMP3()) {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.MP3,null,null);
      }
 else {
        matchedMimeType=getFormatConfiguration().match(FormatConfiguration.LPCM,null,null);
        if (matchedMimeType != null) {
          if (isTranscodeAudioTo441()) {
            matchedMimeType+="String_Node_Str";
          }
 else {
            matchedMimeType+="String_Node_Str";
          }
        }
      }
    }
  }
  if (matchedMimeType == null) {
    if (HTTPResource.VIDEO_TRANSCODE.equals(mimeType)) {
      if (isTranscodeToWMV()) {
        matchedMimeType=HTTPResource.WMV_TYPEMIME;
      }
 else {
        matchedMimeType=HTTPResource.MPEG_TYPEMIME;
      }
    }
 else     if (HTTPResource.AUDIO_TRANSCODE.equals(mimeType)) {
      if (isTranscodeToWAV()) {
        matchedMimeType=HTTPResource.AUDIO_WAV_TYPEMIME;
      }
 else       if (isTranscodeToMP3()) {
        matchedMimeType=HTTPResource.AUDIO_MP3_TYPEMIME;
      }
 else {
        matchedMimeType=HTTPResource.AUDIO_LPCM_TYPEMIME;
        if (isTranscodeAudioTo441()) {
          matchedMimeType+="String_Node_Str";
        }
 else {
          matchedMimeType+="String_Node_Str";
        }
      }
    }
  }
  if (matchedMimeType == null) {
    matchedMimeType=mimeType;
  }
  if (mimes.containsKey(matchedMimeType)) {
    return mimes.get(matchedMimeType);
  }
  return matchedMimeType;
}