private static void storePointerReference(PointerReference[] references, int index, PointerReference ref) {
    references[index] = ref;
    ref.index = index;
  }
private static void storePointerReference(PointerReference[] references, int index, PointerReference ref)