Program: 172303
Project: 172303
Buggy source:
/** 
 * Checks to see if a copy exists in the executed rules list
 * @param executedRules
 * @param actionedUponNodeRef
 * @param rule
 * @return
 */
private boolean checkForCopy(Set<ExecutedRuleData> executedRules,NodeRef actionedUponNodeRef,Rule rule){
  boolean result=true;
  if (this.nodeService.hasAspect(actionedUponNodeRef,ContentModel.ASPECT_COPIEDFROM) == true) {
    if (logger.isDebugEnabled() == true) {
      logger.debug("String_Node_Str" + actionedUponNodeRef.getId() + "String_Node_Str");
    }
    NodeRef copiedFrom=(NodeRef)this.nodeService.getProperty(actionedUponNodeRef,ContentModel.PROP_COPY_REFERENCE);
    if (logger.isDebugEnabled() == true && copiedFrom != null) {
      logger.debug("String_Node_Str" + copiedFrom.getId() + "String_Node_Str");
    }
    ;
    if (copiedFrom != null && executedRules.contains(new ExecutedRuleData(copiedFrom,rule)) == true) {
      if (logger.isDebugEnabled() == true) {
        logger.debug("String_Node_Str" + rule.getTitle() + "String_Node_Str"+ copiedFrom.getId()+ "String_Node_Str");
      }
      return false;
    }
 else {
      if (logger.isDebugEnabled() == true) {
        logger.debug("String_Node_Str" + rule.getTitle() + "String_Node_Str"+ actionedUponNodeRef.getId()+ "String_Node_Str");
        logger.debug("String_Node_Str");
      }
      result=checkForCopy(executedRules,copiedFrom,rule);
    }
  }
 else {
    if (logger.isDebugEnabled() == true) {
      logger.debug("String_Node_Str" + rule.getTitle() + "String_Node_Str"+ actionedUponNodeRef.getId()+ "String_Node_Str");
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Checks to see if a copy exists in the executed rules list
 * @param executedRules
 * @param actionedUponNodeRef
 * @param rule
 * @return
 */
private boolean checkForCopy(Set<ExecutedRuleData> executedRules,NodeRef actionedUponNodeRef,Rule rule){
  boolean result=true;
  if (this.nodeService.exists(actionedUponNodeRef) == true && this.nodeService.hasAspect(actionedUponNodeRef,ContentModel.ASPECT_COPIEDFROM) == true) {
    if (logger.isDebugEnabled() == true) {
      logger.debug("String_Node_Str" + actionedUponNodeRef.getId() + "String_Node_Str");
    }
    NodeRef copiedFrom=(NodeRef)this.nodeService.getProperty(actionedUponNodeRef,ContentModel.PROP_COPY_REFERENCE);
    if (logger.isDebugEnabled() == true && copiedFrom != null) {
      logger.debug("String_Node_Str" + copiedFrom.getId() + "String_Node_Str");
    }
    ;
    if (copiedFrom != null && executedRules.contains(new ExecutedRuleData(copiedFrom,rule)) == true) {
      if (logger.isDebugEnabled() == true) {
        logger.debug("String_Node_Str" + rule.getTitle() + "String_Node_Str"+ copiedFrom.getId()+ "String_Node_Str");
      }
      return false;
    }
 else {
      if (logger.isDebugEnabled() == true) {
        logger.debug("String_Node_Str" + rule.getTitle() + "String_Node_Str"+ actionedUponNodeRef.getId()+ "String_Node_Str");
        logger.debug("String_Node_Str");
      }
      result=checkForCopy(executedRules,copiedFrom,rule);
    }
  }
 else {
    if (logger.isDebugEnabled() == true) {
      logger.debug("String_Node_Str" + rule.getTitle() + "String_Node_Str"+ actionedUponNodeRef.getId()+ "String_Node_Str");
    }
  }
  return result;
}