Program: 59216
Project: 59216
Buggy source:
@Ignore @Test public void assertResourceCreatePermission_superUserInvalidPermission_shouldFailAsSystemResource(){
  authenticateSystemResource();
  final String resourceClassName=generateResourceClass(false,false);
  final Set<ResourceCreatePermission> allResourceCreatePermissionsForResourceClass=accessControlContext.getEffectiveResourceCreatePermissions(SYS_RESOURCE,resourceClassName);
  assertThat(allResourceCreatePermissionsForResourceClass.isEmpty(),is(true));
  try {
    accessControlContext.assertResourceCreatePermission(SYS_RESOURCE,resourceClassName,ResourceCreatePermissions.getInstance(ResourcePermissions.getInstance(ResourcePermissions.RESET_CREDENTIALS)));
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
    assertThat(e.getMessage().toLowerCase(),containsString("String_Node_Str"));
  }
  try {
    accessControlContext.assertResourceCreatePermission(SYS_RESOURCE,resourceClassName,ResourceCreatePermissions.getInstance(ResourcePermissions.getInstance(ResourcePermissions.IMPERSONATE)));
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
    assertThat(e.getMessage().toLowerCase(),containsString("String_Node_Str"));
  }
  final String domainName=generateDomain();
  final Set<ResourceCreatePermission> allResourceCreatePermissionsForResourceClassAndDomain=accessControlContext.getEffectiveResourceCreatePermissions(SYS_RESOURCE,resourceClassName,domainName);
  assertThat(allResourceCreatePermissionsForResourceClassAndDomain.isEmpty(),is(true));
  try {
    accessControlContext.assertResourceCreatePermission(SYS_RESOURCE,resourceClassName,ResourceCreatePermissions.getInstance(ResourcePermissions.getInstance(ResourcePermissions.RESET_CREDENTIALS)),domainName);
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
    assertThat(e.getMessage().toLowerCase(),containsString("String_Node_Str"));
  }
  try {
    accessControlContext.assertResourceCreatePermission(SYS_RESOURCE,resourceClassName,ResourceCreatePermissions.getInstance(ResourcePermissions.getInstance(ResourcePermissions.IMPERSONATE)),domainName);
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
    assertThat(e.getMessage().toLowerCase(),containsString("String_Node_Str"));
  }
}

Fixed version (ground truth):
@Test public void assertResourceCreatePermission_superUserInvalidPermission_shouldFailAsSystemResource(){
  authenticateSystemResource();
  final String resourceClassName=generateResourceClass(false,false);
  final Set<ResourceCreatePermission> allResourceCreatePermissionsForResourceClass=accessControlContext.getEffectiveResourceCreatePermissions(SYS_RESOURCE,resourceClassName);
  assertThat(allResourceCreatePermissionsForResourceClass.isEmpty(),is(true));
  try {
    accessControlContext.assertResourceCreatePermission(SYS_RESOURCE,resourceClassName,ResourceCreatePermissions.getInstance(ResourcePermissions.getInstance(ResourcePermissions.RESET_CREDENTIALS)));
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
    assertThat(e.getMessage().toLowerCase(),containsString("String_Node_Str"));
  }
  try {
    accessControlContext.assertResourceCreatePermission(SYS_RESOURCE,resourceClassName,ResourceCreatePermissions.getInstance(ResourcePermissions.getInstance(ResourcePermissions.IMPERSONATE)));
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
    assertThat(e.getMessage().toLowerCase(),containsString("String_Node_Str"));
  }
  final String domainName=generateDomain();
  final Set<ResourceCreatePermission> allResourceCreatePermissionsForResourceClassAndDomain=accessControlContext.getEffectiveResourceCreatePermissions(SYS_RESOURCE,resourceClassName,domainName);
  assertThat(allResourceCreatePermissionsForResourceClassAndDomain.isEmpty(),is(true));
  try {
    accessControlContext.assertResourceCreatePermission(SYS_RESOURCE,resourceClassName,ResourceCreatePermissions.getInstance(ResourcePermissions.getInstance(ResourcePermissions.RESET_CREDENTIALS)),domainName);
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
    assertThat(e.getMessage().toLowerCase(),containsString("String_Node_Str"));
  }
  try {
    accessControlContext.assertResourceCreatePermission(SYS_RESOURCE,resourceClassName,ResourceCreatePermissions.getInstance(ResourcePermissions.getInstance(ResourcePermissions.IMPERSONATE)),domainName);
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
    assertThat(e.getMessage().toLowerCase(),containsString("String_Node_Str"));
  }
}