Program: 61211
Project: 61211
Buggy source:
public MembershipModalPage(final Page basePage,final ModalWindow window,final MembershipTO membershipTO,final boolean createFlag){
  Form form=new Form("String_Node_Str");
  form.setModel(new CompoundPropertyModel(membershipTO));
  setupSchemaWrappers(createFlag,membershipTO);
  final ListView userAttributesView=new ListView("String_Node_Str",schemaWrappers){
    @Override protected void populateItem(    ListItem item){
      final SchemaWrapper schemaWrapper=(SchemaWrapper)item.getDefaultModelObject();
      final SchemaTO schemaTO=schemaWrapper.getSchemaTO();
      item.add(new Label("String_Node_Str",schemaWrapper.getSchemaTO().getName()));
      item.add(new ListView("String_Node_Str",schemaWrapper.getValues()){
        Panel panel;
        @Override protected void populateItem(        final ListItem item){
          String mandatoryCondition=schemaTO.getMandatoryCondition();
          boolean required=false;
          if (mandatoryCondition.equalsIgnoreCase("String_Node_Str"))           required=true;
          if (schemaTO.getType().getClassName().equals("String_Node_Str")) {
            panel=new AjaxTextFieldPanel("String_Node_Str",schemaTO.getName(),new Model(){
              @Override public Serializable getObject(){
                return (String)item.getModelObject();
              }
              @Override public void setObject(              Serializable object){
                item.setModelObject((String)object);
              }
            }
,required);
          }
 else           if (schemaTO.getType().getClassName().equals("String_Node_Str")) {
            panel=new AjaxCheckBoxPanel("String_Node_Str",schemaTO.getName(),new Model(){
              @Override public Serializable getObject(){
                return "String_Node_Str";
              }
              @Override public void setObject(              Serializable object){
                Boolean val=(Boolean)object;
                item.setModelObject(val.toString());
              }
            }
,required);
          }
 else           if (schemaTO.getType().getClassName().equals("String_Node_Str")) {
            panel=new DateFieldPanel("String_Node_Str",schemaTO.getName(),new Model(){
              @Override public Serializable getObject(){
                DateFormat formatter=new SimpleDateFormat(schemaTO.getConversionPattern());
                Date date=new Date();
                try {
                  String dateValue=(String)item.getModelObject();
                  formatter=new SimpleDateFormat(schemaTO.getConversionPattern());
                  if (!dateValue.equals("String_Node_Str"))                   date=formatter.parse((String)item.getModelObject());
                }
 catch (                ParseException ex) {
                  Logger.getLogger(UserModalPage.class.getName()).log(Level.SEVERE,null,ex);
                }
                return date;
              }
              @Override public void setObject(              Serializable object){
                Date date=(Date)object;
                Format formatter=new SimpleDateFormat(schemaTO.getConversionPattern());
                String val=formatter.format(date);
                item.setModelObject(val);
              }
            }
,required);
          }
          item.add(panel);
        }
      }
);
      AjaxButton addButton=new AjaxButton("String_Node_Str",new Model(getString("String_Node_Str"))){
        @Override protected void onSubmit(        AjaxRequestTarget target,        Form form){
          schemaWrapper.getValues().add("String_Node_Str");
          target.addComponent(container);
        }
      }
;
      AjaxButton dropButton=new AjaxButton("String_Node_Str",new Model(getString("String_Node_Str"))){
        @Override protected void onSubmit(        AjaxRequestTarget target,        Form form){
          schemaWrapper.getValues().remove(schemaWrapper.getValues().size() - 1);
          target.addComponent(container);
        }
      }
;
      if (schemaTO.getType().getClassName().equals("String_Node_Str")) {
        addButton.setVisible(false);
        dropButton.setVisible(false);
      }
      addButton.setDefaultFormProcessing(false);
      addButton.setVisible(schemaTO.isMultivalue());
      dropButton.setDefaultFormProcessing(false);
      dropButton.setVisible(schemaTO.isMultivalue());
      if (schemaWrapper.getValues().size() == 1) {
        dropButton.setVisible(false);
      }
      item.add(addButton);
      item.add(dropButton);
    }
  }
;
  submit=new AjaxButton("String_Node_Str",new Model(getString("String_Node_Str"))){
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form form){
      MembershipTO membershipTO=(MembershipTO)form.getDefaultModelObject();
      membershipTO.setAttributes(getMembershipAttributes());
      UserModalPage userModalPage=(UserModalPage)basePage;
      if (createFlag)       userModalPage.getMembershipTOs().add(membershipTO);
 else {
        userModalPage.getMembershipTOs().remove(membershipTO);
        userModalPage.getMembershipTOs().add(membershipTO);
      }
      window.close(target);
    }
    @Override protected void onError(    AjaxRequestTarget target,    Form form){
      target.addComponent(form.get("String_Node_Str"));
    }
  }
;
  form.add(submit);
  container=new WebMarkupContainer("String_Node_Str");
  container.add(userAttributesView);
  container.setOutputMarkupId(true);
  form.add(new FeedbackPanel("String_Node_Str").setOutputMarkupId(true));
  form.add(container);
  add(form);
}

Fixed version (ground truth):
public MembershipModalPage(final Page basePage,final ModalWindow window,final MembershipTO membershipTO,final boolean createFlag){
  Form form=new Form("String_Node_Str");
  form.setModel(new CompoundPropertyModel(membershipTO));
  setupSchemaWrappers(createFlag,membershipTO);
  final ListView userAttributesView=new ListView("String_Node_Str",schemaWrappers){
    @Override protected void populateItem(    ListItem item){
      final SchemaWrapper schemaWrapper=(SchemaWrapper)item.getDefaultModelObject();
      final SchemaTO schemaTO=schemaWrapper.getSchemaTO();
      item.add(new Label("String_Node_Str",schemaWrapper.getSchemaTO().getName()));
      item.add(new ListView("String_Node_Str",schemaWrapper.getValues()){
        Panel panel;
        @Override protected void populateItem(        final ListItem item){
          String mandatoryCondition=schemaTO.getMandatoryCondition();
          boolean required=false;
          if (mandatoryCondition.equalsIgnoreCase("String_Node_Str"))           required=true;
          if (schemaTO.getType().getClassName().equals("String_Node_Str")) {
            panel=new AjaxTextFieldPanel("String_Node_Str",schemaTO.getName(),new Model(){
              @Override public Serializable getObject(){
                return (String)item.getModelObject();
              }
              @Override public void setObject(              Serializable object){
                item.setModelObject((String)object);
              }
            }
,required);
          }
 else           if (schemaTO.getType().getClassName().equals("String_Node_Str")) {
            panel=new AjaxCheckBoxPanel("String_Node_Str",schemaTO.getName(),new Model(){
              @Override public Serializable getObject(){
                return "String_Node_Str";
              }
              @Override public void setObject(              Serializable object){
                Boolean val=(Boolean)object;
                item.setModelObject(val.toString());
              }
            }
,required);
          }
 else           if (schemaTO.getType().getClassName().equals("String_Node_Str")) {
            panel=new DateFieldPanel("String_Node_Str",schemaTO.getName(),new Model(){
              @Override public Serializable getObject(){
                DateFormat formatter=new SimpleDateFormat(schemaTO.getConversionPattern());
                Date date=new Date();
                try {
                  String dateValue=(String)item.getModelObject();
                  formatter=new SimpleDateFormat(schemaTO.getConversionPattern());
                  if (!dateValue.equals("String_Node_Str"))                   date=formatter.parse(dateValue);
                }
 catch (                ParseException ex) {
                  Logger.getLogger(UserModalPage.class.getName()).log(Level.SEVERE,null,ex);
                }
                return date;
              }
              @Override public void setObject(              Serializable object){
                Date date=(Date)object;
                Format formatter=new SimpleDateFormat(schemaTO.getConversionPattern());
                String val=formatter.format(date);
                item.setModelObject(val);
              }
            }
,schemaTO.getConversionPattern(),required);
          }
          item.add(panel);
        }
      }
);
      AjaxButton addButton=new AjaxButton("String_Node_Str",new Model(getString("String_Node_Str"))){
        @Override protected void onSubmit(        AjaxRequestTarget target,        Form form){
          schemaWrapper.getValues().add("String_Node_Str");
          target.addComponent(container);
        }
      }
;
      AjaxButton dropButton=new AjaxButton("String_Node_Str",new Model(getString("String_Node_Str"))){
        @Override protected void onSubmit(        AjaxRequestTarget target,        Form form){
          schemaWrapper.getValues().remove(schemaWrapper.getValues().size() - 1);
          target.addComponent(container);
        }
      }
;
      if (schemaTO.getType().getClassName().equals("String_Node_Str")) {
        addButton.setVisible(false);
        dropButton.setVisible(false);
      }
      addButton.setDefaultFormProcessing(false);
      addButton.setVisible(schemaTO.isMultivalue());
      dropButton.setDefaultFormProcessing(false);
      dropButton.setVisible(schemaTO.isMultivalue());
      if (schemaWrapper.getValues().size() == 1) {
        dropButton.setVisible(false);
      }
      item.add(addButton);
      item.add(dropButton);
    }
  }
;
  submit=new AjaxButton("String_Node_Str",new Model(getString("String_Node_Str"))){
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form form){
      MembershipTO membershipTO=(MembershipTO)form.getDefaultModelObject();
      membershipTO.setAttributes(getMembershipAttributes());
      UserModalPage userModalPage=(UserModalPage)basePage;
      if (createFlag)       userModalPage.getMembershipTOs().add(membershipTO);
 else {
        userModalPage.getMembershipTOs().remove(membershipTO);
        userModalPage.getMembershipTOs().add(membershipTO);
      }
      window.close(target);
    }
    @Override protected void onError(    AjaxRequestTarget target,    Form form){
      target.addComponent(form.get("String_Node_Str"));
    }
  }
;
  form.add(submit);
  container=new WebMarkupContainer("String_Node_Str");
  container.add(userAttributesView);
  container.setOutputMarkupId(true);
  form.add(new FeedbackPanel("String_Node_Str").setOutputMarkupId(true));
  form.add(container);
  add(form);
}