Program: 60856
Project: 60856
Buggy source:
@Override public void setSchemaModalPage(final PageReference callerPageRef,final ModalWindow window,AbstractBaseBean schema,final boolean createFlag){
  if (schema == null) {
    schema=new DerivedSchemaTO();
  }
  final Form schemaForm=new Form("String_Node_Str");
  schemaForm.setModel(new CompoundPropertyModel(schema));
  final AjaxTextFieldPanel name=new AjaxTextFieldPanel("String_Node_Str",getString("String_Node_Str"),new PropertyModel<String>(schema,"String_Node_Str"),false);
  name.addRequiredLabel();
  final AjaxTextFieldPanel expression=new AjaxTextFieldPanel("String_Node_Str",getString("String_Node_Str"),new PropertyModel<String>(schema,"String_Node_Str"),false);
  expression.addRequiredLabel();
  name.setEnabled(createFlag);
  final IndicatingAjaxButton submit=new IndicatingAjaxButton("String_Node_Str",new ResourceModel("String_Node_Str")){
    private static final long serialVersionUID=-958724007591692537L;
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form form){
      if (createFlag) {
        restClient.createDerivedSchema(kind,(DerivedSchemaTO)form.getDefaultModelObject());
      }
 else {
        restClient.updateDerivedSchema(kind,(DerivedSchemaTO)form.getDefaultModelObject());
      }
      Schema callerPage=(Schema)callerPageRef.getPage();
      callerPage.setModalResult(true);
      window.close(target);
    }
    @Override protected void onError(    final AjaxRequestTarget target,    final Form form){
      target.add(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);
  schemaForm.add(name);
  schemaForm.add(expression);
  schemaForm.add(submit);
  add(schemaForm);
}

Fixed version (ground truth):
@Override public void setSchemaModalPage(final PageReference callerPageRef,final ModalWindow window,AbstractBaseBean schema,final boolean createFlag){
  if (schema == null) {
    schema=new DerivedSchemaTO();
  }
  final Form schemaForm=new Form("String_Node_Str");
  schemaForm.setModel(new CompoundPropertyModel(schema));
  final AjaxTextFieldPanel name=new AjaxTextFieldPanel("String_Node_Str",getString("String_Node_Str"),new PropertyModel<String>(schema,"String_Node_Str"),false);
  name.addRequiredLabel();
  final AjaxTextFieldPanel expression=new AjaxTextFieldPanel("String_Node_Str",getString("String_Node_Str"),new PropertyModel<String>(schema,"String_Node_Str"),false);
  expression.addRequiredLabel();
  name.setEnabled(createFlag);
  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){
      DerivedSchemaTO schemaTO=(DerivedSchemaTO)form.getDefaultModelObject();
      try {
        if (createFlag) {
          restClient.createDerivedSchema(kind,schemaTO);
        }
 else {
          restClient.updateDerivedSchema(kind,schemaTO);
        }
        if (callerPageRef.getPage() instanceof BasePage) {
          ((BasePage)callerPageRef.getPage()).setModalResult(true);
        }
        window.close(target);
      }
 catch (      SyncopeClientCompositeErrorException e) {
        error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
        target.add(feedbackPanel);
      }
    }
    @Override protected void onError(    final AjaxRequestTarget target,    final Form form){
      target.add(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);
  schemaForm.add(name);
  schemaForm.add(expression);
  schemaForm.add(submit);
  add(schemaForm);
}