Program: 3396
Project: 3396
Buggy source:
/** 
 * Makes the jump-list navigation for the results
 * @param div
 * @param info
 * @param params
 * @throws WingException
 */
private void addBrowseJumpNavigation(Division div,BrowseInfo info,BrowseParams params) throws WingException {
  String type=info.getBrowseIndex().getName();
  Map<String,String> queryParams=new HashMap<String,String>();
  queryParams.putAll(params.getCommonParameters());
  queryParams.putAll(params.getControlParameters());
  Division jump=div.addInteractiveDivision("String_Node_Str",WITHDRAWN_URL_BASE,Division.METHOD_POST,"String_Node_Str");
  for (  String key : queryParams.keySet())   jump.addHidden(key).setValue(queryParams.get(key));
  if (isSortedByDate(info)) {
    Para jumpForm=jump.addPara();
    jumpForm.addContent(T_jump_select);
    Select month=jumpForm.addSelect(BrowseParams.MONTH);
    month.addOption(false,"String_Node_Str",T_choose_month);
    for (int i=1; i <= 12; i++) {
      month.addOption(false,String.valueOf(i),DCDate.getMonthName(i,Locale.getDefault()));
    }
    Select year=jumpForm.addSelect(BrowseParams.YEAR);
    year.addOption(false,"String_Node_Str",T_choose_year);
    int currentYear=DCDate.getCurrent().getYear();
    int i=currentYear;
    int oneYearBreak=((currentYear - ONE_YEAR_LIMIT) / 5) * 5;
    int fiveYearBreak=((currentYear - FIVE_YEAR_LIMIT) / 10) * 10;
    int tenYearBreak=(currentYear - TEN_YEAR_LIMIT);
    do {
      year.addOption(false,String.valueOf(i),String.valueOf(i));
      if (i <= fiveYearBreak)       i-=10;
 else       if (i <= oneYearBreak)       i-=5;
 else       i--;
    }
 while (i > tenYearBreak);
    jumpForm=jump.addPara();
    jumpForm.addContent(T_jump_year);
    jumpForm.addText("String_Node_Str").setHelp(T_jump_year_help);
    jumpForm.addButton("String_Node_Str").setValue(T_go);
  }
 else {
    List jumpList=jump.addList("String_Node_Str",List.TYPE_SIMPLE,"String_Node_Str");
    for (char c='A'; c <= 'Z'; c++) {
      Map<String,String> cQuery=new HashMap<String,String>(queryParams);
      cQuery.put(BrowseParams.STARTS_WITH,Character.toString(c));
      jumpList.addItemXref(super.generateURL(WITHDRAWN_URL_BASE,cQuery),Character.toString(c));
    }
    Para jumpForm=jump.addPara();
    jumpForm.addContent(T_starts_with);
    jumpForm.addText(BrowseParams.STARTS_WITH).setHelp(T_starts_with_help);
    jumpForm.addButton("String_Node_Str").setValue(T_go);
  }
}

Fixed version (ground truth):
/** 
 * Makes the jump-list navigation for the results
 * @param div
 * @param info
 * @param params
 * @throws WingException
 */
private void addBrowseJumpNavigation(Division div,BrowseInfo info,BrowseParams params) throws WingException {
  String type=info.getBrowseIndex().getName();
  Map<String,String> queryParams=new HashMap<String,String>();
  queryParams.putAll(params.getCommonParameters());
  queryParams.putAll(params.getControlParameters());
  Division jump=div.addInteractiveDivision("String_Node_Str",WITHDRAWN_URL_BASE,Division.METHOD_POST,"String_Node_Str");
  for (  String key : queryParams.keySet())   jump.addHidden(key).setValue(queryParams.get(key));
  if (isSortedByDate(info)) {
    Para jumpForm=jump.addPara();
    jumpForm.addContent(T_jump_select);
    Select month=jumpForm.addSelect(BrowseParams.MONTH);
    month.addOption(false,"String_Node_Str",T_choose_month);
    for (int i=1; i <= 12; i++) {
      month.addOption(false,String.valueOf(i),DCDate.getMonthName(i,Locale.getDefault()));
    }
    Select year=jumpForm.addSelect(BrowseParams.YEAR);
    year.addOption(false,"String_Node_Str",T_choose_year);
    int currentYear=DCDate.getCurrent().getYear();
    int i=currentYear;
    int oneYearBreak=((currentYear - ONE_YEAR_LIMIT) / 5) * 5;
    int fiveYearBreak=((currentYear - FIVE_YEAR_LIMIT) / 10) * 10;
    int tenYearBreak=(currentYear - TEN_YEAR_LIMIT);
    do {
      year.addOption(false,String.valueOf(i),String.valueOf(i));
      if (i <= fiveYearBreak)       i-=10;
 else       if (i <= oneYearBreak)       i-=5;
 else       i--;
    }
 while (i > tenYearBreak);
    jumpForm=jump.addPara();
    jumpForm.addContent(T_jump_year);
    jumpForm.addText(BrowseParams.STARTS_WITH).setHelp(T_jump_year_help);
    jumpForm.addButton("String_Node_Str").setValue(T_go);
  }
 else {
    List jumpList=jump.addList("String_Node_Str",List.TYPE_SIMPLE,"String_Node_Str");
    for (char c='A'; c <= 'Z'; c++) {
      Map<String,String> cQuery=new HashMap<String,String>(queryParams);
      cQuery.put(BrowseParams.STARTS_WITH,Character.toString(c));
      jumpList.addItemXref(super.generateURL(WITHDRAWN_URL_BASE,cQuery),Character.toString(c));
    }
    Para jumpForm=jump.addPara();
    jumpForm.addContent(T_starts_with);
    jumpForm.addText(BrowseParams.STARTS_WITH).setHelp(T_starts_with_help);
    jumpForm.addButton("String_Node_Str").setValue(T_go);
  }
}