nus-yam/ex-repair huggingface dataset:
Program: 60906
Project: 60906
Buggy source:
public void setFake(String fake){
  this.fake=fake;
}

Fixed version (ground truth):
public void setFake(boolean fake){
  this.fake=fake;
}
Program: 60908
Project: 60908
Buggy source:
@Override public void onClick(final AjaxRequestTarget target){
  createConfigWin.setPageCreator(new ModalWindow.PageCreator(){
    private static final long serialVersionUID=-7834632442532690940L;
    @Override public Page createPage(){
      return new ConfigurationModalPage(Configuration.this.getPageReference(),createConfigWin,new ConfigurationTO(),true);
    }
  }
);
  createConfigWin.show(target);
}

Fixed version (ground truth):
@Override public void onClick(){
  StringResourceStream stream=new StringResourceStream(restClient.dbContentAsXml(),"String_Node_Str");
  getRequestCycle().scheduleRequestHandlerAfterCurrent(new ResourceStreamRequestHandler(stream).setFileName("String_Node_Str").setContentDisposition(ContentDisposition.ATTACHMENT));
}
Program: 60912
Project: 60912
Buggy source:
/** 
 * Create the user on every associated resource. 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 user to be created.
 * @param password to be set.
 * @param mandResNames to ask for mandatory or optionalprovisioning.
 * @throws PropagationException when anything goes wrong
 */
public void create(final SyncopeUser user,final String password,final Set<String> mandResNames) throws PropagationException {
  final PropagationByResource propByRes=new PropagationByResource();
  propByRes.set(PropagationOperation.CREATE,user.getExternalResources());
  provision(user,password,propByRes,mandResNames == null ? Collections.EMPTY_SET : mandResNames);
}

Fixed version (ground truth):
/** 
 * Create the user on every associated resource. 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 user to be created
 * @param password to be set
 * @param enable wether user must be enabled or not
 * @param mandResNames to ask for mandatory or optionalprovisioning
 * @throws PropagationException when anything goes wrong
 */
public void create(final SyncopeUser user,final String password,final Boolean enable,final Set<String> mandResNames) throws PropagationException {
  final PropagationByResource propByRes=new PropagationByResource();
  propByRes.set(PropagationOperation.CREATE,user.getExternalResources());
  provision(user,password,enable,propByRes,mandResNames == null ? Collections.EMPTY_SET : mandResNames);
}
Program: 60913
Project: 60913
Buggy source:
/** 
 * Performs update 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 user to be updated.
 * @param password to be updated.
 * @param propByRes operations to perform on each resource.
 * @param mandResNames to ask for mandatory or optional update.
 * @throws PropagationException if anything goes wrong
 */
public void update(final SyncopeUser user,final String password,final PropagationByResource propByRes,final Set<String> mandResNames) throws PropagationException {
  provision(user,password,propByRes,mandResNames == null ? Collections.EMPTY_SET : mandResNames);
}

Fixed version (ground truth):
/** 
 * Performs update 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 user to be updated.
 * @param password to be updated.
 * @param enable wether user must be enabled or not
 * @param propByRes operations to perform on each resource.
 * @param mandResNames to ask for mandatory or optional update.
 * @throws PropagationException if anything goes wrong
 */
public void update(final SyncopeUser user,final String password,final Boolean enable,final PropagationByResource propByRes,final Set<String> mandResNames) throws PropagationException {
  provision(user,password,enable,propByRes,mandResNames == null ? Collections.EMPTY_SET : mandResNames);
}
Program: 60914
Project: 60914
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 user to be deleted
 * @param mandResNames to ask for mandatory or optyional delete
 * @throws PropagationException if anything goes wrong
 */
public void delete(final SyncopeUser user,final Set<String> mandResNames) throws PropagationException {
  final PropagationByResource propByRes=new PropagationByResource();
  propByRes.set(PropagationOperation.DELETE,user.getExternalResources());
  provision(user,null,propByRes,mandResNames == null ? Collections.EMPTY_SET : mandResNames);
}

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 user to be deleted
 * @param mandResNames to ask for mandatory or optyional delete
 * @throws PropagationException if anything goes wrong
 */
public void delete(final SyncopeUser user,final Set<String> mandResNames) throws PropagationException {
  final PropagationByResource propByRes=new PropagationByResource();
  propByRes.set(PropagationOperation.DELETE,user.getExternalResources());
  provision(user,null,false,propByRes,mandResNames == null ? Collections.EMPTY_SET : mandResNames);
}
Program: 60915
Project: 60915
Buggy source:
@Override public SyncopeUser suspend(final SyncopeUser user) throws WorkflowException, PropagationException {
  doExecuteAction(user,"String_Node_Str",null);
  setStatus(user.getWorkflowId(),user);
  SyncopeUser updated=userDAO.save(user);
  PropagationByResource propByRes=new PropagationByResource();
  propByRes.addAll(PropagationOperation.UPDATE,user.getExternalResources());
  propagationManager.update(user,null,propByRes,null);
  return updated;
}

Fixed version (ground truth):
@Override public SyncopeUser suspend(final SyncopeUser user) throws WorkflowException, PropagationException {
  doExecuteAction(user,"String_Node_Str",null);
  setStatus(user.getWorkflowId(),user);
  SyncopeUser updated=userDAO.save(user);
  PropagationByResource propByRes=new PropagationByResource();
  propByRes.addAll(PropagationOperation.UPDATE,user.getExternalResources());
  propagationManager.update(user,null,false,propByRes,null);
  return updated;
}
Program: 60916
Project: 60916
Buggy source:
@Override public SyncopeUser reactivate(final SyncopeUser user) throws WorkflowException, PropagationException {
  doExecuteAction(user,"String_Node_Str",null);
  setStatus(user.getWorkflowId(),user);
  SyncopeUser updated=userDAO.save(user);
  PropagationByResource propByRes=new PropagationByResource();
  propByRes.addAll(PropagationOperation.UPDATE,user.getExternalResources());
  propagationManager.update(user,null,propByRes,null);
  return updated;
}

Fixed version (ground truth):
@Override public SyncopeUser reactivate(final SyncopeUser user) throws WorkflowException, PropagationException {
  doExecuteAction(user,"String_Node_Str",null);
  setStatus(user.getWorkflowId(),user);
  SyncopeUser updated=userDAO.save(user);
  PropagationByResource propByRes=new PropagationByResource();
  propByRes.addAll(PropagationOperation.UPDATE,user.getExternalResources());
  propagationManager.update(user,null,true,propByRes,null);
  return updated;
}
Program: 60917
Project: 60917
Buggy source:
@Override public SyncopeUser activate(final SyncopeUser user,final String token) throws WorkflowException, PropagationException {
  doExecuteAction(user,"String_Node_Str",Collections.singletonMap(TOKEN,(Object)token));
  setStatus(user.getWorkflowId(),user);
  SyncopeUser updated=userDAO.save(user);
  PropagationByResource propByRes=new PropagationByResource();
  propByRes.addAll(PropagationOperation.UPDATE,user.getExternalResources());
  propagationManager.update(user,null,propByRes,null);
  return updated;
}

Fixed version (ground truth):
@Override public SyncopeUser activate(final SyncopeUser user,final String token) throws WorkflowException, PropagationException {
  doExecuteAction(user,"String_Node_Str",Collections.singletonMap(TOKEN,(Object)token));
  setStatus(user.getWorkflowId(),user);
  SyncopeUser updated=userDAO.save(user);
  PropagationByResource propByRes=new PropagationByResource();
  propByRes.addAll(PropagationOperation.UPDATE,user.getExternalResources());
  propagationManager.update(user,null,true,propByRes,null);
  return updated;
}
Program: 60918
Project: 60918
Buggy source:
@Override public SyncopeUser create(final UserTO userTO,final Set<Long> mandatoryRoles,final Set<String> mandatoryResources) throws WorkflowException, PropagationException {
  final Map<String,Object> variables=new HashMap<String,Object>();
  variables.put(USER_TO,userTO);
  final ProcessInstance processInstance;
  try {
    processInstance=runtimeService.startProcessInstanceByKey("String_Node_Str",variables);
  }
 catch (  ActivitiException e) {
    throw new WorkflowException(e);
  }
  SyncopeUser user=(SyncopeUser)runtimeService.getVariable(processInstance.getProcessInstanceId(),SYNCOPE_USER);
  setStatus(processInstance.getProcessInstanceId(),user);
  user=userDAO.save(user);
  User activitiUser=identityService.newUser(user.getId().toString());
  activitiUser.setPassword(userTO.getPassword());
  identityService.saveUser(activitiUser);
  Set<String> mandatoryResourceNames=userService.getMandatoryResourceNames(user,mandatoryRoles,mandatoryResources);
  if (!mandatoryResourceNames.isEmpty()) {
    LOG.debug("String_Node_Str",mandatoryResourceNames);
  }
  propagationManager.create(user,userTO.getPassword(),mandatoryResourceNames);
  return user;
}

Fixed version (ground truth):
@Override public SyncopeUser create(final UserTO userTO,final Set<Long> mandatoryRoles,final Set<String> mandatoryResources) throws WorkflowException, PropagationException {
  final Map<String,Object> variables=new HashMap<String,Object>();
  variables.put(USER_TO,userTO);
  final ProcessInstance processInstance;
  try {
    processInstance=runtimeService.startProcessInstanceByKey("String_Node_Str",variables);
  }
 catch (  ActivitiException e) {
    throw new WorkflowException(e);
  }
  SyncopeUser user=(SyncopeUser)runtimeService.getVariable(processInstance.getProcessInstanceId(),SYNCOPE_USER);
  setStatus(processInstance.getProcessInstanceId(),user);
  user=userDAO.save(user);
  User activitiUser=identityService.newUser(user.getId().toString());
  identityService.saveUser(activitiUser);
  Set<String> mandatoryResourceNames=userService.getMandatoryResourceNames(user,mandatoryRoles,mandatoryResources);
  if (!mandatoryResourceNames.isEmpty()) {
    LOG.debug("String_Node_Str",mandatoryResourceNames);
  }
  Boolean enable=(Boolean)runtimeService.getVariable(processInstance.getProcessInstanceId(),PROPAGATE_ENABLE);
  propagationManager.create(user,userTO.getPassword(),enable,mandatoryResourceNames);
  return user;
}
Program: 60919
Project: 60919
Buggy source:
@Override public SyncopeUser update(final SyncopeUser user,final UserMod userMod,final Set<Long> mandatoryRoles,final Set<String> mandatoryResources) throws WorkflowException, PropagationException {
  doExecuteAction(user,"String_Node_Str",Collections.singletonMap(USER_MOD,(Object)userMod));
  setStatus(user.getWorkflowId(),user);
  SyncopeUser updated=userDAO.save(user);
  PropagationByResource propByRes=(PropagationByResource)runtimeService.getVariable(user.getWorkflowId(),PROP_BY_RESOURCE);
  Set<String> mandatoryResourceNames=userService.getMandatoryResourceNames(user,mandatoryRoles,mandatoryResources);
  if (!mandatoryResourceNames.isEmpty()) {
    LOG.debug("String_Node_Str",mandatoryResourceNames);
  }
  propagationManager.update(updated,userMod.getPassword(),propByRes,mandatoryResourceNames);
  return updated;
}

Fixed version (ground truth):
@Override public SyncopeUser update(final SyncopeUser user,final UserMod userMod,final Set<Long> mandatoryRoles,final Set<String> mandatoryResources) throws WorkflowException, PropagationException {
  doExecuteAction(user,"String_Node_Str",Collections.singletonMap(USER_MOD,(Object)userMod));
  setStatus(user.getWorkflowId(),user);
  SyncopeUser updated=userDAO.save(user);
  PropagationByResource propByRes=(PropagationByResource)runtimeService.getVariable(user.getWorkflowId(),PROP_BY_RESOURCE);
  Set<String> mandatoryResourceNames=userService.getMandatoryResourceNames(user,mandatoryRoles,mandatoryResources);
  if (!mandatoryResourceNames.isEmpty()) {
    LOG.debug("String_Node_Str",mandatoryResourceNames);
  }
  propagationManager.update(updated,userMod.getPassword(),null,propByRes,mandatoryResourceNames);
  return updated;
}
Program: 60920
Project: 60920
Buggy source:
@Override public SyncopeUser suspend(final SyncopeUser user) throws WorkflowException, PropagationException {
  user.setStatus("String_Node_Str");
  SyncopeUser updated=userDAO.save(user);
  PropagationByResource propByRes=new PropagationByResource();
  propByRes.addAll(PropagationOperation.UPDATE,user.getExternalResources());
  propagationManager.update(user,null,propByRes,null);
  return updated;
}

Fixed version (ground truth):
@Override public SyncopeUser suspend(final SyncopeUser user) throws WorkflowException, PropagationException {
  user.setStatus("String_Node_Str");
  SyncopeUser updated=userDAO.save(user);
  PropagationByResource propByRes=new PropagationByResource();
  propByRes.addAll(PropagationOperation.UPDATE,user.getExternalResources());
  propagationManager.update(user,null,false,propByRes,null);
  return updated;
}
Program: 60921
Project: 60921
Buggy source:
@Override public SyncopeUser reactivate(final SyncopeUser user) throws WorkflowException, PropagationException {
  user.setStatus("String_Node_Str");
  SyncopeUser updated=userDAO.save(user);
  PropagationByResource propByRes=new PropagationByResource();
  propByRes.addAll(PropagationOperation.UPDATE,user.getExternalResources());
  propagationManager.update(user,null,propByRes,null);
  return updated;
}

Fixed version (ground truth):
@Override public SyncopeUser reactivate(final SyncopeUser user) throws WorkflowException, PropagationException {
  user.setStatus("String_Node_Str");
  SyncopeUser updated=userDAO.save(user);
  PropagationByResource propByRes=new PropagationByResource();
  propByRes.addAll(PropagationOperation.UPDATE,user.getExternalResources());
  propagationManager.update(user,null,true,propByRes,null);
  return updated;
}
Program: 60922
Project: 60922
Buggy source:
@Override public SyncopeUser activate(final SyncopeUser user,final String token) throws WorkflowException, PropagationException {
  if (!user.checkToken(token)) {
    throw new WorkflowException(new RuntimeException("String_Node_Str" + token));
  }
  user.removeToken();
  user.setStatus("String_Node_Str");
  SyncopeUser updated=userDAO.save(user);
  PropagationByResource propByRes=new PropagationByResource();
  propByRes.addAll(PropagationOperation.UPDATE,user.getExternalResources());
  propagationManager.update(user,null,propByRes,null);
  return updated;
}

Fixed version (ground truth):
@Override public SyncopeUser activate(final SyncopeUser user,final String token) throws WorkflowException, PropagationException {
  if (!user.checkToken(token)) {
    throw new WorkflowException(new RuntimeException("String_Node_Str" + token));
  }
  user.removeToken();
  user.setStatus("String_Node_Str");
  SyncopeUser updated=userDAO.save(user);
  PropagationByResource propByRes=new PropagationByResource();
  propByRes.addAll(PropagationOperation.UPDATE,user.getExternalResources());
  propagationManager.update(user,null,true,propByRes,null);
  return updated;
}
Program: 60923
Project: 60923
Buggy source:
@Override public SyncopeUser create(final UserTO userTO,final Set<Long> mandatoryRoles,final Set<String> mandatoryResources) throws WorkflowException, PropagationException {
  SyncopeUser user=userService.create(userTO);
  user.setStatus("String_Node_Str");
  user=userDAO.save(user);
  Set<String> mandatoryResourceNames=userService.getMandatoryResourceNames(user,mandatoryRoles,mandatoryResources);
  if (!mandatoryResourceNames.isEmpty()) {
    LOG.debug("String_Node_Str",mandatoryResourceNames);
  }
  propagationManager.create(user,userTO.getPassword(),mandatoryResourceNames);
  return user;
}

Fixed version (ground truth):
@Override public SyncopeUser create(final UserTO userTO,final Set<Long> mandatoryRoles,final Set<String> mandatoryResources) throws WorkflowException, PropagationException {
  SyncopeUser user=userService.create(userTO);
  user.setStatus("String_Node_Str");
  user=userDAO.save(user);
  Set<String> mandatoryResourceNames=userService.getMandatoryResourceNames(user,mandatoryRoles,mandatoryResources);
  if (!mandatoryResourceNames.isEmpty()) {
    LOG.debug("String_Node_Str",mandatoryResourceNames);
  }
  propagationManager.create(user,userTO.getPassword(),false,mandatoryResourceNames);
  return user;
}
Program: 60924
Project: 60924
Buggy source:
@Override public SyncopeUser update(final SyncopeUser user,final UserMod userMod,final Set<Long> mandatoryRoles,final Set<String> mandatoryResources) throws WorkflowException, PropagationException {
  Map.Entry<SyncopeUser,PropagationByResource> updated=userService.update(user,userMod);
  Set<String> mandatoryResourceNames=userService.getMandatoryResourceNames(user,mandatoryRoles,mandatoryResources);
  if (!mandatoryResourceNames.isEmpty()) {
    LOG.debug("String_Node_Str",mandatoryResourceNames);
  }
  propagationManager.update(user,userMod.getPassword(),updated.getValue(),mandatoryResourceNames);
  return updated.getKey();
}

Fixed version (ground truth):
@Override public SyncopeUser update(final SyncopeUser user,final UserMod userMod,final Set<Long> mandatoryRoles,final Set<String> mandatoryResources) throws WorkflowException, PropagationException {
  Map.Entry<SyncopeUser,PropagationByResource> updated=userService.update(user,userMod);
  Set<String> mandatoryResourceNames=userService.getMandatoryResourceNames(user,mandatoryRoles,mandatoryResources);
  if (!mandatoryResourceNames.isEmpty()) {
    LOG.debug("String_Node_Str",mandatoryResourceNames);
  }
  propagationManager.update(user,userMod.getPassword(),null,updated.getValue(),mandatoryResourceNames);
  return updated.getKey();
}
Program: 60926
Project: 60926
Buggy source:
public UserTO getUserTO(final SyncopeUser user){
  UserTO userTO=new UserTO();
  userTO.setId(user.getId());
  userTO.setToken(user.getToken());
  userTO.setTokenExpireTime(user.getTokenExpireTime());
  userTO.setPassword(user.getPassword());
  userTO.setStatus(user.getStatus());
  fillTO(userTO,user.getAttributes(),user.getDerivedAttributes(),user.getVirtualAttributes(),user.getExternalResources());
  MembershipTO membershipTO;
  for (  Membership membership : user.getMemberships()) {
    membershipTO=new MembershipTO();
    membershipTO.setId(membership.getId());
    membershipTO.setRoleId(membership.getSyncopeRole().getId());
    membershipTO.setRoleName(membership.getSyncopeRole().getName());
    fillTO(membershipTO,membership.getAttributes(),membership.getDerivedAttributes(),membership.getVirtualAttributes(),membership.getExternalResources());
    userTO.addMembership(membershipTO);
  }
  return userTO;
}

Fixed version (ground truth):
/** 
 * Generate a transfer object for the given JPA entity.
 * @param user as JPA entity
 * @return transfer object
 */
public UserTO getUserTO(final SyncopeUser user){
  UserTO userTO=new UserTO();
  userTO.setId(user.getId());
  userTO.setToken(user.getToken());
  userTO.setTokenExpireTime(user.getTokenExpireTime());
  userTO.setPassword(user.getPassword());
  userTO.setStatus(user.getStatus());
  fillTO(userTO,user.getAttributes(),user.getDerivedAttributes(),user.getVirtualAttributes(),user.getExternalResources());
  MembershipTO membershipTO;
  for (  Membership membership : user.getMemberships()) {
    membershipTO=new MembershipTO();
    membershipTO.setId(membership.getId());
    membershipTO.setRoleId(membership.getSyncopeRole().getId());
    membershipTO.setRoleName(membership.getSyncopeRole().getName());
    fillTO(membershipTO,membership.getAttributes(),membership.getDerivedAttributes(),membership.getVirtualAttributes(),membership.getExternalResources());
    userTO.addMembership(membershipTO);
  }
  return userTO;
}
Program: 60927
Project: 60927
Buggy source:
public Set<String> getMandatoryResourceNames(final SyncopeUser user,Set<Long> mandatoryRoles,Set<String> mandatoryResources){
  if (mandatoryRoles == null) {
    mandatoryRoles=Collections.EMPTY_SET;
  }
  if (mandatoryResources == null) {
    mandatoryResources=Collections.EMPTY_SET;
  }
  Set<String> mandatoryResourceNames=new HashSet<String>();
  for (  ExternalResource resource : user.getExternalResources()) {
    if (mandatoryResources.contains(resource.getName())) {
      mandatoryResourceNames.add(resource.getName());
    }
  }
  for (  SyncopeRole role : user.getRoles()) {
    if (mandatoryRoles.contains(role.getId())) {
      for (      ExternalResource resource : role.getExternalResources()) {
        mandatoryResourceNames.add(resource.getName());
      }
    }
  }
  return mandatoryResourceNames;
}

Fixed version (ground truth):
public Set<String> getMandatoryResourceNames(final SyncopeUser user,Set<Long> mandatoryRoles,Set<String> mandatoryResources){
  if (mandatoryRoles == null) {
    mandatoryRoles=Collections.EMPTY_SET;
  }
  if (mandatoryResources == null) {
    mandatoryResources=Collections.EMPTY_SET;
  }
  Set<String> mandatoryResourceNames=new HashSet<String>();
  for (  String resource : user.getExternalResourceNames()) {
    if (mandatoryResources.contains(resource)) {
      mandatoryResourceNames.add(resource);
    }
  }
  for (  SyncopeRole role : user.getRoles()) {
    if (mandatoryRoles.contains(role.getId())) {
      for (      ExternalResource resource : role.getExternalResources()) {
        mandatoryResourceNames.add(resource.getName());
      }
    }
  }
  return mandatoryResourceNames;
}
Program: 60928
Project: 60928
Buggy source:
@Test public void getSchemaNames(){
  ResourceTO resourceTO=null;
  resourceTO=restTemplate.getForObject(BASE_URL + "String_Node_Str",ResourceTO.class,"String_Node_Str");
  assertNotNull(resourceTO);
  List<String> schemaNames=Arrays.asList(restTemplate.postForObject(BASE_URL + "String_Node_Str",resourceTO,String[].class));
  assertNotNull(schemaNames);
  assertFalse(schemaNames.isEmpty());
  resourceTO=restTemplate.getForObject(BASE_URL + "String_Node_Str",ResourceTO.class,"String_Node_Str");
  assertNotNull(resourceTO);
  schemaNames=Arrays.asList(restTemplate.postForObject(BASE_URL + "String_Node_Str",resourceTO,String[].class));
  assertNotNull(schemaNames);
  assertTrue(schemaNames.size() == 1);
  resourceTO=restTemplate.getForObject(BASE_URL + "String_Node_Str",ResourceTO.class,"String_Node_Str");
  assertNotNull(resourceTO);
  schemaNames=Arrays.asList(restTemplate.postForObject(BASE_URL + "String_Node_Str",resourceTO,String[].class));
  assertNotNull(schemaNames);
  assertFalse(schemaNames.isEmpty());
}

Fixed version (ground truth):
@Test public void getSchemaNames(){
  ResourceTO resourceTO=null;
  resourceTO=restTemplate.getForObject(BASE_URL + "String_Node_Str",ResourceTO.class,"String_Node_Str");
  assertNotNull(resourceTO);
  List<String> schemaNames=Arrays.asList(restTemplate.postForObject(BASE_URL + "String_Node_Str",resourceTO,String[].class));
  assertNotNull(schemaNames);
  assertFalse(schemaNames.isEmpty());
  resourceTO=restTemplate.getForObject(BASE_URL + "String_Node_Str",ResourceTO.class,"String_Node_Str");
  assertNotNull(resourceTO);
  schemaNames=Arrays.asList(restTemplate.postForObject(BASE_URL + "String_Node_Str",resourceTO,String[].class));
  assertNotNull(schemaNames);
  assertEquals(1,schemaNames.size());
  resourceTO=restTemplate.getForObject(BASE_URL + "String_Node_Str",ResourceTO.class,"String_Node_Str");
  assertNotNull(resourceTO);
  schemaNames=Arrays.asList(restTemplate.postForObject(BASE_URL + "String_Node_Str",resourceTO,String[].class));
  assertNotNull(schemaNames);
  assertFalse(schemaNames.isEmpty());
}
Program: 60931
Project: 60931
Buggy source:
/** 
 * Populator for Validator Schema DropDown components.
 */
public Set<String> getAllValidatorClasses(){
  Set<String> validators=null;
  try {
    validators=restTemplate.getForObject(baseURL + "String_Node_Str",Set.class);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    LOG.error("String_Node_Str",e);
  }
  return validators;
}

Fixed version (ground truth):
/** 
 * Populator for Validator Schema DropDown components.
 */
public List<String> getAllValidatorClasses(){
  List<String> validators=null;
  try {
    validators=Arrays.asList(restTemplate.getForObject(baseURL + "String_Node_Str",String[].class));
  }
 catch (  SyncopeClientCompositeErrorException e) {
    LOG.error("String_Node_Str",e);
  }
  return validators;
}
Program: 60933
Project: 60933
Buggy source:
public TaskExecTO getTaskExecutionTO(final TaskExec execution){
  TaskExecTO executionTO=new TaskExecTO();
  BeanUtils.copyProperties(execution,executionTO,IGNORE_TASK_EXECUTION_PROPERTIES);
  executionTO.setTask(execution.getTask().getId());
  return executionTO;
}

Fixed version (ground truth):
public TaskExecTO getTaskExecutionTO(final TaskExec execution){
  TaskExecTO executionTO=new TaskExecTO();
  BeanUtils.copyProperties(execution,executionTO,IGNORE_TASK_EXECUTION_PROPERTIES);
  if (execution.getId() != null) {
    executionTO.setId(execution.getId());
  }
  executionTO.setTask(execution.getTask().getId());
  return executionTO;
}
Program: 60934
Project: 60934
Buggy source:
@Test public final void findAll(){
  List<PropagationTask> plist=taskDAO.findAll(PropagationTask.class);
  assertEquals(3,plist.size());
  List<SchedTask> sclist=taskDAO.findAll(SchedTask.class);
  assertEquals(1,sclist.size());
  List<SyncTask> sylist=taskDAO.findAll(SyncTask.class);
  assertEquals(1,sylist.size());
}

Fixed version (ground truth):
@Test public final void findAll(){
  List<PropagationTask> plist=taskDAO.findAll(PropagationTask.class);
  assertEquals(4,plist.size());
  List<SchedTask> sclist=taskDAO.findAll(SchedTask.class);
  assertEquals(1,sclist.size());
  List<SyncTask> sylist=taskDAO.findAll(SyncTask.class);
  assertEquals(1,sylist.size());
}
Program: 60935
Project: 60935
Buggy source:
public List<RAttr> findInheritedAttributes(){
  List<RAttr> result=new ArrayList<RAttr>(attributes);
  if (isInheritAttributes() && getParent() != null) {
    result.addAll(getParent().findInheritedAttributes());
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Get all inherited attributes from the ancestors.
 * @return a list of inherited and only inherited attributes.
 */
public List<RAttr> findInheritedAttributes(){
  final Map<RSchema,RAttr> result=new HashMap<RSchema,RAttr>();
  if (isInheritAttributes() && getParent() != null) {
    final Map<AbstractSchema,AbstractAttr> attrMap=getAttributesMap();
    for (    RAttr attr : (Collection<RAttr>)getParent().getAttributes()) {
      if (!attrMap.containsKey(attr.getSchema())) {
        result.put((RSchema)attr.getSchema(),attr);
      }
    }
    for (    RAttr attr : getParent().findInheritedAttributes()) {
      if (!attrMap.containsKey(attr.getSchema()) && !result.containsKey((RSchema)attr.getSchema())) {
        result.put((RSchema)attr.getSchema(),attr);
      }
    }
  }
  return new ArrayList<RAttr>(result.values());
}
Program: 60936
Project: 60936
Buggy source:
public List<RDerAttr> findInheritedDerivedAttributes(){
  List<RDerAttr> result=new ArrayList<RDerAttr>(derivedAttributes);
  if (isInheritDerivedAttributes() && getParent() != null) {
    result.addAll(getParent().findInheritedDerivedAttributes());
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Get all inherited derived attributes from the ancestors.
 * @return a list of inherited and only inherited attributes.
 */
public List<RDerAttr> findInheritedDerivedAttributes(){
  final Map<RDerSchema,RDerAttr> result=new HashMap<RDerSchema,RDerAttr>();
  if (isInheritDerivedAttributes() && getParent() != null) {
    final Map<AbstractDerSchema,AbstractDerAttr> attrMap=getDerivedAttributesMap();
    for (    RDerAttr attr : (Collection<RDerAttr>)getParent().getDerivedAttributes()) {
      if (!attrMap.containsKey(attr.getDerivedSchema())) {
        result.put((RDerSchema)attr.getDerivedSchema(),attr);
      }
    }
    for (    RDerAttr attr : getParent().findInheritedDerivedAttributes()) {
      if (!attrMap.containsKey(attr.getDerivedSchema()) && !result.containsKey((RDerSchema)attr.getDerivedSchema())) {
        result.put((RDerSchema)attr.getDerivedSchema(),attr);
      }
    }
  }
  return new ArrayList<RDerAttr>(result.values());
}
Program: 60937
Project: 60937
Buggy source:
public List<RVirAttr> findInheritedVirtualAttributes(){
  List<RVirAttr> result=new ArrayList<RVirAttr>(virtualAttributes);
  if (isInheritVirtualAttributes() && getParent() != null) {
    result.addAll(getParent().findInheritedVirtualAttributes());
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Get all inherited virtual attributes from the ancestors.
 * @return a list of inherited and only inherited attributes.
 */
public List<RVirAttr> findInheritedVirtualAttributes(){
  final Map<RVirSchema,RVirAttr> result=new HashMap<RVirSchema,RVirAttr>();
  if (isInheritVirtualAttributes() && getParent() != null) {
    final Map<AbstractVirSchema,AbstractVirAttr> attrMap=getVirtualAttributesMap();
    for (    RVirAttr attr : (Collection<RVirAttr>)getParent().getVirtualAttributes()) {
      if (!attrMap.containsKey(attr.getVirtualSchema())) {
        result.put((RVirSchema)attr.getVirtualSchema(),attr);
      }
    }
    for (    RVirAttr attr : getParent().findInheritedVirtualAttributes()) {
      if (!attrMap.containsKey(attr.getVirtualSchema()) && !result.containsKey((RVirSchema)attr.getVirtualSchema())) {
        result.put((RVirSchema)attr.getVirtualSchema(),attr);
      }
    }
  }
  return new ArrayList<RVirAttr>(result.values());
}
Program: 60938
Project: 60938
Buggy source:
public RoleTO getRoleTO(SyncopeRole role){
  RoleTO roleTO=new RoleTO();
  roleTO.setId(role.getId());
  roleTO.setName(role.getName());
  roleTO.setInheritAttributes(role.isInheritAttributes());
  roleTO.setInheritDerivedAttributes(role.isInheritDerivedAttributes());
  roleTO.setInheritVirtualAttributes(role.isInheritVirtualAttributes());
  if (role.getParent() != null) {
    roleTO.setParent(role.getParent().getId());
  }
  fillTO(roleTO,role.findInheritedAttributes(),role.findInheritedDerivedAttributes(),role.findInheritedVirtualAttributes(),role.getTargetResources());
  for (  Entitlement entitlement : role.getEntitlements()) {
    roleTO.addEntitlement(entitlement.getName());
  }
  roleTO.setPasswordPolicy(role.getPasswordPolicy() != null ? role.getPasswordPolicy().getId() : null);
  return roleTO;
}

Fixed version (ground truth):
public RoleTO getRoleTO(SyncopeRole role){
  RoleTO roleTO=new RoleTO();
  roleTO.setId(role.getId());
  roleTO.setName(role.getName());
  roleTO.setInheritAttributes(role.isInheritAttributes());
  roleTO.setInheritDerivedAttributes(role.isInheritDerivedAttributes());
  roleTO.setInheritVirtualAttributes(role.isInheritVirtualAttributes());
  if (role.getParent() != null) {
    roleTO.setParent(role.getParent().getId());
  }
  final List<RAttr> allAttributes=role.findInheritedAttributes();
  allAttributes.addAll((List<RAttr>)role.getAttributes());
  final List<RDerAttr> allDerAttributes=role.findInheritedDerivedAttributes();
  allDerAttributes.addAll((List<RDerAttr>)role.getDerivedAttributes());
  final List<RVirAttr> allVirAttributes=role.findInheritedVirtualAttributes();
  allVirAttributes.addAll((List<RVirAttr>)role.getVirtualAttributes());
  fillTO(roleTO,allAttributes,allDerAttributes,allVirAttributes,role.getTargetResources());
  for (  Entitlement entitlement : role.getEntitlements()) {
    roleTO.addEntitlement(entitlement.getName());
  }
  roleTO.setPasswordPolicy(role.getPasswordPolicy() != null ? role.getPasswordPolicy().getId() : null);
  return roleTO;
}
Program: 60939
Project: 60939
Buggy source:
@Test public final void inheritedAttributes(){
  SyncopeRole director=roleDAO.find(7L);
  assertEquals(2,director.findInheritedAttributes().size());
}

Fixed version (ground truth):
@Test public final void inheritedAttributes(){
  SyncopeRole director=roleDAO.find(7L);
  assertEquals(1,director.findInheritedAttributes().size());
}
Program: 60940
Project: 60940
Buggy source:
public IntMappingTypesDropDownChoice(final String id,final String name,final PropertyModel<IntMappingType> 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.add(chooserToPopulate);
}
}
);
}

Fixed version (ground truth):
public IntMappingTypesDropDownChoice(final String id,final String name,final PropertyModel<IntMappingType> 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:
case Username:
default :
chooserToPopulate.setRequired(false);
chooserToPopulate.setEnabled(false);
result=Collections.EMPTY_LIST;
}
chooserToPopulate.setChoices(result);
target.add(chooserToPopulate);
}
}
);
}
Program: 60942
Project: 60942
Buggy source:
@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.add(chooserToPopulate);
}

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:
case Username:
default :
chooserToPopulate.setRequired(false);
chooserToPopulate.setEnabled(false);
result=Collections.EMPTY_LIST;
}
chooserToPopulate.setChoices(result);
target.add(chooserToPopulate);
}
Program: 60944
Project: 60944
Buggy source:
public List<ConnBundleTO> getAllBundles(){
  List<ConnBundleTO> bundles=null;
  try {
    bundles=Arrays.asList(restTemplate.getForObject(baseURL + "String_Node_Str",ConnBundleTO[].class));
  }
 catch (  SyncopeClientCompositeErrorException e) {
    LOG.error("String_Node_Str",e);
  }
  return bundles;
}

Fixed version (ground truth):
public List<ConnBundleTO> getAllBundles(){
  List<ConnBundleTO> bundles=null;
  try {
    bundles=Arrays.asList(restTemplate.getForObject(baseURL + "String_Node_Str" + SyncopeSession.get().getLocale(),ConnBundleTO[].class));
  }
 catch (  SyncopeClientCompositeErrorException e) {
    LOG.error("String_Node_Str",e);
  }
  return bundles;
}
Program: 60945
Project: 60945
Buggy source:
/** 
 * Get all connectors.
 * @return ConnectorInstanceTOs
 */
public List<ConnInstanceTO> getAllConnectors(){
  return Arrays.asList(restTemplate.getForObject(baseURL + "String_Node_Str",ConnInstanceTO[].class));
}

Fixed version (ground truth):
/** 
 * Get all connectors.
 * @return ConnectorInstanceTOs
 */
public List<ConnInstanceTO> getAllConnectors(){
  return Arrays.asList(restTemplate.getForObject(baseURL + "String_Node_Str" + SyncopeSession.get().getLocale(),ConnInstanceTO[].class));
}
Program: 60946
Project: 60946
Buggy source:
/** 
 * Update an already existent connector.
 * @param schemaTO updated
 */
public void update(ConnInstanceTO connectorTO){
  restTemplate.postForObject(baseURL + "String_Node_Str",connectorTO,ConnInstanceTO.class);
}

Fixed version (ground truth):
public void update(ConnInstanceTO connectorTO){
  restTemplate.postForObject(baseURL + "String_Node_Str",connectorTO,ConnInstanceTO.class);
}
Program: 60947
Project: 60947
Buggy source:
/** 
 * Delete an already existent connector by its name.
 * @param name (e.g.:surname)
 * @return schemaTO
 */
public void delete(Long id){
  restTemplate.delete(baseURL + "String_Node_Str",id.toString());
}

Fixed version (ground truth):
public void delete(Long id){
  restTemplate.delete(baseURL + "String_Node_Str",id.toString());
}
Program: 60948
Project: 60948
Buggy source:
@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;
}

Fixed version (ground truth):
@PreAuthorize("String_Node_Str") @RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public List<ConnInstanceTO> list(@RequestParam(value="String_Node_Str",required=false) final String lang) throws NotFoundException {
  if (StringUtils.isBlank(lang)) {
    CurrentLocale.set(Locale.ENGLISH);
  }
 else {
    CurrentLocale.set(new Locale(lang));
  }
  List<ConnInstance> connInstances=connInstanceDAO.findAll();
  List<ConnInstanceTO> connInstanceTOs=new ArrayList<ConnInstanceTO>();
  for (  ConnInstance connector : connInstances) {
    connInstanceTOs.add(binder.getConnInstanceTO(connector));
  }
  return connInstanceTOs;
}
Program: 60951
Project: 60951
Buggy source:
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;
}

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;
  Map<String,ConnConfProperty> connInstanceToConfMap=connInstanceTO.getConfigurationMap();
  for (  String propName : properties.getPropertyNames()) {
    configurationProperty=properties.getProperty(propName);
    if (!connInstanceToConfMap.containsKey(propName)) {
      connConfPropSchema=new ConnConfPropSchema();
      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);
    }
 else {
      connInstanceToConfMap.get(propName).getSchema().setDisplayName(configurationProperty.getDisplayName(propName));
    }
  }
  return connInstanceTO;
}
Program: 60952
Project: 60952
Buggy source:
@Before public void init(){
  Properties props=new java.util.Properties();
  try {
    InputStream propStream=getClass().getResourceAsStream("String_Node_Str");
    props.load(propStream);
    connidSoapVersion=props.getProperty("String_Node_Str");
    bundlesDirectory=props.getProperty("String_Node_Str");
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",t);
  }
  assertNotNull(connidSoapVersion);
  assertNotNull(bundlesDirectory);
}

Fixed version (ground truth):
@BeforeClass public static void init(){
  Properties props=new Properties();
  InputStream propStream=null;
  try {
    propStream=ConnInstanceTestITCase.class.getResourceAsStream("String_Node_Str");
    props.load(propStream);
    connidSoapVersion=props.getProperty("String_Node_Str");
    bundlesDirectory=props.getProperty("String_Node_Str");
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",t);
  }
 finally {
    if (propStream != null) {
      try {
        propStream.close();
      }
 catch (      IOException e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
  assertNotNull(connidSoapVersion);
  assertNotNull(bundlesDirectory);
}
Program: 60953
Project: 60953
Buggy source:
@Override protected void init(){
  getComponentInstantiationListeners().add(new SpringComponentInjector(this));
  getResourceSettings().setThrowExceptionOnMissingResource(true);
  getSecuritySettings().setAuthorizationStrategy(new RoleAuthorizationStrategy(this));
  getSecuritySettings().setUnauthorizedComponentInstantiationListener(this);
  getMarkupSettings().setStripWicketTags(true);
  MetaDataRoleAuthorizationStrategy.authorize(Schema.class,"String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(Roles.class,"String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(Connectors.class,"String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(Resources.class,"String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(Users.class,"String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(Report.class,"String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(Tasks.class,"String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(Configuration.class,"String_Node_Str");
  getRequestCycleListeners().add(new SyncopeRequestCycleListener());
}

Fixed version (ground truth):
@Override protected void init(){
  getComponentInstantiationListeners().add(new SpringComponentInjector(this));
  getResourceSettings().setThrowExceptionOnMissingResource(true);
  getSecuritySettings().setAuthorizationStrategy(new RoleAuthorizationStrategy(this));
  getSecuritySettings().setUnauthorizedComponentInstantiationListener(this);
  getMarkupSettings().setStripWicketTags(true);
  MetaDataRoleAuthorizationStrategy.authorize(Schema.class,"String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(Roles.class,"String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(Resources.class,"String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(Resources.class,"String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(Users.class,"String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(Report.class,"String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(Tasks.class,"String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(Configuration.class,"String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(Todo.class,"String_Node_Str");
  getRequestCycleListeners().add(new SyncopeRequestCycleListener());
}
Program: 60956
Project: 60956
Buggy source:
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  try {
    restClient.updateWorkflowDefinition(workflowDef);
  }
 catch (  SyncopeClientCompositeErrorException scee) {
    error(getString("String_Node_Str") + "String_Node_Str" + scee.getMessage());
  }
}

Fixed version (ground truth):
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  try {
    restClient.updateWorkflowDefinition(workflowDef);
    info(getString("String_Node_Str"));
  }
 catch (  SyncopeClientCompositeErrorException scee) {
    error(getString("String_Node_Str") + "String_Node_Str" + scee.getMessage());
  }
  target.add(feedbackPanel);
}