public static String getTokenTextInternalFree(char[] buffer, int start, int end, int size, boolean upcaseP) {
	    if (start >= size) {
	      start = start - size;
	    }
	    else if (start < 0) {
	      start = size + start;
	    }
	    if (end > size) {
	      end = end - size;
	    }
	    else if (end < 0) {
	      end = size + end;
	    }
	    { int length = end - start;
	      StringBuffer result = null;
	      int cursor = 0;
	      int auxend = end;

	      if (length < 0) {
	        length = length + size;
	        auxend = size;
	      }
	      result = Stella.makeRawMutableString(length);
	     
	        loop000 : for (;;) {
	          while (start < auxend) {
	            edu.isi.stella.javalib.Native.mutableString_nthSetter(result, buffer[start], cursor);
	            cursor = cursor + 1;
	            start = start + 1;
	          }
	          if (auxend == end) {
	            break loop000;
	          }
	          start = 0;
	          auxend = end;
	        }
	     
	      if (upcaseP)
	    	  return (result.toString().toUpperCase());
	      else
	    	  return (result.toString());
	    }
	  }