Program: 60953
Project: 60953
Buggy source:
private static void setUpTableAndUserPermissions() throws Exception {
  TableDescriptorBuilder tableBuilder=TableDescriptorBuilder.newBuilder(TEST_TABLE);
  ColumnFamilyDescriptorBuilder cfd=ColumnFamilyDescriptorBuilder.newBuilder(TEST_FAMILY);
  cfd.setMaxVersions(100);
  tableBuilder.addColumnFamily(cfd.build());
  tableBuilder.setValue(TableDescriptorBuilder.OWNER,USER_OWNER.getShortName());
  createTable(TEST_UTIL,tableBuilder.build(),new byte[][]{Bytes.toBytes("String_Node_Str")});
  grantGlobal(TEST_UTIL,USER_ADMIN.getShortName(),Permission.Action.ADMIN,Permission.Action.CREATE,Permission.Action.READ,Permission.Action.WRITE);
  grantOnTable(TEST_UTIL,USER_RW.getShortName(),TEST_TABLE,TEST_FAMILY,null,Permission.Action.READ,Permission.Action.WRITE);
  grantOnTable(TEST_UTIL,USER_CREATE.getShortName(),TEST_TABLE,null,null,Permission.Action.CREATE,Permission.Action.READ,Permission.Action.WRITE);
  grantOnTable(TEST_UTIL,USER_RO.getShortName(),TEST_TABLE,TEST_FAMILY,null,Permission.Action.READ);
  grantGlobal(TEST_UTIL,toGroupEntry(GROUP_ADMIN),Permission.Action.ADMIN);
  grantGlobal(TEST_UTIL,toGroupEntry(GROUP_CREATE),Permission.Action.CREATE);
  grantGlobal(TEST_UTIL,toGroupEntry(GROUP_READ),Permission.Action.READ);
  grantGlobal(TEST_UTIL,toGroupEntry(GROUP_WRITE),Permission.Action.WRITE);
  assertEquals(4,AccessControlLists.getTablePermissions(conf,TEST_TABLE).size());
  try {
    assertEquals(4,AccessControlClient.getUserPermissions(systemUserConnection,TEST_TABLE.toString()).size());
  }
 catch (  Throwable e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private static void setUpTableAndUserPermissions() throws Exception {
  TableDescriptorBuilder tableBuilder=TableDescriptorBuilder.newBuilder(TEST_TABLE);
  ColumnFamilyDescriptorBuilder cfd=ColumnFamilyDescriptorBuilder.newBuilder(TEST_FAMILY);
  cfd.setMaxVersions(100);
  tableBuilder.addColumnFamily(cfd.build());
  tableBuilder.setValue(TableDescriptorBuilder.OWNER,USER_OWNER.getShortName());
  createTable(TEST_UTIL,tableBuilder.build(),new byte[][]{Bytes.toBytes("String_Node_Str")});
  grantGlobal(TEST_UTIL,USER_ADMIN.getShortName(),Permission.Action.ADMIN,Permission.Action.CREATE,Permission.Action.READ,Permission.Action.WRITE);
  grantOnTable(TEST_UTIL,USER_RW.getShortName(),TEST_TABLE,TEST_FAMILY,null,Permission.Action.READ,Permission.Action.WRITE);
  grantOnTable(TEST_UTIL,USER_CREATE.getShortName(),TEST_TABLE,null,null,Permission.Action.CREATE,Permission.Action.READ,Permission.Action.WRITE);
  grantOnTable(TEST_UTIL,USER_RO.getShortName(),TEST_TABLE,TEST_FAMILY,null,Permission.Action.READ);
  grantGlobal(TEST_UTIL,toGroupEntry(GROUP_ADMIN),Permission.Action.ADMIN);
  grantGlobal(TEST_UTIL,toGroupEntry(GROUP_CREATE),Permission.Action.CREATE);
  grantGlobal(TEST_UTIL,toGroupEntry(GROUP_READ),Permission.Action.READ);
  grantGlobal(TEST_UTIL,toGroupEntry(GROUP_WRITE),Permission.Action.WRITE);
  assertEquals(4,AccessControlLists.getTablePermissions(conf,TEST_TABLE).size());
  try {
    assertEquals(4,AccessControlClient.getUserPermissions(systemUserConnection,TEST_TABLE.toString()).size());
  }
 catch (  Throwable e) {
    LOG.error("String_Node_Str",e);
    fail("String_Node_Str");
  }
}