if (verboseJNI) VM.sysWrite("JNI called: SetByteArrayRegion  \n");
if (traceJNI) VM.sysWrite("JNI called: SetByteArrayRegion  \n");
  private static void SetByteArrayRegion(int envJREF, int arrayJREF, int startIndex,                                          int length, VM_Address bufAddress) {    if (verboseJNI) VM.sysWrite("JNI called: SetByteArrayRegion  \n");    VM_JNIEnvironment env;    try {      env = VM_Thread.getCurrentThread().getJNIEnv();      byte destinationArray[] = (byte []) env.getJNIRef(arrayJREF);      if ((startIndex<0) || (startIndex+length>destinationArray.length)) {        env.recordException(new ArrayIndexOutOfBoundsException());        return;      }      VM_Memory.memcopy(VM_Magic.objectAsAddress(destinationArray).add(startIndex), bufAddress, length);     } catch (Throwable unexpected) {      env = VM_Thread.getCurrentThread().getJNIEnv();      env.recordException(unexpected);      return;    }  }   