Program: 51974
Project: 51974
Buggy source:
/** 
 * Add the browse-title division.
 */
public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException {
  BrowseParams params=null;
  try {
    params=getUserParams();
  }
 catch (  ResourceNotFoundException e) {
    HttpServletResponse response=(HttpServletResponse)objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
    response.setStatus(HttpServletResponse.SC_NOT_FOUND);
  }
  BrowseInfo info=getBrowseInfo();
  String type=info.getBrowseIndex().getName();
  Division div=body.addDivision("String_Node_Str" + type,"String_Node_Str");
  div.setHead(getTitleMessage(info));
  addBrowseJumpNavigation(div,info,params);
  addBrowseControls(div,info,params);
  Division results=div.addDivision("String_Node_Str" + type + "String_Node_Str","String_Node_Str");
  int itemsTotal=info.getTotal();
  currentOffset=info.getOffset();
  if (itemsTotal > 0) {
    results.setSimplePagination(itemsTotal,browseInfo.getOverallPosition() + 1,browseInfo.getOverallPosition() + browseInfo.getResultCount(),getPreviousPageURL(params,info),getNextPageURL(params,info));
    ReferenceSet referenceSet=results.addReferenceSet("String_Node_Str" + type,ReferenceSet.TYPE_SUMMARY_LIST,type,null);
    if (isItemBrowse(info)) {
      for (      Item item : (java.util.List<Item>)info.getResults()) {
        referenceSet.addReference(item);
      }
    }
 else {
      Table singleTable=results.addTable("String_Node_Str" + type + "String_Node_Str",browseInfo.getResultCount() + 1,1);
      singleTable.addRow(Row.ROLE_HEADER).addCell().addContent(message("String_Node_Str" + type + "String_Node_Str"));
      for (      String[] singleEntry : browseInfo.getStringResults()) {
        Map<String,String> queryParams=new HashMap<String,String>();
        queryParams.put(BrowseParams.TYPE,encodeForURL(type));
        if (singleEntry[1] != null) {
          queryParams.put(BrowseParams.FILTER_VALUE[1],encodeForURL(singleEntry[1]));
        }
 else {
          queryParams.put(BrowseParams.FILTER_VALUE[0],encodeForURL(singleEntry[0]));
        }
        Cell cell=singleTable.addRow().addCell();
        cell.addXref(super.generateURL(BROWSE_URL_BASE,queryParams),singleEntry[0]);
        if (StringUtils.isNotEmpty(singleEntry[2])) {
          cell.addContent("String_Node_Str" + singleEntry[2] + "String_Node_Str");
        }
      }
    }
  }
 else {
    results.addPara(T_no_results);
  }
}

Fixed version (ground truth):
/** 
 * Add the browse-title division.
 */
public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException {
  BrowseParams params=null;
  try {
    params=getUserParams();
  }
 catch (  ResourceNotFoundException e) {
    HttpServletResponse response=(HttpServletResponse)objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
    response.setStatus(HttpServletResponse.SC_NOT_FOUND);
    return;
  }
  BrowseInfo info=getBrowseInfo();
  if (info == null) {
    HttpServletResponse response=(HttpServletResponse)objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
    response.setStatus(HttpServletResponse.SC_NOT_FOUND);
    return;
  }
  String type=info.getBrowseIndex().getName();
  Division div=body.addDivision("String_Node_Str" + type,"String_Node_Str");
  div.setHead(getTitleMessage(info));
  addBrowseJumpNavigation(div,info,params);
  addBrowseControls(div,info,params);
  Division results=div.addDivision("String_Node_Str" + type + "String_Node_Str","String_Node_Str");
  int itemsTotal=info.getTotal();
  currentOffset=info.getOffset();
  if (itemsTotal > 0) {
    results.setSimplePagination(itemsTotal,browseInfo.getOverallPosition() + 1,browseInfo.getOverallPosition() + browseInfo.getResultCount(),getPreviousPageURL(params,info),getNextPageURL(params,info));
    ReferenceSet referenceSet=results.addReferenceSet("String_Node_Str" + type,ReferenceSet.TYPE_SUMMARY_LIST,type,null);
    if (isItemBrowse(info)) {
      for (      Item item : (java.util.List<Item>)info.getResults()) {
        referenceSet.addReference(item);
      }
    }
 else {
      Table singleTable=results.addTable("String_Node_Str" + type + "String_Node_Str",browseInfo.getResultCount() + 1,1);
      singleTable.addRow(Row.ROLE_HEADER).addCell().addContent(message("String_Node_Str" + type + "String_Node_Str"));
      for (      String[] singleEntry : browseInfo.getStringResults()) {
        Map<String,String> queryParams=new HashMap<String,String>();
        queryParams.put(BrowseParams.TYPE,encodeForURL(type));
        if (singleEntry[1] != null) {
          queryParams.put(BrowseParams.FILTER_VALUE[1],encodeForURL(singleEntry[1]));
        }
 else {
          queryParams.put(BrowseParams.FILTER_VALUE[0],encodeForURL(singleEntry[0]));
        }
        Cell cell=singleTable.addRow().addCell();
        cell.addXref(super.generateURL(BROWSE_URL_BASE,queryParams),singleEntry[0]);
        if (StringUtils.isNotEmpty(singleEntry[2])) {
          cell.addContent("String_Node_Str" + singleEntry[2] + "String_Node_Str");
        }
      }
    }
  }
 else {
    results.addPara(T_no_results);
  }
}