/*
////////////////////////////////////////////
Raw access, for high-performance use:
////////////////////////////////////////////
420399
public char[] getCurrentSegment()
    {
        /* Since the intention of the caller is to directly add stuff into
         * buffers, we should NOT have anything in shared buffer... ie. may
         * need to unshare contents.
         */
        if (mInputStart >= 0) {
            unshare(1);
        } else {
            char[] curr = mCurrentSegment;
            if (curr == null) {
                mCurrentSegment = allocBuffer(0);
            } else if (mCurrentSize >= curr.length) {
                // Plus, we better have room for at least one more char
                expand(1);
            }
        }
        return mCurrentSegment;
    }
35558
function _HMAC_MD5($key, $data, $raw_output = FALSE)
    {
        if (strlen($key) > 64) {
            $key = pack('H32', md5($key));
        }

        if (strlen($key) < 64) {
            $key = str_pad($key, 64, chr(0));
        }

        $k_ipad = substr($key, 0, 64) ^ str_repeat(chr(0x36), 64);
        $k_opad = substr($key, 0, 64) ^ str_repeat(chr(0x5C), 64);

        $inner  = pack('H32', md5($k_ipad . $data));
        $digest = md5($k_opad . $inner, $raw_output);

        return $digest;
    }
346216
func (s *sessionImpl) Access() {
	s.mux.Lock()
	defer s.mux.Unlock()

	s.AccessedF = time.Now()
}
460662
function decompressSessionData(objData) {
    let amorphicOptions = AmorphicContext.amorphicOptions;
    if (amorphicOptions.compressSession && objData.data) {
        let buffer = new Buffer(objData.data);

        return zlib.inflateSync(buffer);
    }

    return objData;
}
621147
@Pure
	DBaseFileAttributeAccessor getAccessor(int recordNumber) {
		DBaseFileAttributeAccessor accessor = this.accessors.get(recordNumber);
		if (accessor == null) {
			accessor = new DBaseFileAttributeAccessor(this, recordNumber);
			this.accessors.put(recordNumber, accessor);
		}
		return accessor;
	}
192095
public R setAccess(BoxSharedLink.Access access) {
        JsonObject jsonObject = getSharedLinkJsonObject();
        jsonObject.add(BoxSharedLink.FIELD_ACCESS, SdkUtils.getAsStringSafely(access));
        BoxSharedLink sharedLink = new BoxSharedLink(jsonObject);
        mBodyMap.put(BoxItem.FIELD_SHARED_LINK, sharedLink);
        return (R) this;
    }
827879
public static Object deepCopy(Object src) throws InstantiationException, IllegalAccessException
	{
		Class<?> clazz = src.getClass();

		// Just check if the object is mutable.
		// We assume the object that is final is likely immutable. 
		// It's true for String, Integer and other data types.
		if(Modifier.isFinal(clazz.getModifiers()))
		{
          return src; 
		}

		Object dst = clazz.newInstance();
		if(src instanceof Calendar)
		{
			((Calendar)dst).setTimeInMillis(((Calendar)src).getTimeInMillis());
			return dst;
		}
		
		Field[] fields = clazz.getFields();
		for(int i=0; i<fields.length; i++)
		{
			Object fObj = fields[i].get(src);
			if(fObj == null)
			{
				continue;
			}
			Class<?> fRealType = fObj.getClass();
			if((!fRealType.isPrimitive()) 
			  || (!fRealType.isEnum())
			  || fRealType.getPackage() != JAVA_LANG_PKG)
			{
				if(fRealType.isArray())
				{
					Object[] items = (Object[]) fObj;
					fObj = Array.newInstance(fRealType.getComponentType(), items.length);
					for(int j=0; j<items.length; j++)
					{
						Array.set(fObj, j, deepCopy(items[j]));
					}
				}
				else
				{
					fObj = deepCopy(fObj);
				}
			}
			fields[i].set(dst, fObj);
		}
		
		return dst;
	}
156773
function (rawHeaders) {
            var headers = {},
                headerList,
                key,
                h,
                i;

            headerList = rawHeaders.split("\n");
            for (i = 0; i < headerList.length; i += 1) {
                h = headerList[i].split(":", 2);

                if (h[1] !== null) {
                    headers[h[0]] = h[1].replace(/^\s+|\s+$/g, "");

                    key = h[0];
                }
                else {
                    if (h[0].substring(0, 1) === "\t") {
                        headers[h[0]] = h[1].replace(/^\s+|\s+$/g, "");
                    }
                }
            }

            return headers;
        }
200660
private static Method asAccessibleMethod(ReloadableType methodDeclaringTypeReloadableType, Method method,
			Object target,
			boolean makeAccessibleCopy) throws IllegalAccessException {
		if (methodDeclaringTypeReloadableType != null && isDeleted(methodDeclaringTypeReloadableType, method)) {
			throw Exceptions.noSuchMethodError(method);
		}

		if (method.isAccessible()) {
			//More expensive check not required / copy not required
		}
		else {
			Class<?> clazz = method.getDeclaringClass();
			int mods = method.getModifiers();
			int classmods;

			//		ReloadableType rtype = getReloadableTypeIfHasBeenReloaded(clazz);
			if (methodDeclaringTypeReloadableType == null || !methodDeclaringTypeReloadableType.hasBeenReloaded()) {
				classmods = clazz.getModifiers();
			}
			else {
				//Note: the "super bit" may be set in class modifiers but we should block it out, it
				//shouldn't be shown to users of the reflection API.
				classmods = methodDeclaringTypeReloadableType.getLatestTypeDescriptor().getModifiers()
						& ~Opcodes.ACC_SUPER;
			}
			if (Modifier.isPublic(mods & classmods/*jlClassGetModifiers(clazz)*/)) {
				//More expensive check not required / copy not required
			}
			else {
				//More expensive check required
				Class<?> callerClass = getCallerClass();
				JVM.ensureMemberAccess(callerClass, clazz, target, mods);
				if (makeAccessibleCopy) {
					method = JVM.copyMethod(method); // copy: we must not change accessible flag on original method!
					method.setAccessible(true);
				}
			}
		}
		return makeAccessibleCopy ? method : null;
	}
316185
func (c *Client) raw(method, path string) ([]byte, error) {
	// create the URI
	uri, err := url.Parse(c.ApiUrl + path)
	if err != nil {
		return nil, err
	}

	// add the access token to the URL query string
	params := uri.Query()
	params.Add("access_token", c.Token)
	uri.RawQuery = params.Encode()

	// create the request
	req := &http.Request{
		URL           : uri,
		Method        : method,
		ProtoMajor    : 1,
		ProtoMinor    : 1,
		Close         : true,
		ContentLength : 0,
	}

	// set the appropariate headers
	req.Header = http.Header{}
	req.Header.Set("Content-Type", "application/json")

	// make the request using the default http client
	resp, err := DefaultClient.Do(req)
	if err != nil {
		return nil, err
	}

	// Read the bytes from the body (make sure we defer close the body)
	defer resp.Body.Close()
	return ioutil.ReadAll(resp.Body)
}
1197623
func access(current interface{}, selector string, value interface{}, isSet bool) interface{} {
	thisSel, nextSel := getKey(selector)

	index := -1
	if strings.Contains(thisSel, "[") {
		index, thisSel = getIndex(thisSel)
	}

	if curMap, ok := current.(Map); ok {
		current = map[string]interface{}(curMap)
	}
	// get the object in question
	switch current.(type) {
	case map[string]interface{}:
		curMSI := current.(map[string]interface{})
		if nextSel == "" && isSet {
			curMSI[thisSel] = value
			return nil
		}

		_, ok := curMSI[thisSel].(map[string]interface{})
		if (curMSI[thisSel] == nil || !ok) && index == -1 && isSet {
			curMSI[thisSel] = map[string]interface{}{}
		}

		current = curMSI[thisSel]
	default:
		current = nil
	}

	// do we need to access the item of an array?
	if index > -1 {
		if array, ok := interSlice(current); ok {
			if index < len(array) {
				current = array[index]
			} else {
				current = nil
			}
		}
	}
	if nextSel != "" {
		current = access(current, nextSel, value, isSet)
	}
	return current
}
821829
@Override
    public Pair<Map<String, ByteBuffer>, Map<String, ByteBuffer>> next() {
        if (!this.hasNext()) {
            throw new DeepIllegalAccessException("DeepRecordReader exhausted");
        }
        return rowIterator.next();
    }
498717
protected <RESULT> RESULT doMasterAccessFixedly(SlaveDBCallback<RESULT> noArgLambda) {
        assertCallbackNotNull(noArgLambda);
        final String currentKey = selectableDataSourceHolder.getCurrentSelectableDataSourceKey();
        final String masterDB = MASTER_DB;
        if (logger.isDebugEnabled()) {
            logger.debug(buildMasterAccessFixedlyDebugMessage(masterDB));
        }
        selectableDataSourceHolder.switchSelectableDataSourceKey(masterDB);
        try {
            return noArgLambda.callback();
        } finally {
            selectableDataSourceHolder.switchSelectableDataSourceKey(currentKey);
        }
    }
1023798
public static String toStringAccess(int access) throws ApplicationException {
	String res = toStringAccess(access, null);
	if (res != null) return res;
	throw new ApplicationException(
		"invalid access type [" + access + "], access types are Component.ACCESS_PACKAGE, Component.ACCESS_PRIVATE, Component.ACCESS_PUBLIC, Component.ACCESS_REMOTE");
    }
632943
DataSource getFastDataSource(HsqlDatabaseDescriptor hsqlDatabase) {
		BasicDataSource bds = new BasicDataSource();
		bds.setDriverClassName(hsqlDatabase.getDriverClassName());
		bds.setUsername(hsqlDatabase.getUsername());
		bds.setPassword(hsqlDatabase.getPassword());
		bds.setUrl(hsqlDatabase.getUrl());
		return bds;
	}
239323
function getFormatChunksFrom (rawValues, prefix) {
      getFormatChunksFrom_accumulator.length = 0;

      var rawValuesLength = rawValues.length;
      var i;

      for (i = 0; i < rawValuesLength; i++) {
        getFormatChunksFrom_accumulator.push('_' + prefix + '_' + i);
      }

      return getFormatChunksFrom_accumulator;
    }
728453
@Override
	public int serializeToPages(
			BinaryRow record,
			AbstractPagedOutputView headerLessView) throws IOException {
		checkArgument(headerLessView.getHeaderLength() == 0);
		int sizeInBytes = record.getSizeInBytes();
		int skip = checkSkipWriteForFixLengthPart(headerLessView);
		if (record.getSegments().length == 1) {
			headerLessView.writeInt(sizeInBytes);
			headerLessView.write(record.getSegments()[0], record.getOffset(), sizeInBytes);
		} else {
			headerLessView.writeInt(record.getSizeInBytes());
			serializeToPagesWithoutLength(record, headerLessView);
		}
		return skip;
	}