Program: 89495
Project: 89495
Buggy source:
/** 
 * Sets a list of regular expressions defining urls that should never be harvested from this domain. The list (after trimming the strings, and any empty strings have been removed) is copied to a list that is stored immutably.
 * @param regExps The list defining urls never to be harvested.
 * @param strictMode If true, we throw ArgumentNotValid exception if invalid regexps are found
 * @throws ArgumentNotValid if regExps is null or regExps contains invalid regular expressions (unless strictMode isfalse).
 */
public void setCrawlerTraps(List<String> regExps,boolean strictMode){
  ArgumentNotValid.checkNotNull(regExps,"String_Node_Str");
  List<String> cleanedListOfCrawlerTraps=new ArrayList<String>();
  for (  String crawlerTrap : regExps) {
    log.trace("String_Node_Str" + crawlerTrap + "String_Node_Str");
    String trimmedString=crawlerTrap.trim();
    log.trace("String_Node_Str" + trimmedString + "String_Node_Str");
    if (!(trimmedString.length() == 0)) {
      cleanedListOfCrawlerTraps.add(crawlerTrap);
    }
 else {
      log.trace("String_Node_Str");
    }
  }
  List<String> errMsgs=new ArrayList<String>();
  for (  String regexp : cleanedListOfCrawlerTraps) {
    boolean wellformed=false;
    try {
      Pattern.compile(regexp);
      wellformed=CrawlertrapsUtils.isCrawlertrapsWellformedXML(regexp);
      if (!wellformed) {
        errMsgs.add("String_Node_Str" + regexp + "String_Node_Str"+ "String_Node_Str");
      }
    }
 catch (    PatternSyntaxException e) {
      errMsgs.add("String_Node_Str" + regexp + "String_Node_Str"+ e.getDescription()+ "String_Node_Str");
    }
  }
  if (strictMode)   if (errMsgs.size() > 0) {
    throw new ArgumentNotValid(errMsgs.size() + "String_Node_Str" + StringUtils.conjoin("String_Node_Str",errMsgs));
  }
 else {
    log.warn(errMsgs.size() + "String_Node_Str" + StringUtils.conjoin("String_Node_Str",errMsgs));
  }
  crawlerTraps=Collections.unmodifiableList(cleanedListOfCrawlerTraps);
  if (!crawlerTraps.isEmpty()) {
    log.trace("String_Node_Str",domainName,crawlerTraps.size());
  }
}

Fixed version (ground truth):
/** 
 * Sets a list of regular expressions defining urls that should never be harvested from this domain. The list (after trimming the strings, and any empty strings have been removed) is copied to a list that is stored immutably.
 * @param regExps The list defining urls never to be harvested.
 * @param strictMode If true, we throw ArgumentNotValid exception if invalid regexps are found
 * @throws ArgumentNotValid if regExps is null or regExps contains invalid regular expressions (unless strictMode isfalse).
 */
public void setCrawlerTraps(List<String> regExps,boolean strictMode){
  ArgumentNotValid.checkNotNull(regExps,"String_Node_Str");
  List<String> cleanedListOfCrawlerTraps=new ArrayList<String>();
  for (  String crawlerTrap : regExps) {
    log.trace("String_Node_Str" + crawlerTrap + "String_Node_Str");
    String trimmedString=crawlerTrap.trim();
    log.trace("String_Node_Str" + trimmedString + "String_Node_Str");
    if (!(trimmedString.length() == 0)) {
      cleanedListOfCrawlerTraps.add(crawlerTrap);
    }
 else {
      log.trace("String_Node_Str");
    }
  }
  List<String> errMsgs=new ArrayList<String>();
  for (  String regexp : cleanedListOfCrawlerTraps) {
    boolean wellformed=false;
    try {
      Pattern.compile(regexp);
      wellformed=CrawlertrapsUtils.isCrawlertrapsWellformedXML(regexp);
      if (!wellformed) {
        errMsgs.add("String_Node_Str" + regexp + "String_Node_Str"+ "String_Node_Str");
      }
    }
 catch (    PatternSyntaxException e) {
      errMsgs.add("String_Node_Str" + regexp + "String_Node_Str"+ e.getDescription()+ "String_Node_Str");
    }
  }
  if (errMsgs.size() > 0) {
    if (strictMode) {
      throw new ArgumentNotValid(errMsgs.size() + "String_Node_Str" + StringUtils.conjoin("String_Node_Str",errMsgs));
    }
 else {
      log.warn(errMsgs.size() + "String_Node_Str" + StringUtils.conjoin("String_Node_Str",errMsgs));
    }
  }
  crawlerTraps=Collections.unmodifiableList(cleanedListOfCrawlerTraps);
  if (!crawlerTraps.isEmpty()) {
    log.trace("String_Node_Str",domainName,crawlerTraps.size());
  }
}