Program: 153292
Project: 153292
Buggy source:
/** 
 * The exclude parameter works in this form: &exclude=repeat_region&exclude=gene but not this form : &exclude[]=repeat_region&exclude[]=gene which JQuery would typically send. I think we can resolve this by setting  jQuery.ajaxSettings.traditional = true; or $.ajaxSetup({ traditional: true });  in Web-Artemis.
 * @param region
 * @param start
 * @param end
 * @param exclude
 * @return
 * @throws CrawlException
 */
@RequestMapping(method=RequestMethod.GET,value={"String_Node_Str","String_Node_Str"}) @ResourceDescription("String_Node_Str") public List<LocatedFeature> locations(@RequestParam("String_Node_Str") String region,@RequestParam(value="String_Node_Str",required=false) Integer start,@RequestParam(value="String_Node_Str",required=false) Integer end,@RequestParam(value="String_Node_Str",defaultValue="String_Node_Str") Boolean exclude,@RequestParam(value="String_Node_Str",required=false) @ResourceDescription("String_Node_Str") List<String> types) throws CrawlException {
  if (exclude == null)   exclude=true;
  if (start == null)   start=0;
  if (end == null)   end=regionsMapper.sequence(region).dna.length();
  Set<String> geneTypes=new HashSet<String>();
  if (types != null) {
    geneTypes.addAll(types);
  }
  if (!geneTypes.contains("String_Node_Str")) {
    geneTypes.add("String_Node_Str");
  }
  if (!geneTypes.contains("String_Node_Str")) {
    geneTypes.add("String_Node_Str");
  }
  logger.info(String.format("String_Node_Str",region,start,end,exclude));
  logger.info("String_Node_Str" + geneTypes);
  int actualStart=start;
  int actualEnd=end;
  LocationBoundaries expandedBoundaries=regionsMapper.locationsMinAndMaxBoundaries(region,start,end,exclude,new ArrayList<String>(geneTypes));
  if (expandedBoundaries != null) {
    if (expandedBoundaries.start != null && expandedBoundaries.start < start) {
      actualStart=expandedBoundaries.start;
    }
    if (expandedBoundaries.end != null && expandedBoundaries.end > end) {
      actualEnd=expandedBoundaries.end;
    }
  }
  logger.debug(String.format("String_Node_Str",region,actualStart,actualEnd,exclude));
  return regionsMapper.locations(region,actualStart,actualEnd,exclude,new ArrayList<String>(geneTypes));
}

Fixed version (ground truth):
/** 
 * The exclude parameter works in this form: &exclude=repeat_region&exclude=gene but not this form : &exclude[]=repeat_region&exclude[]=gene which JQuery would typically send. I think we can resolve this by setting  jQuery.ajaxSettings.traditional = true; or $.ajaxSetup({ traditional: true });  in Web-Artemis.
 * @param region
 * @param start
 * @param end
 * @param exclude
 * @return
 * @throws CrawlException
 */
@RequestMapping(method=RequestMethod.GET,value={"String_Node_Str","String_Node_Str"}) @ResourceDescription("String_Node_Str") public List<LocatedFeature> locations(@RequestParam("String_Node_Str") String region,@RequestParam(value="String_Node_Str",required=false) Integer start,@RequestParam(value="String_Node_Str",required=false) Integer end,@RequestParam(value="String_Node_Str") Boolean exclude,@RequestParam(value="String_Node_Str",required=false) @ResourceDescription("String_Node_Str") List<String> types) throws CrawlException {
  if (exclude == null)   exclude=true;
  if (start == null)   start=0;
  if (end == null)   end=regionsMapper.sequence(region).dna.length();
  Set<String> geneTypes=new HashSet<String>();
  if (types != null) {
    geneTypes.addAll(types);
  }
  Set<String> boundaryTypes=new HashSet<String>(geneTypes);
  if (exclude) {
    boundaryTypes.remove("String_Node_Str");
    boundaryTypes.remove("String_Node_Str");
  }
 else {
    boundaryTypes.add("String_Node_Str");
    boundaryTypes.add("String_Node_Str");
  }
  logger.info(String.format("String_Node_Str",region,start,end,exclude));
  logger.info("String_Node_Str" + geneTypes);
  int actualStart=start;
  int actualEnd=end;
  LocationBoundaries expandedBoundaries=regionsMapper.locationsMinAndMaxBoundaries(region,start,end,exclude,new ArrayList<String>(boundaryTypes));
  logger.debug(expandedBoundaries.start);
  logger.debug(expandedBoundaries.end);
  if (expandedBoundaries != null) {
    if (expandedBoundaries.start != null && expandedBoundaries.start < start) {
      actualStart=expandedBoundaries.start;
    }
    if (expandedBoundaries.end != null && expandedBoundaries.end > end) {
      actualEnd=expandedBoundaries.end;
    }
  }
  logger.debug(String.format("String_Node_Str",region,actualStart,actualEnd,exclude));
  return regionsMapper.locations(region,actualStart,actualEnd,exclude,new ArrayList<String>(geneTypes));
}