Program: 98419
Project: 98419
Buggy source:
public static SessionDescription createSipSDP(final Description rtpDescription,final RawUdpTransport transport,final SipProviderInfoInterface sipProvider,final MediaDirection mediaDirection) throws SdpException {
  final SessionDescription description=SdpFactory.getInstance().createSessionDescription(sipProvider);
  final int[] ids=new int[rtpDescription.getPayloads().size()];
  int i=0;
  final List<String> names=new ArrayList<String>();
  final List<String> values=new ArrayList<String>();
  for (  final Payload payload : rtpDescription.getPayloads()) {
    if (i == 0 || !payload.getId().equals(Payload.G729.getId())) {
      ids[i++]=Integer.parseInt(payload.getId());
      names.add("String_Node_Str");
      values.add(payload.getId() + "String_Node_Str" + payload.getName()+ (payload.getClockrate() > -1 ? "String_Node_Str" + payload.getClockrate() : "String_Node_Str")+ (payload.getChannels() > -1 ? "String_Node_Str" + payload.getChannels() : "String_Node_Str"));
      if (payload.getId().equals(Payload.G729.getId())) {
        names.add("String_Node_Str");
        values.add(String.valueOf(payload.getId()) + "String_Node_Str");
      }
    }
  }
  if (transport.getCandidates().size() < 1) {
    throw new SdpException("String_Node_Str");
  }
  final MediaDescription md=SdpFactory.getInstance().createMediaDescription(rtpDescription.getMedia(),Integer.parseInt(transport.getCandidates().get(0).getPort()),1,"String_Node_Str",ids);
  md.addDynamicPayloads(names,values);
  final AttributeField af=new AttributeField();
  if (!MediaDirection.both.equals(mediaDirection)) {
    af.setValueAllowNull(mediaDirection.toString());
    md.addAttribute(af);
  }
 else {
    af.setValueAllowNull("String_Node_Str");
    md.addAttribute(af);
  }
  final List<MediaDescription> mv=new ArrayList<MediaDescription>();
  mv.add(md);
  description.setMediaDescriptions(mv);
  String ip=transport.getCandidates().get(0).getIp();
  ip=ip == null || ip.trim().length() < 7 ? sipProvider.getIP() : ip;
  final Origin origin=SdpFactory.getInstance().createOrigin("String_Node_Str",ip);
  origin.setSessionId(3);
  origin.setSessionVersion(1);
  description.setOrigin(origin);
  description.setConnection(SdpFactory.getInstance().createConnection(ip));
  return description;
}

Fixed version (ground truth):
public static SessionDescription createSipSDP(final Description rtpDescription,final RawUdpTransport transport,final SipProviderInfoInterface sipProvider,final MediaDirection mediaDirection) throws SdpException {
  final SessionDescription description=SdpFactory.getInstance().createSessionDescription(sipProvider);
  final int[] ids=new int[rtpDescription.getPayloads().size()];
  int i=0;
  final List<String> names=new ArrayList<String>();
  final List<String> values=new ArrayList<String>();
  for (  final Payload payload : rtpDescription.getPayloads()) {
    ids[i++]=Integer.parseInt(payload.getId());
    names.add("String_Node_Str");
    values.add(payload.getId() + "String_Node_Str" + payload.getName()+ (payload.getClockrate() > -1 ? "String_Node_Str" + payload.getClockrate() : "String_Node_Str")+ (payload.getChannels() > -1 ? "String_Node_Str" + payload.getChannels() : "String_Node_Str"));
    if (payload.getId().equals(Payload.G729.getId())) {
      names.add("String_Node_Str");
      values.add(String.valueOf(payload.getId()) + "String_Node_Str");
    }
  }
  if (transport.getCandidates().size() < 1) {
    throw new SdpException("String_Node_Str");
  }
  final MediaDescription md=SdpFactory.getInstance().createMediaDescription(rtpDescription.getMedia(),Integer.parseInt(transport.getCandidates().get(0).getPort()),1,"String_Node_Str",ids);
  md.addDynamicPayloads(names,values);
  final AttributeField af=new AttributeField();
  if (!MediaDirection.both.equals(mediaDirection)) {
    af.setValueAllowNull(mediaDirection.toString());
    md.addAttribute(af);
  }
 else {
    af.setValueAllowNull("String_Node_Str");
    md.addAttribute(af);
  }
  final List<MediaDescription> mv=new ArrayList<MediaDescription>();
  mv.add(md);
  description.setMediaDescriptions(mv);
  String ip=transport.getCandidates().get(0).getIp();
  ip=ip == null || ip.trim().length() < 7 ? sipProvider.getIP() : ip;
  final Origin origin=SdpFactory.getInstance().createOrigin("String_Node_Str",ip);
  origin.setSessionId(3);
  origin.setSessionVersion(1);
  description.setOrigin(origin);
  description.setConnection(SdpFactory.getInstance().createConnection(ip));
  return description;
}