Program: 60860
Project: 60860
Buggy source:
@Override public void setSchemaModalPage(final PageReference callerPageRef,final ModalWindow window,AbstractBaseBean schema,final boolean createFlag){
  if (schema == null) {
    schema=new VirtualSchemaTO();
  }
  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();
  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.createVirtualSchema(kind,(VirtualSchemaTO)form.getDefaultModelObject());
      }
 else {
        restClient.updateVirtualSchema(kind,(VirtualSchemaTO)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(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 VirtualSchemaTO();
  }
  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();
  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){
      VirtualSchemaTO schemaTO=(VirtualSchemaTO)form.getDefaultModelObject();
      try {
        if (createFlag) {
          restClient.createVirtualSchema(kind,schemaTO);
        }
 else {
          restClient.updateVirtualSchema(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(submit);
  add(schemaForm);
}