Program: 105022
Project: 105022
Buggy source:
/** 
 * Implements  {@link org.jitsi.videobridge.rtcp.NACKHandler#handleNACK(org.jitsi.impl.neomedia.rtcp.NACKPacket)}TODO: consider doing this in a separate thread, as it might slow down the receiving RTCP thread.
 */
@Override public void handleNACK(NACKPacket nackPacket){
  Set<Integer> lostPackets=new HashSet<Integer>();
  lostPackets.addAll(nackPacket.getLostPackets());
  long ssrc=nackPacket.sourceSSRC;
  RawPacketCache cache=transformEngine.getCache();
  if (cache != null) {
    Iterator<Integer> iter=lostPackets.iterator();
    while (iter.hasNext()) {
      int seq=iter.next();
      RawPacket pkt=cache.get(ssrc,seq);
      if (pkt != null) {
        getStream().injectPacket(createPacketForRetransmission(pkt),true,true);
        iter.remove();
      }
    }
  }
  NACKPacket newNack=new NACKPacket(nackPacket.senderSSRC,ssrc,lostPackets);
  RawPacket pkt=null;
  try {
    pkt=newNack.toRawPacket();
  }
 catch (  IOException ioe) {
    logger.warn("String_Node_Str" + ioe);
  }
  if (pkt != null) {
    Channel channel=getContent().findChannelByReceiveSSRC(ssrc);
    if (channel != null && channel instanceof RtpChannel) {
      ((RtpChannel)channel).getStream().injectPacket(pkt,false,true);
    }
  }
}

Fixed version (ground truth):
/** 
 * Implements  {@link org.jitsi.videobridge.rtcp.NACKHandler#handleNACK(org.jitsi.impl.neomedia.rtcp.NACKPacket)}TODO: consider doing this in a separate thread, as it might slow down the receiving RTCP thread.
 */
@Override public void handleNACK(NACKPacket nackPacket){
  Set<Integer> lostPackets=new HashSet<Integer>();
  lostPackets.addAll(nackPacket.getLostPackets());
  long ssrc=nackPacket.sourceSSRC;
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + getID() + "String_Node_Str"+ ssrc+ "String_Node_Str"+ lostPackets);
  }
  RawPacketCache cache=transformEngine.getCache();
  if (cache != null) {
    Iterator<Integer> iter=lostPackets.iterator();
    while (iter.hasNext()) {
      int seq=iter.next();
      RawPacket pkt=cache.get(ssrc,seq);
      if (pkt != null) {
        if (logger.isDebugEnabled()) {
          logger.debug("String_Node_Str" + ssrc + "String_Node_Str"+ seq);
        }
        getStream().injectPacket(createPacketForRetransmission(pkt),true,true);
        iter.remove();
      }
    }
  }
  if (!lostPackets.isEmpty()) {
    NACKPacket newNack=new NACKPacket(nackPacket.senderSSRC,ssrc,lostPackets);
    RawPacket pkt=null;
    try {
      pkt=newNack.toRawPacket();
    }
 catch (    IOException ioe) {
      logger.warn("String_Node_Str" + ioe);
    }
    if (pkt != null) {
      Set<RtpChannel> channelsToSendTo=new HashSet<RtpChannel>();
      Channel channel=getContent().findChannelByReceiveSSRC(ssrc);
      if (channel != null && channel instanceof RtpChannel) {
        channelsToSendTo.add((RtpChannel)channel);
      }
 else {
        for (        Channel c : getContent().getChannels()) {
          if (c != null && c instanceof RtpChannel && c != this)           channelsToSendTo.add((RtpChannel)c);
        }
      }
      for (      RtpChannel c : channelsToSendTo) {
        if (logger.isDebugEnabled()) {
          logger.debug("String_Node_Str" + ssrc + "String_Node_Str"+ lostPackets+ "String_Node_Str"+ c.getID());
        }
        c.getStream().injectPacket(pkt,false,true);
      }
    }
  }
}