Program: 151767
Project: 151767
Buggy source:
public void announceReceived(ChannelHandlerContext ctx,HttpRequest req) throws Exception {
  if (!req.containsHeader("String_Node_Str"))   throw new ProtocolException("String_Node_Str");
  if (!"String_Node_Str".equals(req.getHeader("String_Node_Str")))   throw new ProtocolException("String_Node_Str" + req.getHeader("String_Node_Str"));
  final String dsp=req.getContent().toString(Charset.forName("String_Node_Str")).replace("String_Node_Str","String_Node_Str");
  m_aesKey=null;
  m_aesIv=null;
  int alacFormatIndex=-1;
  int audioFormatIndex=-1;
  int descriptionFormatIndex=-1;
  String[] formatOptions=null;
  for (  final String line : dsp.split("String_Node_Str")) {
    final Matcher line_matcher=s_pattern_sdp_line.matcher(line);
    if (!line_matcher.matches())     throw new ProtocolException("String_Node_Str" + line);
    char attribute=line_matcher.group(1).charAt(0);
    String setting=line_matcher.group(2);
switch (attribute) {
case 'm':
      final Matcher m_matcher=s_pattern_sdp_m.matcher(setting);
    if (!m_matcher.matches())     throw new ProtocolException("String_Node_Str" + attribute + "String_Node_Str"+ setting);
  audioFormatIndex=Integer.valueOf(m_matcher.group(2));
break;
case 'a':
final Matcher a_matcher=s_pattern_sdp_a.matcher(setting);
if (!a_matcher.matches()) throw new ProtocolException("String_Node_Str" + attribute + "String_Node_Str"+ setting);
final String key=a_matcher.group(1);
final String value=a_matcher.group(2);
if ("String_Node_Str".equals(key)) {
final Matcher a_rtpmap_matcher=s_pattern_sdp_a_rtpmap.matcher(value);
if (!a_rtpmap_matcher.matches()) throw new ProtocolException("String_Node_Str" + attribute + "String_Node_Str"+ value);
final int formatIdx=Integer.valueOf(a_rtpmap_matcher.group(1));
final String format=a_rtpmap_matcher.group(2);
if ("String_Node_Str".equals(format)) alacFormatIndex=formatIdx;
}
 else if ("String_Node_Str".equals(key)) {
final String[] parts=value.split("String_Node_Str");
descriptionFormatIndex=Integer.valueOf(parts[0]);
formatOptions=Arrays.copyOfRange(parts,1,parts.length);
}
 else if ("String_Node_Str".equals(key)) {
byte[] aesKeyRaw;
synchronized (s_rsaPkCS1OaepCipher) {
s_rsaPkCS1OaepCipher.init(Cipher.DECRYPT_MODE,AirTunesKeys.PrivateKey);
aesKeyRaw=s_rsaPkCS1OaepCipher.doFinal(Base64.decodeUnpadded(value));
}
m_aesKey=new SecretKeySpec(aesKeyRaw,"String_Node_Str");
}
 else if ("String_Node_Str".equals(key)) {
m_aesIv=new IvParameterSpec(Base64.decodeUnpadded(value));
}
break;
default :
break;
}
}
if (alacFormatIndex != audioFormatIndex) throw new ProtocolException("String_Node_Str" + audioFormatIndex + "String_Node_Str");
if (audioFormatIndex != descriptionFormatIndex) throw new ProtocolException("String_Node_Str" + audioFormatIndex + "String_Node_Str");
if (formatOptions == null) throw new ProtocolException("String_Node_Str" + audioFormatIndex + "String_Node_Str");
m_audioDecodeHandler=new RaopRtpAudioAlacDecodeHandler(formatOptions);
final HttpResponse response=new DefaultHttpResponse(RtspVersions.RTSP_1_0,RtspResponseStatuses.OK);
ctx.getChannel().write(response);
}

Fixed version (ground truth):
public void announceReceived(ChannelHandlerContext ctx,HttpRequest req) throws Exception {
  if (!req.containsHeader("String_Node_Str"))   throw new ProtocolException("String_Node_Str");
  if (!"String_Node_Str".equals(req.getHeader("String_Node_Str")))   throw new ProtocolException("String_Node_Str" + req.getHeader("String_Node_Str"));
  final String dsp=req.getContent().toString(Charset.forName("String_Node_Str")).replace("String_Node_Str","String_Node_Str");
  m_aesKey=null;
  m_aesIv=null;
  int alacFormatIndex=-1;
  int audioFormatIndex=-1;
  int descriptionFormatIndex=-1;
  String[] formatOptions=null;
  for (  final String line : dsp.split("String_Node_Str")) {
    final Matcher line_matcher=s_pattern_sdp_line.matcher(line);
    if (!line_matcher.matches())     throw new ProtocolException("String_Node_Str" + line);
    char attribute=line_matcher.group(1).charAt(0);
    String setting=line_matcher.group(2);
switch (attribute) {
case 'm':
      final Matcher m_matcher=s_pattern_sdp_m.matcher(setting);
    if (!m_matcher.matches())     throw new ProtocolException("String_Node_Str" + attribute + "String_Node_Str"+ setting);
  audioFormatIndex=Integer.valueOf(m_matcher.group(2));
break;
case 'a':
final Matcher a_matcher=s_pattern_sdp_a.matcher(setting);
if (!a_matcher.matches()) throw new ProtocolException("String_Node_Str" + attribute + "String_Node_Str"+ setting);
final String key=a_matcher.group(1);
final String value=a_matcher.group(2);
if ("String_Node_Str".equals(key)) {
final Matcher a_rtpmap_matcher=s_pattern_sdp_a_rtpmap.matcher(value);
if (!a_rtpmap_matcher.matches()) throw new ProtocolException("String_Node_Str" + attribute + "String_Node_Str"+ value);
final int formatIdx=Integer.valueOf(a_rtpmap_matcher.group(1));
final String format=a_rtpmap_matcher.group(2);
if ("String_Node_Str".equals(format)) alacFormatIndex=formatIdx;
}
 else if ("String_Node_Str".equals(key)) {
final String[] parts=value.split("String_Node_Str");
descriptionFormatIndex=Integer.valueOf(parts[0]);
formatOptions=Arrays.copyOfRange(parts,1,parts.length);
}
 else if ("String_Node_Str".equals(key)) {
byte[] aesKeyRaw;
m_rsaPkCS1OaepCipher.init(Cipher.DECRYPT_MODE,AirTunesKeys.PrivateKey);
aesKeyRaw=m_rsaPkCS1OaepCipher.doFinal(Base64.decodeUnpadded(value));
m_aesKey=new SecretKeySpec(aesKeyRaw,"String_Node_Str");
}
 else if ("String_Node_Str".equals(key)) {
m_aesIv=new IvParameterSpec(Base64.decodeUnpadded(value));
}
break;
default :
break;
}
}
if (alacFormatIndex != audioFormatIndex) throw new ProtocolException("String_Node_Str" + audioFormatIndex + "String_Node_Str");
if (audioFormatIndex != descriptionFormatIndex) throw new ProtocolException("String_Node_Str" + audioFormatIndex + "String_Node_Str");
if (formatOptions == null) throw new ProtocolException("String_Node_Str" + audioFormatIndex + "String_Node_Str");
m_audioDecodeHandler=new RaopRtpAudioAlacDecodeHandler(formatOptions);
final HttpResponse response=new DefaultHttpResponse(RtspVersions.RTSP_1_0,RtspResponseStatuses.OK);
ctx.getChannel().write(response);
}