统计根节点冲突情况及预分配的数组空间利用情况
323133
public void showConflict(){
        int emptySlot=0;
        //key:冲突长度 value:冲突个数
        Map<Integer, Integer> map = new HashMap<>();
        for(TrieNode<V> node : ROOT_NODES_INDEX){
            if(node == null){
                emptySlot++;
            }else{
                int i=0;
                while((node = node.getSibling()) != null){
                    i++;
                }
                if(i > 0){
                    Integer count = map.get(i);
                    if(count == null){
                        count = 1;
                    }else{
                        count++;
                    }
                    map.put(i, count);
                }
            }
        }
        int count=0;
        for(int key : map.keySet()){
            int value = map.get(key);
            count += key*value;
            LOGGER.info("冲突次数为："+key+" 的元素个数："+value);
        }
        LOGGER.info("冲突次数："+count);
        LOGGER.info("总槽数："+INDEX_LENGTH);
        LOGGER.info("用槽数："+(INDEX_LENGTH-emptySlot));
        LOGGER.info("使用率："+(float)(INDEX_LENGTH-emptySlot)/INDEX_LENGTH*100+"%");
        LOGGER.info("剩槽数："+emptySlot);
    }
609191
@Override
    public long getTotalSpace() {
        checkClosed();

        if (fatType == FatType.FAT32) {
            return bs.getNrTotalSectors() * bs.getBytesPerSector();
        }

        return -1;
    }
392152
function parseAwsIni(ini) {
  var section,
      out = Object.create(null),
      re = /^\[([^\]]+)\]\s*$|^([a-z_]+)\s*=\s*(.+?)\s*$/,
      lines = ini.split(/\r?\n/)

  lines.forEach(function(line) {
    var match = line.match(re)
    if (!match) return
    if (match[1]) {
      section = match[1]
      if (out[section] == null) out[section] = Object.create(null)
    } else if (section) {
      out[section][match[2]] = match[3]
    }
  })

  return out
}
229249
public static List<String> split(String str, Pattern separatorPattern, int limit, boolean isTrim, boolean ignoreEmpty){
		if(StrUtil.isEmpty(str)){
			return new ArrayList<String>(0);
		}
		if(limit == 1){
			return addToList(new ArrayList<String>(1), str, isTrim, ignoreEmpty);
		}
		
		if(null == separatorPattern){//分隔符为空时按照空白符切分
			return split(str, limit);
		}
		
		final Matcher matcher = separatorPattern.matcher(str);
		final ArrayList<String> list = new ArrayList<>();
		int len = str.length();
		int start = 0;
		while(matcher.find()){
			addToList(list, str.substring(start, matcher.start()), isTrim, ignoreEmpty);
			start = matcher.end();
			
			//检查是否超出范围（最大允许limit-1个，剩下一个留给末尾字符串）
			if(limit > 0 && list.size() > limit-2){
				break;
			}
		}
		return addToList(list, str.substring(start, len), isTrim, ignoreEmpty);
	}
552501
private void fillCollection(Collection<?> collection) {

        int count = 0;

        // 展开  Collection 容器, 输出逗号分隔以支持 IN (...) 语法
        // "IN :varlist" --> "IN (?, ?, ...)"
        if (collection.isEmpty()) {

            // 输出  "IN (NULL)" 保证不会产生错误
            builder.append(NULL);

        } else {

            // 输出逗号分隔的参数表
            for (Object value : collection) {

                if (value != null) {

                    if (count > 0) {
                        builder.append(COMMA);
                    }

                    // 输出参数内容
                    addArg(value);

                    builder.append(QUESTION);

                    count++;
                }
            }
        }
    }
101839
function take(pattern, namespace) {
      // 判断是否捕获当前 namespaces。
      if (typeof pattern === "string") {
        // 如果是想 take 当前命名空间的话加上 namespace

        if (namespace) {
          return sagaEffects.take(`${namespace}${SEP}${pattern}`);
        }

        if (~pattern.indexOf(SEP)) {
          const fullNamespaces = pattern.split(SEP);
          const actionType = fullNamespaces[fullNamespaces.length - 1];
          const namespaces = fullNamespaces.slice(0, fullNamespaces.length - 1);
          warning(
            namespaces !== model.namespace,
            `sagas.take: ${pattern} should not be prefixed with namespace ${
              model.namespace
            }`
          );
        } else {
          return sagaEffects.take(this.prefixType(pattern, model));
        }
      }
      return sagaEffects.take(pattern);
    }
464876
private static void combineWords(String[] wordNet, int start, int end, CoreDictionary.Attribute[] attributeArray, CoreDictionary.Attribute value)
    {
        if (start + 1 != end)   // 小优化，如果只有一个词，那就不需要合并，直接应用新属性
        {
            StringBuilder sbTerm = new StringBuilder();
            for (int j = start; j < end; ++j)
            {
                if (wordNet[j] == null) continue;
                sbTerm.append(wordNet[j]);
                wordNet[j] = null;
            }
            wordNet[start] = sbTerm.toString();
        }
        attributeArray[start] = value;
    }
1306440
static byte[] encode(int count) {
        // 计算需要填充的位数
        int amountToPad = BLOCK_SIZE - (count % BLOCK_SIZE);
        if (amountToPad == 0) {
            amountToPad = BLOCK_SIZE;
        }
        // 获得补位所用的字符
        char padChr = chr(amountToPad);
        String tmp = new String();
        for (int index = 0; index < amountToPad; index++) {
            tmp += padChr;
        }
        return tmp.getBytes(CHARSET);
    }
812890
function parseFunction (node) {
	const args = [];
	let index = 0;
	node.nodes.forEach((subNode) => {
		if (subNode.type === "div" && subNode.value === ",") {
			// 遇到`,`下标自加1
			index++;
			return;
		} else if (subNode.type === "function") {
			// 将参数中的`color-stop`,`from`,`to`三种function特殊处理
			if ((subNode.value === "from" || subNode.value === "to" || subNode.value === "color-stop")) {
				let colorStop = subNode.nodes.filter((colorStopInfo) => {
					// colorStop的子节点，除function和word外，都丢去
					return colorStopInfo.type === "function" || colorStopInfo.type === "word";
				}).map((colorStopInfo) => {
					// colorStop的子节点，转换为字符串
					return valueParser.stringify(colorStopInfo);
				});

				// 组装新的对象传递出去
				colorStop = {
					nodes: colorStop,
					type: "function",
					value: subNode.value,
				};

				// 不使用第三个数组维度，而是将其存在最上面的维度上
				args[index] = colorStop;
				return args[index];
			}
		} else if (subNode.type !== "word") {
			return;
		}

		if (!args[index]) {
			// 如果未初始化该数组维度，对其初始化
			args[index] = [];
		}
		// 未特殊处理的function，还有普通的word，将其转字符串
		args[index].push(valueParser.stringify(subNode));
	});
	// 返回转换后的数组
	return args;
}
1079901
function splitPlatformInfo(uaList) {
  for(var i = 0; i < uaList.length; ++i) {
    var item = uaList[i];
    if (isEnclosedInParens(item)) {
      return removeEmptyElements(trimSpacesInEachElement(item.substr(1, item.length-2).split(';')));
    }
  }
}
156449
private static void initEngine() {
		engine.setDevMode(constants.getDevMode());
		
		// 避免在某些环境下 webRootPath 值为 blank 时无法启动项目
		if (StrKit.notBlank(PathKit.getWebRootPath())) {
			engine.setBaseTemplatePath(PathKit.getWebRootPath());
		}
	}
579482
function(command, bodyLength, status) {
        if (null == bodyLength) {
            bodyLength = 0
        }

        if (null == status) {
            status = 0
        }

        // ----------- 存放1字节的command和1字节的status
        var buffer = new Buffer(2)
        buffer.writeUInt8(command, 0)
        buffer.writeUInt8(status, 1)

        // 生成8bytes存放body length的buffer
        var blBuffer = helpers.number2Buffer(bodyLength, 8)

        // 拼接
        return Buffer.concat([blBuffer, buffer])
    }
101022
def leaves_not_empty(self):
        
        return [n for n in self.dfs if ((n.is_leaf) and (not n.is_empty))]
1204497
public void initContext(Context ctx)
	{
		// 模板静态文本部分
		ctx.staticTextArray = staticTextArray;
		// 模板各种缓存存放地

		// 临时标量所在空间
		ctx.tempVarStartIndex = tempVarStartIndex;
		// 分配变量空间,最后一个为模板的返回值
		ctx.vars = new Object[varIndexSize + 1];
		ctx.vars[varIndexSize] = Context.NOT_EXIST_OBJECT;

		// 将全局变量放到数组
		putGlobaToArray(ctx);

	}
1072802
def lines_of_content(content, width):
    
    result = 0
    if isinstance(content, list):
        for line in content:
            _line = preprocess(line)
            result += ceil(line_width(_line) / width)
    elif isinstance(content, dict):
        for k, v in content.items():
            # 加2是算上行内冒号和空格的宽度
            # adding 2 for the for the colon and space ": "
            _k, _v = map(preprocess, (k, v))
            result += ceil((line_width(_k) + line_width(_v) + 2) / width)
    return int(result)
186314
private static Number getNumberValue(String value, String numFmtString) {
		if(StrUtil.isBlank(value)) {
			return null;
		}
		double numValue = Double.parseDouble(value);
		// 普通数字
		if (null != numFmtString && numFmtString.indexOf(StrUtil.C_DOT) < 0) {
			final long longPart = (long) numValue;
			if (longPart == numValue) {
				// 对于无小数部分的数字类型，转为Long
				return longPart;
			}
		}
		return numValue;
	}
558674
private static int countSpaces(String str) {
    int counter = 0;
    for (char c : str.toCharArray()) {
      if (c == ' ') {
        counter++;
      }
    }
    return counter;
  }