Program: 3673
Project: 3673
Buggy source:
/** 
 * Create/update community metadata from a posted form
 * @param context     DSpace context
 * @param request     the HTTP request containing posted info
 * @param response    the HTTP response
 * @param community   the community to update (or null for creation)
 */
private void processConfirmEditCommunity(Context context,HttpServletRequest request,HttpServletResponse response,Community community) throws ServletException, IOException, SQLException, AuthorizeException {
  if (request.getParameter("String_Node_Str").equals("String_Node_Str")) {
    community=Community.create(context);
  }
  community.setMetadata("String_Node_Str",request.getParameter("String_Node_Str"));
  community.setMetadata("String_Node_Str",request.getParameter("String_Node_Str"));
  String intro=request.getParameter("String_Node_Str");
  if (intro.equals("String_Node_Str")) {
    intro=null;
  }
  String copy=request.getParameter("String_Node_Str");
  if (copy.equals("String_Node_Str")) {
    copy=null;
  }
  String side=request.getParameter("String_Node_Str");
  if (side.equals("String_Node_Str")) {
    side=null;
  }
  community.setMetadata("String_Node_Str",intro);
  community.setMetadata("String_Node_Str",copy);
  community.setMetadata("String_Node_Str",side);
  community.update();
  String button=UIUtil.getSubmitButton(request,"String_Node_Str");
  if (button.equals("String_Node_Str")) {
    community.setLogo(null);
    community.update();
    JSPManager.showJSP(request,response,"String_Node_Str");
  }
 else   if (button.equals("String_Node_Str")) {
    community.setLogo(null);
    community.update();
    JSPManager.showJSP(request,response,"String_Node_Str");
  }
 else {
    showControls(context,request,response);
  }
  context.complete();
}

Fixed version (ground truth):
/** 
 * Create/update community metadata from a posted form
 * @param context     DSpace context
 * @param request     the HTTP request containing posted info
 * @param response    the HTTP response
 * @param community   the community to update (or null for creation)
 */
private void processConfirmEditCommunity(Context context,HttpServletRequest request,HttpServletResponse response,Community community) throws ServletException, IOException, SQLException, AuthorizeException {
  if (request.getParameter("String_Node_Str").equals("String_Node_Str")) {
    community=Community.create(context);
    request.setAttribute("String_Node_Str",community);
  }
  community.setMetadata("String_Node_Str",request.getParameter("String_Node_Str"));
  community.setMetadata("String_Node_Str",request.getParameter("String_Node_Str"));
  String intro=request.getParameter("String_Node_Str");
  if (intro.equals("String_Node_Str")) {
    intro=null;
  }
  String copy=request.getParameter("String_Node_Str");
  if (copy.equals("String_Node_Str")) {
    copy=null;
  }
  String side=request.getParameter("String_Node_Str");
  if (side.equals("String_Node_Str")) {
    side=null;
  }
  community.setMetadata("String_Node_Str",intro);
  community.setMetadata("String_Node_Str",copy);
  community.setMetadata("String_Node_Str",side);
  community.update();
  String button=UIUtil.getSubmitButton(request,"String_Node_Str");
  if (button.equals("String_Node_Str")) {
    community.setLogo(null);
    community.update();
    JSPManager.showJSP(request,response,"String_Node_Str");
  }
 else   if (button.equals("String_Node_Str")) {
    community.setLogo(null);
    community.update();
    JSPManager.showJSP(request,response,"String_Node_Str");
  }
 else {
    showControls(context,request,response);
  }
  context.complete();
}