Program: 52166
Project: 52166
Buggy source:
public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException {
  String handle=parameters.getParameter("String_Node_Str",null);
  Division main=body.addInteractiveDivision("String_Node_Str",contextPath + "String_Node_Str",Division.METHOD_POST,"String_Node_Str");
  main.setHead(T_main_head.parameterize(handle));
  Request request=ObjectModelHelper.getRequest(objectModel);
  ServiceDocument serviceDoc=(ServiceDocument)request.getAttribute("String_Node_Str");
  java.util.List<Collection> collections=ServiceDocumentHelper.getCollections(serviceDoc);
  List collectionsList=main.addList("String_Node_Str",List.TYPE_SIMPLE);
  for (  Collection collection : collections) {
    List collectionList=collectionsList.addList(collection + "String_Node_Str",List.TYPE_FORM);
    collectionList.setHead(T_collection_head.parameterize(collection.getLocation()));
    List paramsList=collectionList.addList(collection + "String_Node_Str",List.TYPE_BULLETED);
    paramsList.addItem().addContent(T_collection_title.parameterize(collection.getTitle()));
    paramsList.addItem().addContent(T_collection_policy.parameterize(collection.getCollectionPolicy()));
    paramsList.addItem().addContent(T_collection_mediation.parameterize(Boolean.toString(collection.getMediation())));
    String[] fileTypes=collection.getAccepts();
    String fileTypesString=arrayToString(fileTypes);
    paramsList.addItem().addContent(T_collection_file_types.parameterize(fileTypesString));
    String[] packageFormats=ServiceDocumentHelper.getPackageFormats(collection);
    String packageFormatsString=arrayToString(packageFormats);
    paramsList.addItem().addContent(T_collection_package_formats.parameterize(packageFormatsString));
    if ((fileTypes.length > 0) && (packageFormats.length > 0)) {
      collectionList.addItem().addHidden("String_Node_Str").setValue(collection.getLocation());
      collectionList.addItem().addButton("String_Node_Str").setValue(T_collection_deposit_button);
    }
    if ((collection.getService() != null) && (collection.getService().length() > 0)) {
      collectionList.addItem().addContent(T_sub_service_target + collection.getService());
      collectionList.addItem().addHidden("String_Node_Str").setValue(collection.getService());
      collectionList.addItem().addButton("String_Node_Str").setValue(T_sub_service_target_button);
    }
  }
  Para buttonList=main.addPara();
  buttonList.addButton("String_Node_Str").setValue(T_submit_cancel);
  main.addHidden("String_Node_Str").setValue(knot.getId());
}

Fixed version (ground truth):
public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException {
  String handle=parameters.getParameter("String_Node_Str",null);
  Division main=body.addDivision("String_Node_Str");
  main.setHead(T_main_head.parameterize(handle));
  Request request=ObjectModelHelper.getRequest(objectModel);
  ServiceDocument serviceDoc=(ServiceDocument)request.getAttribute("String_Node_Str");
  java.util.List<Collection> collections=ServiceDocumentHelper.getCollections(serviceDoc);
  for (  Collection collection : collections) {
    Division collectionDiv=main.addInteractiveDivision("String_Node_Str",contextPath + "String_Node_Str",Division.METHOD_POST,"String_Node_Str");
    collectionDiv.setHead(T_collection_head.parameterize(collection.getLocation()));
    List paramsList=collectionDiv.addList(collection + "String_Node_Str",List.TYPE_BULLETED);
    paramsList.addItem().addContent(T_collection_title.parameterize(collection.getTitle()));
    paramsList.addItem().addContent(T_collection_policy.parameterize(collection.getCollectionPolicy()));
    paramsList.addItem().addContent(T_collection_mediation.parameterize(Boolean.toString(collection.getMediation())));
    String[] fileTypes=collection.getAccepts();
    String fileTypesString=arrayToString(fileTypes);
    paramsList.addItem().addContent(T_collection_file_types.parameterize(fileTypesString));
    String[] packageFormats=ServiceDocumentHelper.getPackageFormats(collection);
    String packageFormatsString=arrayToString(packageFormats);
    paramsList.addItem().addContent(T_collection_package_formats.parameterize(packageFormatsString));
    if ((fileTypes.length > 0) && (packageFormats.length > 0)) {
      collectionDiv.addPara().addButton("String_Node_Str").setValue(T_collection_deposit_button);
      collectionDiv.addHidden("String_Node_Str").setValue(collection.getLocation());
      collectionDiv.addHidden("String_Node_Str").setValue(knot.getId());
    }
    if ((collection.getService() != null) && (collection.getService().length() > 0)) {
      collectionDiv.addPara(T_sub_service_target + collection.getService());
      collectionDiv.addPara().addButton("String_Node_Str").setValue(T_sub_service_target_button);
      collectionDiv.addHidden("String_Node_Str").setValue(collection.getService());
      collectionDiv.addHidden("String_Node_Str").setValue(knot.getId());
    }
  }
  Division buttons=main.addInteractiveDivision("String_Node_Str",contextPath + "String_Node_Str",Division.METHOD_POST,"String_Node_Str");
  Para buttonList=buttons.addPara();
  buttonList.addButton("String_Node_Str").setValue(T_submit_cancel);
  buttons.addHidden("String_Node_Str").setValue(knot.getId());
}