Program: 61045
Project: 61045
Buggy source:
/** 
 * ConfigurationModalPage constructor.
 * @param basePage base
 * @param modalWindow modal-window
 * @param configurationTO
 * @param createFlag true for CREATE and false for UPDATE operation
 */
public ConfigurationModalPage(final BasePage basePage,final ModalWindow window,final ConfigurationTO configurationTO,final boolean createFlag){
  Form form=new Form("String_Node_Str",new CompoundPropertyModel(configurationTO));
  form.add(key=new TextField("String_Node_Str",new PropertyModel(configurationTO,"String_Node_Str")));
  key.setEnabled(createFlag);
  key.setRequired(true);
  form.add(value=new TextField("String_Node_Str",new PropertyModel(configurationTO,"String_Node_Str")));
  value.setRequired(true);
  submit=new IndicatingAjaxButton("String_Node_Str",new Model<String>(getString("String_Node_Str"))){
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form form){
      boolean res=false;
      if (createFlag) {
        res=configurationsRestClient.createConfiguration(configurationTO);
        if (!res) {
          error(getString("String_Node_Str"));
        }
      }
 else {
        res=configurationsRestClient.updateConfiguration(configurationTO);
        if (!res) {
          error(getString("String_Node_Str"));
        }
      }
      if (res) {
        Configuration callerPage=(Configuration)basePage;
        callerPage.setOperationResult(true);
        window.close(target);
      }
    }
    @Override protected void onError(    AjaxRequestTarget target,    Form form){
      target.addComponent(feedbackPanel);
    }
  }
;
  String allowedRoles;
  if (createFlag) {
    allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  }
 else {
    allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  }
  MetaDataRoleAuthorizationStrategy.authorize(submit,ENABLE,allowedRoles);
  form.add(submit);
  add(form);
}

Fixed version (ground truth):
/** 
 * ConfigurationModalPage constructor.
 * @param basePage base
 * @param modalWindow modal-window
 * @param configurationTO
 * @param createFlag true for CREATE and false for UPDATE operation
 */
public ConfigurationModalPage(final BasePage basePage,final ModalWindow window,final ConfigurationTO configurationTO,final boolean createFlag){
  Form form=new Form("String_Node_Str",new CompoundPropertyModel(configurationTO));
  final AjaxTextFieldPanel key=new AjaxTextFieldPanel("String_Node_Str","String_Node_Str",new PropertyModel(configurationTO,"String_Node_Str"),false);
  form.add(key);
  key.setEnabled(createFlag);
  key.addRequiredLabel();
  final AjaxTextFieldPanel value=new AjaxTextFieldPanel("String_Node_Str","String_Node_Str",new PropertyModel(configurationTO,"String_Node_Str"),false);
  form.add(value);
  value.setEnabled(createFlag);
  value.addRequiredLabel();
  submit=new IndicatingAjaxButton("String_Node_Str",new Model<String>(getString("String_Node_Str"))){
    private static final long serialVersionUID=-958724007591692537L;
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form form){
      boolean res=false;
      if (createFlag) {
        res=configurationsRestClient.createConfiguration(configurationTO);
        if (!res) {
          error(getString("String_Node_Str"));
        }
      }
 else {
        res=configurationsRestClient.updateConfiguration(configurationTO);
        if (!res) {
          error(getString("String_Node_Str"));
        }
      }
      if (res) {
        Configuration callerPage=(Configuration)basePage;
        callerPage.setOperationResult(true);
        window.close(target);
      }
    }
    @Override protected void onError(    AjaxRequestTarget target,    Form form){
      target.addComponent(feedbackPanel);
    }
  }
;
  String allowedRoles;
  if (createFlag) {
    allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  }
 else {
    allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  }
  MetaDataRoleAuthorizationStrategy.authorize(submit,ENABLE,allowedRoles);
  form.add(submit);
  add(form);
}