repo
stringclasses
11 values
path
stringlengths
41
214
func_name
stringlengths
7
82
original_string
stringlengths
77
11.9k
language
stringclasses
1 value
code
stringlengths
77
11.9k
code_tokens
listlengths
22
1.57k
docstring
stringlengths
2
2.27k
docstring_tokens
listlengths
1
352
sha
stringclasses
11 values
url
stringlengths
129
319
partition
stringclasses
1 value
summary
stringlengths
7
191
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ClassUtil.java
ClassUtil.getClassPaths
public static Set<String> getClassPaths(String packageName, boolean isDecode) { String packagePath = packageName.replace(StrUtil.DOT, StrUtil.SLASH); Enumeration<URL> resources; try { resources = getClassLoader().getResources(packagePath); } catch (IOException e) { throw new UtilException(e, "Loadin...
java
public static Set<String> getClassPaths(String packageName, boolean isDecode) { String packagePath = packageName.replace(StrUtil.DOT, StrUtil.SLASH); Enumeration<URL> resources; try { resources = getClassLoader().getResources(packagePath); } catch (IOException e) { throw new UtilException(e, "Loadin...
[ "public", "static", "Set", "<", "String", ">", "getClassPaths", "(", "String", "packageName", ",", "boolean", "isDecode", ")", "{", "String", "packagePath", "=", "packageName", ".", "replace", "(", "StrUtil", ".", "DOT", ",", "StrUtil", ".", "SLASH", ")", ...
获得ClassPath @param packageName 包名称 @param isDecode 是否解码路径中的特殊字符(例如空格和中文) @return ClassPath路径字符串集合 @since 4.0.11
[ "获得ClassPath" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ClassUtil.java#L419-L434
train
Gets the paths of all the classes in the given package.
[ 30522, 2270, 10763, 2275, 1026, 5164, 1028, 2131, 26266, 15069, 2015, 1006, 5164, 7427, 18442, 1010, 22017, 20898, 2003, 3207, 16044, 1007, 1063, 5164, 7427, 15069, 1027, 7427, 18442, 1012, 5672, 1006, 2358, 22134, 4014, 1012, 11089, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/BooleanUtil.java
BooleanUtil.xor
public static boolean xor(boolean... array) { if (ArrayUtil.isEmpty(array)) { throw new IllegalArgumentException("The Array must not be empty"); } boolean result = false; for (final boolean element : array) { result ^= element; } return result; }
java
public static boolean xor(boolean... array) { if (ArrayUtil.isEmpty(array)) { throw new IllegalArgumentException("The Array must not be empty"); } boolean result = false; for (final boolean element : array) { result ^= element; } return result; }
[ "public", "static", "boolean", "xor", "(", "boolean", "...", "array", ")", "{", "if", "(", "ArrayUtil", ".", "isEmpty", "(", "array", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The Array must not be empty\"", ")", ";", "}", "boolean", ...
对Boolean数组取异或 <pre> BooleanUtil.xor(true, true) = false BooleanUtil.xor(false, false) = false BooleanUtil.xor(true, false) = true BooleanUtil.xor(true, true) = false BooleanUtil.xor(false, false) = false BooleanUtil.xor(true, false) = true </pre> @param array {@code boolean}数组 @return 如果异或计算为true返回 {@code true}
[ "对Boolean数组取异或" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/BooleanUtil.java#L404-L415
train
Xor an array of booleans.
[ 30522, 2270, 10763, 22017, 20898, 1060, 2953, 1006, 22017, 20898, 1012, 1012, 1012, 9140, 1007, 1063, 2065, 1006, 9140, 21823, 2140, 1012, 2003, 6633, 13876, 2100, 1006, 9140, 1007, 1007, 1063, 5466, 2047, 6206, 2906, 22850, 15781, 2595, 24...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/recognition/nt/OrganizationRecognition.java
OrganizationRecognition.viterbiCompute
public static List<NT> viterbiCompute(List<EnumItem<NT>> roleTagList) { return Viterbi.computeEnum(roleTagList, OrganizationDictionary.transformMatrixDictionary); }
java
public static List<NT> viterbiCompute(List<EnumItem<NT>> roleTagList) { return Viterbi.computeEnum(roleTagList, OrganizationDictionary.transformMatrixDictionary); }
[ "public", "static", "List", "<", "NT", ">", "viterbiCompute", "(", "List", "<", "EnumItem", "<", "NT", ">", ">", "roleTagList", ")", "{", "return", "Viterbi", ".", "computeEnum", "(", "roleTagList", ",", "OrganizationDictionary", ".", "transformMatrixDictionary"...
维特比算法求解最优标签 @param roleTagList @return
[ "维特比算法求解最优标签" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/recognition/nt/OrganizationRecognition.java#L122-L125
train
Compute the Viterbi formula.
[ 30522, 2270, 10763, 2862, 1026, 23961, 1028, 6819, 3334, 13592, 25377, 10421, 1006, 2862, 1026, 4372, 12717, 18532, 1026, 23961, 1028, 1028, 2535, 15900, 9863, 1007, 1063, 2709, 6819, 3334, 5638, 1012, 24134, 2368, 2819, 1006, 2535, 15900, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/sax/Excel07SaxReader.java
Excel07SaxReader.endElement
@Override public void endElement(String uri, String localName, String qName) throws SAXException { final String contentStr = StrUtil.trim(lastContent); if (T_ELEMENT.equals(qName)) { // type标签 rowCellList.add(curCell++, contentStr); } else if (C_ELEMENT.equals(qName)) { // cell标签 Object val...
java
@Override public void endElement(String uri, String localName, String qName) throws SAXException { final String contentStr = StrUtil.trim(lastContent); if (T_ELEMENT.equals(qName)) { // type标签 rowCellList.add(curCell++, contentStr); } else if (C_ELEMENT.equals(qName)) { // cell标签 Object val...
[ "@", "Override", "public", "void", "endElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ")", "throws", "SAXException", "{", "final", "String", "contentStr", "=", "StrUtil", ".", "trim", "(", "lastContent", ")", ";", "if", ...
标签结束的回调处理方法
[ "标签结束的回调处理方法" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/sax/Excel07SaxReader.java#L234-L272
train
Override the end of an XML element.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2203, 12260, 3672, 1006, 5164, 24471, 2072, 1010, 5164, 2334, 18442, 1010, 5164, 1053, 18442, 1007, 11618, 24937, 2595, 24422, 1063, 2345, 5164, 8417, 16344, 1027, 2358, 22134, 4014, 1012, 12241, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-http/src/main/java/cn/hutool/http/webservice/SoapClient.java
SoapClient.init
public SoapClient init(SoapProtocol protocol) { // 创建消息工厂 try { this.factory = MessageFactory.newInstance(protocol.getValue()); // 根据消息工厂创建SoapMessage this.message = factory.createMessage(); } catch (SOAPException e) { throw new SoapRuntimeException(e); } return this; }
java
public SoapClient init(SoapProtocol protocol) { // 创建消息工厂 try { this.factory = MessageFactory.newInstance(protocol.getValue()); // 根据消息工厂创建SoapMessage this.message = factory.createMessage(); } catch (SOAPException e) { throw new SoapRuntimeException(e); } return this; }
[ "public", "SoapClient", "init", "(", "SoapProtocol", "protocol", ")", "{", "// 创建消息工厂\r", "try", "{", "this", ".", "factory", "=", "MessageFactory", ".", "newInstance", "(", "protocol", ".", "getValue", "(", ")", ")", ";", "// 根据消息工厂创建SoapMessage\r", "this", "...
初始化 @param protocol 协议版本枚举,见{@link SoapProtocol} @return this
[ "初始化" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/webservice/SoapClient.java#L128-L139
train
Initializes the soap client.
[ 30522, 2270, 7815, 20464, 11638, 1999, 4183, 1006, 7815, 21572, 3406, 25778, 8778, 1007, 1063, 1013, 1013, 100, 100, 100, 100, 100, 100, 3046, 1063, 2023, 1012, 4713, 1027, 4471, 21450, 1012, 2047, 7076, 26897, 1006, 8778, 1012, 2131, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/util/AbstractCloseableRegistry.java
AbstractCloseableRegistry.addCloseableInternal
protected final void addCloseableInternal(Closeable closeable, T metaData) { synchronized (getSynchronizationLock()) { closeableToRef.put(closeable, metaData); } }
java
protected final void addCloseableInternal(Closeable closeable, T metaData) { synchronized (getSynchronizationLock()) { closeableToRef.put(closeable, metaData); } }
[ "protected", "final", "void", "addCloseableInternal", "(", "Closeable", "closeable", ",", "T", "metaData", ")", "{", "synchronized", "(", "getSynchronizationLock", "(", ")", ")", "{", "closeableToRef", ".", "put", "(", "closeable", ",", "metaData", ")", ";", "...
Adds a mapping to the registry map, respecting locking.
[ "Adds", "a", "mapping", "to", "the", "registry", "map", "respecting", "locking", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/AbstractCloseableRegistry.java#L153-L157
train
Add a closeable to the cache.
[ 30522, 5123, 2345, 11675, 5587, 20464, 9232, 3085, 18447, 11795, 2389, 1006, 2485, 3085, 2485, 3085, 1010, 1056, 27425, 1007, 1063, 25549, 1006, 4152, 6038, 2818, 4948, 3989, 7878, 1006, 1007, 1007, 1063, 2485, 3085, 19277, 2546, 1012, 2404...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/context/table/Tables.java
Tables.isSingleTable
public boolean isSingleTable() { Collection<String> tableNames = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); for (Table each : tables) { tableNames.add(each.getName()); } return 1 == tableNames.size(); }
java
public boolean isSingleTable() { Collection<String> tableNames = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); for (Table each : tables) { tableNames.add(each.getName()); } return 1 == tableNames.size(); }
[ "public", "boolean", "isSingleTable", "(", ")", "{", "Collection", "<", "String", ">", "tableNames", "=", "new", "TreeSet", "<>", "(", "String", ".", "CASE_INSENSITIVE_ORDER", ")", ";", "for", "(", "Table", "each", ":", "tables", ")", "{", "tableNames", "....
Judge is single table or not. @return is single table or not
[ "Judge", "is", "single", "table", "or", "not", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/context/table/Tables.java#L63-L69
train
Checks if this is a single table.
[ 30522, 2270, 22017, 20898, 26354, 2075, 7485, 3085, 1006, 1007, 1063, 3074, 1026, 5164, 1028, 2795, 18442, 2015, 1027, 2047, 3628, 3388, 1026, 1028, 1006, 5164, 1012, 2553, 1035, 16021, 6132, 13043, 1035, 2344, 1007, 1025, 2005, 1006, 2795,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
common/src/main/java/io/netty/util/NetUtil.java
NetUtil.sysctlGetInt
private static Integer sysctlGetInt(String sysctlKey) throws IOException { Process process = new ProcessBuilder("sysctl", sysctlKey).start(); try { InputStream is = process.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new Bu...
java
private static Integer sysctlGetInt(String sysctlKey) throws IOException { Process process = new ProcessBuilder("sysctl", sysctlKey).start(); try { InputStream is = process.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new Bu...
[ "private", "static", "Integer", "sysctlGetInt", "(", "String", "sysctlKey", ")", "throws", "IOException", "{", "Process", "process", "=", "new", "ProcessBuilder", "(", "\"sysctl\"", ",", "sysctlKey", ")", ".", "start", "(", ")", ";", "try", "{", "InputStream",...
This will execute <a href ="https://www.freebsd.org/cgi/man.cgi?sysctl(8)">sysctl</a> with the {@code sysctlKey} which is expected to return the numeric value for for {@code sysctlKey}. @param sysctlKey The key which the return value corresponds to. @return The <a href ="https://www.freebsd.org/cgi/man.cgi?sysctl(8)">s...
[ "This", "will", "execute", "<a", "href", "=", "https", ":", "//", "www", ".", "freebsd", ".", "org", "/", "cgi", "/", "man", ".", "cgi?sysctl", "(", "8", ")", ">", "sysctl<", "/", "a", ">", "with", "the", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/NetUtil.java#L315-L339
train
Get Integer from sysctl
[ 30522, 2797, 10763, 16109, 25353, 11020, 19646, 18150, 18447, 1006, 5164, 25353, 11020, 19646, 14839, 1007, 11618, 22834, 10288, 24422, 1063, 2832, 2832, 1027, 2047, 2832, 8569, 23891, 2099, 1006, 1000, 25353, 11020, 19646, 1000, 1010, 25353, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java
LogBuffer.getBeInt32
public final int getBeInt32(final int pos) { final int position = origin + pos; if (pos + 3 >= limit || pos < 0) throw new IllegalArgumentException("limit excceed: " + (pos < 0 ? pos : (pos + 3))); byte[] buf = b...
java
public final int getBeInt32(final int pos) { final int position = origin + pos; if (pos + 3 >= limit || pos < 0) throw new IllegalArgumentException("limit excceed: " + (pos < 0 ? pos : (pos + 3))); byte[] buf = b...
[ "public", "final", "int", "getBeInt32", "(", "final", "int", "pos", ")", "{", "final", "int", "position", "=", "origin", "+", "pos", ";", "if", "(", "pos", "+", "3", ">=", "limit", "||", "pos", "<", "0", ")", "throw", "new", "IllegalArgumentException",...
Return 32-bit signed int from buffer. (big-endian) @see mysql-5.6.10/include/myisampack.h - mi_sint4korr
[ "Return", "32", "-", "bit", "signed", "int", "from", "buffer", ".", "(", "big", "-", "endian", ")" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java#L485-L494
train
Gets a int from the buffer starting at the given position in the buffer as an int.
[ 30522, 2270, 2345, 20014, 2131, 19205, 3372, 16703, 1006, 2345, 20014, 13433, 2015, 1007, 1063, 2345, 20014, 2597, 1027, 4761, 1009, 13433, 2015, 1025, 2065, 1006, 13433, 2015, 1009, 1017, 1028, 1027, 5787, 1064, 1064, 13433, 2015, 1026, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/support/pagefactory/AjaxElementLocator.java
AjaxElementLocator.findElements
@Override public List<WebElement> findElements() { SlowLoadingElementList list = new SlowLoadingElementList(clock, timeOutInSeconds); try { return list.get().getElements(); } catch (NoSuchElementError e) { return new ArrayList<>(); } }
java
@Override public List<WebElement> findElements() { SlowLoadingElementList list = new SlowLoadingElementList(clock, timeOutInSeconds); try { return list.get().getElements(); } catch (NoSuchElementError e) { return new ArrayList<>(); } }
[ "@", "Override", "public", "List", "<", "WebElement", ">", "findElements", "(", ")", "{", "SlowLoadingElementList", "list", "=", "new", "SlowLoadingElementList", "(", "clock", ",", "timeOutInSeconds", ")", ";", "try", "{", "return", "list", ".", "get", "(", ...
{@inheritDoc} Will poll the interface on a regular basis until at least one element is present.
[ "{", "@inheritDoc", "}" ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/support/pagefactory/AjaxElementLocator.java#L108-L116
train
Override this method to return a list of elements.
[ 30522, 1030, 2058, 15637, 2270, 2862, 1026, 4773, 12260, 3672, 1028, 2424, 12260, 8163, 1006, 1007, 1063, 4030, 18570, 12260, 3672, 9863, 2862, 1027, 2047, 4030, 18570, 12260, 3672, 9863, 1006, 5119, 1010, 2051, 5833, 7076, 8586, 15422, 201...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java
DataStream.print
@PublicEvolving public DataStreamSink<T> print() { PrintSinkFunction<T> printFunction = new PrintSinkFunction<>(); return addSink(printFunction).name("Print to Std. Out"); }
java
@PublicEvolving public DataStreamSink<T> print() { PrintSinkFunction<T> printFunction = new PrintSinkFunction<>(); return addSink(printFunction).name("Print to Std. Out"); }
[ "@", "PublicEvolving", "public", "DataStreamSink", "<", "T", ">", "print", "(", ")", "{", "PrintSinkFunction", "<", "T", ">", "printFunction", "=", "new", "PrintSinkFunction", "<>", "(", ")", ";", "return", "addSink", "(", "printFunction", ")", ".", "name", ...
Writes a DataStream to the standard output stream (stdout). <p>For each element of the DataStream the result of {@link Object#toString()} is written. <p>NOTE: This will print to stdout on the machine where the code is executed, i.e. the Flink worker. @return The closed DataStream.
[ "Writes", "a", "DataStream", "to", "the", "standard", "output", "stream", "(", "stdout", ")", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L956-L960
train
Print to Std. Out
[ 30522, 1030, 2270, 6777, 4747, 6455, 2270, 2951, 21422, 11493, 2243, 1026, 1056, 1028, 6140, 1006, 1007, 1063, 11204, 19839, 11263, 27989, 1026, 1056, 1028, 6140, 11263, 27989, 1027, 2047, 11204, 19839, 11263, 27989, 1026, 1028, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONObject.java
JSONObject.getBoolean
public boolean getBoolean(String name) throws JSONException { Object object = get(name); Boolean result = JSON.toBoolean(object); if (result == null) { throw JSON.typeMismatch(name, object, "boolean"); } return result; }
java
public boolean getBoolean(String name) throws JSONException { Object object = get(name); Boolean result = JSON.toBoolean(object); if (result == null) { throw JSON.typeMismatch(name, object, "boolean"); } return result; }
[ "public", "boolean", "getBoolean", "(", "String", "name", ")", "throws", "JSONException", "{", "Object", "object", "=", "get", "(", "name", ")", ";", "Boolean", "result", "=", "JSON", ".", "toBoolean", "(", "object", ")", ";", "if", "(", "result", "==", ...
Returns the value mapped by {@code name} if it exists and is a boolean or can be coerced to a boolean. @param name the name of the property @return the value @throws JSONException if the mapping doesn't exist or cannot be coerced to a boolean.
[ "Returns", "the", "value", "mapped", "by", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONObject.java#L398-L405
train
Get the boolean value associated with a name.
[ 30522, 2270, 22017, 20898, 2131, 5092, 9890, 2319, 1006, 5164, 2171, 1007, 11618, 1046, 3385, 10288, 24422, 1063, 4874, 4874, 1027, 2131, 1006, 2171, 1007, 1025, 22017, 20898, 2765, 1027, 1046, 3385, 1012, 2000, 5092, 9890, 2319, 1006, 4874...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java
HttpUtil.getCharsetAsSequence
public static CharSequence getCharsetAsSequence(CharSequence contentTypeValue) { if (contentTypeValue == null) { throw new NullPointerException("contentTypeValue"); } int indexOfCharset = AsciiString.indexOfIgnoreCaseAscii(contentTypeValue, CHARSET_EQUALS, 0); if (indexOfCha...
java
public static CharSequence getCharsetAsSequence(CharSequence contentTypeValue) { if (contentTypeValue == null) { throw new NullPointerException("contentTypeValue"); } int indexOfCharset = AsciiString.indexOfIgnoreCaseAscii(contentTypeValue, CHARSET_EQUALS, 0); if (indexOfCha...
[ "public", "static", "CharSequence", "getCharsetAsSequence", "(", "CharSequence", "contentTypeValue", ")", "{", "if", "(", "contentTypeValue", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"contentTypeValue\"", ")", ";", "}", "int", "indexOfC...
Fetch charset from Content-Type header value as a char sequence. A lot of sites/possibly clients have charset="CHARSET", for example charset="utf-8". Or "utf8" instead of "utf-8" This is not according to standard, but this method provide an ability to catch desired mistakes manually in code @param contentTypeValue Co...
[ "Fetch", "charset", "from", "Content", "-", "Type", "header", "value", "as", "a", "char", "sequence", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java#L450-L472
train
Get charset as sequence.
[ 30522, 2270, 10763, 25869, 3366, 4226, 5897, 2131, 7507, 22573, 10230, 3366, 4226, 5897, 1006, 25869, 3366, 4226, 5897, 4180, 13874, 10175, 5657, 1007, 1063, 2065, 1006, 4180, 13874, 10175, 5657, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateInfo.java
KvStateInfo.duplicate
public KvStateInfo<K, N, V> duplicate() { final TypeSerializer<K> dupKeySerializer = keySerializer.duplicate(); final TypeSerializer<N> dupNamespaceSerializer = namespaceSerializer.duplicate(); final TypeSerializer<V> dupSVSerializer = stateValueSerializer.duplicate(); if ( dupKeySerializer == keySerializer...
java
public KvStateInfo<K, N, V> duplicate() { final TypeSerializer<K> dupKeySerializer = keySerializer.duplicate(); final TypeSerializer<N> dupNamespaceSerializer = namespaceSerializer.duplicate(); final TypeSerializer<V> dupSVSerializer = stateValueSerializer.duplicate(); if ( dupKeySerializer == keySerializer...
[ "public", "KvStateInfo", "<", "K", ",", "N", ",", "V", ">", "duplicate", "(", ")", "{", "final", "TypeSerializer", "<", "K", ">", "dupKeySerializer", "=", "keySerializer", ".", "duplicate", "(", ")", ";", "final", "TypeSerializer", "<", "N", ">", "dupNam...
Creates a deep copy of the current {@link KvStateInfo} by duplicating all the included serializers. <p>This method assumes correct implementation of the {@link TypeSerializer#duplicate()} method of the included serializers.
[ "Creates", "a", "deep", "copy", "of", "the", "current", "{", "@link", "KvStateInfo", "}", "by", "duplicating", "all", "the", "included", "serializers", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateInfo.java#L79-L94
train
Returns a duplicate of this state info.
[ 30522, 2270, 24888, 9153, 9589, 14876, 1026, 1047, 1010, 1050, 1010, 1058, 1028, 24473, 1006, 1007, 1063, 2345, 4127, 11610, 28863, 1026, 1047, 1028, 4241, 2361, 14839, 8043, 4818, 17629, 1027, 6309, 11610, 28863, 1012, 24473, 1006, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/servlet/ServletUtil.java
ServletUtil.getCookie
public final static Cookie getCookie(HttpServletRequest httpServletRequest, String name) { final Map<String, Cookie> cookieMap = readCookieMap(httpServletRequest); return cookieMap == null ? null : cookieMap.get(name); }
java
public final static Cookie getCookie(HttpServletRequest httpServletRequest, String name) { final Map<String, Cookie> cookieMap = readCookieMap(httpServletRequest); return cookieMap == null ? null : cookieMap.get(name); }
[ "public", "final", "static", "Cookie", "getCookie", "(", "HttpServletRequest", "httpServletRequest", ",", "String", "name", ")", "{", "final", "Map", "<", "String", ",", "Cookie", ">", "cookieMap", "=", "readCookieMap", "(", "httpServletRequest", ")", ";", "retu...
获得指定的Cookie @param httpServletRequest {@link HttpServletRequest} @param name cookie名 @return Cookie对象
[ "获得指定的Cookie" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/servlet/ServletUtil.java#L378-L381
train
Gets the cookie with the given name from the request.
[ 30522, 2270, 2345, 10763, 17387, 2131, 3597, 23212, 2063, 1006, 16770, 2121, 2615, 7485, 2890, 15500, 16770, 2121, 2615, 7485, 2890, 15500, 1010, 5164, 2171, 1007, 1063, 2345, 4949, 1026, 5164, 1010, 17387, 1028, 17387, 2863, 2361, 1027, 31...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-setting/src/main/java/cn/hutool/setting/Setting.java
Setting.putAll
@Override public void putAll(Map<? extends String, ? extends String> m) { this.groupedMap.putAll(DEFAULT_GROUP, m); }
java
@Override public void putAll(Map<? extends String, ? extends String> m) { this.groupedMap.putAll(DEFAULT_GROUP, m); }
[ "@", "Override", "public", "void", "putAll", "(", "Map", "<", "?", "extends", "String", ",", "?", "extends", "String", ">", "m", ")", "{", "this", ".", "groupedMap", ".", "putAll", "(", "DEFAULT_GROUP", ",", "m", ")", ";", "}" ]
将键值对Map加入默认分组(空分组)中 @param m Map
[ "将键值对Map加入默认分组(空分组)中" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/Setting.java#L582-L585
train
Override this method to add all entries from the given map to the default group.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2404, 30524, 5164, 1028, 1049, 1007, 1063, 2023, 1012, 15131, 2863, 2361, 1012, 2404, 8095, 1006, 12398, 1035, 2177, 1010, 1049, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/ssh/Sftp.java
Sftp.lsDirs
public List<String> lsDirs(String path) { return ls(path, new Filter<LsEntry>() { @Override public boolean accept(LsEntry t) { return t.getAttrs().isDir(); } }); }
java
public List<String> lsDirs(String path) { return ls(path, new Filter<LsEntry>() { @Override public boolean accept(LsEntry t) { return t.getAttrs().isDir(); } }); }
[ "public", "List", "<", "String", ">", "lsDirs", "(", "String", "path", ")", "{", "return", "ls", "(", "path", ",", "new", "Filter", "<", "LsEntry", ">", "(", ")", "{", "@", "Override", "public", "boolean", "accept", "(", "LsEntry", "t", ")", "{", "...
遍历某个目录下所有目录,不会递归遍历 @param path 遍历某个目录下所有目录 @return 目录名列表 @since 4.0.5
[ "遍历某个目录下所有目录,不会递归遍历" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/ssh/Sftp.java#L206-L213
train
Returns a list of directories under the given path.
[ 30522, 2270, 2862, 1026, 5164, 1028, 1048, 16150, 18894, 1006, 5164, 4130, 1007, 1063, 2709, 1048, 2015, 1006, 4130, 1010, 2047, 11307, 1026, 1048, 5054, 11129, 1028, 1006, 1007, 1063, 1030, 2058, 15637, 2270, 22017, 20898, 5138, 1006, 1048...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java
StreamGraphGenerator.transformTwoInputTransform
private <IN1, IN2, OUT> Collection<Integer> transformTwoInputTransform(TwoInputTransformation<IN1, IN2, OUT> transform) { Collection<Integer> inputIds1 = transform(transform.getInput1()); Collection<Integer> inputIds2 = transform(transform.getInput2()); // the recursive call might have already transformed this ...
java
private <IN1, IN2, OUT> Collection<Integer> transformTwoInputTransform(TwoInputTransformation<IN1, IN2, OUT> transform) { Collection<Integer> inputIds1 = transform(transform.getInput1()); Collection<Integer> inputIds2 = transform(transform.getInput2()); // the recursive call might have already transformed this ...
[ "private", "<", "IN1", ",", "IN2", ",", "OUT", ">", "Collection", "<", "Integer", ">", "transformTwoInputTransform", "(", "TwoInputTransformation", "<", "IN1", ",", "IN2", ",", "OUT", ">", "transform", ")", "{", "Collection", "<", "Integer", ">", "inputIds1"...
Transforms a {@code TwoInputTransformation}. <p>This recursively transforms the inputs, creates a new {@code StreamNode} in the graph and wired the inputs to this new node.
[ "Transforms", "a", "{", "@code", "TwoInputTransformation", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java#L577-L626
train
Transform two input transforms.
[ 30522, 2797, 1026, 1999, 2487, 1010, 1999, 2475, 1010, 2041, 1028, 3074, 1026, 16109, 1028, 10938, 2102, 12155, 2378, 18780, 6494, 3619, 14192, 1006, 2048, 2378, 18780, 6494, 3619, 14192, 3370, 1026, 1999, 2487, 1010, 1999, 2475, 1010, 2041...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/types/Record.java
Record.getFieldsIntoCheckingNull
public void getFieldsIntoCheckingNull(int[] positions, Value[] targets) { for (int i = 0; i < positions.length; i++) { if (!getFieldInto(positions[i], targets[i])) { throw new NullKeyFieldException(i); } } }
java
public void getFieldsIntoCheckingNull(int[] positions, Value[] targets) { for (int i = 0; i < positions.length; i++) { if (!getFieldInto(positions[i], targets[i])) { throw new NullKeyFieldException(i); } } }
[ "public", "void", "getFieldsIntoCheckingNull", "(", "int", "[", "]", "positions", ",", "Value", "[", "]", "targets", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "positions", ".", "length", ";", "i", "++", ")", "{", "if", "(", "!", ...
Gets the fields at the given positions into an array. If at any position a field is null, then this method throws a @link NullKeyFieldException. All fields that have been successfully read until the failing read are correctly contained in the record. All other fields are not set. @param positions The positions of the ...
[ "Gets", "the", "fields", "at", "the", "given", "positions", "into", "an", "array", ".", "If", "at", "any", "position", "a", "field", "is", "null", "then", "this", "method", "throws", "a", "@link", "NullKeyFieldException", ".", "All", "fields", "that", "hav...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/Record.java#L357-L363
train
Gets the fields into checking that they are null.
[ 30522, 2270, 11675, 2131, 15155, 18447, 23555, 23177, 11231, 3363, 1006, 20014, 1031, 1033, 4460, 1010, 3643, 1031, 1033, 7889, 1007, 1063, 2005, 1006, 20014, 1045, 1027, 1014, 1025, 1045, 1026, 4460, 1012, 3091, 1025, 1045, 1009, 1009, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-optimizer/src/main/java/org/apache/flink/optimizer/dataproperties/RequestedGlobalProperties.java
RequestedGlobalProperties.isMetBy
public boolean isMetBy(GlobalProperties props) { if (this.partitioning == PartitioningProperty.ANY_DISTRIBUTION) { return true; } else if (this.partitioning == PartitioningProperty.FULL_REPLICATION) { return props.isFullyReplicated(); } else if (props.isFullyReplicated()) { return false; } else if ...
java
public boolean isMetBy(GlobalProperties props) { if (this.partitioning == PartitioningProperty.ANY_DISTRIBUTION) { return true; } else if (this.partitioning == PartitioningProperty.FULL_REPLICATION) { return props.isFullyReplicated(); } else if (props.isFullyReplicated()) { return false; } else if ...
[ "public", "boolean", "isMetBy", "(", "GlobalProperties", "props", ")", "{", "if", "(", "this", ".", "partitioning", "==", "PartitioningProperty", ".", "ANY_DISTRIBUTION", ")", "{", "return", "true", ";", "}", "else", "if", "(", "this", ".", "partitioning", "...
Checks, if this set of interesting properties, is met by the given produced properties. @param props The properties for which to check whether they meet these properties. @return True, if the properties are met, false otherwise.
[ "Checks", "if", "this", "set", "of", "interesting", "properties", "is", "met", "by", "the", "given", "produced", "properties", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/dataproperties/RequestedGlobalProperties.java#L301-L336
train
Checks if the properties are met by this node.
[ 30522, 2270, 22017, 20898, 2003, 11368, 3762, 1006, 3795, 21572, 4842, 7368, 24387, 1007, 1063, 2065, 1006, 2023, 1012, 13571, 2075, 1027, 1027, 13571, 2075, 21572, 4842, 3723, 1012, 2151, 1035, 4353, 1007, 1063, 2709, 2995, 1025, 1065, 284...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec/src/main/java/io/netty/handler/codec/LengthFieldBasedFrameDecoder.java
LengthFieldBasedFrameDecoder.decode
protected Object decode(ChannelHandlerContext ctx, ByteBuf in) throws Exception { if (discardingTooLongFrame) { discardingTooLongFrame(in); } if (in.readableBytes() < lengthFieldEndOffset) { return null; } int actualLengthFieldOffset = in.readerIndex() +...
java
protected Object decode(ChannelHandlerContext ctx, ByteBuf in) throws Exception { if (discardingTooLongFrame) { discardingTooLongFrame(in); } if (in.readableBytes() < lengthFieldEndOffset) { return null; } int actualLengthFieldOffset = in.readerIndex() +...
[ "protected", "Object", "decode", "(", "ChannelHandlerContext", "ctx", ",", "ByteBuf", "in", ")", "throws", "Exception", "{", "if", "(", "discardingTooLongFrame", ")", "{", "discardingTooLongFrame", "(", "in", ")", ";", "}", "if", "(", "in", ".", "readableBytes...
Create a frame out of the {@link ByteBuf} and return it. @param ctx the {@link ChannelHandlerContext} which this {@link ByteToMessageDecoder} belongs to @param in the {@link ByteBuf} from which to read data @return frame the {@link ByteBuf} which represent the frame or {@code nu...
[ "Create", "a", "frame", "out", "of", "the", "{", "@link", "ByteBuf", "}", "and", "return", "it", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/LengthFieldBasedFrameDecoder.java#L398-L442
train
Decode a single frame from the input buffer.
[ 30522, 5123, 4874, 21933, 3207, 1006, 3149, 11774, 3917, 8663, 18209, 14931, 2595, 1010, 24880, 8569, 2546, 1999, 1007, 11618, 6453, 1063, 2065, 1006, 5860, 29154, 3406, 12898, 3070, 15643, 1007, 1063, 5860, 29154, 3406, 12898, 3070, 15643, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java
MapUtil.join
public static <K, V> String join(Map<K, V> map, String separator, String keyValueSeparator, boolean isIgnoreNull) { final StringBuilder strBuilder = StrUtil.builder(); boolean isFirst = true; for (Entry<K, V> entry : map.entrySet()) { if (false == isIgnoreNull || entry.getKey() != null && entry.getValue() ...
java
public static <K, V> String join(Map<K, V> map, String separator, String keyValueSeparator, boolean isIgnoreNull) { final StringBuilder strBuilder = StrUtil.builder(); boolean isFirst = true; for (Entry<K, V> entry : map.entrySet()) { if (false == isIgnoreNull || entry.getKey() != null && entry.getValue() ...
[ "public", "static", "<", "K", ",", "V", ">", "String", "join", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "String", "separator", ",", "String", "keyValueSeparator", ",", "boolean", "isIgnoreNull", ")", "{", "final", "StringBuilder", "strBuilder", "...
将map转成字符串 @param <K> 键类型 @param <V> 值类型 @param map Map @param separator entry之间的连接符 @param keyValueSeparator kv之间的连接符 @param isIgnoreNull 是否忽略null的键和值 @return 连接后的字符串 @since 3.1.1
[ "将map转成字符串" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java#L458-L472
train
Joins the specified map with the specified separator and keyValue separators.
[ 30522, 2270, 10763, 1026, 1047, 1010, 1058, 1028, 5164, 3693, 1006, 4949, 1026, 1047, 1010, 1058, 1028, 4949, 1010, 5164, 19802, 25879, 2953, 1010, 5164, 3145, 10175, 15808, 13699, 25879, 2953, 1010, 22017, 20898, 2003, 23773, 5686, 11231, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java
AutoConfigurationImportSelector.getCandidateConfigurations
protected List<String> getCandidateConfigurations(AnnotationMetadata metadata, AnnotationAttributes attributes) { List<String> configurations = SpringFactoriesLoader.loadFactoryNames( getSpringFactoriesLoaderFactoryClass(), getBeanClassLoader()); Assert.notEmpty(configurations, "No auto configuration cla...
java
protected List<String> getCandidateConfigurations(AnnotationMetadata metadata, AnnotationAttributes attributes) { List<String> configurations = SpringFactoriesLoader.loadFactoryNames( getSpringFactoriesLoaderFactoryClass(), getBeanClassLoader()); Assert.notEmpty(configurations, "No auto configuration cla...
[ "protected", "List", "<", "String", ">", "getCandidateConfigurations", "(", "AnnotationMetadata", "metadata", ",", "AnnotationAttributes", "attributes", ")", "{", "List", "<", "String", ">", "configurations", "=", "SpringFactoriesLoader", ".", "loadFactoryNames", "(", ...
Return the auto-configuration class names that should be considered. By default this method will load candidates using {@link SpringFactoriesLoader} with {@link #getSpringFactoriesLoaderFactoryClass()}. @param metadata the source metadata @param attributes the {@link #getAttributes(AnnotationMetadata) annotation attrib...
[ "Return", "the", "auto", "-", "configuration", "class", "names", "that", "should", "be", "considered", ".", "By", "default", "this", "method", "will", "load", "candidates", "using", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java#L179-L187
train
Get the list of configuration classes that are found in META - INF. spring. factories.
[ 30522, 5123, 2862, 1026, 5164, 1028, 2131, 9336, 4305, 13701, 8663, 8873, 27390, 10708, 1006, 5754, 17287, 3508, 11368, 8447, 2696, 27425, 1010, 5754, 17287, 3508, 19321, 3089, 8569, 4570, 12332, 1007, 1063, 2862, 1026, 5164, 1028, 22354, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/AhoCorasick/AhoCorasickDoubleArrayTrie.java
AhoCorasickDoubleArrayTrie.parseText
public void parseText(char[] text, IHit<V> processor) { int position = 1; int currentState = 0; for (char c : text) { currentState = getState(currentState, c); int[] hitArray = output[currentState]; if (hitArray != null) { ...
java
public void parseText(char[] text, IHit<V> processor) { int position = 1; int currentState = 0; for (char c : text) { currentState = getState(currentState, c); int[] hitArray = output[currentState]; if (hitArray != null) { ...
[ "public", "void", "parseText", "(", "char", "[", "]", "text", ",", "IHit", "<", "V", ">", "processor", ")", "{", "int", "position", "=", "1", ";", "int", "currentState", "=", "0", ";", "for", "(", "char", "c", ":", "text", ")", "{", "currentState",...
处理文本 @param text @param processor
[ "处理文本" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/AhoCorasick/AhoCorasickDoubleArrayTrie.java#L128-L145
train
Parse text.
[ 30522, 2270, 11675, 11968, 13462, 10288, 2102, 1006, 25869, 1031, 1033, 3793, 1010, 1045, 16584, 1026, 1058, 1028, 13151, 1007, 1063, 20014, 2597, 1027, 1015, 1025, 20014, 14731, 12259, 1027, 1014, 1025, 2005, 1006, 25869, 1039, 1024, 3793, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/ObjectId.java
ObjectId.getProcessPiece
private static int getProcessPiece() { // 进程码 // 因为静态变量类加载可能相同,所以要获取进程ID + 加载对象的ID值 final int processPiece; // 进程ID初始化 int processId; try { // 获取进程ID final String processName =ManagementFactory.getRuntimeMXBean().getName(); final int atIndex = processName.indexOf('@'); if (atIndex > 0)...
java
private static int getProcessPiece() { // 进程码 // 因为静态变量类加载可能相同,所以要获取进程ID + 加载对象的ID值 final int processPiece; // 进程ID初始化 int processId; try { // 获取进程ID final String processName =ManagementFactory.getRuntimeMXBean().getName(); final int atIndex = processName.indexOf('@'); if (atIndex > 0)...
[ "private", "static", "int", "getProcessPiece", "(", ")", "{", "// 进程码\r", "// 因为静态变量类加载可能相同,所以要获取进程ID + 加载对象的ID值\r", "final", "int", "processPiece", ";", "// 进程ID初始化\r", "int", "processId", ";", "try", "{", "// 获取进程ID\r", "final", "String", "processName", "=", "Manage...
获取进程码片段 @return 进程码片段
[ "获取进程码片段" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/ObjectId.java#L152-L183
train
Gets the processPiece.
[ 30522, 2797, 10763, 20014, 2131, 21572, 9623, 13102, 23783, 2063, 1006, 1007, 1063, 1013, 1013, 100, 100, 100, 1013, 1013, 100, 100, 100, 100, 100, 100, 100, 1779, 100, 100, 100, 1919, 1794, 1010, 100, 100, 100, 100, 100, 100, 100, 89...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.convertLineSeparator
public static File convertLineSeparator(File file, Charset charset, LineSeparator lineSeparator) { final List<String> lines = readLines(file, charset); return FileWriter.create(file, charset).writeLines(lines, lineSeparator, false); }
java
public static File convertLineSeparator(File file, Charset charset, LineSeparator lineSeparator) { final List<String> lines = readLines(file, charset); return FileWriter.create(file, charset).writeLines(lines, lineSeparator, false); }
[ "public", "static", "File", "convertLineSeparator", "(", "File", "file", ",", "Charset", "charset", ",", "LineSeparator", "lineSeparator", ")", "{", "final", "List", "<", "String", ">", "lines", "=", "readLines", "(", "file", ",", "charset", ")", ";", "retur...
转换换行符<br> 将给定文件的换行符转换为指定换行符 @param file 文件 @param charset 编码 @param lineSeparator 换行符枚举{@link LineSeparator} @return 被修改的文件 @since 3.1.0
[ "转换换行符<br", ">", "将给定文件的换行符转换为指定换行符" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L3243-L3246
train
Converts the line separator from UTF - 8 to UTF - 8.
[ 30522, 2270, 10763, 5371, 10463, 12735, 13699, 25879, 2953, 1006, 5371, 5371, 1010, 25869, 13462, 25869, 13462, 1010, 3210, 13699, 25879, 2953, 3210, 13699, 25879, 2953, 1007, 1063, 2345, 2862, 1026, 5164, 1028, 3210, 1027, 3191, 12735, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-filesystems/flink-swift-fs-hadoop/src/main/java/org/apache/hadoop/conf/Configuration.java
Configuration.handleDeprecation
private String[] handleDeprecation(DeprecationContext deprecations, String name) { if (null != name) { name = name.trim(); } ArrayList<String > names = new ArrayList<String>(); if (isDeprecated(name)) { DeprecatedKeyInfo keyInfo = deprecations.getDeprecatedKeyMap().get(name); warnOn...
java
private String[] handleDeprecation(DeprecationContext deprecations, String name) { if (null != name) { name = name.trim(); } ArrayList<String > names = new ArrayList<String>(); if (isDeprecated(name)) { DeprecatedKeyInfo keyInfo = deprecations.getDeprecatedKeyMap().get(name); warnOn...
[ "private", "String", "[", "]", "handleDeprecation", "(", "DeprecationContext", "deprecations", ",", "String", "name", ")", "{", "if", "(", "null", "!=", "name", ")", "{", "name", "=", "name", ".", "trim", "(", ")", ";", "}", "ArrayList", "<", "String", ...
Checks for the presence of the property <code>name</code> in the deprecation map. Returns the first of the list of new keys if present in the deprecation map or the <code>name</code> itself. If the property is not presently set but the property map contains an entry for the deprecated key, the value of the deprecated k...
[ "Checks", "for", "the", "presence", "of", "the", "property", "<code", ">", "name<", "/", "code", ">", "in", "the", "deprecation", "map", ".", "Returns", "the", "first", "of", "the", "list", "of", "new", "keys", "if", "present", "in", "the", "deprecation"...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-swift-fs-hadoop/src/main/java/org/apache/hadoop/conf/Configuration.java#L583-L610
train
Handle deprecated key.
[ 30522, 2797, 5164, 1031, 1033, 8971, 13699, 2890, 10719, 1006, 2139, 28139, 10719, 8663, 18209, 2139, 28139, 10719, 2015, 1010, 5164, 2171, 1007, 1063, 2065, 1006, 19701, 999, 1027, 2171, 1007, 1063, 2171, 1027, 2171, 1012, 12241, 1006, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
CheckpointCoordinator.discardCheckpoint
private void discardCheckpoint(PendingCheckpoint pendingCheckpoint, @Nullable Throwable cause) { assert(Thread.holdsLock(lock)); Preconditions.checkNotNull(pendingCheckpoint); final long checkpointId = pendingCheckpoint.getCheckpointId(); LOG.info("Discarding checkpoint {} of job {}.", checkpointId, job, caus...
java
private void discardCheckpoint(PendingCheckpoint pendingCheckpoint, @Nullable Throwable cause) { assert(Thread.holdsLock(lock)); Preconditions.checkNotNull(pendingCheckpoint); final long checkpointId = pendingCheckpoint.getCheckpointId(); LOG.info("Discarding checkpoint {} of job {}.", checkpointId, job, caus...
[ "private", "void", "discardCheckpoint", "(", "PendingCheckpoint", "pendingCheckpoint", ",", "@", "Nullable", "Throwable", "cause", ")", "{", "assert", "(", "Thread", ".", "holdsLock", "(", "lock", ")", ")", ";", "Preconditions", ".", "checkNotNull", "(", "pendin...
Discards the given pending checkpoint because of the given cause. @param pendingCheckpoint to discard @param cause for discarding the checkpoint
[ "Discards", "the", "given", "pending", "checkpoint", "because", "of", "the", "given", "cause", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java#L1313-L1344
train
Discards a checkpoint.
[ 30522, 2797, 11675, 5860, 4232, 5403, 3600, 8400, 1006, 14223, 5403, 3600, 8400, 14223, 5403, 3600, 8400, 1010, 1030, 19701, 3085, 5466, 3085, 3426, 1007, 1063, 20865, 1006, 11689, 1012, 4324, 7878, 1006, 5843, 1007, 1007, 1025, 3653, 8663,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/format/FastDatePrinter.java
FastDatePrinter.format
String format(final Object obj) { if (obj instanceof Date) { return format((Date) obj); } else if (obj instanceof Calendar) { return format((Calendar) obj); } else if (obj instanceof Long) { return format(((Long) obj).longValue()); } else { throw new IllegalArgumentException("Unknown class: " + (obj...
java
String format(final Object obj) { if (obj instanceof Date) { return format((Date) obj); } else if (obj instanceof Calendar) { return format((Calendar) obj); } else if (obj instanceof Long) { return format(((Long) obj).longValue()); } else { throw new IllegalArgumentException("Unknown class: " + (obj...
[ "String", "format", "(", "final", "Object", "obj", ")", "{", "if", "(", "obj", "instanceof", "Date", ")", "{", "return", "format", "(", "(", "Date", ")", "obj", ")", ";", "}", "else", "if", "(", "obj", "instanceof", "Calendar", ")", "{", "return", ...
<p> Formats a {@code Date}, {@code Calendar} or {@code Long} (milliseconds) object. </p> @param obj the object to format @return The formatted value.
[ "<p", ">", "Formats", "a", "{", "@code", "Date", "}", "{", "@code", "Calendar", "}", "or", "{", "@code", "Long", "}", "(", "milliseconds", ")", "object", ".", "<", "/", "p", ">" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/format/FastDatePrinter.java#L297-L307
train
Format the given object to a string.
[ 30522, 5164, 4289, 1006, 2345, 4874, 27885, 3501, 1007, 1063, 2065, 1006, 27885, 3501, 6013, 11253, 3058, 1007, 1063, 2709, 4289, 1006, 1006, 3058, 1007, 27885, 3501, 1007, 1025, 1065, 2842, 2065, 1006, 27885, 3501, 6013, 11253, 8094, 1007,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/mining/word2vec/Corpus.java
Corpus.createBinaryTree
void createBinaryTree() { int[] point = new int[VocabWord.MAX_CODE_LENGTH]; char[] code = new char[VocabWord.MAX_CODE_LENGTH]; int[] count = new int[vocabSize * 2 + 1]; char[] binary = new char[vocabSize * 2 + 1]; int[] parentNode = new int[vocabSize * 2 + 1]; for (i...
java
void createBinaryTree() { int[] point = new int[VocabWord.MAX_CODE_LENGTH]; char[] code = new char[VocabWord.MAX_CODE_LENGTH]; int[] count = new int[vocabSize * 2 + 1]; char[] binary = new char[vocabSize * 2 + 1]; int[] parentNode = new int[vocabSize * 2 + 1]; for (i...
[ "void", "createBinaryTree", "(", ")", "{", "int", "[", "]", "point", "=", "new", "int", "[", "VocabWord", ".", "MAX_CODE_LENGTH", "]", ";", "char", "[", "]", "code", "=", "new", "char", "[", "VocabWord", ".", "MAX_CODE_LENGTH", "]", ";", "int", "[", ...
Create binary Huffman tree using the word counts. Frequent words will have short uniqe binary codes
[ "Create", "binary", "Huffman", "tree", "using", "the", "word", "counts", ".", "Frequent", "words", "will", "have", "short", "uniqe", "binary", "codes" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/mining/word2vec/Corpus.java#L189-L270
train
Create binary tree.
[ 30522, 11675, 3443, 21114, 2854, 13334, 1006, 1007, 1063, 20014, 1031, 1033, 2391, 1027, 2047, 20014, 1031, 29536, 3540, 2497, 18351, 1012, 4098, 1035, 3642, 1035, 3091, 1033, 1025, 25869, 1031, 1033, 3642, 1027, 2047, 25869, 1031, 29536, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java
MysqlEventParser.findAsPerTimestampInSpecificLogFile
private EntryPosition findAsPerTimestampInSpecificLogFile(MysqlConnection mysqlConnection, final Long startTimestamp, final EntryPosition endPosition, ...
java
private EntryPosition findAsPerTimestampInSpecificLogFile(MysqlConnection mysqlConnection, final Long startTimestamp, final EntryPosition endPosition, ...
[ "private", "EntryPosition", "findAsPerTimestampInSpecificLogFile", "(", "MysqlConnection", "mysqlConnection", ",", "final", "Long", "startTimestamp", ",", "final", "EntryPosition", "endPosition", ",", "final", "String", "searchBinlogFile", ",", "final", "Boolean", "justForP...
根据给定的时间戳,在指定的binlog中找到最接近于该时间戳(必须是小于时间戳)的一个事务起始位置。 针对最后一个binlog会给定endPosition,避免无尽的查询
[ "根据给定的时间戳,在指定的binlog中找到最接近于该时间戳", "(", "必须是小于时间戳", ")", "的一个事务起始位置。", "针对最后一个binlog会给定endPosition,避免无尽的查询" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java#L733-L823
train
Find as per timestamp in specific log file.
[ 30522, 2797, 4443, 26994, 2424, 3022, 4842, 7292, 9153, 8737, 7076, 5051, 6895, 8873, 20464, 8649, 8873, 2571, 1006, 2026, 2015, 4160, 22499, 10087, 7542, 2026, 2015, 4160, 22499, 10087, 7542, 1010, 2345, 2146, 2707, 7292, 9153, 8737, 1010,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateBetween.java
DateBetween.between
public long between(DateUnit unit) { long diff = end.getTime() - begin.getTime(); return diff / unit.getMillis(); }
java
public long between(DateUnit unit) { long diff = end.getTime() - begin.getTime(); return diff / unit.getMillis(); }
[ "public", "long", "between", "(", "DateUnit", "unit", ")", "{", "long", "diff", "=", "end", ".", "getTime", "(", ")", "-", "begin", ".", "getTime", "(", ")", ";", "return", "diff", "/", "unit", ".", "getMillis", "(", ")", ";", "}" ]
判断两个日期相差的时长<br> 返回 给定单位的时长差 @param unit 相差的单位:相差 天{@link DateUnit#DAY}、小时{@link DateUnit#HOUR} 等 @return 时长差
[ "判断两个日期相差的时长<br", ">", "返回", "给定单位的时长差" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateBetween.java#L89-L92
train
Returns the number of milliseconds between this date and the given unit.
[ 30522, 2270, 2146, 2090, 1006, 3058, 19496, 2102, 3131, 1007, 1063, 2146, 4487, 4246, 1027, 2203, 1012, 2131, 7292, 1006, 1007, 1011, 4088, 1012, 2131, 7292, 1006, 1007, 1025, 2709, 4487, 4246, 1013, 3131, 1012, 2131, 19912, 2483, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/template/engine/beetl/BeetlUtil.java
BeetlUtil.createFileGroupTemplate
public static GroupTemplate createFileGroupTemplate(String dir, Charset charset) { return createGroupTemplate(new FileResourceLoader(dir, charset.name())); }
java
public static GroupTemplate createFileGroupTemplate(String dir, Charset charset) { return createGroupTemplate(new FileResourceLoader(dir, charset.name())); }
[ "public", "static", "GroupTemplate", "createFileGroupTemplate", "(", "String", "dir", ",", "Charset", "charset", ")", "{", "return", "createGroupTemplate", "(", "new", "FileResourceLoader", "(", "dir", ",", "charset", ".", "name", "(", ")", ")", ")", ";", "}" ...
创建文件目录的模板组 {@link GroupTemplate},配置文件使用全局默认<br> 此时自定义的配置文件可在ClassPath中放入beetl.properties配置 @param dir 目录路径(绝对路径) @param charset 读取模板文件的编码 @return {@link GroupTemplate} @since 3.2.0
[ "创建文件目录的模板组", "{", "@link", "GroupTemplate", "}", ",配置文件使用全局默认<br", ">", "此时自定义的配置文件可在ClassPath中放入beetl", ".", "properties配置" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/template/engine/beetl/BeetlUtil.java#L96-L98
train
Creates a new group template using the specified resource loader.
[ 30522, 2270, 10763, 2177, 18532, 15725, 3443, 8873, 23115, 22107, 18532, 15725, 1006, 5164, 16101, 1010, 25869, 13462, 25869, 13462, 1007, 1063, 2709, 3443, 17058, 18532, 15725, 1006, 2047, 5371, 6072, 8162, 29109, 10441, 4063, 1006, 16101, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-mesos/src/main/java/org/apache/flink/mesos/Utils.java
Utils.ranges
public static Protos.Resource ranges(String name, String role, Protos.Value.Range... ranges) { checkNotNull(name); checkNotNull(role); checkNotNull(ranges); return Protos.Resource.newBuilder() .setName(name) .setType(Protos.Value.Type.RANGES) .setRanges(Protos.Value.Ranges.newBuilder().addAllRange(Arra...
java
public static Protos.Resource ranges(String name, String role, Protos.Value.Range... ranges) { checkNotNull(name); checkNotNull(role); checkNotNull(ranges); return Protos.Resource.newBuilder() .setName(name) .setType(Protos.Value.Type.RANGES) .setRanges(Protos.Value.Ranges.newBuilder().addAllRange(Arra...
[ "public", "static", "Protos", ".", "Resource", "ranges", "(", "String", "name", ",", "String", "role", ",", "Protos", ".", "Value", ".", "Range", "...", "ranges", ")", "{", "checkNotNull", "(", "name", ")", ";", "checkNotNull", "(", "role", ")", ";", "...
Construct a range resource.
[ "Construct", "a", "range", "resource", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/Utils.java#L207-L217
train
Create a new resource with ranges.
[ 30522, 2270, 10763, 15053, 2015, 1012, 7692, 8483, 1006, 5164, 2171, 1010, 5164, 2535, 1010, 15053, 2015, 1012, 3643, 1012, 2846, 1012, 1012, 1012, 8483, 1007, 1063, 4638, 17048, 11231, 3363, 1006, 2171, 1007, 1025, 4638, 17048, 11231, 3363...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/ExternalCatalogTable.java
ExternalCatalogTable.getTableStats
@Deprecated public Optional<TableStats> getTableStats() { DescriptorProperties normalizedProps = new DescriptorProperties(); normalizedProps.putProperties(normalizedProps); Optional<Long> rowCount = normalizedProps.getOptionalLong(STATISTICS_ROW_COUNT); if (rowCount.isPresent()) { Map<String, ColumnStats> c...
java
@Deprecated public Optional<TableStats> getTableStats() { DescriptorProperties normalizedProps = new DescriptorProperties(); normalizedProps.putProperties(normalizedProps); Optional<Long> rowCount = normalizedProps.getOptionalLong(STATISTICS_ROW_COUNT); if (rowCount.isPresent()) { Map<String, ColumnStats> c...
[ "@", "Deprecated", "public", "Optional", "<", "TableStats", ">", "getTableStats", "(", ")", "{", "DescriptorProperties", "normalizedProps", "=", "new", "DescriptorProperties", "(", ")", ";", "normalizedProps", ".", "putProperties", "(", "normalizedProps", ")", ";", ...
Reads table statistics from the descriptors properties. @deprecated This method exists for backwards-compatibility only.
[ "Reads", "table", "statistics", "from", "the", "descriptors", "properties", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/ExternalCatalogTable.java#L93-L104
train
Get the table stats.
[ 30522, 1030, 2139, 28139, 12921, 2270, 11887, 1026, 7251, 29336, 2015, 1028, 2131, 10880, 9153, 3215, 1006, 1007, 1063, 4078, 23235, 2953, 21572, 4842, 7368, 3671, 3550, 21572, 4523, 1027, 2047, 4078, 23235, 2953, 21572, 4842, 7368, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/BinaryInMemorySortBuffer.java
BinaryInMemorySortBuffer.createBuffer
public static BinaryInMemorySortBuffer createBuffer( NormalizedKeyComputer normalizedKeyComputer, AbstractRowSerializer<BaseRow> inputSerializer, BinaryRowSerializer serializer, RecordComparator comparator, List<MemorySegment> memory) throws IOException { checkArgument(memory.size() >= MIN_REQUIRED_BUF...
java
public static BinaryInMemorySortBuffer createBuffer( NormalizedKeyComputer normalizedKeyComputer, AbstractRowSerializer<BaseRow> inputSerializer, BinaryRowSerializer serializer, RecordComparator comparator, List<MemorySegment> memory) throws IOException { checkArgument(memory.size() >= MIN_REQUIRED_BUF...
[ "public", "static", "BinaryInMemorySortBuffer", "createBuffer", "(", "NormalizedKeyComputer", "normalizedKeyComputer", ",", "AbstractRowSerializer", "<", "BaseRow", ">", "inputSerializer", ",", "BinaryRowSerializer", "serializer", ",", "RecordComparator", "comparator", ",", "...
Create a memory sorter in `insert` way.
[ "Create", "a", "memory", "sorter", "in", "insert", "way", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/BinaryInMemorySortBuffer.java#L57-L71
train
Create a binary sort buffer.
[ 30522, 2270, 10763, 12441, 2378, 4168, 5302, 24769, 11589, 8569, 12494, 3443, 8569, 12494, 1006, 3671, 3550, 14839, 9006, 18780, 2121, 3671, 3550, 14839, 9006, 18780, 2121, 1010, 10061, 10524, 8043, 4818, 17629, 1026, 2918, 10524, 1028, 20407...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/HashUtil.java
HashUtil.intHash
public static int intHash(int key) { key += ~(key << 15); key ^= (key >>> 10); key += (key << 3); key ^= (key >>> 6); key += ~(key << 11); key ^= (key >>> 16); return key; }
java
public static int intHash(int key) { key += ~(key << 15); key ^= (key >>> 10); key += (key << 3); key ^= (key >>> 6); key += ~(key << 11); key ^= (key >>> 16); return key; }
[ "public", "static", "int", "intHash", "(", "int", "key", ")", "{", "key", "+=", "~", "(", "key", "<<", "15", ")", ";", "key", "^=", "(", "key", ">>>", "10", ")", ";", "key", "+=", "(", "key", "<<", "3", ")", ";", "key", "^=", "(", "key", ">...
Thomas Wang的算法,整数hash @param key 整数 @return hash值
[ "Thomas", "Wang的算法,整数hash" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/HashUtil.java#L184-L192
train
Returns the hash value of a given key.
[ 30522, 2270, 10763, 20014, 20014, 14949, 2232, 1006, 20014, 3145, 1007, 1063, 3145, 1009, 1027, 1066, 1006, 3145, 1026, 1026, 2321, 1007, 1025, 3145, 1034, 1027, 1006, 3145, 1028, 1028, 1028, 2184, 1007, 1025, 3145, 1009, 1027, 1006, 3145, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/TaskManagerMetricGroup.java
TaskManagerMetricGroup.putVariables
@Override protected void putVariables(Map<String, String> variables) { variables.put(ScopeFormat.SCOPE_HOST, hostname); variables.put(ScopeFormat.SCOPE_TASKMANAGER_ID, taskManagerId); }
java
@Override protected void putVariables(Map<String, String> variables) { variables.put(ScopeFormat.SCOPE_HOST, hostname); variables.put(ScopeFormat.SCOPE_TASKMANAGER_ID, taskManagerId); }
[ "@", "Override", "protected", "void", "putVariables", "(", "Map", "<", "String", ",", "String", ">", "variables", ")", "{", "variables", ".", "put", "(", "ScopeFormat", ".", "SCOPE_HOST", ",", "hostname", ")", ";", "variables", ".", "put", "(", "ScopeForma...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/TaskManagerMetricGroup.java#L142-L146
train
Override this method to add the variables to the scope map.
[ 30522, 1030, 2058, 15637, 5123, 11675, 2404, 10755, 19210, 2015, 1006, 4949, 1026, 5164, 1010, 5164, 1028, 10857, 1007, 1063, 10857, 1012, 2404, 1006, 9531, 14192, 4017, 1012, 9531, 1035, 3677, 1010, 3677, 18442, 1007, 1025, 10857, 1012, 24...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java
ArrayUtil.min
public static <T extends Comparable<? super T>> T min(T[] numberArray) { if (isEmpty(numberArray)) { throw new IllegalArgumentException("Number array must not empty !"); } T min = numberArray[0]; for (int i = 0; i < numberArray.length; i++) { if (ObjectUtil.compare(min, numberArray[i]) > 0) { m...
java
public static <T extends Comparable<? super T>> T min(T[] numberArray) { if (isEmpty(numberArray)) { throw new IllegalArgumentException("Number array must not empty !"); } T min = numberArray[0]; for (int i = 0; i < numberArray.length; i++) { if (ObjectUtil.compare(min, numberArray[i]) > 0) { m...
[ "public", "static", "<", "T", "extends", "Comparable", "<", "?", "super", "T", ">", ">", "T", "min", "(", "T", "[", "]", "numberArray", ")", "{", "if", "(", "isEmpty", "(", "numberArray", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", ...
取最小值 @param <T> 元素类型 @param numberArray 数字数组 @return 最小值 @since 3.0.9
[ "取最小值" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java#L3267-L3278
train
Returns the minimum value of the specified number array.
[ 30522, 2270, 10763, 1026, 1056, 8908, 12435, 1026, 1029, 3565, 1056, 1028, 1028, 1056, 8117, 1006, 1056, 1031, 1033, 2193, 2906, 9447, 1007, 1063, 2065, 1006, 2003, 6633, 13876, 2100, 1006, 2193, 2906, 9447, 1007, 1007, 1063, 5466, 2047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dependency/perceptron/accessories/CoNLLReader.java
CoNLLReader.readData
public ArrayList<Instance> readData(int limit, boolean keepNonProjective, boolean labeled, boolean rootFirst, boolean lowerCased, IndexMaps maps) throws IOException { HashMap<String, Integer> wordMap = maps.getWordId(); ArrayList<Instance> instanceList = new ArrayList<Instance>(); String li...
java
public ArrayList<Instance> readData(int limit, boolean keepNonProjective, boolean labeled, boolean rootFirst, boolean lowerCased, IndexMaps maps) throws IOException { HashMap<String, Integer> wordMap = maps.getWordId(); ArrayList<Instance> instanceList = new ArrayList<Instance>(); String li...
[ "public", "ArrayList", "<", "Instance", ">", "readData", "(", "int", "limit", ",", "boolean", "keepNonProjective", ",", "boolean", "labeled", ",", "boolean", "rootFirst", ",", "boolean", "lowerCased", ",", "IndexMaps", "maps", ")", "throws", "IOException", "{", ...
读取句子 @param limit 最大多少句 @param keepNonProjective 保留非投影 @param labeled @param rootFirst 是否把root放到最前面 @param lowerCased @param maps feature id map @return @throws Exception
[ "读取句子" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dependency/perceptron/accessories/CoNLLReader.java#L183-L305
train
Read data from the file.
[ 30522, 2270, 9140, 9863, 1026, 6013, 1028, 3191, 2850, 2696, 1006, 20014, 5787, 1010, 22017, 20898, 2562, 8540, 21572, 20614, 3512, 1010, 22017, 20898, 12599, 1010, 22017, 20898, 7117, 8873, 12096, 1010, 22017, 20898, 2896, 28969, 1010, 5950,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java
DateUtil.formatDateTime
public static String formatDateTime(Date date) { if (null == date) { return null; } return DatePattern.NORM_DATETIME_FORMAT.format(date); }
java
public static String formatDateTime(Date date) { if (null == date) { return null; } return DatePattern.NORM_DATETIME_FORMAT.format(date); }
[ "public", "static", "String", "formatDateTime", "(", "Date", "date", ")", "{", "if", "(", "null", "==", "date", ")", "{", "return", "null", ";", "}", "return", "DatePattern", ".", "NORM_DATETIME_FORMAT", ".", "format", "(", "date", ")", ";", "}" ]
格式化日期时间<br> 格式 yyyy-MM-dd HH:mm:ss @param date 被格式化的日期 @return 格式化后的日期
[ "格式化日期时间<br", ">", "格式", "yyyy", "-", "MM", "-", "dd", "HH", ":", "mm", ":", "ss" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L507-L512
train
Format a date in the format required by the Java date time format.
[ 30522, 2270, 10763, 5164, 4289, 13701, 7292, 1006, 3058, 3058, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 3058, 1007, 1063, 2709, 19701, 1025, 1065, 2709, 3058, 4502, 12079, 2078, 1012, 13373, 1035, 3058, 7292, 1035, 4289, 1012, 4289, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/util/FileUtils.java
FileUtils.deletePathIfEmpty
public static boolean deletePathIfEmpty(FileSystem fileSystem, Path path) throws IOException { final FileStatus[] fileStatuses; try { fileStatuses = fileSystem.listStatus(path); } catch (FileNotFoundException e) { // path already deleted return true; } catch (Exception e) { // could not access ...
java
public static boolean deletePathIfEmpty(FileSystem fileSystem, Path path) throws IOException { final FileStatus[] fileStatuses; try { fileStatuses = fileSystem.listStatus(path); } catch (FileNotFoundException e) { // path already deleted return true; } catch (Exception e) { // could not access ...
[ "public", "static", "boolean", "deletePathIfEmpty", "(", "FileSystem", "fileSystem", ",", "Path", "path", ")", "throws", "IOException", "{", "final", "FileStatus", "[", "]", "fileStatuses", ";", "try", "{", "fileStatuses", "=", "fileSystem", ".", "listStatus", "...
Deletes the path if it is empty. A path can only be empty if it is a directory which does not contain any other directories/files. @param fileSystem to use @param path to be deleted if empty @return true if the path could be deleted; otherwise false @throws IOException if the delete operation fails
[ "Deletes", "the", "path", "if", "it", "is", "empty", ".", "A", "path", "can", "only", "be", "empty", "if", "it", "is", "a", "directory", "which", "does", "not", "contain", "any", "other", "directories", "/", "files", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/FileUtils.java#L399-L427
train
Delete the path if it does not contain any files.
[ 30522, 2270, 10763, 22017, 20898, 3972, 12870, 15069, 29323, 27718, 2100, 1006, 6764, 27268, 6633, 6764, 27268, 6633, 1010, 4130, 4130, 1007, 11618, 22834, 10288, 24422, 1063, 2345, 6764, 29336, 2271, 1031, 1033, 6764, 29336, 25581, 1025, 304...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/typeutils/CompositeType.java
CompositeType.getFlatFields
@PublicEvolving public List<FlatFieldDescriptor> getFlatFields(String fieldExpression) { List<FlatFieldDescriptor> result = new ArrayList<FlatFieldDescriptor>(); this.getFlatFields(fieldExpression, 0, result); return result; }
java
@PublicEvolving public List<FlatFieldDescriptor> getFlatFields(String fieldExpression) { List<FlatFieldDescriptor> result = new ArrayList<FlatFieldDescriptor>(); this.getFlatFields(fieldExpression, 0, result); return result; }
[ "@", "PublicEvolving", "public", "List", "<", "FlatFieldDescriptor", ">", "getFlatFields", "(", "String", "fieldExpression", ")", "{", "List", "<", "FlatFieldDescriptor", ">", "result", "=", "new", "ArrayList", "<", "FlatFieldDescriptor", ">", "(", ")", ";", "th...
Returns the flat field descriptors for the given field expression. @param fieldExpression The field expression for which the flat field descriptors are computed. @return The list of descriptors for the flat fields which are specified by the field expression.
[ "Returns", "the", "flat", "field", "descriptors", "for", "the", "given", "field", "expression", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/typeutils/CompositeType.java#L66-L71
train
Gets the flat fields of the given field expression.
[ 30522, 1030, 2270, 6777, 4747, 6455, 2270, 2862, 1026, 4257, 3790, 6155, 23235, 2953, 1028, 2131, 10258, 4017, 15155, 1006, 5164, 2492, 10288, 20110, 3258, 1007, 1063, 2862, 1026, 4257, 3790, 6155, 23235, 2953, 1028, 2765, 1027, 2047, 9140,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java
MiniCluster.createMetricRegistry
protected MetricRegistryImpl createMetricRegistry(Configuration config) { return new MetricRegistryImpl( MetricRegistryConfiguration.fromConfiguration(config), ReporterSetup.fromConfiguration(config)); }
java
protected MetricRegistryImpl createMetricRegistry(Configuration config) { return new MetricRegistryImpl( MetricRegistryConfiguration.fromConfiguration(config), ReporterSetup.fromConfiguration(config)); }
[ "protected", "MetricRegistryImpl", "createMetricRegistry", "(", "Configuration", "config", ")", "{", "return", "new", "MetricRegistryImpl", "(", "MetricRegistryConfiguration", ".", "fromConfiguration", "(", "config", ")", ",", "ReporterSetup", ".", "fromConfiguration", "(...
Factory method to create the metric registry for the mini cluster. @param config The configuration of the mini cluster
[ "Factory", "method", "to", "create", "the", "metric", "registry", "for", "the", "mini", "cluster", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java#L697-L701
train
Create a metric registry based on the configuration.
[ 30522, 5123, 12046, 2890, 24063, 2854, 5714, 24759, 3443, 12589, 2890, 24063, 2854, 1006, 9563, 9530, 8873, 2290, 1007, 1063, 2709, 2047, 12046, 2890, 24063, 2854, 5714, 24759, 1006, 12046, 2890, 24063, 2854, 8663, 8873, 27390, 3370, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/model/perceptron/model/LinearModel.java
LinearModel.decode
public int decode(Collection<Integer> x) { float y = 0; for (Integer f : x) y += parameter[f]; return y < 0 ? -1 : 1; }
java
public int decode(Collection<Integer> x) { float y = 0; for (Integer f : x) y += parameter[f]; return y < 0 ? -1 : 1; }
[ "public", "int", "decode", "(", "Collection", "<", "Integer", ">", "x", ")", "{", "float", "y", "=", "0", ";", "for", "(", "Integer", "f", ":", "x", ")", "y", "+=", "parameter", "[", "]", ";", "return", "y", "<", "0", "?", "-", "1", ":", "1",...
分离超平面解码 @param x 特征向量 @return sign(wx)
[ "分离超平面解码" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/perceptron/model/LinearModel.java#L247-L253
train
Decodes a Collection of Integer objects into a single integer value.
[ 30522, 2270, 20014, 21933, 3207, 1006, 3074, 1026, 16109, 1028, 1060, 1007, 1063, 14257, 1061, 1027, 1014, 1025, 2005, 1006, 16109, 1042, 1024, 1060, 1007, 1061, 1009, 1027, 16381, 1031, 1042, 1033, 1025, 2709, 1061, 1026, 1014, 1029, 1011,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java
MDAG.getStringsStartingWith
public HashSet<String> getStringsStartingWith(String prefixStr) { HashSet<String> strHashSet = new HashSet<String>(); if (sourceNode != null) //if the MDAG hasn't been simplified { MDAGNode originNode = sourceNode.transition(prefixStr); //attempt to _transition down the pa...
java
public HashSet<String> getStringsStartingWith(String prefixStr) { HashSet<String> strHashSet = new HashSet<String>(); if (sourceNode != null) //if the MDAG hasn't been simplified { MDAGNode originNode = sourceNode.transition(prefixStr); //attempt to _transition down the pa...
[ "public", "HashSet", "<", "String", ">", "getStringsStartingWith", "(", "String", "prefixStr", ")", "{", "HashSet", "<", "String", ">", "strHashSet", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "if", "(", "sourceNode", "!=", "null", ")", "/...
前缀查询<br> Retrieves all the Strings in the MDAG that begin with a given String. @param prefixStr a String that is the prefix for all the desired Strings @return a HashSet containing all the Strings present in the MDAG that begin with {@code prefixString}
[ "前缀查询<br", ">", "Retrieves", "all", "the", "Strings", "in", "the", "MDAG", "that", "begin", "with", "a", "given", "String", "." ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java#L940-L966
train
Get the set of Strings starting with the given prefix string.
[ 30522, 2270, 23325, 13462, 1026, 5164, 1028, 4152, 18886, 3070, 4757, 7559, 3436, 24415, 1006, 5164, 17576, 3367, 2099, 1007, 1063, 23325, 13462, 1026, 5164, 1028, 2358, 25032, 11823, 13462, 1027, 2047, 23325, 13462, 1026, 5164, 1028, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/typeutils/base/EnumSerializer.java
EnumSerializer.readObject
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // may be null if this serializer was deserialized from an older version if (this.values == null) { this.values = enumClass.getEnumConstants(); this.valueToOrdinal = new EnumMap<>(this.enumCl...
java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // may be null if this serializer was deserialized from an older version if (this.values == null) { this.values = enumClass.getEnumConstants(); this.valueToOrdinal = new EnumMap<>(this.enumCl...
[ "private", "void", "readObject", "(", "ObjectInputStream", "in", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "in", ".", "defaultReadObject", "(", ")", ";", "// may be null if this serializer was deserialized from an older version", "if", "(", "this", ...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/typeutils/base/EnumSerializer.java#L162-L175
train
Deserializes the object from an ObjectInputStream.
[ 30522, 2797, 11675, 3191, 16429, 20614, 1006, 4874, 2378, 18780, 21422, 1999, 1007, 11618, 22834, 10288, 24422, 1010, 2465, 17048, 14876, 8630, 10288, 24422, 1063, 1999, 1012, 12398, 16416, 3527, 2497, 20614, 1006, 1007, 1025, 1013, 1013, 208...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java
ExpectedConditions.titleIs
public static ExpectedCondition<Boolean> titleIs(final String title) { return new ExpectedCondition<Boolean>() { private String currentTitle = ""; @Override public Boolean apply(WebDriver driver) { currentTitle = driver.getTitle(); return title.equals(currentTitle); } ...
java
public static ExpectedCondition<Boolean> titleIs(final String title) { return new ExpectedCondition<Boolean>() { private String currentTitle = ""; @Override public Boolean apply(WebDriver driver) { currentTitle = driver.getTitle(); return title.equals(currentTitle); } ...
[ "public", "static", "ExpectedCondition", "<", "Boolean", ">", "titleIs", "(", "final", "String", "title", ")", "{", "return", "new", "ExpectedCondition", "<", "Boolean", ">", "(", ")", "{", "private", "String", "currentTitle", "=", "\"\"", ";", "@", "Overrid...
An expectation for checking the title of a page. @param title the expected title, which must be an exact match @return true when the title matches, false otherwise
[ "An", "expectation", "for", "checking", "the", "title", "of", "a", "page", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java#L57-L72
train
An expectation for checking the title of a page.
[ 30522, 2270, 10763, 3517, 8663, 20562, 1026, 22017, 20898, 1028, 2516, 2483, 1006, 2345, 5164, 2516, 1007, 1063, 2709, 2047, 3517, 8663, 20562, 1026, 22017, 20898, 1028, 1006, 1007, 1063, 2797, 5164, 2783, 3775, 9286, 1027, 1000, 1000, 1025...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
buffer/src/main/java/io/netty/buffer/Unpooled.java
Unpooled.copyBoolean
public static ByteBuf copyBoolean(boolean value) { ByteBuf buf = buffer(1); buf.writeBoolean(value); return buf; }
java
public static ByteBuf copyBoolean(boolean value) { ByteBuf buf = buffer(1); buf.writeBoolean(value); return buf; }
[ "public", "static", "ByteBuf", "copyBoolean", "(", "boolean", "value", ")", "{", "ByteBuf", "buf", "=", "buffer", "(", "1", ")", ";", "buf", ".", "writeBoolean", "(", "value", ")", ";", "return", "buf", ";", "}" ]
Creates a new single-byte big-endian buffer that holds the specified boolean value.
[ "Creates", "a", "new", "single", "-", "byte", "big", "-", "endian", "buffer", "that", "holds", "the", "specified", "boolean", "value", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/Unpooled.java#L782-L786
train
Create a new big - endian buffer that holds a single boolean value.
[ 30522, 2270, 10763, 24880, 8569, 2546, 6100, 5092, 9890, 2319, 1006, 22017, 20898, 3643, 1007, 1063, 24880, 8569, 2546, 20934, 2546, 1027, 17698, 1006, 1015, 1007, 1025, 20934, 2546, 1012, 4339, 5092, 9890, 2319, 1006, 3643, 1007, 1025, 270...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java
SecureUtil.signParams
public static String signParams(SymmetricCrypto crypto, Map<?, ?> params, String separator, String keyValueSeparator, boolean isIgnoreNull) { if (MapUtil.isEmpty(params)) { return null; } String paramsStr = MapUtil.join(MapUtil.sort(params), separator, keyValueSeparator, isIgnoreNull); return crypto.enc...
java
public static String signParams(SymmetricCrypto crypto, Map<?, ?> params, String separator, String keyValueSeparator, boolean isIgnoreNull) { if (MapUtil.isEmpty(params)) { return null; } String paramsStr = MapUtil.join(MapUtil.sort(params), separator, keyValueSeparator, isIgnoreNull); return crypto.enc...
[ "public", "static", "String", "signParams", "(", "SymmetricCrypto", "crypto", ",", "Map", "<", "?", ",", "?", ">", "params", ",", "String", "separator", ",", "String", "keyValueSeparator", ",", "boolean", "isIgnoreNull", ")", "{", "if", "(", "MapUtil", ".", ...
对参数做签名<br> 参数签名为对Map参数按照key的顺序排序后拼接为字符串,然后根据提供的签名算法生成签名字符串 @param crypto 对称加密算法 @param params 参数 @param separator entry之间的连接符 @param keyValueSeparator kv之间的连接符 @param isIgnoreNull 是否忽略null的键和值 @return 签名 @since 4.0.1
[ "对参数做签名<br", ">", "参数签名为对Map参数按照key的顺序排序后拼接为字符串,然后根据提供的签名算法生成签名字符串" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java#L847-L853
train
Sign params.
[ 30522, 2270, 10763, 5164, 3696, 28689, 5244, 1006, 19490, 26775, 22571, 3406, 19888, 2080, 1010, 4949, 1026, 1029, 1010, 1029, 1028, 11498, 5244, 1010, 5164, 19802, 25879, 2953, 1010, 5164, 3145, 10175, 15808, 13699, 25879, 2953, 1010, 22017,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
sink/src/main/java/com/alibaba/otter/canal/sink/entry/EntryEventSink.java
EntryEventSink.applyWait
private void applyWait(int fullTimes) { int newFullTimes = fullTimes > maxFullTimes ? maxFullTimes : fullTimes; if (fullTimes <= 3) { // 3次以内 Thread.yield(); } else { // 超过3次,最多只sleep 10ms LockSupport.parkNanos(1000 * 1000L * newFullTimes); } }
java
private void applyWait(int fullTimes) { int newFullTimes = fullTimes > maxFullTimes ? maxFullTimes : fullTimes; if (fullTimes <= 3) { // 3次以内 Thread.yield(); } else { // 超过3次,最多只sleep 10ms LockSupport.parkNanos(1000 * 1000L * newFullTimes); } }
[ "private", "void", "applyWait", "(", "int", "fullTimes", ")", "{", "int", "newFullTimes", "=", "fullTimes", ">", "maxFullTimes", "?", "maxFullTimes", ":", "fullTimes", ";", "if", "(", "fullTimes", "<=", "3", ")", "{", "// 3次以内", "Thread", ".", "yield", "("...
处理无数据的情况,避免空循环挂死
[ "处理无数据的情况,避免空循环挂死" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/sink/src/main/java/com/alibaba/otter/canal/sink/entry/EntryEventSink.java#L192-L200
train
Apply wait.
[ 30522, 2797, 11675, 6611, 21547, 2102, 1006, 20014, 2440, 7292, 2015, 1007, 1063, 20014, 2047, 3993, 7096, 14428, 2015, 1027, 2440, 7292, 2015, 1028, 4098, 3993, 7096, 14428, 2015, 1029, 4098, 3993, 7096, 14428, 2015, 1024, 2440, 7292, 2015...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java
FileWriter.write
public File write(byte[] data, int off, int len, boolean isAppend) throws IORuntimeException { FileOutputStream out = null; try { out = new FileOutputStream(FileUtil.touch(file), isAppend); out.write(data, off, len); out.flush(); }catch(IOException e){ throw new IORuntimeException(e); } fina...
java
public File write(byte[] data, int off, int len, boolean isAppend) throws IORuntimeException { FileOutputStream out = null; try { out = new FileOutputStream(FileUtil.touch(file), isAppend); out.write(data, off, len); out.flush(); }catch(IOException e){ throw new IORuntimeException(e); } fina...
[ "public", "File", "write", "(", "byte", "[", "]", "data", ",", "int", "off", ",", "int", "len", ",", "boolean", "isAppend", ")", "throws", "IORuntimeException", "{", "FileOutputStream", "out", "=", "null", ";", "try", "{", "out", "=", "new", "FileOutputS...
写入数据到文件 @param data 数据 @param off 数据开始位置 @param len 数据长度 @param isAppend 是否追加模式 @return 目标文件 @throws IORuntimeException IO异常
[ "写入数据到文件" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java#L287-L299
train
Write the specified bytes to the file.
[ 30522, 2270, 5371, 4339, 1006, 24880, 1031, 1033, 2951, 1010, 20014, 2125, 1010, 20014, 18798, 1010, 22017, 20898, 18061, 21512, 4859, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 5371, 5833, 18780, 21422, 2041, 1027, 19701, 1025, 304...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java
SqlDateTimeUtils.dateSub
public static String dateSub(String dateStr, int days, TimeZone tz) { long ts = parseToTimeMillis(dateStr, tz); if (ts == Long.MIN_VALUE) { return null; } return dateSub(ts, days, tz); }
java
public static String dateSub(String dateStr, int days, TimeZone tz) { long ts = parseToTimeMillis(dateStr, tz); if (ts == Long.MIN_VALUE) { return null; } return dateSub(ts, days, tz); }
[ "public", "static", "String", "dateSub", "(", "String", "dateStr", ",", "int", "days", ",", "TimeZone", "tz", ")", "{", "long", "ts", "=", "parseToTimeMillis", "(", "dateStr", ",", "tz", ")", ";", "if", "(", "ts", "==", "Long", ".", "MIN_VALUE", ")", ...
Do subtraction on date string. @param dateStr formatted date string. @param days days count you want to subtract. @param tz time zone of the date time string @return datetime string.
[ "Do", "subtraction", "on", "date", "string", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java#L755-L761
train
Returns the date string of the specified number of days from the specified date string.
[ 30522, 2270, 10763, 5164, 5246, 12083, 1006, 5164, 5246, 16344, 1010, 20014, 2420, 1010, 2051, 15975, 1056, 2480, 1007, 1063, 2146, 24529, 1027, 11968, 13462, 4140, 14428, 19912, 2483, 1006, 5246, 16344, 1010, 1056, 2480, 1007, 1025, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-http/src/main/java/cn/hutool/http/HttpRequest.java
HttpRequest.sendFormUrlEncoded
private void sendFormUrlEncoded() throws IOException { if (StrUtil.isBlank(this.header(Header.CONTENT_TYPE))) { // 如果未自定义Content-Type,使用默认的application/x-www-form-urlencoded this.httpConnection.header(Header.CONTENT_TYPE, ContentType.FORM_URLENCODED.toString(this.charset), true); } // Write的时候会优先使用bod...
java
private void sendFormUrlEncoded() throws IOException { if (StrUtil.isBlank(this.header(Header.CONTENT_TYPE))) { // 如果未自定义Content-Type,使用默认的application/x-www-form-urlencoded this.httpConnection.header(Header.CONTENT_TYPE, ContentType.FORM_URLENCODED.toString(this.charset), true); } // Write的时候会优先使用bod...
[ "private", "void", "sendFormUrlEncoded", "(", ")", "throws", "IOException", "{", "if", "(", "StrUtil", ".", "isBlank", "(", "this", ".", "header", "(", "Header", ".", "CONTENT_TYPE", ")", ")", ")", "{", "// 如果未自定义Content-Type,使用默认的application/x-www-form-urlencoded\r...
发送普通表单 @throws IOException
[ "发送普通表单" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpRequest.java#L1001-L1014
train
Send the form url encoded response.
[ 30522, 2797, 11675, 4604, 14192, 3126, 7770, 16044, 2094, 1006, 1007, 11618, 22834, 10288, 24422, 1063, 2065, 1006, 2358, 22134, 4014, 1012, 2003, 28522, 8950, 1006, 2023, 1012, 20346, 1006, 20346, 1012, 4180, 1035, 2828, 1007, 1007, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/SM2Engine.java
SM2Engine.addFieldElement
private void addFieldElement(ECFieldElement v) { final byte[] p = BigIntegers.asUnsignedByteArray(this.curveLength, v.toBigInteger()); this.digest.update(p, 0, p.length); }
java
private void addFieldElement(ECFieldElement v) { final byte[] p = BigIntegers.asUnsignedByteArray(this.curveLength, v.toBigInteger()); this.digest.update(p, 0, p.length); }
[ "private", "void", "addFieldElement", "(", "ECFieldElement", "v", ")", "{", "final", "byte", "[", "]", "p", "=", "BigIntegers", ".", "asUnsignedByteArray", "(", "this", ".", "curveLength", ",", "v", ".", "toBigInteger", "(", ")", ")", ";", "this", ".", "...
增加字段节点 @param digest @param v
[ "增加字段节点" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/SM2Engine.java#L354-L357
train
Adds the field element to the digest.
[ 30522, 2797, 11675, 5587, 3790, 12260, 3672, 1006, 14925, 3790, 12260, 3672, 1058, 1007, 1063, 2345, 24880, 1031, 1033, 1052, 1027, 2502, 18447, 26320, 2015, 1012, 2004, 4609, 5332, 19225, 3762, 27058, 11335, 2100, 1006, 2023, 1012, 7774, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/HashUtil.java
HashUtil.djbHash
public static int djbHash(String str) { int hash = 5381; for (int i = 0; i < str.length(); i++) { hash = ((hash << 5) + hash) + str.charAt(i); } return hash & 0x7FFFFFFF; }
java
public static int djbHash(String str) { int hash = 5381; for (int i = 0; i < str.length(); i++) { hash = ((hash << 5) + hash) + str.charAt(i); } return hash & 0x7FFFFFFF; }
[ "public", "static", "int", "djbHash", "(", "String", "str", ")", "{", "int", "hash", "=", "5381", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "str", ".", "length", "(", ")", ";", "i", "++", ")", "{", "hash", "=", "(", "(", "hash", ...
DJB算法 @param str 字符串 @return hash值
[ "DJB算法" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/HashUtil.java#L314-L322
train
Returns the hash code of the specified string.
[ 30522, 2270, 10763, 20014, 6520, 22655, 4095, 1006, 5164, 2358, 2099, 1007, 1063, 20014, 23325, 1027, 5187, 2620, 2487, 1025, 2005, 1006, 20014, 1045, 1027, 1014, 1025, 1045, 1026, 2358, 2099, 1012, 3091, 1006, 1007, 1025, 1045, 1009, 1009,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/text/StrBuilder.java
StrBuilder.append
public StrBuilder append(char[] src) { if (ArrayUtil.isEmpty(src)) { return this; } return append(src, 0, src.length); }
java
public StrBuilder append(char[] src) { if (ArrayUtil.isEmpty(src)) { return this; } return append(src, 0, src.length); }
[ "public", "StrBuilder", "append", "(", "char", "[", "]", "src", ")", "{", "if", "(", "ArrayUtil", ".", "isEmpty", "(", "src", ")", ")", "{", "return", "this", ";", "}", "return", "append", "(", "src", ",", "0", ",", "src", ".", "length", ")", ";"...
追加一个字符数组 @param src 字符数组 @return this
[ "追加一个字符数组" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/text/StrBuilder.java#L113-L118
train
Appends the specified chars to this builder.
[ 30522, 2270, 2358, 15185, 19231, 4063, 10439, 10497, 1006, 25869, 1031, 1033, 5034, 2278, 1007, 1063, 2065, 1006, 9140, 21823, 2140, 1012, 2003, 6633, 13876, 2100, 1006, 5034, 2278, 1007, 1007, 1063, 2709, 2023, 1025, 1065, 2709, 10439, 104...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-http/src/main/java/cn/hutool/http/HttpBase.java
HttpBase.removeHeader
public T removeHeader(String name) { if(name != null) { headers.remove(name.trim()); } return (T)this; }
java
public T removeHeader(String name) { if(name != null) { headers.remove(name.trim()); } return (T)this; }
[ "public", "T", "removeHeader", "(", "String", "name", ")", "{", "if", "(", "name", "!=", "null", ")", "{", "headers", ".", "remove", "(", "name", ".", "trim", "(", ")", ")", ";", "}", "return", "(", "T", ")", "this", ";", "}" ]
移除一个头信息 @param name Header名 @return this
[ "移除一个头信息" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpBase.java#L196-L201
train
Removes a header from the response.
[ 30522, 2270, 1056, 6366, 4974, 2121, 1006, 5164, 2171, 1007, 1063, 2065, 1006, 2171, 999, 1027, 19701, 1007, 1063, 20346, 2015, 1012, 6366, 1006, 2171, 1012, 12241, 1006, 1007, 1007, 1025, 1065, 2709, 1006, 1056, 1007, 2023, 1025, 1065, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dependency/nnparser/Matrix.java
Matrix.plus
public Matrix plus(Matrix B) { checkMatrixDimensions(B); Matrix X = new Matrix(m, n); double[][] C = X.getArray(); for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { C[i][j] = A[i][j] + B.A[i][j]; } } ...
java
public Matrix plus(Matrix B) { checkMatrixDimensions(B); Matrix X = new Matrix(m, n); double[][] C = X.getArray(); for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { C[i][j] = A[i][j] + B.A[i][j]; } } ...
[ "public", "Matrix", "plus", "(", "Matrix", "B", ")", "{", "checkMatrixDimensions", "(", "B", ")", ";", "Matrix", "X", "=", "new", "Matrix", "(", "m", ",", "n", ")", ";", "double", "[", "]", "[", "]", "C", "=", "X", ".", "getArray", "(", ")", ";...
C = A + B @param B another matrix @return A + B
[ "C", "=", "A", "+", "B" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dependency/nnparser/Matrix.java#L690-L703
train
A = A + B
[ 30522, 2270, 8185, 4606, 1006, 8185, 1038, 1007, 1063, 4638, 18900, 17682, 22172, 6132, 8496, 1006, 1038, 1007, 1025, 8185, 1060, 1027, 2047, 8185, 1006, 1049, 1010, 1050, 1007, 1025, 3313, 1031, 1033, 1031, 1033, 1039, 1027, 1060, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/util/LeaderRetrievalUtils.java
LeaderRetrievalUtils.retrieveLeaderConnectionInfo
public static LeaderConnectionInfo retrieveLeaderConnectionInfo( LeaderRetrievalService leaderRetrievalService, Time timeout) throws LeaderRetrievalException { return retrieveLeaderConnectionInfo(leaderRetrievalService, FutureUtils.toFiniteDuration(timeout)); }
java
public static LeaderConnectionInfo retrieveLeaderConnectionInfo( LeaderRetrievalService leaderRetrievalService, Time timeout) throws LeaderRetrievalException { return retrieveLeaderConnectionInfo(leaderRetrievalService, FutureUtils.toFiniteDuration(timeout)); }
[ "public", "static", "LeaderConnectionInfo", "retrieveLeaderConnectionInfo", "(", "LeaderRetrievalService", "leaderRetrievalService", ",", "Time", "timeout", ")", "throws", "LeaderRetrievalException", "{", "return", "retrieveLeaderConnectionInfo", "(", "leaderRetrievalService", ",...
Retrieves the leader akka url and the current leader session ID. The values are stored in a {@link LeaderConnectionInfo} instance. @param leaderRetrievalService Leader retrieval service to retrieve the leader connection information @param timeout Timeout when to give up looking for the leader @return LeaderConnectionI...
[ "Retrieves", "the", "leader", "akka", "url", "and", "the", "current", "leader", "session", "ID", ".", "The", "values", "are", "stored", "in", "a", "{", "@link", "LeaderConnectionInfo", "}", "instance", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/LeaderRetrievalUtils.java#L58-L62
train
Retrieve the leader connection info.
[ 30522, 2270, 10763, 3003, 8663, 2638, 7542, 2378, 14876, 12850, 19000, 8663, 2638, 7542, 2378, 14876, 1006, 3003, 13465, 7373, 10175, 8043, 7903, 2063, 3003, 13465, 7373, 10175, 8043, 7903, 2063, 1010, 2051, 2051, 5833, 1007, 11618, 3003, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-socket/src/main/java/cn/hutool/socket/nio/NioServer.java
NioServer.init
public NioServer init(InetSocketAddress address) { try { // 打开服务器套接字通道 this.serverSocketChannel = ServerSocketChannel.open(); // 设置为非阻塞状态 serverSocketChannel.configureBlocking(false); // 获取通道相关联的套接字 final ServerSocket serverSocket = serverSocketChannel.socket(); // 绑定端口号 serverSocket....
java
public NioServer init(InetSocketAddress address) { try { // 打开服务器套接字通道 this.serverSocketChannel = ServerSocketChannel.open(); // 设置为非阻塞状态 serverSocketChannel.configureBlocking(false); // 获取通道相关联的套接字 final ServerSocket serverSocket = serverSocketChannel.socket(); // 绑定端口号 serverSocket....
[ "public", "NioServer", "init", "(", "InetSocketAddress", "address", ")", "{", "try", "{", "// 打开服务器套接字通道\r", "this", ".", "serverSocketChannel", "=", "ServerSocketChannel", ".", "open", "(", ")", ";", "// 设置为非阻塞状态\r", "serverSocketChannel", ".", "configureBlocking", ...
初始化 @param address 地址和端口 @return this
[ "初始化" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-socket/src/main/java/cn/hutool/socket/nio/NioServer.java#L43-L63
train
Initializes the NioServer.
[ 30522, 2270, 9152, 9232, 2099, 6299, 1999, 4183, 1006, 1999, 8454, 7432, 12928, 14141, 8303, 4769, 1007, 1063, 3046, 1063, 1013, 1013, 100, 100, 100, 100, 100, 100, 100, 100, 100, 1957, 2023, 1012, 14903, 7432, 3388, 26058, 1027, 14903, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java
MysqlEventParser.findServerId
private Long findServerId(MysqlConnection mysqlConnection) { try { ResultSetPacket packet = mysqlConnection.query("show variables like 'server_id'"); List<String> fields = packet.getFieldValues(); if (CollectionUtils.isEmpty(fields)) { throw new CanalParseExce...
java
private Long findServerId(MysqlConnection mysqlConnection) { try { ResultSetPacket packet = mysqlConnection.query("show variables like 'server_id'"); List<String> fields = packet.getFieldValues(); if (CollectionUtils.isEmpty(fields)) { throw new CanalParseExce...
[ "private", "Long", "findServerId", "(", "MysqlConnection", "mysqlConnection", ")", "{", "try", "{", "ResultSetPacket", "packet", "=", "mysqlConnection", ".", "query", "(", "\"show variables like 'server_id'\"", ")", ";", "List", "<", "String", ">", "fields", "=", ...
查询当前db的serverId信息
[ "查询当前db的serverId信息" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java#L635-L646
train
Find server id.
[ 30522, 2797, 2146, 4858, 2121, 6299, 3593, 1006, 2026, 2015, 4160, 22499, 10087, 7542, 2026, 2015, 4160, 22499, 10087, 7542, 1007, 1063, 3046, 1063, 3463, 3388, 23947, 3388, 14771, 1027, 2026, 2015, 4160, 22499, 10087, 7542, 1012, 23032, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-setting/src/main/java/cn/hutool/setting/dialect/Props.java
Props.store
public void store(String path, Class<?> clazz) { this.store(FileUtil.getAbsolutePath(path, clazz)); }
java
public void store(String path, Class<?> clazz) { this.store(FileUtil.getAbsolutePath(path, clazz)); }
[ "public", "void", "store", "(", "String", "path", ",", "Class", "<", "?", ">", "clazz", ")", "{", "this", ".", "store", "(", "FileUtil", ".", "getAbsolutePath", "(", "path", ",", "clazz", ")", ")", ";", "}" ]
存储当前设置,会覆盖掉以前的设置 @param path 相对路径 @param clazz 相对的类
[ "存储当前设置,会覆盖掉以前的设置" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/dialect/Props.java#L510-L512
train
Store a class in the database.
[ 30522, 2270, 11675, 3573, 1006, 5164, 4130, 1010, 2465, 1026, 1029, 1028, 18856, 10936, 2480, 1007, 1063, 2023, 1012, 3573, 1006, 5371, 21823, 2140, 1012, 2131, 7875, 19454, 10421, 15069, 1006, 4130, 1010, 18856, 10936, 2480, 1007, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java
TaskExecutor.onStart
@Override public void onStart() throws Exception { try { startTaskExecutorServices(); } catch (Exception e) { final TaskManagerException exception = new TaskManagerException(String.format("Could not start the TaskExecutor %s", getAddress()), e); onFatalError(exception); throw exception; } startReg...
java
@Override public void onStart() throws Exception { try { startTaskExecutorServices(); } catch (Exception e) { final TaskManagerException exception = new TaskManagerException(String.format("Could not start the TaskExecutor %s", getAddress()), e); onFatalError(exception); throw exception; } startReg...
[ "@", "Override", "public", "void", "onStart", "(", ")", "throws", "Exception", "{", "try", "{", "startTaskExecutorServices", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "final", "TaskManagerException", "exception", "=", "new", "TaskManagerExc...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java#L285-L296
train
Start the TaskExecutor.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2006, 14117, 2102, 1006, 1007, 11618, 6453, 1063, 3046, 1063, 2707, 10230, 3489, 2595, 8586, 16161, 22573, 2099, 7903, 2229, 1006, 1007, 1025, 1065, 4608, 1006, 6453, 1041, 1007, 1063, 2345, 4708, 2480...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java
KeyUtil.getSecretKeyFactory
public static SecretKeyFactory getSecretKeyFactory(String algorithm) { final Provider provider = GlobalBouncyCastleProvider.INSTANCE.getProvider(); SecretKeyFactory keyFactory; try { keyFactory = (null == provider) // ? SecretKeyFactory.getInstance(getMainAlgorithm(algorithm)) // : SecretKeyF...
java
public static SecretKeyFactory getSecretKeyFactory(String algorithm) { final Provider provider = GlobalBouncyCastleProvider.INSTANCE.getProvider(); SecretKeyFactory keyFactory; try { keyFactory = (null == provider) // ? SecretKeyFactory.getInstance(getMainAlgorithm(algorithm)) // : SecretKeyF...
[ "public", "static", "SecretKeyFactory", "getSecretKeyFactory", "(", "String", "algorithm", ")", "{", "final", "Provider", "provider", "=", "GlobalBouncyCastleProvider", ".", "INSTANCE", ".", "getProvider", "(", ")", ";", "SecretKeyFactory", "keyFactory", ";", "try", ...
获取{@link SecretKeyFactory} @param algorithm 对称加密算法 @return {@link KeyFactory} @since 4.5.2
[ "获取", "{", "@link", "SecretKeyFactory", "}" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java#L480-L492
train
Gets the SecretKeyFactory for the given algorithm.
[ 30522, 2270, 10763, 3595, 14839, 21450, 4152, 8586, 13465, 14839, 21450, 1006, 5164, 9896, 1007, 1063, 2345, 10802, 10802, 1027, 3795, 5092, 4609, 5666, 23662, 21572, 17258, 2121, 1012, 6013, 1012, 2131, 21572, 17258, 2121, 1006, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
java/server/src/org/openqa/grid/selenium/GridLauncherV3.java
GridLauncherV3.buildLauncher
private GridItemLauncher buildLauncher(String[] args) { if (Arrays.asList(args).contains("-htmlSuite")) { out.println(Joiner.on("\n").join( "Download the Selenium HTML Runner from http://www.seleniumhq.org/download/ and", "use that to run your HTML suite.")); return null; } ...
java
private GridItemLauncher buildLauncher(String[] args) { if (Arrays.asList(args).contains("-htmlSuite")) { out.println(Joiner.on("\n").join( "Download the Selenium HTML Runner from http://www.seleniumhq.org/download/ and", "use that to run your HTML suite.")); return null; } ...
[ "private", "GridItemLauncher", "buildLauncher", "(", "String", "[", "]", "args", ")", "{", "if", "(", "Arrays", ".", "asList", "(", "args", ")", ".", "contains", "(", "\"-htmlSuite\"", ")", ")", "{", "out", ".", "println", "(", "Joiner", ".", "on", "("...
From the {@code args}, builds a new {@link GridItemLauncher} and populates it properly. @return null if no role is found, or a properly populated {@link GridItemLauncher}.
[ "From", "the", "{", "@code", "args", "}", "builds", "a", "new", "{", "@link", "GridItemLauncher", "}", "and", "populates", "it", "properly", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/server/src/org/openqa/grid/selenium/GridLauncherV3.java#L95-L125
train
Build the launcher.
[ 30522, 2797, 8370, 4221, 19968, 4887, 26091, 2099, 3857, 17298, 26091, 2099, 1006, 5164, 1031, 1033, 12098, 5620, 1007, 1063, 2065, 1006, 27448, 1012, 2004, 9863, 1006, 12098, 5620, 1007, 1012, 3397, 1006, 1000, 1011, 16129, 28880, 2063, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java
RestClusterClient.submitJob
@Override public CompletableFuture<JobSubmissionResult> submitJob(@Nonnull JobGraph jobGraph) { // we have to enable queued scheduling because slot will be allocated lazily jobGraph.setAllowQueuedScheduling(true); CompletableFuture<java.nio.file.Path> jobGraphFileFuture = CompletableFuture.supplyAsync(() -> { ...
java
@Override public CompletableFuture<JobSubmissionResult> submitJob(@Nonnull JobGraph jobGraph) { // we have to enable queued scheduling because slot will be allocated lazily jobGraph.setAllowQueuedScheduling(true); CompletableFuture<java.nio.file.Path> jobGraphFileFuture = CompletableFuture.supplyAsync(() -> { ...
[ "@", "Override", "public", "CompletableFuture", "<", "JobSubmissionResult", ">", "submitJob", "(", "@", "Nonnull", "JobGraph", "jobGraph", ")", "{", "// we have to enable queued scheduling because slot will be allocated lazily", "jobGraph", ".", "setAllowQueuedScheduling", "(",...
Submits the given {@link JobGraph} to the dispatcher. @param jobGraph to submit @return Future which is completed with the submission response
[ "Submits", "the", "given", "{", "@link", "JobGraph", "}", "to", "the", "dispatcher", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java#L316-L384
train
Submit a job to Flink.
[ 30522, 1030, 2058, 15637, 2270, 4012, 10814, 10880, 11263, 11244, 1026, 5841, 12083, 25481, 6072, 11314, 1028, 12040, 5558, 2497, 1006, 1030, 2512, 11231, 3363, 3105, 14413, 3105, 14413, 1007, 1063, 1013, 1013, 2057, 2031, 2000, 9585, 24240, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/FailoverStrategyLoader.java
FailoverStrategyLoader.loadFailoverStrategy
public static FailoverStrategy.Factory loadFailoverStrategy(Configuration config, @Nullable Logger logger) { final String strategyParam = config.getString(JobManagerOptions.EXECUTION_FAILOVER_STRATEGY); if (StringUtils.isNullOrWhitespaceOnly(strategyParam)) { if (logger != null) { logger.warn("Null config v...
java
public static FailoverStrategy.Factory loadFailoverStrategy(Configuration config, @Nullable Logger logger) { final String strategyParam = config.getString(JobManagerOptions.EXECUTION_FAILOVER_STRATEGY); if (StringUtils.isNullOrWhitespaceOnly(strategyParam)) { if (logger != null) { logger.warn("Null config v...
[ "public", "static", "FailoverStrategy", ".", "Factory", "loadFailoverStrategy", "(", "Configuration", "config", ",", "@", "Nullable", "Logger", "logger", ")", "{", "final", "String", "strategyParam", "=", "config", ".", "getString", "(", "JobManagerOptions", ".", ...
Loads a FailoverStrategy Factory from the given configuration.
[ "Loads", "a", "FailoverStrategy", "Factory", "from", "the", "given", "configuration", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/FailoverStrategyLoader.java#L49-L77
train
Load failover strategy.
[ 30522, 2270, 10763, 8246, 30524, 2213, 1027, 9530, 8873, 2290, 1012, 4152, 18886, 3070, 1006, 3105, 24805, 4590, 7361, 9285, 1012, 7781, 1035, 8246, 7840, 1035, 5656, 1007, 1025, 2065, 1006, 5164, 21823, 4877, 1012, 3475, 18083, 2953, 2860,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.parseJobId
private JobID parseJobId(String jobIdString) throws CliArgsException { if (jobIdString == null) { throw new CliArgsException("Missing JobId"); } final JobID jobId; try { jobId = JobID.fromHexString(jobIdString); } catch (IllegalArgumentException e) { throw new CliArgsException(e.getMessage()); } ...
java
private JobID parseJobId(String jobIdString) throws CliArgsException { if (jobIdString == null) { throw new CliArgsException("Missing JobId"); } final JobID jobId; try { jobId = JobID.fromHexString(jobIdString); } catch (IllegalArgumentException e) { throw new CliArgsException(e.getMessage()); } ...
[ "private", "JobID", "parseJobId", "(", "String", "jobIdString", ")", "throws", "CliArgsException", "{", "if", "(", "jobIdString", "==", "null", ")", "{", "throw", "new", "CliArgsException", "(", "\"Missing JobId\"", ")", ";", "}", "final", "JobID", "jobId", ";...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L881-L893
train
Parses a string containing a JobID.
[ 30522, 2797, 3105, 3593, 11968, 3366, 5558, 17062, 1006, 5164, 3105, 9821, 18886, 3070, 1007, 11618, 18856, 2401, 10623, 3366, 2595, 24422, 1063, 2065, 1006, 3105, 9821, 18886, 3070, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 18856, 2401, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java
SecureUtil.generateKey
public static SecretKey generateKey(String algorithm, KeySpec keySpec) { return KeyUtil.generateKey(algorithm, keySpec); }
java
public static SecretKey generateKey(String algorithm, KeySpec keySpec) { return KeyUtil.generateKey(algorithm, keySpec); }
[ "public", "static", "SecretKey", "generateKey", "(", "String", "algorithm", ",", "KeySpec", "keySpec", ")", "{", "return", "KeyUtil", ".", "generateKey", "(", "algorithm", ",", "keySpec", ")", ";", "}" ]
生成 {@link SecretKey},仅用于对称加密和摘要算法 @param algorithm 算法 @param keySpec {@link KeySpec} @return {@link SecretKey}
[ "生成", "{", "@link", "SecretKey", "}", ",仅用于对称加密和摘要算法" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java#L129-L131
train
Generates a secret key using the specified algorithm and key spec.
[ 30522, 2270, 10763, 3595, 14839, 9699, 14839, 1006, 5164, 9896, 1010, 6309, 5051, 2278, 6309, 5051, 2278, 1007, 1063, 2709, 3145, 21823, 2140, 1012, 9699, 14839, 1006, 9896, 1010, 6309, 5051, 2278, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.handleFailedSlotRequest
private void handleFailedSlotRequest(SlotID slotId, AllocationID allocationId, Throwable cause) { PendingSlotRequest pendingSlotRequest = pendingSlotRequests.get(allocationId); LOG.debug("Slot request with allocation id {} failed for slot {}.", allocationId, slotId, cause); if (null != pendingSlotRequest) { ...
java
private void handleFailedSlotRequest(SlotID slotId, AllocationID allocationId, Throwable cause) { PendingSlotRequest pendingSlotRequest = pendingSlotRequests.get(allocationId); LOG.debug("Slot request with allocation id {} failed for slot {}.", allocationId, slotId, cause); if (null != pendingSlotRequest) { ...
[ "private", "void", "handleFailedSlotRequest", "(", "SlotID", "slotId", ",", "AllocationID", "allocationId", ",", "Throwable", "cause", ")", "{", "PendingSlotRequest", "pendingSlotRequest", "=", "pendingSlotRequests", ".", "get", "(", "allocationId", ")", ";", "LOG", ...
Handles a failed slot request. The slot manager tries to find a new slot fulfilling the resource requirements for the failed slot request. @param slotId identifying the slot which was assigned to the slot request before @param allocationId identifying the failed slot request @param cause of the failure
[ "Handles", "a", "failed", "slot", "request", ".", "The", "slot", "manager", "tries", "to", "find", "a", "new", "slot", "fulfilling", "the", "resource", "requirements", "for", "the", "failed", "slot", "request", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L949-L970
train
Handle a failed slot request.
[ 30522, 2797, 11675, 5047, 7011, 18450, 14540, 4140, 2890, 15500, 1006, 10453, 3593, 10453, 3593, 1010, 16169, 3593, 16169, 3593, 1010, 5466, 3085, 3426, 1007, 1063, 14223, 14540, 4140, 2890, 15500, 14223, 14540, 4140, 2890, 15500, 1027, 14223...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java
TaskSlotTable.getTaskSlot
@Nullable private TaskSlot getTaskSlot(AllocationID allocationId) { Preconditions.checkNotNull(allocationId); return allocationIDTaskSlotMap.get(allocationId); }
java
@Nullable private TaskSlot getTaskSlot(AllocationID allocationId) { Preconditions.checkNotNull(allocationId); return allocationIDTaskSlotMap.get(allocationId); }
[ "@", "Nullable", "private", "TaskSlot", "getTaskSlot", "(", "AllocationID", "allocationId", ")", "{", "Preconditions", ".", "checkNotNull", "(", "allocationId", ")", ";", "return", "allocationIDTaskSlotMap", ".", "get", "(", "allocationId", ")", ";", "}" ]
---------------------------------------------------------------------
[ "---------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java#L575-L580
train
Gets the task slot for the given allocation id.
[ 30522, 1030, 19701, 3085, 2797, 8518, 10994, 2131, 10230, 5705, 10994, 1006, 16169, 3593, 16169, 3593, 1007, 1063, 3653, 8663, 20562, 2015, 1012, 4638, 17048, 11231, 3363, 1006, 16169, 3593, 1007, 1025, 2709, 16169, 3593, 10230, 5705, 10994, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
common/unsafe/src/main/java/org/apache/spark/unsafe/types/ByteArray.java
ByteArray.writeToMemory
public static void writeToMemory(byte[] src, Object target, long targetOffset) { Platform.copyMemory(src, Platform.BYTE_ARRAY_OFFSET, target, targetOffset, src.length); }
java
public static void writeToMemory(byte[] src, Object target, long targetOffset) { Platform.copyMemory(src, Platform.BYTE_ARRAY_OFFSET, target, targetOffset, src.length); }
[ "public", "static", "void", "writeToMemory", "(", "byte", "[", "]", "src", ",", "Object", "target", ",", "long", "targetOffset", ")", "{", "Platform", ".", "copyMemory", "(", "src", ",", "Platform", ".", "BYTE_ARRAY_OFFSET", ",", "target", ",", "targetOffset...
Writes the content of a byte array into a memory address, identified by an object and an offset. The target memory address must already been allocated, and have enough space to hold all the bytes in this string.
[ "Writes", "the", "content", "of", "a", "byte", "array", "into", "a", "memory", "address", "identified", "by", "an", "object", "and", "an", "offset", ".", "The", "target", "memory", "address", "must", "already", "been", "allocated", "and", "have", "enough", ...
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/unsafe/src/main/java/org/apache/spark/unsafe/types/ByteArray.java#L35-L37
train
Write to memory.
[ 30522, 2270, 10763, 11675, 4339, 20389, 6633, 10253, 1006, 24880, 1031, 1033, 5034, 2278, 1010, 4874, 4539, 1010, 2146, 4539, 27475, 3388, 1007, 1063, 4132, 1012, 6100, 4168, 5302, 2854, 1006, 5034, 2278, 1010, 4132, 1012, 24880, 1035, 9140...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/network/messages/MessageSerializer.java
MessageSerializer.deserializeResponse
public RESP deserializeResponse(final ByteBuf buf) { Preconditions.checkNotNull(buf); return responseDeserializer.deserializeMessage(buf); }
java
public RESP deserializeResponse(final ByteBuf buf) { Preconditions.checkNotNull(buf); return responseDeserializer.deserializeMessage(buf); }
[ "public", "RESP", "deserializeResponse", "(", "final", "ByteBuf", "buf", ")", "{", "Preconditions", ".", "checkNotNull", "(", "buf", ")", ";", "return", "responseDeserializer", ".", "deserializeMessage", "(", "buf", ")", ";", "}" ]
De-serializes the response sent to the {@link org.apache.flink.queryablestate.network.Client}. <pre> <b>The buffer is expected to be at the response position.</b> </pre> @param buf The {@link ByteBuf} containing the serialized response. @return The response.
[ "De", "-", "serializes", "the", "response", "sent", "to", "the", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/network/messages/MessageSerializer.java#L278-L281
train
Deserialize a RESP message from the given ByteBuf.
[ 30522, 2270, 24501, 2361, 4078, 11610, 28863, 2229, 26029, 3366, 1006, 2345, 24880, 8569, 2546, 20934, 2546, 1007, 1063, 3653, 8663, 20562, 2015, 1012, 4638, 17048, 11231, 3363, 1006, 20934, 2546, 1007, 1025, 2709, 3433, 6155, 11610, 28863, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.writeBytes
public static File writeBytes(byte[] data, String path) throws IORuntimeException { return writeBytes(data, touch(path)); }
java
public static File writeBytes(byte[] data, String path) throws IORuntimeException { return writeBytes(data, touch(path)); }
[ "public", "static", "File", "writeBytes", "(", "byte", "[", "]", "data", ",", "String", "path", ")", "throws", "IORuntimeException", "{", "return", "writeBytes", "(", "data", ",", "touch", "(", "path", ")", ")", ";", "}" ]
写数据到文件中 @param data 数据 @param path 目标文件 @return 目标文件 @throws IORuntimeException IO异常
[ "写数据到文件中" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L3114-L3116
train
Write the byte array to a file.
[ 30522, 2270, 10763, 5371, 4339, 3762, 4570, 1006, 24880, 1031, 1033, 2951, 1010, 5164, 4130, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 2709, 4339, 3762, 4570, 1006, 2951, 1010, 3543, 1006, 4130, 1007, 1007, 1025, 1065, 102, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
buffer/src/main/java/io/netty/buffer/ByteBufUtil.java
ByteBufUtil.readBytes
public static ByteBuf readBytes(ByteBufAllocator alloc, ByteBuf buffer, int length) { boolean release = true; ByteBuf dst = alloc.buffer(length); try { buffer.readBytes(dst); release = false; return dst; } finally { if (release) { ...
java
public static ByteBuf readBytes(ByteBufAllocator alloc, ByteBuf buffer, int length) { boolean release = true; ByteBuf dst = alloc.buffer(length); try { buffer.readBytes(dst); release = false; return dst; } finally { if (release) { ...
[ "public", "static", "ByteBuf", "readBytes", "(", "ByteBufAllocator", "alloc", ",", "ByteBuf", "buffer", ",", "int", "length", ")", "{", "boolean", "release", "=", "true", ";", "ByteBuf", "dst", "=", "alloc", ".", "buffer", "(", "length", ")", ";", "try", ...
Read the given amount of bytes into a new {@link ByteBuf} that is allocated from the {@link ByteBufAllocator}.
[ "Read", "the", "given", "amount", "of", "bytes", "into", "a", "new", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java#L442-L454
train
readBytes This method is used to read a byte array of bytes from a byte buffer.
[ 30522, 2270, 10763, 24880, 8569, 2546, 3191, 3762, 4570, 1006, 24880, 8569, 13976, 24755, 4263, 2035, 10085, 1010, 24880, 8569, 2546, 17698, 1010, 20014, 3091, 1007, 1063, 22017, 20898, 2713, 1027, 2995, 1025, 24880, 8569, 2546, 16233, 2102, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/recognition/nr/PersonRecognition.java
PersonRecognition.viterbiCompute
public static List<NR> viterbiCompute(List<EnumItem<NR>> roleTagList) { return Viterbi.computeEnum(roleTagList, PersonDictionary.transformMatrixDictionary); }
java
public static List<NR> viterbiCompute(List<EnumItem<NR>> roleTagList) { return Viterbi.computeEnum(roleTagList, PersonDictionary.transformMatrixDictionary); }
[ "public", "static", "List", "<", "NR", ">", "viterbiCompute", "(", "List", "<", "EnumItem", "<", "NR", ">", ">", "roleTagList", ")", "{", "return", "Viterbi", ".", "computeEnum", "(", "roleTagList", ",", "PersonDictionary", ".", "transformMatrixDictionary", ")...
维特比算法求解最优标签 @param roleTagList @return
[ "维特比算法求解最优标签" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/recognition/nr/PersonRecognition.java#L125-L128
train
Compute the Viterbi formula.
[ 30522, 2270, 10763, 2862, 1026, 17212, 1028, 6819, 3334, 13592, 25377, 10421, 1006, 2862, 1026, 4372, 12717, 18532, 1026, 17212, 1028, 1028, 2535, 15900, 9863, 1007, 1063, 2709, 6819, 3334, 5638, 1012, 24134, 2368, 2819, 1006, 2535, 15900, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java
LogBuffer.limit
public final LogBuffer limit(int newLimit) { if (origin + newLimit > buffer.length || newLimit < 0) throw new IllegalArgumentException("capacity excceed: " + (origin + newLimit)); limit = newLimit; ...
java
public final LogBuffer limit(int newLimit) { if (origin + newLimit > buffer.length || newLimit < 0) throw new IllegalArgumentException("capacity excceed: " + (origin + newLimit)); limit = newLimit; ...
[ "public", "final", "LogBuffer", "limit", "(", "int", "newLimit", ")", "{", "if", "(", "origin", "+", "newLimit", ">", "buffer", ".", "length", "||", "newLimit", "<", "0", ")", "throw", "new", "IllegalArgumentException", "(", "\"capacity excceed: \"", "+", "(...
Sets this buffer's limit. If the position is larger than the new limit then it is set to the new limit. If the mark is defined and larger than the new limit then it is discarded. </p> @param newLimit The new limit value; must be non-negative and no larger than this buffer's capacity @return This buffer @throws Illegal...
[ "Sets", "this", "buffer", "s", "limit", ".", "If", "the", "position", "is", "larger", "than", "the", "new", "limit", "then", "it", "is", "set", "to", "the", "new", "limit", ".", "If", "the", "mark", "is", "defined", "and", "larger", "than", "the", "n...
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java#L175-L181
train
Sets the limit of the buffer.
[ 30522, 30524, 1007, 5466, 2047, 6206, 2906, 22850, 15781, 2595, 24422, 1006, 1000, 3977, 4654, 9468, 13089, 1024, 1000, 1009, 1006, 4761, 1009, 2047, 17960, 4183, 1007, 1007, 1025, 5787, 1027, 2047, 17960, 4183, 1025, 2709, 2023, 1025, 1065...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/BinaryExternalSorter.java
BinaryExternalSorter.setResultIterator
private void setResultIterator(MutableObjectIterator<BinaryRow> iterator) { synchronized (this.iteratorLock) { // set the result iterator only, if no exception has occurred if (this.iteratorException == null) { this.iterator = iterator; this.iteratorLock.notifyAll(); } } }
java
private void setResultIterator(MutableObjectIterator<BinaryRow> iterator) { synchronized (this.iteratorLock) { // set the result iterator only, if no exception has occurred if (this.iteratorException == null) { this.iterator = iterator; this.iteratorLock.notifyAll(); } } }
[ "private", "void", "setResultIterator", "(", "MutableObjectIterator", "<", "BinaryRow", ">", "iterator", ")", "{", "synchronized", "(", "this", ".", "iteratorLock", ")", "{", "// set the result iterator only, if no exception has occurred", "if", "(", "this", ".", "itera...
Sets the result iterator. By setting the result iterator, all threads that are waiting for the result iterator are notified and will obtain it. @param iterator The result iterator to set.
[ "Sets", "the", "result", "iterator", ".", "By", "setting", "the", "result", "iterator", "all", "threads", "that", "are", "waiting", "for", "the", "result", "iterator", "are", "notified", "and", "will", "obtain", "it", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/BinaryExternalSorter.java#L626-L634
train
Sets the result iterator.
[ 30522, 2797, 11675, 2275, 6072, 11314, 21646, 8844, 1006, 14163, 10880, 16429, 20614, 21646, 8844, 1026, 12441, 10524, 1028, 2009, 6906, 4263, 1007, 1063, 25549, 1006, 2023, 1012, 2009, 6906, 4263, 7878, 1007, 1063, 1013, 1013, 2275, 1996, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraph.java
StreamGraph.clear
public void clear() { streamNodes = new HashMap<>(); virtualSelectNodes = new HashMap<>(); virtualSideOutputNodes = new HashMap<>(); virtualPartitionNodes = new HashMap<>(); vertexIDtoBrokerID = new HashMap<>(); vertexIDtoLoopTimeout = new HashMap<>(); iterationSourceSinkPairs = new HashSet<>(); source...
java
public void clear() { streamNodes = new HashMap<>(); virtualSelectNodes = new HashMap<>(); virtualSideOutputNodes = new HashMap<>(); virtualPartitionNodes = new HashMap<>(); vertexIDtoBrokerID = new HashMap<>(); vertexIDtoLoopTimeout = new HashMap<>(); iterationSourceSinkPairs = new HashSet<>(); source...
[ "public", "void", "clear", "(", ")", "{", "streamNodes", "=", "new", "HashMap", "<>", "(", ")", ";", "virtualSelectNodes", "=", "new", "HashMap", "<>", "(", ")", ";", "virtualSideOutputNodes", "=", "new", "HashMap", "<>", "(", ")", ";", "virtualPartitionNo...
Remove all registered nodes etc.
[ "Remove", "all", "registered", "nodes", "etc", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraph.java#L111-L121
train
Clear all the nodes.
[ 30522, 2270, 11675, 3154, 1006, 1007, 1063, 5460, 3630, 6155, 1027, 2047, 23325, 2863, 2361, 1026, 1028, 1006, 1007, 1025, 7484, 11246, 22471, 3630, 6155, 1027, 2047, 23325, 2863, 2361, 1026, 1028, 1006, 1007, 1025, 7484, 7363, 5833, 18780,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/TableFactoryService.java
TableFactoryService.filterByFactoryClass
private static <T> List<TableFactory> filterByFactoryClass( Class<T> factoryClass, Map<String, String> properties, List<TableFactory> foundFactories) { List<TableFactory> classFactories = foundFactories.stream() .filter(p -> factoryClass.isAssignableFrom(p.getClass())) .collect(Collectors.toList()); i...
java
private static <T> List<TableFactory> filterByFactoryClass( Class<T> factoryClass, Map<String, String> properties, List<TableFactory> foundFactories) { List<TableFactory> classFactories = foundFactories.stream() .filter(p -> factoryClass.isAssignableFrom(p.getClass())) .collect(Collectors.toList()); i...
[ "private", "static", "<", "T", ">", "List", "<", "TableFactory", ">", "filterByFactoryClass", "(", "Class", "<", "T", ">", "factoryClass", ",", "Map", "<", "String", ",", "String", ">", "properties", ",", "List", "<", "TableFactory", ">", "foundFactories", ...
Filters factories with matching context by factory class.
[ "Filters", "factories", "with", "matching", "context", "by", "factory", "class", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/TableFactoryService.java#L172-L190
train
Filter by factory class
[ 30522, 2797, 10763, 1026, 1056, 1028, 2862, 1026, 2795, 21450, 1028, 11307, 3762, 21450, 26266, 1006, 2465, 1026, 1056, 1028, 4713, 26266, 1010, 4949, 1026, 5164, 1010, 5164, 1028, 5144, 1010, 2862, 1026, 2795, 21450, 1028, 2179, 7011, 1676...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java
ReflectUtil.setFieldValue
public static void setFieldValue(Object obj, Field field, Object value) throws UtilException { Assert.notNull(obj); Assert.notNull(field); field.setAccessible(true); if(null != value) { Class<?> fieldType = field.getType(); if(false == fieldType.isAssignableFrom(value.getClass())) { //对于类型不...
java
public static void setFieldValue(Object obj, Field field, Object value) throws UtilException { Assert.notNull(obj); Assert.notNull(field); field.setAccessible(true); if(null != value) { Class<?> fieldType = field.getType(); if(false == fieldType.isAssignableFrom(value.getClass())) { //对于类型不...
[ "public", "static", "void", "setFieldValue", "(", "Object", "obj", ",", "Field", "field", ",", "Object", "value", ")", "throws", "UtilException", "{", "Assert", ".", "notNull", "(", "obj", ")", ";", "Assert", ".", "notNull", "(", "field", ")", ";", "fiel...
设置字段值 @param obj 对象 @param field 字段 @param value 值,值类型必须与字段类型匹配,不会自动转换对象类型 @throws UtilException UtilException 包装IllegalAccessException异常
[ "设置字段值" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L250-L271
train
Sets the value of the specified field from the specified object.
[ 30522, 2270, 10763, 11675, 2275, 3790, 10175, 5657, 1006, 4874, 27885, 3501, 1010, 2492, 2492, 1010, 4874, 3643, 1007, 11618, 21183, 9463, 2595, 24422, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 27885, 3501, 1007, 1025, 20865, 1012, 2025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java
Restarter.preInitializeLeakyClasses
private void preInitializeLeakyClasses() { try { Class<?> readerClass = ClassNameReader.class; Field field = readerClass.getDeclaredField("EARLY_EXIT"); field.setAccessible(true); ((Throwable) field.get(null)).fillInStackTrace(); } catch (Exception ex) { this.logger.warn("Unable to pre-initialize c...
java
private void preInitializeLeakyClasses() { try { Class<?> readerClass = ClassNameReader.class; Field field = readerClass.getDeclaredField("EARLY_EXIT"); field.setAccessible(true); ((Throwable) field.get(null)).fillInStackTrace(); } catch (Exception ex) { this.logger.warn("Unable to pre-initialize c...
[ "private", "void", "preInitializeLeakyClasses", "(", ")", "{", "try", "{", "Class", "<", "?", ">", "readerClass", "=", "ClassNameReader", ".", "class", ";", "Field", "field", "=", "readerClass", ".", "getDeclaredField", "(", "\"EARLY_EXIT\"", ")", ";", "field"...
CGLIB has a private exception field which needs to initialized early to ensure that the stacktrace doesn't retain a reference to the RestartClassLoader.
[ "CGLIB", "has", "a", "private", "exception", "field", "which", "needs", "to", "initialized", "early", "to", "ensure", "that", "the", "stacktrace", "doesn", "t", "retain", "a", "reference", "to", "the", "RestartClassLoader", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java#L188-L198
train
Pre - initialize leaky classes.
[ 30522, 2797, 11675, 3653, 5498, 20925, 4697, 19738, 4801, 26266, 2229, 1006, 1007, 1063, 3046, 1063, 2465, 1026, 1029, 1028, 8068, 26266, 1027, 2465, 18442, 16416, 4063, 1012, 2465, 1025, 2492, 2492, 1027, 8068, 26266, 1012, 2131, 3207, 204...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java
DelegatingDecompressorFrameListener.initDecompressor
private void initDecompressor(ChannelHandlerContext ctx, int streamId, Http2Headers headers, boolean endOfStream) throws Http2Exception { final Http2Stream stream = connection.stream(streamId); if (stream == null) { return; } Http2Decompressor decompressor = deco...
java
private void initDecompressor(ChannelHandlerContext ctx, int streamId, Http2Headers headers, boolean endOfStream) throws Http2Exception { final Http2Stream stream = connection.stream(streamId); if (stream == null) { return; } Http2Decompressor decompressor = deco...
[ "private", "void", "initDecompressor", "(", "ChannelHandlerContext", "ctx", ",", "int", "streamId", ",", "Http2Headers", "headers", ",", "boolean", "endOfStream", ")", "throws", "Http2Exception", "{", "final", "Http2Stream", "stream", "=", "connection", ".", "stream...
Checks if a new decompressor object is needed for the stream identified by {@code streamId}. This method will modify the {@code content-encoding} header contained in {@code headers}. @param ctx The context @param streamId The identifier for the headers inside {@code headers} @param headers Object representing headers ...
[ "Checks", "if", "a", "new", "decompressor", "object", "is", "needed", "for", "the", "stream", "identified", "by", "{", "@code", "streamId", "}", ".", "This", "method", "will", "modify", "the", "{", "@code", "content", "-", "encoding", "}", "header", "conta...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java#L205-L247
train
Initialize the decompressor.
[ 30522, 2797, 11675, 1999, 4183, 3207, 9006, 20110, 2953, 1006, 3149, 11774, 3917, 8663, 18209, 14931, 2595, 1010, 20014, 5460, 3593, 1010, 8299, 2475, 4974, 2545, 20346, 2015, 1010, 22017, 20898, 2203, 11253, 21422, 1007, 11618, 8299, 2475, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/files/StaticFileServerHandler.java
StaticFileServerHandler.respondAsLeader
@Override protected void respondAsLeader(ChannelHandlerContext channelHandlerContext, RoutedRequest routedRequest, T gateway) throws Exception { final HttpRequest request = routedRequest.getRequest(); final String requestPath; // make sure we request the "index.html" in case there is a directory request if (r...
java
@Override protected void respondAsLeader(ChannelHandlerContext channelHandlerContext, RoutedRequest routedRequest, T gateway) throws Exception { final HttpRequest request = routedRequest.getRequest(); final String requestPath; // make sure we request the "index.html" in case there is a directory request if (r...
[ "@", "Override", "protected", "void", "respondAsLeader", "(", "ChannelHandlerContext", "channelHandlerContext", ",", "RoutedRequest", "routedRequest", ",", "T", "gateway", ")", "throws", "Exception", "{", "final", "HttpRequest", "request", "=", "routedRequest", ".", "...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/files/StaticFileServerHandler.java#L125-L142
train
respond as leader.
[ 30522, 1030, 2058, 15637, 5123, 11675, 6869, 3022, 19000, 1006, 3149, 11774, 3917, 8663, 18209, 3149, 11774, 3917, 8663, 18209, 1010, 19578, 2890, 15500, 19578, 2890, 15500, 1010, 1056, 11909, 1007, 11618, 6453, 1063, 2345, 8299, 2890, 15500,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-json/src/main/java/cn/hutool/json/JSONGetter.java
JSONGetter.getStrEscaped
public String getStrEscaped(K key, String defaultValue) { return JSONUtil.escape(getStr(key, defaultValue)); }
java
public String getStrEscaped(K key, String defaultValue) { return JSONUtil.escape(getStr(key, defaultValue)); }
[ "public", "String", "getStrEscaped", "(", "K", "key", ",", "String", "defaultValue", ")", "{", "return", "JSONUtil", ".", "escape", "(", "getStr", "(", "key", ",", "defaultValue", ")", ")", ";", "}" ]
获取字符串类型值,并转义不可见字符,如'\n'换行符会被转义为字符串"\n" @param key 键 @param defaultValue 默认值 @return 字符串类型值 @since 4.2.2
[ "获取字符串类型值,并转义不可见字符,如", "\\", "n", "换行符会被转义为字符串", "\\", "n" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/JSONGetter.java#L43-L45
train
Returns the string value for the given key as escaped.
[ 30522, 2270, 5164, 4152, 19168, 19464, 2094, 1006, 1047, 3145, 1010, 5164, 12398, 10175, 5657, 1007, 1063, 2709, 1046, 3385, 21823, 2140, 1012, 4019, 1006, 4152, 16344, 1006, 3145, 1010, 12398, 10175, 5657, 1007, 1007, 1025, 1065, 102, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrConfig.java
QrConfig.toHints
public HashMap<EncodeHintType, Object> toHints() { // 配置 final HashMap<EncodeHintType, Object> hints = new HashMap<>(); if (null != this.charset) { hints.put(EncodeHintType.CHARACTER_SET, charset.toString()); } if (null != this.errorCorrection) { hints.put(EncodeHintType.ERROR_CORRECTION, this.er...
java
public HashMap<EncodeHintType, Object> toHints() { // 配置 final HashMap<EncodeHintType, Object> hints = new HashMap<>(); if (null != this.charset) { hints.put(EncodeHintType.CHARACTER_SET, charset.toString()); } if (null != this.errorCorrection) { hints.put(EncodeHintType.ERROR_CORRECTION, this.er...
[ "public", "HashMap", "<", "EncodeHintType", ",", "Object", ">", "toHints", "(", ")", "{", "// 配置\r", "final", "HashMap", "<", "EncodeHintType", ",", "Object", ">", "hints", "=", "new", "HashMap", "<>", "(", ")", ";", "if", "(", "null", "!=", "this", "....
转换为Zxing的二维码配置 @return 配置
[ "转换为Zxing的二维码配置" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrConfig.java#L277-L290
train
Converts this object to a HashMap of hints.
[ 30522, 2270, 23325, 2863, 2361, 1026, 4372, 16044, 10606, 15353, 5051, 1010, 4874, 1028, 2000, 10606, 3215, 1006, 1007, 1063, 1013, 1013, 100, 100, 2345, 23325, 2863, 2361, 1026, 4372, 16044, 10606, 15353, 5051, 1010, 4874, 1028, 20385, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-mesos/src/main/java/org/apache/flink/mesos/util/MesosConfiguration.java
MesosConfiguration.logMesosConfig
public static void logMesosConfig(Logger log, MesosConfiguration config) { Map<String, String> env = System.getenv(); Protos.FrameworkInfo.Builder info = config.frameworkInfo(); log.info("--------------------------------------------------------------------------------"); log.info(" Mesos Info:"); log.info("...
java
public static void logMesosConfig(Logger log, MesosConfiguration config) { Map<String, String> env = System.getenv(); Protos.FrameworkInfo.Builder info = config.frameworkInfo(); log.info("--------------------------------------------------------------------------------"); log.info(" Mesos Info:"); log.info("...
[ "public", "static", "void", "logMesosConfig", "(", "Logger", "log", ",", "MesosConfiguration", "config", ")", "{", "Map", "<", "String", ",", "String", ">", "env", "=", "System", ".", "getenv", "(", ")", ";", "Protos", ".", "FrameworkInfo", ".", "Builder",...
A utility method to log relevant Mesos connection info.
[ "A", "utility", "method", "to", "log", "relevant", "Mesos", "connection", "info", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/util/MesosConfiguration.java#L135-L163
train
Log the Mesos configuration
[ 30522, 2270, 10763, 11675, 8833, 7834, 2891, 8663, 8873, 2290, 1006, 8833, 4590, 8833, 1010, 2033, 17063, 8663, 8873, 27390, 3370, 9530, 8873, 2290, 1007, 1063, 4949, 1026, 5164, 1010, 5164, 1028, 4372, 2615, 1027, 2291, 1012, 2131, 2368, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/TableFactoryService.java
TableFactoryService.normalizeContext
private static Map<String, String> normalizeContext(TableFactory factory) { Map<String, String> requiredContext = factory.requiredContext(); if (requiredContext == null) { throw new TableException( String.format("Required context of factory '%s' must not be null.", factory.getClass().getName())); } retur...
java
private static Map<String, String> normalizeContext(TableFactory factory) { Map<String, String> requiredContext = factory.requiredContext(); if (requiredContext == null) { throw new TableException( String.format("Required context of factory '%s' must not be null.", factory.getClass().getName())); } retur...
[ "private", "static", "Map", "<", "String", ",", "String", ">", "normalizeContext", "(", "TableFactory", "factory", ")", "{", "Map", "<", "String", ",", "String", ">", "requiredContext", "=", "factory", ".", "requiredContext", "(", ")", ";", "if", "(", "req...
Prepares the properties of a context to be used for match operations.
[ "Prepares", "the", "properties", "of", "a", "context", "to", "be", "used", "for", "match", "operations", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/TableFactoryService.java#L233-L241
train
Normalizes the context of the given table factory.
[ 30522, 2797, 10763, 4949, 1026, 5164, 1010, 5164, 1028, 3671, 4697, 8663, 18209, 1006, 2795, 21450, 4713, 1007, 1063, 4949, 1026, 5164, 1010, 5164, 1028, 3223, 8663, 18209, 1027, 4713, 1012, 3223, 8663, 18209, 1006, 1007, 1025, 2065, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/util/ResourceUtils.java
ResourceUtils.getUrls
public static List<String> getUrls(String path, ClassLoader classLoader) { if (classLoader == null) { classLoader = ClassUtils.getDefaultClassLoader(); } path = StringUtils.cleanPath(path); try { return getUrlsFromWildcardPath(path, classLoader); } catch (Exception ex) { throw new IllegalArgumentEx...
java
public static List<String> getUrls(String path, ClassLoader classLoader) { if (classLoader == null) { classLoader = ClassUtils.getDefaultClassLoader(); } path = StringUtils.cleanPath(path); try { return getUrlsFromWildcardPath(path, classLoader); } catch (Exception ex) { throw new IllegalArgumentEx...
[ "public", "static", "List", "<", "String", ">", "getUrls", "(", "String", "path", ",", "ClassLoader", "classLoader", ")", "{", "if", "(", "classLoader", "==", "null", ")", "{", "classLoader", "=", "ClassUtils", ".", "getDefaultClassLoader", "(", ")", ";", ...
Return URLs from a given source path. Source paths can be simple file locations (/some/file.java) or wildcard patterns (/some/**). Additionally the prefixes "file:", "classpath:" and "classpath*:" can be used for specific path types. @param path the source path @param classLoader the class loader or {@code null} to use...
[ "Return", "URLs", "from", "a", "given", "source", "path", ".", "Source", "paths", "can", "be", "simple", "file", "locations", "(", "/", "some", "/", "file", ".", "java", ")", "or", "wildcard", "patterns", "(", "/", "some", "/", "**", ")", ".", "Addit...
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/util/ResourceUtils.java#L68-L80
train
Gets the URLs from a path.
[ 30522, 2270, 10763, 2862, 1026, 5164, 1028, 2131, 3126, 4877, 1006, 5164, 4130, 1010, 2465, 11066, 2121, 2465, 11066, 2121, 1007, 1063, 2065, 1006, 2465, 11066, 2121, 1027, 1027, 19701, 1007, 1063, 2465, 11066, 2121, 1027, 2465, 21823, 4877...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/core/io/PostVersionedIOReadableWritable.java
PostVersionedIOReadableWritable.read
public final void read(InputStream inputStream) throws IOException { byte[] tmp = new byte[VERSIONED_IDENTIFIER.length]; inputStream.read(tmp); if (Arrays.equals(tmp, VERSIONED_IDENTIFIER)) { DataInputView inputView = new DataInputViewStreamWrapper(inputStream); super.read(inputView); read(inputView, t...
java
public final void read(InputStream inputStream) throws IOException { byte[] tmp = new byte[VERSIONED_IDENTIFIER.length]; inputStream.read(tmp); if (Arrays.equals(tmp, VERSIONED_IDENTIFIER)) { DataInputView inputView = new DataInputViewStreamWrapper(inputStream); super.read(inputView); read(inputView, t...
[ "public", "final", "void", "read", "(", "InputStream", "inputStream", ")", "throws", "IOException", "{", "byte", "[", "]", "tmp", "=", "new", "byte", "[", "VERSIONED_IDENTIFIER", ".", "length", "]", ";", "inputStream", ".", "read", "(", "tmp", ")", ";", ...
This read attempts to first identify if the input view contains the special {@link #VERSIONED_IDENTIFIER} by reading and buffering the first few bytes. If identified to be versioned, the usual version resolution read path in {@link VersionedIOReadableWritable#read(DataInputView)} is invoked. Otherwise, we "reset" the i...
[ "This", "read", "attempts", "to", "first", "identify", "if", "the", "input", "view", "contains", "the", "special", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/io/PostVersionedIOReadableWritable.java#L63-L78
train
Reads the contents of the given input stream.
[ 30522, 2270, 2345, 11675, 3191, 1006, 20407, 25379, 20407, 25379, 1007, 11618, 22834, 10288, 24422, 1063, 24880, 1031, 1033, 1056, 8737, 1027, 2047, 24880, 1031, 2544, 2098, 1035, 8909, 4765, 18095, 1012, 3091, 1033, 1025, 20407, 25379, 1012,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistryImpl.java
MetricRegistryImpl.getMetricQueryServiceGatewayRpcAddress
@Override @Nullable public String getMetricQueryServiceGatewayRpcAddress() { if (queryService != null) { return queryService.getSelfGateway(MetricQueryServiceGateway.class).getAddress(); } else { return null; } }
java
@Override @Nullable public String getMetricQueryServiceGatewayRpcAddress() { if (queryService != null) { return queryService.getSelfGateway(MetricQueryServiceGateway.class).getAddress(); } else { return null; } }
[ "@", "Override", "@", "Nullable", "public", "String", "getMetricQueryServiceGatewayRpcAddress", "(", ")", "{", "if", "(", "queryService", "!=", "null", ")", "{", "return", "queryService", ".", "getSelfGateway", "(", "MetricQueryServiceGateway", ".", "class", ")", ...
Returns the address under which the {@link MetricQueryService} is reachable. @return address of the metric query service
[ "Returns", "the", "address", "under", "which", "the", "{", "@link", "MetricQueryService", "}", "is", "reachable", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistryImpl.java#L199-L207
train
Get the address of the metric query service gateway.
[ 30522, 1030, 2058, 15637, 1030, 19701, 3085, 2270, 5164, 2131, 12589, 4226, 24769, 2121, 7903, 29107, 2618, 4576, 14536, 3540, 14141, 8303, 1006, 1007, 1063, 2065, 1006, 23032, 8043, 7903, 2063, 999, 1027, 19701, 1007, 1063, 2709, 23032, 80...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-optimizer/src/main/java/org/apache/flink/optimizer/plan/PlanNode.java
PlanNode.setBroadcastInputs
public void setBroadcastInputs(List<NamedChannel> broadcastInputs) { if (broadcastInputs != null) { this.broadcastInputs = broadcastInputs; // update the branch map for (NamedChannel nc : broadcastInputs) { PlanNode source = nc.getSource(); mergeBranchPlanMaps(branchPlan, source.branchPlan);...
java
public void setBroadcastInputs(List<NamedChannel> broadcastInputs) { if (broadcastInputs != null) { this.broadcastInputs = broadcastInputs; // update the branch map for (NamedChannel nc : broadcastInputs) { PlanNode source = nc.getSource(); mergeBranchPlanMaps(branchPlan, source.branchPlan);...
[ "public", "void", "setBroadcastInputs", "(", "List", "<", "NamedChannel", ">", "broadcastInputs", ")", "{", "if", "(", "broadcastInputs", "!=", "null", ")", "{", "this", ".", "broadcastInputs", "=", "broadcastInputs", ";", "// update the branch map", "for", "(", ...
Sets a list of all broadcast inputs attached to this node.
[ "Sets", "a", "list", "of", "all", "broadcast", "inputs", "attached", "to", "this", "node", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/plan/PlanNode.java#L341-L366
train
Sets the broadcast inputs for this rejoining.
[ 30522, 2270, 11675, 2275, 12618, 4215, 10526, 2378, 18780, 2015, 1006, 2862, 1026, 2315, 26058, 1028, 3743, 2378, 18780, 2015, 1007, 1063, 2065, 1006, 3743, 2378, 18780, 2015, 999, 1027, 19701, 1007, 1063, 2023, 1012, 3743, 2378, 18780, 201...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/exceptions/ExceptionUtil.java
ExceptionUtil.isFromOrSuppressedThrowable
public static boolean isFromOrSuppressedThrowable(Throwable throwable, Class<? extends Throwable> exceptionClass, boolean checkCause) { return convertFromOrSuppressedThrowable(throwable, exceptionClass, checkCause) != null; }
java
public static boolean isFromOrSuppressedThrowable(Throwable throwable, Class<? extends Throwable> exceptionClass, boolean checkCause) { return convertFromOrSuppressedThrowable(throwable, exceptionClass, checkCause) != null; }
[ "public", "static", "boolean", "isFromOrSuppressedThrowable", "(", "Throwable", "throwable", ",", "Class", "<", "?", "extends", "Throwable", ">", "exceptionClass", ",", "boolean", "checkCause", ")", "{", "return", "convertFromOrSuppressedThrowable", "(", "throwable", ...
判断指定异常是否来自或者包含指定异常 @param throwable 异常 @param exceptionClass 定义的引起异常的类 @param checkCause 判断cause @return true 来自或者包含 @since 4.4.1
[ "判断指定异常是否来自或者包含指定异常" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/exceptions/ExceptionUtil.java#L269-L271
train
Checks if throwable is from or suppressed exception.
[ 30522, 2270, 10763, 22017, 20898, 2003, 19699, 19506, 2869, 6279, 19811, 30524, 1006, 5466, 3085, 1010, 6453, 26266, 1010, 4638, 3540, 8557, 1007, 999, 1027, 19701, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/EncodingUtils.java
EncodingUtils.repeat
public static String repeat(final String str, final int repeat) { // Performance tuned for 2.0 (JDK1.4) if (str == null) { return null; } if (repeat <= 0) { return EMPTY; } final int inputLength = str.length(); if (repeat == 1 || inputLength == 0) { return str; } if (inputLength == 1 && repe...
java
public static String repeat(final String str, final int repeat) { // Performance tuned for 2.0 (JDK1.4) if (str == null) { return null; } if (repeat <= 0) { return EMPTY; } final int inputLength = str.length(); if (repeat == 1 || inputLength == 0) { return str; } if (inputLength == 1 && repe...
[ "public", "static", "String", "repeat", "(", "final", "String", "str", ",", "final", "int", "repeat", ")", "{", "// Performance tuned for 2.0 (JDK1.4)", "if", "(", "str", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "repeat", "<=", "0", ...
Repeat a String {@code repeat} times to form a new String. <pre> StringUtils.repeat(null, 2) = null StringUtils.repeat("", 0) = "" StringUtils.repeat("", 2) = "" StringUtils.repeat("a", 3) = "aaa" StringUtils.repeat("ab", 2) = "abab" StringUtils.repeat("a", -2) = "" </pre> @param str the String to repeat, may...
[ "Repeat", "a", "String", "{", "@code", "repeat", "}", "times", "to", "form", "a", "new", "String", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/EncodingUtils.java#L156-L193
train
Returns a string that is repeated.
[ 30522, 2270, 10763, 5164, 9377, 1006, 2345, 5164, 2358, 2099, 1010, 2345, 20014, 9377, 1007, 1063, 1013, 1013, 2836, 15757, 2005, 1016, 1012, 1014, 1006, 26219, 2243, 2487, 1012, 1018, 1007, 2065, 1006, 2358, 2099, 1027, 1027, 19701, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/util/ReflectionUtil.java
ReflectionUtil.getFullTemplateType
public static FullTypeInfo getFullTemplateType(Type type) { if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; FullTypeInfo[] templateTypeInfos = new FullTypeInfo[parameterizedType.getActualTypeArguments().length]; for (int i = 0; i < parameterizedType....
java
public static FullTypeInfo getFullTemplateType(Type type) { if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; FullTypeInfo[] templateTypeInfos = new FullTypeInfo[parameterizedType.getActualTypeArguments().length]; for (int i = 0; i < parameterizedType....
[ "public", "static", "FullTypeInfo", "getFullTemplateType", "(", "Type", "type", ")", "{", "if", "(", "type", "instanceof", "ParameterizedType", ")", "{", "ParameterizedType", "parameterizedType", "=", "(", "ParameterizedType", ")", "type", ";", "FullTypeInfo", "[", ...
Extract the full type information from the given type. @param type to be analyzed @return Full type information describing the given type
[ "Extract", "the", "full", "type", "information", "from", "the", "given", "type", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/ReflectionUtil.java#L183-L197
train
Get the full type information for a type.
[ 30522, 2270, 10763, 2440, 13874, 2378, 14876, 2131, 3993, 7096, 6633, 15725, 13874, 1006, 2828, 2828, 1007, 1063, 2065, 1006, 2828, 6013, 11253, 16381, 3550, 13874, 1007, 1063, 16381, 3550, 13874, 16381, 3550, 13874, 1027, 1006, 16381, 3550, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java
Utils.getEnvironmentVariables
public static Map<String, String> getEnvironmentVariables(String envPrefix, org.apache.flink.configuration.Configuration flinkConfiguration) { Map<String, String> result = new HashMap<>(); for (Map.Entry<String, String> entry: flinkConfiguration.toMap().entrySet()) { if (entry.getKey().startsWith(envPrefix) && ...
java
public static Map<String, String> getEnvironmentVariables(String envPrefix, org.apache.flink.configuration.Configuration flinkConfiguration) { Map<String, String> result = new HashMap<>(); for (Map.Entry<String, String> entry: flinkConfiguration.toMap().entrySet()) { if (entry.getKey().startsWith(envPrefix) && ...
[ "public", "static", "Map", "<", "String", ",", "String", ">", "getEnvironmentVariables", "(", "String", "envPrefix", ",", "org", ".", "apache", ".", "flink", ".", "configuration", ".", "Configuration", "flinkConfiguration", ")", "{", "Map", "<", "String", ",",...
Method to extract environment variables from the flinkConfiguration based on the given prefix String. @param envPrefix Prefix for the environment variables key @param flinkConfiguration The Flink config to get the environment variable defintion from
[ "Method", "to", "extract", "environment", "variables", "from", "the", "flinkConfiguration", "based", "on", "the", "given", "prefix", "String", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java#L337-L347
train
Gets the environment variables from the given configuration.
[ 30522, 2270, 10763, 4949, 1026, 5164, 1010, 5164, 1028, 2131, 2368, 21663, 2239, 3672, 10755, 19210, 2015, 1006, 5164, 4372, 2615, 28139, 8873, 2595, 1010, 8917, 1012, 15895, 1012, 13109, 19839, 1012, 9563, 1012, 9563, 13109, 19839, 8663, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateRegistry.java
KvStateRegistry.getKvStateRegistryListener
private KvStateRegistryListener getKvStateRegistryListener(JobID jobId) { // first check whether we are running the legacy code which registers // a single listener under HighAvailabilityServices.DEFAULT_JOB_ID KvStateRegistryListener listener = listeners.get(HighAvailabilityServices.DEFAULT_JOB_ID); if (liste...
java
private KvStateRegistryListener getKvStateRegistryListener(JobID jobId) { // first check whether we are running the legacy code which registers // a single listener under HighAvailabilityServices.DEFAULT_JOB_ID KvStateRegistryListener listener = listeners.get(HighAvailabilityServices.DEFAULT_JOB_ID); if (liste...
[ "private", "KvStateRegistryListener", "getKvStateRegistryListener", "(", "JobID", "jobId", ")", "{", "// first check whether we are running the legacy code which registers", "// a single listener under HighAvailabilityServices.DEFAULT_JOB_ID", "KvStateRegistryListener", "listener", "=", "l...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateRegistry.java#L169-L178
train
Get the KvStateRegistryListener for the given job id.
[ 30522, 2797, 24888, 9153, 3334, 13910, 2923, 23320, 27870, 3678, 2131, 2243, 15088, 12259, 2890, 24063, 23320, 27870, 3678, 1006, 3105, 3593, 3105, 3593, 1007, 1063, 1013, 1013, 2034, 4638, 3251, 2057, 2024, 2770, 1996, 8027, 3642, 2029, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/DeclarativeAggregateFunction.java
DeclarativeAggregateFunction.operand
public final UnresolvedReferenceExpression operand(int i) { String name = String.valueOf(i); if (getAggBufferNames().contains(name)) { throw new IllegalStateException( String.format("Agg buffer name(%s) should not same to operands.", name)); } return new UnresolvedReferenceExpression(name); }
java
public final UnresolvedReferenceExpression operand(int i) { String name = String.valueOf(i); if (getAggBufferNames().contains(name)) { throw new IllegalStateException( String.format("Agg buffer name(%s) should not same to operands.", name)); } return new UnresolvedReferenceExpression(name); }
[ "public", "final", "UnresolvedReferenceExpression", "operand", "(", "int", "i", ")", "{", "String", "name", "=", "String", ".", "valueOf", "(", "i", ")", ";", "if", "(", "getAggBufferNames", "(", ")", ".", "contains", "(", "name", ")", ")", "{", "throw",...
Arg of accumulate and retract, the input value (usually obtained from a new arrived data).
[ "Arg", "of", "accumulate", "and", "retract", "the", "input", "value", "(", "usually", "obtained", "from", "a", "new", "arrived", "data", ")", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/DeclarativeAggregateFunction.java#L134-L141
train
Returns an unresolved reference expression that has the given operand.
[ 30522, 2270, 2345, 4895, 6072, 16116, 2890, 25523, 10288, 20110, 3258, 3850, 4859, 1006, 20014, 1045, 1007, 1063, 5164, 2171, 1027, 5164, 1012, 3643, 11253, 1006, 1045, 1007, 1025, 2065, 1006, 2131, 8490, 18259, 16093, 7512, 18442, 2015, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-socket/src/main/java/cn/hutool/socket/nio/NioServer.java
NioServer.handle
private void handle(SelectionKey key) { // 有客户端接入此服务端 if (key.isAcceptable()) { // 获取通道 转化为要处理的类型 final ServerSocketChannel server = (ServerSocketChannel) key.channel(); SocketChannel socketChannel; try { // 获取连接到此服务器的客户端通道 socketChannel = server.accept(); } catch (IOException e) { ...
java
private void handle(SelectionKey key) { // 有客户端接入此服务端 if (key.isAcceptable()) { // 获取通道 转化为要处理的类型 final ServerSocketChannel server = (ServerSocketChannel) key.channel(); SocketChannel socketChannel; try { // 获取连接到此服务器的客户端通道 socketChannel = server.accept(); } catch (IOException e) { ...
[ "private", "void", "handle", "(", "SelectionKey", "key", ")", "{", "// 有客户端接入此服务端\r", "if", "(", "key", ".", "isAcceptable", "(", ")", ")", "{", "// 获取通道 转化为要处理的类型\r", "final", "ServerSocketChannel", "server", "=", "(", "ServerSocketChannel", ")", "key", ".", ...
处理SelectionKey @param key SelectionKey
[ "处理SelectionKey" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-socket/src/main/java/cn/hutool/socket/nio/NioServer.java#L97-L130
train
Handles a select key.
[ 30522, 2797, 11675, 5047, 1006, 4989, 14839, 3145, 1007, 1063, 1013, 1013, 1873, 100, 100, 100, 100, 100, 100, 100, 100, 100, 2065, 1006, 3145, 1012, 18061, 9468, 23606, 3085, 1006, 1007, 1007, 1063, 1013, 1013, 100, 100, 100, 1957, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...