Program: 82032
Project: 82032
Buggy source:
private ContentPacketExtension createContentPacketExtension(MediaType mediaType,JireconSessionInfo sessionInfo,JireconRecorderInfo recorderInfo,JireconTransportManager transportManager,JireconSrtpControlManager srtpControlManager){
  logger.debug(this.getClass() + "String_Node_Str");
  IceUdpTransportPacketExtension transportPE=transportManager.getTransportPacketExt();
  String fingerprint=srtpControlManager.getLocalFingerprint(mediaType);
  String hash=srtpControlManager.getLocalFingerprintHashFunction(mediaType);
  DtlsFingerprintPacketExtension fingerprintPE=transportPE.getFirstChildOfType(DtlsFingerprintPacketExtension.class);
  if (fingerprintPE == null) {
    fingerprintPE=new DtlsFingerprintPacketExtension();
    transportPE.addChildExtension(fingerprintPE);
  }
  fingerprintPE.setFingerprint(fingerprint);
  fingerprintPE.setHash(hash);
  List<PayloadTypePacketExtension> payloadTypes=new ArrayList<PayloadTypePacketExtension>();
  for (  Map.Entry<MediaFormat,Byte> e : sessionInfo.getPayloadTypes(mediaType).entrySet()) {
    PayloadTypePacketExtension payloadType=new PayloadTypePacketExtension();
    payloadType.setId(e.getValue());
    payloadType.setName(e.getKey().getEncoding());
    if (e.getKey() instanceof AudioMediaFormat) {
      payloadType.setChannels(((AudioMediaFormat)e.getKey()).getChannels());
    }
    payloadType.setClockrate((int)e.getKey().getClockRate());
    for (    Map.Entry<String,String> en : e.getKey().getFormatParameters().entrySet()) {
      ParameterPacketExtension parameter=new ParameterPacketExtension();
      parameter.setName(en.getKey());
      parameter.setValue(en.getValue());
      payloadType.addParameter(parameter);
    }
    payloadTypes.add(payloadType);
  }
  RtpDescriptionPacketExtension description=new RtpDescriptionPacketExtension();
  description.setMedia(mediaType.toString());
  for (  PayloadTypePacketExtension p : payloadTypes) {
    description.addPayloadType(p);
  }
  SourcePacketExtension sourcePacketExtension=new SourcePacketExtension();
  description.setSsrc(recorderInfo.getLocalSsrc(mediaType).toString());
  sourcePacketExtension.setSSRC(recorderInfo.getLocalSsrc(mediaType));
  sourcePacketExtension.addChildExtension(new ParameterPacketExtension("String_Node_Str",recorderInfo.getMsid(mediaType)));
  sourcePacketExtension.addChildExtension(new ParameterPacketExtension("String_Node_Str",recorderInfo.getMsLabel()));
  sourcePacketExtension.addChildExtension(new ParameterPacketExtension("String_Node_Str",recorderInfo.getLabel(mediaType)));
  description.addChildExtension(sourcePacketExtension);
  ContentPacketExtension content=new ContentPacketExtension();
  content.setCreator(CreatorEnum.responder);
  content.setName(description.getMedia());
  content.setSenders(SendersEnum.initiator);
  content.addChildExtension(description);
  content.addChildExtension(transportPE);
  return content;
}

Fixed version (ground truth):
private ContentPacketExtension createContentPacketExtension(MediaType mediaType,ContentPacketExtension initIqContent,JireconSessionInfo sessionInfo,JireconRecorderInfo recorderInfo,JireconTransportManager transportManager,JireconSrtpControlManager srtpControlManager){
  logger.debug(this.getClass() + "String_Node_Str");
  IceUdpTransportPacketExtension transportPE=transportManager.getTransportPacketExt();
  String fingerprint=srtpControlManager.getLocalFingerprint(mediaType);
  String hash=srtpControlManager.getLocalFingerprintHashFunction(mediaType);
  DtlsFingerprintPacketExtension fingerprintPE=transportPE.getFirstChildOfType(DtlsFingerprintPacketExtension.class);
  if (fingerprintPE == null) {
    fingerprintPE=new DtlsFingerprintPacketExtension();
    transportPE.addChildExtension(fingerprintPE);
  }
  fingerprintPE.setFingerprint(fingerprint);
  fingerprintPE.setHash(hash);
  List<PayloadTypePacketExtension> payloadTypes=new ArrayList<PayloadTypePacketExtension>();
  for (  Map.Entry<MediaFormat,Byte> e : sessionInfo.getPayloadTypes(mediaType).entrySet()) {
    PayloadTypePacketExtension payloadType=new PayloadTypePacketExtension();
    payloadType.setId(e.getValue());
    payloadType.setName(e.getKey().getEncoding());
    if (e.getKey() instanceof AudioMediaFormat) {
      payloadType.setChannels(((AudioMediaFormat)e.getKey()).getChannels());
    }
    payloadType.setClockrate((int)e.getKey().getClockRate());
    for (    Map.Entry<String,String> en : e.getKey().getFormatParameters().entrySet()) {
      ParameterPacketExtension parameter=new ParameterPacketExtension();
      parameter.setName(en.getKey());
      parameter.setValue(en.getValue());
      payloadType.addParameter(parameter);
    }
    payloadTypes.add(payloadType);
  }
  RtpDescriptionPacketExtension description=new RtpDescriptionPacketExtension();
  description.setMedia(mediaType.toString());
  for (  PayloadTypePacketExtension p : payloadTypes) {
    description.addPayloadType(p);
  }
  SourcePacketExtension sourcePacketExtension=new SourcePacketExtension();
  description.setSsrc(recorderInfo.getLocalSsrc(mediaType).toString());
  sourcePacketExtension.setSSRC(recorderInfo.getLocalSsrc(mediaType));
  sourcePacketExtension.addChildExtension(new ParameterPacketExtension("String_Node_Str",recorderInfo.getMsid(mediaType)));
  sourcePacketExtension.addChildExtension(new ParameterPacketExtension("String_Node_Str",recorderInfo.getMsLabel()));
  sourcePacketExtension.addChildExtension(new ParameterPacketExtension("String_Node_Str",recorderInfo.getLabel(mediaType)));
  description.addChildExtension(sourcePacketExtension);
  ContentPacketExtension content=new ContentPacketExtension();
  content.setCreator(CreatorEnum.responder);
  content.setName(initIqContent.getName());
  content.setSenders(SendersEnum.initiator);
  content.addChildExtension(description);
  content.addChildExtension(transportPE);
  return content;
}