[NO ISSUE][TX] Ensure lock manager computes valid indexes for hash table

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
Given a dataset id and an entity hash value, ensure that the lock
manager computes a valid index for looking up the hash table.

Change-Id: I33d342455a79d0d69b49e126ff6a40c47b07d0dd
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11403
Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
Reviewed-by: Michael Blow <mblow@apache.org>
Tested-by: Michael Blow <mblow@apache.org>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/ResourceGroupTable.java b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/ResourceGroupTable.java
index 93cda83..a82b302 100644
--- a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/ResourceGroupTable.java
+++ b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/ResourceGroupTable.java
@@ -41,7 +41,7 @@
 
     ResourceGroup get(int dId, int entityHashValue) {
         // TODO ensure good properties of hash function
-        return table[Math.abs(dId ^ entityHashValue) % size];
+        return table[Math.abs((dId ^ entityHashValue) % size)];
     }
 
     ResourceGroup get(int i) {