if (verboseJNI) VM.sysWrite("JNI called: GetObjectArrayElement  \n");
if (traceJNI) VM.sysWrite("JNI called: GetObjectArrayElement  \n");
  private static int GetObjectArrayElement(int envJREF, int arrayJREF, int index) {    if (verboseJNI) VM.sysWrite("JNI called: GetObjectArrayElement  \n");    VM_JNIEnvironment env;    try {      env = VM_Thread.getCurrentThread().getJNIEnv();      Object sourceArray[] = (Object []) env.getJNIRef(arrayJREF);      if (sourceArray==null)        return 0;      VM_Array arrayType = VM_Magic.getObjectType(sourceArray).asArray();      if (arrayType.getElementType().isPrimitiveType())        return 0;      if (index >= VM_Magic.getArrayLength(sourceArray)) {        env.recordException(new ArrayIndexOutOfBoundsException());        return 0;      }      return env.pushJNIRef(sourceArray[index]);    } catch (Throwable unexpected) {      env = VM_Thread.getCurrentThread().getJNIEnv();      env.recordException(unexpected);      return 0;    }  }