Program: 113545
Project: 113545
Buggy source:
/** 
 * Executes one Vivaldi iteration. For each of these iterations, the algorithm chooses one random node from the list of known OSDs and sends it a Vivaldi request, to recalculate then the position of the OSD using the received information.
 */
private void iterateVivaldi(){
  if (vivaldiIterations % ITERATIONS_BEFORE_UPDATING == 1) {
    updateKnownOSDs();
  }
  if ((knownOSDs != null) && (!knownOSDs.isEmpty())) {
    if (sentRetries.size() > 0) {
      for (      InetSocketAddress addr : sentRetries.keySet()) {
        if (!sentRetries.get(addr).hasBeenRetried()) {
          if (Logging.isInfo())           Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + addr.getHostName());
          sendVivaldiRequest(addr,vNode.getCoordinates());
          sentRetries.get(addr).setRetried(true);
        }
      }
    }
 else {
      int chosenIndex=(int)(Math.random() * knownOSDs.size());
      Service chosenService=knownOSDs.get(chosenIndex);
      try {
        ServiceUUID sUUID=new ServiceUUID(chosenService.getUuid());
        sUUID.resolve();
        if (Logging.isInfo())         Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + chosenService.getUuid());
        sendVivaldiRequest(sUUID.getAddress(),vNode.getCoordinates());
      }
 catch (      UnknownUUIDException unke) {
        Logging.logMessage(Logging.LEVEL_ERROR,this,"String_Node_Str" + chosenService.getUuid());
      }
catch (      Exception e) {
        Logging.logMessage(Logging.LEVEL_ERROR,this,"String_Node_Str");
      }
    }
  }
  vivaldiIterations=(vivaldiIterations + 1) % Long.MAX_VALUE;
}

Fixed version (ground truth):
/** 
 * Executes one Vivaldi iteration. For each of these iterations, the algorithm chooses one random node from the list of known OSDs and sends it a Vivaldi request, to recalculate then the position of the OSD using the received information.
 */
private void iterateVivaldi(){
  if (vivaldiIterations % ITERATIONS_BEFORE_UPDATING == 1) {
    updateKnownOSDs();
  }
  if ((knownOSDs != null) && (!knownOSDs.isEmpty())) {
    if (sentRetries.size() > 0) {
      for (      InetSocketAddress addr : sentRetries.keySet()) {
        if (!sentRetries.get(addr).hasBeenRetried()) {
          if (Logging.isDebug())           Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + addr.getHostName());
          sendVivaldiRequest(addr,vNode.getCoordinates());
          sentRetries.get(addr).setRetried(true);
        }
      }
    }
 else {
      int chosenIndex=(int)(Math.random() * knownOSDs.size());
      Service chosenService=knownOSDs.get(chosenIndex);
      try {
        ServiceUUID sUUID=new ServiceUUID(chosenService.getUuid());
        sUUID.resolve();
        if (Logging.isDebug())         Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + chosenService.getUuid());
        sendVivaldiRequest(sUUID.getAddress(),vNode.getCoordinates());
      }
 catch (      UnknownUUIDException unke) {
        Logging.logMessage(Logging.LEVEL_ERROR,this,"String_Node_Str" + chosenService.getUuid());
      }
catch (      Exception e) {
        Logging.logMessage(Logging.LEVEL_ERROR,this,"String_Node_Str");
      }
    }
  }
  vivaldiIterations=(vivaldiIterations + 1) % Long.MAX_VALUE;
}