Program: 52295
Project: 52295
Buggy source:
public void addBody(Body body) throws WingException, SQLException {
  int groupID=parameters.getParameterAsInteger("String_Node_Str",-1);
  String currentName=URLDecode(parameters.getParameter("String_Node_Str",null));
  if (currentName == null || currentName.length() == 0)   currentName=FlowGroupUtils.getName(context,groupID);
  Group group=null;
  if (groupID >= 0)   group=Group.find(context,groupID);
  Collection collection=null;
  if (group != null) {
    int collectionID=FlowGroupUtils.getCollectionId(group.getName());
    if (collectionID > -1)     collection=Collection.find(context,collectionID);
    if (collection == null)     collectionID=-1;
  }
  String memberGroupIDsString=parameters.getParameter("String_Node_Str",null);
  ArrayList<Integer> memberGroupIDs=new ArrayList<Integer>();
  if (memberGroupIDsString != null) {
    for (    String id : memberGroupIDsString.split("String_Node_Str")) {
      if (id.length() > 0)       memberGroupIDs.add(Integer.valueOf(id));
    }
  }
  String memberEPeopleIDsString=parameters.getParameter("String_Node_Str",null);
  ArrayList<Integer> memberEPeopleIDs=new ArrayList<Integer>();
  if (memberEPeopleIDsString != null) {
    for (    String id : memberEPeopleIDsString.split("String_Node_Str"))     if (id.length() > 0)     memberEPeopleIDs.add(Integer.valueOf(id));
  }
  int highlightEPersonID=parameters.getParameterAsInteger("String_Node_Str",-1);
  int highlightGroupID=parameters.getParameterAsInteger("String_Node_Str",-1);
  String query=URLDecode(parameters.getParameter("String_Node_Str",null));
  int page=parameters.getParameterAsInteger("String_Node_Str",0);
  String type=parameters.getParameter("String_Node_Str",null);
  String errorString=parameters.getParameter("String_Node_Str",null);
  ArrayList<String> errors=new ArrayList<String>();
  if (errorString != null)   for (  String error : errorString.split("String_Node_Str"))   errors.add(error);
  Division main=body.addInteractiveDivision("String_Node_Str",contextPath + "String_Node_Str",Division.METHOD_POST,"String_Node_Str");
  if (group == null)   main.setHead(T_main_head_new);
 else   main.setHead(T_main_head.parameterize(group.getName(),groupID));
  if (collection != null) {
    Para para=main.addPara();
    para.addContent(T_collection_para);
    para.addXref(contextPath + "String_Node_Str" + collection.getHandle(),collection.getMetadata("String_Node_Str"));
  }
  Division actions=main.addDivision("String_Node_Str");
  Para groupName=actions.addPara();
  groupName.addContent(T_label_name);
  Text groupText=groupName.addText("String_Node_Str");
  groupText.setValue(currentName);
  if (collection != null) {
    groupText.setDisabled();
    groupText.setHelp(T_label_instructions);
  }
 else   if (errors.contains("String_Node_Str") || errors.contains("String_Node_Str"))   groupText.addError("String_Node_Str");
  Para searchBoxes=actions.addPara();
  searchBoxes.addContent(T_label_search);
  Text queryField=searchBoxes.addText("String_Node_Str");
  queryField.setValue(query);
  queryField.setSize(15);
  searchBoxes.addButton("String_Node_Str").setValue(T_submit_search_people);
  searchBoxes.addButton("String_Node_Str").setValue(T_submit_search_groups);
  if (query != null) {
    if ("String_Node_Str".equals(type)) {
      searchBoxes.addButton("String_Node_Str").setValue(T_submit_clear);
      addEPeopleSearch(main,query,page,group,memberEPeopleIDs);
    }
 else     if ("String_Node_Str".equals(type)) {
      searchBoxes.addButton("String_Node_Str").setValue(T_submit_clear);
      addGroupSearch(main,group,query,page,group,memberGroupIDs);
    }
  }
  boolean changes=false;
  if (group != null)   changes=addMemberList(main,group,memberGroupIDs,memberEPeopleIDs,highlightEPersonID,highlightGroupID);
  Para buttons=main.addPara();
  buttons.addButton("String_Node_Str").setValue(T_submit_save);
  buttons.addButton("String_Node_Str").setValue(T_submit_cancel);
  if (changes)   main.addPara().addHighlight("String_Node_Str").addContent("String_Node_Str");
  main.addHidden("String_Node_Str").setValue(knot.getId());
}

Fixed version (ground truth):
public void addBody(Body body) throws WingException, SQLException {
  int groupID=parameters.getParameterAsInteger("String_Node_Str",-1);
  String currentName=URLDecode(parameters.getParameter("String_Node_Str",null));
  if (currentName == null || currentName.length() == 0)   currentName=FlowGroupUtils.getName(context,groupID);
  Group group=null;
  if (groupID >= 0)   group=Group.find(context,groupID);
  Collection collection=null;
  if (group != null) {
    int collectionID=FlowGroupUtils.getCollectionId(group.getName());
    if (collectionID > -1)     collection=Collection.find(context,collectionID);
    if (collection == null)     collectionID=-1;
  }
  String memberGroupIDsString=parameters.getParameter("String_Node_Str",null);
  ArrayList<Integer> memberGroupIDs=new ArrayList<Integer>();
  if (memberGroupIDsString != null) {
    for (    String id : memberGroupIDsString.split("String_Node_Str")) {
      if (id.length() > 0)       memberGroupIDs.add(Integer.valueOf(id));
    }
  }
  String memberEPeopleIDsString=parameters.getParameter("String_Node_Str",null);
  ArrayList<Integer> memberEPeopleIDs=new ArrayList<Integer>();
  if (memberEPeopleIDsString != null) {
    for (    String id : memberEPeopleIDsString.split("String_Node_Str"))     if (id.length() > 0)     memberEPeopleIDs.add(Integer.valueOf(id));
  }
  int highlightEPersonID=parameters.getParameterAsInteger("String_Node_Str",-1);
  int highlightGroupID=parameters.getParameterAsInteger("String_Node_Str",-1);
  String query=URLDecode(parameters.getParameter("String_Node_Str",null));
  int page=parameters.getParameterAsInteger("String_Node_Str",0);
  String type=parameters.getParameter("String_Node_Str",null);
  String errorString=parameters.getParameter("String_Node_Str",null);
  ArrayList<String> errors=new ArrayList<String>();
  if (errorString != null)   for (  String error : errorString.split("String_Node_Str"))   errors.add(error);
  Division main=body.addInteractiveDivision("String_Node_Str",contextPath + "String_Node_Str",Division.METHOD_POST,"String_Node_Str");
  if (group == null)   main.setHead(T_main_head_new);
 else   main.setHead(T_main_head.parameterize(group.getName(),groupID));
  if (collection != null) {
    Para para=main.addPara();
    para.addContent(T_collection_para);
    para.addXref(contextPath + "String_Node_Str" + collection.getHandle(),collection.getMetadata("String_Node_Str"));
  }
  Division actions=main.addDivision("String_Node_Str");
  Para groupName=actions.addPara();
  groupName.addContent(T_label_name);
  Text groupText=groupName.addText("String_Node_Str");
  groupText.setValue(currentName);
  if (collection != null) {
    groupText.setDisabled();
    groupText.setHelp(T_label_instructions);
  }
 else   if (errors.contains("String_Node_Str") || errors.contains("String_Node_Str"))   groupText.addError("String_Node_Str");
  Para searchBoxes=actions.addPara();
  searchBoxes.addContent(T_label_search);
  Text queryField=searchBoxes.addText("String_Node_Str");
  queryField.setValue(query);
  queryField.setSize(15);
  searchBoxes.addButton("String_Node_Str").setValue(T_submit_search_people);
  searchBoxes.addButton("String_Node_Str").setValue(T_submit_search_groups);
  if (query != null) {
    if ("String_Node_Str".equals(type)) {
      searchBoxes.addButton("String_Node_Str").setValue(T_submit_clear);
      addEPeopleSearch(main,query,page,group,memberEPeopleIDs);
    }
 else     if ("String_Node_Str".equals(type)) {
      searchBoxes.addButton("String_Node_Str").setValue(T_submit_clear);
      addGroupSearch(main,group,query,page,group,memberGroupIDs);
    }
  }
  boolean changes=false;
  if (group != null)   changes=addMemberList(main,group,memberGroupIDs,memberEPeopleIDs,highlightEPersonID,highlightGroupID);
  Para buttons=main.addPara();
  buttons.addButton("String_Node_Str").setValue(T_submit_save);
  buttons.addButton("String_Node_Str").setValue(T_submit_cancel);
  if (changes)   main.addPara().addHighlight("String_Node_Str").addContent(T_pending_warn);
  main.addHidden("String_Node_Str").setValue(knot.getId());
}