Program: 49496
Project: 49496
Buggy source:
public Set<ProductContent> filterContentByContentArch(Set<ProductContent> pcSet,Consumer consumer,Product product){
  Set<ProductContent> filtered=new HashSet<ProductContent>();
  boolean enabledContentArchFiltering=true;
  if (!enabledContentArchFiltering) {
    return pcSet;
  }
  String consumerArch=consumer.getFact(ARCH_FACT);
  log.debug("String_Node_Str" + consumerArch);
  if (consumerArch == null) {
    log.debug("String_Node_Str" + consumer.getId() + "String_Node_Str"+ ARCH_FACT+ "String_Node_Str");
    log.debug("String_Node_Str");
    return pcSet;
  }
  for (  ProductContent pc : pcSet) {
    boolean canUse=false;
    Set<String> contentArches=Arch.parseArches(pc.getContent().getArches());
    Set<String> productArches=Arch.parseArches(product.getAttributeValue(PRODUCT_ARCH_ATTR));
    log.debug("String_Node_Str" + pc.getContent().getLabel());
    log.debug("String_Node_Str" + contentArches);
    log.debug("String_Node_Str" + productArches);
    if (contentArches.isEmpty()) {
      log.debug("String_Node_Str" + pc.getContent().getLabel() + "String_Node_Str");
      contentArches.addAll(productArches);
      log.debug("String_Node_Str" + product.toString());
      log.debug("String_Node_Str" + productArches.toString());
    }
    for (    String contentArch : contentArches) {
      log.debug("String_Node_Str" + consumerArch + "String_Node_Str"+ contentArch);
      log.debug("String_Node_Str" + Arch.contentForConsumer(contentArch,consumerArch));
      if (Arch.contentForConsumer(contentArch,consumerArch)) {
        log.debug("String_Node_Str" + pc.getContent().getLabel() + "String_Node_Str"+ contentArch);
        canUse=true;
      }
 else {
        log.debug("String_Node_Str" + pc.getContent().getLabel() + "String_Node_Str"+ contentArch);
      }
      canUse=true;
    }
    if (canUse) {
      filtered.add(pc);
      log.debug("String_Node_Str" + pc.getContent().getLabel());
    }
 else {
      log.debug("String_Node_Str" + pc.getContent().getLabel());
    }
  }
  log.debug("String_Node_Str" + consumerArch + "String_Node_Str");
  for (  ProductContent apc : filtered) {
    log.debug("String_Node_Str" + apc.toString());
  }
  return filtered;
}

Fixed version (ground truth):
public Set<ProductContent> filterContentByContentArch(Set<ProductContent> pcSet,Consumer consumer,Product product){
  Set<ProductContent> filtered=new HashSet<ProductContent>();
  boolean enabledContentArchFiltering=true;
  if (!enabledContentArchFiltering) {
    return pcSet;
  }
  String consumerArch=consumer.getFact(ARCH_FACT);
  log.debug("String_Node_Str" + consumerArch);
  if (consumerArch == null) {
    log.debug("String_Node_Str" + consumer.getId() + "String_Node_Str"+ ARCH_FACT+ "String_Node_Str");
    log.debug("String_Node_Str");
    return pcSet;
  }
  for (  ProductContent pc : pcSet) {
    boolean canUse=false;
    Set<String> contentArches=Arch.parseArches(pc.getContent().getArches());
    Set<String> productArches=Arch.parseArches(product.getAttributeValue(PRODUCT_ARCH_ATTR));
    log.debug("String_Node_Str" + pc.getContent().getLabel());
    log.debug("String_Node_Str" + contentArches);
    log.debug("String_Node_Str" + productArches);
    if (contentArches.isEmpty()) {
      log.debug("String_Node_Str" + pc.getContent().getLabel() + "String_Node_Str");
      contentArches.addAll(productArches);
      log.debug("String_Node_Str" + product.toString());
      log.debug("String_Node_Str" + productArches.toString());
    }
    for (    String contentArch : contentArches) {
      log.debug("String_Node_Str" + consumerArch + "String_Node_Str"+ contentArch);
      log.debug("String_Node_Str" + Arch.contentForConsumer(contentArch,consumerArch));
      if (Arch.contentForConsumer(contentArch,consumerArch)) {
        log.debug("String_Node_Str" + pc.getContent().getLabel() + "String_Node_Str"+ contentArch);
        canUse=true;
      }
 else {
        log.debug("String_Node_Str" + pc.getContent().getLabel() + "String_Node_Str"+ contentArch);
      }
    }
    if (canUse) {
      filtered.add(pc);
      log.debug("String_Node_Str" + pc.getContent().getLabel());
    }
 else {
      log.debug("String_Node_Str" + pc.getContent().getLabel());
    }
  }
  log.debug("String_Node_Str" + consumerArch + "String_Node_Str");
  for (  ProductContent apc : filtered) {
    log.debug("String_Node_Str" + apc.toString());
  }
  return filtered;
}