Program: 61036
Project: 61036
Buggy source:
public PasswordPolicyModalPage(final PasswordPoliciesPanel basePage,final ModalWindow window,final PasswordPolicyTO policyTO){
  super();
  final Form form=new Form("String_Node_Str");
  form.setOutputMarkupId(true);
  add(form);
  final AjaxTextFieldPanel policyid=new AjaxTextFieldPanel("String_Node_Str","String_Node_Str",new PropertyModel<String>(policyTO,"String_Node_Str"),false);
  policyid.setEnabled(false);
  policyid.setStyleShet("String_Node_Str");
  form.add(policyid);
  final AjaxTextFieldPanel description=new AjaxTextFieldPanel("String_Node_Str","String_Node_Str",new PropertyModel<String>(policyTO,"String_Node_Str"),false);
  description.addRequiredLabel();
  description.setStyleShet("String_Node_Str");
  form.add(description);
  final AjaxDropDownChoicePanel<PolicyType> type=new AjaxDropDownChoicePanel<PolicyType>("String_Node_Str","String_Node_Str",new PropertyModel<PolicyType>(policyTO,"String_Node_Str"),false);
  type.setChoices(Arrays.asList(new PolicyType[]{PolicyType.GLOBAL_PASSWORD,PolicyType.PASSWORD}));
  type.addRequiredLabel();
  form.add(type);
  final PasswordPolicy policy=policyTO.getSpecification() != null ? policyTO.getSpecification() : new PasswordPolicy();
  form.add(new PolicyBeanPanel("String_Node_Str",policy));
  final IndicatingAjaxButton submit=new IndicatingAjaxButton("String_Node_Str",new Model(getString("String_Node_Str"))){
    private static final long serialVersionUID=-958724007591692537L;
    @Override protected void onSubmit(    final AjaxRequestTarget target,    final Form form){
      policyTO.setSpecification(policy);
      try {
        if (policyTO.getId() > 0) {
          final PasswordPolicyMod policyMod=new PasswordPolicyMod();
          policyMod.setId(policyTO.getId());
          policyMod.setType(policyTO.getType());
          policyMod.setSpecification(policyTO.getSpecification());
          policyMod.setDescription(policyTO.getDescription());
          policyRestClient.updatePasswordPolicy(policyMod);
        }
 else {
          policyRestClient.createPasswordPolicy(policyTO);
        }
        window.close(target);
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str",e);
        error(getString("String_Node_Str"));
        target.addComponent(getPage().get("String_Node_Str"));
      }
    }
    @Override protected void onError(    AjaxRequestTarget target,    Form form){
      target.addComponent(getPage().get("String_Node_Str"));
    }
  }
;
  form.add(submit);
}

Fixed version (ground truth):
public PasswordPolicyModalPage(final PasswordPoliciesPanel basePage,final ModalWindow window,final PasswordPolicyTO policyTO){
  super();
  final Form form=new Form("String_Node_Str");
  form.setOutputMarkupId(true);
  add(form);
  final AjaxTextFieldPanel policyid=new AjaxTextFieldPanel("String_Node_Str","String_Node_Str",new PropertyModel<String>(policyTO,"String_Node_Str"),false);
  policyid.setEnabled(false);
  policyid.setStyleShet("String_Node_Str");
  form.add(policyid);
  final AjaxTextFieldPanel description=new AjaxTextFieldPanel("String_Node_Str","String_Node_Str",new PropertyModel<String>(policyTO,"String_Node_Str"),false);
  description.addRequiredLabel();
  description.setStyleShet("String_Node_Str");
  form.add(description);
  final AjaxDropDownChoicePanel<PolicyType> type=new AjaxDropDownChoicePanel<PolicyType>("String_Node_Str","String_Node_Str",new PropertyModel<PolicyType>(policyTO,"String_Node_Str"),false);
  type.setChoices(Arrays.asList(new PolicyType[]{PolicyType.GLOBAL_PASSWORD,PolicyType.PASSWORD}));
  type.addRequiredLabel();
  form.add(type);
  final PasswordPolicy policy=policyTO.getSpecification() != null ? policyTO.getSpecification() : new PasswordPolicy();
  form.add(new PolicyBeanPanel("String_Node_Str",policy));
  final IndicatingAjaxButton submit=new IndicatingAjaxButton("String_Node_Str",new ResourceModel("String_Node_Str")){
    private static final long serialVersionUID=-958724007591692537L;
    @Override protected void onSubmit(    final AjaxRequestTarget target,    final Form form){
      policyTO.setSpecification(policy);
      try {
        if (policyTO.getId() > 0) {
          final PasswordPolicyMod policyMod=new PasswordPolicyMod();
          policyMod.setId(policyTO.getId());
          policyMod.setType(policyTO.getType());
          policyMod.setSpecification(policyTO.getSpecification());
          policyMod.setDescription(policyTO.getDescription());
          policyRestClient.updatePasswordPolicy(policyMod);
        }
 else {
          policyRestClient.createPasswordPolicy(policyTO);
        }
        window.close(target);
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str",e);
        error(getString("String_Node_Str"));
        target.addComponent(getPage().get("String_Node_Str"));
      }
    }
    @Override protected void onError(    AjaxRequestTarget target,    Form form){
      target.addComponent(getPage().get("String_Node_Str"));
    }
  }
;
  form.add(submit);
}