Program: 4216
Project: 4216
Buggy source:
private ContactsScrubber(Context context,Contact sender,Collection<? extends Contact> nodes,float requiredRatio){
  assert(!nodes.isEmpty());
  assert(requiredRatio >= 0f && requiredRatio <= 1f);
  this.nodes=nodes;
  this.scrubbed=new LinkedHashMap<KUID,Contact>(nodes.size());
  this.collisions=new LinkedHashSet<Contact>(1);
  SameClassFilter filter=new SameClassFilter(sender);
  boolean containsLocal=false;
  for (  Contact node : nodes) {
    if (!ContactUtils.isValidSocketAddress(node)) {
      if (LOG.isInfoEnabled()) {
        LOG.info(sender + "String_Node_Str" + node);
      }
      continue;
    }
    if (ContactUtils.isPrivateAddress(node)) {
      if (LOG.isInfoEnabled()) {
        if (ContactUtils.isSameNodeID(sender,node)) {
          LOG.info(sender + "String_Node_Str");
        }
 else {
          LOG.info(sender + "String_Node_Str" + node);
        }
      }
      continue;
    }
    if (!ContactUtils.isSameNodeID(sender,node) && NetworkSettings.FILTER_CLASS_C.getValue() && filter.isSameNetwork(node)) {
      if (LOG.isInfoEnabled()) {
        LOG.info(sender + "String_Node_Str" + node);
      }
      continue;
    }
    if (!ContactUtils.isSameAddressSpace(context.getLocalNode(),node)) {
      if (LOG.isInfoEnabled()) {
        LOG.info(node + "String_Node_Str");
      }
      continue;
    }
    if (ContactUtils.isCollision(context,node)) {
      if (LOG.isInfoEnabled()) {
        LOG.info(node + "String_Node_Str" + context.getLocalNode());
      }
      collisions.add(node);
      continue;
    }
    if (ContactUtils.isLocalContact(context,node)) {
      if (LOG.isInfoEnabled()) {
        LOG.info("String_Node_Str");
      }
      containsLocal=true;
      continue;
    }
    scrubbed.put(node.getNodeID(),node);
  }
  if (requiredRatio > 0f) {
    int total=scrubbed.size() + collisions.size();
    if (containsLocal) {
      total++;
    }
    float ratio=(float)total / nodes.size();
    this.isValidResponse=(ratio >= requiredRatio);
  }
 else {
    this.isValidResponse=true;
  }
}

Fixed version (ground truth):
private ContactsScrubber(Context context,Contact sender,Collection<? extends Contact> nodes,float requiredRatio){
  assert(!nodes.isEmpty());
  assert(requiredRatio >= 0f && requiredRatio <= 1f);
  this.nodes=nodes;
  this.scrubbed=new LinkedHashMap<KUID,Contact>(nodes.size());
  this.collisions=new LinkedHashSet<Contact>(1);
  Contact localNode=context.getLocalNode();
  SameClassFilter filter=new SameClassFilter(sender);
  boolean containsLocal=false;
  for (  Contact node : nodes) {
    if (!ContactUtils.isValidSocketAddress(node)) {
      if (LOG.isInfoEnabled()) {
        LOG.info(sender + "String_Node_Str" + node);
      }
      continue;
    }
    if (ContactUtils.isPrivateAddress(node)) {
      if (LOG.isInfoEnabled()) {
        if (ContactUtils.isSameNodeID(sender,node)) {
          LOG.info(sender + "String_Node_Str");
        }
 else {
          LOG.info(sender + "String_Node_Str" + node);
        }
      }
      continue;
    }
    if (!ContactUtils.isSameAddressSpace(localNode,node)) {
      if (LOG.isInfoEnabled()) {
        LOG.info(node + "String_Node_Str");
      }
      continue;
    }
    if (NetworkSettings.DROP_PUBLIC_IPV4_COMPATIBLE_ADDRESSES.getValue() && ContactUtils.isIPv4CompatibleAddress(node)) {
      if (LOG.isInfoEnabled()) {
        LOG.info(node + "String_Node_Str");
      }
      continue;
    }
    if (NetworkSettings.DROP_PRIVATE_IPV4_COMPATIBLE_ADDRESSES.getValue() && ContactUtils.isPrivateIPv4CompatibleAddress(node)) {
      if (LOG.isInfoEnabled()) {
        LOG.info(node + "String_Node_Str");
      }
      continue;
    }
    if (NetworkSettings.FILTER_CLASS_C.getValue() && ContactUtils.isIPv4Address(node) && !ContactUtils.isSameNodeID(sender,node)&& filter.isSameNetwork(node)) {
      if (LOG.isInfoEnabled()) {
        LOG.info(sender + "String_Node_Str" + node);
      }
      continue;
    }
    if (ContactUtils.isCollision(context,node)) {
      if (LOG.isInfoEnabled()) {
        LOG.info(node + "String_Node_Str" + context.getLocalNode());
      }
      collisions.add(node);
      continue;
    }
    if (ContactUtils.isLocalContact(context,node)) {
      if (LOG.isInfoEnabled()) {
        LOG.info("String_Node_Str");
      }
      containsLocal=true;
      continue;
    }
    scrubbed.put(node.getNodeID(),node);
  }
  if (requiredRatio > 0f) {
    int total=scrubbed.size() + collisions.size();
    if (containsLocal) {
      total++;
    }
    float ratio=(float)total / nodes.size();
    this.isValidResponse=(ratio >= requiredRatio);
  }
 else {
    this.isValidResponse=true;
  }
}