nus-yam/ex-repair huggingface dataset:
Program: 60957
Project: 60957
Buggy source:
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  final ConnInstanceTO connector=(ConnInstanceTO)form.getDefaultModelObject();
  connector.setBundleName(((ConnBundleTO)bundle.getModelObject()).getBundleName());
  if (!selectedCapabilities.isEmpty()) {
    connector.setCapabilities(EnumSet.copyOf(selectedCapabilities));
  }
 else {
    connector.setCapabilities(EnumSet.noneOf(ConnectorCapability.class));
  }
  try {
    if (createFlag) {
      restClient.create(connector);
    }
 else {
      restClient.update(connector);
    }
    ((Connectors)callerPageRef.getPage()).setOperationResult(true);
    window.close(target);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
    ((Connectors)callerPageRef.getPage()).setOperationResult(false);
    LOG.error("String_Node_Str" + connector);
  }
}

Fixed version (ground truth):
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  final ConnInstanceTO connector=(ConnInstanceTO)form.getDefaultModelObject();
  connector.setBundleName(((ConnBundleTO)bundle.getModelObject()).getBundleName());
  if (!selectedCapabilities.isEmpty()) {
    connector.setCapabilities(EnumSet.copyOf(selectedCapabilities));
  }
 else {
    connector.setCapabilities(EnumSet.noneOf(ConnectorCapability.class));
  }
  try {
    if (createFlag) {
      restClient.create(connector);
    }
 else {
      restClient.update(connector);
    }
    ((Resources)callerPageRef.getPage()).setOperationResult(true);
    window.close(target);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
    ((Resources)callerPageRef.getPage()).setOperationResult(false);
    LOG.error("String_Node_Str" + connector);
  }
}
Program: 60959
Project: 60959
Buggy source:
public ResourceTO(){
  mappings=new ArrayList<SchemaMappingTO>();
  connectorConfigurationProperties=new HashSet<ConnConfProperty>();
  optionalPropagationMode=PropagationMode.ASYNC;
  createTraceLevel=TraceLevel.ALL;
  deleteTraceLevel=TraceLevel.ALL;
  updateTraceLevel=TraceLevel.ALL;
}

Fixed version (ground truth):
public ResourceTO(){
  mappings=new ArrayList<SchemaMappingTO>();
  connectorConfigurationProperties=new HashSet<ConnConfProperty>();
  propagationMode=PropagationMode.ASYNC;
  propagationPriority=0;
  createTraceLevel=TraceLevel.ALL;
  updateTraceLevel=TraceLevel.ALL;
  deleteTraceLevel=TraceLevel.ALL;
}
Program: 60960
Project: 60960
Buggy source:
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  ResourceTO resourceTO=(ResourceTO)form.getDefaultModelObject();
  int accountIdCount=0;
  for (  SchemaMappingTO mapping : resourceTO.getMappings()) {
    if (mapping.isAccountid()) {
      accountIdCount++;
    }
  }
  if (accountIdCount == 0 || accountIdCount > 1) {
    error(getString("String_Node_Str"));
    ((Resources)callPageRef.getPage()).setOperationResult(false);
  }
 else {
    try {
      if (createFlag) {
        restClient.create(resourceTO);
      }
 else {
        restClient.update(resourceTO);
      }
      ((Resources)callPageRef.getPage()).setOperationResult(true);
      window.close(target);
    }
 catch (    SyncopeClientCompositeErrorException e) {
      error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
      ((Resources)callPageRef.getPage()).setOperationResult(false);
      LOG.error("String_Node_Str",resourceTO);
    }
  }
}

Fixed version (ground truth):
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  ResourceTO resourceTO=(ResourceTO)form.getDefaultModelObject();
  int accountIdCount=0;
  for (  SchemaMappingTO mapping : resourceTO.getMappings()) {
    if (mapping.isAccountid()) {
      accountIdCount++;
    }
  }
  if (accountIdCount == 0 || accountIdCount > 1) {
    error(getString("String_Node_Str"));
    target.add(feedbackPanel);
  }
 else {
    try {
      if (createFlag) {
        restClient.create(resourceTO);
      }
 else {
        restClient.update(resourceTO);
      }
      ((Resources)callPageRef.getPage()).setOperationResult(true);
      window.close(target);
    }
 catch (    SyncopeClientCompositeErrorException e) {
      LOG.error("String_Node_Str",resourceTO);
      error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
      target.add(feedbackPanel);
    }
  }
}
Program: 60965
Project: 60965
Buggy source:
/** 
 * Performs update on each resource associated to the user.
 * @param userId to be updated
 * @param password to be updated
 * @param vAttrsToBeRemoved virtual attributes to be removed
 * @param vAttrsToBeAdded virtual attributes to be added
 * @param enable wether user must be enabled or not
 * @param propByRes operations to perform on each resource
 * @return list of propagation tasks
 * @throws NotFoundException if userId is not found
 */
public List<PropagationTask> getUpdateTaskIds(final Long userId,final String password,final Set<String> vAttrsToBeRemoved,final Set<String> vAttrsToBeAdded,final Boolean enable,final PropagationByResource propByRes) throws NotFoundException {
  SyncopeUser user=getSyncopeUser(userId);
  Set<String> vAttrsToRemove=vAttrsToBeRemoved == null ? Collections.EMPTY_SET : vAttrsToBeRemoved;
  Set<String> vAttrsToAdd=vAttrsToBeAdded == null ? Collections.EMPTY_SET : vAttrsToBeAdded;
  PropagationByResource vPropByRes=userDataBinder.fillVirtual(user,vAttrsToRemove,vAttrsToAdd,AttributableUtil.USER);
  propByRes.merge(vPropByRes);
  PropagationByResource localPropByRes;
  if (propByRes == null || propByRes.isEmpty()) {
    localPropByRes=new PropagationByResource();
    localPropByRes.addAll(PropagationOperation.UPDATE,user.getExternalResources());
  }
 else {
    localPropByRes=propByRes;
  }
  return provision(user,password,enable,localPropByRes);
}

Fixed version (ground truth):
/** 
 * Performs update on each resource associated to the user.
 * @param userId to be updated
 * @param password to be updated
 * @param vAttrsToBeRemoved virtual attributes to be removed
 * @param vAttrsToBeAdded virtual attributes to be added
 * @param enable wether user must be enabled or not
 * @param propByRes operations to perform on each resource
 * @param syncResourceName name of external resource performing sync, hencenot to be considered for propagation
 * @return list of propagation tasks
 * @throws NotFoundException if userId is not found
 */
public List<PropagationTask> getUpdateTaskIds(final Long userId,final String password,final Set<String> vAttrsToBeRemoved,final Set<String> vAttrsToBeAdded,final Boolean enable,final PropagationByResource propByRes,final String syncResourceName) throws NotFoundException {
  SyncopeUser user=getSyncopeUser(userId);
  Set<String> vAttrsToRemove=vAttrsToBeRemoved == null ? Collections.EMPTY_SET : vAttrsToBeRemoved;
  Set<String> vAttrsToAdd=vAttrsToBeAdded == null ? Collections.EMPTY_SET : vAttrsToBeAdded;
  PropagationByResource localPropByRes=userDataBinder.fillVirtual(user,vAttrsToRemove,vAttrsToAdd,AttributableUtil.USER);
  if (propByRes != null && !propByRes.isEmpty()) {
    localPropByRes.merge(propByRes);
  }
 else {
    localPropByRes.addAll(PropagationOperation.UPDATE,user.getExternalResources());
  }
  if (syncResourceName != null) {
    propByRes.get(PropagationOperation.CREATE).remove(syncResourceName);
    propByRes.get(PropagationOperation.UPDATE).remove(syncResourceName);
    propByRes.get(PropagationOperation.DELETE).remove(syncResourceName);
  }
  return provision(user,password,enable,localPropByRes);
}
Program: 60966
Project: 60966
Buggy source:
/** 
 * Create the user on every associated resource.
 * @param userId to be created
 * @param password to be set
 * @param vAttrs virtual attributes to be set
 * @param enable wether user must be enabled or not
 * @return list of propagation tasks
 * @throws NotFoundException if userId is not found
 */
public List<PropagationTask> getCreateTaskIds(final Long userId,final String password,final List<AttributeTO> vAttrs,final Boolean enable) throws NotFoundException {
  SyncopeUser user=getSyncopeUser(userId);
  if (vAttrs != null && !vAttrs.isEmpty()) {
    userDataBinder.fillVirtual(user,vAttrs,AttributableUtil.USER);
    user=userDAO.save(user);
  }
  final PropagationByResource propByRes=new PropagationByResource();
  propByRes.set(PropagationOperation.CREATE,user.getExternalResources());
  return provision(user,password,enable,propByRes);
}

Fixed version (ground truth):
/** 
 * Create the user on every associated resource.
 * @param userId to be created
 * @param password to be set
 * @param vAttrs virtual attributes to be set
 * @param enable wether user must be enabled or not
 * @param syncResourceName name of external resource performing sync, hencenot to be considered for propagation
 * @return list of propagation tasks
 * @throws NotFoundException if userId is not found
 */
public List<PropagationTask> getCreateTaskIds(final Long userId,final String password,final List<AttributeTO> vAttrs,final Boolean enable,final String syncResourceName) throws NotFoundException {
  SyncopeUser user=getSyncopeUser(userId);
  if (vAttrs != null && !vAttrs.isEmpty()) {
    userDataBinder.fillVirtual(user,vAttrs,AttributableUtil.USER);
    user=userDAO.save(user);
  }
  final PropagationByResource propByRes=new PropagationByResource();
  propByRes.set(PropagationOperation.CREATE,user.getExternalResources());
  if (syncResourceName != null) {
    propByRes.get(PropagationOperation.CREATE).remove(syncResourceName);
  }
  return provision(user,password,enable,propByRes);
}
Program: 60967
Project: 60967
Buggy source:
/** 
 * Perform delete on each resource associated to the user. It is possible to ask for a mandatory provisioning for some resources specifying a set of resource names. Exceptions won't be ignored and the process will be stopped if the creation fails onto a mandatory resource.
 * @param userId to be deleted
 * @return list of propagation tasks
 * @throws NotFoundException if user is not found
 */
public List<PropagationTask> getDeleteTaskIds(final Long userId) throws NotFoundException {
  SyncopeUser user=getSyncopeUser(userId);
  final PropagationByResource propByRes=new PropagationByResource();
  propByRes.set(PropagationOperation.DELETE,user.getExternalResources());
  return provision(user,null,false,propByRes);
}

Fixed version (ground truth):
/** 
 * Perform delete on each resource associated to the user. It is possible to ask for a mandatory provisioning for some resources specifying a set of resource names. Exceptions won't be ignored and the process will be stopped if the creation fails onto a mandatory resource.
 * @param userId to be deleted
 * @param syncResourceName name of external resource performing sync, hencenot to be considered for propagation
 * @return list of propagation tasks
 * @throws NotFoundException if user is not found
 */
public List<PropagationTask> getDeleteTaskIds(final Long userId,final String syncResourceName) throws NotFoundException {
  SyncopeUser user=getSyncopeUser(userId);
  final PropagationByResource propByRes=new PropagationByResource();
  propByRes.set(PropagationOperation.DELETE,user.getExternalResources());
  if (syncResourceName != null) {
    propByRes.get(PropagationOperation.DELETE).remove(syncResourceName);
  }
  return provision(user,null,false,propByRes);
}
Program: 60970
Project: 60970
Buggy source:
@Override protected void populateItem(final ListItem<ConnConfProperty> item){
  final ConnConfProperty property=item.getModelObject();
  final Label label=new Label("String_Node_Str",property.getSchema().getDisplayName() == null || property.getSchema().getDisplayName().isEmpty() ? property.getSchema().getName() : property.getSchema().getDisplayName());
  item.add(label);
  final FieldPanel field=new AjaxTextFieldPanel("String_Node_Str",label.getDefaultModelObjectAsString(),new PropertyModel<String>(property,"String_Node_Str"),false).setRequired(property.getSchema().isRequired()).setTitle(property.getSchema().getHelpMessage());
  if (property.getSchema().isRequired()) {
    field.addRequiredLabel();
  }
  field.getField().add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
    private static final long serialVersionUID=-1107858522700306810L;
    @Override protected void onUpdate(    AjaxRequestTarget target){
      mappings.removeAll();
      addSchemaMappingBtn.setEnabled(resourceTO.getConnectorId() != null && resourceTO.getConnectorId() > 0);
      updateResourceSchemaNames(resourceTO);
      target.add(mappingContainer);
    }
  }
);
  item.add(field);
  resourceTO.getConnectorConfigurationProperties().add(property);
}

Fixed version (ground truth):
@Override protected void populateItem(final ListItem<ConnConfProperty> item){
  final ConnConfProperty property=item.getModelObject();
  final Label label=new Label("String_Node_Str",property.getSchema().getDisplayName() == null || property.getSchema().getDisplayName().isEmpty() ? property.getSchema().getName() : property.getSchema().getDisplayName());
  item.add(label);
  final FieldPanel field;
  if (GUARDED_STRING.equals(property.getSchema().getType())) {
    field=new AjaxPasswordFieldPanel("String_Node_Str",label.getDefaultModelObjectAsString(),new PropertyModel<String>(property,"String_Node_Str"),true).setRequired(property.getSchema().isRequired()).setTitle(property.getSchema().getHelpMessage());
  }
 else {
    field=new AjaxTextFieldPanel("String_Node_Str",label.getDefaultModelObjectAsString(),new PropertyModel<String>(property,"String_Node_Str"),false).setRequired(property.getSchema().isRequired()).setTitle(property.getSchema().getHelpMessage());
    if (property.getSchema().isRequired()) {
      field.addRequiredLabel();
    }
  }
  field.getField().add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
    private static final long serialVersionUID=-1107858522700306810L;
    @Override protected void onUpdate(    AjaxRequestTarget target){
      mappings.removeAll();
      addSchemaMappingBtn.setEnabled(resourceTO.getConnectorId() != null && resourceTO.getConnectorId() > 0);
      updateResourceSchemaNames(resourceTO);
      target.add(mappingContainer);
    }
  }
);
  item.add(field);
  resourceTO.getConnectorConfigurationProperties().add(property);
}
Program: 60971
Project: 60971
Buggy source:
public AjaxPasswordFieldPanel(final String id,final String name,final IModel<String> model,final boolean active){
  super(id,name,model,active);
  field=new PasswordTextField("String_Node_Str",model);
  add(field.setLabel(new Model(name)).setOutputMarkupId(true));
  if (active) {
    field.add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
      private static final long serialVersionUID=-1107858522700306810L;
      @Override protected void onUpdate(      final AjaxRequestTarget art){
      }
    }
);
  }
}

Fixed version (ground truth):
public AjaxPasswordFieldPanel(final String id,final String name,final IModel<String> model,final boolean active){
  super(id,name,model,active);
  field=new PasswordTextField("String_Node_Str",model).setResetPassword(false);
  add(field.setLabel(new Model(name)).setOutputMarkupId(true));
  if (active) {
    field.add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
      private static final long serialVersionUID=-1107858522700306810L;
      @Override protected void onUpdate(      final AjaxRequestTarget art){
      }
    }
);
  }
}
Program: 60973
Project: 60973
Buggy source:
public Tasks(final PageParameters parameters){
  super();
  add(new PropagationTasks("String_Node_Str"));
  add(new GenericTasks("String_Node_Str"));
  add(new SyncTasks("String_Node_Str"));
}

Fixed version (ground truth):
public Tasks(final PageParameters parameters){
  super();
  add(new PropagationTasks("String_Node_Str"));
  add(new SchedTasks("String_Node_Str"));
  add(new SyncTasks("String_Node_Str"));
}
Program: 60974
Project: 60974
Buggy source:
public SchedTaskTO updateSchedTask(final SchedTaskTO taskTO){
  final SchedTaskMod taskMod=new SchedTaskMod();
  taskMod.setId(taskTO.getId());
  taskMod.setCronExpression(taskTO.getCronExpression());
  return restTemplate.postForObject(baseURL + "String_Node_Str",taskMod,SchedTaskTO.class);
}

Fixed version (ground truth):
public SchedTaskTO updateSchedTask(final SchedTaskTO taskTO){
  return restTemplate.postForObject(baseURL + "String_Node_Str",taskTO,SchedTaskTO.class);
}
Program: 60975
Project: 60975
Buggy source:
public SyncTaskTO updateSyncTask(final SyncTaskTO taskTO){
  final SyncTaskMod taskMod=new SyncTaskMod();
  taskMod.setId(taskTO.getId());
  taskMod.setCronExpression(taskTO.getCronExpression());
  taskMod.setDefaultResources(taskTO.getDefaultResources());
  taskMod.setDefaultRoles(taskTO.getDefaultRoles());
  taskMod.setUpdateIdentities(taskTO.isUpdateIdentities());
  return restTemplate.postForObject(baseURL + "String_Node_Str",taskMod,SyncTaskTO.class);
}

Fixed version (ground truth):
public SyncTaskTO updateSyncTask(final SyncTaskTO taskTO){
  return restTemplate.postForObject(baseURL + "String_Node_Str",taskTO,SyncTaskTO.class);
}
Program: 60976
Project: 60976
Buggy source:
@PreAuthorize("String_Node_Str") @RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public List<ConnInstanceTO> list(){
  List<ConnInstance> connInstances=connInstanceDAO.findAll();
  List<ConnInstanceTO> connInstanceTOs=new ArrayList<ConnInstanceTO>();
  for (  ConnInstance connector : connInstances) {
    connInstanceTOs.add(binder.getConnInstanceTO(connector));
  }
  return connInstanceTOs;
}

Fixed version (ground truth):
@PreAuthorize("String_Node_Str") @RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public List<ConnInstanceTO> list() throws NotFoundException {
  List<ConnInstance> connInstances=connInstanceDAO.findAll();
  List<ConnInstanceTO> connInstanceTOs=new ArrayList<ConnInstanceTO>();
  for (  ConnInstance connector : connInstances) {
    connInstanceTOs.add(binder.getConnInstanceTO(connector));
  }
  return connInstanceTOs;
}
Program: 60978
Project: 60978
Buggy source:
public ConnInstanceTO getConnInstanceTO(ConnInstance connInstance){
  ConnInstanceTO connInstanceTO=new ConnInstanceTO();
  connInstanceTO.setId(connInstance.getId());
  BeanUtils.copyProperties(connInstance,connInstanceTO,ignoreProperties);
  connInstanceTO.setSyncToken(connInstance.getSerializedSyncToken());
  return connInstanceTO;
}

Fixed version (ground truth):
public ConnInstanceTO getConnInstanceTO(final ConnInstance connInstance) throws NotFoundException {
  ConnInstanceTO connInstanceTO=new ConnInstanceTO();
  connInstanceTO.setId(connInstance.getId());
  ConfigurationProperties properties=connBundleManager.getConfigurationProperties(connInstance.getBundleName(),connInstance.getVersion(),connInstance.getConnectorName());
  BeanUtils.copyProperties(connInstance,connInstanceTO,ignoreProperties);
  connInstanceTO.setSyncToken(connInstance.getSerializedSyncToken());
  ConnConfPropSchema connConfPropSchema;
  ConfigurationProperty configurationProperty;
  for (  String propName : properties.getPropertyNames()) {
    if (!connInstanceTO.isPropertyPresent(propName)) {
      connConfPropSchema=new ConnConfPropSchema();
      configurationProperty=properties.getProperty(propName);
      connConfPropSchema.setName(configurationProperty.getName());
      connConfPropSchema.setDisplayName(configurationProperty.getDisplayName(propName));
      connConfPropSchema.setHelpMessage(configurationProperty.getHelpMessage(propName));
      connConfPropSchema.setRequired(configurationProperty.isRequired());
      connConfPropSchema.setType(configurationProperty.getType().getName());
      ConnConfProperty property=new ConnConfProperty();
      property.setSchema(connConfPropSchema);
      connInstanceTO.addConfiguration(property);
    }
  }
  return connInstanceTO;
}
Program: 60982
Project: 60982
Buggy source:
@Override protected void onUpdate(final AjaxRequestTarget art){
  if (resetToken.getModelObject()) {
    connectorTO.setSyncToken(null);
  }
}

Fixed version (ground truth):
@Override protected void onUpdate(final AjaxRequestTarget target){
  connectorTO.setConfiguration(new HashSet<ConnConfProperty>());
  ((DropDownChoice)bundle.getField()).setNullValid(false);
  target.add(bundle.getField());
  target.add(propertiesContainer);
  target.add(connectorName);
  target.add(version);
}
Program: 60984
Project: 60984
Buggy source:
public void setSpecification(AccountPolicy specification){
  this.specification=specification;
}

Fixed version (ground truth):
public void setSpecification(AccountPolicySpec specification){
  this.specification=specification;
}
Program: 60985
Project: 60985
Buggy source:
public AccountPolicy getSpecification(){
  return specification;
}

Fixed version (ground truth):
public AccountPolicySpec getSpecification(){
  return specification;
}
Program: 60986
Project: 60986
Buggy source:
public void setSpecification(PasswordPolicy specification){
  this.specification=specification;
}

Fixed version (ground truth):
public void setSpecification(PasswordPolicySpec specification){
  this.specification=specification;
}
Program: 60987
Project: 60987
Buggy source:
public PasswordPolicy getSpecification(){
  return specification;
}

Fixed version (ground truth):
public PasswordPolicySpec getSpecification(){
  return specification;
}
Program: 60988
Project: 60988
Buggy source:
public void setName(String name){
  this.name=name;
}

Fixed version (ground truth):
public void setName(final String name){
  this.name=name;
}
Program: 60989
Project: 60989
Buggy source:
public boolean addEntitlement(String entitlement){
  return entitlements.add(entitlement);
}

Fixed version (ground truth):
public boolean addEntitlement(final String entitlement){
  return entitlements.add(entitlement);
}
Program: 60990
Project: 60990
Buggy source:
public PasswordPolicyTO getPasswordPolicy(){
  return passwordPolicy;
}

Fixed version (ground truth):
public ReferenceMod getPasswordPolicy(){
  return passwordPolicy;
}
Program: 60991
Project: 60991
Buggy source:
public void setEntitlements(List<String> entitlements){
  this.entitlements.clear();
  if (entitlements != null && !entitlements.isEmpty()) {
    this.entitlements.addAll(entitlements);
  }
}

Fixed version (ground truth):
public void setEntitlements(final List<String> entitlements){
  this.entitlements.clear();
  if (entitlements != null && !entitlements.isEmpty()) {
    this.entitlements.addAll(entitlements);
  }
}
Program: 60992
Project: 60992
Buggy source:
public void setPasswordPolicy(PasswordPolicyTO passwordPolicy){
  this.passwordPolicy=passwordPolicy;
}

Fixed version (ground truth):
public void setPasswordPolicy(final ReferenceMod passwordPolicy){
  this.passwordPolicy=passwordPolicy;
}
Program: 60993
Project: 60993
Buggy source:
public boolean removeEntitlement(String entitlement){
  return entitlements.remove(entitlement);
}

Fixed version (ground truth):
public boolean removeEntitlement(final String entitlement){
  return entitlements.remove(entitlement);
}
Program: 60994
Project: 60994
Buggy source:
public void setSpecification(SyncPolicy specification){
  this.specification=specification;
}

Fixed version (ground truth):
public void setSpecification(SyncPolicySpec specification){
  this.specification=specification;
}
Program: 60995
Project: 60995
Buggy source:
public SyncPolicy getSpecification(){
  return specification;
}

Fixed version (ground truth):
public SyncPolicySpec getSpecification(){
  return specification;
}
Program: 60996
Project: 60996
Buggy source:
public void setSpecification(final AccountPolicy specification){
  this.specification=specification;
}

Fixed version (ground truth):
public void setSpecification(final AccountPolicySpec specification){
  this.specification=specification;
}
Program: 60997
Project: 60997
Buggy source:
public AccountPolicy getSpecification(){
  return specification;
}

Fixed version (ground truth):
public AccountPolicySpec getSpecification(){
  return specification;
}
Program: 60998
Project: 60998
Buggy source:
public void setSpecification(final PasswordPolicy specification){
  this.specification=specification;
}

Fixed version (ground truth):
public void setSpecification(final PasswordPolicySpec specification){
  this.specification=specification;
}
Program: 60999
Project: 60999
Buggy source:
public PasswordPolicy getSpecification(){
  return specification;
}

Fixed version (ground truth):
public PasswordPolicySpec getSpecification(){
  return specification;
}
Program: 61000
Project: 61000
Buggy source:
public void setSpecification(final SyncPolicy specification){
  this.specification=specification;
}

Fixed version (ground truth):
public void setSpecification(final SyncPolicySpec specification){
  this.specification=specification;
}
Program: 61001
Project: 61001
Buggy source:
public SyncPolicy getSpecification(){
  return specification;
}

Fixed version (ground truth):
public SyncPolicySpec getSpecification(){
  return specification;
}
Program: 61002
Project: 61002
Buggy source:
public ResourceTO(){
  mappings=new ArrayList<SchemaMappingTO>();
  connectorConfigurationProperties=new HashSet<ConnConfProperty>();
  propagationMode=PropagationMode.ASYNC;
  propagationPriority=0;
  createTraceLevel=TraceLevel.ALL;
  updateTraceLevel=TraceLevel.ALL;
  deleteTraceLevel=TraceLevel.ALL;
}

Fixed version (ground truth):
public ResourceTO(){
  mappings=new ArrayList<SchemaMappingTO>();
  connectorConfigurationProperties=new HashSet<ConnConfProperty>();
  propagationMode=PropagationMode.ASYNC;
  propagationPriority=0;
  createTraceLevel=TraceLevel.ALL;
  updateTraceLevel=TraceLevel.ALL;
  deleteTraceLevel=TraceLevel.ALL;
  syncTraceLevel=TraceLevel.ALL;
}
Program: 61007
Project: 61007
Buggy source:
/** 
 * Start execution for the specified TaskTO.
 * @param taskId task id
 */
public void startExecution(final Long taskId){
  restTemplate.getForObject(baseURL + "String_Node_Str",TaskExecTO.class,taskId);
}

Fixed version (ground truth):
/** 
 * Start execution for the specified TaskTO.
 * @param taskId task id
 */
public void startExecution(final Long taskId,boolean dryRun){
  restTemplate.postForObject(baseURL + "String_Node_Str",null,TaskExecTO.class,taskId,dryRun);
}
Program: 61009
Project: 61009
Buggy source:
@Test public final void update(){
  PolicyTO policyTO=restTemplate.getForObject(BASE_URL + "String_Node_Str",PasswordPolicyTO.class,2L);
  assertNotNull("String_Node_Str",policyTO);
  PasswordPolicy policy=((PasswordPolicyTO)policyTO).getSpecification();
  policy.setMaxLength(22);
  PasswordPolicyMod policyMod=new PasswordPolicyMod();
  policyMod.setId(policyTO.getId());
  policyMod.setType(PolicyType.GLOBAL_PASSWORD);
  policyMod.setSpecification(policy);
  policyMod.setDescription(policyTO.getDescription());
  policyTO=restTemplate.postForObject(BASE_URL + "String_Node_Str",policyMod,PasswordPolicyTO.class);
  assertNotNull(policyTO);
  assertEquals(PolicyType.GLOBAL_PASSWORD,policyTO.getType());
  assertEquals(22,((PasswordPolicyTO)policyTO).getSpecification().getMaxLength());
  assertEquals(8,((PasswordPolicyTO)policyTO).getSpecification().getMinLength());
}

Fixed version (ground truth):
@Test public final void update(){
  PasswordPolicyTO policyTO=restTemplate.getForObject(BASE_URL + "String_Node_Str",PasswordPolicyTO.class,2L);
  policyTO.setType(PolicyType.PASSWORD);
  policyTO.setId(0);
  policyTO=restTemplate.postForObject(BASE_URL + "String_Node_Str",policyTO,PasswordPolicyTO.class);
  policyTO=restTemplate.getForObject(BASE_URL + "String_Node_Str",PasswordPolicyTO.class,policyTO.getId());
  assertNotNull("String_Node_Str",policyTO);
  PasswordPolicy policy=((PasswordPolicyTO)policyTO).getSpecification();
  policy.setMaxLength(22);
  PasswordPolicyMod policyMod=new PasswordPolicyMod();
  policyMod.setId(policyTO.getId());
  policyMod.setType(PolicyType.PASSWORD);
  policyMod.setSpecification(policy);
  policyMod.setDescription(policyTO.getDescription());
  policyTO=restTemplate.postForObject(BASE_URL + "String_Node_Str",policyMod,PasswordPolicyTO.class);
  assertNotNull(policyTO);
  assertEquals(PolicyType.PASSWORD,policyTO.getType());
  assertEquals(22,((PasswordPolicyTO)policyTO).getSpecification().getMaxLength());
  assertEquals(8,((PasswordPolicyTO)policyTO).getSpecification().getMinLength());
}
Program: 61010
Project: 61010
Buggy source:
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  final RoleTO roleTO=(RoleTO)form.getDefaultModelObject();
  try {
    final List<String> entitlementList=new ArrayList<String>(entitlementsPalette.getModelCollection().size());
    for (    String entitlement : entitlementsPalette.getModelCollection()) {
      entitlementList.add(entitlement);
    }
    roleTO.setEntitlements(entitlementList);
    if (createFlag) {
      roleRestClient.createRole(roleTO);
    }
 else {
      setupRoleMod(roleTO);
      if (roleMod != null) {
        roleRestClient.updateRole(roleMod);
      }
    }
    ((Roles)callerPageRef.getPage()).setOperationResult(true);
    window.close(target);
  }
 catch (  Exception e) {
    error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  final RoleTO roleTO=(RoleTO)form.getDefaultModelObject();
  try {
    final List<String> entitlementList=new ArrayList<String>(entitlementsPalette.getModelCollection().size());
    for (    String entitlement : entitlementsPalette.getModelCollection()) {
      entitlementList.add(entitlement);
    }
    roleTO.setEntitlements(entitlementList);
    if (createFlag) {
      roleRestClient.createRole(roleTO);
    }
 else {
      setupRoleMod(roleTO);
      if (roleMod != null) {
        roleRestClient.updateRole(roleMod);
      }
    }
    ((Roles)callerPageRef.getPage()).setOperationResult(true);
    window.close(target);
  }
 catch (  Exception e) {
    error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
    target.add(feedbackPanel);
  }
}
Program: 61013
Project: 61013
Buggy source:
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  final UserTO userTO=(UserTO)form.getModelObject();
  try {
    if (userTO.getId() == 0) {
      userRestClient.create(userTO);
    }
 else {
      setupUserMod(userTO);
      if (userMod != null) {
        userRestClient.update(userMod);
      }
    }
    ((Users)callerPageRef.getPage()).setModalResult(true);
    ((Users)callerPageRef.getPage()).getPageParameters().set(Constants.PAGEPARAM_CREATE,userTO.getId() == 0);
    window.close(target);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    LOG.error("String_Node_Str",e);
    error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  final UserTO userTO=(UserTO)form.getModelObject();
  try {
    if (userTO.getId() == 0) {
      userRestClient.create(userTO);
    }
 else {
      setupUserMod(userTO);
      if (userMod != null) {
        userRestClient.update(userMod);
      }
    }
    ((Users)callerPageRef.getPage()).setModalResult(true);
    ((Users)callerPageRef.getPage()).getPageParameters().set(Constants.PAGEPARAM_CREATE,userTO.getId() == 0);
    window.close(target);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    LOG.error("String_Node_Str",e);
    error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
    target.add(feedbackPanel);
  }
}
Program: 61015
Project: 61015
Buggy source:
public SourceMappingTypesDropDownChoice(final String id,final PropertyModel<SourceMappingType> model,final IModel imodel,final DropDownChoice<String> chooserToPopulate){
  super(id,model,imodel);
  add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
    private static final long serialVersionUID=-1107858522700306810L;
    @Override protected void onUpdate(    final AjaxRequestTarget target){
      chooserToPopulate.setChoices(new LoadableDetachableModel<List<String>>(){
        private static final long serialVersionUID=5275935387613157437L;
        @Override protected List<String> load(){
          List<String> result;
switch (model.getObject()) {
case UserSchema:
            result=uSchemaAttrNames;
          break;
case UserDerivedSchema:
        result=uDerSchemaAttrNames;
      break;
case UserVirtualSchema:
    result=uVirSchemaAttrNames;
  break;
case SyncopeUserId:
case Password:
default :
result=Collections.EMPTY_LIST;
}
return result;
}
}
);
target.addComponent(chooserToPopulate);
target.addComponent(mappingContainer);
}
}
);
}

Fixed version (ground truth):
public SourceMappingTypesDropDownChoice(final String id,final String name,final PropertyModel<SourceMappingType> model,final AjaxDropDownChoicePanel<String> chooserToPopulate){
  super(id,name,model,false);
  field.add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
    private static final long serialVersionUID=-1107858522700306810L;
    @Override protected void onUpdate(    final AjaxRequestTarget target){
      chooserToPopulate.setRequired(true);
      chooserToPopulate.setEnabled(true);
      final List<String> result;
switch (model.getObject()) {
case UserSchema:
        result=uSchemaAttrNames;
      break;
case UserDerivedSchema:
    result=uDerSchemaAttrNames;
  break;
case UserVirtualSchema:
result=uVirSchemaAttrNames;
break;
case SyncopeUserId:
case Password:
default :
chooserToPopulate.setRequired(false);
chooserToPopulate.setEnabled(false);
result=Collections.EMPTY_LIST;
}
chooserToPopulate.setChoices(result);
target.addComponent(chooserToPopulate);
}
}
);
}
Program: 61016
Project: 61016
Buggy source:
@Override protected List<String> load(){
  List<String> result;
switch (model.getObject()) {
case UserSchema:
    result=uSchemaAttrNames;
  break;
case UserDerivedSchema:
result=uDerSchemaAttrNames;
break;
case UserVirtualSchema:
result=uVirSchemaAttrNames;
break;
case SyncopeUserId:
case Password:
default :
result=Collections.EMPTY_LIST;
}
return result;
}

Fixed version (ground truth):
@Override protected List<SourceMappingType> load(){
  return Arrays.asList(SourceMappingType.values());
}
Program: 61018
Project: 61018
Buggy source:
@Override protected void onUpdate(final AjaxRequestTarget target){
  chooserToPopulate.setChoices(new LoadableDetachableModel<List<String>>(){
    private static final long serialVersionUID=5275935387613157437L;
    @Override protected List<String> load(){
      List<String> result;
switch (model.getObject()) {
case UserSchema:
        result=uSchemaAttrNames;
      break;
case UserDerivedSchema:
    result=uDerSchemaAttrNames;
  break;
case UserVirtualSchema:
result=uVirSchemaAttrNames;
break;
case SyncopeUserId:
case Password:
default :
result=Collections.EMPTY_LIST;
}
return result;
}
}
);
target.addComponent(chooserToPopulate);
target.addComponent(mappingContainer);
}

Fixed version (ground truth):
@Override protected void onUpdate(final AjaxRequestTarget target){
  chooserToPopulate.setRequired(true);
  chooserToPopulate.setEnabled(true);
  final List<String> result;
switch (model.getObject()) {
case UserSchema:
    result=uSchemaAttrNames;
  break;
case UserDerivedSchema:
result=uDerSchemaAttrNames;
break;
case UserVirtualSchema:
result=uVirSchemaAttrNames;
break;
case SyncopeUserId:
case Password:
default :
chooserToPopulate.setRequired(false);
chooserToPopulate.setEnabled(false);
result=Collections.EMPTY_LIST;
}
chooserToPopulate.setChoices(result);
target.addComponent(chooserToPopulate);
}
Program: 61019
Project: 61019
Buggy source:
public AjaxTextFieldPanel(final String id,final String name,final IModel<String> model,final boolean active){
  super(id,name,model,active);
  field=new TextField("String_Node_Str",model);
  add(field.setLabel(new Model(name)).setOutputMarkupId(true));
  if (active) {
    field.add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
      private static final long serialVersionUID=-1107858522700306810L;
      @Override protected void onUpdate(      AjaxRequestTarget art){
      }
    }
);
  }
}

Fixed version (ground truth):
public AjaxTextFieldPanel(final String id,final String name,final IModel<String> model,final boolean active){
  super(id,name,model,active);
  field=new AutoCompleteTextField<String>("String_Node_Str",model){
    private static final long serialVersionUID=-6648767303091874219L;
    @Override protected Iterator<String> getChoices(    String input){
      final Pattern pattern=Pattern.compile(Pattern.quote(input) + "String_Node_Str",Pattern.CASE_INSENSITIVE);
      final List<String> result=new ArrayList<String>();
      for (      String choice : choices) {
        if (pattern.matcher(choice).matches()) {
          result.add(choice);
        }
      }
      return result.iterator();
    }
  }
;
  add(field.setLabel(new Model(name)).setOutputMarkupId(true));
  if (active) {
    field.add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
      private static final long serialVersionUID=-1107858522700306810L;
      @Override protected void onUpdate(      AjaxRequestTarget art){
      }
    }
);
  }
}
Program: 61020
Project: 61020
Buggy source:
@Override @Before public void setUp() throws Exception {
  super.setUp();
  selenium=new DefaultSelenium("String_Node_Str",4444,"String_Node_Str","String_Node_Str");
  selenium.start();
  selenium.open("String_Node_Str");
  selenium.type("String_Node_Str",ADMIN);
  selenium.type("String_Node_Str",PASSWORD);
  selenium.click("String_Node_Str");
  selenium.waitForPageToLoad("String_Node_Str");
}

Fixed version (ground truth):
@Override @Before public void setUp() throws Exception {
  super.setUp(BASE_URL,"String_Node_Str");
  selenium.open("String_Node_Str");
  selenium.type("String_Node_Str",ADMIN);
  selenium.type("String_Node_Str",PASSWORD);
  selenium.click("String_Node_Str");
  selenium.waitForPageToLoad("String_Node_Str");
}
Program: 61021
Project: 61021
Buggy source:
public void setPropagationOperation(PropagationOperation resourceOperationType){
  this.propagationOperation=resourceOperationType;
}

Fixed version (ground truth):
public void setPropagationOperation(PropagationOperation propagationOperation){
  this.propagationOperation=propagationOperation;
}
Program: 61022
Project: 61022
Buggy source:
public String get(final WebRequest request,final String key){
  String result=null;
  Cookie prefCookie=request.getCookie(Constants.PREFS_COOKIE_NAME);
  if (prefCookie != null) {
    Map<String,String> prefs;
    try {
      prefs=getPrefs(new String(Base64.decodeBase64(prefCookie.getValue().getBytes())));
    }
 catch (    IOException e) {
      LOG.error("String_Node_Str" + prefCookie.getValue(),e);
      prefs=new HashMap<String,String>();
    }
    result=prefs.get(key);
  }
 else {
    LOG.warn("String_Node_Str" + Constants.PREFS_COOKIE_NAME);
  }
  return result;
}

Fixed version (ground truth):
public String get(final WebRequest request,final String key){
  String result=null;
  Cookie prefCookie=request.getCookie(Constants.PREFS_COOKIE_NAME);
  if (prefCookie != null) {
    Map<String,String> prefs;
    try {
      prefs=getPrefs(new String(Base64.decodeBase64(prefCookie.getValue().getBytes())));
    }
 catch (    IOException e) {
      LOG.error("String_Node_Str",prefCookie.getValue(),e);
      prefs=new HashMap<String,String>();
    }
    result=prefs.get(key);
  }
 else {
    LOG.debug("String_Node_Str",Constants.PREFS_COOKIE_NAME);
  }
  return result;
}
Program: 61024
Project: 61024
Buggy source:
@Override public void onClick(AjaxRequestTarget target){
  createConnectorWin.setPageCreator(new ModalWindow.PageCreator(){
    public Page createPage(){
      ConnectorModalPage form=new ConnectorModalPage(Connectors.this,editConnectorWin,new ConnInstanceTO(),true);
      return form;
    }
  }
);
  createConnectorWin.show(target);
}

Fixed version (ground truth):
@Override public void onClick(AjaxRequestTarget target){
  createConnectorWin.setPageCreator(new ModalWindow.PageCreator(){
    private static final long serialVersionUID=-7834632442532690940L;
    @Override public Page createPage(){
      ConnectorModalPage form=new ConnectorModalPage(Connectors.this,editConnectorWin,new ConnInstanceTO(),true);
      return form;
    }
  }
);
  createConnectorWin.show(target);
}
Program: 61025
Project: 61025
Buggy source:
/** 
 * Set a WindowClosedCallback for a ModalWindow instance.
 * @param current window
 * @param container to refresh
 */
public void setWindowClosedCallback(ModalWindow window,final WebMarkupContainer container){
  window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
    public void onClose(    AjaxRequestTarget target){
      target.addComponent(container);
      if (operationResult) {
        info(getString("String_Node_Str"));
        target.addComponent(feedbackPanel);
        operationResult=false;
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Set a WindowClosedCallback for a ModalWindow instance.
 * @param current window
 * @param container to refresh
 */
private void setWindowClosedCallback(ModalWindow window,final WebMarkupContainer container){
  window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
    private static final long serialVersionUID=8804221891699487139L;
    @Override public void onClose(    AjaxRequestTarget target){
      target.addComponent(container);
      if (operationResult) {
        info(getString("String_Node_Str"));
        target.addComponent(feedbackPanel);
        operationResult=false;
      }
    }
  }
);
}
Program: 61027
Project: 61027
Buggy source:
public Page createPage(){
  ConnectorModalPage form=new ConnectorModalPage(Connectors.this,editConnectorWin,new ConnInstanceTO(),true);
  return form;
}

Fixed version (ground truth):
@Override public Page createPage(){
  ConnectorModalPage form=new ConnectorModalPage(Connectors.this,editConnectorWin,new ConnInstanceTO(),true);
  return form;
}
Program: 61028
Project: 61028
Buggy source:
public void onClose(AjaxRequestTarget target){
  target.addComponent(container);
  if (operationResult) {
    info(getString("String_Node_Str"));
    target.addComponent(feedbackPanel);
    operationResult=false;
  }
}

Fixed version (ground truth):
@Override public void onClose(AjaxRequestTarget target){
  target.addComponent(container);
  if (operationResult) {
    info(getString("String_Node_Str"));
    target.addComponent(feedbackPanel);
    operationResult=false;
  }
}
Program: 61029
Project: 61029
Buggy source:
@Override public void populateItem(final Item<ICellPopulator<ConnInstanceTO>> cellItem,final String componentId,final IModel<ConnInstanceTO> model){
  final ConnInstanceTO connectorTO=model.getObject();
  AjaxLink deleteLink=new IndicatingDeleteOnConfirmAjaxLink("String_Node_Str"){
    @Override public void onClick(    final AjaxRequestTarget target){
      try {
        if (!checkDeleteIsForbidden(connectorTO)) {
          restClient.delete(connectorTO.getId());
          info(getString("String_Node_Str"));
        }
 else {
          error(getString("String_Node_Str"));
        }
      }
 catch (      SyncopeClientCompositeErrorException e) {
        error(getString("String_Node_Str"));
        LOG.error("String_Node_Str" + connectorTO.getId(),e);
      }
      target.addComponent(container);
      target.addComponent(feedbackPanel);
    }
  }
;
  DeleteLinkPanel panel=new DeleteLinkPanel(componentId,model);
  panel.add(deleteLink);
  MetaDataRoleAuthorizationStrategy.authorize(panel,ENABLE,xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str"));
  cellItem.add(panel);
}

Fixed version (ground truth):
@Override public void populateItem(final Item<ICellPopulator<ConnInstanceTO>> cellItem,final String componentId,final IModel<ConnInstanceTO> model){
  final ConnInstanceTO connectorTO=model.getObject();
  AjaxLink deleteLink=new IndicatingDeleteOnConfirmAjaxLink("String_Node_Str"){
    private static final long serialVersionUID=-7978723352517770644L;
    @Override public void onClick(    final AjaxRequestTarget target){
      try {
        if (!checkDeleteIsForbidden(connectorTO)) {
          restClient.delete(connectorTO.getId());
          info(getString("String_Node_Str"));
        }
 else {
          error(getString("String_Node_Str"));
        }
      }
 catch (      SyncopeClientCompositeErrorException e) {
        error(getString("String_Node_Str"));
        LOG.error("String_Node_Str" + connectorTO.getId(),e);
      }
      target.addComponent(container);
      target.addComponent(feedbackPanel);
    }
  }
;
  DeleteLinkPanel panel=new DeleteLinkPanel(componentId,model);
  panel.add(deleteLink);
  MetaDataRoleAuthorizationStrategy.authorize(panel,ENABLE,xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str"));
  cellItem.add(panel);
}
Program: 61030
Project: 61030
Buggy source:
@Override public IModel<ConnInstanceTO> model(final ConnInstanceTO connector){
  return new AbstractReadOnlyModel<ConnInstanceTO>(){
    @Override public ConnInstanceTO getObject(){
      return connector;
    }
  }
;
}

Fixed version (ground truth):
@Override public IModel<ConnInstanceTO> model(final ConnInstanceTO connector){
  return new AbstractReadOnlyModel<ConnInstanceTO>(){
    private static final long serialVersionUID=-6033068018293569398L;
    @Override public ConnInstanceTO getObject(){
      return connector;
    }
  }
;
}
Program: 61031
Project: 61031
Buggy source:
protected void onUpdate(AjaxRequestTarget target){
  prefMan.set(getWebRequestCycle().getWebRequest(),getWebRequestCycle().getWebResponse(),Constants.PREF_CONNECTORS_PAGINATOR_ROWS,String.valueOf(paginatorRows));
  table.setRowsPerPage(paginatorRows);
  target.addComponent(container);
}

Fixed version (ground truth):
@Override protected void onUpdate(AjaxRequestTarget target){
  prefMan.set(getWebRequestCycle().getWebRequest(),getWebRequestCycle().getWebResponse(),Constants.PREF_CONNECTORS_PAGINATOR_ROWS,String.valueOf(paginatorRows));
  table.setRowsPerPage(paginatorRows);
  target.addComponent(container);
}
Program: 61033
Project: 61033
Buggy source:
public DisplayAttributesModalPage(final Users basePage,final IModel<List<String>> schemaNames,final ModalWindow window){
  super();
  Form userAttributesForm=new Form("String_Node_Str");
  userAttributesForm.setModel(new CompoundPropertyModel(this));
  selectedSchemas=prefMan.getList(getWebRequestCycle().getWebRequest(),Constants.PREF_USERS_ATTRIBUTES_VIEW);
  userAttributesForm.add(new CheckBoxMultipleChoice("String_Node_Str",new PropertyModel(this,"String_Node_Str"),schemaNames));
  IndicatingAjaxButton submit=new IndicatingAjaxButton("String_Node_Str",new Model(getString("String_Node_Str"))){
    @Override protected void onSubmit(    final AjaxRequestTarget target,    final Form form){
      prefMan.setList(getWebRequest(),getWebRequestCycle().getWebResponse(),Constants.PREF_USERS_ATTRIBUTES_VIEW,selectedSchemas);
      basePage.setModalResult(true);
      window.close(target);
    }
  }
;
  userAttributesForm.add(submit);
  add(userAttributesForm);
}

Fixed version (ground truth):
public DisplayAttributesModalPage(final Users basePage,final IModel<List<String>> schemaNames,final ModalWindow window){
  super();
  Form userAttributesForm=new Form("String_Node_Str");
  userAttributesForm.setModel(new CompoundPropertyModel(this));
  selectedSchemas=prefMan.getList(getWebRequestCycle().getWebRequest(),Constants.PREF_USERS_ATTRIBUTES_VIEW);
  userAttributesForm.add(new CheckBoxMultipleChoice("String_Node_Str",new PropertyModel(this,"String_Node_Str"),schemaNames));
  IndicatingAjaxButton submit=new IndicatingAjaxButton("String_Node_Str",new ResourceModel("String_Node_Str")){
    private static final long serialVersionUID=-4804368561204623354L;
    @Override protected void onSubmit(    final AjaxRequestTarget target,    final Form form){
      prefMan.setList(getWebRequest(),getWebRequestCycle().getWebResponse(),Constants.PREF_USERS_ATTRIBUTES_VIEW,selectedSchemas);
      basePage.setModalResult(true);
      window.close(target);
    }
  }
;
  userAttributesForm.add(submit);
  add(userAttributesForm);
}