String str =  (String) env.getJNIRef(objJREF);
String str =  (String) env.getJNIRef(strJREF);
  private static VM_Address GetStringUTFChars(VM_JNIEnvironment env, int objJREF, VM_Address isCopyAddress) {    if (traceJNI) VM.sysWrite("JNI called: GetStringUTFChars  \n");    try {      String str =  (String) env.getJNIRef(objJREF);      byte[] utfcontents = VM_UTF8Convert.toUTF8(str);      int len = utfcontents.length;      int copyBufferLen = VM_Memory.alignDown(len + BYTES_IN_ADDRESS, BYTES_IN_ADDRESS ); // need extra at end for storing terminator and end at word boundary       // alloc non moving buffer in C heap for string contents as utf8 array      // alloc extra byte for C null terminator      VM_Address copyBuffer = VM_SysCall.sysMalloc(copyBufferLen);      if(copyBuffer.isZero()) {        env.recordException(new OutOfMemoryError());        return VM_Address.zero();      }      // store word of 0 at end, before the copy, to set C null terminator      VM_Magic.setMemoryWord(copyBuffer.add(copyBufferLen - BYTES_IN_ADDRESS), VM_Word.zero());      VM_Memory.memcopy(copyBuffer, VM_Magic.objectAsAddress(utfcontents), len);      // set callers isCopy boolean to true, if it's a valid address      if (!isCopyAddress.isZero()) {        int temp = VM_Magic.getMemoryInt(isCopyAddress);        if (VM.LittleEndian) {          VM_Magic.setMemoryInt(isCopyAddress, ((temp & 0xffffff00) | 0x00000001));        } else {          VM_Magic.setMemoryInt(isCopyAddress, ((temp & 0x00ffffff) | 0x01000000));        }      }      return copyBuffer;    } catch (Throwable unexpected) {      if (traceJNI) unexpected.printStackTrace(System.err);      env.recordException(unexpected);      return VM_Address.zero();    }  }