nus-yam/ex-repair huggingface dataset:
Program: 60746
Project: 60746
Buggy source:
@PreAuthorize("String_Node_Str") @RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public ResourceTO update(final HttpServletResponse response,final @RequestBody ResourceTO resourceTO) throws SyncopeClientCompositeErrorException, NotFoundException {
  LOG.debug("String_Node_Str",resourceTO);
  ExternalResource resource=null;
  if (resourceTO != null && resourceTO.getName() != null) {
    resource=resourceDAO.find(resourceTO.getName());
  }
  if (resource == null) {
    LOG.error("String_Node_Str",resourceTO.getName());
    throw new NotFoundException("String_Node_Str" + resourceTO.getName() + "String_Node_Str");
  }
  SyncopeClientCompositeErrorException scce=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
  LOG.debug("String_Node_Str");
  resource.getMappings().clear();
  resource=binder.getResource(resource,resourceTO);
  if (resource == null) {
    LOG.error("String_Node_Str");
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.Unknown);
    scce.addException(ex);
    throw scce;
  }
  resource=resourceDAO.save(resource);
  return binder.getResourceTO(resource);
}

Fixed version (ground truth):
@PreAuthorize("String_Node_Str") @RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public ResourceTO update(final HttpServletResponse response,final @RequestBody ResourceTO resourceTO) throws SyncopeClientCompositeErrorException, NotFoundException {
  LOG.debug("String_Node_Str",resourceTO);
  ExternalResource resource=null;
  if (resourceTO != null && resourceTO.getName() != null) {
    resource=resourceDAO.find(resourceTO.getName());
  }
  if (resource == null) {
    LOG.error("String_Node_Str",resourceTO.getName());
    throw new NotFoundException("String_Node_Str" + resourceTO.getName() + "String_Node_Str");
  }
  resource=binder.update(resource,resourceTO);
  if (resource == null) {
    LOG.error("String_Node_Str");
    SyncopeClientCompositeErrorException scce=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.Unknown);
    scce.addException(ex);
    throw scce;
  }
  resource=resourceDAO.save(resource);
  return binder.getResourceTO(resource);
}
Program: 60748
Project: 60748
Buggy source:
private static void populate(final Map<String,AttributeTO> updatedAttrs,final Map<String,AttributeTO> originalAttrs,final AbstractAttributableMod result){
  for (  Map.Entry<String,AttributeTO> entry : updatedAttrs.entrySet()) {
    AttributeMod attrMod=new AttributeMod();
    attrMod.setSchema(entry.getKey());
    Set<String> updatedValues=new HashSet<String>(entry.getValue().getValues());
    Set<String> originalValues=originalAttrs.containsKey(entry.getKey()) ? new HashSet<String>(originalAttrs.get(entry.getKey()).getValues()) : Collections.EMPTY_SET;
    updatedValues.removeAll(originalValues);
    updatedValues.remove("String_Node_Str");
    if (!entry.getValue().isReadonly()) {
      attrMod.setValuesToBeAdded(new ArrayList<String>(updatedValues));
    }
    originalValues.removeAll(entry.getValue().getValues());
    attrMod.setValuesToBeRemoved(new ArrayList<String>(originalValues));
    if (!attrMod.isEmpty()) {
      result.addAttributeToBeUpdated(attrMod);
    }
  }
}

Fixed version (ground truth):
private static void populate(final Map<String,AttributeTO> updatedAttrs,final Map<String,AttributeTO> originalAttrs,final AbstractAttributableMod result){
  for (  Map.Entry<String,AttributeTO> entry : updatedAttrs.entrySet()) {
    AttributeMod attrMod=new AttributeMod();
    attrMod.setSchema(entry.getKey());
    Set<String> updatedValues=new HashSet<String>(entry.getValue().getValues());
    Set<String> originalValues=originalAttrs.containsKey(entry.getKey()) ? new HashSet<String>(originalAttrs.get(entry.getKey()).getValues()) : Collections.EMPTY_SET;
    updatedValues.removeAll(originalValues);
    updatedValues.remove("String_Node_Str");
    if (!entry.getValue().isReadonly()) {
      attrMod.setValuesToBeAdded(new ArrayList<String>(updatedValues));
      if (!attrMod.isEmpty()) {
        result.addAttributeToBeRemoved(attrMod.getSchema());
      }
    }
    originalValues.removeAll(entry.getValue().getValues());
    attrMod.setValuesToBeRemoved(new ArrayList<String>(originalValues));
    if (!attrMod.isEmpty()) {
      result.addAttributeToBeUpdated(attrMod);
    }
  }
}
Program: 60749
Project: 60749
Buggy source:
private <T extends AbstractVirSchema>T getVirtualSchema(final String virSchemaName,final Class<T> reference){
  T virtualSchema=virtualSchemaDAO.find(virSchemaName,reference);
  if (virtualSchema == null) {
    LOG.debug("String_Node_Str",virSchemaName);
  }
  return virtualSchema;
}

Fixed version (ground truth):
private <T extends AbstractVirSchema>T getVirtualSchema(final String virSchemaName,final Class<T> reference){
  T virtualSchema=null;
  if (StringUtils.isNotBlank(virSchemaName)) {
    virtualSchema=virtualSchemaDAO.find(virSchemaName,reference);
    if (virtualSchema == null) {
      LOG.debug("String_Node_Str",virSchemaName);
    }
  }
  return virtualSchema;
}
Program: 60750
Project: 60750
Buggy source:
private <T extends AbstractDerSchema>T getDerivedSchema(final String derSchemaName,final Class<T> reference){
  T derivedSchema=derivedSchemaDAO.find(derSchemaName,reference);
  if (derivedSchema == null) {
    LOG.debug("String_Node_Str",derSchemaName);
  }
  return derivedSchema;
}

Fixed version (ground truth):
private <T extends AbstractDerSchema>T getDerivedSchema(final String derSchemaName,final Class<T> reference){
  T derivedSchema=null;
  if (StringUtils.isNotBlank(derSchemaName)) {
    derivedSchema=derivedSchemaDAO.find(derSchemaName,reference);
    if (derivedSchema == null) {
      LOG.debug("String_Node_Str",derSchemaName);
    }
  }
  return derivedSchema;
}
Program: 60751
Project: 60751
Buggy source:
private <T extends AbstractSchema>T getSchema(final String schemaName,final Class<T> reference){
  T schema=schemaDAO.find(schemaName,reference);
  if (schema == null) {
    LOG.debug("String_Node_Str",schemaName);
  }
 else   if (schema.isReadonly()) {
    schema=null;
    LOG.debug("String_Node_Str",schemaName);
  }
  return schema;
}

Fixed version (ground truth):
private <T extends AbstractSchema>T getSchema(final String schemaName,final Class<T> reference){
  T schema=null;
  if (StringUtils.isNotBlank(schemaName)) {
    schema=schemaDAO.find(schemaName,reference);
    if (schema == null) {
      LOG.debug("String_Node_Str",schemaName);
    }
 else     if (schema.isReadonly()) {
      schema=null;
      LOG.debug("String_Node_Str",schemaName);
    }
  }
  return schema;
}
Program: 60753
Project: 60753
Buggy source:
public UserModalPage(final PageReference callerPageRef,final ModalWindow window,final UserTO userTO,final Mode mode){
  super();
  this.callerPageRef=callerPageRef;
  this.window=window;
  this.userTO=userTO;
  this.mode=mode == null ? Mode.ADMIN : mode;
  setupModalPage();
}

Fixed version (ground truth):
public UserModalPage(final PageReference callerPageRef,final ModalWindow window,final UserTO summaryUserTO,final boolean submitted){
  super();
  this.callerPageRef=callerPageRef;
  this.window=window;
  this.summaryUserTO=summaryUserTO;
  this.submitted=submitted;
  setupModalPage();
}
Program: 60754
Project: 60754
Buggy source:
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  final UserTO updatedUserTO=(UserTO)form.getModelObject();
  try {
    if (updatedUserTO.getId() == 0) {
switch (mode) {
case SELF:
        requestRestClient.requestCreate(updatedUserTO);
      break;
case ADMIN:
default :
    userRestClient.create(updatedUserTO);
  if (userRequestTO != null) {
    requestRestClient.delete(userRequestTO.getId());
  }
break;
case TEMPLATE:
syncTaskTO.setUserTemplate(updatedUserTO);
taskRestClient.updateSyncTask(syncTaskTO);
break;
}
}
 else {
UserMod userMod=AttributableOperations.diff(updatedUserTO,initialUserTO);
if (!userMod.isEmpty()) {
if (mode == Mode.SELF) {
requestRestClient.requestUpdate(userMod);
}
 else {
userRestClient.update(userMod);
if (userRequestTO != null) {
requestRestClient.delete(userRequestTO.getId());
}
}
}
}
if (callerPageRef.getPage() instanceof BasePage) {
((BasePage)callerPageRef.getPage()).setModalResult(true);
}
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);
}
}

Fixed version (ground truth):
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  final UserTO updatedUserTO=(UserTO)form.getModelObject();
  try {
    if (updatedUserTO.getId() == 0) {
switch (mode) {
case SELF:
        requestRestClient.requestCreate(updatedUserTO);
      break;
case ADMIN:
default :
    summaryUserTO=userRestClient.create(updatedUserTO);
  if (userRequestTO != null) {
    requestRestClient.delete(userRequestTO.getId());
  }
break;
case TEMPLATE:
syncTaskTO.setUserTemplate(updatedUserTO);
taskRestClient.updateSyncTask(syncTaskTO);
break;
}
}
 else {
UserMod userMod=AttributableOperations.diff(updatedUserTO,initialUserTO);
if (!userMod.isEmpty()) {
if (mode == Mode.SELF) {
requestRestClient.requestUpdate(userMod);
}
 else {
summaryUserTO=userRestClient.update(userMod);
if (userRequestTO != null) {
requestRestClient.delete(userRequestTO.getId());
}
}
}
}
if (callerPageRef.getPage() instanceof BasePage) {
((BasePage)callerPageRef.getPage()).setModalResult(true);
}
setResponsePage(new UserModalPage(callerPageRef,window,summaryUserTO,form.isSubmitted()));
}
 catch (SyncopeClientCompositeErrorException e) {
LOG.error("String_Node_Str",e);
error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
target.add(feedbackPanel);
}
}
Program: 60755
Project: 60755
Buggy source:
public MissingConfKeyException(final String confKey){
  this.confKey=confKey;
}

Fixed version (ground truth):
public MissingConfKeyException(final String confKey){
  super();
  this.confKey=confKey;
}
Program: 60756
Project: 60756
Buggy source:
public AccountPolicyException(String msg){
  super(msg);
}

Fixed version (ground truth):
public AccountPolicyException(final String message){
  super(message);
}
Program: 60757
Project: 60757
Buggy source:
public PasswordPolicyException(String msg){
  super(msg);
}

Fixed version (ground truth):
public PasswordPolicyException(final String message){
  super(message);
}
Program: 60758
Project: 60758
Buggy source:
public PolicyEnforceException(String string){
}

Fixed version (ground truth):
public PolicyEnforceException(final String message){
  super(message);
}
Program: 60761
Project: 60761
Buggy source:
@Override public void onComponentTag(final Component component,final ComponentTag tag){
  tag.put("String_Node_Str",kind);
}

Fixed version (ground truth):
@Override public void onComponentTag(final Component component,final ComponentTag tag){
  tag.put("String_Node_Str","String_Node_Str" + SyncopeApplication.IMG_PREFIX + kind+ SyncopeApplication.IMG_SUFFIX);
}
Program: 60762
Project: 60762
Buggy source:
public WelcomePage(final PageParameters parameters){
  super(parameters);
  ((SyncopeApplication)getApplication()).setupNavigationPane(this,xmlRolesReader,version);
}

Fixed version (ground truth):
public WelcomePage(final PageParameters parameters){
  super(parameters);
  ((SyncopeApplication)getApplication()).setupNavigationPane(this,xmlRolesReader,false,version);
}
Program: 60763
Project: 60763
Buggy source:
@Override protected void onError(AjaxRequestTarget target,Form form){
  target.add(feedbackPanel);
}

Fixed version (ground truth):
@Override protected void onError(final AjaxRequestTarget target,final Form form){
  target.add(feedbackPanel);
}
Program: 60764
Project: 60764
Buggy source:
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  SchedTaskTO taskTO=(SchedTaskTO)form.getModelObject();
  if (!StringUtils.hasText(taskTO.getCronExpression()) || "String_Node_Str".equals(taskTO.getCronExpression())) {
    taskTO.setCronExpression(null);
  }
 else {
    taskTO.setCronExpression(getCron(seconds,minutes,hours,daysOfMonth,months,daysOfWeek));
  }
  try {
    if (taskTO.getId() > 0) {
      if (taskTO instanceof SyncTaskTO) {
        taskTO=taskRestClient.updateSyncTask((SyncTaskTO)taskTO);
      }
 else {
        taskTO=taskRestClient.updateSchedTask(taskTO);
      }
    }
 else {
      if (taskTO instanceof SyncTaskTO) {
        taskTO=taskRestClient.createSyncTask((SyncTaskTO)taskTO);
      }
 else {
        taskTO=taskRestClient.createSchedTask(taskTO);
      }
    }
    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){
  SchedTaskTO taskTO=(SchedTaskTO)form.getModelObject();
  if (!StringUtils.hasText(taskTO.getCronExpression()) || "String_Node_Str".equals(taskTO.getCronExpression())) {
    taskTO.setCronExpression(null);
  }
 else {
    taskTO.setCronExpression(getCron(seconds,minutes,hours,daysOfMonth,months,daysOfWeek));
  }
  try {
    if (taskTO.getId() > 0) {
      if (taskTO instanceof SyncTaskTO) {
        taskTO=taskRestClient.updateSyncTask((SyncTaskTO)taskTO);
      }
 else {
        taskTO=taskRestClient.updateSchedTask(taskTO);
      }
    }
 else {
      if (taskTO instanceof SyncTaskTO) {
        taskTO=taskRestClient.createSyncTask((SyncTaskTO)taskTO);
      }
 else {
        taskTO=taskRestClient.createSchedTask(taskTO);
      }
    }
    ((BasePage)callerPageRef.getPage()).setModalResult(true);
    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: 60767
Project: 60767
Buggy source:
@Override public Page createPage(){
  return new UserModalPage(BasePage.this.getPageReference(),editProfileModalWin,userTO,true);
}

Fixed version (ground truth):
@Override public Page createPage(){
  return new UserModalPage(BasePage.this.getPageReference(),editProfileModalWin,userTO,UserModalPage.Mode.SELF);
}
Program: 60768
Project: 60768
Buggy source:
@Override public void onClick(final AjaxRequestTarget target){
  editProfileModalWin.setPageCreator(new ModalWindow.PageCreator(){
    @Override public Page createPage(){
      return new UserModalPage(BasePage.this.getPageReference(),editProfileModalWin,userTO,true);
    }
  }
);
  editProfileModalWin.show(target);
}

Fixed version (ground truth):
@Override public void onClick(final AjaxRequestTarget target){
  editProfileModalWin.setPageCreator(new ModalWindow.PageCreator(){
    @Override public Page createPage(){
      return new UserModalPage(BasePage.this.getPageReference(),editProfileModalWin,userTO,UserModalPage.Mode.SELF);
    }
  }
);
  editProfileModalWin.show(target);
}
Program: 60769
Project: 60769
Buggy source:
@Override public Page createPage(){
  return new UserModalPage(Login.this.getPageReference(),editProfileModalWin,new UserTO(),true);
}

Fixed version (ground truth):
@Override public Page createPage(){
  return new UserModalPage(Login.this.getPageReference(),editProfileModalWin,new UserTO(),UserModalPage.Mode.SELF);
}
Program: 60770
Project: 60770
Buggy source:
@Override public void onClick(final AjaxRequestTarget target){
  editProfileModalWin.setPageCreator(new ModalWindow.PageCreator(){
    @Override public Page createPage(){
      return new UserModalPage(Login.this.getPageReference(),editProfileModalWin,new UserTO(),true);
    }
  }
);
  editProfileModalWin.show(target);
}

Fixed version (ground truth):
@Override public void onClick(final AjaxRequestTarget target){
  editProfileModalWin.setPageCreator(new ModalWindow.PageCreator(){
    @Override public Page createPage(){
      return new UserModalPage(Login.this.getPageReference(),editProfileModalWin,new UserTO(),UserModalPage.Mode.SELF);
    }
  }
);
  editProfileModalWin.show(target);
}
Program: 60772
Project: 60772
Buggy source:
public MembershipModalPage(final PageReference pageRef,final ModalWindow window,final MembershipTO membershipTO){
  final Form form=new Form("String_Node_Str");
  final UserTO userTO=((UserModalPage)pageRef.getPage()).getUserTO();
  form.setModel(new CompoundPropertyModel(membershipTO));
  submit=new AjaxButton("String_Node_Str",new ResourceModel("String_Node_Str")){
    private static final long serialVersionUID=-958724007591692537L;
    @Override protected void onSubmit(    final AjaxRequestTarget target,    final Form form){
      userTO.removeMembership(membershipTO);
      userTO.addMembership(membershipTO);
      ((UserModalPage)pageRef.getPage()).setUserTO(userTO);
      window.close(target);
    }
    @Override protected void onError(    final AjaxRequestTarget target,    final Form form){
      target.add(feedbackPanel);
    }
  }
;
  String allowedRoles=null;
  if (((UserTO)userTO).getId() == 0) {
    allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  }
 else {
    allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  }
  MetaDataRoleAuthorizationStrategy.authorize(submit,RENDER,allowedRoles);
  form.add(submit);
  form.add(new AttributesPanel("String_Node_Str",membershipTO,form));
  form.add(new DerivedAttributesPanel("String_Node_Str",membershipTO));
  form.add(new VirtualAttributesPanel("String_Node_Str",membershipTO));
  add(form);
}

Fixed version (ground truth):
public MembershipModalPage(final PageReference pageRef,final ModalWindow window,final MembershipTO membershipTO,final boolean templateMode){
  final Form form=new Form("String_Node_Str");
  final UserTO userTO=((UserModalPage)pageRef.getPage()).getUserTO();
  form.setModel(new CompoundPropertyModel(membershipTO));
  submit=new AjaxButton("String_Node_Str",new ResourceModel("String_Node_Str")){
    private static final long serialVersionUID=-958724007591692537L;
    @Override protected void onSubmit(    final AjaxRequestTarget target,    final Form form){
      userTO.removeMembership(membershipTO);
      userTO.addMembership(membershipTO);
      ((UserModalPage)pageRef.getPage()).setUserTO(userTO);
      window.close(target);
    }
    @Override protected void onError(    final AjaxRequestTarget target,    final Form form){
      target.add(feedbackPanel);
    }
  }
;
  String allowedRoles=userTO.getId() == 0 ? xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str") : xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(submit,RENDER,allowedRoles);
  form.add(submit);
  form.add(new AttributesPanel("String_Node_Str",membershipTO,form,templateMode));
  form.add(new DerivedAttributesPanel("String_Node_Str",membershipTO));
  form.add(new VirtualAttributesPanel("String_Node_Str",membershipTO,templateMode));
  add(form);
}
Program: 60773
Project: 60773
Buggy source:
public SchedTaskModalPage(final ModalWindow window,final SchedTaskTO taskTO){
  super(window,taskTO);
  final IModel<List<String>> classNames=new LoadableDetachableModel<List<String>>(){
    private static final long serialVersionUID=5275935387613157437L;
    @Override protected List<String> load(){
      final List<String> classes=new ArrayList<String>(taskRestClient.getJobClasses());
      return classes;
    }
  }
;
  final AjaxDropDownChoicePanel<String> className=new AjaxDropDownChoicePanel<String>("String_Node_Str",getString("String_Node_Str"),new PropertyModel(taskTO,"String_Node_Str"),false);
  className.setChoices(classNames.getObject());
  className.addRequiredLabel();
  className.setEnabled(taskTO.getId() == 0);
  className.setStyleShet("String_Node_Str");
  profile.add(className);
}

Fixed version (ground truth):
public SchedTaskModalPage(final ModalWindow window,final SchedTaskTO taskTO,final PageReference callerPageRef){
  super(window,taskTO,callerPageRef);
  final IModel<List<String>> classNames=new LoadableDetachableModel<List<String>>(){
    private static final long serialVersionUID=5275935387613157437L;
    @Override protected List<String> load(){
      final List<String> classes=new ArrayList<String>(taskRestClient.getJobClasses());
      return classes;
    }
  }
;
  final AjaxDropDownChoicePanel<String> className=new AjaxDropDownChoicePanel<String>("String_Node_Str",getString("String_Node_Str"),new PropertyModel(taskTO,"String_Node_Str"),false);
  className.setChoices(classNames.getObject());
  className.addRequiredLabel();
  className.setEnabled(taskTO.getId() == 0);
  className.setStyleShet("String_Node_Str");
  profile.add(className);
}
Program: 60775
Project: 60775
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;
  syncTraceLevel=TraceLevel.ALL;
}

Fixed version (ground truth):
public ResourceTO(){
  mappings=new ArrayList<SchemaMappingTO>();
  connectorConfigurationProperties=new HashSet<ConnConfProperty>();
  propagationMode=PropagationMode.TWO_PHASES;
  propagationPriority=0;
  createTraceLevel=TraceLevel.ALL;
  updateTraceLevel=TraceLevel.ALL;
  deleteTraceLevel=TraceLevel.ALL;
  syncTraceLevel=TraceLevel.ALL;
}
Program: 60776
Project: 60776
Buggy source:
/** 
 * Default constructor.
 */
public ExternalResource(){
  super();
  forceMandatoryConstraint=getBooleanAsInteger(false);
  users=new HashSet<SyncopeUser>();
  roles=new HashSet<SyncopeRole>();
  mappings=new ArrayList<SchemaMapping>();
  propagationPrimary=0;
  propagationPriority=0;
  propagationMode=PropagationMode.ASYNC;
  createTraceLevel=TraceLevel.FAILURES;
  updateTraceLevel=TraceLevel.FAILURES;
  deleteTraceLevel=TraceLevel.FAILURES;
  syncTraceLevel=TraceLevel.FAILURES;
}

Fixed version (ground truth):
/** 
 * Default constructor.
 */
public ExternalResource(){
  super();
  forceMandatoryConstraint=getBooleanAsInteger(false);
  users=new HashSet<SyncopeUser>();
  roles=new HashSet<SyncopeRole>();
  mappings=new ArrayList<SchemaMapping>();
  propagationPrimary=0;
  propagationPriority=0;
  propagationMode=PropagationMode.TWO_PHASES;
  createTraceLevel=TraceLevel.FAILURES;
  updateTraceLevel=TraceLevel.FAILURES;
  deleteTraceLevel=TraceLevel.FAILURES;
  syncTraceLevel=TraceLevel.FAILURES;
}
Program: 60778
Project: 60778
Buggy source:
/** 
 * Update user on a connector instance.
 * @param propagationMode propagation mode (SYNC / ASYNC)
 * @param objectClass ConnId's object class
 * @param uid user to be updated
 * @param attrs attributes for update
 * @param options ConnId's OperationOptions
 * @param propagationAttempted if update is actually performed (based onconnector instance's capabilities)
 * @return Uid for created user
 */
public Uid update(final PropagationMode propagationMode,final ObjectClass objectClass,final Uid uid,final Set<Attribute> attrs,final OperationOptions options,final Set<String> propagationAttempted){
  Uid result=null;
  if (propagationMode == PropagationMode.SYNC ? capabitilies.contains(ConnectorCapability.SYNC_UPDATE) : capabitilies.contains(ConnectorCapability.ASYNC_UPDATE)) {
    propagationAttempted.add("String_Node_Str");
    result=connector.update(objectClass,uid,attrs,options);
  }
 else {
    LOG.info("String_Node_Str" + "String_Node_Str",uid.getUidValue(),capabitilies);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Update user on a connector instance.
 * @param propagationMode propagation mode
 * @param objectClass ConnId's object class
 * @param uid user to be updated
 * @param attrs attributes for update
 * @param options ConnId's OperationOptions
 * @param propagationAttempted if update is actually performed (based onconnector instance's capabilities)
 * @return Uid for created user
 */
public Uid update(final PropagationMode propagationMode,final ObjectClass objectClass,final Uid uid,final Set<Attribute> attrs,final OperationOptions options,final Set<String> propagationAttempted){
  Uid result=null;
  if (propagationMode == PropagationMode.ONE_PHASE ? capabitilies.contains(ConnectorCapability.ONE_PHASE_UPDATE) : capabitilies.contains(ConnectorCapability.TWO_PHASES_UPDATE)) {
    propagationAttempted.add("String_Node_Str");
    result=connector.update(objectClass,uid,attrs,options);
  }
 else {
    LOG.info("String_Node_Str" + "String_Node_Str",uid.getUidValue(),capabitilies);
  }
  return result;
}
Program: 60779
Project: 60779
Buggy source:
/** 
 * Delete user on a connector instance.
 * @param propagationMode propagation mode (SYNC / ASYNC)
 * @param objectClass ConnId's object class
 * @param uid user to be deleted
 * @param options ConnId's OperationOptions
 * @param propagationAttempted if deletion is actually performed (based onconnector instance's capabilities)
 */
public void delete(final PropagationMode propagationMode,final ObjectClass objectClass,final Uid uid,final OperationOptions options,final Set<String> propagationAttempted){
  if (propagationMode == PropagationMode.SYNC ? capabitilies.contains(ConnectorCapability.SYNC_DELETE) : capabitilies.contains(ConnectorCapability.ASYNC_DELETE)) {
    propagationAttempted.add("String_Node_Str");
    connector.delete(objectClass,uid,options);
  }
 else {
    LOG.info("String_Node_Str" + "String_Node_Str",uid.getUidValue(),capabitilies);
  }
}

Fixed version (ground truth):
/** 
 * Delete user on a connector instance.
 * @param propagationMode propagation mode
 * @param objectClass ConnId's object class
 * @param uid user to be deleted
 * @param options ConnId's OperationOptions
 * @param propagationAttempted if deletion is actually performed (based onconnector instance's capabilities)
 */
public void delete(final PropagationMode propagationMode,final ObjectClass objectClass,final Uid uid,final OperationOptions options,final Set<String> propagationAttempted){
  if (propagationMode == PropagationMode.ONE_PHASE ? capabitilies.contains(ConnectorCapability.ONE_PHASE_DELETE) : capabitilies.contains(ConnectorCapability.TWO_PHASES_DELETE)) {
    propagationAttempted.add("String_Node_Str");
    connector.delete(objectClass,uid,options);
  }
 else {
    LOG.info("String_Node_Str" + "String_Node_Str",uid.getUidValue(),capabitilies);
  }
}
Program: 60780
Project: 60780
Buggy source:
/** 
 * Create user on a connector instance.
 * @param propagationMode propagation mode (SYNC / ASYNC)
 * @param objectClass ConnId's object class
 * @param attrs attributes for creation
 * @param options ConnId's OperationOptions
 * @param propagationAttempted if creation is actually performed (based onconnector instance's capabilities)
 * @return Uid for created user
 */
public Uid create(final PropagationMode propagationMode,final ObjectClass objectClass,final Set<Attribute> attrs,final OperationOptions options,final Set<String> propagationAttempted){
  Uid result=null;
  if (propagationMode == PropagationMode.SYNC ? capabitilies.contains(ConnectorCapability.SYNC_CREATE) : capabitilies.contains(ConnectorCapability.ASYNC_CREATE)) {
    propagationAttempted.add("String_Node_Str");
    result=connector.create(objectClass,attrs,options);
  }
 else {
    LOG.info("String_Node_Str" + "String_Node_Str",capabitilies);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Create user on a connector instance.
 * @param propagationMode propagation mode
 * @param objectClass ConnId's object class
 * @param attrs attributes for creation
 * @param options ConnId's OperationOptions
 * @param propagationAttempted if creation is actually performed (based onconnector instance's capabilities)
 * @return Uid for created user
 */
public Uid create(final PropagationMode propagationMode,final ObjectClass objectClass,final Set<Attribute> attrs,final OperationOptions options,final Set<String> propagationAttempted){
  Uid result=null;
  if (propagationMode == PropagationMode.ONE_PHASE ? capabitilies.contains(ConnectorCapability.ONE_PHASE_CREATE) : capabitilies.contains(ConnectorCapability.TWO_PHASES_CREATE)) {
    propagationAttempted.add("String_Node_Str");
    result=connector.create(objectClass,attrs,options);
  }
 else {
    LOG.info("String_Node_Str" + "String_Node_Str",capabitilies);
  }
  return result;
}
Program: 60783
Project: 60783
Buggy source:
@Test public final void savePropagationTask(){
  ExternalResource resource=resourceDAO.find("String_Node_Str");
  assertNotNull(resource);
  SyncopeUser user=userDAO.find(2L);
  assertNotNull(user);
  PropagationTask task=new PropagationTask();
  task.setResource(resource);
  task.setSyncopeUser(user);
  task.setPropagationMode(PropagationMode.ASYNC);
  task.setPropagationOperation(PropagationOperation.CREATE);
  task.setAccountId("String_Node_Str");
  Set<Attribute> attributes=new HashSet<Attribute>();
  attributes.add(AttributeBuilder.build("String_Node_Str","String_Node_Str","String_Node_Str"));
  attributes.add(AttributeBuilder.buildPassword("String_Node_Str".toCharArray()));
  task.setAttributes(attributes);
  task=taskDAO.save(task);
  assertNotNull(task);
  PropagationTask actual=taskDAO.find(task.getId());
  assertEquals(task,actual);
}

Fixed version (ground truth):
@Test public final void savePropagationTask(){
  ExternalResource resource=resourceDAO.find("String_Node_Str");
  assertNotNull(resource);
  SyncopeUser user=userDAO.find(2L);
  assertNotNull(user);
  PropagationTask task=new PropagationTask();
  task.setResource(resource);
  task.setSyncopeUser(user);
  task.setPropagationMode(PropagationMode.TWO_PHASES);
  task.setPropagationOperation(PropagationOperation.CREATE);
  task.setAccountId("String_Node_Str");
  Set<Attribute> attributes=new HashSet<Attribute>();
  attributes.add(AttributeBuilder.build("String_Node_Str","String_Node_Str","String_Node_Str"));
  attributes.add(AttributeBuilder.buildPassword("String_Node_Str".toCharArray()));
  task.setAttributes(attributes);
  task=taskDAO.save(task);
  assertNotNull(task);
  PropagationTask actual=taskDAO.find(task.getId());
  assertEquals(task,actual);
}
Program: 60785
Project: 60785
Buggy source:
@Test public final void save(){
  ExternalResource resource=resourceDAO.find("String_Node_Str");
  assertNotNull(resource);
  SyncopeUser user=userDAO.find(2L);
  assertNotNull(user);
  PropagationTask task=new PropagationTask();
  task.setResource(resource);
  task.setSyncopeUser(user);
  task.setPropagationMode(PropagationMode.ASYNC);
  task.setPropagationOperation(PropagationOperation.CREATE);
  task.setAccountId("String_Node_Str");
  Set<Attribute> attributes=new HashSet<Attribute>();
  attributes.add(AttributeBuilder.build("String_Node_Str","String_Node_Str","String_Node_Str"));
  attributes.add(AttributeBuilder.buildPassword("String_Node_Str".toCharArray()));
  task.setAttributes(attributes);
  task=taskDAO.save(task);
  assertNotNull(task);
  PropagationTask actual=taskDAO.find(task.getId());
  assertEquals(task,actual);
  taskDAO.flush();
  resource=resourceDAO.find("String_Node_Str");
  assertTrue(taskDAO.findAll(resource,PropagationTask.class).contains(task));
}

Fixed version (ground truth):
@Test public final void save(){
  ExternalResource resource=resourceDAO.find("String_Node_Str");
  assertNotNull(resource);
  SyncopeUser user=userDAO.find(2L);
  assertNotNull(user);
  PropagationTask task=new PropagationTask();
  task.setResource(resource);
  task.setSyncopeUser(user);
  task.setPropagationMode(PropagationMode.TWO_PHASES);
  task.setPropagationOperation(PropagationOperation.CREATE);
  task.setAccountId("String_Node_Str");
  Set<Attribute> attributes=new HashSet<Attribute>();
  attributes.add(AttributeBuilder.build("String_Node_Str","String_Node_Str","String_Node_Str"));
  attributes.add(AttributeBuilder.buildPassword("String_Node_Str".toCharArray()));
  task.setAttributes(attributes);
  task=taskDAO.save(task);
  assertNotNull(task);
  PropagationTask actual=taskDAO.find(task.getId());
  assertEquals(task,actual);
  taskDAO.flush();
  resource=resourceDAO.find("String_Node_Str");
  assertTrue(taskDAO.findAll(resource,PropagationTask.class).contains(task));
}
Program: 60787
Project: 60787
Buggy source:
public UserTO(){
  super();
  memberships=new ArrayList<MembershipTO>();
}

Fixed version (ground truth):
public UserTO(){
  super();
  memberships=new ArrayList<MembershipTO>();
  propagationStatusMap=new HashMap<String,PropagationTaskExecStatus>();
}
Program: 60788
Project: 60788
Buggy source:
<T extends Task>List<T> findAll(int page,int itemsPerPage,Class<T> reference);

Fixed version (ground truth):
List<PropagationTask> findAll(SyncopeUser user);
Program: 60789
Project: 60789
Buggy source:
@Override public <T extends Task>List<T> findAll(final int page,final int itemsPerPage,final Class<T> reference){
  final Query query=entityManager.createQuery(buildfindAllQuery(reference).toString());
  query.setFirstResult(itemsPerPage * (page <= 0 ? 0 : page - 1));
  if (itemsPerPage > 0) {
    query.setMaxResults(itemsPerPage);
  }
  return query.getResultList();
}

Fixed version (ground truth):
@Override public List<PropagationTask> findAll(final ExternalResource resource,final SyncopeUser user){
  StringBuilder queryString=buildfindAllQuery(PropagationTask.class);
  queryString.append("String_Node_Str").append("String_Node_Str");
  final Query query=entityManager.createQuery(queryString.toString());
  query.setParameter("String_Node_Str",user);
  query.setParameter("String_Node_Str",resource);
  return query.getResultList();
}
Program: 60790
Project: 60790
Buggy source:
@Override public void delete(final SyncopeUser user){
  for (  Membership membership : user.getMemberships()) {
    membership.setSyncopeUser(null);
    roleDAO.save(membership.getSyncopeRole());
    membership.setSyncopeRole(null);
    entityManager.remove(membership);
  }
  user.getMemberships().clear();
  entityManager.remove(user);
}

Fixed version (ground truth):
@Override public void delete(final SyncopeUser user){
  for (  Membership membership : user.getMemberships()) {
    membership.setSyncopeUser(null);
    roleDAO.save(membership.getSyncopeRole());
    membership.setSyncopeRole(null);
    entityManager.remove(membership);
  }
  user.getMemberships().clear();
  for (  PropagationTask task : taskDAO.findAll(user)) {
    task.setSyncopeUser(null);
  }
  entityManager.remove(user);
}
Program: 60791
Project: 60791
Buggy source:
@Override public boolean isValid(final PropagationTask object,final ConstraintValidatorContext context){
  boolean isValid;
  if (object == null) {
    isValid=true;
  }
 else {
    isValid=object.getPropagationMode() != null && object.getResourceOperationType() != null && !object.getAttributes().isEmpty() && object.getResource() != null;
    if (isValid) {
      List<TaskExec> executions=object.getExecs();
      for (      TaskExec execution : executions) {
        try {
          PropagationTaskExecStatus.valueOf(execution.getStatus());
        }
 catch (        IllegalArgumentException e) {
          LOG.error("String_Node_Str" + execution.getStatus() + "String_Node_Str",e);
          isValid=false;
        }
      }
    }
    if (!isValid) {
      context.disableDefaultConstraintViolation();
      context.buildConstraintViolationWithTemplate(EntityViolationType.InvalidPropagationTask.toString()).addConstraintViolation();
    }
  }
  return isValid;
}

Fixed version (ground truth):
@Override public boolean isValid(final PropagationTask object,final ConstraintValidatorContext context){
  boolean isValid;
  if (object == null) {
    isValid=true;
  }
 else {
    isValid=object.getPropagationMode() != null && object.getResourceOperationType() != null && !object.getAttributes().isEmpty() && object.getResource() != null && (PropagationOperation.DELETE == object.getResourceOperationType() || object.getSyncopeUser() != null);
    if (isValid) {
      List<TaskExec> executions=object.getExecs();
      for (      TaskExec execution : executions) {
        try {
          PropagationTaskExecStatus.valueOf(execution.getStatus());
        }
 catch (        IllegalArgumentException e) {
          LOG.error("String_Node_Str" + execution.getStatus() + "String_Node_Str",e);
          isValid=false;
        }
      }
    }
    if (!isValid) {
      context.disableDefaultConstraintViolation();
      context.buildConstraintViolationWithTemplate(EntityViolationType.InvalidPropagationTask.toString()).addConstraintViolation();
    }
  }
  return isValid;
}
Program: 60793
Project: 60793
Buggy source:
public void fillTO(final AbstractAttributableTO abstractAttributableTO,final Collection<? extends AbstractAttr> attributes,final Collection<? extends AbstractDerAttr> derivedAttributes,final Collection<? extends AbstractVirAttr> virtualAttributes,final Collection<ExternalResource> resources){
  AttributeTO attributeTO;
  for (  AbstractAttr attribute : attributes) {
    attributeTO=new AttributeTO();
    attributeTO.setSchema(attribute.getSchema().getName());
    attributeTO.setValues(attribute.getValuesAsStrings());
    attributeTO.setReadonly(attribute.getSchema().isReadonly());
    abstractAttributableTO.addAttribute(attributeTO);
  }
  for (  AbstractDerAttr derivedAttribute : derivedAttributes) {
    attributeTO=new AttributeTO();
    attributeTO.setSchema(derivedAttribute.getDerivedSchema().getName());
    attributeTO.addValue(derivedAttribute.getValue(attributes));
    attributeTO.setReadonly(true);
    abstractAttributableTO.addDerivedAttribute(attributeTO);
  }
  for (  AbstractVirAttr virtualAttribute : virtualAttributes) {
    attributeTO=new AttributeTO();
    attributeTO.setSchema(virtualAttribute.getVirtualSchema().getName());
    attributeTO.setValues(virtualAttribute.getValues());
    attributeTO.setReadonly(false);
    abstractAttributableTO.addVirtualAttribute(attributeTO);
  }
  for (  ExternalResource resource : resources) {
    abstractAttributableTO.addResource(resource.getName());
  }
}

Fixed version (ground truth):
protected void fillTO(final AbstractAttributableTO abstractAttributableTO,final Collection<? extends AbstractAttr> attributes,final Collection<? extends AbstractDerAttr> derivedAttributes,final Collection<? extends AbstractVirAttr> virtualAttributes,final Collection<ExternalResource> resources){
  AttributeTO attributeTO;
  for (  AbstractAttr attribute : attributes) {
    attributeTO=new AttributeTO();
    attributeTO.setSchema(attribute.getSchema().getName());
    attributeTO.setValues(attribute.getValuesAsStrings());
    attributeTO.setReadonly(attribute.getSchema().isReadonly());
    abstractAttributableTO.addAttribute(attributeTO);
  }
  for (  AbstractDerAttr derivedAttribute : derivedAttributes) {
    attributeTO=new AttributeTO();
    attributeTO.setSchema(derivedAttribute.getDerivedSchema().getName());
    attributeTO.addValue(derivedAttribute.getValue(attributes));
    attributeTO.setReadonly(true);
    abstractAttributableTO.addDerivedAttribute(attributeTO);
  }
  for (  AbstractVirAttr virtualAttribute : virtualAttributes) {
    attributeTO=new AttributeTO();
    attributeTO.setSchema(virtualAttribute.getVirtualSchema().getName());
    attributeTO.setValues(virtualAttribute.getValues());
    attributeTO.setReadonly(false);
    abstractAttributableTO.addVirtualAttribute(attributeTO);
  }
  for (  ExternalResource resource : resources) {
    abstractAttributableTO.addResource(resource.getName());
  }
}
Program: 60794
Project: 60794
Buggy source:
public TaskTO getTaskTO(final Task task,final TaskUtil taskUtil){
  TaskTO taskTO=taskUtil.newTaskTO();
  BeanUtils.copyProperties(task,taskTO,IGNORE_TASK_PROPERTIES);
  List<TaskExec> executions=task.getExecs();
  for (  TaskExec execution : executions) {
    taskTO.addExecution(getTaskExecutionTO(execution));
  }
switch (taskUtil) {
case PROPAGATION:
    ((PropagationTaskTO)taskTO).setResource(((PropagationTask)task).getResource().getName());
  break;
case SCHED:
setExecTime((SchedTaskTO)taskTO);
break;
case SYNC:
setExecTime((SchedTaskTO)taskTO);
((SyncTaskTO)taskTO).setResource(((SyncTask)task).getResource().getName());
break;
case NOTIFICATION:
break;
default :
}
return taskTO;
}

Fixed version (ground truth):
public TaskTO getTaskTO(final Task task,final TaskUtil taskUtil){
  TaskTO taskTO=taskUtil.newTaskTO();
  BeanUtils.copyProperties(task,taskTO,IGNORE_TASK_PROPERTIES);
  List<TaskExec> executions=task.getExecs();
  for (  TaskExec execution : executions) {
    taskTO.addExecution(getTaskExecutionTO(execution));
  }
switch (taskUtil) {
case PROPAGATION:
    ((PropagationTaskTO)taskTO).setResource(((PropagationTask)task).getResource().getName());
  if (((PropagationTask)task).getSyncopeUser() != null) {
    ((PropagationTaskTO)taskTO).setUser(((PropagationTask)task).getSyncopeUser().getId());
  }
break;
case SCHED:
setExecTime((SchedTaskTO)taskTO);
break;
case SYNC:
setExecTime((SchedTaskTO)taskTO);
((SyncTaskTO)taskTO).setResource(((SyncTask)task).getResource().getName());
break;
case NOTIFICATION:
break;
default :
}
return taskTO;
}
Program: 60796
Project: 60796
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);
    }
    ((Resources)callerPageRef.getPage()).setModalResult(true);
    window.close(target);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
    ((Resources)callerPageRef.getPage()).setModalResult(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();
  ConnBundleTO bundleTO=(ConnBundleTO)bundle.getModelObject();
  connector.setBundleName(bundleTO.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()).setModalResult(true);
    window.close(target);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
    target.add(feedbackPanel);
    ((Resources)callerPageRef.getPage()).setModalResult(false);
    LOG.error("String_Node_Str" + connector);
  }
}
Program: 60798
Project: 60798
Buggy source:
@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);
}

Fixed version (ground truth):
@Override protected void onUpdate(final AjaxRequestTarget target){
  connectorTO.setConfiguration(new HashSet<ConnConfProperty>());
  DropDownChoice bundleChoice=(DropDownChoice)bundle.getField();
  bundleChoice.setNullValid(false);
  target.add(bundle.getField());
  target.add(propertiesContainer);
  target.add(connectorName);
  target.add(version);
}
Program: 60801
Project: 60801
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
 * @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.getExternalResourceNames());
  if (syncResourceName != null) {
    propByRes.get(PropagationOperation.CREATE).remove(syncResourceName);
  }
  return provision(user,password,enable,propByRes);
}

Fixed version (ground truth):
/** 
 * Create the user on every associated resource.
 * @param wfResult user to be propagated (and info associated), as perresult from workflow
 * @param password to be set
 * @param vAttrs virtual attributes to be set
 * @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 WorkflowResult<Map.Entry<Long,Boolean>> wfResult,final String password,final List<AttributeTO> vAttrs,final String syncResourceName) throws NotFoundException {
  SyncopeUser user=getSyncopeUser(wfResult.getResult().getKey());
  if (vAttrs != null && !vAttrs.isEmpty()) {
    userDataBinder.fillVirtual(user,vAttrs,AttributableUtil.USER);
    user=userDAO.save(user);
  }
  final PropagationByResource propByRes=wfResult.getPropByRes();
  if (propByRes == null || propByRes.isEmpty()) {
    return Collections.EMPTY_LIST;
  }
  if (syncResourceName != null) {
    propByRes.get(PropagationOperation.CREATE).remove(syncResourceName);
  }
  return provision(user,password,wfResult.getResult().getValue(),propByRes);
}
Program: 60802
Project: 60802
Buggy source:
@PreAuthorize("String_Node_Str") @RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public UserTO suspend(@PathVariable("String_Node_Str") final Long userId) throws NotFoundException, WorkflowException, UnauthorizedRoleException, PropagationException {
  LOG.debug("String_Node_Str" + userId);
  WorkflowResult<Long> updated=wfAdapter.suspend(userId);
  List<PropagationTask> tasks=propagationManager.getUpdateTaskIds(updated.getResult(),null,null,null,Boolean.FALSE,null);
  propagationManager.execute(tasks);
  notificationManager.createTasks(updated);
  final UserTO savedTO=dataBinder.getUserTO(updated.getResult());
  LOG.debug("String_Node_Str",savedTO);
  return savedTO;
}

Fixed version (ground truth):
@PreAuthorize("String_Node_Str") @RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public UserTO suspend(@PathVariable("String_Node_Str") final Long userId) throws NotFoundException, WorkflowException, UnauthorizedRoleException, PropagationException {
  LOG.debug("String_Node_Str" + userId);
  WorkflowResult<Long> updated=wfAdapter.suspend(userId);
  List<PropagationTask> tasks=propagationManager.getUpdateTaskIds(updated,Boolean.FALSE);
  propagationManager.execute(tasks);
  notificationManager.createTasks(updated);
  final UserTO savedTO=dataBinder.getUserTO(updated.getResult());
  LOG.debug("String_Node_Str",savedTO);
  return savedTO;
}