获取一个对象，第一次调用此方法时初始化对象然后返回，之后调用此方法直接返回原对象
553772
@Override
	public T get() {
		T result = object;
		if (result == null) {
			synchronized (this) {
				result = object;
				if (result == null) {
					object = result = init();
				}
			}
		}
		return result;
	}
1141616
function Type(/* function | RegExp */ matcher) {
		// 参数合法性检查。
		if (arguments.length != 1) {
			throw new ERR.Arguments(1, arguments.length);
		}
		if (!(typeof matcher == 'function' || matcher instanceof RegExp)) {
			throw new ERR.Type('Type matcher', [ 'Function', 'RegExp' ], matcher);
		}

		// Type() 构造函数参数确定，故毋须使用类似 ParamList.parse 这样的构建器。
		if (!(this instanceof Type)) return new Type(matcher);

		if (matcher instanceof RegExp) {
			this.match = function(value) {
				return matcher.test(value);
			};
		}
		else {
			this.match = matcher;
		}
	}
978324
static void parseMethodInfo(Map<String, Object> methodParameters, String method, String valueStr) {
        int idxSplit = valueStr.indexOf('#'); // "#"被认为是MethodSpecial配置的标志
        if (idxSplit < 0) {
            return;
        }

        int idxLeft = valueStr.indexOf('[');
        int idxRight = valueStr.indexOf(']');

        String parameters = valueStr.substring(idxLeft + 1, idxRight);
        String[] kvs = parameters.split("@");
        if (kvs.length > 0) {
            Map<String, String> tmp = new HashMap<String, String>();
            for (String kvp : kvs) {
                String[] kv = kvp.split("#");
                if (kv.length == 2) {
                    tmp.put(kv[0], kv[1]);
                }
            }
            // timeout特殊处理
            String timeout = getValue(tmp, ATTR_TIMEOUT, KEY_TIMEOUT,
                TIMEOUT);
            if (timeout != null) {
                removeOldKeys(tmp, ATTR_TIMEOUT, KEY_TIMEOUT, TIMEOUT);
                try {
                    methodParameters.put("." + method + "." + ATTR_TIMEOUT,
                        Integer.parseInt(timeout));
                } catch (Exception e) {
                    LOGGER.error("method timeout is invalid : {}", timeout);
                }
            }
            // 其它就存起来
            for (Map.Entry<String, String> entry : tmp.entrySet()) {
                methodParameters.put("." + method + "." + entry.getKey(), entry.getValue());
            }
        }
    }
361531
function () {
            if (opt.globalTask.state === 'cancel') return;
            for (; that._uploadingThreadCount < that.uploadMaxThread && task.currentIndex < task.chunkCount; task.currentIndex++) {
                var chunk = task.chunks[task.currentIndex];
                if (chunk.state !== 'waiting') continue;
                (function (chunk) {
                    chunk.state = 'uploading';
                    task.uploadingCount++;
                    that._uploadingThreadCount++;
                    uploadSingleChunk.call(that, task, chunk, function (error, data) {
                        task.uploadingCount--;
                        that._uploadingThreadCount--;
                        if (error) { // 错误马上结束
                            chunk.state = 'error';
                            uploadError(error, data);
                        } else {
                            chunk.state = 'success';
                            if (task.uploadingCount <= 0 && task.currentIndex >= task.chunkCount) { // 全部完成
                                uploadSuccess();
                            } else { // 未完成，处理执行下一个分片
                                uploadNextChunk();
                            }
                        }
                    });
                })(chunk);
            }
            if (task.uploadingCount === 0 && task.currentIndex === task.chunks.length) { // 全部不需要上传
                uploadSuccess();
            }
        }
227325
function mix(target, source) {
        var args = _arrSlice.call(arguments),
            i = 1,
            key, self = arguments.callee,
            //如果最后参数是布尔，判定是否覆写同名属性
            ride = $.isBoolean(args[args.length - 1]) ? args.pop() : true;
        if(args.length === 1) {
            target = !this.window ? this : _cleanObj;
            i = 0;
        }

        while((source = args[i++])) {
            //source = [{a:1},{b:3}];
            if($.isArray(source)) {
                for(var n = 0, len = source.length; n < len; n++) {
                    self(target, source[n], ride);
                }

                continue;
            }
            //杂糅只允许对象
            for(key in source) {
                if(ride || !(key in target)) {
                    target[key] = source[key];
                }
            }
        }
        return target;
    }
1212047
public void walkPath(Map<String, Double> relationMap) {
        Term term = null;
        // BEGIN先行打分
        merger(root, 0, relationMap);
        // 从第一个词开始往后打分
        for (int i = 0; i < terms.length; i++) {
            term = terms[i];
            while (term != null && term.from() != null && term != end) {
                int to = term.toValue();
                merger(term, to, relationMap);
                term = term.next();
            }
        }
        optimalRoot();
    }
256464
function(watcher){
    var dirty = false;
    if(!watcher) return;

    var now, last, tlast, tnow,  
      eq, diff, keyOf, trackDiff
     

    if(!watcher.test){

      now = watcher.get(this);
      last = watcher.last;
      keyOf = watcher.keyOf

      if(now !== last || watcher.force){
        tlast = _.typeOf(last);
        tnow = _.typeOf(now);
        eq = true; 

        // !Object
        if( !(tnow === 'object' && tlast==='object' && watcher.deep) ){
          // Array
          if( tnow === 'array' && ( tlast=='undefined' || tlast === 'array') ){
            if(typeof keyOf === 'function'){
              trackDiff = diffTrack(now, watcher.last || [], keyOf )
              diff = trackDiff.steps;
              if(trackDiff.dirty) dirty = true;
            }else{
              diff = diffArray(now, watcher.last || [], watcher.diff)
            }
            
            if(!dirty && (tlast !== 'array' || diff === true || diff.length) ) dirty = true;
          }else{
            eq = _.equals( now, last );
            if( !eq || watcher.force ){
              watcher.force = null;
              dirty = true; 
            }
          }
        }else{
          diff =  diffObject( now, last, watcher.diff, keyOf  );
          if(diff.isTrack){
            trackDiff = diff;
            diff = trackDiff.steps;
          }
          if( diff === true || diff.length ) dirty = true;
        }
      }

    } else{
      // @TODO 是否把多重改掉
      var result = watcher.test(this);
      if(result){
        dirty = true;
        watcher.fn.apply(this, result)
      }
    }
    if(dirty && !watcher.test){
      if(tnow === 'object' && watcher.deep || tnow === 'array'){
        watcher.last = _.clone(now);
      }else{
        watcher.last = now;
      }
      watcher.fn.call(this, now, last, diff, trackDiff && trackDiff.oldKeyMap, trackDiff && trackDiff.dirty)
      if(watcher.once) this.$unwatch(watcher)
    }

    return dirty;
  }
12470
protected boolean inList(String includeMethods, String excludeMethods, String methodName) {
        //判断是否在白名单中
        if (!StringUtils.ALL.equals(includeMethods)) {
            if (!inMethodConfigs(includeMethods, methodName)) {
                return false;
            }
        }
        //判断是否在黑白单中
        if (inMethodConfigs(excludeMethods, methodName)) {
            return false;
        }
        //默认还是要发布
        return true;

    }
1287638
function(node, attributes) {
      var len = attributes.length,
        operatorFilters = expandFilters["operators"];

      for (; len--;) {
        var attribute = attributes[len],
          operator = attribute["operator"],
          filter = operatorFilters[operator],
          nodeValue = getAttribute(node, attribute.key);

          if (nodeValue === null) {
            if (operator !== "!=") return false;
            continue;
          }
        if (!operator) continue;
        if (!filter) throw Error("不支持的操作符:" + operator);
        if (!filter(attribute.value, nodeValue + "")) return false;
      }
      return true;
    }
1237142
function otfContours2ttfContours(otfContours) {
            if (!otfContours || !otfContours.length) {
                return otfContours;
            }
            var contours = [];
            for (var i = 0, l = otfContours.length; i < l; i++) {

                // 这里可能由于转换错误导致空轮廓，需要去除
                if (otfContours[i][0]) {
                    contours.push(transformContour(otfContours[i]));
                }
            }

            return contours;
        }
648247
function wrapMethod(obj, name, app) {
    var method = obj[name];

    // 保存原始内容
    wrappers.push({
        obj: obj,
        name: name,
        method: method
    });

    obj[name] = function (callback) {
        var args = [];
        for (var i = 1; i < arguments.length; i++) {
            args.push(arguments[i]);
        }

        var ctx = app.getContext();
        args.unshift(function () {
            app.revertContext(ctx);
            ctx = null;
            callback.apply(null, arguments);
        });

        return method.apply(this, args);
    };
}
205757
function(input) {
      // 清理input数据、因为parsed数据最终会被缓存，
      // 我们要尽量让相同的选择器只对应一份parsed数据
      input = clean(input);
      // 先检查缓存中是否有数据
      if (parsed = this.cache.get(input)) return parsed;
      // 如果没有: 初始化参数
      var parsed = this.parsed = [
        [null]
      ];
      var remain = this.input = input;
      var TRUNK = this.TRUNK;
      var prevRemain;
        // 将remain进行this._process这里每匹配一个字符串都会进行一次reduce
      while (prevRemain != (remain = remain.replace(TRUNK, this._process.bind(this)))) {
        prevRemain = remain;
      }
      // 如果没有被解析完 证明选择器字符串有不能被解析的部分
      if (remain !== '') this.error(remain);
      // 返回数据并推入cache
      return this.cache.set(input, parsed);
    }
1287160
function _checkStringElem(xml, tmplRule, outputH) {
  var root = [],
      current = {
    elem: root,
    elemName: 'root',
    parent: null
  },
      parent = null,
      pattern = tmplRule.checkElem,
      matchArr,
      inTextContent,
      omittedCloseElem = null;

  while (matchArr = pattern.exec(xml)) {
    var textBefore = matchArr[1],
        elem = matchArr[2],
        elemName = matchArr[3],
        elemParams = matchArr[4],
        textAfter = matchArr[5]; //处理上一次循环中的可省略闭合标签

    if (omittedCloseElem) {
      var _omittedCloseElem = omittedCloseElem,
          _omittedCloseElem2 = _slicedToArray(_omittedCloseElem, 4),
          _elem = _omittedCloseElem2[0],
          _elemName = _omittedCloseElem2[1],
          _elemParams = _omittedCloseElem2[2],
          _textAfter = _omittedCloseElem2[3];

      var isEx = elem ? isExAll(elemName, tmplRule) : false;

      if (isEx && !isEx[1] && (isPropS(elemName, tmplRule) || isStrPropS(elemName, tmplRule) || isParamsEx(isEx[3]) || exCompileConfig(isEx[3]).isDirective)) {
        parent = current;
        current = _createCurrent(_elemName, parent);

        _setElem(_elem, _elemName, _elemParams, current.elem, null, tmplRule, outputH);
      } else {
        _setSelfCloseElem(_elem, _elemName, _elemParams, current.elem, tmplRule, outputH);
      }

      _setTextAfter(_textAfter, current);

      omittedCloseElem = null;
    } //Text before tag


    if (textBefore && textBefore !== '') {
      _setText(textBefore, current.elem);
    } //Element tag


    if (elem) {
      if (elem !== '<') {
        if (elem.indexOf('<!') === 0) {
          //一些特殊标签当做文本处理
          _setText(elem, current.elem);
        } else {
          var _isEx = isExAll(elemName, tmplRule);

          if (elemName[0] === '/') {
            //Close tag
            if (elemName.substr(1).toLowerCase() === inTextContent) {
              //取消纯文本子节点标记
              inTextContent = null;
            }

            if (_isEx || !inTextContent) {
              var cName = current.elemName;

              if (cName.indexOf(SPLIT_FLAG) < 0 ? elemName === '/' + cName : elemName.indexOf(SPLIT_FLAG) > -1 || elemName === '//') {
                //如果开始标签包含SPLIT_FLAG，则只要结束标签包含SPLIT_FLAG就认为该标签已关闭
                current = current.parent;
              }
            } else {
              _setText(elem, current.elem);
            }
          } else if (elem[elem.length - 2] === '/') {
            //Self close tag
            if (_isEx || !inTextContent) {
              _setSelfCloseElem(elem, elemName, elemParams, current.elem, tmplRule, outputH);
            } else {
              _setText(elem, current.elem);
            }
          } else {
            //Open tag
            if (_isEx || !inTextContent) {
              if (!inTextContent && OMITTED_CLOSE_TAGS$1[elemName.toLowerCase()]) {
                //img等可不闭合标签
                omittedCloseElem = [elem, elemName, elemParams, textAfter];
              } else {
                var elemNameL = elemName.toLowerCase();

                if (TEXT_CONTENT.indexOf(elemNameL) > -1) {
                  //标记该标签为纯文本子节点
                  inTextContent = elemNameL;
                }

                parent = current;
                current = _createCurrent(elemName, parent);

                _setElem(elem, elemName, elemParams, current.elem, null, tmplRule, outputH);
              }
            } else {
              _setText(elem, current.elem);
            }
          }
        }
      } else {
        //单独的"<"和后面的文本拼合在一起
        if (textAfter == null) {
          textAfter = '';
        }

        textAfter = elem + textAfter;
      }
    } //Text after tag


    !omittedCloseElem && _setTextAfter(textAfter, current);
  } //处理最后一次循环中遗留的可省略闭合标签


  if (omittedCloseElem) {
    var _omittedCloseElem3 = omittedCloseElem,
        _omittedCloseElem4 = _slicedToArray(_omittedCloseElem3, 4),
        _elem2 = _omittedCloseElem4[0],
        _elemName2 = _omittedCloseElem4[1],
        _elemParams2 = _omittedCloseElem4[2],
        _textAfter2 = _omittedCloseElem4[3];

    _setSelfCloseElem(_elem2, _elemName2, _elemParams2, current.elem, tmplRule, outputH);

    _setTextAfter(_textAfter2, current);
  }

  return root;
}
98715
function nextTick(fn, thisArg) {
    if (thisArg) {
        fn = bind(fn, thisArg);
    }
    nextTasks.push(fn);

    if (nextHandler) {
        return;
    }

    nextHandler = function () {
        var tasks = nextTasks.slice(0);
        nextTasks = [];
        nextHandler = null;

        for (var i = 0, l = tasks.length; i < l; i++) {
            tasks[i]();
        }
    };

    // 非标准方法，但是此方法非常吻合要求。
    /* istanbul ignore next */
    if (typeof setImmediate === 'function') {
        setImmediate(nextHandler);
    }
    // 用MessageChannel去做setImmediate的polyfill
    // 原理是将新的message事件加入到原有的dom events之后
    else if (typeof MessageChannel === 'function') {
        var channel = new MessageChannel();
        var port = channel.port2;
        channel.port1.onmessage = nextHandler;
        port.postMessage(1);
    }
    // for native app
    else if (isNativePromise) {
        Promise.resolve().then(nextHandler);
    }
    else {
        setTimeout(nextHandler, 0);
    }
}
793382
function (str, length, offset) {

                str = str || '';

                if (undefined === offset) {
                    offset = this.offset;
                }

                length  = length || str.replace(/[^\x00-\xff]/g, '11').length;

                if (length < 0 || offset + length > this.length) {
                    error.raise(10002, this.length, offset + length);
                }

                this.seek(offset);

                for (var i = 0, l = str.length, charCode; i < l; ++i) {
                    charCode = str.charCodeAt(i) || 0;
                    if (charCode > 127) {
                        // unicode编码可能会超出2字节,
                        // 写入与编码有关系，此处不做处理
                        this.writeUint16(charCode);
                    }
                    else {
                        this.writeUint8(charCode);
                    }
                }

                this.offset = offset + length;

                return this;
            }
585606
function (element, type, handler, context) {
            var own = this;
            //非Dom元素不处理
            if (!(1 == element.nodeType || element.nodeType == 9 || element === window)|| !vQ.isFunction(handler)) {
                return;
            }
            //获取传入参数
            var args = slice.call(arguments);

            //批量绑定事件处理
            if (vQ.isArray(type)) {
                return own._handleMultipleEvents.apply(own, [own.one].concat(args));
                //return own._handleMultipleEvents(own.one, element, type, handler);
            }

            var func = function () {
                own.unbind(element, type, func);
                handler.apply(context || element, arguments);
            };

            // copy the guid to the new function so it can removed using the original function's ID
            func.$$guid = handler.$$guid = handler.$$guid || own._guid++;
            own.bind(element, type, func);


            //var func = function(){
            //    own.unbind.apply(own,args);
            //    handler.apply(context || element, arguments);
            //};
            ////args = [type, func].concat(args.slice(2));//更换fun 这样支持不定个数的参数
            //
            //// copy the guid to the new function so it can removed using the original function's ID
            //func.$$guid = handler.$$guid = handler.$$guid || own._guid++;
            ////own.observe(element, type, func);
            //own.bind.apply(own,args);
        }
313924
private static void packagingAction(Method[] methods, Object handlerBean) {
        if (ArrayUtils.isEmpty(methods)) {
            return;
        }
        // 参数唯一，且为public
        Predicate<Method> commonFilter = method -> Modifier.isPublic(method.getModifiers())
                && method.getParameterCount() == 1
                && Objects.isNull(handlerBean) == Modifier.isStatic(method.getModifiers());

        Arrays.stream(methods).filter(commonFilter).forEach(method -> ConverterContext.setAction(method, handlerBean));
    }