repo
stringclasses
11 values
path
stringlengths
41
234
func_name
stringlengths
5
78
original_string
stringlengths
71
14.1k
language
stringclasses
1 value
code
stringlengths
71
14.1k
code_tokens
listlengths
22
2.65k
docstring
stringlengths
2
5.35k
docstring_tokens
listlengths
1
369
sha
stringclasses
11 values
url
stringlengths
129
339
partition
stringclasses
1 value
summary
stringlengths
7
175
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/EmbeddedCLIServiceClient.java
EmbeddedCLIServiceClient.getInfo
@Override public GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType getInfoType) throws HiveSQLException { return cliService.getInfo(sessionHandle, getInfoType); }
java
@Override public GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType getInfoType) throws HiveSQLException { return cliService.getInfo(sessionHandle, getInfoType); }
[ "@", "Override", "public", "GetInfoValue", "getInfo", "(", "SessionHandle", "sessionHandle", ",", "GetInfoType", "getInfoType", ")", "throws", "HiveSQLException", "{", "return", "cliService", ".", "getInfo", "(", "sessionHandle", ",", "getInfoType", ")", ";", "}" ]
/* (non-Javadoc) @see org.apache.hive.service.cli.CLIServiceClient#getInfo(org.apache.hive.service.cli.SessionHandle, java.util.List)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/EmbeddedCLIServiceClient.java#L64-L68
train
Get the value of the .
[ 30522, 1030, 2058, 15637, 2270, 2131, 2378, 14876, 10175, 5657, 2131, 2378, 14876, 1006, 5219, 11774, 2571, 5219, 11774, 2571, 1010, 2131, 2378, 14876, 13874, 2131, 2378, 14876, 13874, 1007, 11618, 26736, 2015, 4160, 2571, 2595, 24422, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/img/Img.java
Img.scale
public Img scale(float scale) { if (scale < 0) { // 自动修正负数 scale = -scale; } final BufferedImage srcImg = getValidSrcImg(); int width = NumberUtil.mul(Integer.toString(srcImg.getWidth()), Float.toString(scale)).intValue(); // 得到源图宽 int height = NumberUtil.mul(Integer.toString(srcImg.getHeight()...
java
public Img scale(float scale) { if (scale < 0) { // 自动修正负数 scale = -scale; } final BufferedImage srcImg = getValidSrcImg(); int width = NumberUtil.mul(Integer.toString(srcImg.getWidth()), Float.toString(scale)).intValue(); // 得到源图宽 int height = NumberUtil.mul(Integer.toString(srcImg.getHeight()...
[ "public", "Img", "scale", "(", "float", "scale", ")", "{", "if", "(", "scale", "<", "0", ")", "{", "// 自动修正负数\r", "scale", "=", "-", "scale", ";", "}", "final", "BufferedImage", "srcImg", "=", "getValidSrcImg", "(", ")", ";", "int", "width", "=", "Nu...
缩放图像(按比例缩放) @param scale 缩放比例。比例大于1时为放大,小于1大于0为缩小 @return this
[ "缩放图像(按比例缩放)" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/Img.java#L191-L201
train
Scale the image by the specified scale factor.
[ 30522, 2270, 10047, 2290, 4094, 1006, 14257, 4094, 1007, 1063, 2065, 1006, 4094, 1026, 1014, 1007, 1063, 1013, 1013, 100, 100, 100, 1888, 100, 100, 4094, 1027, 1011, 4094, 1025, 1065, 2345, 17698, 2098, 9581, 3351, 5034, 6895, 24798, 1027...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/JarClassLoader.java
JarClassLoader.isJarFile
private static boolean isJarFile(File file) { if (false == FileUtil.isFile(file)) { return false; } return file.getPath().toLowerCase().endsWith(".jar"); }
java
private static boolean isJarFile(File file) { if (false == FileUtil.isFile(file)) { return false; } return file.getPath().toLowerCase().endsWith(".jar"); }
[ "private", "static", "boolean", "isJarFile", "(", "File", "file", ")", "{", "if", "(", "false", "==", "FileUtil", ".", "isFile", "(", "file", ")", ")", "{", "return", "false", ";", "}", "return", "file", ".", "getPath", "(", ")", ".", "toLowerCase", ...
是否为jar文件 @param file 文件 @return 是否为jar文件 @since 4.4.2
[ "是否为jar文件" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/JarClassLoader.java#L159-L164
train
Checks if the given file is a jar file.
[ 30522, 2797, 10763, 22017, 20898, 2003, 16084, 8873, 2571, 1006, 5371, 5371, 1007, 1063, 2065, 1006, 6270, 1027, 1027, 5371, 21823, 2140, 1012, 2003, 8873, 2571, 1006, 5371, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 2709, 5371, 1012, 2131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
transport/src/main/java/io/netty/channel/PendingWriteQueue.java
PendingWriteQueue.removeAndFail
public void removeAndFail(Throwable cause) { assert ctx.executor().inEventLoop(); if (cause == null) { throw new NullPointerException("cause"); } PendingWrite write = head; if (write == null) { return; } ReferenceCountUtil.safeRelease(writ...
java
public void removeAndFail(Throwable cause) { assert ctx.executor().inEventLoop(); if (cause == null) { throw new NullPointerException("cause"); } PendingWrite write = head; if (write == null) { return; } ReferenceCountUtil.safeRelease(writ...
[ "public", "void", "removeAndFail", "(", "Throwable", "cause", ")", "{", "assert", "ctx", ".", "executor", "(", ")", ".", "inEventLoop", "(", ")", ";", "if", "(", "cause", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"cause\"", "...
Remove a pending write operation and fail it with the given {@link Throwable}. The message will be released via {@link ReferenceCountUtil#safeRelease(Object)}.
[ "Remove", "a", "pending", "write", "operation", "and", "fail", "it", "with", "the", "given", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/channel/PendingWriteQueue.java#L193-L207
train
Remove and fail the current exception.
[ 30522, 2270, 11675, 6366, 5685, 7011, 4014, 1006, 5466, 3085, 3426, 1007, 1063, 20865, 14931, 2595, 1012, 4654, 8586, 16161, 2099, 1006, 1007, 1012, 1999, 18697, 3372, 4135, 7361, 1006, 1007, 1025, 2065, 1006, 3426, 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...
looly/hutool
hutool-json/src/main/java/cn/hutool/json/JSONUtil.java
JSONUtil.getByPath
public static Object getByPath(JSON json, String expression) { return (null == json || StrUtil.isBlank(expression)) ? null : json.getByPath(expression); }
java
public static Object getByPath(JSON json, String expression) { return (null == json || StrUtil.isBlank(expression)) ? null : json.getByPath(expression); }
[ "public", "static", "Object", "getByPath", "(", "JSON", "json", ",", "String", "expression", ")", "{", "return", "(", "null", "==", "json", "||", "StrUtil", ".", "isBlank", "(", "expression", ")", ")", "?", "null", ":", "json", ".", "getByPath", "(", "...
通过表达式获取JSON中嵌套的对象<br> <ol> <li>.表达式,可以获取Bean对象中的属性(字段)值或者Map中key对应的值</li> <li>[]表达式,可以获取集合等对象中对应index的值</li> </ol> 表达式栗子: <pre> persion persion.name persons[3] person.friends[5].name </pre> @param json {@link JSON} @param expression 表达式 @return 对象 @see JSON#getByPath(String)
[ "通过表达式获取JSON中嵌套的对象<br", ">", "<ol", ">", "<li", ">", ".", "表达式,可以获取Bean对象中的属性(字段)值或者Map中key对应的值<", "/", "li", ">", "<li", ">", "[]", "表达式,可以获取集合等对象中对应index的值<", "/", "li", ">", "<", "/", "ol", ">" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/JSONUtil.java#L410-L412
train
Gets the object from a JSON object by its path.
[ 30522, 2270, 10763, 4874, 2131, 3762, 15069, 1006, 1046, 3385, 1046, 3385, 1010, 5164, 3670, 1007, 1063, 2709, 1006, 19701, 1027, 1027, 1046, 3385, 1064, 1064, 2358, 22134, 4014, 1012, 2003, 28522, 8950, 1006, 3670, 1007, 1007, 1029, 19701,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/trie/DoubleArrayTrie.java
DoubleArrayTrie.exactMatchSearch
public int exactMatchSearch(char[] keyChars, int pos, int len, int nodePos) { int result = -1; int b = base[nodePos]; int p; for (int i = pos; i < len; i++) { p = b + (int) (keyChars[i]) + 1; if (b == check[p]) b = base[p]; ...
java
public int exactMatchSearch(char[] keyChars, int pos, int len, int nodePos) { int result = -1; int b = base[nodePos]; int p; for (int i = pos; i < len; i++) { p = b + (int) (keyChars[i]) + 1; if (b == check[p]) b = base[p]; ...
[ "public", "int", "exactMatchSearch", "(", "char", "[", "]", "keyChars", ",", "int", "pos", ",", "int", "len", ",", "int", "nodePos", ")", "{", "int", "result", "=", "-", "1", ";", "int", "b", "=", "base", "[", "nodePos", "]", ";", "int", "p", ";"...
精确查询 @param keyChars 键的char数组 @param pos char数组的起始位置 @param len 键的长度 @param nodePos 开始查找的位置(本参数允许从非根节点查询) @return 查到的节点代表的value ID,负数表示不存在
[ "精确查询" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java#L746-L769
train
Exact match search.
[ 30522, 2270, 20014, 6635, 18900, 18069, 14644, 2818, 1006, 25869, 1031, 1033, 3145, 7507, 2869, 1010, 20014, 13433, 2015, 1010, 20014, 18798, 1010, 20014, 13045, 6873, 2015, 1007, 1063, 20014, 2765, 1027, 1011, 1015, 1025, 20014, 1038, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.writeAsCsv
@SuppressWarnings("unchecked") @PublicEvolving public <X extends Tuple> DataStreamSink<T> writeAsCsv( String path, WriteMode writeMode, String rowDelimiter, String fieldDelimiter) { Preconditions.checkArgument( getType().isTupleType(), "The writeAsCsv() method can only be used on data streams of t...
java
@SuppressWarnings("unchecked") @PublicEvolving public <X extends Tuple> DataStreamSink<T> writeAsCsv( String path, WriteMode writeMode, String rowDelimiter, String fieldDelimiter) { Preconditions.checkArgument( getType().isTupleType(), "The writeAsCsv() method can only be used on data streams of t...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "PublicEvolving", "public", "<", "X", "extends", "Tuple", ">", "DataStreamSink", "<", "T", ">", "writeAsCsv", "(", "String", "path", ",", "WriteMode", "writeMode", ",", "String", "rowDelimiter", ",", "St...
Writes a DataStream to the file specified by the path parameter. The writing is performed periodically every millis milliseconds. <p>For every field of an element of the DataStream the result of {@link Object#toString()} is written. This method can only be used on data streams of tuples. @param path the path pointing...
[ "Writes", "a", "DataStream", "to", "the", "file", "specified", "by", "the", "path", "parameter", ".", "The", "writing", "is", "performed", "periodically", "every", "millis", "milliseconds", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L1104-L1125
train
Writes the data stream to CSV using the specified path row delimiter and field delimiter.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 1030, 2270, 6777, 4747, 6455, 2270, 1026, 1060, 8908, 10722, 10814, 1028, 2951, 21422, 11493, 2243, 1026, 1056, 1028, 4339, 3022, 6169, 2615, 1006, 5164, 4130,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.extName
public static String extName(String fileName) { if (fileName == null) { return null; } int index = fileName.lastIndexOf(StrUtil.DOT); if (index == -1) { return StrUtil.EMPTY; } else { String ext = fileName.substring(index + 1); // 扩展名中不能包含路径相关的符号 return StrUtil.containsAny(ext, UNIX_S...
java
public static String extName(String fileName) { if (fileName == null) { return null; } int index = fileName.lastIndexOf(StrUtil.DOT); if (index == -1) { return StrUtil.EMPTY; } else { String ext = fileName.substring(index + 1); // 扩展名中不能包含路径相关的符号 return StrUtil.containsAny(ext, UNIX_S...
[ "public", "static", "String", "extName", "(", "String", "fileName", ")", "{", "if", "(", "fileName", "==", "null", ")", "{", "return", "null", ";", "}", "int", "index", "=", "fileName", ".", "lastIndexOf", "(", "StrUtil", ".", "DOT", ")", ";", "if", ...
获得文件的扩展名,扩展名不带“.” @param fileName 文件名 @return 扩展名
[ "获得文件的扩展名,扩展名不带“", ".", "”" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L1822-L1834
train
Returns the extension of the file name.
[ 30522, 2270, 10763, 5164, 4654, 2102, 18442, 1006, 5164, 5371, 18442, 1007, 1063, 2065, 1006, 5371, 18442, 1027, 1027, 19701, 1007, 1063, 2709, 19701, 1025, 1065, 20014, 5950, 1027, 5371, 18442, 1012, 2197, 22254, 10288, 11253, 1006, 2358, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/FastDateFormat.java
FastDateFormat.getDateTimeInstance
public static FastDateFormat getDateTimeInstance(final int dateStyle, final int timeStyle, final TimeZone timeZone, final Locale locale) { return cache.getDateTimeInstance(dateStyle, timeStyle, timeZone, locale); }
java
public static FastDateFormat getDateTimeInstance(final int dateStyle, final int timeStyle, final TimeZone timeZone, final Locale locale) { return cache.getDateTimeInstance(dateStyle, timeStyle, timeZone, locale); }
[ "public", "static", "FastDateFormat", "getDateTimeInstance", "(", "final", "int", "dateStyle", ",", "final", "int", "timeStyle", ",", "final", "TimeZone", "timeZone", ",", "final", "Locale", "locale", ")", "{", "return", "cache", ".", "getDateTimeInstance", "(", ...
获得 {@link FastDateFormat} 实例<br> 支持缓存 @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT @param timeZone 时区{@link TimeZone} @param locale {@link Locale} 日期地理位置 @return 本地化 {@link FastDateFormat}
[ "获得", "{", "@link", "FastDateFormat", "}", "实例<br", ">", "支持缓存" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/format/FastDateFormat.java#L260-L262
train
Gets the date time formatter instance.
[ 30522, 2270, 10763, 30524, 26897, 1006, 5246, 27983, 1010, 2335, 27983, 1010, 2051, 15975, 1010, 2334, 2063, 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, 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.buildProgram
PackagedProgram buildProgram(ProgramOptions options) throws FileNotFoundException, ProgramInvocationException { String[] programArgs = options.getProgramArgs(); String jarFilePath = options.getJarFilePath(); List<URL> classpaths = options.getClasspaths(); if (jarFilePath == null) { throw new IllegalArgument...
java
PackagedProgram buildProgram(ProgramOptions options) throws FileNotFoundException, ProgramInvocationException { String[] programArgs = options.getProgramArgs(); String jarFilePath = options.getJarFilePath(); List<URL> classpaths = options.getClasspaths(); if (jarFilePath == null) { throw new IllegalArgument...
[ "PackagedProgram", "buildProgram", "(", "ProgramOptions", "options", ")", "throws", "FileNotFoundException", ",", "ProgramInvocationException", "{", "String", "[", "]", "programArgs", "=", "options", ".", "getProgramArgs", "(", ")", ";", "String", "jarFilePath", "=", ...
Creates a Packaged program from the given command line options. @return A PackagedProgram (upon success)
[ "Creates", "a", "Packaged", "program", "from", "the", "given", "command", "line", "options", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L769-L798
train
Build a packaged program from the given options.
[ 30522, 21972, 21572, 13113, 3857, 21572, 13113, 1006, 2565, 7361, 9285, 7047, 1007, 11618, 5371, 17048, 14876, 8630, 10288, 24422, 1010, 2565, 2378, 19152, 10288, 24422, 1063, 5164, 1031, 1033, 2565, 2906, 5620, 1027, 7047, 1012, 2131, 21572,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/operators/sort/LargeRecordHandler.java
LargeRecordHandler.addRecord
@SuppressWarnings("unchecked") public long addRecord(T record) throws IOException { if (recordsOutFile == null) { if (closed) { throw new IllegalStateException("The large record handler has been closed."); } if (recordsReader != null) { throw new IllegalStateException("The handler has already s...
java
@SuppressWarnings("unchecked") public long addRecord(T record) throws IOException { if (recordsOutFile == null) { if (closed) { throw new IllegalStateException("The large record handler has been closed."); } if (recordsReader != null) { throw new IllegalStateException("The handler has already s...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "long", "addRecord", "(", "T", "record", ")", "throws", "IOException", "{", "if", "(", "recordsOutFile", "==", "null", ")", "{", "if", "(", "closed", ")", "{", "throw", "new", "IllegalStateExcepti...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/sort/LargeRecordHandler.java#L130-L219
train
Add a record to the large record handler.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 2146, 5587, 2890, 27108, 2094, 1006, 1056, 2501, 1007, 11618, 22834, 10288, 24422, 1063, 2065, 1006, 2636, 5833, 8873, 2571, 1027, 1027, 19701, 1007, 106...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-metrics/flink-metrics-datadog/src/main/java/org/apache/flink/metrics/datadog/DatadogHttpReporter.java
DatadogHttpReporter.getTagsFromMetricGroup
private List<String> getTagsFromMetricGroup(MetricGroup metricGroup) { List<String> tags = new ArrayList<>(); for (Map.Entry<String, String> entry: metricGroup.getAllVariables().entrySet()) { if (!entry.getKey().equals(HOST_VARIABLE)) { tags.add(getVariableName(entry.getKey()) + ":" + entry.getValue()); ...
java
private List<String> getTagsFromMetricGroup(MetricGroup metricGroup) { List<String> tags = new ArrayList<>(); for (Map.Entry<String, String> entry: metricGroup.getAllVariables().entrySet()) { if (!entry.getKey().equals(HOST_VARIABLE)) { tags.add(getVariableName(entry.getKey()) + ":" + entry.getValue()); ...
[ "private", "List", "<", "String", ">", "getTagsFromMetricGroup", "(", "MetricGroup", "metricGroup", ")", "{", "List", "<", "String", ">", "tags", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String",...
Get tags from MetricGroup#getAllVariables(), excluding 'host'.
[ "Get", "tags", "from", "MetricGroup#getAllVariables", "()", "excluding", "host", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-metrics/flink-metrics-datadog/src/main/java/org/apache/flink/metrics/datadog/DatadogHttpReporter.java#L176-L186
train
Get tags from metric group.
[ 30522, 2797, 2862, 1026, 5164, 1028, 2131, 15900, 22747, 21716, 12589, 17058, 1006, 12046, 17058, 12046, 17058, 1007, 1063, 2862, 1026, 5164, 1028, 22073, 1027, 2047, 9140, 9863, 1026, 1028, 1006, 1007, 1025, 2005, 1006, 4949, 1012, 4443, 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-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSerializer.java
AvroSerializer.copy
@Override public T copy(T from) { if (CONCURRENT_ACCESS_CHECK) { enterExclusiveThread(); } try { checkAvroInitialized(); return avroData.deepCopy(runtimeSchema, from); } finally { if (CONCURRENT_ACCESS_CHECK) { exitExclusiveThread(); } } }
java
@Override public T copy(T from) { if (CONCURRENT_ACCESS_CHECK) { enterExclusiveThread(); } try { checkAvroInitialized(); return avroData.deepCopy(runtimeSchema, from); } finally { if (CONCURRENT_ACCESS_CHECK) { exitExclusiveThread(); } } }
[ "@", "Override", "public", "T", "copy", "(", "T", "from", ")", "{", "if", "(", "CONCURRENT_ACCESS_CHECK", ")", "{", "enterExclusiveThread", "(", ")", ";", "}", "try", "{", "checkAvroInitialized", "(", ")", ";", "return", "avroData", ".", "deepCopy", "(", ...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSerializer.java#L234-L249
train
Copy the given object to this object.
[ 30522, 1030, 2058, 15637, 2270, 1056, 6100, 1006, 1056, 2013, 1007, 1063, 2065, 1006, 16483, 1035, 3229, 1035, 4638, 1007, 1063, 4607, 10288, 23633, 2705, 16416, 2094, 1006, 1007, 1025, 1065, 3046, 1063, 4638, 11431, 26692, 3490, 20925, 355...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/bean/copier/BeanCopier.java
BeanCopier.beanToMap
@SuppressWarnings({ "rawtypes", "unchecked" }) private void beanToMap(Object bean, Map targetMap) { final Collection<PropDesc> props = BeanUtil.getBeanDesc(bean.getClass()).getProps(); final HashSet<String> ignoreSet = (null != copyOptions.ignoreProperties) ? CollUtil.newHashSet(copyOptions.ignoreProperties) : ...
java
@SuppressWarnings({ "rawtypes", "unchecked" }) private void beanToMap(Object bean, Map targetMap) { final Collection<PropDesc> props = BeanUtil.getBeanDesc(bean.getClass()).getProps(); final HashSet<String> ignoreSet = (null != copyOptions.ignoreProperties) ? CollUtil.newHashSet(copyOptions.ignoreProperties) : ...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "private", "void", "beanToMap", "(", "Object", "bean", ",", "Map", "targetMap", ")", "{", "final", "Collection", "<", "PropDesc", ">", "props", "=", "BeanUtil", ".", "getBeanD...
对象转Map @param bean bean对象 @param targetMap 目标的Map @return Map @since 4.1.22
[ "对象转Map" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/bean/copier/BeanCopier.java#L152-L190
train
Handles the creation of a map from a bean to a map.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1063, 1000, 6315, 13874, 2015, 1000, 1010, 1000, 4895, 5403, 18141, 1000, 1065, 1007, 2797, 11675, 14068, 20389, 9331, 1006, 4874, 14068, 1010, 4949, 4539, 2863, 2361, 1007, 1063, 2345, 3074, 1026...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.isSameDay
public static boolean isSameDay(final Date date1, final Date date2) { if (date1 == null || date2 == null) { throw new IllegalArgumentException("The date must not be null"); } return isSameDay(calendar(date1), calendar(date2)); }
java
public static boolean isSameDay(final Date date1, final Date date2) { if (date1 == null || date2 == null) { throw new IllegalArgumentException("The date must not be null"); } return isSameDay(calendar(date1), calendar(date2)); }
[ "public", "static", "boolean", "isSameDay", "(", "final", "Date", "date1", ",", "final", "Date", "date2", ")", "{", "if", "(", "date1", "==", "null", "||", "date2", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The date must not...
比较两个日期是否为同一天 @param date1 日期1 @param date2 日期2 @return 是否为同一天 @since 4.1.13
[ "比较两个日期是否为同一天" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L1394-L1399
train
Checks if two dates are in the same day.
[ 30522, 2270, 10763, 22017, 20898, 26354, 14074, 10259, 1006, 2345, 3058, 3058, 2487, 1010, 2345, 3058, 3058, 2475, 1007, 1063, 2065, 1006, 3058, 2487, 1027, 1027, 19701, 1064, 1064, 3058, 2475, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 620...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/JobLeaderService.java
JobLeaderService.stop
public void stop() throws Exception { LOG.info("Stop job leader service."); if (JobLeaderService.State.STARTED == state) { for (Tuple2<LeaderRetrievalService, JobLeaderService.JobManagerLeaderListener> leaderRetrievalServiceEntry: jobLeaderServices.values()) { LeaderRetrievalService leaderRetrievalService ...
java
public void stop() throws Exception { LOG.info("Stop job leader service."); if (JobLeaderService.State.STARTED == state) { for (Tuple2<LeaderRetrievalService, JobLeaderService.JobManagerLeaderListener> leaderRetrievalServiceEntry: jobLeaderServices.values()) { LeaderRetrievalService leaderRetrievalService ...
[ "public", "void", "stop", "(", ")", "throws", "Exception", "{", "LOG", ".", "info", "(", "\"Stop job leader service.\"", ")", ";", "if", "(", "JobLeaderService", ".", "State", ".", "STARTED", "==", "state", ")", "{", "for", "(", "Tuple2", "<", "LeaderRetri...
Stop the job leader services. This implies stopping all leader retrieval services for the different jobs and their leader retrieval listeners. @throws Exception if an error occurs while stopping the service
[ "Stop", "the", "job", "leader", "services", ".", "This", "implies", "stopping", "all", "leader", "retrieval", "services", "for", "the", "different", "jobs", "and", "their", "leader", "retrieval", "listeners", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/JobLeaderService.java#L141-L158
train
Stop the job leader service.
[ 30522, 2270, 11675, 2644, 1006, 1007, 11618, 6453, 1063, 8833, 1012, 18558, 1006, 1000, 2644, 3105, 3003, 2326, 1012, 1000, 1007, 1025, 2065, 1006, 3105, 19000, 8043, 7903, 2063, 1012, 2110, 1012, 2318, 1027, 1027, 2110, 1007, 1063, 2005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-common/src/main/java/org/apache/shardingsphere/core/util/StringUtil.java
StringUtil.isBooleanValue
public static boolean isBooleanValue(final String value) { return Boolean.TRUE.toString().equalsIgnoreCase(value) || Boolean.FALSE.toString().equalsIgnoreCase(value); }
java
public static boolean isBooleanValue(final String value) { return Boolean.TRUE.toString().equalsIgnoreCase(value) || Boolean.FALSE.toString().equalsIgnoreCase(value); }
[ "public", "static", "boolean", "isBooleanValue", "(", "final", "String", "value", ")", "{", "return", "Boolean", ".", "TRUE", ".", "toString", "(", ")", ".", "equalsIgnoreCase", "(", "value", ")", "||", "Boolean", ".", "FALSE", ".", "toString", "(", ")", ...
Judge is boolean value or not. @param value to be judged string value @return is boolean value or not
[ "Judge", "is", "boolean", "value", "or", "not", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/util/StringUtil.java#L37-L39
train
Check if a string is a boolean value.
[ 30522, 2270, 10763, 22017, 20898, 2003, 5092, 9890, 2319, 10175, 5657, 1006, 2345, 5164, 3643, 1007, 1063, 2709, 22017, 20898, 1012, 2995, 1012, 2000, 3367, 4892, 1006, 1007, 1012, 19635, 23773, 5686, 18382, 1006, 3643, 1007, 1064, 1064, 22...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/internal/BaseRemoteProxy.java
BaseRemoteProxy.getNewInstance
@SuppressWarnings("unchecked") public static <T extends RemoteProxy> T getNewInstance( RegistrationRequest request, GridRegistry registry) { try { String proxyClass = request.getConfiguration().proxy; if (proxyClass == null) { log.fine("No proxy class. Using default"); proxyClass...
java
@SuppressWarnings("unchecked") public static <T extends RemoteProxy> T getNewInstance( RegistrationRequest request, GridRegistry registry) { try { String proxyClass = request.getConfiguration().proxy; if (proxyClass == null) { log.fine("No proxy class. Using default"); proxyClass...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", "extends", "RemoteProxy", ">", "T", "getNewInstance", "(", "RegistrationRequest", "request", ",", "GridRegistry", "registry", ")", "{", "try", "{", "String", "proxyClass", "=", "re...
Takes a registration request and return the RemoteProxy associated to it. It can be any class extending RemoteProxy. @param request The request @param registry The registry to use @param <T> RemoteProxy subclass @return a new instance built from the request.
[ "Takes", "a", "registration", "request", "and", "return", "the", "RemoteProxy", "associated", "to", "it", ".", "It", "can", "be", "any", "class", "extending", "RemoteProxy", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/server/src/org/openqa/grid/internal/BaseRemoteProxy.java#L361-L386
train
Get a new instance of the remote proxy class.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 10763, 1026, 1056, 8908, 6556, 21572, 18037, 1028, 1056, 2131, 2638, 10105, 12693, 3401, 1006, 8819, 2890, 15500, 5227, 1010, 8370, 2890, 24063, 2854, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.endOfQuarter
public static Calendar endOfQuarter(Calendar calendar) { calendar.set(Calendar.MONTH, calendar.get(DateField.MONTH.getValue()) / 3 * 3 + 2); calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH)); return endOfDay(calendar); }
java
public static Calendar endOfQuarter(Calendar calendar) { calendar.set(Calendar.MONTH, calendar.get(DateField.MONTH.getValue()) / 3 * 3 + 2); calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH)); return endOfDay(calendar); }
[ "public", "static", "Calendar", "endOfQuarter", "(", "Calendar", "calendar", ")", "{", "calendar", ".", "set", "(", "Calendar", ".", "MONTH", ",", "calendar", ".", "get", "(", "DateField", ".", "MONTH", ".", "getValue", "(", ")", ")", "/", "3", "*", "3...
获取某季度的结束时间 @param calendar 日期 {@link Calendar} @return {@link Calendar} @since 4.1.0
[ "获取某季度的结束时间" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L1009-L1013
train
Returns a copy of the calendar with the same fields as the given one.
[ 30522, 2270, 10763, 8094, 2203, 11253, 16211, 19418, 1006, 8094, 8094, 1007, 1063, 8094, 1012, 2275, 1006, 30524, 3204, 1012, 2131, 10175, 5657, 1006, 1007, 1007, 1013, 1017, 1008, 1017, 1009, 1016, 1007, 1025, 8094, 1012, 2275, 1006, 8094,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ExecutorUtils.java
ExecutorUtils.nonBlockingShutdown
public static CompletableFuture<Void> nonBlockingShutdown(long timeout, TimeUnit unit, ExecutorService... executorServices) { return CompletableFuture.supplyAsync( () -> { gracefulShutdown(timeout, unit, executorServices); return null; }); }
java
public static CompletableFuture<Void> nonBlockingShutdown(long timeout, TimeUnit unit, ExecutorService... executorServices) { return CompletableFuture.supplyAsync( () -> { gracefulShutdown(timeout, unit, executorServices); return null; }); }
[ "public", "static", "CompletableFuture", "<", "Void", ">", "nonBlockingShutdown", "(", "long", "timeout", ",", "TimeUnit", "unit", ",", "ExecutorService", "...", "executorServices", ")", "{", "return", "CompletableFuture", ".", "supplyAsync", "(", "(", ")", "->", ...
Shuts the given {@link ExecutorService} down in a non-blocking fashion. The shut down will be executed by a thread from the common fork-join pool. <p>The executor services will be shut down gracefully for the given timeout period. Afterwards {@link ExecutorService#shutdownNow()} will be called. @param timeout before ...
[ "Shuts", "the", "given", "{", "@link", "ExecutorService", "}", "down", "in", "a", "non", "-", "blocking", "fashion", ".", "The", "shut", "down", "will", "be", "executed", "by", "a", "thread", "from", "the", "common", "fork", "-", "join", "pool", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/ExecutorUtils.java#L91-L97
train
Non - blocking shutdown.
[ 30522, 2270, 10763, 4012, 10814, 10880, 11263, 11244, 1026, 11675, 1028, 2512, 23467, 8613, 6979, 2102, 7698, 1006, 2146, 2051, 5833, 1010, 2051, 19496, 2102, 3131, 1010, 4654, 8586, 16161, 22573, 2099, 7903, 2063, 1012, 1012, 1012, 4654, 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-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/SetOperationFactory.java
SetOperationFactory.create
public TableOperation create( SetTableOperationType type, TableOperation left, TableOperation right, boolean all) { failIfStreaming(type, all); validateSetOperation(type, left, right); return new SetTableOperation(left, right, type, all); }
java
public TableOperation create( SetTableOperationType type, TableOperation left, TableOperation right, boolean all) { failIfStreaming(type, all); validateSetOperation(type, left, right); return new SetTableOperation(left, right, type, all); }
[ "public", "TableOperation", "create", "(", "SetTableOperationType", "type", ",", "TableOperation", "left", ",", "TableOperation", "right", ",", "boolean", "all", ")", "{", "failIfStreaming", "(", "type", ",", "all", ")", ";", "validateSetOperation", "(", "type", ...
Creates a valid algebraic operation. @param type type of operation to create @param left first relational operation of the operation @param right second relational operation of the operation @param all flag defining how duplicates should be handled @return creates a valid algebraic operation
[ "Creates", "a", "valid", "algebraic", "operation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/SetOperationFactory.java#L53-L61
train
Creates a new Set TableOperation.
[ 30522, 2270, 2795, 25918, 3370, 3443, 1006, 2275, 10880, 25918, 3370, 13874, 2828, 1010, 2795, 25918, 3370, 2187, 1010, 2795, 25918, 3370, 2157, 1010, 22017, 20898, 2035, 1007, 1063, 8246, 10128, 21422, 2075, 1006, 2828, 1010, 2035, 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-crypto/src/main/java/cn/hutool/crypto/symmetric/RC4.java
RC4.setKey
public void setKey(String key) throws CryptoException { final int length = key.length(); if (length < KEY_MIN_LENGTH || length >= SBOX_LENGTH) { throw new CryptoException("Key length has to be between {} and {}", KEY_MIN_LENGTH, (SBOX_LENGTH - 1)); } final WriteLock writeLock = this.lock.writeLock(); ...
java
public void setKey(String key) throws CryptoException { final int length = key.length(); if (length < KEY_MIN_LENGTH || length >= SBOX_LENGTH) { throw new CryptoException("Key length has to be between {} and {}", KEY_MIN_LENGTH, (SBOX_LENGTH - 1)); } final WriteLock writeLock = this.lock.writeLock(); ...
[ "public", "void", "setKey", "(", "String", "key", ")", "throws", "CryptoException", "{", "final", "int", "length", "=", "key", ".", "length", "(", ")", ";", "if", "(", "length", "<", "KEY_MIN_LENGTH", "||", "length", ">=", "SBOX_LENGTH", ")", "{", "throw...
设置密钥 @param key 密钥 @throws CryptoException key长度小于5或者大于255抛出此异常
[ "设置密钥" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/symmetric/RC4.java#L121-L135
train
Sets the key of the object.
[ 30522, 2270, 11675, 2275, 14839, 1006, 5164, 3145, 1007, 11618, 19888, 8913, 2595, 24422, 1063, 2345, 20014, 3091, 1027, 3145, 1012, 3091, 1006, 1007, 1025, 2065, 1006, 3091, 1026, 3145, 1035, 8117, 1035, 3091, 1064, 1064, 3091, 1028, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/operators/hash/MutableHashTable.java
MutableHashTable.clearPartitions
protected void clearPartitions() { for (int i = this.partitionsBeingBuilt.size() - 1; i >= 0; --i) { final HashPartition<BT, PT> p = this.partitionsBeingBuilt.get(i); try { p.clearAllMemory(this.availableMemory); } catch (Exception e) { LOG.error("Error during partition cleanup.", e); } } this...
java
protected void clearPartitions() { for (int i = this.partitionsBeingBuilt.size() - 1; i >= 0; --i) { final HashPartition<BT, PT> p = this.partitionsBeingBuilt.get(i); try { p.clearAllMemory(this.availableMemory); } catch (Exception e) { LOG.error("Error during partition cleanup.", e); } } this...
[ "protected", "void", "clearPartitions", "(", ")", "{", "for", "(", "int", "i", "=", "this", ".", "partitionsBeingBuilt", ".", "size", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "--", "i", ")", "{", "final", "HashPartition", "<", "BT", ",", "PT",...
This method clears all partitions currently residing (partially) in memory. It releases all memory and deletes all spilled partitions. <p> This method is intended for a hard cleanup in the case that the join is aborted.
[ "This", "method", "clears", "all", "partitions", "currently", "residing", "(", "partially", ")", "in", "memory", ".", "It", "releases", "all", "memory", "and", "deletes", "all", "spilled", "partitions", ".", "<p", ">", "This", "method", "is", "intended", "fo...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/MutableHashTable.java#L1139-L1149
train
Clear all partitions.
[ 30522, 5123, 11675, 3154, 19362, 3775, 9285, 1006, 1007, 1063, 2005, 1006, 20014, 1045, 1027, 2023, 1012, 13571, 19022, 12377, 18259, 19231, 2102, 1012, 2946, 1006, 1007, 1011, 1015, 1025, 1045, 1028, 1027, 1014, 1025, 1011, 1011, 1045, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java
ZipUtil.unGzip
public static byte[] unGzip(InputStream in, int length) throws UtilException { GZIPInputStream gzi = null; FastByteArrayOutputStream bos = null; try { gzi = (in instanceof GZIPInputStream) ? (GZIPInputStream)in : new GZIPInputStream(in); bos = new FastByteArrayOutputStream(length); IoUtil.copy(gzi,...
java
public static byte[] unGzip(InputStream in, int length) throws UtilException { GZIPInputStream gzi = null; FastByteArrayOutputStream bos = null; try { gzi = (in instanceof GZIPInputStream) ? (GZIPInputStream)in : new GZIPInputStream(in); bos = new FastByteArrayOutputStream(length); IoUtil.copy(gzi,...
[ "public", "static", "byte", "[", "]", "unGzip", "(", "InputStream", "in", ",", "int", "length", ")", "throws", "UtilException", "{", "GZIPInputStream", "gzi", "=", "null", ";", "FastByteArrayOutputStream", "bos", "=", "null", ";", "try", "{", "gzi", "=", "...
Gzip解压处理 @param in Gzip数据 @param length 估算长度,如果无法确定请传入{@link #DEFAULT_BYTE_ARRAY_LENGTH} @return 解压后的数据 @throws UtilException IO异常 @since 4.1.18
[ "Gzip解压处理" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java#L602-L616
train
UnGzip a stream.
[ 30522, 2270, 10763, 24880, 1031, 1033, 4895, 2290, 5831, 2361, 1006, 20407, 25379, 1999, 1010, 20014, 3091, 1007, 11618, 21183, 9463, 2595, 24422, 1063, 1043, 5831, 8091, 18780, 21422, 1043, 5831, 1027, 19701, 1025, 3435, 3762, 27058, 11335, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/WindowedStream.java
WindowedStream.reduce
@SuppressWarnings("unchecked") public SingleOutputStreamOperator<T> reduce(ReduceFunction<T> function) { if (function instanceof RichFunction) { throw new UnsupportedOperationException("ReduceFunction of reduce can not be a RichFunction. " + "Please use reduce(ReduceFunction, WindowFunction) instead."); } ...
java
@SuppressWarnings("unchecked") public SingleOutputStreamOperator<T> reduce(ReduceFunction<T> function) { if (function instanceof RichFunction) { throw new UnsupportedOperationException("ReduceFunction of reduce can not be a RichFunction. " + "Please use reduce(ReduceFunction, WindowFunction) instead."); } ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "SingleOutputStreamOperator", "<", "T", ">", "reduce", "(", "ReduceFunction", "<", "T", ">", "function", ")", "{", "if", "(", "function", "instanceof", "RichFunction", ")", "{", "throw", "new", "Uns...
Applies a reduce function to the window. The window function is called for each evaluation of the window for each key individually. The output of the reduce function is interpreted as a regular non-windowed stream. <p>This window will try and incrementally aggregate data as much as the window policies permit. For exam...
[ "Applies", "a", "reduce", "function", "to", "the", "window", ".", "The", "window", "function", "is", "called", "for", "each", "evaluation", "of", "the", "window", "for", "each", "key", "individually", ".", "The", "output", "of", "the", "reduce", "function", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/WindowedStream.java#L218-L228
train
Returns a new window - based reduce operation.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 2309, 5833, 18780, 21422, 25918, 8844, 1026, 1056, 1028, 5547, 1006, 5547, 11263, 27989, 1026, 1056, 1028, 3853, 1007, 1063, 2065, 1006, 3853, 6013, 1125...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/descriptors/DescriptorProperties.java
DescriptorProperties.putProperties
public void putProperties(Map<String, String> properties) { for (Map.Entry<String, String> property : properties.entrySet()) { put(property.getKey(), property.getValue()); } }
java
public void putProperties(Map<String, String> properties) { for (Map.Entry<String, String> property : properties.entrySet()) { put(property.getKey(), property.getValue()); } }
[ "public", "void", "putProperties", "(", "Map", "<", "String", ",", "String", ">", "properties", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "property", ":", "properties", ".", "entrySet", "(", ")", ")", "{", "put", "...
Adds a set of properties.
[ "Adds", "a", "set", "of", "properties", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/DescriptorProperties.java#L91-L95
train
Put properties into the properties map.
[ 30522, 2270, 11675, 2404, 21572, 4842, 7368, 1006, 4949, 1026, 5164, 1010, 5164, 1028, 5144, 1007, 1063, 2005, 1006, 4949, 1012, 4443, 1026, 5164, 1010, 5164, 1028, 3200, 1024, 5144, 1012, 4443, 13462, 1006, 1007, 1007, 1063, 2404, 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-core/src/main/java/cn/hutool/core/lang/ClassScaner.java
ClassScaner.scanFile
private void scanFile(File file, String rootDir) { if (file.isFile()) { final String fileName = file.getAbsolutePath(); if (fileName.endsWith(FileUtil.CLASS_EXT)) { final String className = fileName// // 8为classes长度,fileName.length() - 6为".class"的长度 .substring(rootDir.length(), fileName.le...
java
private void scanFile(File file, String rootDir) { if (file.isFile()) { final String fileName = file.getAbsolutePath(); if (fileName.endsWith(FileUtil.CLASS_EXT)) { final String className = fileName// // 8为classes长度,fileName.length() - 6为".class"的长度 .substring(rootDir.length(), fileName.le...
[ "private", "void", "scanFile", "(", "File", "file", ",", "String", "rootDir", ")", "{", "if", "(", "file", ".", "isFile", "(", ")", ")", "{", "final", "String", "fileName", "=", "file", ".", "getAbsolutePath", "(", ")", ";", "if", "(", "fileName", "....
扫描文件或目录中的类 @param file 文件或目录 @param rootDir 包名对应classpath绝对路径
[ "扫描文件或目录中的类" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/ClassScaner.java#L213-L235
train
Scans a file and its subdirectories.
[ 30522, 2797, 11675, 13594, 8873, 2571, 1006, 5371, 5371, 1010, 5164, 7117, 4305, 2099, 1007, 1063, 2065, 1006, 5371, 1012, 2003, 8873, 2571, 1006, 1007, 1007, 1063, 2345, 5164, 5371, 18442, 1027, 5371, 1012, 2131, 7875, 19454, 10421, 15069,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/AbsSetting.java
AbsSetting.getStr
public String getStr(String key, String group, String defaultValue) { final String value = getByGroup(key, group); if (StrUtil.isBlank(value)) { return defaultValue; } return value; }
java
public String getStr(String key, String group, String defaultValue) { final String value = getByGroup(key, group); if (StrUtil.isBlank(value)) { return defaultValue; } return value; }
[ "public", "String", "getStr", "(", "String", "key", ",", "String", "group", ",", "String", "defaultValue", ")", "{", "final", "String", "value", "=", "getByGroup", "(", "key", ",", "group", ")", ";", "if", "(", "StrUtil", ".", "isBlank", "(", "value", ...
获得字符串类型值 @param key KEY @param group 分组 @param defaultValue 默认值 @return 值或默认值
[ "获得字符串类型值" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/AbsSetting.java#L43-L49
train
Gets the value of a group property.
[ 30522, 2270, 5164, 4152, 16344, 1006, 5164, 3145, 1010, 5164, 2177, 1010, 5164, 12398, 10175, 5657, 1007, 1063, 2345, 5164, 3643, 1027, 2131, 3762, 17058, 1006, 3145, 1010, 2177, 1007, 1025, 2065, 1006, 2358, 22134, 4014, 1012, 2003, 28522,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/JSONStringer.java
JSONStringer.value
public JSONStringer value(Object value) throws JSONException { if (this.stack.isEmpty()) { throw new JSONException("Nesting problem"); } if (value instanceof JSONArray) { ((JSONArray) value).writeTo(this); return this; } else if (value instanceof JSONObject) { ((JSONObject) value).writeTo(this);...
java
public JSONStringer value(Object value) throws JSONException { if (this.stack.isEmpty()) { throw new JSONException("Nesting problem"); } if (value instanceof JSONArray) { ((JSONArray) value).writeTo(this); return this; } else if (value instanceof JSONObject) { ((JSONObject) value).writeTo(this);...
[ "public", "JSONStringer", "value", "(", "Object", "value", ")", "throws", "JSONException", "{", "if", "(", "this", ".", "stack", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "JSONException", "(", "\"Nesting problem\"", ")", ";", "}", "if", "(", "v...
Encodes {@code value}. @param value a {@link JSONObject}, {@link JSONArray}, String, Boolean, Integer, Long, Double or null. May not be {@link Double#isNaN() NaNs} or {@link Double#isInfinite() infinities}. @return this stringer. @throws JSONException if processing of json failed
[ "Encodes", "{" ]
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/JSONStringer.java#L237-L267
train
Write a value to this stringer.
[ 30522, 2270, 1046, 23345, 18886, 11392, 3643, 1006, 4874, 3643, 1007, 11618, 1046, 3385, 10288, 24422, 1063, 2065, 1006, 2023, 1012, 9991, 1012, 2003, 6633, 13876, 2100, 1006, 1007, 1007, 1063, 5466, 2047, 1046, 3385, 10288, 24422, 1006, 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-captcha/src/main/java/cn/hutool/captcha/LineCaptcha.java
LineCaptcha.drawString
private void drawString(Graphics2D g, String code) { // 抗锯齿 g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // 创建字体 g.setFont(this.font); // 文字 int minY = GraphicsUtil.getMinY(g); if(minY < 0) { minY = this.height -1; } final int len = this.ge...
java
private void drawString(Graphics2D g, String code) { // 抗锯齿 g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // 创建字体 g.setFont(this.font); // 文字 int minY = GraphicsUtil.getMinY(g); if(minY < 0) { minY = this.height -1; } final int len = this.ge...
[ "private", "void", "drawString", "(", "Graphics2D", "g", ",", "String", "code", ")", "{", "// 抗锯齿\r", "g", ".", "setRenderingHint", "(", "RenderingHints", ".", "KEY_ANTIALIASING", ",", "RenderingHints", ".", "VALUE_ANTIALIAS_ON", ")", ";", "// 创建字体\r", "g", ".",...
绘制字符串 @param g {@link Graphics2D}画笔 @param random 随机对象 @param code 验证码
[ "绘制字符串" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-captcha/src/main/java/cn/hutool/captcha/LineCaptcha.java#L71-L90
train
Draw a string.
[ 30522, 2797, 11675, 9891, 18886, 3070, 1006, 8389, 2475, 2094, 1043, 1010, 5164, 3642, 1007, 1063, 1013, 1013, 100, 100, 100, 1043, 1012, 2275, 7389, 4063, 2075, 10606, 2102, 1006, 14259, 10606, 3215, 1012, 3145, 1035, 3424, 22786, 7741, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/SQLBuilder.java
SQLBuilder.appendPlaceholder
public void appendPlaceholder(final ShardingPlaceholder shardingPlaceholder) { segments.add(shardingPlaceholder); currentSegment = new StringBuilder(); segments.add(currentSegment); }
java
public void appendPlaceholder(final ShardingPlaceholder shardingPlaceholder) { segments.add(shardingPlaceholder); currentSegment = new StringBuilder(); segments.add(currentSegment); }
[ "public", "void", "appendPlaceholder", "(", "final", "ShardingPlaceholder", "shardingPlaceholder", ")", "{", "segments", ".", "add", "(", "shardingPlaceholder", ")", ";", "currentSegment", "=", "new", "StringBuilder", "(", ")", ";", "segments", ".", "add", "(", ...
Append sharding placeholder. @param shardingPlaceholder sharding placeholder
[ "Append", "sharding", "placeholder", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/SQLBuilder.java#L84-L88
train
Append sharding placeholder.
[ 30522, 2270, 11675, 10439, 10497, 24759, 10732, 14528, 1006, 2345, 21146, 17080, 3070, 24759, 10732, 14528, 21146, 17080, 3070, 24759, 10732, 14528, 1007, 1063, 9214, 1012, 5587, 1006, 21146, 17080, 3070, 24759, 10732, 14528, 1007, 1025, 14731,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/descriptors/Statistics.java
Statistics.columnMaxLength
public Statistics columnMaxLength(String columnName, Integer maxLen) { this.columnStats .computeIfAbsent(columnName, column -> new HashMap<>()) .put(MAX_LENGTH, String.valueOf(maxLen)); return this; }
java
public Statistics columnMaxLength(String columnName, Integer maxLen) { this.columnStats .computeIfAbsent(columnName, column -> new HashMap<>()) .put(MAX_LENGTH, String.valueOf(maxLen)); return this; }
[ "public", "Statistics", "columnMaxLength", "(", "String", "columnName", ",", "Integer", "maxLen", ")", "{", "this", ".", "columnStats", ".", "computeIfAbsent", "(", "columnName", ",", "column", "->", "new", "HashMap", "<>", "(", ")", ")", ".", "put", "(", ...
Sets the maximum length statistic for the given column.
[ "Sets", "the", "maximum", "length", "statistic", "for", "the", "given", "column", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Statistics.java#L121-L126
train
Sets the maximum length of a column.
[ 30522, 2270, 6747, 5930, 17848, 7770, 13512, 2232, 1006, 5164, 5930, 18442, 1010, 16109, 4098, 7770, 1007, 1063, 2023, 1012, 7753, 29336, 2015, 1012, 24134, 10128, 7875, 5054, 2102, 1006, 5930, 18442, 1010, 5930, 1011, 1028, 2047, 23325, 28...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.getMethods
public static Method[] getMethods(Class<?> clazz, Filter<Method> filter) throws SecurityException { if (null == clazz) { return null; } return ArrayUtil.filter(getMethods(clazz), filter); }
java
public static Method[] getMethods(Class<?> clazz, Filter<Method> filter) throws SecurityException { if (null == clazz) { return null; } return ArrayUtil.filter(getMethods(clazz), filter); }
[ "public", "static", "Method", "[", "]", "getMethods", "(", "Class", "<", "?", ">", "clazz", ",", "Filter", "<", "Method", ">", "filter", ")", "throws", "SecurityException", "{", "if", "(", "null", "==", "clazz", ")", "{", "return", "null", ";", "}", ...
获得指定类过滤后的Public方法列表 @param clazz 查找方法的类 @param filter 过滤器 @return 过滤后的方法列表 @throws SecurityException 安全异常
[ "获得指定类过滤后的Public方法列表" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L557-L562
train
Returns an array of methods from the specified class that match the specified filter.
[ 30522, 2270, 10763, 4118, 1031, 1033, 2131, 11368, 6806, 5104, 1006, 2465, 1026, 1029, 1028, 18856, 10936, 2480, 1010, 11307, 1026, 4118, 1028, 11307, 1007, 11618, 3036, 10288, 24422, 1063, 2065, 1006, 19701, 1027, 1027, 18856, 10936, 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...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java
TaskSlotTable.getTask
public Task getTask(ExecutionAttemptID executionAttemptID) { TaskSlotMapping taskSlotMapping = taskSlotMappings.get(executionAttemptID); if (taskSlotMapping != null) { return taskSlotMapping.getTask(); } else { return null; } }
java
public Task getTask(ExecutionAttemptID executionAttemptID) { TaskSlotMapping taskSlotMapping = taskSlotMappings.get(executionAttemptID); if (taskSlotMapping != null) { return taskSlotMapping.getTask(); } else { return null; } }
[ "public", "Task", "getTask", "(", "ExecutionAttemptID", "executionAttemptID", ")", "{", "TaskSlotMapping", "taskSlotMapping", "=", "taskSlotMappings", ".", "get", "(", "executionAttemptID", ")", ";", "if", "(", "taskSlotMapping", "!=", "null", ")", "{", "return", ...
Get the task for the given execution attempt id. If none could be found, then return null. @param executionAttemptID identifying the requested task @return The task for the given execution attempt id if it exist; otherwise null
[ "Get", "the", "task", "for", "the", "given", "execution", "attempt", "id", ".", "If", "none", "could", "be", "found", "then", "return", "null", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java#L528-L536
train
Get the Task for the given execution attempt ID.
[ 30522, 2270, 4708, 2131, 10230, 2243, 1006, 7781, 19321, 6633, 13876, 3593, 7781, 19321, 6633, 13876, 3593, 1007, 1063, 8518, 10994, 2863, 14853, 8518, 10994, 2863, 14853, 1027, 8518, 10994, 2863, 14853, 2015, 1012, 2131, 1006, 7781, 19321, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/network-common/src/main/java/org/apache/spark/network/util/JavaUtils.java
JavaUtils.bytesToString
public static String bytesToString(ByteBuffer b) { return Unpooled.wrappedBuffer(b).toString(StandardCharsets.UTF_8); }
java
public static String bytesToString(ByteBuffer b) { return Unpooled.wrappedBuffer(b).toString(StandardCharsets.UTF_8); }
[ "public", "static", "String", "bytesToString", "(", "ByteBuffer", "b", ")", "{", "return", "Unpooled", ".", "wrappedBuffer", "(", "b", ")", ".", "toString", "(", "StandardCharsets", ".", "UTF_8", ")", ";", "}" ]
Convert the given byte buffer to a string. The resulting string can be converted back to the same byte buffer through {@link #stringToBytes(String)}.
[ "Convert", "the", "given", "byte", "buffer", "to", "a", "string", ".", "The", "resulting", "string", "can", "be", "converted", "back", "to", "the", "same", "byte", "buffer", "through", "{" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-common/src/main/java/org/apache/spark/network/util/JavaUtils.java#L79-L81
train
Convert a ByteBuffer to a String.
[ 30522, 2270, 10763, 5164, 27507, 13122, 18886, 3070, 1006, 24880, 8569, 12494, 1038, 1007, 1063, 2709, 4895, 16869, 2098, 1012, 5058, 8569, 12494, 1006, 1038, 1007, 1012, 2000, 3367, 4892, 1006, 3115, 7507, 22573, 3215, 1012, 21183, 2546, 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-setting/src/main/java/cn/hutool/setting/AbsSetting.java
AbsSetting.getDouble
public Double getDouble(String key, String group) { return getDouble(key, group, null); }
java
public Double getDouble(String key, String group) { return getDouble(key, group, null); }
[ "public", "Double", "getDouble", "(", "String", "key", ",", "String", "group", ")", "{", "return", "getDouble", "(", "key", ",", "group", ",", "null", ")", ";", "}" ]
获取double类型属性值 @param key 属性名 @param group 分组名 @return 属性值
[ "获取double类型属性值" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/AbsSetting.java#L240-L242
train
Retrieves the Double value associated with the given key from the database. If the key does not exist or the group does not exist or the value is null the method returns null.
[ 30522, 2270, 3313, 2131, 26797, 3468, 1006, 5164, 3145, 1010, 5164, 2177, 1007, 1063, 2709, 2131, 26797, 3468, 1006, 3145, 1010, 2177, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/codegen/UnsafeRowWriter.java
UnsafeRowWriter.zeroOutNullBytes
public void zeroOutNullBytes() { for (int i = 0; i < nullBitsSize; i += 8) { Platform.putLong(getBuffer(), startingOffset + i, 0L); } }
java
public void zeroOutNullBytes() { for (int i = 0; i < nullBitsSize; i += 8) { Platform.putLong(getBuffer(), startingOffset + i, 0L); } }
[ "public", "void", "zeroOutNullBytes", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nullBitsSize", ";", "i", "+=", "8", ")", "{", "Platform", ".", "putLong", "(", "getBuffer", "(", ")", ",", "startingOffset", "+", "i", ",", "0L",...
Clears out null bits. This should be called before we write a new row to row buffer.
[ "Clears", "out", "null", "bits", ".", "This", "should", "be", "called", "before", "we", "write", "a", "new", "row", "to", "row", "buffer", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/codegen/UnsafeRowWriter.java#L99-L103
train
Zero out null bytes.
[ 30522, 2270, 11675, 5717, 5833, 11231, 3363, 3762, 4570, 1006, 1007, 1063, 2005, 1006, 20014, 1045, 1027, 1014, 1025, 1045, 1026, 19701, 16313, 18719, 4371, 1025, 1045, 1009, 1027, 1022, 1007, 1063, 4132, 1012, 2404, 10052, 1006, 2131, 8569...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-java/src/main/java/org/apache/flink/api/java/DataSet.java
DataSet.fullOuterJoin
public <R> JoinOperatorSetsBase<T, R> fullOuterJoin(DataSet<R> other, JoinHint strategy) { switch(strategy) { case OPTIMIZER_CHOOSES: case REPARTITION_SORT_MERGE: case REPARTITION_HASH_FIRST: case REPARTITION_HASH_SECOND: return new JoinOperatorSetsBase<>(this, other, strategy, JoinType.FULL_OUTER); ...
java
public <R> JoinOperatorSetsBase<T, R> fullOuterJoin(DataSet<R> other, JoinHint strategy) { switch(strategy) { case OPTIMIZER_CHOOSES: case REPARTITION_SORT_MERGE: case REPARTITION_HASH_FIRST: case REPARTITION_HASH_SECOND: return new JoinOperatorSetsBase<>(this, other, strategy, JoinType.FULL_OUTER); ...
[ "public", "<", "R", ">", "JoinOperatorSetsBase", "<", "T", ",", "R", ">", "fullOuterJoin", "(", "DataSet", "<", "R", ">", "other", ",", "JoinHint", "strategy", ")", "{", "switch", "(", "strategy", ")", "{", "case", "OPTIMIZER_CHOOSES", ":", "case", "REPA...
Initiates a Full Outer Join transformation. <p>An Outer Join transformation joins two elements of two {@link DataSet DataSets} on key equality and provides multiple ways to combine joining elements into one DataSet. <p>Elements of <b>both</b> DataSets that do not have a matching element on the opposing side are joine...
[ "Initiates", "a", "Full", "Outer", "Join", "transformation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L971-L981
train
Create a full outer join of this DataSet with the specified JoinHint.
[ 30522, 2270, 1026, 1054, 1028, 3693, 25918, 18926, 8454, 15058, 1026, 1056, 1010, 1054, 1028, 2440, 5833, 2121, 5558, 2378, 1006, 2951, 13462, 1026, 1054, 1028, 2060, 1010, 3693, 10606, 2102, 5656, 1007, 1063, 6942, 1006, 5656, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/metrics/RestartTimeGauge.java
RestartTimeGauge.getValue
@Override public Long getValue() { final JobStatus status = eg.getState(); final long restartingTimestamp = eg.getStatusTimestamp(JobStatus.RESTARTING); final long switchToRunningTimestamp; final long lastRestartTime; if (restartingTimestamp <= 0) { // we haven't yet restarted our job return 0L; }...
java
@Override public Long getValue() { final JobStatus status = eg.getState(); final long restartingTimestamp = eg.getStatusTimestamp(JobStatus.RESTARTING); final long switchToRunningTimestamp; final long lastRestartTime; if (restartingTimestamp <= 0) { // we haven't yet restarted our job return 0L; }...
[ "@", "Override", "public", "Long", "getValue", "(", ")", "{", "final", "JobStatus", "status", "=", "eg", ".", "getState", "(", ")", ";", "final", "long", "restartingTimestamp", "=", "eg", ".", "getStatusTimestamp", "(", "JobStatus", ".", "RESTARTING", ")", ...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/metrics/RestartTimeGauge.java#L50-L79
train
Returns the value of the last restart time.
[ 30522, 1030, 2058, 15637, 2270, 2146, 2131, 10175, 5657, 1006, 1007, 1063, 2345, 5841, 29336, 2271, 3570, 1027, 1041, 2290, 1012, 4152, 12259, 1006, 1007, 1025, 2345, 2146, 23818, 2075, 7292, 9153, 8737, 1027, 1041, 2290, 1012, 4152, 29336,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/net/NetUtil.java
NetUtil.buildInetSocketAddress
public static InetSocketAddress buildInetSocketAddress(String host, int defaultPort) { if (StrUtil.isBlank(host)) { host = LOCAL_IP; } String destHost = null; int port = 0; int index = host.indexOf(":"); if (index != -1) { // host:port形式 destHost = host.substring(0, index); port = In...
java
public static InetSocketAddress buildInetSocketAddress(String host, int defaultPort) { if (StrUtil.isBlank(host)) { host = LOCAL_IP; } String destHost = null; int port = 0; int index = host.indexOf(":"); if (index != -1) { // host:port形式 destHost = host.substring(0, index); port = In...
[ "public", "static", "InetSocketAddress", "buildInetSocketAddress", "(", "String", "host", ",", "int", "defaultPort", ")", "{", "if", "(", "StrUtil", ".", "isBlank", "(", "host", ")", ")", "{", "host", "=", "LOCAL_IP", ";", "}", "String", "destHost", "=", "...
构建InetSocketAddress<br> 当host中包含端口时(用“:”隔开),使用host中的端口,否则使用默认端口<br> 给定host为空时使用本地host(127.0.0.1) @param host Host @param defaultPort 默认端口 @return InetSocketAddress
[ "构建InetSocketAddress<br", ">", "当host中包含端口时(用“:”隔开),使用host中的端口,否则使用默认端口<br", ">", "给定host为空时使用本地host(127", ".", "0", ".", "0", ".", "1)" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/net/NetUtil.java#L259-L277
train
Build an InetSocketAddress from a string of host and port.
[ 30522, 2270, 10763, 1999, 8454, 7432, 12928, 14141, 8303, 3857, 3170, 3215, 7432, 12928, 14141, 8303, 1006, 5164, 3677, 1010, 20014, 12398, 6442, 1007, 1063, 2065, 1006, 2358, 22134, 4014, 1012, 2003, 28522, 8950, 1006, 3677, 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...
alibaba/canal
client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/support/SyncUtil.java
SyncUtil.setPStmt
public static void setPStmt(int type, PreparedStatement pstmt, Object value, int i) throws SQLException { switch (type) { case Types.BIT: case Types.BOOLEAN: if (value instanceof Boolean) { pstmt.setBoolean(i, (Boolean) value); } else i...
java
public static void setPStmt(int type, PreparedStatement pstmt, Object value, int i) throws SQLException { switch (type) { case Types.BIT: case Types.BOOLEAN: if (value instanceof Boolean) { pstmt.setBoolean(i, (Boolean) value); } else i...
[ "public", "static", "void", "setPStmt", "(", "int", "type", ",", "PreparedStatement", "pstmt", ",", "Object", "value", ",", "int", "i", ")", "throws", "SQLException", "{", "switch", "(", "type", ")", "{", "case", "Types", ".", "BIT", ":", "case", "Types"...
设置 preparedStatement @param type sqlType @param pstmt 需要设置的preparedStatement @param value 值 @param i 索引号
[ "设置", "preparedStatement" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/support/SyncUtil.java#L67-L259
train
Method setPStmt.
[ 30522, 2270, 10763, 11675, 2275, 4523, 21246, 2102, 1006, 20014, 2828, 1010, 4810, 9153, 18532, 4765, 8827, 21246, 2102, 1010, 4874, 3643, 1010, 20014, 1045, 1007, 11618, 29296, 10288, 24422, 1063, 6942, 1006, 2828, 1007, 1063, 2553, 4127, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-db/src/main/java/cn/hutool/db/nosql/mongo/MongoDS.java
MongoDS.createServerAddress
private ServerAddress createServerAddress(String group) { final Setting setting = checkSetting(); if (group == null) { group = StrUtil.EMPTY; } final String tmpHost = setting.getByGroup("host", group); if (StrUtil.isBlank(tmpHost)) { throw new NotInitedException("Host name is empy of group: {...
java
private ServerAddress createServerAddress(String group) { final Setting setting = checkSetting(); if (group == null) { group = StrUtil.EMPTY; } final String tmpHost = setting.getByGroup("host", group); if (StrUtil.isBlank(tmpHost)) { throw new NotInitedException("Host name is empy of group: {...
[ "private", "ServerAddress", "createServerAddress", "(", "String", "group", ")", "{", "final", "Setting", "setting", "=", "checkSetting", "(", ")", ";", "if", "(", "group", "==", "null", ")", "{", "group", "=", "StrUtil", ".", "EMPTY", ";", "}", "final", ...
创建ServerAddress对象,会读取配置文件中的相关信息 @param group 分组,如果为null默认为无分组 @return ServerAddress
[ "创建ServerAddress对象,会读取配置文件中的相关信息" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/nosql/mongo/MongoDS.java#L260-L274
train
Creates a server address from the specified group.
[ 30522, 2797, 8241, 4215, 16200, 4757, 9005, 2121, 26061, 14141, 8303, 1006, 5164, 2177, 1007, 1063, 2345, 4292, 4292, 1027, 14148, 18319, 3070, 1006, 1007, 1025, 2065, 1006, 2177, 1027, 1027, 19701, 1007, 1063, 2177, 1027, 2358, 22134, 4014...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/TaskManagerRunner.java
TaskManagerRunner.onFatalError
@Override public void onFatalError(Throwable exception) { LOG.error("Fatal error occurred while executing the TaskManager. Shutting it down...", exception); if (ExceptionUtils.isJvmFatalOrOutOfMemoryError(exception)) { terminateJVM(); } else { closeAsync(); FutureUtils.orTimeout(terminationFuture, FAT...
java
@Override public void onFatalError(Throwable exception) { LOG.error("Fatal error occurred while executing the TaskManager. Shutting it down...", exception); if (ExceptionUtils.isJvmFatalOrOutOfMemoryError(exception)) { terminateJVM(); } else { closeAsync(); FutureUtils.orTimeout(terminationFuture, FAT...
[ "@", "Override", "public", "void", "onFatalError", "(", "Throwable", "exception", ")", "{", "LOG", ".", "error", "(", "\"Fatal error occurred while executing the TaskManager. Shutting it down...\"", ",", "exception", ")", ";", "if", "(", "ExceptionUtils", ".", "isJvmFat...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunner.java#L244-L260
train
Called when the JVM exits the task manager.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2006, 27753, 9453, 18933, 2099, 1006, 5466, 3085, 6453, 1007, 1063, 8833, 1012, 7561, 1006, 1000, 10611, 7561, 4158, 2096, 23448, 1996, 4708, 24805, 4590, 1012, 17521, 2009, 2091, 1012, 1012, 1012, 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/jobgraph/JobGraph.java
JobGraph.addJar
public void addJar(Path jar) { if (jar == null) { throw new IllegalArgumentException(); } if (!userJars.contains(jar)) { userJars.add(jar); } }
java
public void addJar(Path jar) { if (jar == null) { throw new IllegalArgumentException(); } if (!userJars.contains(jar)) { userJars.add(jar); } }
[ "public", "void", "addJar", "(", "Path", "jar", ")", "{", "if", "(", "jar", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "!", "userJars", ".", "contains", "(", "jar", ")", ")", "{", "userJars", ...
Adds the path of a JAR file required to run the job on a task manager. @param jar path of the JAR file required to run the job on a task manager
[ "Adds", "the", "path", "of", "a", "JAR", "file", "required", "to", "run", "the", "job", "on", "a", "task", "manager", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobGraph.java#L492-L500
train
Add a jar to the application.
[ 30522, 2270, 11675, 5587, 16084, 1006, 4130, 15723, 1007, 1063, 2065, 1006, 15723, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 6206, 2906, 22850, 15781, 2595, 24422, 1006, 1007, 1025, 1065, 2065, 1006, 999, 5310, 16084, 2015, 1012, 3397, 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...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/ApplicationConversionService.java
ApplicationConversionService.addDelimitedStringConverters
public static void addDelimitedStringConverters(ConverterRegistry registry) { ConversionService service = (ConversionService) registry; registry.addConverter(new ArrayToDelimitedStringConverter(service)); registry.addConverter(new CollectionToDelimitedStringConverter(service)); registry.addConverter(new Delimit...
java
public static void addDelimitedStringConverters(ConverterRegistry registry) { ConversionService service = (ConversionService) registry; registry.addConverter(new ArrayToDelimitedStringConverter(service)); registry.addConverter(new CollectionToDelimitedStringConverter(service)); registry.addConverter(new Delimit...
[ "public", "static", "void", "addDelimitedStringConverters", "(", "ConverterRegistry", "registry", ")", "{", "ConversionService", "service", "=", "(", "ConversionService", ")", "registry", ";", "registry", ".", "addConverter", "(", "new", "ArrayToDelimitedStringConverter",...
Add converters to support delimited strings. @param registry the registry of converters to add to (must also be castable to ConversionService, e.g. being a {@link ConfigurableConversionService}) @throws ClassCastException if the given ConverterRegistry could not be cast to a ConversionService
[ "Add", "converters", "to", "support", "delimited", "strings", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/ApplicationConversionService.java#L119-L125
train
Add all the converters to the given registry.
[ 30522, 2270, 10763, 11675, 5587, 9247, 27605, 3064, 3367, 4892, 8663, 16874, 2545, 1006, 10463, 28849, 24063, 2854, 15584, 1007, 1063, 25834, 2121, 7903, 2063, 2326, 1027, 1006, 25834, 2121, 7903, 2063, 1007, 15584, 1025, 15584, 1012, 5587, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/io/TemporaryFilesystem.java
TemporaryFilesystem.deleteTempDir
public void deleteTempDir(File file) { if (!shouldReap()) { return; } // If the tempfile can be removed, delete it. If not, it wasn't created by us. if (temporaryFiles.remove(file)) { FileHandler.delete(file); } }
java
public void deleteTempDir(File file) { if (!shouldReap()) { return; } // If the tempfile can be removed, delete it. If not, it wasn't created by us. if (temporaryFiles.remove(file)) { FileHandler.delete(file); } }
[ "public", "void", "deleteTempDir", "(", "File", "file", ")", "{", "if", "(", "!", "shouldReap", "(", ")", ")", "{", "return", ";", "}", "// If the tempfile can be removed, delete it. If not, it wasn't created by us.", "if", "(", "temporaryFiles", ".", "remove", "(",...
Delete a temporary directory that we were responsible for creating. @param file the file to delete @throws WebDriverException if interrupted
[ "Delete", "a", "temporary", "directory", "that", "we", "were", "responsible", "for", "creating", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/io/TemporaryFilesystem.java#L119-L128
train
Delete a tempfile.
[ 30522, 2270, 11675, 3972, 12870, 18532, 17299, 4313, 1006, 5371, 5371, 1007, 1063, 2065, 1006, 999, 2323, 16416, 2361, 1006, 1007, 1007, 1063, 2709, 1025, 1065, 1013, 1013, 2065, 1996, 8915, 8737, 8873, 2571, 2064, 2022, 3718, 1010, 3972, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-container/src/main/java/org/apache/flink/container/entrypoint/JarManifestParser.java
JarManifestParser.findOnlyEntryClass
static JarFileWithEntryClass findOnlyEntryClass(Iterable<File> jarFiles) throws IOException { List<JarFileWithEntryClass> jarsWithEntryClasses = new ArrayList<>(); for (File jarFile : jarFiles) { findEntryClass(jarFile) .ifPresent(entryClass -> jarsWithEntryClasses.add(new JarFileWithEntryClass(jarFile, entr...
java
static JarFileWithEntryClass findOnlyEntryClass(Iterable<File> jarFiles) throws IOException { List<JarFileWithEntryClass> jarsWithEntryClasses = new ArrayList<>(); for (File jarFile : jarFiles) { findEntryClass(jarFile) .ifPresent(entryClass -> jarsWithEntryClasses.add(new JarFileWithEntryClass(jarFile, entr...
[ "static", "JarFileWithEntryClass", "findOnlyEntryClass", "(", "Iterable", "<", "File", ">", "jarFiles", ")", "throws", "IOException", "{", "List", "<", "JarFileWithEntryClass", ">", "jarsWithEntryClasses", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", ...
Returns a JAR file with its entry class as specified in the manifest. @param jarFiles JAR files to parse @throws NoSuchElementException if no JAR file contains an entry class attribute @throws IllegalArgumentException if multiple JAR files contain an entry class manifest attribute
[ "Returns", "a", "JAR", "file", "with", "its", "entry", "class", "as", "specified", "in", "the", "manifest", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-container/src/main/java/org/apache/flink/container/entrypoint/JarManifestParser.java#L72-L88
train
Find only entry class in the given JAR files.
[ 30522, 10763, 15723, 8873, 2571, 24415, 4765, 2854, 26266, 2424, 2239, 2135, 4765, 2854, 26266, 1006, 2009, 6906, 3468, 1026, 5371, 1028, 15723, 8873, 4244, 1007, 11618, 22834, 10288, 24422, 1063, 2862, 1026, 15723, 8873, 2571, 24415, 4765, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
transport/src/main/java/io/netty/channel/ChannelFlushPromiseNotifier.java
ChannelFlushPromiseNotifier.notifyPromises
public ChannelFlushPromiseNotifier notifyPromises(Throwable cause) { notifyPromises(); for (;;) { FlushCheckpoint cp = flushCheckpoints.poll(); if (cp == null) { break; } if (tryNotify) { cp.promise().tryFailure(cause); ...
java
public ChannelFlushPromiseNotifier notifyPromises(Throwable cause) { notifyPromises(); for (;;) { FlushCheckpoint cp = flushCheckpoints.poll(); if (cp == null) { break; } if (tryNotify) { cp.promise().tryFailure(cause); ...
[ "public", "ChannelFlushPromiseNotifier", "notifyPromises", "(", "Throwable", "cause", ")", "{", "notifyPromises", "(", ")", ";", "for", "(", ";", ";", ")", "{", "FlushCheckpoint", "cp", "=", "flushCheckpoints", ".", "poll", "(", ")", ";", "if", "(", "cp", ...
Notify all {@link ChannelFuture}s that were registered with {@link #add(ChannelPromise, int)} and their pendingDatasize isis smaller then the current writeCounter returned by {@link #writeCounter()}. After a {@link ChannelFuture} was notified it will be removed from this {@link ChannelFlushPromiseNotifier} and so not ...
[ "Notify", "all", "{", "@link", "ChannelFuture", "}", "s", "that", "were", "registered", "with", "{", "@link", "#add", "(", "ChannelPromise", "int", ")", "}", "and", "their", "pendingDatasize", "isis", "smaller", "then", "the", "current", "writeCounter", "retur...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/channel/ChannelFlushPromiseNotifier.java#L127-L141
train
Notify all pending promises that have been sent to the channel.
[ 30522, 2270, 3149, 10258, 20668, 21572, 28732, 17048, 18095, 2025, 8757, 21572, 28732, 2015, 1006, 5466, 3085, 3426, 1007, 1063, 2025, 8757, 21572, 28732, 2015, 1006, 1007, 1025, 2005, 1006, 1025, 1025, 1007, 1063, 13862, 5403, 3600, 8400, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/AbstractMetricGroup.java
AbstractMetricGroup.addMetric
protected void addMetric(String name, Metric metric) { if (metric == null) { LOG.warn("Ignoring attempted registration of a metric due to being null for name {}.", name); return; } // add the metric only if the group is still open synchronized (this) { if (!closed) { // immediately put without a 'c...
java
protected void addMetric(String name, Metric metric) { if (metric == null) { LOG.warn("Ignoring attempted registration of a metric due to being null for name {}.", name); return; } // add the metric only if the group is still open synchronized (this) { if (!closed) { // immediately put without a 'c...
[ "protected", "void", "addMetric", "(", "String", "name", ",", "Metric", "metric", ")", "{", "if", "(", "metric", "==", "null", ")", "{", "LOG", ".", "warn", "(", "\"Ignoring attempted registration of a metric due to being null for name {}.\"", ",", "name", ")", ";...
Adds the given metric to the group and registers it at the registry, if the group is not yet closed, and if no metric with the same name has been registered before. @param name the name to register the metric under @param metric the metric to register
[ "Adds", "the", "given", "metric", "to", "the", "group", "and", "registers", "it", "at", "the", "registry", "if", "the", "group", "is", "not", "yet", "closed", "and", "if", "no", "metric", "with", "the", "same", "name", "has", "been", "registered", "befor...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/AbstractMetricGroup.java#L373-L409
train
Add a metric to the group.
[ 30522, 5123, 11675, 5587, 12589, 1006, 5164, 2171, 1010, 12046, 12046, 30524, 2171, 1063, 1065, 1012, 1000, 1010, 2171, 1007, 1025, 2709, 1025, 1065, 1013, 1013, 5587, 1996, 12046, 2069, 2065, 1996, 2177, 2003, 2145, 2330, 25549, 1006, 2023...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/jobgraph/JobVertex.java
JobVertex.setResources
public void setResources(ResourceSpec minResources, ResourceSpec preferredResources) { this.minResources = checkNotNull(minResources); this.preferredResources = checkNotNull(preferredResources); }
java
public void setResources(ResourceSpec minResources, ResourceSpec preferredResources) { this.minResources = checkNotNull(minResources); this.preferredResources = checkNotNull(preferredResources); }
[ "public", "void", "setResources", "(", "ResourceSpec", "minResources", ",", "ResourceSpec", "preferredResources", ")", "{", "this", ".", "minResources", "=", "checkNotNull", "(", "minResources", ")", ";", "this", ".", "preferredResources", "=", "checkNotNull", "(", ...
Sets the minimum and preferred resources for the task. @param minResources The minimum resource for the task. @param preferredResources The preferred resource for the task.
[ "Sets", "the", "minimum", "and", "preferred", "resources", "for", "the", "task", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobVertex.java#L339-L342
train
Sets the minimum and preferred resources.
[ 30522, 2270, 11675, 2275, 6072, 8162, 9623, 1006, 4219, 5051, 2278, 30524, 11231, 3363, 1006, 8117, 6072, 8162, 9623, 1007, 1025, 2023, 1012, 6871, 6072, 8162, 9623, 1027, 4638, 17048, 11231, 3363, 1006, 6871, 6072, 8162, 9623, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/WeightRandom.java
WeightRandom.next
public T next() { if(MapUtil.isEmpty(this.weightMap)) { return null; } final double randomWeight = this.weightMap.lastKey() * random.nextDouble(); final SortedMap<Double, T> tailMap = this.weightMap.tailMap(randomWeight, false); return this.weightMap.get(tailMap.firstKey()); }
java
public T next() { if(MapUtil.isEmpty(this.weightMap)) { return null; } final double randomWeight = this.weightMap.lastKey() * random.nextDouble(); final SortedMap<Double, T> tailMap = this.weightMap.tailMap(randomWeight, false); return this.weightMap.get(tailMap.firstKey()); }
[ "public", "T", "next", "(", ")", "{", "if", "(", "MapUtil", ".", "isEmpty", "(", "this", ".", "weightMap", ")", ")", "{", "return", "null", ";", "}", "final", "double", "randomWeight", "=", "this", ".", "weightMap", ".", "lastKey", "(", ")", "*", "...
下一个随机对象 @return 随机对象
[ "下一个随机对象" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/WeightRandom.java#L139-L146
train
Returns the next element in the list.
[ 30522, 2270, 1056, 2279, 1006, 1007, 1063, 2065, 1006, 4949, 21823, 2140, 1012, 2003, 6633, 13876, 2100, 1006, 2023, 1012, 3635, 2863, 2361, 1007, 1007, 1063, 2709, 19701, 1025, 1065, 2345, 3313, 6721, 11179, 1027, 2023, 1012, 3635, 2863, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-cron/src/main/java/cn/hutool/cron/TaskTable.java
TaskTable.updatePattern
public boolean updatePattern(String id, CronPattern pattern) { final Lock writeLock = lock.writeLock(); try { writeLock.lock(); final int index = ids.indexOf(id); if (index > -1) { patterns.set(index, pattern); return true; } } finally { writeLock.unlock(); } return false; ...
java
public boolean updatePattern(String id, CronPattern pattern) { final Lock writeLock = lock.writeLock(); try { writeLock.lock(); final int index = ids.indexOf(id); if (index > -1) { patterns.set(index, pattern); return true; } } finally { writeLock.unlock(); } return false; ...
[ "public", "boolean", "updatePattern", "(", "String", "id", ",", "CronPattern", "pattern", ")", "{", "final", "Lock", "writeLock", "=", "lock", ".", "writeLock", "(", ")", ";", "try", "{", "writeLock", ".", "lock", "(", ")", ";", "final", "int", "index", ...
更新某个Task的定时规则 @param id Task的ID @param pattern 新的表达式 @return 是否更新成功,如果id对应的规则不存在则不更新 @since 4.0.10
[ "更新某个Task的定时规则" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-cron/src/main/java/cn/hutool/cron/TaskTable.java#L96-L109
train
Updates the CronPattern object with the given id.
[ 30522, 2270, 22017, 20898, 10651, 4502, 12079, 2078, 1006, 5164, 8909, 1010, 13675, 2239, 4502, 12079, 2078, 5418, 1007, 1063, 2345, 5843, 4339, 7878, 1027, 5843, 1012, 4339, 7878, 1006, 1007, 1025, 3046, 1063, 4339, 7878, 1012, 5843, 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...
netty/netty
transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollSocketChannelConfig.java
EpollSocketChannelConfig.setTcpKeepIdle
public EpollSocketChannelConfig setTcpKeepIdle(int seconds) { try { ((EpollSocketChannel) channel).socket.setTcpKeepIdle(seconds); return this; } catch (IOException e) { throw new ChannelException(e); } }
java
public EpollSocketChannelConfig setTcpKeepIdle(int seconds) { try { ((EpollSocketChannel) channel).socket.setTcpKeepIdle(seconds); return this; } catch (IOException e) { throw new ChannelException(e); } }
[ "public", "EpollSocketChannelConfig", "setTcpKeepIdle", "(", "int", "seconds", ")", "{", "try", "{", "(", "(", "EpollSocketChannel", ")", "channel", ")", ".", "socket", ".", "setTcpKeepIdle", "(", "seconds", ")", ";", "return", "this", ";", "}", "catch", "("...
Set the {@code TCP_KEEPIDLE} option on the socket. See {@code man 7 tcp} for more details.
[ "Set", "the", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollSocketChannelConfig.java#L435-L442
train
Sets the TCP keep idle time.
[ 30522, 2270, 4958, 14511, 6499, 19869, 10649, 20147, 22499, 2078, 8873, 2290, 2275, 13535, 2361, 20553, 23267, 2571, 1006, 20014, 3823, 1007, 1063, 3046, 1063, 1006, 1006, 4958, 14511, 6499, 19869, 10649, 20147, 2140, 1007, 3149, 1007, 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...
looly/hutool
hutool-http/src/main/java/cn/hutool/http/HttpConnection.java
HttpConnection.getCharset
public Charset getCharset() { Charset charset = null; final String charsetName = getCharsetName(); if (StrUtil.isNotBlank(charsetName)) { try { charset = Charset.forName(charsetName); } catch (UnsupportedCharsetException e) { // ignore } } return charset; }
java
public Charset getCharset() { Charset charset = null; final String charsetName = getCharsetName(); if (StrUtil.isNotBlank(charsetName)) { try { charset = Charset.forName(charsetName); } catch (UnsupportedCharsetException e) { // ignore } } return charset; }
[ "public", "Charset", "getCharset", "(", ")", "{", "Charset", "charset", "=", "null", ";", "final", "String", "charsetName", "=", "getCharsetName", "(", ")", ";", "if", "(", "StrUtil", ".", "isNotBlank", "(", "charsetName", ")", ")", "{", "try", "{", "cha...
获取字符集编码<br> 从Http连接的头信息中获得字符集<br> 从ContentType中获取 @return {@link Charset}编码 @since 3.0.9
[ "获取字符集编码<br", ">", "从Http连接的头信息中获得字符集<br", ">", "从ContentType中获取" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpConnection.java#L472-L483
train
Gets the Charset object that corresponds to the specified name.
[ 30522, 2270, 25869, 13462, 2131, 7507, 22573, 2102, 1006, 1007, 1063, 25869, 13462, 25869, 13462, 1027, 19701, 1025, 2345, 5164, 25869, 13462, 18442, 1027, 2131, 7507, 22573, 2102, 18442, 1006, 1007, 1025, 2065, 1006, 2358, 22134, 4014, 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-java/src/main/java/org/apache/flink/api/java/functions/FunctionAnnotation.java
FunctionAnnotation.readSingleForwardAnnotations
@Internal public static Set<Annotation> readSingleForwardAnnotations(Class<?> udfClass) { ForwardedFields forwardedFields = udfClass.getAnnotation(ForwardedFields.class); NonForwardedFields nonForwardedFields = udfClass.getAnnotation(NonForwardedFields.class); ReadFields readSet = udfClass.getAnnotation(ReadFiel...
java
@Internal public static Set<Annotation> readSingleForwardAnnotations(Class<?> udfClass) { ForwardedFields forwardedFields = udfClass.getAnnotation(ForwardedFields.class); NonForwardedFields nonForwardedFields = udfClass.getAnnotation(NonForwardedFields.class); ReadFields readSet = udfClass.getAnnotation(ReadFiel...
[ "@", "Internal", "public", "static", "Set", "<", "Annotation", ">", "readSingleForwardAnnotations", "(", "Class", "<", "?", ">", "udfClass", ")", "{", "ForwardedFields", "forwardedFields", "=", "udfClass", ".", "getAnnotation", "(", "ForwardedFields", ".", "class"...
Reads the annotations of a user defined function with one input and returns semantic properties according to the forwarded fields annotated. @param udfClass The user defined function, represented by its class. @return The DualInputSemanticProperties containing the forwarded fields.
[ "Reads", "the", "annotations", "of", "a", "user", "defined", "function", "with", "one", "input", "and", "returns", "semantic", "properties", "according", "to", "the", "forwarded", "fields", "annotated", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/functions/FunctionAnnotation.java#L411-L433
train
Reads the annotations of a UDF class.
[ 30522, 1030, 4722, 2270, 10763, 2275, 1026, 5754, 17287, 3508, 1028, 9631, 2075, 2571, 29278, 7652, 11639, 17287, 9285, 1006, 2465, 1026, 1029, 1028, 20904, 11329, 27102, 1007, 1063, 2830, 2098, 15155, 2830, 2098, 15155, 1027, 20904, 11329, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/InboundHttp2ToHttpAdapter.java
InboundHttp2ToHttpAdapter.newMessage
protected FullHttpMessage newMessage(Http2Stream stream, Http2Headers headers, boolean validateHttpHeaders, ByteBufAllocator alloc) throws Http2Exception { return connection.isServer() ? HttpConversionUtil.toFullHttpRequest(stream.id(), headers, alloc, ...
java
protected FullHttpMessage newMessage(Http2Stream stream, Http2Headers headers, boolean validateHttpHeaders, ByteBufAllocator alloc) throws Http2Exception { return connection.isServer() ? HttpConversionUtil.toFullHttpRequest(stream.id(), headers, alloc, ...
[ "protected", "FullHttpMessage", "newMessage", "(", "Http2Stream", "stream", ",", "Http2Headers", "headers", ",", "boolean", "validateHttpHeaders", ",", "ByteBufAllocator", "alloc", ")", "throws", "Http2Exception", "{", "return", "connection", ".", "isServer", "(", ")"...
Create a new {@link FullHttpMessage} based upon the current connection parameters @param stream The stream to create a message for @param headers The headers associated with {@code stream} @param validateHttpHeaders <ul> <li>{@code true} to validate HTTP headers in the http-codec</li> <li>{@code false} not to validate...
[ "Create", "a", "new", "{", "@link", "FullHttpMessage", "}", "based", "upon", "the", "current", "connection", "parameters" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/InboundHttp2ToHttpAdapter.java#L154-L160
train
Create a new message.
[ 30522, 5123, 2440, 11039, 25856, 7834, 3736, 3351, 2047, 7834, 3736, 3351, 1006, 8299, 2475, 21422, 5460, 1010, 8299, 2475, 4974, 2545, 20346, 2015, 1010, 22017, 20898, 9398, 3686, 11039, 25856, 4974, 2545, 1010, 24880, 8569, 13976, 24755, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/src/main/java/org/springframework/boot/web/client/RestTemplateBuilder.java
RestTemplateBuilder.messageConverters
public RestTemplateBuilder messageConverters( HttpMessageConverter<?>... messageConverters) { Assert.notNull(messageConverters, "MessageConverters must not be null"); return messageConverters(Arrays.asList(messageConverters)); }
java
public RestTemplateBuilder messageConverters( HttpMessageConverter<?>... messageConverters) { Assert.notNull(messageConverters, "MessageConverters must not be null"); return messageConverters(Arrays.asList(messageConverters)); }
[ "public", "RestTemplateBuilder", "messageConverters", "(", "HttpMessageConverter", "<", "?", ">", "...", "messageConverters", ")", "{", "Assert", ".", "notNull", "(", "messageConverters", ",", "\"MessageConverters must not be null\"", ")", ";", "return", "messageConverter...
Set the {@link HttpMessageConverter HttpMessageConverters} that should be used with the {@link RestTemplate}. Setting this value will replace any previously configured converters and any converters configured on the builder will replace RestTemplate's default converters. @param messageConverters the converters to set @...
[ "Set", "the", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/RestTemplateBuilder.java#L163-L167
train
Sets the message converters to use.
[ 30522, 2270, 2717, 18532, 15725, 8569, 23891, 2099, 4471, 8663, 16874, 2545, 1006, 8299, 7834, 3736, 3351, 8663, 16874, 2121, 30524, 8663, 16874, 2545, 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, 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/internal/utils/configuration/GridConfiguration.java
GridConfiguration.merge
public void merge(GridConfiguration other) { if (other == null) { return; } super.merge(other); if (isMergeAble(Integer.class, other.cleanUpCycle, cleanUpCycle)) { cleanUpCycle = other.cleanUpCycle; } if (isMergeAble(Map.class, other.custom, custom)) { if (custom == null) { ...
java
public void merge(GridConfiguration other) { if (other == null) { return; } super.merge(other); if (isMergeAble(Integer.class, other.cleanUpCycle, cleanUpCycle)) { cleanUpCycle = other.cleanUpCycle; } if (isMergeAble(Map.class, other.custom, custom)) { if (custom == null) { ...
[ "public", "void", "merge", "(", "GridConfiguration", "other", ")", "{", "if", "(", "other", "==", "null", ")", "{", "return", ";", "}", "super", ".", "merge", "(", "other", ")", ";", "if", "(", "isMergeAble", "(", "Integer", ".", "class", ",", "other...
replaces this instance of configuration value with the 'other' value if it's set. @param other
[ "replaces", "this", "instance", "of", "configuration", "value", "with", "the", "other", "value", "if", "it", "s", "set", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/server/src/org/openqa/grid/internal/utils/configuration/GridConfiguration.java#L91-L116
train
Merge the other configuration into this one.
[ 30522, 2270, 11675, 13590, 1006, 8370, 8663, 8873, 27390, 3370, 2060, 1007, 1063, 2065, 1006, 2060, 1027, 1027, 19701, 1007, 1063, 2709, 1025, 1065, 3565, 1012, 13590, 1006, 2060, 1007, 1025, 2065, 1006, 2003, 5017, 3351, 3085, 1006, 16109,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/websocketx/WebSocketClientHandshaker07.java
WebSocketClientHandshaker07.verify
@Override protected void verify(FullHttpResponse response) { final HttpResponseStatus status = HttpResponseStatus.SWITCHING_PROTOCOLS; final HttpHeaders headers = response.headers(); if (!response.status().equals(status)) { throw new WebSocketHandshakeException("Invalid handshak...
java
@Override protected void verify(FullHttpResponse response) { final HttpResponseStatus status = HttpResponseStatus.SWITCHING_PROTOCOLS; final HttpHeaders headers = response.headers(); if (!response.status().equals(status)) { throw new WebSocketHandshakeException("Invalid handshak...
[ "@", "Override", "protected", "void", "verify", "(", "FullHttpResponse", "response", ")", "{", "final", "HttpResponseStatus", "status", "=", "HttpResponseStatus", ".", "SWITCHING_PROTOCOLS", ";", "final", "HttpHeaders", "headers", "=", "response", ".", "headers", "(...
<p> Process server response: </p> <pre> HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= Sec-WebSocket-Protocol: chat </pre> @param response HTTP response returned from the server for the request sent by beginOpeningHandshake00(). @throws WebSo...
[ "<p", ">", "Process", "server", "response", ":", "<", "/", "p", ">" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker07.java#L217-L241
train
Verify the response.
[ 30522, 1030, 2058, 15637, 5123, 11675, 20410, 1006, 2440, 11039, 25856, 6072, 26029, 3366, 3433, 1007, 1063, 2345, 8299, 6072, 26029, 8583, 29336, 2271, 3570, 1027, 8299, 6072, 26029, 8583, 29336, 2271, 1012, 11991, 1035, 16744, 1025, 2345, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-java/src/main/java/org/apache/flink/api/java/io/SplitDataProperties.java
SplitDataProperties.splitsOrderedBy
public SplitDataProperties<T> splitsOrderedBy(int[] orderFields, Order[] orders) { if (orderFields == null || orders == null) { throw new InvalidProgramException("OrderFields or Orders may not be null."); } else if (orderFields.length == 0) { throw new InvalidProgramException("OrderFields may not be empty.")...
java
public SplitDataProperties<T> splitsOrderedBy(int[] orderFields, Order[] orders) { if (orderFields == null || orders == null) { throw new InvalidProgramException("OrderFields or Orders may not be null."); } else if (orderFields.length == 0) { throw new InvalidProgramException("OrderFields may not be empty.")...
[ "public", "SplitDataProperties", "<", "T", ">", "splitsOrderedBy", "(", "int", "[", "]", "orderFields", ",", "Order", "[", "]", "orders", ")", "{", "if", "(", "orderFields", "==", "null", "||", "orders", "==", "null", ")", "{", "throw", "new", "InvalidPr...
Defines that the data within an input split is sorted on the fields defined by the field positions in the specified orders. All records of an input split must be emitted by the input format in the defined order. <p><b> IMPORTANT: Providing wrong information with SplitDataProperties can cause wrong results! </b> @para...
[ "Defines", "that", "the", "data", "within", "an", "input", "split", "is", "sorted", "on", "the", "fields", "defined", "by", "the", "field", "positions", "in", "the", "specified", "orders", ".", "All", "records", "of", "an", "input", "split", "must", "be", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/io/SplitDataProperties.java#L263-L297
train
Splits the data properties in the data source in the specified order by using the specified field expressions.
[ 30522, 2270, 3975, 2850, 2696, 21572, 4842, 7368, 1026, 1056, 1028, 19584, 8551, 6850, 3762, 1006, 20014, 1031, 1033, 2344, 15155, 1010, 2344, 1031, 1033, 4449, 1007, 1063, 2065, 1006, 2344, 15155, 1027, 1027, 19701, 1064, 1064, 4449, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-java/src/main/java/org/apache/flink/api/java/DataSet.java
DataSet.leftOuterJoin
public <R> JoinOperatorSetsBase<T, R> leftOuterJoin(DataSet<R> other, JoinHint strategy) { switch(strategy) { case OPTIMIZER_CHOOSES: case REPARTITION_SORT_MERGE: case REPARTITION_HASH_FIRST: case REPARTITION_HASH_SECOND: case BROADCAST_HASH_SECOND: return new JoinOperatorSetsBase<>(this, other, st...
java
public <R> JoinOperatorSetsBase<T, R> leftOuterJoin(DataSet<R> other, JoinHint strategy) { switch(strategy) { case OPTIMIZER_CHOOSES: case REPARTITION_SORT_MERGE: case REPARTITION_HASH_FIRST: case REPARTITION_HASH_SECOND: case BROADCAST_HASH_SECOND: return new JoinOperatorSetsBase<>(this, other, st...
[ "public", "<", "R", ">", "JoinOperatorSetsBase", "<", "T", ",", "R", ">", "leftOuterJoin", "(", "DataSet", "<", "R", ">", "other", ",", "JoinHint", "strategy", ")", "{", "switch", "(", "strategy", ")", "{", "case", "OPTIMIZER_CHOOSES", ":", "case", "REPA...
Initiates a Left Outer Join transformation. <p>An Outer Join transformation joins two elements of two {@link DataSet DataSets} on key equality and provides multiple ways to combine joining elements into one DataSet. <p>Elements of the <b>left</b> DataSet (i.e. {@code this}) that do not have a matching element on the ...
[ "Initiates", "a", "Left", "Outer", "Join", "transformation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L864-L876
train
Returns a new JoinOperatorSetsBase instance for the left outer join of this DataSet with the specified JoinHint.
[ 30522, 2270, 1026, 1054, 1028, 3693, 25918, 18926, 8454, 15058, 1026, 1056, 1010, 1054, 1028, 2187, 5833, 2121, 5558, 2378, 1006, 2951, 13462, 1026, 1054, 1028, 2060, 1010, 3693, 10606, 2102, 5656, 1007, 1063, 6942, 1006, 5656, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/InternalJSONUtil.java
InternalJSONUtil.indent
protected static final void indent(Writer writer, int indent) throws IOException { for (int i = 0; i < indent; i += 1) { writer.write(CharUtil.SPACE); } }
java
protected static final void indent(Writer writer, int indent) throws IOException { for (int i = 0; i < indent; i += 1) { writer.write(CharUtil.SPACE); } }
[ "protected", "static", "final", "void", "indent", "(", "Writer", "writer", ",", "int", "indent", ")", "throws", "IOException", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "indent", ";", "i", "+=", "1", ")", "{", "writer", ".", "write", "(...
缩进,使用空格符 @param writer @param indent @throws IOException
[ "缩进,使用空格符" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/InternalJSONUtil.java#L78-L82
train
Write a block of content with a tab character.
[ 30522, 5123, 10763, 2345, 11675, 27427, 4765, 1006, 3213, 3213, 1010, 20014, 27427, 4765, 1007, 11618, 22834, 10288, 24422, 1063, 2005, 1006, 20014, 1045, 1027, 1014, 1025, 1045, 1026, 27427, 4765, 1025, 1045, 1009, 1027, 1015, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/cell/CellUtil.java
CellUtil.isMergedRegion
public static boolean isMergedRegion(Sheet sheet, int row, int column) { final int sheetMergeCount = sheet.getNumMergedRegions(); CellRangeAddress ca; for (int i = 0; i < sheetMergeCount; i++) { ca = sheet.getMergedRegion(i); if (row >= ca.getFirstRow() && row <= ca.getLastRow() && column >= ca.getFirs...
java
public static boolean isMergedRegion(Sheet sheet, int row, int column) { final int sheetMergeCount = sheet.getNumMergedRegions(); CellRangeAddress ca; for (int i = 0; i < sheetMergeCount; i++) { ca = sheet.getMergedRegion(i); if (row >= ca.getFirstRow() && row <= ca.getLastRow() && column >= ca.getFirs...
[ "public", "static", "boolean", "isMergedRegion", "(", "Sheet", "sheet", ",", "int", "row", ",", "int", "column", ")", "{", "final", "int", "sheetMergeCount", "=", "sheet", ".", "getNumMergedRegions", "(", ")", ";", "CellRangeAddress", "ca", ";", "for", "(", ...
判断指定的单元格是否是合并单元格 @param sheet {@link Sheet} @param row 行号 @param column 列号 @return 是否是合并单元格
[ "判断指定的单元格是否是合并单元格" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/cell/CellUtil.java#L181-L191
train
Checks if the specified sheet is merged with another region.
[ 30522, 2270, 10763, 22017, 20898, 2003, 5017, 5999, 23784, 1006, 7123, 7123, 1010, 20014, 5216, 1010, 20014, 5930, 1007, 1063, 2345, 20014, 7123, 5017, 3351, 3597, 16671, 1027, 7123, 1012, 2131, 19172, 5017, 5999, 23784, 2015, 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-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.rotate
public static void rotate(File imageFile, int degree, File outFile) throws IORuntimeException { rotate(read(imageFile), degree, outFile); }
java
public static void rotate(File imageFile, int degree, File outFile) throws IORuntimeException { rotate(read(imageFile), degree, outFile); }
[ "public", "static", "void", "rotate", "(", "File", "imageFile", ",", "int", "degree", ",", "File", "outFile", ")", "throws", "IORuntimeException", "{", "rotate", "(", "read", "(", "imageFile", ")", ",", "degree", ",", "outFile", ")", ";", "}" ]
旋转图片为指定角度<br> 此方法不会关闭输出流 @param imageFile 被旋转图像文件 @param degree 旋转角度 @param outFile 输出文件 @since 3.2.2 @throws IORuntimeException IO异常
[ "旋转图片为指定角度<br", ">", "此方法不会关闭输出流" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L1002-L1004
train
Rotate the image file.
[ 30522, 2270, 10763, 11675, 24357, 1006, 5371, 3746, 8873, 2571, 1010, 20014, 3014, 1010, 5371, 2041, 8873, 2571, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 24357, 1006, 3191, 1006, 3746, 8873, 2571, 1007, 1010, 3014, 1010, 2041, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java
ArrayUtil.nullToEmpty
public static String[] nullToEmpty(String[] array) { return filter(array, new Editor<String>() { @Override public String edit(String t) { return null == t ? StrUtil.EMPTY : t; } }); }
java
public static String[] nullToEmpty(String[] array) { return filter(array, new Editor<String>() { @Override public String edit(String t) { return null == t ? StrUtil.EMPTY : t; } }); }
[ "public", "static", "String", "[", "]", "nullToEmpty", "(", "String", "[", "]", "array", ")", "{", "return", "filter", "(", "array", ",", "new", "Editor", "<", "String", ">", "(", ")", "{", "@", "Override", "public", "String", "edit", "(", "String", ...
数组元素中的null转换为"" @param array 数组 @return 新数组 @since 3.2.1
[ "数组元素中的null转换为" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java#L830-L837
train
Returns a copy of the given array that contains only null elements.
[ 30522, 2270, 10763, 5164, 1031, 1033, 19701, 3406, 6633, 13876, 2100, 1006, 5164, 1031, 1033, 9140, 1007, 1063, 2709, 11307, 1006, 9140, 1010, 2047, 3559, 1026, 5164, 1028, 1006, 1007, 1063, 1030, 2058, 15637, 2270, 5164, 10086, 1006, 5164,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java
ReferenceCountedOpenSslEngine.writePlaintextData
private int writePlaintextData(final ByteBuffer src, int len) { final int pos = src.position(); final int limit = src.limit(); final int sslWrote; if (src.isDirect()) { sslWrote = SSL.writeToSSL(ssl, bufferAddress(src) + pos, len); if (sslWrote > 0) { ...
java
private int writePlaintextData(final ByteBuffer src, int len) { final int pos = src.position(); final int limit = src.limit(); final int sslWrote; if (src.isDirect()) { sslWrote = SSL.writeToSSL(ssl, bufferAddress(src) + pos, len); if (sslWrote > 0) { ...
[ "private", "int", "writePlaintextData", "(", "final", "ByteBuffer", "src", ",", "int", "len", ")", "{", "final", "int", "pos", "=", "src", ".", "position", "(", ")", ";", "final", "int", "limit", "=", "src", ".", "limit", "(", ")", ";", "final", "int...
Write plaintext data to the OpenSSL internal BIO Calling this function with src.remaining == 0 is undefined.
[ "Write", "plaintext", "data", "to", "the", "OpenSSL", "internal", "BIO" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java#L505-L534
train
Write plaintext data to the SSL context.
[ 30522, 2797, 20014, 4339, 24759, 22325, 10288, 2102, 2850, 2696, 1006, 2345, 24880, 8569, 12494, 5034, 2278, 1010, 20014, 18798, 1007, 1063, 2345, 20014, 13433, 2015, 1027, 5034, 2278, 1012, 2597, 1006, 1007, 1025, 2345, 20014, 5787, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
networknt/light-4j
client/src/main/java/com/networknt/client/ssl/APINameChecker.java
APINameChecker.verify
public static boolean verify(final Set<String> nameSet, final X509Certificate cert) { if (null!=nameSet && !nameSet.isEmpty()) { return nameSet.stream().filter(name->verify(name, cert)).findAny().isPresent(); } return false; }
java
public static boolean verify(final Set<String> nameSet, final X509Certificate cert) { if (null!=nameSet && !nameSet.isEmpty()) { return nameSet.stream().filter(name->verify(name, cert)).findAny().isPresent(); } return false; }
[ "public", "static", "boolean", "verify", "(", "final", "Set", "<", "String", ">", "nameSet", ",", "final", "X509Certificate", "cert", ")", "{", "if", "(", "null", "!=", "nameSet", "&&", "!", "nameSet", ".", "isEmpty", "(", ")", ")", "{", "return", "nam...
Verify a set of names as per HTTPS (RFC 2818) @param nameSet - a set of names from the config file @param cert - the server certificate @return - whether any name in the name set matches names in the cert
[ "Verify", "a", "set", "of", "names", "as", "per", "HTTPS", "(", "RFC", "2818", ")" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/com/networknt/client/ssl/APINameChecker.java#L67-L73
train
Verify a set of names and certificate.
[ 30522, 2270, 10763, 22017, 20898, 20410, 1006, 2345, 2275, 1026, 5164, 1028, 3415, 3388, 1010, 2345, 1060, 12376, 2683, 17119, 3775, 8873, 16280, 8292, 5339, 1007, 1063, 2065, 1006, 19701, 999, 1027, 3415, 3388, 1004, 1004, 999, 3415, 3388,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
client/src/main/java/com/alibaba/otter/canal/client/kafka/KafkaCanalConnector.java
KafkaCanalConnector.ack
@Override public void ack() { waitClientRunning(); if (!running) { return; } if (kafkaConsumer != null) { kafkaConsumer.commitSync(); } if (kafkaConsumer2 != null) { kafkaConsumer2.commitSync(); } }
java
@Override public void ack() { waitClientRunning(); if (!running) { return; } if (kafkaConsumer != null) { kafkaConsumer.commitSync(); } if (kafkaConsumer2 != null) { kafkaConsumer2.commitSync(); } }
[ "@", "Override", "public", "void", "ack", "(", ")", "{", "waitClientRunning", "(", ")", ";", "if", "(", "!", "running", ")", "{", "return", ";", "}", "if", "(", "kafkaConsumer", "!=", "null", ")", "{", "kafkaConsumer", ".", "commitSync", "(", ")", ";...
提交offset,如果超过 session.timeout.ms 设置的时间没有ack则会抛出异常,ack失败
[ "提交offset,如果超过", "session", ".", "timeout", ".", "ms", "设置的时间没有ack则会抛出异常,ack失败" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client/src/main/java/com/alibaba/otter/canal/client/kafka/KafkaCanalConnector.java#L264-L277
train
Acknowledges the current message.
[ 30522, 1030, 2058, 15637, 2270, 11675, 9353, 2243, 1006, 1007, 1063, 3524, 20464, 11638, 15532, 5582, 1006, 1007, 1025, 2065, 1006, 999, 2770, 1007, 1063, 2709, 1025, 1065, 2065, 1006, 10556, 24316, 22684, 3619, 17897, 2099, 999, 1027, 1970...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.getJSONObject
public JSONObject getJSONObject(K key) { final Object object = this.getObj(key); if(null == object) { return null; } if(object instanceof JSONObject) { return (JSONObject) object; } return new JSONObject(object); }
java
public JSONObject getJSONObject(K key) { final Object object = this.getObj(key); if(null == object) { return null; } if(object instanceof JSONObject) { return (JSONObject) object; } return new JSONObject(object); }
[ "public", "JSONObject", "getJSONObject", "(", "K", "key", ")", "{", "final", "Object", "object", "=", "this", ".", "getObj", "(", "key", ")", ";", "if", "(", "null", "==", "object", ")", "{", "return", "null", ";", "}", "if", "(", "object", "instance...
获得JSONObject对象<br> 如果值为其它类型对象,尝试转换为{@link JSONObject}返回,否则抛出异常 @param key KEY @return JSONArray对象,如果值为null或者非JSONObject类型,返回null
[ "获得JSONObject对象<br", ">", "如果值为其它类型对象,尝试转换为", "{", "@link", "JSONObject", "}", "返回,否则抛出异常" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/JSONGetter.java#L73-L83
train
Gets the JSONObject associated with the specified key.
[ 30522, 2270, 1046, 3385, 16429, 20614, 2131, 22578, 17175, 2497, 20614, 1006, 1047, 3145, 1007, 1063, 2345, 4874, 4874, 1027, 2023, 1012, 2131, 16429, 3501, 1006, 3145, 1007, 1025, 2065, 1006, 19701, 1027, 1027, 4874, 1007, 1063, 2709, 1970...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/JarClassLoader.java
JarClassLoader.addJar
public JarClassLoader addJar(File jarFileOrDir) { if(isJarFile(jarFileOrDir)) { return addURL(jarFileOrDir); } final List<File> jars = loopJar(jarFileOrDir); for (File jar : jars) { addURL(jar); } return this; }
java
public JarClassLoader addJar(File jarFileOrDir) { if(isJarFile(jarFileOrDir)) { return addURL(jarFileOrDir); } final List<File> jars = loopJar(jarFileOrDir); for (File jar : jars) { addURL(jar); } return this; }
[ "public", "JarClassLoader", "addJar", "(", "File", "jarFileOrDir", ")", "{", "if", "(", "isJarFile", "(", "jarFileOrDir", ")", ")", "{", "return", "addURL", "(", "jarFileOrDir", ")", ";", "}", "final", "List", "<", "File", ">", "jars", "=", "loopJar", "(...
加载Jar文件,或者加载目录 @param jarFileOrDir jar文件或者jar文件所在目录 @return this
[ "加载Jar文件,或者加载目录" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/JarClassLoader.java#L108-L117
train
Add a jar to the class loader.
[ 30522, 2270, 15723, 26266, 11066, 2121, 5587, 16084, 1006, 5371, 15723, 8873, 2571, 8551, 4313, 1007, 1063, 2065, 1006, 2003, 16084, 8873, 2571, 1006, 15723, 8873, 2571, 8551, 4313, 1007, 1007, 1063, 2709, 5587, 3126, 2140, 1006, 15723, 887...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-connectors/flink-connector-filesystem/src/main/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSink.java
BucketingSink.closeCurrentPartFile
private void closeCurrentPartFile(BucketState<T> bucketState) throws Exception { if (bucketState.isWriterOpen) { bucketState.writer.close(); bucketState.isWriterOpen = false; } if (bucketState.currentFile != null) { Path currentPartPath = new Path(bucketState.currentFile); Path inProgressPath = getIn...
java
private void closeCurrentPartFile(BucketState<T> bucketState) throws Exception { if (bucketState.isWriterOpen) { bucketState.writer.close(); bucketState.isWriterOpen = false; } if (bucketState.currentFile != null) { Path currentPartPath = new Path(bucketState.currentFile); Path inProgressPath = getIn...
[ "private", "void", "closeCurrentPartFile", "(", "BucketState", "<", "T", ">", "bucketState", ")", "throws", "Exception", "{", "if", "(", "bucketState", ".", "isWriterOpen", ")", "{", "bucketState", ".", "writer", ".", "close", "(", ")", ";", "bucketState", "...
Closes the current part file and moves it from the in-progress state to the pending state.
[ "Closes", "the", "current", "part", "file", "and", "moves", "it", "from", "the", "in", "-", "progress", "state", "to", "the", "pending", "state", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-filesystem/src/main/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSink.java#L590-L608
train
Closes the current part file.
[ 30522, 2797, 11675, 2485, 10841, 14343, 3372, 19362, 24475, 9463, 1006, 13610, 9153, 2618, 1026, 1056, 1028, 13610, 9153, 2618, 1007, 11618, 6453, 1063, 2065, 1006, 13610, 9153, 2618, 1012, 2003, 15994, 26915, 1007, 1063, 13610, 9153, 2618, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/style/StyleUtil.java
StyleUtil.setAlign
public static CellStyle setAlign(CellStyle cellStyle, HorizontalAlignment halign, VerticalAlignment valign) { cellStyle.setAlignment(halign); cellStyle.setVerticalAlignment(valign); return cellStyle; }
java
public static CellStyle setAlign(CellStyle cellStyle, HorizontalAlignment halign, VerticalAlignment valign) { cellStyle.setAlignment(halign); cellStyle.setVerticalAlignment(valign); return cellStyle; }
[ "public", "static", "CellStyle", "setAlign", "(", "CellStyle", "cellStyle", ",", "HorizontalAlignment", "halign", ",", "VerticalAlignment", "valign", ")", "{", "cellStyle", ".", "setAlignment", "(", "halign", ")", ";", "cellStyle", ".", "setVerticalAlignment", "(", ...
设置cell文本对齐样式 @param cellStyle {@link CellStyle} @param halign 横向位置 @param valign 纵向位置 @return {@link CellStyle}
[ "设置cell文本对齐样式" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/style/StyleUtil.java#L55-L59
train
Sets the alignment of a cell style.
[ 30522, 2270, 10763, 4442, 27983, 2275, 11475, 16206, 1006, 4442, 27983, 4442, 27983, 1010, 9876, 11475, 16206, 3672, 11085, 23773, 1010, 7471, 11475, 16206, 3672, 11748, 23773, 1007, 1063, 4442, 27983, 1012, 2275, 11475, 16206, 3672, 1006, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/messages/json/JobResultDeserializer.java
JobResultDeserializer.assertNextToken
private static void assertNextToken( final JsonParser p, final JsonToken requiredJsonToken) throws IOException { final JsonToken jsonToken = p.nextToken(); if (jsonToken != requiredJsonToken) { throw new JsonMappingException(p, String.format("Expected token %s (was %s)", requiredJsonToken, jsonToken)); }...
java
private static void assertNextToken( final JsonParser p, final JsonToken requiredJsonToken) throws IOException { final JsonToken jsonToken = p.nextToken(); if (jsonToken != requiredJsonToken) { throw new JsonMappingException(p, String.format("Expected token %s (was %s)", requiredJsonToken, jsonToken)); }...
[ "private", "static", "void", "assertNextToken", "(", "final", "JsonParser", "p", ",", "final", "JsonToken", "requiredJsonToken", ")", "throws", "IOException", "{", "final", "JsonToken", "jsonToken", "=", "p", ".", "nextToken", "(", ")", ";", "if", "(", "jsonTo...
Advances the token and asserts that it matches the required {@link JsonToken}.
[ "Advances", "the", "token", "and", "asserts", "that", "it", "matches", "the", "required", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/json/JobResultDeserializer.java#L160-L167
train
Assert next token.
[ 30522, 2797, 10763, 11675, 20865, 2638, 18413, 18715, 2368, 1006, 2345, 1046, 3385, 19362, 8043, 1052, 1010, 2345, 1046, 3385, 18715, 2368, 3223, 22578, 12162, 11045, 2078, 1007, 11618, 22834, 10288, 24422, 1063, 2345, 1046, 3385, 18715, 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...
looly/hutool
hutool-http/src/main/java/cn/hutool/http/HttpUtil.java
HttpUtil.downloadFile
public static long downloadFile(String url, File destFile, int timeout) { return downloadFile(url, destFile, timeout, null); }
java
public static long downloadFile(String url, File destFile, int timeout) { return downloadFile(url, destFile, timeout, null); }
[ "public", "static", "long", "downloadFile", "(", "String", "url", ",", "File", "destFile", ",", "int", "timeout", ")", "{", "return", "downloadFile", "(", "url", ",", "destFile", ",", "timeout", ",", "null", ")", ";", "}" ]
下载远程文件 @param url 请求的url @param destFile 目标文件或目录,当为目录时,取URL中的文件名,取不到使用编码后的URL做为文件名 @param timeout 超时,单位毫秒,-1表示默认超时 @return 文件大小 @since 4.0.4
[ "下载远程文件" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpUtil.java#L278-L280
train
Downloads a file from the given URL to the given destination file.
[ 30522, 2270, 10763, 2146, 8816, 8873, 2571, 1006, 5164, 24471, 2140, 1010, 5371, 4078, 24475, 9463, 1010, 20014, 2051, 5833, 1007, 1063, 2709, 8816, 8873, 2571, 1006, 24471, 2140, 1010, 4078, 24475, 9463, 1010, 2051, 5833, 1010, 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...
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java
KeyUtil.generatePrivateKey
public static PrivateKey generatePrivateKey(KeyStore keyStore, String alias, char[] password) { try { return (PrivateKey) keyStore.getKey(alias, password); } catch (Exception e) { throw new CryptoException(e); } }
java
public static PrivateKey generatePrivateKey(KeyStore keyStore, String alias, char[] password) { try { return (PrivateKey) keyStore.getKey(alias, password); } catch (Exception e) { throw new CryptoException(e); } }
[ "public", "static", "PrivateKey", "generatePrivateKey", "(", "KeyStore", "keyStore", ",", "String", "alias", ",", "char", "[", "]", "password", ")", "{", "try", "{", "return", "(", "PrivateKey", ")", "keyStore", ".", "getKey", "(", "alias", ",", "password", ...
生成私钥,仅用于非对称加密 @param keyStore {@link KeyStore} @param alias 别名 @param password 密码 @return 私钥 {@link PrivateKey}
[ "生成私钥,仅用于非对称加密" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java#L255-L261
train
Generates a private key from a key store.
[ 30522, 2270, 10763, 2797, 14839, 9699, 18098, 21466, 14839, 1006, 6309, 19277, 6309, 19277, 1010, 5164, 14593, 1010, 25869, 1031, 1033, 20786, 1007, 1063, 3046, 1063, 2709, 1006, 2797, 14839, 1007, 6309, 19277, 1012, 2131, 14839, 1006, 14593,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java
TaskMemoryManager.getPage
public Object getPage(long pagePlusOffsetAddress) { if (tungstenMemoryMode == MemoryMode.ON_HEAP) { final int pageNumber = decodePageNumber(pagePlusOffsetAddress); assert (pageNumber >= 0 && pageNumber < PAGE_TABLE_SIZE); final MemoryBlock page = pageTable[pageNumber]; assert (page != null);...
java
public Object getPage(long pagePlusOffsetAddress) { if (tungstenMemoryMode == MemoryMode.ON_HEAP) { final int pageNumber = decodePageNumber(pagePlusOffsetAddress); assert (pageNumber >= 0 && pageNumber < PAGE_TABLE_SIZE); final MemoryBlock page = pageTable[pageNumber]; assert (page != null);...
[ "public", "Object", "getPage", "(", "long", "pagePlusOffsetAddress", ")", "{", "if", "(", "tungstenMemoryMode", "==", "MemoryMode", ".", "ON_HEAP", ")", "{", "final", "int", "pageNumber", "=", "decodePageNumber", "(", "pagePlusOffsetAddress", ")", ";", "assert", ...
Get the page associated with an address encoded by {@link TaskMemoryManager#encodePageNumberAndOffset(MemoryBlock, long)}
[ "Get", "the", "page", "associated", "with", "an", "address", "encoded", "by", "{" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java#L392-L403
train
Get the page object from the given address.
[ 30522, 2270, 4874, 2131, 13704, 1006, 2146, 3931, 24759, 26658, 21807, 12928, 14141, 8303, 1007, 1063, 2065, 1006, 27079, 16173, 4168, 5302, 2854, 5302, 3207, 1027, 1027, 3638, 5302, 3207, 1012, 2006, 1035, 16721, 1007, 1063, 2345, 20014, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java
DoubleArrayTrie.serializeTo
public boolean serializeTo(String path) { ObjectOutputStream out = null; try { out = new ObjectOutputStream(IOUtil.newOutputStream(path)); out.writeObject(this); } catch (Exception e) { // e.printStackTrace(); return fals...
java
public boolean serializeTo(String path) { ObjectOutputStream out = null; try { out = new ObjectOutputStream(IOUtil.newOutputStream(path)); out.writeObject(this); } catch (Exception e) { // e.printStackTrace(); return fals...
[ "public", "boolean", "serializeTo", "(", "String", "path", ")", "{", "ObjectOutputStream", "out", "=", "null", ";", "try", "{", "out", "=", "new", "ObjectOutputStream", "(", "IOUtil", ".", "newOutputStream", "(", "path", ")", ")", ";", "out", ".", "writeOb...
将自己序列化到 @param path @return
[ "将自己序列化到" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java#L665-L679
train
Serialize to a file.
[ 30522, 2270, 22017, 20898, 7642, 4697, 3406, 1006, 5164, 4130, 1007, 1063, 4874, 5833, 18780, 21422, 2041, 1027, 19701, 1025, 3046, 1063, 2041, 1027, 2047, 4874, 5833, 18780, 21422, 1006, 22834, 21823, 2140, 1012, 2047, 5833, 18780, 21422, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-java/src/main/java/org/apache/flink/api/java/summarize/aggregation/ShortSummaryAggregator.java
ShortSummaryAggregator.min
public static Short min(Short a, Short b) { return a <= b ? a : b; }
java
public static Short min(Short a, Short b) { return a <= b ? a : b; }
[ "public", "static", "Short", "min", "(", "Short", "a", ",", "Short", "b", ")", "{", "return", "a", "<=", "b", "?", "a", ":", "b", ";", "}" ]
Like Math.min() except for shorts.
[ "Like", "Math", ".", "min", "()", "except", "for", "shorts", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/summarize/aggregation/ShortSummaryAggregator.java#L34-L36
train
Get the minimum of two shorts.
[ 30522, 2270, 10763, 2460, 8117, 1006, 2460, 1037, 1010, 2460, 1038, 1007, 1063, 2709, 1037, 1026, 1027, 1038, 1029, 1037, 1024, 1038, 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, 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/operators/util/BloomFilter.java
BloomFilter.estimateFalsePositiveProbability
public static double estimateFalsePositiveProbability(long inputEntries, int bitSize) { int numFunction = optimalNumOfHashFunctions(inputEntries, bitSize); double p = Math.pow(Math.E, -(double) numFunction * inputEntries / bitSize); double estimatedFPP = Math.pow(1 - p, numFunction); return estimatedFPP; }
java
public static double estimateFalsePositiveProbability(long inputEntries, int bitSize) { int numFunction = optimalNumOfHashFunctions(inputEntries, bitSize); double p = Math.pow(Math.E, -(double) numFunction * inputEntries / bitSize); double estimatedFPP = Math.pow(1 - p, numFunction); return estimatedFPP; }
[ "public", "static", "double", "estimateFalsePositiveProbability", "(", "long", "inputEntries", ",", "int", "bitSize", ")", "{", "int", "numFunction", "=", "optimalNumOfHashFunctions", "(", "inputEntries", ",", "bitSize", ")", ";", "double", "p", "=", "Math", ".", ...
Compute the false positive probability based on given input entries and bits size. Note: this is just the math expected value, you should not expect the fpp in real case would under the return value for certain. @param inputEntries @param bitSize @return
[ "Compute", "the", "false", "positive", "probability", "based", "on", "given", "input", "entries", "and", "bits", "size", ".", "Note", ":", "this", "is", "just", "the", "math", "expected", "value", "you", "should", "not", "expect", "the", "fpp", "in", "real...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/util/BloomFilter.java#L82-L87
train
Estimates the false positive probability for a given number of entries.
[ 30522, 2270, 10763, 3313, 10197, 7011, 4877, 13699, 20049, 6024, 21572, 3676, 8553, 1006, 2146, 7953, 4765, 5134, 1010, 20014, 9017, 4697, 1007, 1063, 20014, 16371, 2213, 11263, 27989, 1027, 15502, 19172, 11253, 14949, 2232, 11263, 27989, 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-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/HadoopConfigLoader.java
HadoopConfigLoader.loadHadoopConfigFromFlink
private org.apache.hadoop.conf.Configuration loadHadoopConfigFromFlink() { org.apache.hadoop.conf.Configuration hadoopConfig = new org.apache.hadoop.conf.Configuration(); for (String key : flinkConfig.keySet()) { for (String prefix : flinkConfigPrefixes) { if (key.startsWith(prefix)) { String newKey = h...
java
private org.apache.hadoop.conf.Configuration loadHadoopConfigFromFlink() { org.apache.hadoop.conf.Configuration hadoopConfig = new org.apache.hadoop.conf.Configuration(); for (String key : flinkConfig.keySet()) { for (String prefix : flinkConfigPrefixes) { if (key.startsWith(prefix)) { String newKey = h...
[ "private", "org", ".", "apache", ".", "hadoop", ".", "conf", ".", "Configuration", "loadHadoopConfigFromFlink", "(", ")", "{", "org", ".", "apache", ".", "hadoop", ".", "conf", ".", "Configuration", "hadoopConfig", "=", "new", "org", ".", "apache", ".", "h...
add additional config entries from the Flink config to the Hadoop config
[ "add", "additional", "config", "entries", "from", "the", "Flink", "config", "to", "the", "Hadoop", "config" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/HadoopConfigLoader.java#L95-L109
train
Load hadoop config from Flink config
[ 30522, 2797, 8917, 1012, 15895, 1012, 2018, 18589, 1012, 9530, 2546, 1012, 9563, 7170, 16102, 18589, 8663, 8873, 25708, 21716, 10258, 19839, 1006, 1007, 1063, 8917, 1012, 15895, 1012, 2018, 18589, 1012, 9530, 2546, 1012, 9563, 2018, 18589, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/rpc/FencedRpcEndpoint.java
FencedRpcEndpoint.runAsyncWithoutFencing
protected void runAsyncWithoutFencing(Runnable runnable) { if (rpcServer instanceof FencedMainThreadExecutable) { ((FencedMainThreadExecutable) rpcServer).runAsyncWithoutFencing(runnable); } else { throw new RuntimeException("FencedRpcEndpoint has not been started with a FencedMainThreadExecutable RpcServer."...
java
protected void runAsyncWithoutFencing(Runnable runnable) { if (rpcServer instanceof FencedMainThreadExecutable) { ((FencedMainThreadExecutable) rpcServer).runAsyncWithoutFencing(runnable); } else { throw new RuntimeException("FencedRpcEndpoint has not been started with a FencedMainThreadExecutable RpcServer."...
[ "protected", "void", "runAsyncWithoutFencing", "(", "Runnable", "runnable", ")", "{", "if", "(", "rpcServer", "instanceof", "FencedMainThreadExecutable", ")", "{", "(", "(", "FencedMainThreadExecutable", ")", "rpcServer", ")", ".", "runAsyncWithoutFencing", "(", "runn...
Run the given runnable in the main thread of the RpcEndpoint without checking the fencing token. This allows to run operations outside of the fencing token scope. @param runnable to execute in the main thread of the rpc endpoint without checking the fencing token.
[ "Run", "the", "given", "runnable", "in", "the", "main", "thread", "of", "the", "RpcEndpoint", "without", "checking", "the", "fencing", "token", ".", "This", "allows", "to", "run", "operations", "outside", "of", "the", "fencing", "token", "scope", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/FencedRpcEndpoint.java#L117-L123
train
Run the given runnable without fencing.
[ 30522, 5123, 11675, 2448, 3022, 6038, 2278, 24415, 5833, 18940, 6129, 1006, 2448, 22966, 2448, 22966, 1007, 1063, 2065, 1006, 1054, 15042, 8043, 6299, 6013, 11253, 8638, 22117, 22325, 28362, 9648, 2595, 8586, 23056, 1007, 1063, 1006, 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-runtime/src/main/java/org/apache/flink/runtime/operators/hash/CompactingHashTable.java
CompactingHashTable.open
@Override public void open() { synchronized (stateLock) { if (!closed) { throw new IllegalStateException("currently not closed."); } closed = false; } // create the partitions final int partitionFanOut = getPartitioningFanOutNoEstimates(this.availableMemory.size()); createPartitions(partitio...
java
@Override public void open() { synchronized (stateLock) { if (!closed) { throw new IllegalStateException("currently not closed."); } closed = false; } // create the partitions final int partitionFanOut = getPartitioningFanOutNoEstimates(this.availableMemory.size()); createPartitions(partitio...
[ "@", "Override", "public", "void", "open", "(", ")", "{", "synchronized", "(", "stateLock", ")", "{", "if", "(", "!", "closed", ")", "{", "throw", "new", "IllegalStateException", "(", "\"currently not closed.\"", ")", ";", "}", "closed", "=", "false", ";",...
Initialize the hash table
[ "Initialize", "the", "hash", "table" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/CompactingHashTable.java#L246-L264
train
Open the segment table.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2330, 1006, 1007, 1063, 25549, 1006, 2110, 7878, 1007, 1063, 2065, 1006, 999, 2701, 1007, 1063, 5466, 2047, 6206, 9153, 17389, 2595, 24422, 1006, 1000, 2747, 2025, 2701, 1012, 1000, 1007, 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/util/SegmentsUtil.java
SegmentsUtil.setDouble
public static void setDouble(MemorySegment[] segments, int offset, double value) { if (inFirstSegment(segments, offset, 8)) { segments[0].putDouble(offset, value); } else { setDoubleMultiSegments(segments, offset, value); } }
java
public static void setDouble(MemorySegment[] segments, int offset, double value) { if (inFirstSegment(segments, offset, 8)) { segments[0].putDouble(offset, value); } else { setDoubleMultiSegments(segments, offset, value); } }
[ "public", "static", "void", "setDouble", "(", "MemorySegment", "[", "]", "segments", ",", "int", "offset", ",", "double", "value", ")", "{", "if", "(", "inFirstSegment", "(", "segments", ",", "offset", ",", "8", ")", ")", "{", "segments", "[", "0", "]"...
set double from segments. @param segments target segments. @param offset value offset.
[ "set", "double", "from", "segments", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java#L930-L936
train
set double from segments.
[ 30522, 2270, 10763, 11675, 2275, 26797, 3468, 1006, 3638, 3366, 21693, 4765, 1031, 1033, 9214, 1010, 20014, 16396, 1010, 3313, 3643, 1007, 1063, 2065, 1006, 1999, 8873, 12096, 3366, 21693, 4765, 1006, 9214, 1010, 16396, 1010, 1022, 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-connectors/flink-orc/src/main/java/org/apache/flink/orc/OrcBatchReader.java
OrcBatchReader.fillColumnWithRepeatingValue
private static void fillColumnWithRepeatingValue(Object[] vals, int fieldIdx, Object repeatingValue, int childCount) { if (fieldIdx == -1) { // set value as an object Arrays.fill(vals, 0, childCount, repeatingValue); } else { // set value as a field of Row Row[] rows = (Row[]) vals; for (int i = 0; ...
java
private static void fillColumnWithRepeatingValue(Object[] vals, int fieldIdx, Object repeatingValue, int childCount) { if (fieldIdx == -1) { // set value as an object Arrays.fill(vals, 0, childCount, repeatingValue); } else { // set value as a field of Row Row[] rows = (Row[]) vals; for (int i = 0; ...
[ "private", "static", "void", "fillColumnWithRepeatingValue", "(", "Object", "[", "]", "vals", ",", "int", "fieldIdx", ",", "Object", "repeatingValue", ",", "int", "childCount", ")", "{", "if", "(", "fieldIdx", "==", "-", "1", ")", "{", "// set value as an obje...
Sets a repeating value to all objects or row fields of the passed vals array. @param vals The array of objects or Rows. @param fieldIdx If the objs array is an array of Row, the index of the field that needs to be filled. Otherwise a -1 must be passed and the data is directly filled into the array. @param repeatingVal...
[ "Sets", "a", "repeating", "value", "to", "all", "objects", "or", "row", "fields", "of", "the", "passed", "vals", "array", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-orc/src/main/java/org/apache/flink/orc/OrcBatchReader.java#L1122-L1134
train
Fill the column with a repeating value.
[ 30522, 2797, 10763, 11675, 6039, 25778, 2819, 2078, 24415, 2890, 5051, 5844, 10175, 5657, 1006, 4874, 1031, 1033, 11748, 2015, 1010, 20014, 2492, 3593, 2595, 1010, 4874, 15192, 10175, 5657, 1010, 20014, 2775, 3597, 16671, 1007, 1063, 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...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/instance/SlotSharingGroupAssignment.java
SlotSharingGroupAssignment.putIntoMultiMap
private static void putIntoMultiMap(Map<ResourceID, List<SharedSlot>> map, ResourceID location, SharedSlot slot) { List<SharedSlot> slotsForInstance = map.get(location); if (slotsForInstance == null) { slotsForInstance = new ArrayList<SharedSlot>(); map.put(location, slotsForInstance); } slotsForInstance....
java
private static void putIntoMultiMap(Map<ResourceID, List<SharedSlot>> map, ResourceID location, SharedSlot slot) { List<SharedSlot> slotsForInstance = map.get(location); if (slotsForInstance == null) { slotsForInstance = new ArrayList<SharedSlot>(); map.put(location, slotsForInstance); } slotsForInstance....
[ "private", "static", "void", "putIntoMultiMap", "(", "Map", "<", "ResourceID", ",", "List", "<", "SharedSlot", ">", ">", "map", ",", "ResourceID", "location", ",", "SharedSlot", "slot", ")", "{", "List", "<", "SharedSlot", ">", "slotsForInstance", "=", "map"...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/instance/SlotSharingGroupAssignment.java#L600-L607
train
Put into multi map.
[ 30522, 2797, 10763, 11675, 22072, 20389, 11314, 9581, 2361, 1006, 4949, 1026, 7692, 3593, 1010, 2862, 1026, 4207, 14540, 4140, 1028, 1028, 4949, 1010, 7692, 3593, 3295, 1010, 4207, 14540, 4140, 10453, 1007, 1063, 2862, 1026, 4207, 14540, 41...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Tailer.java
Tailer.readTail
private void readTail() throws IOException { final long len = this.randomAccessFile.length(); if (initReadLine > 0) { long start = this.randomAccessFile.getFilePointer(); long nextEnd = len - 1; this.randomAccessFile.seek(nextEnd); int c; int currentLine = 0; while (nextEnd > start) { ...
java
private void readTail() throws IOException { final long len = this.randomAccessFile.length(); if (initReadLine > 0) { long start = this.randomAccessFile.getFilePointer(); long nextEnd = len - 1; this.randomAccessFile.seek(nextEnd); int c; int currentLine = 0; while (nextEnd > start) { ...
[ "private", "void", "readTail", "(", ")", "throws", "IOException", "{", "final", "long", "len", "=", "this", ".", "randomAccessFile", ".", "length", "(", ")", ";", "if", "(", "initReadLine", ">", "0", ")", "{", "long", "start", "=", "this", ".", "random...
预读取行 @throws IOException
[ "预读取行" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/file/Tailer.java#L139-L175
train
Reads the tail of the file.
[ 30522, 2797, 11675, 3191, 14162, 1006, 1007, 11618, 22834, 10288, 24422, 1063, 2345, 2146, 18798, 1027, 2023, 1012, 6721, 6305, 9623, 22747, 9463, 1012, 3091, 1006, 1007, 1025, 2065, 1006, 1999, 4183, 16416, 19422, 3170, 1028, 1014, 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...
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java
Http2ConnectionHandler.goAway
private ChannelFuture goAway(ChannelHandlerContext ctx, Http2Exception cause, ChannelPromise promise) { long errorCode = cause != null ? cause.error().code() : NO_ERROR.code(); int lastKnownStream = connection().remote().lastStreamCreated(); return goAway(ctx, lastKnownStream, errorCode, Http2Co...
java
private ChannelFuture goAway(ChannelHandlerContext ctx, Http2Exception cause, ChannelPromise promise) { long errorCode = cause != null ? cause.error().code() : NO_ERROR.code(); int lastKnownStream = connection().remote().lastStreamCreated(); return goAway(ctx, lastKnownStream, errorCode, Http2Co...
[ "private", "ChannelFuture", "goAway", "(", "ChannelHandlerContext", "ctx", ",", "Http2Exception", "cause", ",", "ChannelPromise", "promise", ")", "{", "long", "errorCode", "=", "cause", "!=", "null", "?", "cause", ".", "error", "(", ")", ".", "code", "(", ")...
Close the remote endpoint with with a {@code GO_AWAY} frame. Does <strong>not</strong> flush immediately, this is the responsibility of the caller.
[ "Close", "the", "remote", "endpoint", "with", "with", "a", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java#L873-L877
train
Away to the server.
[ 30522, 2797, 3149, 11263, 11244, 15244, 4576, 1006, 3149, 11774, 3917, 8663, 18209, 14931, 2595, 1010, 8299, 2475, 10288, 24422, 3426, 1010, 3149, 21572, 28732, 4872, 1007, 1063, 2146, 7561, 16044, 1027, 3426, 999, 1027, 19701, 1029, 3426, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java
ConcurrentKafkaListenerContainerFactoryConfigurer.configure
public void configure( ConcurrentKafkaListenerContainerFactory<Object, Object> listenerFactory, ConsumerFactory<Object, Object> consumerFactory) { listenerFactory.setConsumerFactory(consumerFactory); configureListenerFactory(listenerFactory); configureContainer(listenerFactory.getContainerProperties()); }
java
public void configure( ConcurrentKafkaListenerContainerFactory<Object, Object> listenerFactory, ConsumerFactory<Object, Object> consumerFactory) { listenerFactory.setConsumerFactory(consumerFactory); configureListenerFactory(listenerFactory); configureContainer(listenerFactory.getContainerProperties()); }
[ "public", "void", "configure", "(", "ConcurrentKafkaListenerContainerFactory", "<", "Object", ",", "Object", ">", "listenerFactory", ",", "ConsumerFactory", "<", "Object", ",", "Object", ">", "consumerFactory", ")", "{", "listenerFactory", ".", "setConsumerFactory", "...
Configure the specified Kafka listener container factory. The factory can be further tuned and default settings can be overridden. @param listenerFactory the {@link ConcurrentKafkaListenerContainerFactory} instance to configure @param consumerFactory the {@link ConsumerFactory} to use
[ "Configure", "the", "specified", "Kafka", "listener", "container", "factory", ".", "The", "factory", "can", "be", "further", "tuned", "and", "default", "settings", "can", "be", "overridden", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java#L121-L127
train
Configure the Kafka listener container factory and consumer factory.
[ 30522, 2270, 11675, 9530, 8873, 27390, 2063, 1006, 16483, 2912, 24316, 13911, 6528, 2121, 8663, 18249, 2121, 21450, 1026, 4874, 1010, 4874, 1028, 19373, 21450, 1010, 7325, 21450, 1026, 4874, 1010, 4874, 1028, 7325, 21450, 1007, 1063, 19373, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/state/StateDescriptor.java
StateDescriptor.getDefaultValue
public T getDefaultValue() { if (defaultValue != null) { if (serializer != null) { return serializer.copy(defaultValue); } else { throw new IllegalStateException("Serializer not yet initialized."); } } else { return null; } }
java
public T getDefaultValue() { if (defaultValue != null) { if (serializer != null) { return serializer.copy(defaultValue); } else { throw new IllegalStateException("Serializer not yet initialized."); } } else { return null; } }
[ "public", "T", "getDefaultValue", "(", ")", "{", "if", "(", "defaultValue", "!=", "null", ")", "{", "if", "(", "serializer", "!=", "null", ")", "{", "return", "serializer", ".", "copy", "(", "defaultValue", ")", ";", "}", "else", "{", "throw", "new", ...
Returns the default value.
[ "Returns", "the", "default", "value", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java#L176-L186
train
Returns the default value.
[ 30522, 2270, 1056, 2131, 3207, 7011, 11314, 10175, 5657, 1006, 1007, 1063, 2065, 1006, 12398, 10175, 5657, 999, 1027, 19701, 1007, 1063, 2065, 1006, 7642, 17629, 999, 1027, 19701, 1007, 1063, 2709, 7642, 17629, 1012, 6100, 1006, 12398, 1017...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/TaskSlot.java
TaskSlot.generateSlotOffer
public SlotOffer generateSlotOffer() { Preconditions.checkState(TaskSlotState.ACTIVE == state || TaskSlotState.ALLOCATED == state, "The task slot is not in state active or allocated."); Preconditions.checkState(allocationId != null, "The task slot are not allocated"); return new SlotOffer(allocationId, index,...
java
public SlotOffer generateSlotOffer() { Preconditions.checkState(TaskSlotState.ACTIVE == state || TaskSlotState.ALLOCATED == state, "The task slot is not in state active or allocated."); Preconditions.checkState(allocationId != null, "The task slot are not allocated"); return new SlotOffer(allocationId, index,...
[ "public", "SlotOffer", "generateSlotOffer", "(", ")", "{", "Preconditions", ".", "checkState", "(", "TaskSlotState", ".", "ACTIVE", "==", "state", "||", "TaskSlotState", ".", "ALLOCATED", "==", "state", ",", "\"The task slot is not in state active or allocated.\"", ")",...
Generate the slot offer from this TaskSlot. @return The sot offer which this task slot can provide
[ "Generate", "the", "slot", "offer", "from", "this", "TaskSlot", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlot.java#L295-L301
train
Generates a slot offer.
[ 30522, 2270, 10453, 7245, 2121, 19421, 10994, 7245, 2121, 1006, 1007, 1063, 3653, 8663, 20562, 2015, 1012, 14148, 12259, 1006, 8518, 10994, 9153, 2618, 1012, 3161, 1027, 1027, 2110, 1064, 1064, 8518, 10994, 9153, 2618, 1012, 11095, 1027, 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-core/src/main/java/cn/hutool/core/util/XmlUtil.java
XmlUtil.getByXPath
public static Object getByXPath(String expression, Object source, QName returnType) { final XPath xPath = createXPath(); try { if (source instanceof InputSource) { return xPath.evaluate(expression, (InputSource) source, returnType); } else { return xPath.evaluate(expression, source, returnType);...
java
public static Object getByXPath(String expression, Object source, QName returnType) { final XPath xPath = createXPath(); try { if (source instanceof InputSource) { return xPath.evaluate(expression, (InputSource) source, returnType); } else { return xPath.evaluate(expression, source, returnType);...
[ "public", "static", "Object", "getByXPath", "(", "String", "expression", ",", "Object", "source", ",", "QName", "returnType", ")", "{", "final", "XPath", "xPath", "=", "createXPath", "(", ")", ";", "try", "{", "if", "(", "source", "instanceof", "InputSource"...
通过XPath方式读取XML节点等信息<br> Xpath相关文章:https://www.ibm.com/developerworks/cn/xml/x-javaxpathapi.html @param expression XPath表达式 @param source 资源,可以是Docunent、Node节点等 @param returnType 返回类型,{@link javax.xml.xpath.XPathConstants} @return 匹配返回类型的值 @since 3.2.0
[ "通过XPath方式读取XML节点等信息<br", ">", "Xpath相关文章:https", ":", "//", "www", ".", "ibm", ".", "com", "/", "developerworks", "/", "cn", "/", "xml", "/", "x", "-", "javaxpathapi", ".", "html" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java#L612-L623
train
Gets the result of an XPath expression on the given source object using the given return type.
[ 30522, 2270, 10763, 4874, 2131, 3762, 2595, 15069, 1006, 5164, 3670, 1010, 4874, 3120, 1010, 1053, 18442, 2709, 13874, 1007, 1063, 2345, 26726, 8988, 26726, 8988, 1027, 3443, 2595, 15069, 1006, 1007, 1025, 3046, 1063, 2065, 1006, 3120, 6013...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-connectors/flink-connector-kafka-0.9/src/main/java/org/apache/flink/streaming/connectors/kafka/internal/Kafka09Fetcher.java
Kafka09Fetcher.createKafkaPartitionHandle
@Override public TopicPartition createKafkaPartitionHandle(KafkaTopicPartition partition) { return new TopicPartition(partition.getTopic(), partition.getPartition()); }
java
@Override public TopicPartition createKafkaPartitionHandle(KafkaTopicPartition partition) { return new TopicPartition(partition.getTopic(), partition.getPartition()); }
[ "@", "Override", "public", "TopicPartition", "createKafkaPartitionHandle", "(", "KafkaTopicPartition", "partition", ")", "{", "return", "new", "TopicPartition", "(", "partition", ".", "getTopic", "(", ")", ",", "partition", ".", "getPartition", "(", ")", ")", ";",...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-0.9/src/main/java/org/apache/flink/streaming/connectors/kafka/internal/Kafka09Fetcher.java#L215-L218
train
Create a Kafka partition handle.
[ 30522, 1030, 2058, 15637, 2270, 8476, 19362, 3775, 3508, 3443, 2912, 24316, 22068, 28228, 3508, 11774, 2571, 1006, 10556, 24316, 10610, 24330, 19362, 3775, 3508, 13571, 1007, 1063, 2709, 2047, 8476, 19362, 3775, 3508, 1006, 13571, 1012, 2131,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/bind/RelaxedDataBinder.java
RelaxedDataBinder.normalizePath
protected String normalizePath(BeanWrapper wrapper, String path) { return initializePath(wrapper, new RelaxedDataBinder.BeanPath(path), 0); }
java
protected String normalizePath(BeanWrapper wrapper, String path) { return initializePath(wrapper, new RelaxedDataBinder.BeanPath(path), 0); }
[ "protected", "String", "normalizePath", "(", "BeanWrapper", "wrapper", ",", "String", "path", ")", "{", "return", "initializePath", "(", "wrapper", ",", "new", "RelaxedDataBinder", ".", "BeanPath", "(", "path", ")", ",", "0", ")", ";", "}" ]
Normalize a bean property path to a format understood by a BeanWrapper. This is used so that <ul> <li>Fuzzy matching can be employed for bean property names</li> <li>Period separators can be used instead of indexing ([...]) for map keys</li> </ul> @param wrapper a bean wrapper for the object to bind @param path the be...
[ "Normalize", "a", "bean", "property", "path", "to", "a", "format", "understood", "by", "a", "BeanWrapper", ".", "This", "is", "used", "so", "that", "<ul", ">", "<li", ">", "Fuzzy", "matching", "can", "be", "employed", "for", "bean", "property", "names<", ...
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/bind/RelaxedDataBinder.java#L239-L241
train
Normalize the path.
[ 30522, 5123, 5164, 3671, 4697, 15069, 1006, 14068, 13088, 29098, 2121, 10236, 4842, 1010, 5164, 4130, 1007, 1063, 2709, 3988, 4697, 15069, 1006, 10236, 4842, 1010, 2047, 8363, 2850, 2696, 8428, 4063, 1012, 14068, 15069, 1006, 4130, 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...
looly/hutool
hutool-socket/src/main/java/cn/hutool/socket/aio/AioSession.java
AioSession.closeOut
public AioSession closeOut() { if (null != this.channel) { try { this.channel.shutdownOutput(); } catch (IOException e) { throw new IORuntimeException(e); } } return this; }
java
public AioSession closeOut() { if (null != this.channel) { try { this.channel.shutdownOutput(); } catch (IOException e) { throw new IORuntimeException(e); } } return this; }
[ "public", "AioSession", "closeOut", "(", ")", "{", "if", "(", "null", "!=", "this", ".", "channel", ")", "{", "try", "{", "this", ".", "channel", ".", "shutdownOutput", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "throw", "new", ...
关闭输出 @return this
[ "关闭输出" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-socket/src/main/java/cn/hutool/socket/aio/AioSession.java#L179-L188
train
Closes the output stream.
[ 30522, 2270, 9932, 27465, 10992, 2485, 5833, 1006, 1007, 1063, 2065, 1006, 19701, 999, 1027, 2023, 1012, 3149, 1007, 1063, 3046, 1063, 2023, 1012, 3149, 1012, 3844, 7698, 5833, 18780, 1006, 1007, 1025, 1065, 4608, 1006, 22834, 10288, 24422,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/NetUtils.java
NetUtils.getHostnameFromFQDN
public static String getHostnameFromFQDN(String fqdn) { if (fqdn == null) { throw new IllegalArgumentException("fqdn is null"); } int dotPos = fqdn.indexOf('.'); if (dotPos == -1) { return fqdn; } else { return fqdn.substring(0, dotPos); } }
java
public static String getHostnameFromFQDN(String fqdn) { if (fqdn == null) { throw new IllegalArgumentException("fqdn is null"); } int dotPos = fqdn.indexOf('.'); if (dotPos == -1) { return fqdn; } else { return fqdn.substring(0, dotPos); } }
[ "public", "static", "String", "getHostnameFromFQDN", "(", "String", "fqdn", ")", "{", "if", "(", "fqdn", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"fqdn is null\"", ")", ";", "}", "int", "dotPos", "=", "fqdn", ".", "indexOf",...
Turn a fully qualified domain name (fqdn) into a hostname. If the fqdn has multiple subparts (separated by a period '.'), it will take the first part. Otherwise it takes the entire fqdn. @param fqdn The fully qualified domain name. @return The hostname.
[ "Turn", "a", "fully", "qualified", "domain", "name", "(", "fqdn", ")", "into", "a", "hostname", ".", "If", "the", "fqdn", "has", "multiple", "subparts", "(", "separated", "by", "a", "period", ".", ")", "it", "will", "take", "the", "first", "part", ".",...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/NetUtils.java#L59-L69
train
Get the hostname from a FQDN.
[ 30522, 2270, 10763, 5164, 2131, 15006, 2102, 18442, 19699, 5358, 2546, 4160, 2094, 2078, 1006, 5164, 1042, 4160, 2094, 2078, 1007, 1063, 2065, 1006, 1042, 4160, 2094, 2078, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 6206, 2906, 22850, 15781...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-java/src/main/java/org/apache/flink/api/java/DataSet.java
DataSet.write
public DataSink<T> write(FileOutputFormat<T> outputFormat, String filePath) { Preconditions.checkNotNull(filePath, "File path must not be null."); Preconditions.checkNotNull(outputFormat, "Output format must not be null."); outputFormat.setOutputFilePath(new Path(filePath)); return output(outputFormat); }
java
public DataSink<T> write(FileOutputFormat<T> outputFormat, String filePath) { Preconditions.checkNotNull(filePath, "File path must not be null."); Preconditions.checkNotNull(outputFormat, "Output format must not be null."); outputFormat.setOutputFilePath(new Path(filePath)); return output(outputFormat); }
[ "public", "DataSink", "<", "T", ">", "write", "(", "FileOutputFormat", "<", "T", ">", "outputFormat", ",", "String", "filePath", ")", "{", "Preconditions", ".", "checkNotNull", "(", "filePath", ",", "\"File path must not be null.\"", ")", ";", "Preconditions", "...
Writes a DataSet using a {@link FileOutputFormat} to a specified location. This method adds a data sink to the program. @param outputFormat The FileOutputFormat to write the DataSet. @param filePath The path to the location where the DataSet is written. @return The DataSink that writes the DataSet. @see FileOutputFor...
[ "Writes", "a", "DataSet", "using", "a", "{", "@link", "FileOutputFormat", "}", "to", "a", "specified", "location", ".", "This", "method", "adds", "a", "data", "sink", "to", "the", "program", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L1740-L1746
train
Writes the data to the file specified by the given path using the specified output format.
[ 30522, 2270, 2951, 11493, 2243, 1026, 1056, 1028, 4339, 1006, 5371, 5833, 18780, 14192, 4017, 1026, 1056, 1028, 6434, 14192, 4017, 1010, 5164, 5371, 15069, 1007, 1063, 3653, 8663, 20562, 2015, 1012, 4638, 17048, 11231, 3363, 1006, 5371, 150...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/RestClientConfiguration.java
RestClientConfiguration.fromConfiguration
public static RestClientConfiguration fromConfiguration(Configuration config) throws ConfigurationException { Preconditions.checkNotNull(config); final SSLHandlerFactory sslHandlerFactory; if (SSLUtils.isRestSSLEnabled(config)) { try { sslHandlerFactory = SSLUtils.createRestClientSSLEngineFactory(config);...
java
public static RestClientConfiguration fromConfiguration(Configuration config) throws ConfigurationException { Preconditions.checkNotNull(config); final SSLHandlerFactory sslHandlerFactory; if (SSLUtils.isRestSSLEnabled(config)) { try { sslHandlerFactory = SSLUtils.createRestClientSSLEngineFactory(config);...
[ "public", "static", "RestClientConfiguration", "fromConfiguration", "(", "Configuration", "config", ")", "throws", "ConfigurationException", "{", "Preconditions", ".", "checkNotNull", "(", "config", ")", ";", "final", "SSLHandlerFactory", "sslHandlerFactory", ";", "if", ...
Creates and returns a new {@link RestClientConfiguration} from the given {@link Configuration}. @param config configuration from which the REST client endpoint configuration should be created from @return REST client endpoint configuration @throws ConfigurationException if SSL was configured incorrectly
[ "Creates", "and", "returns", "a", "new", "{", "@link", "RestClientConfiguration", "}", "from", "the", "given", "{", "@link", "Configuration", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClientConfiguration.java#L100-L121
train
Creates a new RestClientConfiguration from the given configuration.
[ 30522, 2270, 10763, 2717, 20464, 11638, 8663, 8873, 27390, 3370, 2013, 8663, 8873, 27390, 3370, 1006, 9563, 9530, 8873, 2290, 1007, 11618, 9563, 10288, 24422, 1063, 3653, 8663, 20562, 2015, 1012, 4638, 17048, 11231, 3363, 1006, 9530, 8873, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
networknt/light-4j
registry/src/main/java/com/networknt/registry/URLImpl.java
URLImpl.canServe
@Override public boolean canServe(URL refUrl) { if (refUrl == null || !this.getPath().equals(refUrl.getPath())) { return false; } if(!protocol.equals(refUrl.getProtocol())) { return false; } if (!Constants.NODE_TYPE_SERVICE.equals(this.getParameter(U...
java
@Override public boolean canServe(URL refUrl) { if (refUrl == null || !this.getPath().equals(refUrl.getPath())) { return false; } if(!protocol.equals(refUrl.getProtocol())) { return false; } if (!Constants.NODE_TYPE_SERVICE.equals(this.getParameter(U...
[ "@", "Override", "public", "boolean", "canServe", "(", "URL", "refUrl", ")", "{", "if", "(", "refUrl", "==", "null", "||", "!", "this", ".", "getPath", "(", ")", ".", "equals", "(", "refUrl", ".", "getPath", "(", ")", ")", ")", "{", "return", "fals...
check if this url can serve the refUrl. @param refUrl a URL object @return boolean true can serve
[ "check", "if", "this", "url", "can", "serve", "the", "refUrl", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/registry/src/main/java/com/networknt/registry/URLImpl.java#L348-L376
train
Check if this URL can serve the given refUrl.
[ 30522, 1030, 2058, 15637, 2270, 22017, 20898, 18484, 2121, 3726, 1006, 24471, 2140, 25416, 3126, 2140, 1007, 1063, 2065, 1006, 25416, 3126, 2140, 1027, 1027, 19701, 1064, 1064, 999, 2023, 1012, 2131, 15069, 1006, 1007, 1012, 19635, 1006, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatEmbeddedContext.java
TomcatEmbeddedContext.doWithThreadContextClassLoader
private void doWithThreadContextClassLoader(ClassLoader classLoader, Runnable code) { ClassLoader existingLoader = (classLoader != null) ? ClassUtils.overrideThreadContextClassLoader(classLoader) : null; try { code.run(); } finally { if (existingLoader != null) { ClassUtils.overrideThreadContextCl...
java
private void doWithThreadContextClassLoader(ClassLoader classLoader, Runnable code) { ClassLoader existingLoader = (classLoader != null) ? ClassUtils.overrideThreadContextClassLoader(classLoader) : null; try { code.run(); } finally { if (existingLoader != null) { ClassUtils.overrideThreadContextCl...
[ "private", "void", "doWithThreadContextClassLoader", "(", "ClassLoader", "classLoader", ",", "Runnable", "code", ")", "{", "ClassLoader", "existingLoader", "=", "(", "classLoader", "!=", "null", ")", "?", "ClassUtils", ".", "overrideThreadContextClassLoader", "(", "cl...
Some older Servlet frameworks (e.g. Struts, BIRT) use the Thread context class loader to create servlet instances in this phase. If they do that and then try to initialize them later the class loader may have changed, so wrap the call to loadOnStartup in what we think its going to be the main webapp classloader at runt...
[ "Some", "older", "Servlet", "frameworks", "(", "e", ".", "g", ".", "Struts", "BIRT", ")", "use", "the", "Thread", "context", "class", "loader", "to", "create", "servlet", "instances", "in", "this", "phase", ".", "If", "they", "do", "that", "and", "then",...
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatEmbeddedContext.java#L104-L115
train
Do with thread context classloader.
[ 30522, 2797, 11675, 23268, 8939, 2705, 16416, 16409, 28040, 18413, 26266, 11066, 2121, 1006, 2465, 11066, 2121, 2465, 11066, 2121, 1010, 2448, 22966, 30524, 1024, 19701, 1025, 3046, 1063, 3642, 1012, 2448, 1006, 1007, 1025, 1065, 2633, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.formatBetween
public static String formatBetween(Date beginDate, Date endDate, BetweenFormater.Level level) { return formatBetween(between(beginDate, endDate, DateUnit.MS), level); }
java
public static String formatBetween(Date beginDate, Date endDate, BetweenFormater.Level level) { return formatBetween(between(beginDate, endDate, DateUnit.MS), level); }
[ "public", "static", "String", "formatBetween", "(", "Date", "beginDate", ",", "Date", "endDate", ",", "BetweenFormater", ".", "Level", "level", ")", "{", "return", "formatBetween", "(", "between", "(", "beginDate", ",", "endDate", ",", "DateUnit", ".", "MS", ...
格式化日期间隔输出 @param beginDate 起始日期 @param endDate 结束日期 @param level 级别,按照天、小时、分、秒、毫秒分为5个等级 @return XX天XX小时XX分XX秒
[ "格式化日期间隔输出" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L1318-L1320
train
Format between.
[ 30522, 2270, 10763, 5164, 4289, 20915, 28394, 2078, 1006, 3058, 4088, 13701, 1010, 3058, 2203, 13701, 1010, 2090, 14192, 24932, 1012, 2504, 2504, 1007, 1063, 2709, 4289, 20915, 28394, 2078, 1006, 2090, 1006, 4088, 13701, 1010, 2203, 13701, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...