Program: 104420
Project: 104420
Buggy source:
/** 
 * SC-Bonjour Implementation : Method used to update the corresponding DNS entry in the cache of JmDNS with the new information in this ServiceInfo. A call to getLocalService must first be issued to get the ServiceInfo object to be modified. THIS METHOD MUST BE USED INSTEAD OF ANY DIRECT ACCESS TO JMDNS' CACHE!! This is used in the implementation of Zeroconf in SIP Communicator to be able to change fields declared by the local contact (status, etc).
 * @param info Updated service data to be used to replace the oldstuff contained in JmDNS' cache
 * @param old info bytes
 */
public void updateInfos(ServiceInfo info,byte[] old){
  DNSOutgoing out, out2;
synchronized (JmDNS.this) {
    services.put(info.getQualifiedName().toLowerCase(),info);
  }
synchronized (info) {
    logger.debug("String_Node_Str" + info.getQualifiedName() + "String_Node_Str"+ info.getState());
    out=new DNSOutgoing(DNSConstants.FLAGS_RA | DNSConstants.FLAGS_AA);
    out2=new DNSOutgoing(DNSConstants.FLAGS_RA | DNSConstants.FLAGS_AA);
    try {
      out.addAnswer(new DNSRecord.Text(info.getQualifiedName(),DNSConstants.TYPE_TXT,DNSConstants.CLASS_IN,0,old),0);
      out.addAnswer(new DNSRecord.Text(info.getQualifiedName(),DNSConstants.TYPE_TXT,DNSConstants.CLASS_IN | DNSConstants.CLASS_UNIQUE,DNSConstants.DNS_TTL,info.text),0);
      out2.addAnswer(new DNSRecord.Text(info.getQualifiedName(),DNSConstants.TYPE_TXT,DNSConstants.CLASS_IN | DNSConstants.CLASS_UNIQUE,DNSConstants.DNS_TTL,info.text),0);
      logger.debug("String_Node_Str" + info);
      send(out);
      Thread.sleep(1000);
      send(out2);
      Thread.sleep(2000);
      send(out2);
    }
 catch (    Exception e) {
      logger.log(Level.WARNING,"String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
/** 
 * SC-Bonjour Implementation : Method used to update the corresponding DNS entry in the cache of JmDNS with the new information in this ServiceInfo. A call to getLocalService must first be issued to get the ServiceInfo object to be modified. THIS METHOD MUST BE USED INSTEAD OF ANY DIRECT ACCESS TO JMDNS' CACHE!! This is used in the implementation of Zeroconf in SIP Communicator to be able to change fields declared by the local contact (status, etc).
 * @param info Updated service data to be used to replace the oldstuff contained in JmDNS' cache
 * @param old info bytes
 */
public void updateInfos(ServiceInfo info,byte[] old){
  DNSOutgoing out, out2;
synchronized (JmDNS.this) {
    services.put(info.getQualifiedName().toLowerCase(),info);
  }
synchronized (info) {
    logger.debug("String_Node_Str" + info.getQualifiedName() + "String_Node_Str"+ info.getState());
    out=new DNSOutgoing(DNSConstants.FLAGS_RA | DNSConstants.FLAGS_AA);
    out2=new DNSOutgoing(DNSConstants.FLAGS_RA | DNSConstants.FLAGS_AA);
    try {
      out.addAnswer(new DNSRecord.Text(info.getQualifiedName(),DNSConstants.TYPE_TXT,DNSConstants.CLASS_IN,0,old),0);
      out.addAnswer(new DNSRecord.Text(info.getQualifiedName(),DNSConstants.TYPE_TXT,DNSConstants.CLASS_IN | DNSConstants.CLASS_UNIQUE,DNSConstants.DNS_TTL,info.text),0);
      out2.addAnswer(new DNSRecord.Text(info.getQualifiedName(),DNSConstants.TYPE_TXT,DNSConstants.CLASS_IN | DNSConstants.CLASS_UNIQUE,DNSConstants.DNS_TTL,info.text),0);
      logger.debug("String_Node_Str" + info);
      send(out);
      Thread.sleep(1000);
      send(out2);
      Thread.sleep(2000);
      send(out2);
    }
 catch (    Exception e) {
      logger.warn("String_Node_Str",e);
    }
  }
}