Program: 60597
Project: 60597
Buggy source:
@Test public void createWithReject(){
  Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers());
  UserTO userTO=getUniqueSampleTO("String_Node_Str");
  MembershipTO membershipTO=new MembershipTO();
  membershipTO.setRoleId(9L);
  userTO.addMembership(membershipTO);
  userTO=createUser(userTO);
  assertNotNull(userTO);
  assertEquals(1,userTO.getMemberships().size());
  assertEquals(9,userTO.getMemberships().get(0).getRoleId());
  assertEquals("String_Node_Str",userTO.getStatus());
  WorkflowFormTO form=userService.getFormForUser(userTO.getId());
  assertNotNull(form);
  assertNotNull(form.getTaskId());
  assertNull(form.getOwner());
  UserService userService2=setupCredentials(userService,"String_Node_Str",ADMIN_PWD);
  try {
    userService2.claimForm(form.getTaskId());
    fail();
  }
 catch (  SyncopeClientCompositeErrorException scce) {
    assertNotNull(scce.getException(SyncopeClientExceptionType.Workflow));
  }
  UserService userService3=setupCredentials(userService,"String_Node_Str",ADMIN_PWD);
  form=userService3.claimForm(form.getTaskId());
  assertNotNull(form);
  assertNotNull(form.getTaskId());
  assertNotNull(form.getOwner());
  Map<String,WorkflowFormPropertyTO> props=form.getPropertyMap();
  props.get("String_Node_Str").setValue(Boolean.FALSE.toString());
  props.get("String_Node_Str").setValue("String_Node_Str");
  form.setProperties(props.values());
  userTO=userService3.submitForm(form);
  assertNotNull(userTO);
  assertEquals("String_Node_Str",userTO.getStatus());
  super.resetRestTemplate();
}

Fixed version (ground truth):
@Test public void createWithReject(){
  Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers());
  UserTO userTO=getUniqueSampleTO("String_Node_Str");
  MembershipTO membershipTO=new MembershipTO();
  membershipTO.setRoleId(9L);
  userTO.addMembership(membershipTO);
  userTO=createUser(userTO);
  assertNotNull(userTO);
  assertEquals(1,userTO.getMemberships().size());
  assertEquals(9,userTO.getMemberships().get(0).getRoleId());
  assertEquals("String_Node_Str",userTO.getStatus());
  WorkflowFormTO form=userService.getFormForUser(userTO.getId());
  assertNotNull(form);
  assertNotNull(form.getTaskId());
  assertNull(form.getOwner());
  UserService userService2=setupCredentials(userService,UserService.class,"String_Node_Str",ADMIN_PWD);
  try {
    userService2.claimForm(form.getTaskId());
    fail();
  }
 catch (  SyncopeClientCompositeErrorException scce) {
    assertNotNull(scce.getException(SyncopeClientExceptionType.Workflow));
  }
  UserService userService3=setupCredentials(userService,UserService.class,"String_Node_Str",ADMIN_PWD);
  form=userService3.claimForm(form.getTaskId());
  assertNotNull(form);
  assertNotNull(form.getTaskId());
  assertNotNull(form.getOwner());
  Map<String,WorkflowFormPropertyTO> props=form.getPropertyMap();
  props.get("String_Node_Str").setValue(Boolean.FALSE.toString());
  props.get("String_Node_Str").setValue("String_Node_Str");
  form.setProperties(props.values());
  userTO=userService3.submitForm(form);
  assertNotNull(userTO);
  assertEquals("String_Node_Str",userTO.getStatus());
  super.resetRestTemplate();
}