Program: 107674
Project: 107674
Buggy source:
/** 
 * Method called back in the RemoteListener to notify listener of all RTP Remote Events.RemoteEvents are one of ReceiverReportEvent, SenderReportEvent or RemoteCollisionEvent
 * @param remoteEvent the event
 */
public void update(RemoteEvent remoteEvent){
  if (remoteEvent instanceof SenderReportEvent || remoteEvent instanceof ReceiverReportEvent) {
    Report report;
    boolean senderReport=false;
    if (remoteEvent instanceof SenderReportEvent) {
      numberOfReceivedSenderReports++;
      report=((SenderReportEvent)remoteEvent).getReport();
      senderReport=true;
    }
 else {
      numberOfReceivedReceiverReports++;
      report=((ReceiverReportEvent)remoteEvent).getReport();
    }
    Feedback feedback=null;
    long remoteJitter=-1;
    if (report.getFeedbackReports().size() > 0) {
      feedback=(Feedback)report.getFeedbackReports().get(0);
      remoteJitter=feedback.getJitter();
      if ((remoteJitter < minRemoteInterArrivalJitter) || (minRemoteInterArrivalJitter == -1))       minRemoteInterArrivalJitter=remoteJitter;
      if (maxRemoteInterArrivalJitter < remoteJitter)       maxRemoteInterArrivalJitter=remoteJitter;
    }
    PacketLossAwareEncoder plae=getPacketLossAwareEncoder();
    if (plae != null)     plae.setExpectedPacketLoss((int)((feedback.getFractionLost() * 100) / 256));
    if (logger.isInfoEnabled()) {
      if ((numberOfReceivedSenderReports + numberOfReceivedReceiverReports) % 4 != 1)       return;
      StringBuilder buff=new StringBuilder(StatisticsEngine.RTP_STAT_PREFIX);
      MediaType mediaType=getMediaType();
      String mediaTypeStr=(mediaType == null) ? "String_Node_Str" : mediaType.toString();
      buff.append("String_Node_Str").append(senderReport ? "String_Node_Str" : "String_Node_Str").append("String_Node_Str").append(mediaTypeStr).append("String_Node_Str").append(getLocalSourceID()).append("String_Node_Str");
      if (senderReport) {
        buff.append("String_Node_Str").append(((SenderReport)report).getSenderPacketCount()).append("String_Node_Str").append(((SenderReport)report).getSenderByteCount());
      }
      if (feedback != null) {
        buff.append("String_Node_Str").append(remoteJitter).append("String_Node_Str").append(feedback.getNumLost()).append("String_Node_Str").append((int)(feedback.getDLSR() / 65.536)).append("String_Node_Str");
      }
      buff.append("String_Node_Str");
      logger.info(buff);
    }
  }
}

Fixed version (ground truth):
/** 
 * Method called back in the RemoteListener to notify listener of all RTP Remote Events.RemoteEvents are one of ReceiverReportEvent, SenderReportEvent or RemoteCollisionEvent
 * @param remoteEvent the event
 */
public void update(RemoteEvent remoteEvent){
  if (remoteEvent instanceof SenderReportEvent || remoteEvent instanceof ReceiverReportEvent) {
    Report report;
    boolean senderReport=false;
    if (remoteEvent instanceof SenderReportEvent) {
      numberOfReceivedSenderReports++;
      report=((SenderReportEvent)remoteEvent).getReport();
      senderReport=true;
    }
 else {
      numberOfReceivedReceiverReports++;
      report=((ReceiverReportEvent)remoteEvent).getReport();
    }
    Feedback feedback=null;
    long remoteJitter=-1;
    if (report.getFeedbackReports().size() > 0) {
      feedback=(Feedback)report.getFeedbackReports().get(0);
      remoteJitter=feedback.getJitter();
      if ((remoteJitter < minRemoteInterArrivalJitter) || (minRemoteInterArrivalJitter == -1))       minRemoteInterArrivalJitter=remoteJitter;
      if (maxRemoteInterArrivalJitter < remoteJitter)       maxRemoteInterArrivalJitter=remoteJitter;
    }
    PacketLossAwareEncoder plae=getPacketLossAwareEncoder();
    if (plae != null && feedback != null && getDirection() != MediaDirection.INACTIVE) {
      plae.setExpectedPacketLoss((int)((feedback.getFractionLost() * 100) / 256));
    }
    if (logger.isInfoEnabled()) {
      if ((numberOfReceivedSenderReports + numberOfReceivedReceiverReports) % 4 != 1)       return;
      StringBuilder buff=new StringBuilder(StatisticsEngine.RTP_STAT_PREFIX);
      MediaType mediaType=getMediaType();
      String mediaTypeStr=(mediaType == null) ? "String_Node_Str" : mediaType.toString();
      buff.append("String_Node_Str").append(senderReport ? "String_Node_Str" : "String_Node_Str").append("String_Node_Str").append(mediaTypeStr).append("String_Node_Str").append(getLocalSourceID()).append("String_Node_Str");
      if (senderReport) {
        buff.append("String_Node_Str").append(((SenderReport)report).getSenderPacketCount()).append("String_Node_Str").append(((SenderReport)report).getSenderByteCount());
      }
      if (feedback != null) {
        buff.append("String_Node_Str").append(remoteJitter).append("String_Node_Str").append(feedback.getNumLost()).append("String_Node_Str").append((int)(feedback.getDLSR() / 65.536)).append("String_Node_Str");
      }
      buff.append("String_Node_Str");
      logger.info(buff);
    }
  }
}