Program: 52536
Project: 52536
Buggy source:
/** 
 * Process input from "verify prune" step
 * @param context   current DSpace context
 * @param request   current servlet request object
 * @param response  current servlet response object
 * @param subInfo   submission info object
 */
private void processVerifyPrune(Context context,HttpServletRequest request,HttpServletResponse response,SubmissionInfo subInfo) throws ServletException, IOException, SQLException, AuthorizeException {
  if (request.getParameter("String_Node_Str") != null) {
    doStep(context,request,response,subInfo,INITIAL_QUESTIONS);
    return;
  }
  boolean multipleTitles=UIUtil.getBoolParameter(request,"String_Node_Str");
  boolean publishedBefore=UIUtil.getBoolParameter(request,"String_Node_Str");
  boolean multipleFiles=(isWorkflow(subInfo) || UIUtil.getBoolParameter(request,"String_Node_Str"));
  Item item=subInfo.submission.getItem();
  if (!multipleTitles) {
    item.clearDC("String_Node_Str","String_Node_Str",Item.ANY);
  }
  if (publishedBefore == false) {
    item.clearDC("String_Node_Str","String_Node_Str",Item.ANY);
    item.clearDC("String_Node_Str","String_Node_Str",Item.ANY);
    item.clearDC("String_Node_Str",null,Item.ANY);
  }
  if (multipleFiles == false) {
    Bundle[] bundles=item.getBundles();
    Bitstream[] bitstreams=bundles[0].getBitstreams();
    for (int i=1; i < bitstreams.length; i++) {
      bundles[0].removeBitstream(bitstreams[i]);
    }
  }
  subInfo.submission.setMultipleTitles(multipleTitles);
  subInfo.submission.setPublishedBefore(publishedBefore);
  if (!isWorkflow(subInfo)) {
    subInfo.submission.setMultipleFiles(multipleFiles);
  }
  subInfo.submission.update();
  if (request.getParameter("String_Node_Str") != null) {
    userHasReached(subInfo,EDIT_METADATA_1);
    doStep(context,request,response,subInfo,EDIT_METADATA_1);
    context.complete();
  }
 else {
    doStepJump(context,request,response,subInfo);
    context.complete();
  }
}

Fixed version (ground truth):
/** 
 * Process input from "verify prune" step
 * @param context   current DSpace context
 * @param request   current servlet request object
 * @param response  current servlet response object
 * @param subInfo   submission info object
 */
private void processVerifyPrune(Context context,HttpServletRequest request,HttpServletResponse response,SubmissionInfo subInfo) throws ServletException, IOException, SQLException, AuthorizeException {
  if (request.getParameter("String_Node_Str") != null) {
    doStep(context,request,response,subInfo,INITIAL_QUESTIONS);
    return;
  }
  boolean multipleTitles=UIUtil.getBoolParameter(request,"String_Node_Str");
  boolean publishedBefore=UIUtil.getBoolParameter(request,"String_Node_Str");
  boolean multipleFiles=(isWorkflow(subInfo) || UIUtil.getBoolParameter(request,"String_Node_Str"));
  Item item=subInfo.submission.getItem();
  if (!multipleTitles) {
    item.clearDC("String_Node_Str","String_Node_Str",Item.ANY);
  }
  if (publishedBefore == false) {
    item.clearDC("String_Node_Str","String_Node_Str",Item.ANY);
    item.clearDC("String_Node_Str","String_Node_Str",Item.ANY);
    item.clearDC("String_Node_Str",null,Item.ANY);
  }
  if (multipleFiles == false) {
    Bundle[] bundles=item.getBundles();
    if (bundles.length > 0) {
      Bitstream[] bitstreams=bundles[0].getBitstreams();
      for (int i=1; i < bitstreams.length; i++) {
        bundles[0].removeBitstream(bitstreams[i]);
      }
    }
  }
  subInfo.submission.setMultipleTitles(multipleTitles);
  subInfo.submission.setPublishedBefore(publishedBefore);
  if (!isWorkflow(subInfo)) {
    subInfo.submission.setMultipleFiles(multipleFiles);
  }
  subInfo.submission.update();
  if (request.getParameter("String_Node_Str") != null) {
    userHasReached(subInfo,EDIT_METADATA_1);
    doStep(context,request,response,subInfo,EDIT_METADATA_1);
    context.complete();
  }
 else {
    doStepJump(context,request,response,subInfo);
    context.complete();
  }
}