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
hankcs/HanLP
src/main/java/com/hankcs/hanlp/model/crf/CRFModel.java
CRFModel.tag
public void tag(Table table) { int size = table.size(); if (size == 0) return; int tagSize = id2tag.length; double[][] net = new double[size][tagSize]; for (int i = 0; i < size; ++i) { LinkedList<double[]> scoreList = computeScoreList(table, i); ...
java
public void tag(Table table) { int size = table.size(); if (size == 0) return; int tagSize = id2tag.length; double[][] net = new double[size][tagSize]; for (int i = 0; i < size; ++i) { LinkedList<double[]> scoreList = computeScoreList(table, i); ...
[ "public", "void", "tag", "(", "Table", "table", ")", "{", "int", "size", "=", "table", ".", "size", "(", ")", ";", "if", "(", "size", "==", "0", ")", "return", ";", "int", "tagSize", "=", "id2tag", ".", "length", ";", "double", "[", "]", "[", "...
维特比后向算法标注 @param table
[ "维特比后向算法标注" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/crf/CRFModel.java#L194-L269
train
Tag a table.
[ 30522, 2270, 11675, 6415, 1006, 2795, 2795, 1007, 1063, 20014, 2946, 1027, 2795, 1012, 2946, 1006, 1007, 1025, 2065, 1006, 2946, 1027, 1027, 1014, 1007, 2709, 1025, 20014, 22073, 4697, 1027, 8909, 2475, 15900, 1012, 3091, 1025, 3313, 1031, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/tokenizer/lexical/AbstractLexicalAnalyzer.java
AbstractLexicalAnalyzer.combineWords
private static void combineWords(String[] wordNet, int start, int end, CoreDictionary.Attribute[] attributeArray, CoreDictionary.Attribute value) { if (start + 1 != end) // 小优化,如果只有一个词,那就不需要合并,直接应用新属性 { StringBuilder sbTerm = new StringBuilder(); for (int j = start; j < end...
java
private static void combineWords(String[] wordNet, int start, int end, CoreDictionary.Attribute[] attributeArray, CoreDictionary.Attribute value) { if (start + 1 != end) // 小优化,如果只有一个词,那就不需要合并,直接应用新属性 { StringBuilder sbTerm = new StringBuilder(); for (int j = start; j < end...
[ "private", "static", "void", "combineWords", "(", "String", "[", "]", "wordNet", ",", "int", "start", ",", "int", "end", ",", "CoreDictionary", ".", "Attribute", "[", "]", "attributeArray", ",", "CoreDictionary", ".", "Attribute", "value", ")", "{", "if", ...
将连续的词语合并为一个 @param wordNet 词图 @param start 起始下标(包含) @param end 结束下标(不包含) @param value 新的属性
[ "将连续的词语合并为一个" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/tokenizer/lexical/AbstractLexicalAnalyzer.java#L710-L724
train
Combine words.
[ 30522, 2797, 10763, 11675, 11506, 22104, 1006, 5164, 1031, 1033, 2773, 7159, 1010, 20014, 2707, 1010, 20014, 2203, 1010, 4563, 29201, 3258, 5649, 1012, 17961, 1031, 1033, 17961, 2906, 9447, 1010, 4563, 29201, 3258, 5649, 1012, 17961, 3643, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlFunctionUtils.java
SqlFunctionUtils.rpad
public static String rpad(String base, int len, String pad) { if (len < 0 || "".equals(pad)) { return null; } else if (len == 0) { return ""; } char[] data = new char[len]; char[] baseChars = base.toCharArray(); char[] padChars = pad.toCharArray(); int pos = 0; // copy the base while (pos < b...
java
public static String rpad(String base, int len, String pad) { if (len < 0 || "".equals(pad)) { return null; } else if (len == 0) { return ""; } char[] data = new char[len]; char[] baseChars = base.toCharArray(); char[] padChars = pad.toCharArray(); int pos = 0; // copy the base while (pos < b...
[ "public", "static", "String", "rpad", "(", "String", "base", ",", "int", "len", ",", "String", "pad", ")", "{", "if", "(", "len", "<", "0", "||", "\"\"", ".", "equals", "(", "pad", ")", ")", "{", "return", "null", ";", "}", "else", "if", "(", "...
Returns the string str right-padded with the string pad to a length of len characters. If str is longer than len, the return value is shortened to len characters.
[ "Returns", "the", "string", "str", "right", "-", "padded", "with", "the", "string", "pad", "to", "a", "length", "of", "len", "characters", ".", "If", "str", "is", "longer", "than", "len", "the", "return", "value", "is", "shortened", "to", "len", "charact...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlFunctionUtils.java#L256-L286
train
Returns a string that is padded with the specified string.
[ 30522, 2270, 10763, 5164, 1054, 15455, 1006, 5164, 2918, 1010, 20014, 18798, 1010, 5164, 11687, 1007, 1063, 2065, 1006, 18798, 1026, 1014, 1064, 1064, 1000, 1000, 1012, 19635, 1006, 11687, 1007, 1007, 1063, 2709, 19701, 1025, 1065, 2842, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.listFileNames
public static List<String> listFileNames(String path) throws IORuntimeException { if (path == null) { return null; } List<String> paths = new ArrayList<String>(); int index = path.lastIndexOf(FileUtil.JAR_PATH_EXT); if (index == -1) { // 普通目录路径 File[] files = ls(path); for (File file : ...
java
public static List<String> listFileNames(String path) throws IORuntimeException { if (path == null) { return null; } List<String> paths = new ArrayList<String>(); int index = path.lastIndexOf(FileUtil.JAR_PATH_EXT); if (index == -1) { // 普通目录路径 File[] files = ls(path); for (File file : ...
[ "public", "static", "List", "<", "String", ">", "listFileNames", "(", "String", "path", ")", "throws", "IORuntimeException", "{", "if", "(", "path", "==", "null", ")", "{", "return", "null", ";", "}", "List", "<", "String", ">", "paths", "=", "new", "A...
获得指定目录下所有文件<br> 不会扫描子目录 @param path 相对ClassPath的目录或者绝对路径目录 @return 文件路径列表(如果是jar中的文件,则给定类似.jar!/xxx/xxx的路径) @throws IORuntimeException IO异常
[ "获得指定目录下所有文件<br", ">", "不会扫描子目录" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L252-L295
train
Returns a list of file names from the specified path.
[ 30522, 2270, 10763, 2862, 1026, 5164, 1028, 2862, 8873, 20844, 7834, 1006, 5164, 4130, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 2065, 1006, 4130, 1027, 1027, 19701, 1007, 1063, 2709, 19701, 1025, 1065, 2862, 1026, 5164, 1028, 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...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java
HttpUtil.getContentLength
public static long getContentLength(HttpMessage message, long defaultValue) { String value = message.headers().get(HttpHeaderNames.CONTENT_LENGTH); if (value != null) { return Long.parseLong(value); } // We know the content length if it's a Web Socket message even if ...
java
public static long getContentLength(HttpMessage message, long defaultValue) { String value = message.headers().get(HttpHeaderNames.CONTENT_LENGTH); if (value != null) { return Long.parseLong(value); } // We know the content length if it's a Web Socket message even if ...
[ "public", "static", "long", "getContentLength", "(", "HttpMessage", "message", ",", "long", "defaultValue", ")", "{", "String", "value", "=", "message", ".", "headers", "(", ")", ".", "get", "(", "HttpHeaderNames", ".", "CONTENT_LENGTH", ")", ";", "if", "(",...
Returns the length of the content or the specified default value if the message does not have the {@code "Content-Length" header}. Please note that this value is not retrieved from {@link HttpContent#content()} but from the {@code "Content-Length"} header, and thus they are independent from each other. @param message ...
[ "Returns", "the", "length", "of", "the", "content", "or", "the", "specified", "default", "value", "if", "the", "message", "does", "not", "have", "the", "{", "@code", "Content", "-", "Length", "header", "}", ".", "Please", "note", "that", "this", "value", ...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java#L171-L186
train
Gets the content length of the message.
[ 30522, 2270, 10763, 2146, 2131, 8663, 6528, 9286, 3070, 2705, 1006, 8299, 7834, 3736, 3351, 4471, 1010, 2146, 12398, 10175, 5657, 1007, 1063, 5164, 3643, 1027, 4471, 1012, 20346, 2015, 1006, 1007, 1012, 2131, 1006, 8299, 4974, 11795, 14074,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-libraries/flink-gelly/src/main/java/org/apache/flink/graph/spargel/ScatterGatherIteration.java
ScatterGatherIteration.createResultSimpleVertex
private DataSet<Vertex<K, VV>> createResultSimpleVertex(EdgeDirection messagingDirection, TypeInformation<Tuple2<K, Message>> messageTypeInfo, DataSet<LongValue> numberOfVertices) { DataSet<Tuple2<K, Message>> messages; TypeInformation<Vertex<K, VV>> vertexTypes = initialVertices.getType(); final DeltaIterat...
java
private DataSet<Vertex<K, VV>> createResultSimpleVertex(EdgeDirection messagingDirection, TypeInformation<Tuple2<K, Message>> messageTypeInfo, DataSet<LongValue> numberOfVertices) { DataSet<Tuple2<K, Message>> messages; TypeInformation<Vertex<K, VV>> vertexTypes = initialVertices.getType(); final DeltaIterat...
[ "private", "DataSet", "<", "Vertex", "<", "K", ",", "VV", ">", ">", "createResultSimpleVertex", "(", "EdgeDirection", "messagingDirection", ",", "TypeInformation", "<", "Tuple2", "<", "K", ",", "Message", ">", ">", "messageTypeInfo", ",", "DataSet", "<", "Long...
Creates the operator that represents this scatter-gather graph computation for a simple vertex. @param messagingDirection @param messageTypeInfo @param numberOfVertices @return the operator
[ "Creates", "the", "operator", "that", "represents", "this", "scatter", "-", "gather", "graph", "computation", "for", "a", "simple", "vertex", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/spargel/ScatterGatherIteration.java#L559-L598
train
Create a result vertex using the given parameters.
[ 30522, 2797, 2951, 13462, 1026, 19449, 1026, 1047, 1010, 1058, 2615, 1028, 1028, 3443, 6072, 11314, 5332, 23344, 16874, 10288, 1006, 13011, 7442, 7542, 24732, 4305, 2890, 7542, 1010, 2828, 2378, 14192, 3370, 1026, 10722, 10814, 2475, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/dartsclone/DoubleArray.java
DoubleArray.save
public void save(OutputStream stream) throws IOException { DataOutputStream out = null; try { out = new DataOutputStream(new BufferedOutputStream( stream)); for (int i = 0; i < _array.length; ++i) { out.writeInt(_array[i...
java
public void save(OutputStream stream) throws IOException { DataOutputStream out = null; try { out = new DataOutputStream(new BufferedOutputStream( stream)); for (int i = 0; i < _array.length; ++i) { out.writeInt(_array[i...
[ "public", "void", "save", "(", "OutputStream", "stream", ")", "throws", "IOException", "{", "DataOutputStream", "out", "=", "null", ";", "try", "{", "out", "=", "new", "DataOutputStream", "(", "new", "BufferedOutputStream", "(", "stream", ")", ")", ";", "for...
Saves the trie data into a stream. @param stream @throws java.io.IOException
[ "Saves", "the", "trie", "data", "into", "a", "stream", "." ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/dartsclone/DoubleArray.java#L91-L110
train
Saves the array to the specified output stream.
[ 30522, 2270, 11675, 3828, 1006, 27852, 25379, 5460, 1007, 11618, 22834, 10288, 24422, 1063, 2951, 5833, 18780, 21422, 2041, 1027, 19701, 1025, 3046, 1063, 2041, 1027, 2047, 2951, 5833, 18780, 21422, 1006, 2047, 17698, 26010, 4904, 18780, 2142...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/text/StrBuilder.java
StrBuilder.del
public StrBuilder del(int start, int end) { if (start < 0) { start = 0; } if (end > this.position) { end = this.position; } if (start > end) { throw new StringIndexOutOfBoundsException("Start is greater than End."); } if (end == this.position) { this.position = start; } int len = end - st...
java
public StrBuilder del(int start, int end) { if (start < 0) { start = 0; } if (end > this.position) { end = this.position; } if (start > end) { throw new StringIndexOutOfBoundsException("Start is greater than End."); } if (end == this.position) { this.position = start; } int len = end - st...
[ "public", "StrBuilder", "del", "(", "int", "start", ",", "int", "end", ")", "{", "if", "(", "start", "<", "0", ")", "{", "start", "=", "0", ";", "}", "if", "(", "end", ">", "this", ".", "position", ")", "{", "end", "=", "this", ".", "position",...
删除指定长度的字符 @param start 开始位置(包括) @param end 结束位置(不包括) @return this
[ "删除指定长度的字符" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/text/StrBuilder.java#L377-L397
train
Deletes the characters from the builder starting from the specified position.
[ 30522, 2270, 2358, 15185, 19231, 4063, 3972, 1006, 20014, 2707, 1010, 20014, 2203, 1007, 1063, 2065, 1006, 2707, 1026, 1014, 1007, 1063, 2707, 1027, 1014, 1025, 1065, 2065, 1006, 2203, 1028, 2023, 1012, 2597, 1007, 1063, 2203, 1027, 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...
alibaba/canal
dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java
LogBuffer.getBeInt16
public final int getBeInt16(final int pos) { final int position = origin + pos; if (pos + 1 >= limit || pos < 0) throw new IllegalArgumentException("limit excceed: " + (pos < 0 ? pos : (pos + 1))); byte[] buf = b...
java
public final int getBeInt16(final int pos) { final int position = origin + pos; if (pos + 1 >= limit || pos < 0) throw new IllegalArgumentException("limit excceed: " + (pos < 0 ? pos : (pos + 1))); byte[] buf = b...
[ "public", "final", "int", "getBeInt16", "(", "final", "int", "pos", ")", "{", "final", "int", "position", "=", "origin", "+", "pos", ";", "if", "(", "pos", "+", "1", ">=", "limit", "||", "pos", "<", "0", ")", "throw", "new", "IllegalArgumentException",...
Return 16-bit signed int from buffer. (big-endian) @see mysql-5.6.10/include/myisampack.h - mi_sint2korr
[ "Return", "16", "-", "bit", "signed", "int", "from", "buffer", ".", "(", "big", "-", "endian", ")" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java#L301-L309
train
Gets a 16 - bit integer from the buffer.
[ 30522, 2270, 2345, 20014, 2131, 19205, 3372, 16048, 1006, 2345, 20014, 13433, 2015, 1007, 1063, 2345, 20014, 2597, 1027, 4761, 1009, 13433, 2015, 1025, 2065, 1006, 13433, 2015, 1009, 1015, 1028, 1027, 5787, 1064, 1064, 13433, 2015, 1026, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/CookieDecoder.java
CookieDecoder.doDecode
private Set<Cookie> doDecode(String header) { List<String> names = new ArrayList<String>(8); List<String> values = new ArrayList<String>(8); extractKeyValuePairs(header, names, values); if (names.isEmpty()) { return Collections.emptySet(); } int i; i...
java
private Set<Cookie> doDecode(String header) { List<String> names = new ArrayList<String>(8); List<String> values = new ArrayList<String>(8); extractKeyValuePairs(header, names, values); if (names.isEmpty()) { return Collections.emptySet(); } int i; i...
[ "private", "Set", "<", "Cookie", ">", "doDecode", "(", "String", "header", ")", "{", "List", "<", "String", ">", "names", "=", "new", "ArrayList", "<", "String", ">", "(", "8", ")", ";", "List", "<", "String", ">", "values", "=", "new", "ArrayList", ...
Decodes the specified HTTP header value into {@link Cookie}s. @return the decoded {@link Cookie}s
[ "Decodes", "the", "specified", "HTTP", "header", "value", "into", "{", "@link", "Cookie", "}", "s", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/CookieDecoder.java#L84-L199
train
Decodes a HTTP response header into a set of cookies.
[ 30522, 2797, 2275, 1026, 17387, 1028, 26489, 8586, 10244, 1006, 5164, 20346, 1007, 1063, 2862, 1026, 5164, 1028, 3415, 1027, 2047, 9140, 9863, 1026, 5164, 1028, 1006, 1022, 1007, 1025, 2862, 1026, 5164, 1028, 5300, 1027, 2047, 9140, 9863, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/BeanUtil.java
BeanUtil.mapToBean
public static <T> T mapToBean(Map<?, ?> map, Class<T> beanClass, CopyOptions copyOptions) { return fillBeanWithMap(map, ReflectUtil.newInstance(beanClass), copyOptions); }
java
public static <T> T mapToBean(Map<?, ?> map, Class<T> beanClass, CopyOptions copyOptions) { return fillBeanWithMap(map, ReflectUtil.newInstance(beanClass), copyOptions); }
[ "public", "static", "<", "T", ">", "T", "mapToBean", "(", "Map", "<", "?", ",", "?", ">", "map", ",", "Class", "<", "T", ">", "beanClass", ",", "CopyOptions", "copyOptions", ")", "{", "return", "fillBeanWithMap", "(", "map", ",", "ReflectUtil", ".", ...
Map转换为Bean对象 @param <T> Bean类型 @param map {@link Map} @param beanClass Bean Class @param copyOptions 转Bean选项 @return Bean
[ "Map转换为Bean对象" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/bean/BeanUtil.java#L354-L356
train
Creates a new instance of the specified bean class from the given map.
[ 30522, 2270, 10763, 1026, 1056, 1028, 1056, 4949, 3406, 4783, 2319, 1006, 4949, 1026, 1029, 1010, 1029, 1028, 4949, 1010, 2465, 1026, 1056, 1028, 14068, 26266, 1010, 6100, 7361, 9285, 6100, 7361, 9285, 1007, 1063, 2709, 6039, 4783, 2319, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
utility/src/main/java/com/networknt/utility/NetUtils.java
NetUtils.getHostName
public static String getHostName(SocketAddress socketAddress) { if (socketAddress == null) { return null; } if (socketAddress instanceof InetSocketAddress) { InetAddress addr = ((InetSocketAddress) socketAddress).getAddress(); if(addr != null){ ...
java
public static String getHostName(SocketAddress socketAddress) { if (socketAddress == null) { return null; } if (socketAddress instanceof InetSocketAddress) { InetAddress addr = ((InetSocketAddress) socketAddress).getAddress(); if(addr != null){ ...
[ "public", "static", "String", "getHostName", "(", "SocketAddress", "socketAddress", ")", "{", "if", "(", "socketAddress", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "socketAddress", "instanceof", "InetSocketAddress", ")", "{", "InetAddress", ...
return ip to avoid lookup dns
[ "return", "ip", "to", "avoid", "lookup", "dns" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/utility/src/main/java/com/networknt/utility/NetUtils.java#L174-L187
train
Get the hostname of the socket address.
[ 30522, 2270, 10763, 5164, 2131, 15006, 2102, 18442, 1006, 22278, 4215, 16200, 4757, 22278, 4215, 16200, 4757, 1007, 1063, 2065, 1006, 22278, 4215, 16200, 4757, 1027, 1027, 19701, 1007, 1063, 2709, 19701, 1025, 1065, 2065, 1006, 22278, 4215, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.zip
public static File zip(File zipFile, Charset charset, boolean withSrcDir, File... srcFiles) throws UtilException { validateFiles(zipFile, srcFiles); try (ZipOutputStream out = getZipOutputStream(zipFile, charset)) { String srcRootDir; for (File srcFile : srcFiles) { if(null == srcFile) { cont...
java
public static File zip(File zipFile, Charset charset, boolean withSrcDir, File... srcFiles) throws UtilException { validateFiles(zipFile, srcFiles); try (ZipOutputStream out = getZipOutputStream(zipFile, charset)) { String srcRootDir; for (File srcFile : srcFiles) { if(null == srcFile) { cont...
[ "public", "static", "File", "zip", "(", "File", "zipFile", ",", "Charset", "charset", ",", "boolean", "withSrcDir", ",", "File", "...", "srcFiles", ")", "throws", "UtilException", "{", "validateFiles", "(", "zipFile", ",", "srcFiles", ")", ";", "try", "(", ...
对文件或文件目录进行压缩 @param zipFile 生成的Zip文件,包括文件名。注意:zipPath不能是srcPath路径下的子文件夹 @param charset 编码 @param withSrcDir 是否包含被打包目录,只针对压缩目录有效。若为false,则只压缩目录下的文件或目录,为true则将本目录也压缩 @param srcFiles 要压缩的源文件或目录。如果压缩一个文件,则为该文件的全路径;如果压缩一个目录,则为该目录的顶层目录路径 @return 压缩文件 @throws UtilException IO异常
[ "对文件或文件目录进行压缩" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java#L156-L179
train
Creates a zip file from the specified files.
[ 30522, 2270, 10763, 5371, 14101, 1006, 5371, 14101, 8873, 2571, 1010, 25869, 13462, 25869, 13462, 1010, 22017, 20898, 2007, 21338, 19797, 4313, 1010, 5371, 1012, 1012, 1012, 5034, 2278, 8873, 4244, 1007, 11618, 21183, 9463, 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...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java
RemoteInputChannel.retriggerSubpartitionRequest
void retriggerSubpartitionRequest(int subpartitionIndex) throws IOException, InterruptedException { checkState(partitionRequestClient != null, "Missing initial subpartition request."); if (increaseBackoff()) { partitionRequestClient.requestSubpartition( partitionId, subpartitionIndex, this, getCurrentBackof...
java
void retriggerSubpartitionRequest(int subpartitionIndex) throws IOException, InterruptedException { checkState(partitionRequestClient != null, "Missing initial subpartition request."); if (increaseBackoff()) { partitionRequestClient.requestSubpartition( partitionId, subpartitionIndex, this, getCurrentBackof...
[ "void", "retriggerSubpartitionRequest", "(", "int", "subpartitionIndex", ")", "throws", "IOException", ",", "InterruptedException", "{", "checkState", "(", "partitionRequestClient", "!=", "null", ",", "\"Missing initial subpartition request.\"", ")", ";", "if", "(", "incr...
Retriggers a remote subpartition request.
[ "Retriggers", "a", "remote", "subpartition", "request", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java#L174-L183
train
Retrigger a subpartition request.
[ 30522, 11675, 2128, 18886, 13327, 6342, 2497, 19362, 3775, 3508, 2890, 15500, 1006, 20014, 4942, 19362, 3775, 3508, 22254, 10288, 1007, 11618, 22834, 10288, 24422, 1010, 7153, 10288, 24422, 1063, 14148, 12259, 1006, 13571, 2890, 15500, 20464, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.splitsGroupedBy
public SplitDataProperties<T> splitsGroupedBy(int... groupFields) { if (groupFields == null) { throw new InvalidProgramException("GroupFields may not be null."); } else if (groupFields.length == 0) { throw new InvalidProgramException("GroupFields may not be empty."); } if (this.splitOrdering != null) { ...
java
public SplitDataProperties<T> splitsGroupedBy(int... groupFields) { if (groupFields == null) { throw new InvalidProgramException("GroupFields may not be null."); } else if (groupFields.length == 0) { throw new InvalidProgramException("GroupFields may not be empty."); } if (this.splitOrdering != null) { ...
[ "public", "SplitDataProperties", "<", "T", ">", "splitsGroupedBy", "(", "int", "...", "groupFields", ")", "{", "if", "(", "groupFields", "==", "null", ")", "{", "throw", "new", "InvalidProgramException", "(", "\"GroupFields may not be null.\"", ")", ";", "}", "e...
Defines that the data within an input split is grouped on the fields defined by the field positions. All records sharing the same key (combination) must be subsequently emitted by the input format for each input split. <p><b> IMPORTANT: Providing wrong information with SplitDataProperties can cause wrong results! </b>...
[ "Defines", "that", "the", "data", "within", "an", "input", "split", "is", "grouped", "on", "the", "fields", "defined", "by", "the", "field", "positions", ".", "All", "records", "sharing", "the", "same", "key", "(", "combination", ")", "must", "be", "subseq...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/io/SplitDataProperties.java#L200-L215
train
Sets the group by fields of the data source.
[ 30522, 2270, 3975, 2850, 2696, 21572, 4842, 7368, 1026, 1056, 1028, 19584, 17058, 2098, 3762, 1006, 20014, 1012, 1012, 1012, 2177, 15155, 1007, 1063, 2065, 1006, 2177, 15155, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 19528, 21572, 13113, 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/util/ClassUtil.java
ClassUtil.getPublicMethods
public static List<Method> getPublicMethods(Class<?> clazz, String... excludeMethodNames) { return getPublicMethods(clazz, excludeMethodNames); }
java
public static List<Method> getPublicMethods(Class<?> clazz, String... excludeMethodNames) { return getPublicMethods(clazz, excludeMethodNames); }
[ "public", "static", "List", "<", "Method", ">", "getPublicMethods", "(", "Class", "<", "?", ">", "clazz", ",", "String", "...", "excludeMethodNames", ")", "{", "return", "getPublicMethods", "(", "clazz", ",", "excludeMethodNames", ")", ";", "}" ]
获得指定类过滤后的Public方法列表 @param clazz 查找方法的类 @param excludeMethodNames 不包括的方法名列表 @return 过滤后的方法列表
[ "获得指定类过滤后的Public方法列表" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ClassUtil.java#L281-L283
train
Returns a list of public methods of the given class including those with the given names.
[ 30522, 2270, 10763, 2862, 1026, 4118, 1028, 2131, 14289, 16558, 2594, 11368, 6806, 5104, 1006, 2465, 1026, 1029, 1028, 18856, 10936, 2480, 1010, 5164, 1012, 1012, 1012, 23329, 11368, 6806, 28911, 7834, 1007, 1063, 2709, 2131, 14289, 16558, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.isAllocated
public boolean isAllocated(int index, JobID jobId, AllocationID allocationId) { TaskSlot taskSlot = taskSlots.get(index); return taskSlot.isAllocated(jobId, allocationId); }
java
public boolean isAllocated(int index, JobID jobId, AllocationID allocationId) { TaskSlot taskSlot = taskSlots.get(index); return taskSlot.isAllocated(jobId, allocationId); }
[ "public", "boolean", "isAllocated", "(", "int", "index", ",", "JobID", "jobId", ",", "AllocationID", "allocationId", ")", "{", "TaskSlot", "taskSlot", "=", "taskSlots", ".", "get", "(", "index", ")", ";", "return", "taskSlot", ".", "isAllocated", "(", "jobId...
Check whether the slot for the given index is allocated for the given job and allocation id. @param index of the task slot @param jobId for which the task slot should be allocated @param allocationId which should match the task slot's allocation id @return True if the given task slot is allocated for the given job and...
[ "Check", "whether", "the", "slot", "for", "the", "given", "index", "is", "allocated", "for", "the", "given", "job", "and", "allocation", "id", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java#L375-L379
train
Returns true if the specified slot is allocated for the specified job and allocation.
[ 30522, 2270, 22017, 20898, 18061, 7174, 12921, 1006, 20014, 5950, 1010, 3105, 3593, 3105, 3593, 1010, 16169, 3593, 16169, 3593, 1007, 1063, 8518, 10994, 8518, 10994, 1027, 8518, 10994, 2015, 1012, 2131, 1006, 5950, 1007, 1025, 2709, 8518, 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/util/ArrayUtil.java
ArrayUtil.sub
public static Object[] sub(Object array, int start, int end, int step) { int length = length(array); if (start < 0) { start += length; } if (end < 0) { end += length; } if (start == length) { return new Object[0]; } if (start > end) { int tmp = start; start = end; end = t...
java
public static Object[] sub(Object array, int start, int end, int step) { int length = length(array); if (start < 0) { start += length; } if (end < 0) { end += length; } if (start == length) { return new Object[0]; } if (start > end) { int tmp = start; start = end; end = t...
[ "public", "static", "Object", "[", "]", "sub", "(", "Object", "array", ",", "int", "start", ",", "int", "end", ",", "int", "step", ")", "{", "int", "length", "=", "length", "(", "array", ")", ";", "if", "(", "start", "<", "0", ")", "{", "start", ...
获取子数组 @param array 数组 @param start 开始位置(包括) @param end 结束位置(不包括) @param step 步进 @return 新的数组 @since 4.0.6
[ "获取子数组" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java#L2184-L2217
train
Returns an array of objects that are sub - elements of the specified array.
[ 30522, 2270, 10763, 4874, 1031, 1033, 4942, 1006, 4874, 9140, 1010, 20014, 2707, 1010, 20014, 2203, 1010, 20014, 3357, 1007, 1063, 20014, 3091, 1027, 3091, 1006, 9140, 1007, 1025, 2065, 1006, 2707, 1026, 1014, 1007, 1063, 2707, 1009, 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-http/src/main/java/cn/hutool/http/webservice/SoapClient.java
SoapClient.sendForMessage
public SOAPMessage sendForMessage() { final HttpResponse res = sendForResponse(); final MimeHeaders headers = new MimeHeaders(); for (Entry<String, List<String>> entry : res.headers().entrySet()) { if(StrUtil.isNotEmpty(entry.getKey())) { headers.setHeader(entry.getKey(), CollUtil.get(entry.getValue()...
java
public SOAPMessage sendForMessage() { final HttpResponse res = sendForResponse(); final MimeHeaders headers = new MimeHeaders(); for (Entry<String, List<String>> entry : res.headers().entrySet()) { if(StrUtil.isNotEmpty(entry.getKey())) { headers.setHeader(entry.getKey(), CollUtil.get(entry.getValue()...
[ "public", "SOAPMessage", "sendForMessage", "(", ")", "{", "final", "HttpResponse", "res", "=", "sendForResponse", "(", ")", ";", "final", "MimeHeaders", "headers", "=", "new", "MimeHeaders", "(", ")", ";", "for", "(", "Entry", "<", "String", ",", "List", "...
执行Webservice请求,既发送SOAP内容 @return 返回结果
[ "执行Webservice请求,既发送SOAP内容" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/webservice/SoapClient.java#L397-L410
train
Sends a SOAP message to the server.
[ 30522, 2270, 7815, 7834, 3736, 3351, 4604, 14192, 7971, 4270, 1006, 1007, 1063, 2345, 8299, 6072, 26029, 3366, 24501, 1027, 4604, 29278, 6072, 26029, 3366, 1006, 1007, 1025, 2345, 2771, 4168, 4974, 2545, 20346, 2015, 1027, 2047, 2771, 4168,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/service/RdbMirrorDbSyncService.java
RdbMirrorDbSyncService.executeDdl
private void executeDdl(MirrorDbConfig mirrorDbConfig, Dml ddl) { try (Connection conn = dataSource.getConnection(); Statement statement = conn.createStatement()) { statement.execute(ddl.getSql()); // 移除对应配置 mirrorDbConfig.getTableConfig().remove(ddl.getTable()); ...
java
private void executeDdl(MirrorDbConfig mirrorDbConfig, Dml ddl) { try (Connection conn = dataSource.getConnection(); Statement statement = conn.createStatement()) { statement.execute(ddl.getSql()); // 移除对应配置 mirrorDbConfig.getTableConfig().remove(ddl.getTable()); ...
[ "private", "void", "executeDdl", "(", "MirrorDbConfig", "mirrorDbConfig", ",", "Dml", "ddl", ")", "{", "try", "(", "Connection", "conn", "=", "dataSource", ".", "getConnection", "(", ")", ";", "Statement", "statement", "=", "conn", ".", "createStatement", "(",...
DDL 操作 @param ddl DDL
[ "DDL", "操作" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/service/RdbMirrorDbSyncService.java#L153-L164
train
Execute DDL.
[ 30522, 2797, 11675, 6472, 19422, 1006, 5259, 18939, 8663, 8873, 2290, 5259, 18939, 8663, 8873, 2290, 1010, 1040, 19968, 20315, 2140, 1007, 1063, 3046, 1006, 4434, 9530, 2078, 1027, 2951, 6499, 3126, 3401, 1012, 2131, 8663, 2638, 7542, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java
InitializrService.executeInitializrMetadataRetrieval
private CloseableHttpResponse executeInitializrMetadataRetrieval(String url) { HttpGet request = new HttpGet(url); request.setHeader(new BasicHeader(HttpHeaders.ACCEPT, ACCEPT_META_DATA)); return execute(request, url, "retrieve metadata"); }
java
private CloseableHttpResponse executeInitializrMetadataRetrieval(String url) { HttpGet request = new HttpGet(url); request.setHeader(new BasicHeader(HttpHeaders.ACCEPT, ACCEPT_META_DATA)); return execute(request, url, "retrieve metadata"); }
[ "private", "CloseableHttpResponse", "executeInitializrMetadataRetrieval", "(", "String", "url", ")", "{", "HttpGet", "request", "=", "new", "HttpGet", "(", "url", ")", ";", "request", ".", "setHeader", "(", "new", "BasicHeader", "(", "HttpHeaders", ".", "ACCEPT", ...
Retrieves the meta-data of the service at the specified URL. @param url the URL @return the response
[ "Retrieves", "the", "meta", "-", "data", "of", "the", "service", "at", "the", "specified", "URL", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java#L185-L189
train
Executes initializr metadata retrieval.
[ 30522, 2797, 2485, 3085, 11039, 25856, 6072, 26029, 3366, 15389, 5498, 20925, 10993, 10867, 12928, 2850, 7559, 3388, 7373, 10175, 1006, 5164, 24471, 2140, 1007, 1063, 8299, 18150, 5227, 1027, 2047, 8299, 18150, 1006, 24471, 2140, 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...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java
BinaryString.substring
public BinaryString substring(final int start, final int until) { ensureMaterialized(); if (until <= start || start >= sizeInBytes) { return EMPTY_UTF8; } if (inFirstSegment()) { MemorySegment segment = segments[0]; int i = 0; int c = 0; while (i < sizeInBytes && c < start) { i += numBytesFor...
java
public BinaryString substring(final int start, final int until) { ensureMaterialized(); if (until <= start || start >= sizeInBytes) { return EMPTY_UTF8; } if (inFirstSegment()) { MemorySegment segment = segments[0]; int i = 0; int c = 0; while (i < sizeInBytes && c < start) { i += numBytesFor...
[ "public", "BinaryString", "substring", "(", "final", "int", "start", ",", "final", "int", "until", ")", "{", "ensureMaterialized", "(", ")", ";", "if", "(", "until", "<=", "start", "||", "start", ">=", "sizeInBytes", ")", "{", "return", "EMPTY_UTF8", ";", ...
Returns a substring of this. @param start the position of first code point @param until the position after last code point, exclusive.
[ "Returns", "a", "substring", "of", "this", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L398-L428
train
Returns a substring of this string.
[ 30522, 2270, 12441, 3367, 4892, 4942, 3367, 4892, 1006, 2345, 20014, 2707, 1010, 2345, 20014, 2127, 1007, 1063, 5676, 8585, 14482, 3550, 1006, 1007, 1025, 2065, 1006, 2127, 1026, 1027, 2707, 1064, 1064, 2707, 1028, 1027, 2946, 2378, 3762, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java
MapUtil.toListMap
public static <K, V> Map<K, List<V>> toListMap(Iterable<? extends Map<K, V>> mapList) { final HashMap<K, List<V>> resultMap = new HashMap<>(); if (CollectionUtil.isEmpty(mapList)) { return resultMap; } Set<Entry<K, V>> entrySet; for (Map<K, V> map : mapList) { entrySet = map.entrySet(); K k...
java
public static <K, V> Map<K, List<V>> toListMap(Iterable<? extends Map<K, V>> mapList) { final HashMap<K, List<V>> resultMap = new HashMap<>(); if (CollectionUtil.isEmpty(mapList)) { return resultMap; } Set<Entry<K, V>> entrySet; for (Map<K, V> map : mapList) { entrySet = map.entrySet(); K k...
[ "public", "static", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "List", "<", "V", ">", ">", "toListMap", "(", "Iterable", "<", "?", "extends", "Map", "<", "K", ",", "V", ">", ">", "mapList", ")", "{", "final", "HashMap", "<", "K", ",", "Li...
行转列,合并相同的键,值合并为列表<br> 将Map列表中相同key的值组成列表做为Map的value<br> 是{@link #toMapList(Map)}的逆方法<br> 比如传入数据: <pre> [ {a: 1, b: 1, c: 1} {a: 2, b: 2} {a: 3, b: 3} {a: 4} ] </pre> 结果是: <pre> { a: [1,2,3,4] b: [1,2,3,] c: [1] } </pre> @param <K> 键类型 @param <V> 值类型 @param mapList Map列表 @return Map
[ "行转列,合并相同的键,值合并为列表<br", ">", "将Map列表中相同key的值组成列表做为Map的value<br", ">", "是", "{", "@link", "#toMapList", "(", "Map", ")", "}", "的逆方法<br", ">", "比如传入数据:" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java#L290-L314
train
Creates a map from the given list of Maps.
[ 30522, 2270, 10763, 1026, 1047, 1010, 1058, 1028, 4949, 1026, 1047, 1010, 2862, 1026, 1058, 1028, 1028, 2000, 9863, 2863, 2361, 1006, 2009, 6906, 3468, 1026, 1029, 8908, 4949, 1026, 1047, 1010, 1058, 1028, 1028, 4949, 9863, 1007, 1063, 23...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/configuration/Configuration.java
Configuration.getDouble
public double getDouble(String key, double defaultValue) { Object o = getRawValue(key); if (o == null) { return defaultValue; } return convertToDouble(o, defaultValue); }
java
public double getDouble(String key, double defaultValue) { Object o = getRawValue(key); if (o == null) { return defaultValue; } return convertToDouble(o, defaultValue); }
[ "public", "double", "getDouble", "(", "String", "key", ",", "double", "defaultValue", ")", "{", "Object", "o", "=", "getRawValue", "(", "key", ")", ";", "if", "(", "o", "==", "null", ")", "{", "return", "defaultValue", ";", "}", "return", "convertToDoubl...
Returns the value associated with the given key as a double. @param key the key pointing to the associated value @param defaultValue the default value which is returned in case there is no value associated with the given key @return the (default) value associated with the given key
[ "Returns", "the", "value", "associated", "with", "the", "given", "key", "as", "a", "double", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L500-L507
train
Returns the double value for the given key. The defaultValue is returned if the key does not exist or if the value is not a double value.
[ 30522, 2270, 3313, 2131, 26797, 3468, 1006, 5164, 3145, 1010, 3313, 12398, 10175, 5657, 1007, 1063, 4874, 1051, 1027, 2131, 2527, 2860, 10175, 5657, 1006, 3145, 1007, 1025, 2065, 1006, 1051, 1027, 1027, 19701, 1007, 1063, 2709, 12398, 10175...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.remove
@SuppressWarnings("unchecked") public static <T> T[] remove(T[] array, int index) throws IllegalArgumentException { return (T[]) remove((Object) array, index); }
java
@SuppressWarnings("unchecked") public static <T> T[] remove(T[] array, int index) throws IllegalArgumentException { return (T[]) remove((Object) array, index); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "[", "]", "remove", "(", "T", "[", "]", "array", ",", "int", "index", ")", "throws", "IllegalArgumentException", "{", "return", "(", "T", "[", "]", ")", "remove...
移除数组中对应位置的元素<br> copy from commons-lang @param <T> 数组元素类型 @param array 数组对象,可以是对象数组,也可以原始类型数组 @param index 位置,如果位置小于0或者大于长度,返回原数组 @return 去掉指定元素后的新数组或原数组 @throws IllegalArgumentException 参数对象不为数组对象 @since 3.0.8
[ "移除数组中对应位置的元素<br", ">", "copy", "from", "commons", "-", "lang" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java#L2647-L2650
train
Removes the element at the specified index from the array.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 10763, 1026, 1056, 1028, 1056, 1031, 1033, 6366, 1006, 1056, 1031, 1033, 9140, 1010, 20014, 5950, 1007, 11618, 6206, 2906, 22850, 15781, 2595, 24422, 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...
looly/hutool
hutool-db/src/main/java/cn/hutool/db/dialect/DriverUtil.java
DriverUtil.identifyDriver
public static String identifyDriver(DataSource ds) { if(ds instanceof DataSourceWrapper) { final String driver = ((DataSourceWrapper)ds).getDriver(); if(StrUtil.isNotBlank(driver)) { return driver; } } Connection conn = null; String driver = null; try { try { conn = ds.getCo...
java
public static String identifyDriver(DataSource ds) { if(ds instanceof DataSourceWrapper) { final String driver = ((DataSourceWrapper)ds).getDriver(); if(StrUtil.isNotBlank(driver)) { return driver; } } Connection conn = null; String driver = null; try { try { conn = ds.getCo...
[ "public", "static", "String", "identifyDriver", "(", "DataSource", "ds", ")", "{", "if", "(", "ds", "instanceof", "DataSourceWrapper", ")", "{", "final", "String", "driver", "=", "(", "(", "DataSourceWrapper", ")", "ds", ")", ".", "getDriver", "(", ")", ";...
识别JDBC驱动名 @param ds 数据源 @return 驱动
[ "识别JDBC驱动名" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/dialect/DriverUtil.java#L38-L62
train
Identify the JDBC driver for a DataSource.
[ 30522, 2270, 10763, 5164, 6709, 23663, 2099, 1006, 2951, 6499, 3126, 3401, 16233, 1007, 1063, 2065, 1006, 16233, 6013, 11253, 2951, 6499, 3126, 3401, 13088, 29098, 2121, 1007, 1063, 2345, 5164, 4062, 1027, 1006, 1006, 2951, 6499, 3126, 3401...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/model/perceptron/PerceptronPOSTagger.java
PerceptronPOSTagger.tag
@Override public String[] tag(List<String> wordList) { String[] termArray = new String[wordList.size()]; wordList.toArray(termArray); return tag(termArray); }
java
@Override public String[] tag(List<String> wordList) { String[] termArray = new String[wordList.size()]; wordList.toArray(termArray); return tag(termArray); }
[ "@", "Override", "public", "String", "[", "]", "tag", "(", "List", "<", "String", ">", "wordList", ")", "{", "String", "[", "]", "termArray", "=", "new", "String", "[", "wordList", ".", "size", "(", ")", "]", ";", "wordList", ".", "toArray", "(", "...
标注 @param wordList @return
[ "标注" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/perceptron/PerceptronPOSTagger.java#L84-L90
train
Tag a list of words.
[ 30522, 1030, 2058, 15637, 2270, 5164, 1031, 1033, 6415, 1006, 2862, 1026, 5164, 1028, 2773, 9863, 1007, 1063, 5164, 1031, 1033, 2744, 2906, 9447, 1027, 2047, 5164, 1031, 2773, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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/convert/AbstractConverter.java
AbstractConverter.convertQuietly
public T convertQuietly(Object value, T defaultValue) { try { return convert(value, defaultValue); } catch (Exception e) { return defaultValue; } }
java
public T convertQuietly(Object value, T defaultValue) { try { return convert(value, defaultValue); } catch (Exception e) { return defaultValue; } }
[ "public", "T", "convertQuietly", "(", "Object", "value", ",", "T", "defaultValue", ")", "{", "try", "{", "return", "convert", "(", "value", ",", "defaultValue", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "return", "defaultValue", ";", "}", ...
不抛异常转换<br> 当转换失败时返回默认值 @param value 被转换的值 @param defaultValue 默认值 @return 转换后的值 @since 4.5.7
[ "不抛异常转换<br", ">", "当转换失败时返回默认值" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/convert/AbstractConverter.java#L28-L34
train
Converts the given value to an object using the default value if conversion is not possible.
[ 30522, 2270, 1056, 10463, 15549, 3388, 2135, 1006, 4874, 3643, 1010, 1056, 12398, 10175, 5657, 1007, 1063, 3046, 1063, 2709, 10463, 1006, 3643, 1010, 12398, 10175, 5657, 1007, 1025, 1065, 4608, 1006, 6453, 1041, 1007, 1063, 2709, 12398, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/service/RdbSyncService.java
RdbSyncService.sync
public void sync(List<Dml> dmls, Function<Dml, Boolean> function) { try { boolean toExecute = false; for (Dml dml : dmls) { if (!toExecute) { toExecute = function.apply(dml); } else { function.apply(dml); ...
java
public void sync(List<Dml> dmls, Function<Dml, Boolean> function) { try { boolean toExecute = false; for (Dml dml : dmls) { if (!toExecute) { toExecute = function.apply(dml); } else { function.apply(dml); ...
[ "public", "void", "sync", "(", "List", "<", "Dml", ">", "dmls", ",", "Function", "<", "Dml", ",", "Boolean", ">", "function", ")", "{", "try", "{", "boolean", "toExecute", "=", "false", ";", "for", "(", "Dml", "dml", ":", "dmls", ")", "{", "if", ...
批量同步回调 @param dmls 批量 DML @param function 回调方法
[ "批量同步回调" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/service/RdbSyncService.java#L94-L138
train
Synchronize the DMLs with the DMLs.
[ 30522, 2270, 11675, 26351, 1006, 2862, 1026, 1040, 19968, 1028, 1040, 19968, 2015, 1010, 3853, 1026, 1040, 19968, 1010, 22017, 20898, 1028, 3853, 1007, 1063, 3046, 1063, 22017, 20898, 11756, 2595, 8586, 10421, 1027, 6270, 1025, 2005, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
TypeExtractor.getClosestFactory
private static <OUT> TypeInfoFactory<? super OUT> getClosestFactory(ArrayList<Type> typeHierarchy, Type t) { TypeInfoFactory factory = null; while (factory == null && isClassType(t) && !(typeToClass(t).equals(Object.class))) { typeHierarchy.add(t); factory = getTypeInfoFactory(t); t = typeToClass(t).getGen...
java
private static <OUT> TypeInfoFactory<? super OUT> getClosestFactory(ArrayList<Type> typeHierarchy, Type t) { TypeInfoFactory factory = null; while (factory == null && isClassType(t) && !(typeToClass(t).equals(Object.class))) { typeHierarchy.add(t); factory = getTypeInfoFactory(t); t = typeToClass(t).getGen...
[ "private", "static", "<", "OUT", ">", "TypeInfoFactory", "<", "?", "super", "OUT", ">", "getClosestFactory", "(", "ArrayList", "<", "Type", ">", "typeHierarchy", ",", "Type", "t", ")", "{", "TypeInfoFactory", "factory", "=", "null", ";", "while", "(", "fac...
Traverses the type hierarchy up until a type information factory can be found. @param typeHierarchy hierarchy to be filled while traversing up @param t type for which a factory needs to be found @return closest type information factory or null if there is no factory in the type hierarchy
[ "Traverses", "the", "type", "hierarchy", "up", "until", "a", "type", "information", "factory", "can", "be", "found", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java#L1561-L1573
train
Get the closest TypeInfoFactory for a type.
[ 30522, 2797, 10763, 1026, 2041, 1028, 2828, 2378, 14876, 21450, 1026, 1029, 3565, 2041, 1028, 2131, 20464, 27465, 24475, 18908, 10253, 1006, 9140, 9863, 1026, 2828, 1028, 2828, 4048, 6906, 29389, 1010, 2828, 1056, 1007, 1063, 2828, 2378, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.convert
@Deprecated public static void convert(ImageInputStream srcStream, String formatName, ImageOutputStream destStream) { write(read(srcStream), formatName, destStream); }
java
@Deprecated public static void convert(ImageInputStream srcStream, String formatName, ImageOutputStream destStream) { write(read(srcStream), formatName, destStream); }
[ "@", "Deprecated", "public", "static", "void", "convert", "(", "ImageInputStream", "srcStream", ",", "String", "formatName", ",", "ImageOutputStream", "destStream", ")", "{", "write", "(", "read", "(", "srcStream", ")", ",", "formatName", ",", "destStream", ")",...
图像类型转换:GIF=》JPG、GIF=》PNG、PNG=》JPG、PNG=》GIF(X)、BMP=》PNG<br> 此方法并不关闭流 @param srcStream 源图像流 @param formatName 包含格式非正式名称的 String:如JPG、JPEG、GIF等 @param destStream 目标图像输出流 @since 3.0.9 @deprecated 请使用{@link #write(Image, String, ImageOutputStream)}
[ "图像类型转换:GIF", "=", "》JPG、GIF", "=", "》PNG、PNG", "=", "》JPG、PNG", "=", "》GIF", "(", "X", ")", "、BMP", "=", "》PNG<br", ">", "此方法并不关闭流" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L535-L538
train
Convert the image from srcStream to destStream using the specified format name.
[ 30522, 1030, 2139, 28139, 12921, 2270, 10763, 11675, 10463, 1006, 3746, 2378, 18780, 21422, 5034, 6169, 25379, 1010, 5164, 4289, 18442, 1010, 3746, 5833, 18780, 21422, 4078, 3215, 25379, 1007, 1063, 4339, 1006, 3191, 1006, 5034, 6169, 25379, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/NumberUtil.java
NumberUtil.roundHalfUp
public static int roundHalfUp(final Object obj) { if (obj instanceof Short) { return (short) obj; } if (obj instanceof Integer) { return (int) obj; } if (obj instanceof Long) { return ((Long) obj).intValue(); } if (obj instanceo...
java
public static int roundHalfUp(final Object obj) { if (obj instanceof Short) { return (short) obj; } if (obj instanceof Integer) { return (int) obj; } if (obj instanceof Long) { return ((Long) obj).intValue(); } if (obj instanceo...
[ "public", "static", "int", "roundHalfUp", "(", "final", "Object", "obj", ")", "{", "if", "(", "obj", "instanceof", "Short", ")", "{", "return", "(", "short", ")", "obj", ";", "}", "if", "(", "obj", "instanceof", "Integer", ")", "{", "return", "(", "i...
Round half up. @param obj object to be converted @return rounded half up number
[ "Round", "half", "up", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/util/NumberUtil.java#L42-L62
train
Round half up.
[ 30522, 2270, 10763, 20014, 2461, 8865, 11263, 2361, 1006, 2345, 4874, 27885, 3501, 1007, 1063, 2065, 1006, 27885, 3501, 6013, 11253, 2460, 1007, 1063, 2709, 1006, 2460, 1007, 27885, 3501, 1025, 1065, 2065, 1006, 27885, 3501, 6013, 11253, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
filter/src/main/java/com/alibaba/otter/canal/filter/aviater/AviaterRegexFilter.java
AviaterRegexFilter.completionPattern
private List<String> completionPattern(List<String> patterns) { List<String> result = new ArrayList<String>(); for (String pattern : patterns) { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append("^"); stringBuffer.append(pattern); stringB...
java
private List<String> completionPattern(List<String> patterns) { List<String> result = new ArrayList<String>(); for (String pattern : patterns) { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append("^"); stringBuffer.append(pattern); stringB...
[ "private", "List", "<", "String", ">", "completionPattern", "(", "List", "<", "String", ">", "patterns", ")", "{", "List", "<", "String", ">", "result", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "for", "(", "String", "pattern", ":", ...
修复正则表达式匹配的问题,即使按照长度递减排序,还是会出现以下问题: <pre> foooo|f.*t 匹配 fooooot 出错,原因是 fooooot 匹配了 foooo 之后,会将 fooo 和数据进行匹配,但是 foooo 的长度和 fooooot 的长度不一样 </pre> 因此此类对正则表达式进行头尾完全匹配 @author simon @version 1.0.0
[ "修复正则表达式匹配的问题,即使按照长度递减排序,还是会出现以下问题:" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/filter/src/main/java/com/alibaba/otter/canal/filter/aviater/AviaterRegexFilter.java#L116-L126
train
This method is used to get completion patterns.
[ 30522, 2797, 2862, 1026, 5164, 1028, 6503, 4502, 12079, 2078, 1006, 2862, 1026, 5164, 1028, 7060, 1007, 1063, 2862, 1026, 5164, 1028, 2765, 1027, 2047, 9140, 9863, 1026, 5164, 1028, 1006, 1007, 1025, 2005, 1006, 5164, 5418, 1024, 7060, 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-db/src/main/java/cn/hutool/db/DaoTemplate.java
DaoTemplate.update
public int update(Entity entity) throws SQLException { if (CollectionUtil.isEmpty(entity)) { return 0; } entity = fixEntity(entity); Object pk = entity.get(primaryKeyField); if (null == pk) { throw new SQLException(StrUtil.format("Please determine `{}` for update", primaryKeyField)); } fi...
java
public int update(Entity entity) throws SQLException { if (CollectionUtil.isEmpty(entity)) { return 0; } entity = fixEntity(entity); Object pk = entity.get(primaryKeyField); if (null == pk) { throw new SQLException(StrUtil.format("Please determine `{}` for update", primaryKeyField)); } fi...
[ "public", "int", "update", "(", "Entity", "entity", ")", "throws", "SQLException", "{", "if", "(", "CollectionUtil", ".", "isEmpty", "(", "entity", ")", ")", "{", "return", "0", ";", "}", "entity", "=", "fixEntity", "(", "entity", ")", ";", "Object", "...
更新 @param entity 实体对象,必须包含主键 @return 更新行数 @throws SQLException SQL执行异常
[ "更新" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/DaoTemplate.java#L181-L196
train
Updates the specified entity in the database.
[ 30522, 2270, 20014, 10651, 1006, 9178, 9178, 1007, 11618, 30524, 1027, 9178, 1012, 2131, 1006, 3078, 14839, 3790, 1007, 1025, 2065, 1006, 19701, 1027, 1027, 1052, 2243, 1007, 1063, 5466, 2047, 29296, 10288, 24422, 1006, 2358, 22134, 4014, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/algorithm/MaxHeap.java
MaxHeap.add
public boolean add(E e) { if (queue.size() < maxSize) { // 未达到最大容量,直接添加 queue.add(e); return true; } else { // 队列已满 E peek = queue.peek(); if (queue.comparator().compare(e, peek) > 0) { // 将新元素与当前堆顶元素比较,保留较小的元素 ...
java
public boolean add(E e) { if (queue.size() < maxSize) { // 未达到最大容量,直接添加 queue.add(e); return true; } else { // 队列已满 E peek = queue.peek(); if (queue.comparator().compare(e, peek) > 0) { // 将新元素与当前堆顶元素比较,保留较小的元素 ...
[ "public", "boolean", "add", "(", "E", "e", ")", "{", "if", "(", "queue", ".", "size", "(", ")", "<", "maxSize", ")", "{", "// 未达到最大容量,直接添加", "queue", ".", "add", "(", "e", ")", ";", "return", "true", ";", "}", "else", "{", "// 队列已满", "E", "peek",...
添加一个元素 @param e 元素 @return 是否添加成功
[ "添加一个元素" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/algorithm/MaxHeap.java#L50-L68
train
Add an element to the list of unique attributes.
[ 30522, 2270, 22017, 20898, 5587, 1006, 1041, 1041, 1007, 1063, 2065, 1006, 24240, 1012, 2946, 1006, 1007, 1026, 4098, 5332, 4371, 1007, 1063, 1013, 1013, 100, 100, 100, 100, 1810, 100, 100, 1989, 100, 100, 100, 1779, 24240, 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...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java
FutureUtils.handleAsyncIfNotDone
public static <IN, OUT> CompletableFuture<OUT> handleAsyncIfNotDone( CompletableFuture<IN> completableFuture, Executor executor, BiFunction<? super IN, Throwable, ? extends OUT> handler) { return completableFuture.isDone() ? completableFuture.handle(handler) : completableFuture.handleAsync(handler, execut...
java
public static <IN, OUT> CompletableFuture<OUT> handleAsyncIfNotDone( CompletableFuture<IN> completableFuture, Executor executor, BiFunction<? super IN, Throwable, ? extends OUT> handler) { return completableFuture.isDone() ? completableFuture.handle(handler) : completableFuture.handleAsync(handler, execut...
[ "public", "static", "<", "IN", ",", "OUT", ">", "CompletableFuture", "<", "OUT", ">", "handleAsyncIfNotDone", "(", "CompletableFuture", "<", "IN", ">", "completableFuture", ",", "Executor", "executor", ",", "BiFunction", "<", "?", "super", "IN", ",", "Throwabl...
This function takes a {@link CompletableFuture} and a handler function for the result of this future. If the input future is already done, this function returns {@link CompletableFuture#handle(BiFunction)}. Otherwise, the return value is {@link CompletableFuture#handleAsync(BiFunction, Executor)} with the given executo...
[ "This", "function", "takes", "a", "{", "@link", "CompletableFuture", "}", "and", "a", "handler", "function", "for", "the", "result", "of", "this", "future", ".", "If", "the", "input", "future", "is", "already", "done", "this", "function", "returns", "{", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java#L920-L927
train
Handle async if the given CompletableFuture is done.
[ 30522, 2270, 10763, 1026, 1999, 1010, 2041, 1028, 4012, 10814, 10880, 11263, 11244, 1026, 2041, 1028, 5047, 3022, 6038, 6895, 2546, 17048, 5280, 2063, 1006, 4012, 10814, 10880, 11263, 11244, 1026, 1999, 1028, 4012, 10814, 10880, 11263, 11244,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.translateEdgeValues
public <NEW> Graph<K, VV, NEW> translateEdgeValues(TranslateFunction<EV, NEW> translator) throws Exception { return run(new TranslateEdgeValues<>(translator)); }
java
public <NEW> Graph<K, VV, NEW> translateEdgeValues(TranslateFunction<EV, NEW> translator) throws Exception { return run(new TranslateEdgeValues<>(translator)); }
[ "public", "<", "NEW", ">", "Graph", "<", "K", ",", "VV", ",", "NEW", ">", "translateEdgeValues", "(", "TranslateFunction", "<", "EV", ",", "NEW", ">", "translator", ")", "throws", "Exception", "{", "return", "run", "(", "new", "TranslateEdgeValues", "<>", ...
Translate {@link Edge} values using the given {@link MapFunction}. @param translator implements conversion from {@code EV} to {@code NEW} @param <NEW> new edge value type @return graph with translated edge values @throws Exception
[ "Translate", "{", "@link", "Edge", "}", "values", "using", "the", "given", "{", "@link", "MapFunction", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L654-L656
train
Translate the edge values of the graph.
[ 30522, 2270, 1026, 2047, 1028, 10629, 1026, 1047, 1010, 1058, 2615, 1010, 2047, 1028, 17637, 24225, 10175, 15808, 1006, 17637, 11263, 27989, 1026, 23408, 1010, 2047, 1028, 11403, 1007, 11618, 6453, 1063, 2709, 2448, 1006, 2047, 17637, 24225, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.putMessage
protected final void putMessage(Http2Stream stream, FullHttpMessage message) { FullHttpMessage previous = stream.setProperty(messageKey, message); if (previous != message && previous != null) { previous.release(); } }
java
protected final void putMessage(Http2Stream stream, FullHttpMessage message) { FullHttpMessage previous = stream.setProperty(messageKey, message); if (previous != message && previous != null) { previous.release(); } }
[ "protected", "final", "void", "putMessage", "(", "Http2Stream", "stream", ",", "FullHttpMessage", "message", ")", "{", "FullHttpMessage", "previous", "=", "stream", ".", "setProperty", "(", "messageKey", ",", "message", ")", ";", "if", "(", "previous", "!=", "...
Make {@code message} be the state associated with {@code stream}. @param stream The stream which {@code message} is associated with. @param message The message which contains the HTTP semantics.
[ "Make", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/InboundHttp2ToHttpAdapter.java#L114-L119
train
Put the message into the stream.
[ 30522, 5123, 2345, 11675, 2404, 7834, 3736, 3351, 1006, 8299, 2475, 21422, 5460, 1010, 2440, 11039, 25856, 7834, 3736, 3351, 4471, 1007, 1063, 2440, 11039, 25856, 7834, 3736, 3351, 3025, 1027, 5460, 1012, 2275, 21572, 4842, 3723, 1006, 4471...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
examples/src/main/java/org/apache/spark/examples/ml/JavaALSExample.java
JavaALSExample.main
public static void main(String[] args) { SparkSession spark = SparkSession .builder() .appName("JavaALSExample") .getOrCreate(); // $example on$ JavaRDD<Rating> ratingsRDD = spark .read().textFile("data/mllib/als/sample_movielens_ratings.txt").javaRDD() .map(Rating::parseRatin...
java
public static void main(String[] args) { SparkSession spark = SparkSession .builder() .appName("JavaALSExample") .getOrCreate(); // $example on$ JavaRDD<Rating> ratingsRDD = spark .read().textFile("data/mllib/als/sample_movielens_ratings.txt").javaRDD() .map(Rating::parseRatin...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "SparkSession", "spark", "=", "SparkSession", ".", "builder", "(", ")", ".", "appName", "(", "\"JavaALSExample\"", ")", ".", "getOrCreate", "(", ")", ";", "// $example on$", "Ja...
$example off$
[ "$example", "off$" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/examples/src/main/java/org/apache/spark/examples/ml/JavaALSExample.java#L81-L135
train
Example of ALS recommendation model.
[ 30522, 2270, 10763, 11675, 2364, 1006, 5164, 1031, 1033, 12098, 5620, 1007, 1063, 12300, 7971, 3258, 12125, 1027, 12300, 7971, 3258, 1012, 12508, 1006, 1007, 1012, 10439, 18442, 1006, 1000, 9262, 9777, 10288, 16613, 2571, 1000, 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...
netty/netty
buffer/src/main/java/io/netty/buffer/ByteBufUtil.java
ByteBufUtil.readBytes
static void readBytes(ByteBufAllocator allocator, ByteBuffer buffer, int position, int length, OutputStream out) throws IOException { if (buffer.hasArray()) { out.write(buffer.array(), position + buffer.arrayOffset(), length); } else { int chunkLen = Math.min(length, ...
java
static void readBytes(ByteBufAllocator allocator, ByteBuffer buffer, int position, int length, OutputStream out) throws IOException { if (buffer.hasArray()) { out.write(buffer.array(), position + buffer.arrayOffset(), length); } else { int chunkLen = Math.min(length, ...
[ "static", "void", "readBytes", "(", "ByteBufAllocator", "allocator", ",", "ByteBuffer", "buffer", ",", "int", "position", ",", "int", "length", ",", "OutputStream", "out", ")", "throws", "IOException", "{", "if", "(", "buffer", ".", "hasArray", "(", ")", ")"...
Read bytes from the given {@link ByteBuffer} into the given {@link OutputStream} using the {@code position} and {@code length}. The position and limit of the given {@link ByteBuffer} may be adjusted.
[ "Read", "bytes", "from", "the", "given", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java#L1398-L1420
train
readBytes This method is used to read a byte array of bytes from a ByteBuffer.
[ 30522, 10763, 11675, 3191, 3762, 4570, 1006, 24880, 8569, 13976, 24755, 4263, 2035, 24755, 4263, 1010, 24880, 8569, 12494, 17698, 1010, 20014, 2597, 1010, 20014, 3091, 1010, 27852, 25379, 2041, 1007, 11618, 22834, 10288, 24422, 1063, 2065, 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...
netty/netty
codec-dns/src/main/java/io/netty/handler/codec/dns/DatagramDnsResponseEncoder.java
DatagramDnsResponseEncoder.encodeHeader
private static void encodeHeader(DnsResponse response, ByteBuf buf) { buf.writeShort(response.id()); int flags = 32768; flags |= (response.opCode().byteValue() & 0xFF) << 11; if (response.isAuthoritativeAnswer()) { flags |= 1 << 10; } if (response.isTruncated(...
java
private static void encodeHeader(DnsResponse response, ByteBuf buf) { buf.writeShort(response.id()); int flags = 32768; flags |= (response.opCode().byteValue() & 0xFF) << 11; if (response.isAuthoritativeAnswer()) { flags |= 1 << 10; } if (response.isTruncated(...
[ "private", "static", "void", "encodeHeader", "(", "DnsResponse", "response", ",", "ByteBuf", "buf", ")", "{", "buf", ".", "writeShort", "(", "response", ".", "id", "(", ")", ")", ";", "int", "flags", "=", "32768", ";", "flags", "|=", "(", "response", "...
Encodes the header that is always 12 bytes long. @param response the response header being encoded @param buf the buffer the encoded data should be written to
[ "Encodes", "the", "header", "that", "is", "always", "12", "bytes", "long", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-dns/src/main/java/io/netty/handler/codec/dns/DatagramDnsResponseEncoder.java#L97-L120
train
Encode the header of a DNS response.
[ 30522, 2797, 10763, 11675, 4372, 16044, 4974, 2121, 1006, 1040, 3619, 6072, 26029, 3366, 3433, 1010, 24880, 8569, 2546, 20934, 2546, 1007, 1063, 20934, 2546, 1012, 7009, 27794, 1006, 3433, 1012, 8909, 1006, 1007, 1007, 1025, 20014, 9245, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/interactions/Actions.java
Actions.clickAndHold
public Actions clickAndHold() { if (isBuildingActions()) { action.addAction(new ClickAndHoldAction(jsonMouse, null)); } return tick(defaultMouse.createPointerDown(LEFT.asArg())); }
java
public Actions clickAndHold() { if (isBuildingActions()) { action.addAction(new ClickAndHoldAction(jsonMouse, null)); } return tick(defaultMouse.createPointerDown(LEFT.asArg())); }
[ "public", "Actions", "clickAndHold", "(", ")", "{", "if", "(", "isBuildingActions", "(", ")", ")", "{", "action", ".", "addAction", "(", "new", "ClickAndHoldAction", "(", "jsonMouse", ",", "null", ")", ")", ";", "}", "return", "tick", "(", "defaultMouse", ...
Clicks (without releasing) at the current mouse location. @return A self reference.
[ "Clicks", "(", "without", "releasing", ")", "at", "the", "current", "mouse", "location", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/interactions/Actions.java#L244-L250
train
Click and hold.
[ 30522, 2270, 4506, 11562, 5685, 12640, 1006, 1007, 1063, 2065, 1006, 2003, 25820, 18908, 8496, 1006, 1007, 1007, 1063, 2895, 1012, 5587, 18908, 3258, 1006, 2047, 11562, 5685, 12640, 18908, 3258, 1006, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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/FileTypeUtil.java
FileTypeUtil.getType
public static String getType(String fileStreamHexHead) { for (Entry<String, String> fileTypeEntry : fileTypeMap.entrySet()) { if(StrUtil.startWithIgnoreCase(fileStreamHexHead, fileTypeEntry.getKey())) { return fileTypeEntry.getValue(); } } return null; }
java
public static String getType(String fileStreamHexHead) { for (Entry<String, String> fileTypeEntry : fileTypeMap.entrySet()) { if(StrUtil.startWithIgnoreCase(fileStreamHexHead, fileTypeEntry.getKey())) { return fileTypeEntry.getValue(); } } return null; }
[ "public", "static", "String", "getType", "(", "String", "fileStreamHexHead", ")", "{", "for", "(", "Entry", "<", "String", ",", "String", ">", "fileTypeEntry", ":", "fileTypeMap", ".", "entrySet", "(", ")", ")", "{", "if", "(", "StrUtil", ".", "startWithIg...
根据文件流的头部信息获得文件类型 @param fileStreamHexHead 文件流头部16进制字符串 @return 文件类型,未找到为<code>null</code>
[ "根据文件流的头部信息获得文件类型" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileTypeUtil.java#L109-L116
train
Returns the type of the file stream hex head.
[ 30522, 2270, 10763, 5164, 2131, 13874, 1006, 5164, 6764, 25379, 5369, 2595, 4974, 1007, 1063, 2005, 1006, 4443, 1026, 5164, 1010, 5164, 1028, 5371, 13874, 4765, 2854, 1024, 5371, 13874, 2863, 2361, 1012, 4443, 13462, 1006, 1007, 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/resourcemanager/ResourceManager.java
ResourceManager.onFatalError
protected void onFatalError(Throwable t) { try { log.error("Fatal error occurred in ResourceManager.", t); } catch (Throwable ignored) {} // The fatal error handler implementation should make sure that this call is non-blocking fatalErrorHandler.onFatalError(t); }
java
protected void onFatalError(Throwable t) { try { log.error("Fatal error occurred in ResourceManager.", t); } catch (Throwable ignored) {} // The fatal error handler implementation should make sure that this call is non-blocking fatalErrorHandler.onFatalError(t); }
[ "protected", "void", "onFatalError", "(", "Throwable", "t", ")", "{", "try", "{", "log", ".", "error", "(", "\"Fatal error occurred in ResourceManager.\"", ",", "t", ")", ";", "}", "catch", "(", "Throwable", "ignored", ")", "{", "}", "// The fatal error handler ...
Notifies the ResourceManager that a fatal error has occurred and it cannot proceed. @param t The exception describing the fatal error
[ "Notifies", "the", "ResourceManager", "that", "a", "fatal", "error", "has", "occurred", "and", "it", "cannot", "proceed", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java#L872-L879
train
Called when a fatal error occurs in the resource manager.
[ 30522, 5123, 11675, 2006, 27753, 9453, 18933, 30524, 1056, 1007, 1063, 3046, 1063, 8833, 1012, 7561, 1006, 1000, 10611, 7561, 4158, 1999, 7692, 24805, 4590, 1012, 1000, 1010, 1056, 1007, 1025, 1065, 4608, 1006, 5466, 3085, 6439, 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...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LogFile.java
LogFile.get
public static LogFile get(PropertyResolver propertyResolver) { String file = getLogFileProperty(propertyResolver, FILE_NAME_PROPERTY, FILE_PROPERTY); String path = getLogFileProperty(propertyResolver, FILE_PATH_PROPERTY, PATH_PROPERTY); if (StringUtils.hasLength(file) || StringUtils.hasLength(path)) { ...
java
public static LogFile get(PropertyResolver propertyResolver) { String file = getLogFileProperty(propertyResolver, FILE_NAME_PROPERTY, FILE_PROPERTY); String path = getLogFileProperty(propertyResolver, FILE_PATH_PROPERTY, PATH_PROPERTY); if (StringUtils.hasLength(file) || StringUtils.hasLength(path)) { ...
[ "public", "static", "LogFile", "get", "(", "PropertyResolver", "propertyResolver", ")", "{", "String", "file", "=", "getLogFileProperty", "(", "propertyResolver", ",", "FILE_NAME_PROPERTY", ",", "FILE_PROPERTY", ")", ";", "String", "path", "=", "getLogFileProperty", ...
Get a {@link LogFile} from the given Spring {@link Environment}. @param propertyResolver the {@link PropertyResolver} used to obtain the logging properties @return a {@link LogFile} or {@code null} if the environment didn't contain any suitable properties
[ "Get", "a", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LogFile.java#L131-L140
train
Get the LogFile object from the properties.
[ 30522, 2270, 10763, 8833, 8873, 2571, 2131, 1006, 3200, 6072, 4747, 6299, 3200, 6072, 4747, 6299, 1007, 1063, 5164, 5371, 1027, 2131, 21197, 8873, 2571, 21572, 4842, 3723, 1006, 3200, 6072, 4747, 6299, 1010, 5371, 1035, 2171, 1035, 3200, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/org/apache/hc/core5/http/message/copied/TokenParser.java
TokenParser.copyContent
public void copyContent(final CharSequence buf, final ParserCursor cursor, final BitSet delimiters, final StringBuilder dst) { Args.notNull(buf, "Char sequence"); Args.notNull(cursor, "Parser cursor"); Args.notNull(dst, "String builder"); int pos = cursor.getPos(); fi...
java
public void copyContent(final CharSequence buf, final ParserCursor cursor, final BitSet delimiters, final StringBuilder dst) { Args.notNull(buf, "Char sequence"); Args.notNull(cursor, "Parser cursor"); Args.notNull(dst, "String builder"); int pos = cursor.getPos(); fi...
[ "public", "void", "copyContent", "(", "final", "CharSequence", "buf", ",", "final", "ParserCursor", "cursor", ",", "final", "BitSet", "delimiters", ",", "final", "StringBuilder", "dst", ")", "{", "Args", ".", "notNull", "(", "buf", ",", "\"Char sequence\"", ")...
Transfers content into the destination buffer until a whitespace character or any of the given delimiters is encountered. @param buf buffer with the sequence of chars to be parsed @param cursor defines the bounds and current position of the buffer @param delimiters set of delimiting characters. Can be {@code null} if ...
[ "Transfers", "content", "into", "the", "destination", "buffer", "until", "a", "whitespace", "character", "or", "any", "of", "the", "given", "delimiters", "is", "encountered", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/org/apache/hc/core5/http/message/copied/TokenParser.java#L164-L181
train
Copy content.
[ 30522, 2270, 11675, 6100, 8663, 6528, 2102, 1006, 2345, 25869, 3366, 4226, 5897, 20934, 2546, 1010, 2345, 11968, 8043, 10841, 25301, 30524, 3388, 3972, 27605, 7747, 1010, 2345, 5164, 8569, 23891, 2099, 16233, 2102, 1007, 1063, 12098, 5620, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/corpus/document/sentence/Sentence.java
Sentence.toWordTagArray
public String[][] toWordTagArray() { List<Word> wordList = toSimpleWordList(); String[][] pair = new String[2][wordList.size()]; Iterator<Word> iterator = wordList.iterator(); for (int i = 0; i < pair[0].length; i++) { Word word = iterator.next(); pair...
java
public String[][] toWordTagArray() { List<Word> wordList = toSimpleWordList(); String[][] pair = new String[2][wordList.size()]; Iterator<Word> iterator = wordList.iterator(); for (int i = 0; i < pair[0].length; i++) { Word word = iterator.next(); pair...
[ "public", "String", "[", "]", "[", "]", "toWordTagArray", "(", ")", "{", "List", "<", "Word", ">", "wordList", "=", "toSimpleWordList", "(", ")", ";", "String", "[", "]", "[", "]", "pair", "=", "new", "String", "[", "2", "]", "[", "wordList", ".", ...
word pos @return
[ "word", "pos" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/corpus/document/sentence/Sentence.java#L435-L447
train
To word tag array.
[ 30522, 2270, 5164, 1031, 1033, 1031, 1033, 15805, 8551, 15900, 2906, 9447, 1006, 1007, 1063, 2862, 1026, 2773, 1028, 2773, 9863, 1027, 2000, 5332, 23344, 18351, 9863, 1006, 1007, 1025, 5164, 1031, 1033, 1031, 1033, 3940, 1027, 2047, 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...
spring-projects/spring-boot
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/AstUtils.java
AstUtils.hasAtLeastOneAnnotation
public static boolean hasAtLeastOneAnnotation(ClassNode node, String... annotations) { if (hasAtLeastOneAnnotation((AnnotatedNode) node, annotations)) { return true; } for (MethodNode method : node.getMethods()) { if (hasAtLeastOneAnnotation(method, annotations)) { return true; } } return false; ...
java
public static boolean hasAtLeastOneAnnotation(ClassNode node, String... annotations) { if (hasAtLeastOneAnnotation((AnnotatedNode) node, annotations)) { return true; } for (MethodNode method : node.getMethods()) { if (hasAtLeastOneAnnotation(method, annotations)) { return true; } } return false; ...
[ "public", "static", "boolean", "hasAtLeastOneAnnotation", "(", "ClassNode", "node", ",", "String", "...", "annotations", ")", "{", "if", "(", "hasAtLeastOneAnnotation", "(", "(", "AnnotatedNode", ")", "node", ",", "annotations", ")", ")", "{", "return", "true", ...
Determine if a {@link ClassNode} has one or more of the specified annotations on the class or any of its methods. N.B. the type names are not normally fully qualified. @param node the class to examine @param annotations the annotations to look for @return {@code true} if at least one of the annotations is found, otherw...
[ "Determine", "if", "a", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/AstUtils.java#L59-L69
train
Checks if a class node has at least one of the given annotations.
[ 30522, 2270, 10763, 22017, 20898, 2038, 4017, 19738, 9221, 11639, 17287, 3508, 1006, 2465, 3630, 3207, 13045, 1010, 5164, 1012, 1012, 1012, 5754, 17287, 9285, 1007, 1063, 2065, 1006, 2038, 4017, 19738, 9221, 11639, 17287, 3508, 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-core/src/main/java/org/apache/flink/api/common/io/GenericCsvInputFormat.java
GenericCsvInputFormat.open
@Override public void open(FileInputSplit split) throws IOException { super.open(split); // instantiate the parsers FieldParser<?>[] parsers = new FieldParser<?>[fieldTypes.length]; for (int i = 0; i < fieldTypes.length; i++) { if (fieldTypes[i] != null) { Class<? extends FieldParser<?>> parserType ...
java
@Override public void open(FileInputSplit split) throws IOException { super.open(split); // instantiate the parsers FieldParser<?>[] parsers = new FieldParser<?>[fieldTypes.length]; for (int i = 0; i < fieldTypes.length; i++) { if (fieldTypes[i] != null) { Class<? extends FieldParser<?>> parserType ...
[ "@", "Override", "public", "void", "open", "(", "FileInputSplit", "split", ")", "throws", "IOException", "{", "super", ".", "open", "(", "split", ")", ";", "// instantiate the parsers", "FieldParser", "<", "?", ">", "[", "]", "parsers", "=", "new", "FieldPar...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/io/GenericCsvInputFormat.java#L304-L338
train
Override the open method to set the field parsers and field parsers.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2330, 1006, 5371, 2378, 18780, 13102, 15909, 3975, 1007, 11618, 22834, 10288, 24422, 1063, 3565, 1012, 2330, 1006, 3975, 1007, 1025, 1013, 1013, 7107, 13143, 1996, 11968, 8043, 2015, 2492, 19362, 8043, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.getFieldsDirectly
public static Field[] getFieldsDirectly(Class<?> beanClass, boolean withSuperClassFieds) throws SecurityException { Assert.notNull(beanClass); Field[] allFields = null; Class<?> searchType = beanClass; Field[] declaredFields; while (searchType != null) { declaredFields = searchType.getDeclaredField...
java
public static Field[] getFieldsDirectly(Class<?> beanClass, boolean withSuperClassFieds) throws SecurityException { Assert.notNull(beanClass); Field[] allFields = null; Class<?> searchType = beanClass; Field[] declaredFields; while (searchType != null) { declaredFields = searchType.getDeclaredField...
[ "public", "static", "Field", "[", "]", "getFieldsDirectly", "(", "Class", "<", "?", ">", "beanClass", ",", "boolean", "withSuperClassFieds", ")", "throws", "SecurityException", "{", "Assert", ".", "notNull", "(", "beanClass", ")", ";", "Field", "[", "]", "al...
获得一个类中所有字段列表,直接反射获取,无缓存 @param beanClass 类 @param withSuperClassFieds 是否包括父类的字段列表 @return 字段列表 @throws SecurityException 安全检查异常
[ "获得一个类中所有字段列表,直接反射获取,无缓存" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L152-L169
train
Gets the fields directly from the specified class.
[ 30522, 2270, 10763, 2492, 1031, 1033, 2131, 15155, 4305, 2890, 6593, 2135, 1006, 2465, 1026, 1029, 1028, 14068, 26266, 1010, 22017, 20898, 2007, 6342, 4842, 26266, 10451, 2015, 1007, 11618, 3036, 10288, 24422, 1063, 20865, 1012, 2025, 11231, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
SqlValidatorImpl.getAgg
private SqlNode getAgg(SqlSelect select) { final SelectScope selectScope = getRawSelectScope(select); if (selectScope != null) { final List<SqlNode> selectList = selectScope.getExpandedSelectList(); if (selectList != null) { return aggFinder.findAgg(selectList); } } return aggFinder.findAgg(select....
java
private SqlNode getAgg(SqlSelect select) { final SelectScope selectScope = getRawSelectScope(select); if (selectScope != null) { final List<SqlNode> selectList = selectScope.getExpandedSelectList(); if (selectList != null) { return aggFinder.findAgg(selectList); } } return aggFinder.findAgg(select....
[ "private", "SqlNode", "getAgg", "(", "SqlSelect", "select", ")", "{", "final", "SelectScope", "selectScope", "=", "getRawSelectScope", "(", "select", ")", ";", "if", "(", "selectScope", "!=", "null", ")", "{", "final", "List", "<", "SqlNode", ">", "selectLis...
If there is at least one call to an aggregate function, returns the first.
[ "If", "there", "is", "at", "least", "one", "call", "to", "an", "aggregate", "function", "returns", "the", "first", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L2789-L2798
train
Get the aggregation for the given SELECT.
[ 30522, 2797, 29296, 3630, 3207, 2131, 8490, 2290, 1006, 29296, 11246, 22471, 7276, 1007, 1063, 2345, 27034, 16186, 27034, 16186, 1027, 2131, 2527, 9333, 12260, 16649, 16186, 1006, 7276, 1007, 1025, 2065, 1006, 27034, 16186, 999, 1027, 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...
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/tuple/Tuple.java
Tuple.getFieldNotNull
public <T> T getFieldNotNull(int pos){ T field = getField(pos); if (field != null) { return field; } else { throw new NullFieldException(pos); } }
java
public <T> T getFieldNotNull(int pos){ T field = getField(pos); if (field != null) { return field; } else { throw new NullFieldException(pos); } }
[ "public", "<", "T", ">", "T", "getFieldNotNull", "(", "int", "pos", ")", "{", "T", "field", "=", "getField", "(", "pos", ")", ";", "if", "(", "field", "!=", "null", ")", "{", "return", "field", ";", "}", "else", "{", "throw", "new", "NullFieldExcep...
Gets the field at the specified position, throws NullFieldException if the field is null. Used for comparing key fields. @param pos The position of the field, zero indexed. @return The field at the specified position. @throws IndexOutOfBoundsException Thrown, if the position is negative, or equal to, or larger than th...
[ "Gets", "the", "field", "at", "the", "specified", "position", "throws", "NullFieldException", "if", "the", "field", "is", "null", ".", "Used", "for", "comparing", "key", "fields", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/tuple/Tuple.java#L62-L69
train
Gets the value of the designated field in this object that is not null.
[ 30522, 2270, 1026, 1056, 1028, 1056, 2131, 3790, 17048, 11231, 3363, 1006, 20014, 13433, 2015, 1007, 1063, 1056, 2492, 1027, 2131, 3790, 1006, 13433, 2015, 1007, 1025, 2065, 1006, 2492, 999, 1027, 19701, 1007, 1063, 2709, 2492, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.readString
public static String readString(File file, Charset charset) throws IORuntimeException { return FileReader.create(file, charset).readString(); }
java
public static String readString(File file, Charset charset) throws IORuntimeException { return FileReader.create(file, charset).readString(); }
[ "public", "static", "String", "readString", "(", "File", "file", ",", "Charset", "charset", ")", "throws", "IORuntimeException", "{", "return", "FileReader", ".", "create", "(", "file", ",", "charset", ")", ".", "readString", "(", ")", ";", "}" ]
读取文件内容 @param file 文件 @param charset 字符集 @return 内容 @throws IORuntimeException IO异常
[ "读取文件内容" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L2102-L2104
train
Reads a string from a file.
[ 30522, 2270, 10763, 5164, 9631, 18886, 3070, 1006, 5371, 5371, 1010, 25869, 13462, 25869, 13462, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 2709, 5371, 16416, 4063, 1012, 3443, 1006, 5371, 1010, 25869, 13462, 1007, 1012, 9631, 18886...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/query/TaskKvStateRegistry.java
TaskKvStateRegistry.unregisterAll
public void unregisterAll() { for (KvStateInfo kvState : registeredKvStates) { registry.unregisterKvState(jobId, jobVertexId, kvState.keyGroupRange, kvState.registrationName, kvState.kvStateId); } }
java
public void unregisterAll() { for (KvStateInfo kvState : registeredKvStates) { registry.unregisterKvState(jobId, jobVertexId, kvState.keyGroupRange, kvState.registrationName, kvState.kvStateId); } }
[ "public", "void", "unregisterAll", "(", ")", "{", "for", "(", "KvStateInfo", "kvState", ":", "registeredKvStates", ")", "{", "registry", ".", "unregisterKvState", "(", "jobId", ",", "jobVertexId", ",", "kvState", ".", "keyGroupRange", ",", "kvState", ".", "reg...
Unregisters all registered KvState instances from the KvStateRegistry.
[ "Unregisters", "all", "registered", "KvState", "instances", "from", "the", "KvStateRegistry", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/query/TaskKvStateRegistry.java#L71-L75
train
Unregister all registered KvState objects.
[ 30522, 2270, 11675, 4895, 2890, 24063, 21673, 2140, 1006, 1007, 1063, 2005, 1006, 24888, 9153, 9589, 14876, 24888, 9153, 2618, 1024, 5068, 2243, 15088, 12259, 2015, 1007, 1063, 15584, 1012, 4895, 2890, 24063, 2121, 2243, 15088, 12259, 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
codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java
HttpHeaders.getIntHeader
@Deprecated public static int getIntHeader(HttpMessage message, String name) { return getIntHeader(message, (CharSequence) name); }
java
@Deprecated public static int getIntHeader(HttpMessage message, String name) { return getIntHeader(message, (CharSequence) name); }
[ "@", "Deprecated", "public", "static", "int", "getIntHeader", "(", "HttpMessage", "message", ",", "String", "name", ")", "{", "return", "getIntHeader", "(", "message", ",", "(", "CharSequence", ")", "name", ")", ";", "}" ]
@deprecated Use {@link #getInt(CharSequence)} instead. @see #getIntHeader(HttpMessage, CharSequence)
[ "@deprecated", "Use", "{", "@link", "#getInt", "(", "CharSequence", ")", "}", "instead", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java#L709-L712
train
Gets the value of the header with the given name as an int.
[ 30522, 1030, 2139, 28139, 12921, 2270, 10763, 20014, 2131, 18447, 4974, 2121, 1006, 8299, 7834, 3736, 3351, 4471, 1010, 5164, 2171, 1007, 1063, 2709, 2131, 18447, 4974, 2121, 1006, 4471, 1010, 1006, 25869, 3366, 4226, 5897, 1007, 2171, 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-db/src/main/java/cn/hutool/db/nosql/mongo/MongoDS.java
MongoDS.initSingle
synchronized public void initSingle() { if (setting == null) { try { setting = new Setting(MONGO_CONFIG_PATH, true); } catch (Exception e) { // 在single模式下,可以没有配置文件。 } } String group = StrUtil.EMPTY; if (null == this.serverAddress) { //存在唯一分组 if (groups != null && groups.lengt...
java
synchronized public void initSingle() { if (setting == null) { try { setting = new Setting(MONGO_CONFIG_PATH, true); } catch (Exception e) { // 在single模式下,可以没有配置文件。 } } String group = StrUtil.EMPTY; if (null == this.serverAddress) { //存在唯一分组 if (groups != null && groups.lengt...
[ "synchronized", "public", "void", "initSingle", "(", ")", "{", "if", "(", "setting", "==", "null", ")", "{", "try", "{", "setting", "=", "new", "Setting", "(", "MONGO_CONFIG_PATH", ",", "true", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", ...
初始化<br> 设定文件中的host和端口有三种形式: <pre> host = host:port </pre> <pre> host = host port = port </pre> <pre> host = host </pre>
[ "初始化<br", ">", "设定文件中的host和端口有三种形式:" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/nosql/mongo/MongoDS.java#L132-L162
train
Initializes the connection to a single MongoDB connection.
[ 30522, 25549, 2270, 11675, 1999, 12762, 2075, 2571, 1006, 1007, 1063, 2065, 1006, 4292, 1027, 1027, 19701, 1007, 1063, 3046, 1063, 4292, 1027, 2047, 4292, 1006, 12256, 3995, 1035, 9530, 8873, 2290, 1035, 4130, 1010, 2995, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/corpus/io/IOUtil.java
IOUtil.writeLine
public static void writeLine(BufferedWriter bw, String... params) throws IOException { for (int i = 0; i < params.length - 1; i++) { bw.write(params[i]); bw.write('\t'); } bw.write(params[params.length - 1]); }
java
public static void writeLine(BufferedWriter bw, String... params) throws IOException { for (int i = 0; i < params.length - 1; i++) { bw.write(params[i]); bw.write('\t'); } bw.write(params[params.length - 1]); }
[ "public", "static", "void", "writeLine", "(", "BufferedWriter", "bw", ",", "String", "...", "params", ")", "throws", "IOException", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "params", ".", "length", "-", "1", ";", "i", "++", ")", "{", "...
写数组,用制表符分割 @param bw @param params @throws IOException
[ "写数组,用制表符分割" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/corpus/io/IOUtil.java#L658-L666
train
Write a line of a Sequence of Attributes.
[ 30522, 2270, 10763, 11675, 4339, 4179, 1006, 17698, 2098, 15994, 1038, 2860, 1010, 5164, 1012, 1012, 1012, 11498, 5244, 1007, 11618, 22834, 10288, 24422, 1063, 2005, 1006, 20014, 1045, 1027, 1014, 1025, 1045, 1026, 11498, 5244, 1012, 3091, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/IoUtil.java
IoUtil.toPushbackStream
public static PushbackInputStream toPushbackStream(InputStream in, int pushBackSize) { return (in instanceof PushbackInputStream) ? (PushbackInputStream) in : new PushbackInputStream(in, pushBackSize); }
java
public static PushbackInputStream toPushbackStream(InputStream in, int pushBackSize) { return (in instanceof PushbackInputStream) ? (PushbackInputStream) in : new PushbackInputStream(in, pushBackSize); }
[ "public", "static", "PushbackInputStream", "toPushbackStream", "(", "InputStream", "in", ",", "int", "pushBackSize", ")", "{", "return", "(", "in", "instanceof", "PushbackInputStream", ")", "?", "(", "PushbackInputStream", ")", "in", ":", "new", "PushbackInputStream...
转换为{@link PushbackInputStream}<br> 如果传入的输入流已经是{@link PushbackInputStream},强转返回,否则新建一个 @param in {@link InputStream} @param pushBackSize 推后的byte数 @return {@link PushbackInputStream} @since 3.1.0
[ "转换为", "{", "@link", "PushbackInputStream", "}", "<br", ">", "如果传入的输入流已经是", "{", "@link", "PushbackInputStream", "}", ",强转返回,否则新建一个" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java#L845-L847
train
Converts an input stream to a PushbackInputStream.
[ 30522, 2270, 10763, 5245, 5963, 2378, 18780, 21422, 2327, 20668, 12221, 25379, 1006, 20407, 25379, 30524, 2709, 1006, 1999, 6013, 11253, 5245, 5963, 2378, 18780, 21422, 1007, 1029, 1006, 5245, 5963, 2378, 18780, 21422, 1007, 1999, 1024, 2047,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/FileUtils.java
FileUtils.removeDuplicatesFromOutputDirectory
public static void removeDuplicatesFromOutputDirectory(File outputDirectory, File originDirectory) { if (originDirectory.isDirectory()) { for (String name : originDirectory.list()) { File targetFile = new File(outputDirectory, name); if (targetFile.exists() && targetFile.canWrite()) { if (!targetFi...
java
public static void removeDuplicatesFromOutputDirectory(File outputDirectory, File originDirectory) { if (originDirectory.isDirectory()) { for (String name : originDirectory.list()) { File targetFile = new File(outputDirectory, name); if (targetFile.exists() && targetFile.canWrite()) { if (!targetFi...
[ "public", "static", "void", "removeDuplicatesFromOutputDirectory", "(", "File", "outputDirectory", ",", "File", "originDirectory", ")", "{", "if", "(", "originDirectory", ".", "isDirectory", "(", ")", ")", "{", "for", "(", "String", "name", ":", "originDirectory",...
Utility to remove duplicate files from an "output" directory if they already exist in an "origin". Recursively scans the origin directory looking for files (not directories) that exist in both places and deleting the copy. @param outputDirectory the output directory @param originDirectory the origin directory
[ "Utility", "to", "remove", "duplicate", "files", "from", "an", "output", "directory", "if", "they", "already", "exist", "in", "an", "origin", ".", "Recursively", "scans", "the", "origin", "directory", "looking", "for", "files", "(", "not", "directories", ")", ...
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/FileUtils.java#L41-L57
train
Removes duplicate files from the originDirectory to the outputDirectory.
[ 30522, 2270, 10763, 11675, 3718, 6279, 19341, 4570, 19699, 19506, 4904, 18780, 4305, 2890, 16761, 2100, 1006, 5371, 6434, 4305, 2890, 16761, 2100, 1010, 5371, 4761, 4305, 2890, 16761, 2100, 1007, 1063, 2065, 1006, 4761, 4305, 2890, 16761, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/convert/impl/Jdk8DateConverter.java
Jdk8DateConverter.parseFromLong
private Object parseFromLong(Long time) { String targetName = this.targetType.getName(); if ("java.time.Instant".equals(targetName)) { return toInstant(time); } return null; }
java
private Object parseFromLong(Long time) { String targetName = this.targetType.getName(); if ("java.time.Instant".equals(targetName)) { return toInstant(time); } return null; }
[ "private", "Object", "parseFromLong", "(", "Long", "time", ")", "{", "String", "targetName", "=", "this", ".", "targetType", ".", "getName", "(", ")", ";", "if", "(", "\"java.time.Instant\"", ".", "equals", "(", "targetName", ")", ")", "{", "return", "toIn...
通过反射将Long型时间戳转换为java.time中的对象 @param time 时间戳 @return java.time中的对象
[ "通过反射将Long型时间戳转换为java", ".", "time中的对象" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/convert/impl/Jdk8DateConverter.java#L116-L122
train
Parse a object from a long value.
[ 30522, 2797, 4874, 11968, 20106, 21716, 10052, 1006, 2146, 2051, 1007, 1063, 5164, 4539, 18442, 1027, 2023, 1012, 4539, 13874, 1012, 2131, 18442, 1006, 1007, 1025, 2065, 1006, 1000, 9262, 1012, 2051, 1012, 7107, 1000, 1012, 19635, 1006, 453...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/java/typeutils/runtime/PojoSerializer.java
PojoSerializer.buildSnapshot
private static <T> PojoSerializerSnapshot<T> buildSnapshot( Class<T> pojoType, LinkedHashMap<Class<?>, Integer> registeredSubclassesToTags, TypeSerializer<?>[] registeredSubclassSerializers, Field[] fields, TypeSerializer<?>[] fieldSerializers, Map<Class<?>, TypeSerializer<?>> nonRegisteredSubclassSer...
java
private static <T> PojoSerializerSnapshot<T> buildSnapshot( Class<T> pojoType, LinkedHashMap<Class<?>, Integer> registeredSubclassesToTags, TypeSerializer<?>[] registeredSubclassSerializers, Field[] fields, TypeSerializer<?>[] fieldSerializers, Map<Class<?>, TypeSerializer<?>> nonRegisteredSubclassSer...
[ "private", "static", "<", "T", ">", "PojoSerializerSnapshot", "<", "T", ">", "buildSnapshot", "(", "Class", "<", "T", ">", "pojoType", ",", "LinkedHashMap", "<", "Class", "<", "?", ">", ",", "Integer", ">", "registeredSubclassesToTags", ",", "TypeSerializer", ...
Build and return a snapshot of the serializer's parameters and currently cached serializers.
[ "Build", "and", "return", "a", "snapshot", "of", "the", "serializer", "s", "parameters", "and", "currently", "cached", "serializers", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/PojoSerializer.java#L1107-L1127
train
Build a snapshot of the given POJO type.
[ 30522, 2797, 10763, 1026, 1056, 1028, 13433, 19929, 11610, 28863, 2015, 2532, 4523, 12326, 1026, 1056, 1028, 16473, 2532, 4523, 12326, 1006, 2465, 1026, 1056, 1028, 13433, 5558, 13874, 1010, 5799, 14949, 22444, 2361, 1026, 2465, 1026, 1029, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/server/WebFluxTags.java
WebFluxTags.exception
public static Tag exception(Throwable exception) { if (exception != null) { String simpleName = exception.getClass().getSimpleName(); return Tag.of("exception", StringUtils.hasText(simpleName) ? simpleName : exception.getClass().getName()); } return EXCEPTION_NONE; }
java
public static Tag exception(Throwable exception) { if (exception != null) { String simpleName = exception.getClass().getSimpleName(); return Tag.of("exception", StringUtils.hasText(simpleName) ? simpleName : exception.getClass().getName()); } return EXCEPTION_NONE; }
[ "public", "static", "Tag", "exception", "(", "Throwable", "exception", ")", "{", "if", "(", "exception", "!=", "null", ")", "{", "String", "simpleName", "=", "exception", ".", "getClass", "(", ")", ".", "getSimpleName", "(", ")", ";", "return", "Tag", "....
Creates an {@code exception} tag based on the {@link Class#getSimpleName() simple name} of the class of the given {@code exception}. @param exception the exception, may be {@code null} @return the exception tag derived from the exception
[ "Creates", "an", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/server/WebFluxTags.java#L132-L139
train
Creates a tag that represents an exception.
[ 30522, 2270, 10763, 6415, 6453, 1006, 5466, 3085, 6453, 1007, 1063, 2065, 1006, 6453, 999, 30524, 1000, 6453, 1000, 1010, 5164, 21823, 4877, 1012, 24748, 18413, 1006, 3722, 18442, 1007, 1029, 3722, 18442, 1024, 6453, 1012, 2131, 26266, 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-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/state/serialization/KvStateSerializer.java
KvStateSerializer.serializeValue
public static <T> byte[] serializeValue(T value, TypeSerializer<T> serializer) throws IOException { if (value != null) { // Serialize DataOutputSerializer dos = new DataOutputSerializer(32); serializer.serialize(value, dos); return dos.getCopyOfBuffer(); } else { return null; } }
java
public static <T> byte[] serializeValue(T value, TypeSerializer<T> serializer) throws IOException { if (value != null) { // Serialize DataOutputSerializer dos = new DataOutputSerializer(32); serializer.serialize(value, dos); return dos.getCopyOfBuffer(); } else { return null; } }
[ "public", "static", "<", "T", ">", "byte", "[", "]", "serializeValue", "(", "T", "value", ",", "TypeSerializer", "<", "T", ">", "serializer", ")", "throws", "IOException", "{", "if", "(", "value", "!=", "null", ")", "{", "// Serialize", "DataOutputSerializ...
Serializes the value with the given serializer. @param value Value of type T to serialize @param serializer Serializer for T @param <T> Type of the value @return Serialized value or <code>null</code> if value <code>null</code> @throws IOException On failure during serialization
[ "Serializes", "the", "value", "with", "the", "given", "serializer", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/state/serialization/KvStateSerializer.java#L124-L133
train
Serialize a value to a byte array.
[ 30522, 2270, 10763, 1026, 1056, 1028, 24880, 1031, 1033, 7642, 4697, 10175, 5657, 1006, 1056, 3643, 1010, 4127, 11610, 28863, 1026, 1056, 1028, 7642, 17629, 1007, 11618, 22834, 10288, 24422, 1063, 2065, 1006, 3643, 999, 1027, 19701, 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
handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java
AbstractTrafficShapingHandler.releaseReadSuspended
void releaseReadSuspended(ChannelHandlerContext ctx) { Channel channel = ctx.channel(); channel.attr(READ_SUSPENDED).set(false); channel.config().setAutoRead(true); }
java
void releaseReadSuspended(ChannelHandlerContext ctx) { Channel channel = ctx.channel(); channel.attr(READ_SUSPENDED).set(false); channel.config().setAutoRead(true); }
[ "void", "releaseReadSuspended", "(", "ChannelHandlerContext", "ctx", ")", "{", "Channel", "channel", "=", "ctx", ".", "channel", "(", ")", ";", "channel", ".", "attr", "(", "READ_SUSPENDED", ")", ".", "set", "(", "false", ")", ";", "channel", ".", "config"...
Release the Read suspension
[ "Release", "the", "Read", "suspension" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java#L469-L473
train
Release read suspended flag.
[ 30522, 11675, 2713, 16416, 5104, 2271, 11837, 5732, 1006, 3149, 11774, 3917, 8663, 18209, 14931, 2595, 1007, 1063, 3149, 3149, 1027, 14931, 2595, 1012, 3149, 1006, 1007, 1025, 3149, 1012, 2012, 16344, 1006, 3191, 1035, 6731, 1007, 1012, 227...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/runtime/tasks/SourceStreamTask.java
SourceStreamTask.triggerCheckpoint
@Override public boolean triggerCheckpoint(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, boolean advanceToEndOfEventTime) throws Exception { if (!externallyInducedCheckpoints) { return super.triggerCheckpoint(checkpointMetaData, checkpointOptions, advanceToEndOfEventTime); } else...
java
@Override public boolean triggerCheckpoint(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, boolean advanceToEndOfEventTime) throws Exception { if (!externallyInducedCheckpoints) { return super.triggerCheckpoint(checkpointMetaData, checkpointOptions, advanceToEndOfEventTime); } else...
[ "@", "Override", "public", "boolean", "triggerCheckpoint", "(", "CheckpointMetaData", "checkpointMetaData", ",", "CheckpointOptions", "checkpointOptions", ",", "boolean", "advanceToEndOfEventTime", ")", "throws", "Exception", "{", "if", "(", "!", "externallyInducedCheckpoin...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java#L121-L132
train
This method is used to trigger a checkpoint.
[ 30522, 1030, 2058, 15637, 2270, 22017, 20898, 9495, 5403, 3600, 8400, 1006, 26520, 11368, 8447, 2696, 26520, 11368, 8447, 2696, 1010, 26520, 7361, 9285, 26520, 7361, 9285, 1010, 22017, 20898, 5083, 3406, 10497, 11253, 18697, 3372, 7292, 1007,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/typeinfo/Types.java
Types.VALUE
public static <V extends Value> TypeInformation<V> VALUE(Class<V> valueType) { return new ValueTypeInfo<>(valueType); }
java
public static <V extends Value> TypeInformation<V> VALUE(Class<V> valueType) { return new ValueTypeInfo<>(valueType); }
[ "public", "static", "<", "V", "extends", "Value", ">", "TypeInformation", "<", "V", ">", "VALUE", "(", "Class", "<", "V", ">", "valueType", ")", "{", "return", "new", "ValueTypeInfo", "<>", "(", "valueType", ")", ";", "}" ]
Returns type information for Flink value types (classes that implement {@link org.apache.flink.types.Value}). Built-in value types do not support null values (except for {@link org.apache.flink.types.StringValue}). <p>Value types describe their serialization and deserialization manually. Instead of going through a gen...
[ "Returns", "type", "information", "for", "Flink", "value", "types", "(", "classes", "that", "implement", "{", "@link", "org", ".", "apache", ".", "flink", ".", "types", ".", "Value", "}", ")", ".", "Built", "-", "in", "value", "types", "do", "not", "su...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/typeinfo/Types.java#L398-L400
train
Returns a type information for a value type.
[ 30522, 2270, 10763, 1026, 1058, 8908, 3643, 1028, 2828, 2378, 14192, 3370, 1026, 1058, 1028, 3643, 1006, 2465, 1026, 1058, 1028, 3643, 13874, 1007, 1063, 2709, 2047, 3643, 13874, 2378, 14876, 1026, 1028, 1006, 3643, 13874, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/model/perceptron/PerceptronTagger.java
PerceptronTagger.learn
public boolean learn(Instance instance) { if (instance == null) return false; model.update(instance); return true; }
java
public boolean learn(Instance instance) { if (instance == null) return false; model.update(instance); return true; }
[ "public", "boolean", "learn", "(", "Instance", "instance", ")", "{", "if", "(", "instance", "==", "null", ")", "return", "false", ";", "model", ".", "update", "(", "instance", ")", ";", "return", "true", ";", "}" ]
在线学习 @param instance @return
[ "在线学习" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/perceptron/PerceptronTagger.java#L55-L60
train
Learn a single instance of a CID .
[ 30522, 2270, 22017, 20898, 4553, 1006, 6013, 6013, 1007, 1063, 2065, 1006, 6013, 1027, 1027, 19701, 1007, 2709, 6270, 1025, 2944, 1012, 10651, 1006, 6013, 1007, 1025, 2709, 2995, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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.write
public boolean write(ImageOutputStream targetImageStream) throws IORuntimeException { Assert.notBlank(this.targetImageType, "Target image type is blank !"); Assert.notNull(targetImageStream, "Target output stream is null !"); final BufferedImage targetImage = (null == this.targetImage) ? this.srcImage : this...
java
public boolean write(ImageOutputStream targetImageStream) throws IORuntimeException { Assert.notBlank(this.targetImageType, "Target image type is blank !"); Assert.notNull(targetImageStream, "Target output stream is null !"); final BufferedImage targetImage = (null == this.targetImage) ? this.srcImage : this...
[ "public", "boolean", "write", "(", "ImageOutputStream", "targetImageStream", ")", "throws", "IORuntimeException", "{", "Assert", ".", "notBlank", "(", "this", ".", "targetImageType", ",", "\"Target image type is blank !\"", ")", ";", "Assert", ".", "notNull", "(", "...
写出图像为PNG格式 @param targetImageStream 写出到的目标流 @return 是否成功写出,如果返回false表示未找到合适的Writer @throws IORuntimeException IO异常
[ "写出图像为PNG格式" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/Img.java#L529-L537
train
Write the image to the target image stream.
[ 30522, 2270, 22017, 20898, 4339, 1006, 3746, 5833, 18780, 21422, 4539, 9581, 8449, 25379, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 20865, 1012, 2025, 28522, 8950, 1006, 2023, 1012, 4539, 9581, 18150, 18863, 1010, 1000, 4539, 3746,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/runtime/operators/windowing/MergingWindowSet.java
MergingWindowSet.addWindow
public W addWindow(W newWindow, MergeFunction<W> mergeFunction) throws Exception { List<W> windows = new ArrayList<>(); windows.addAll(this.mapping.keySet()); windows.add(newWindow); final Map<W, Collection<W>> mergeResults = new HashMap<>(); windowAssigner.mergeWindows(windows, new MergingWindowAssign...
java
public W addWindow(W newWindow, MergeFunction<W> mergeFunction) throws Exception { List<W> windows = new ArrayList<>(); windows.addAll(this.mapping.keySet()); windows.add(newWindow); final Map<W, Collection<W>> mergeResults = new HashMap<>(); windowAssigner.mergeWindows(windows, new MergingWindowAssign...
[ "public", "W", "addWindow", "(", "W", "newWindow", ",", "MergeFunction", "<", "W", ">", "mergeFunction", ")", "throws", "Exception", "{", "List", "<", "W", ">", "windows", "=", "new", "ArrayList", "<>", "(", ")", ";", "windows", ".", "addAll", "(", "th...
Adds a new {@code Window} to the set of in-flight windows. It might happen that this triggers merging of previously in-flight windows. In that case, the provided {@link MergeFunction} is called. <p>This returns the window that is the representative of the added window after adding. This can either be the new window it...
[ "Adds", "a", "new", "{", "@code", "Window", "}", "to", "the", "set", "of", "in", "-", "flight", "windows", ".", "It", "might", "happen", "that", "this", "triggers", "merging", "of", "previously", "in", "-", "flight", "windows", ".", "In", "that", "case...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/MergingWindowSet.java#L156-L225
train
Add a new window to the cluster.
[ 30522, 2270, 1059, 5587, 11101, 5004, 1006, 1059, 2047, 11101, 5004, 1010, 13590, 11263, 27989, 1026, 1059, 1028, 13590, 11263, 27989, 1007, 11618, 6453, 1063, 2862, 1026, 1059, 1028, 3645, 1027, 2047, 9140, 9863, 1026, 1028, 1006, 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-json/src/main/java/cn/hutool/json/JSONTokener.java
JSONTokener.next
public char next(char c) throws JSONException { char n = this.next(); if (n != c) { throw this.syntaxError("Expected '" + c + "' and instead saw '" + n + "'"); } return n; }
java
public char next(char c) throws JSONException { char n = this.next(); if (n != c) { throw this.syntaxError("Expected '" + c + "' and instead saw '" + n + "'"); } return n; }
[ "public", "char", "next", "(", "char", "c", ")", "throws", "JSONException", "{", "char", "n", "=", "this", ".", "next", "(", ")", ";", "if", "(", "n", "!=", "c", ")", "{", "throw", "this", ".", "syntaxError", "(", "\"Expected '\"", "+", "c", "+", ...
读取下一个字符,并比对是否和指定字符匹配 @param c 被匹配的字符 @return The character 匹配到的字符 @throws JSONException 如果不匹配抛出此异常
[ "读取下一个字符,并比对是否和指定字符匹配" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/JSONTokener.java#L144-L150
train
Get the next character from the JSON stream.
[ 30522, 2270, 25869, 2279, 1006, 25869, 1039, 1007, 11618, 1046, 3385, 10288, 24422, 1063, 25869, 1050, 1027, 2023, 1012, 2279, 1006, 1007, 1025, 2065, 1006, 1050, 999, 1027, 1039, 1007, 1063, 5466, 2023, 1012, 20231, 2121, 29165, 1006, 1000...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/support/ui/Select.java
Select.selectByValue
@Override public void selectByValue(String value) { for (WebElement option : findOptionsByValue(value)) { setSelected(option, true); if (!isMultiple()) { return; } } }
java
@Override public void selectByValue(String value) { for (WebElement option : findOptionsByValue(value)) { setSelected(option, true); if (!isMultiple()) { return; } } }
[ "@", "Override", "public", "void", "selectByValue", "(", "String", "value", ")", "{", "for", "(", "WebElement", "option", ":", "findOptionsByValue", "(", "value", ")", ")", "{", "setSelected", "(", "option", ",", "true", ")", ";", "if", "(", "!", "isMult...
Select all options that have a value matching the argument. That is, when given "foo" this would select an option like: &lt;option value="foo"&gt;Bar&lt;/option&gt; @param value The value to match against @throws NoSuchElementException If no matching option elements are found
[ "Select", "all", "options", "that", "have", "a", "value", "matching", "the", "argument", ".", "That", "is", "when", "given", "foo", "this", "would", "select", "an", "option", "like", ":" ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/support/ui/Select.java#L185-L193
train
Select all elements with a value.
[ 30522, 1030, 2058, 15637, 2270, 11675, 7276, 3762, 10175, 5657, 1006, 5164, 3643, 1007, 1063, 2005, 1006, 4773, 12260, 3672, 5724, 1024, 2424, 7361, 9285, 3762, 10175, 5657, 1006, 3643, 1007, 1007, 1063, 4520, 12260, 10985, 1006, 5724, 1010...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java
SegmentsUtil.getChar
public static char getChar(MemorySegment[] segments, int offset) { if (inFirstSegment(segments, offset, 2)) { return segments[0].getChar(offset); } else { return getCharMultiSegments(segments, offset); } }
java
public static char getChar(MemorySegment[] segments, int offset) { if (inFirstSegment(segments, offset, 2)) { return segments[0].getChar(offset); } else { return getCharMultiSegments(segments, offset); } }
[ "public", "static", "char", "getChar", "(", "MemorySegment", "[", "]", "segments", ",", "int", "offset", ")", "{", "if", "(", "inFirstSegment", "(", "segments", ",", "offset", ",", "2", ")", ")", "{", "return", "segments", "[", "0", "]", ".", "getChar"...
get char from segments. @param segments target segments. @param offset value offset.
[ "get", "char", "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#L956-L962
train
get char from segments.
[ 30522, 2270, 10763, 25869, 2131, 7507, 2099, 1006, 3638, 3366, 21693, 4765, 1031, 1033, 9214, 1010, 20014, 16396, 1007, 1063, 2065, 1006, 1999, 8873, 12096, 3366, 21693, 4765, 1006, 9214, 1010, 16396, 1010, 1016, 1007, 1007, 1063, 2709, 921...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.resize
private int resize(int newSize) { int[] base2 = new int[newSize]; int[] check2 = new int[newSize]; if (allocSize > 0) { System.arraycopy(base, 0, base2, 0, allocSize); System.arraycopy(check, 0, check2, 0, allocSize); } base = base2; c...
java
private int resize(int newSize) { int[] base2 = new int[newSize]; int[] check2 = new int[newSize]; if (allocSize > 0) { System.arraycopy(base, 0, base2, 0, allocSize); System.arraycopy(check, 0, check2, 0, allocSize); } base = base2; c...
[ "private", "int", "resize", "(", "int", "newSize", ")", "{", "int", "[", "]", "base2", "=", "new", "int", "[", "newSize", "]", ";", "int", "[", "]", "check2", "=", "new", "int", "[", "newSize", "]", ";", "if", "(", "allocSize", ">", "0", ")", "...
拓展数组 @param newSize @return
[ "拓展数组" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java#L87-L101
train
Resize the array of base and check arrays to the new size.
[ 30522, 2797, 20014, 24501, 4697, 1006, 20014, 2739, 4697, 1007, 1063, 20014, 1031, 1033, 2918, 2475, 1027, 2047, 20014, 1031, 2739, 4697, 1033, 1025, 20014, 1031, 1033, 4638, 2475, 1027, 2047, 20014, 1031, 2739, 4697, 1033, 1025, 2065, 1006...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/DataSet.java
DataSet.reduceGroup
public <R> GroupReduceOperator<T, R> reduceGroup(GroupReduceFunction<T, R> reducer) { if (reducer == null) { throw new NullPointerException("GroupReduce function must not be null."); } String callLocation = Utils.getCallLocationName(); TypeInformation<R> resultType = TypeExtractor.getGroupReduceReturnTypes(...
java
public <R> GroupReduceOperator<T, R> reduceGroup(GroupReduceFunction<T, R> reducer) { if (reducer == null) { throw new NullPointerException("GroupReduce function must not be null."); } String callLocation = Utils.getCallLocationName(); TypeInformation<R> resultType = TypeExtractor.getGroupReduceReturnTypes(...
[ "public", "<", "R", ">", "GroupReduceOperator", "<", "T", ",", "R", ">", "reduceGroup", "(", "GroupReduceFunction", "<", "T", ",", "R", ">", "reducer", ")", "{", "if", "(", "reducer", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ...
Applies a GroupReduce transformation on a non-grouped {@link DataSet}. <p>The transformation calls a {@link org.apache.flink.api.common.functions.RichGroupReduceFunction} once with the full DataSet. The GroupReduceFunction can iterate over all elements of the DataSet and emit any number of output elements including no...
[ "Applies", "a", "GroupReduce", "transformation", "on", "a", "non", "-", "grouped", "{", "@link", "DataSet", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L464-L472
train
Returns a new instance of this operator that reduces the results of the given group function.
[ 30522, 2270, 1026, 1054, 1028, 2177, 5596, 18796, 25918, 8844, 1026, 1056, 1010, 1054, 1028, 5547, 17058, 1006, 2177, 5596, 18796, 11263, 27989, 1026, 1056, 1010, 1054, 1028, 5547, 2099, 1007, 1063, 2065, 1006, 5547, 2099, 1027, 1027, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java
MapUtil.createMap
@SuppressWarnings("unchecked") public static <K, V> Map<K, V> createMap(Class<?> mapType) { if (mapType.isAssignableFrom(AbstractMap.class)) { return new HashMap<>(); } else { return (Map<K, V>) ReflectUtil.newInstance(mapType); } }
java
@SuppressWarnings("unchecked") public static <K, V> Map<K, V> createMap(Class<?> mapType) { if (mapType.isAssignableFrom(AbstractMap.class)) { return new HashMap<>(); } else { return (Map<K, V>) ReflectUtil.newInstance(mapType); } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "V", ">", "createMap", "(", "Class", "<", "?", ">", "mapType", ")", "{", "if", "(", "mapType", ".", "isAssignableFrom", "(", "Abstr...
创建Map<br> 传入抽象Map{@link AbstractMap}和{@link Map}类将默认创建{@link HashMap} @param <K> map键类型 @param <V> map值类型 @param mapType map类型 @return {@link Map}实例
[ "创建Map<br", ">", "传入抽象Map", "{", "@link", "AbstractMap", "}", "和", "{", "@link", "Map", "}", "类将默认创建", "{", "@link", "HashMap", "}" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java#L156-L163
train
Creates a map of the specified type.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 10763, 1026, 1047, 1010, 1058, 1028, 4949, 1026, 1047, 1010, 1058, 1028, 3443, 2863, 2361, 1006, 2465, 1026, 1029, 1028, 4949, 13874, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.range
public static int[] range(int start, int stop, int step) { if (start < stop) { step = Math.abs(step); } else if (start > stop) { step = -Math.abs(step); } else {// start == end return new int[] { start }; } int size = Math.abs((stop - start) / step) + 1; int[] values = new int[size]; ...
java
public static int[] range(int start, int stop, int step) { if (start < stop) { step = Math.abs(step); } else if (start > stop) { step = -Math.abs(step); } else {// start == end return new int[] { start }; } int size = Math.abs((stop - start) / step) + 1; int[] values = new int[size]; ...
[ "public", "static", "int", "[", "]", "range", "(", "int", "start", ",", "int", "stop", ",", "int", "step", ")", "{", "if", "(", "start", "<", "stop", ")", "{", "step", "=", "Math", ".", "abs", "(", "step", ")", ";", "}", "else", "if", "(", "s...
给定范围内的整数列表 @param start 开始(包含) @param stop 结束(包含) @param step 步进 @return 整数列表
[ "给定范围内的整数列表" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L1316-L1333
train
Returns an array of integers representing the range of the specified range of integers.
[ 30522, 2270, 10763, 20014, 1031, 1033, 2846, 1006, 20014, 2707, 1010, 20014, 2644, 1010, 20014, 3357, 1007, 1063, 2065, 1006, 2707, 1026, 2644, 1007, 1063, 3357, 1027, 8785, 1012, 14689, 1006, 3357, 1007, 1025, 1065, 2842, 2065, 1006, 2707,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/oauth/OauthHelper.java
OauthHelper.renewCCTokenAsync
private static void renewCCTokenAsync(final Jwt jwt) { // Not expired yet, try to renew async but let requests use the old token. logger.trace("In renew window but token is not expired yet."); if(!jwt.isRenewing() || System.currentTimeMillis() > jwt.getEarlyRetryTimeout()) { jwt.setR...
java
private static void renewCCTokenAsync(final Jwt jwt) { // Not expired yet, try to renew async but let requests use the old token. logger.trace("In renew window but token is not expired yet."); if(!jwt.isRenewing() || System.currentTimeMillis() > jwt.getEarlyRetryTimeout()) { jwt.setR...
[ "private", "static", "void", "renewCCTokenAsync", "(", "final", "Jwt", "jwt", ")", "{", "// Not expired yet, try to renew async but let requests use the old token.", "logger", ".", "trace", "(", "\"In renew window but token is not expired yet.\"", ")", ";", "if", "(", "!", ...
renew the given Jwt jwt asynchronously. When fail, it will swallow the exception, so no need return type to be handled by caller. @param jwt the jwt you want to renew
[ "renew", "the", "given", "Jwt", "jwt", "asynchronously", ".", "When", "fail", "it", "will", "swallow", "the", "exception", "so", "no", "need", "return", "type", "to", "be", "handled", "by", "caller", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/com/networknt/client/oauth/OauthHelper.java#L616-L637
train
Renew the CCToken asynchronously.
[ 30522, 2797, 10763, 11675, 20687, 9468, 18715, 26474, 6038, 2278, 1006, 2345, 1046, 26677, 1046, 26677, 1007, 1063, 1013, 1013, 2025, 13735, 2664, 1010, 3046, 2000, 20687, 2004, 6038, 2278, 2021, 2292, 11186, 2224, 1996, 2214, 19204, 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-mesos/src/main/java/org/apache/flink/mesos/Utils.java
Utils.uri
public static Protos.CommandInfo.URI uri(MesosArtifactResolver resolver, ContainerSpecification.Artifact artifact) { checkNotNull(resolver); checkNotNull(artifact); Option<URL> url = resolver.resolve(artifact.dest); if (url.isEmpty()) { throw new IllegalArgumentException("Unresolvable artifact: " + artifact....
java
public static Protos.CommandInfo.URI uri(MesosArtifactResolver resolver, ContainerSpecification.Artifact artifact) { checkNotNull(resolver); checkNotNull(artifact); Option<URL> url = resolver.resolve(artifact.dest); if (url.isEmpty()) { throw new IllegalArgumentException("Unresolvable artifact: " + artifact....
[ "public", "static", "Protos", ".", "CommandInfo", ".", "URI", "uri", "(", "MesosArtifactResolver", "resolver", ",", "ContainerSpecification", ".", "Artifact", "artifact", ")", "{", "checkNotNull", "(", "resolver", ")", ";", "checkNotNull", "(", "artifact", ")", ...
Construct a Mesos URI.
[ "Construct", "a", "Mesos", "URI", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/Utils.java#L73-L88
train
Create a URI from an artifact.
[ 30522, 2270, 10763, 15053, 2015, 1012, 3094, 2378, 14876, 1012, 24471, 2072, 24471, 2072, 1006, 2033, 17063, 8445, 10128, 18908, 6072, 4747, 6299, 10663, 2099, 1010, 16143, 5051, 6895, 10803, 1012, 20785, 20785, 1007, 1063, 4638, 17048, 11231...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgramUtils.java
PackagedProgramUtils.createJobGraph
public static JobGraph createJobGraph( PackagedProgram packagedProgram, Configuration configuration, int defaultParallelism, @Nullable JobID jobID) throws ProgramInvocationException { Thread.currentThread().setContextClassLoader(packagedProgram.getUserCodeClassLoader()); final Optimizer optimizer = new ...
java
public static JobGraph createJobGraph( PackagedProgram packagedProgram, Configuration configuration, int defaultParallelism, @Nullable JobID jobID) throws ProgramInvocationException { Thread.currentThread().setContextClassLoader(packagedProgram.getUserCodeClassLoader()); final Optimizer optimizer = new ...
[ "public", "static", "JobGraph", "createJobGraph", "(", "PackagedProgram", "packagedProgram", ",", "Configuration", "configuration", ",", "int", "defaultParallelism", ",", "@", "Nullable", "JobID", "jobID", ")", "throws", "ProgramInvocationException", "{", "Thread", ".",...
Creates a {@link JobGraph} with a specified {@link JobID} from the given {@link PackagedProgram}. @param packagedProgram to extract the JobGraph from @param configuration to use for the optimizer and job graph generator @param defaultParallelism for the JobGraph @param jobID the pre-generated job id @return JobGraph e...
[ "Creates", "a", "{", "@link", "JobGraph", "}", "with", "a", "specified", "{", "@link", "JobID", "}", "from", "the", "given", "{", "@link", "PackagedProgram", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgramUtils.java#L55-L106
train
Creates a job graph from a packaged program.
[ 30522, 2270, 10763, 3105, 14413, 3443, 5558, 2497, 14413, 1006, 21972, 21572, 13113, 21972, 21572, 13113, 1010, 9563, 9563, 1010, 20014, 12398, 28689, 6216, 28235, 1010, 1030, 19701, 3085, 3105, 3593, 3105, 3593, 1007, 11618, 2565, 2378, 1915...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/AbstractMergeInnerJoinIterator.java
AbstractMergeInnerJoinIterator.callWithNextKey
@Override public boolean callWithNextKey(final FlatJoinFunction<T1, T2, O> joinFunction, final Collector<O> collector) throws Exception { if (!this.iterator1.nextKey() || !this.iterator2.nextKey()) { // consume all remaining keys (hack to prevent remaining inputs during iterations, lets get rid of this soon) ...
java
@Override public boolean callWithNextKey(final FlatJoinFunction<T1, T2, O> joinFunction, final Collector<O> collector) throws Exception { if (!this.iterator1.nextKey() || !this.iterator2.nextKey()) { // consume all remaining keys (hack to prevent remaining inputs during iterations, lets get rid of this soon) ...
[ "@", "Override", "public", "boolean", "callWithNextKey", "(", "final", "FlatJoinFunction", "<", "T1", ",", "T2", ",", "O", ">", "joinFunction", ",", "final", "Collector", "<", "O", ">", "collector", ")", "throws", "Exception", "{", "if", "(", "!", "this", ...
Calls the <code>JoinFunction#join()</code> method for all two key-value pairs that share the same key and come from different inputs. The output of the <code>join()</code> method is forwarded. <p> This method first zig-zags between the two sorted inputs in order to find a common key, and then calls the join stub with t...
[ "Calls", "the", "<code", ">", "JoinFunction#join", "()", "<", "/", "code", ">", "method", "for", "all", "two", "key", "-", "value", "pairs", "that", "share", "the", "same", "key", "and", "come", "from", "different", "inputs", ".", "The", "output", "of", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/sort/AbstractMergeInnerJoinIterator.java#L63-L109
train
Call the join function with the next key.
[ 30522, 1030, 2058, 15637, 2270, 22017, 20898, 2655, 24415, 2638, 18413, 14839, 1006, 2345, 4257, 5558, 2378, 11263, 27989, 1026, 1056, 2487, 1010, 1056, 2475, 1010, 1051, 1028, 3693, 11263, 27989, 1010, 2345, 10018, 1026, 1051, 1028, 10018, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java
MysqlEventParser.findTransactionBeginPosition
private Long findTransactionBeginPosition(ErosaConnection mysqlConnection, final EntryPosition entryPosition) throws IOException { // 针对开始的第一条为非Begin记录,需要从该binlog扫描 final java.util.concurrent...
java
private Long findTransactionBeginPosition(ErosaConnection mysqlConnection, final EntryPosition entryPosition) throws IOException { // 针对开始的第一条为非Begin记录,需要从该binlog扫描 final java.util.concurrent...
[ "private", "Long", "findTransactionBeginPosition", "(", "ErosaConnection", "mysqlConnection", ",", "final", "EntryPosition", "entryPosition", ")", "throws", "IOException", "{", "// 针对开始的第一条为非Begin记录,需要从该binlog扫描", "final", "java", ".", "util", ".", "concurrent", ".", "ato...
主要考虑一个事务执行时间可能会几秒种,如果仅仅按照timestamp相同,则可能会丢失事务的前半部分数据
[ "主要考虑一个事务执行时间可能会几秒种,如果仅仅按照timestamp相同,则可能会丢失事务的前半部分数据" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java#L525-L568
train
Find transaction begin position.
[ 30522, 2797, 2146, 2424, 30524, 100, 100, 100, 100, 8026, 21197, 100, 100, 2345, 9262, 1012, 21183, 4014, 1012, 16483, 1012, 9593, 1012, 9593, 10052, 3653, 6494, 3619, 18908, 8496, 7559, 25856, 19234, 1027, 2047, 9262, 1012, 21183, 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-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/KeyedStream.java
KeyedStream.asQueryableState
@PublicEvolving @Deprecated public <ACC> QueryableStateStream<KEY, ACC> asQueryableState( String queryableStateName, FoldingStateDescriptor<T, ACC> stateDescriptor) { transform("Queryable state: " + queryableStateName, getType(), new QueryableAppendingStateOperator<>(queryableStateName, stateDescript...
java
@PublicEvolving @Deprecated public <ACC> QueryableStateStream<KEY, ACC> asQueryableState( String queryableStateName, FoldingStateDescriptor<T, ACC> stateDescriptor) { transform("Queryable state: " + queryableStateName, getType(), new QueryableAppendingStateOperator<>(queryableStateName, stateDescript...
[ "@", "PublicEvolving", "@", "Deprecated", "public", "<", "ACC", ">", "QueryableStateStream", "<", "KEY", ",", "ACC", ">", "asQueryableState", "(", "String", "queryableStateName", ",", "FoldingStateDescriptor", "<", "T", ",", "ACC", ">", "stateDescriptor", ")", "...
Publishes the keyed stream as a queryable FoldingState instance. @param queryableStateName Name under which to the publish the queryable state instance @param stateDescriptor State descriptor to create state instance from @return Queryable state instance @deprecated will be removed in a future version
[ "Publishes", "the", "keyed", "stream", "as", "a", "queryable", "FoldingState", "instance", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/KeyedStream.java#L1045-L1061
train
Returns a new QueryableStateStream with the given name and state descriptor.
[ 30522, 1030, 2270, 6777, 4747, 6455, 1030, 2139, 28139, 12921, 2270, 1026, 16222, 1028, 23032, 3085, 9153, 22199, 16416, 2213, 1026, 3145, 1010, 16222, 1028, 2004, 4226, 20444, 13510, 12259, 1006, 5164, 23032, 3085, 9153, 6528, 14074, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java
CollUtil.zip
public static <K, V> Map<K, V> zip(Collection<K> keys, Collection<V> values) { if (isEmpty(keys) || isEmpty(values)) { return null; } final List<K> keyList = new ArrayList<K>(keys); final List<V> valueList = new ArrayList<V>(values); final int size = Math.min(keys.size(), values.size()); final...
java
public static <K, V> Map<K, V> zip(Collection<K> keys, Collection<V> values) { if (isEmpty(keys) || isEmpty(values)) { return null; } final List<K> keyList = new ArrayList<K>(keys); final List<V> valueList = new ArrayList<V>(values); final int size = Math.min(keys.size(), values.size()); final...
[ "public", "static", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "V", ">", "zip", "(", "Collection", "<", "K", ">", "keys", ",", "Collection", "<", "V", ">", "values", ")", "{", "if", "(", "isEmpty", "(", "keys", ")", "||", "isEmpty", "(", ...
映射键值(参考Python的zip()函数)<br> 例如:<br> keys = [a,b,c,d]<br> values = [1,2,3,4]<br> 则得到的Map是 {a=1, b=2, c=3, d=4}<br> 如果两个数组长度不同,则只对应最短部分 @param <K> 键类型 @param <V> 值类型 @param keys 键列表 @param values 值列表 @return Map
[ "映射键值(参考Python的zip", "()", "函数)<br", ">", "例如:<br", ">", "keys", "=", "[", "a", "b", "c", "d", "]", "<br", ">", "values", "=", "[", "1", "2", "3", "4", "]", "<br", ">", "则得到的Map是", "{", "a", "=", "1", "b", "=", "2", "c", "=", "3", "d", "=",...
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java#L1486-L1501
train
Creates a map of the specified elements from the specified collections.
[ 30522, 2270, 10763, 1026, 1047, 1010, 1058, 1028, 4949, 1026, 1047, 1010, 1058, 1028, 14101, 1006, 3074, 1026, 1047, 1028, 6309, 1010, 3074, 1026, 1058, 1028, 5300, 1007, 1063, 2065, 1006, 2003, 6633, 13876, 2100, 1006, 6309, 1007, 1064, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/webservices/client/WebServiceTemplateBuilder.java
WebServiceTemplateBuilder.additionalInterceptors
public WebServiceTemplateBuilder additionalInterceptors( ClientInterceptor... interceptors) { Assert.notNull(interceptors, "Interceptors must not be null"); return additionalInterceptors(Arrays.asList(interceptors)); }
java
public WebServiceTemplateBuilder additionalInterceptors( ClientInterceptor... interceptors) { Assert.notNull(interceptors, "Interceptors must not be null"); return additionalInterceptors(Arrays.asList(interceptors)); }
[ "public", "WebServiceTemplateBuilder", "additionalInterceptors", "(", "ClientInterceptor", "...", "interceptors", ")", "{", "Assert", ".", "notNull", "(", "interceptors", ",", "\"Interceptors must not be null\"", ")", ";", "return", "additionalInterceptors", "(", "Arrays", ...
Add additional {@link ClientInterceptor ClientInterceptors} that should be used with the {@link WebServiceTemplate}. @param interceptors the interceptors to add @return a new builder instance @see #interceptors(ClientInterceptor...)
[ "Add", "additional", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/webservices/client/WebServiceTemplateBuilder.java#L235-L239
train
Add additional interceptors to the template.
[ 30522, 2270, 4773, 8043, 7903, 12870, 8737, 13806, 8569, 23891, 2099, 3176, 18447, 2121, 3401, 13876, 5668, 1006, 7396, 18447, 2121, 3401, 13876, 2953, 1012, 1012, 1012, 24727, 2015, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 24727, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
metrics/src/main/java/io/dropwizard/metrics/InstrumentedExecutorService.java
InstrumentedExecutorService.submit
@Nonnull @Override public Future<?> submit(@Nonnull Runnable runnable) { submitted.mark(); try { return delegate.submit(new InstrumentedRunnable(runnable)); } catch (RejectedExecutionException e) { rejected.mark(); throw e; } }
java
@Nonnull @Override public Future<?> submit(@Nonnull Runnable runnable) { submitted.mark(); try { return delegate.submit(new InstrumentedRunnable(runnable)); } catch (RejectedExecutionException e) { rejected.mark(); throw e; } }
[ "@", "Nonnull", "@", "Override", "public", "Future", "<", "?", ">", "submit", "(", "@", "Nonnull", "Runnable", "runnable", ")", "{", "submitted", ".", "mark", "(", ")", ";", "try", "{", "return", "delegate", ".", "submit", "(", "new", "InstrumentedRunnab...
{@inheritDoc}
[ "{" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/metrics/src/main/java/io/dropwizard/metrics/InstrumentedExecutorService.java#L88-L98
train
Submits a Runnable to the delegate thread.
[ 30522, 1030, 2512, 11231, 3363, 1030, 2058, 15637, 2270, 2925, 1026, 1029, 1028, 12040, 1006, 1030, 2512, 11231, 3363, 2448, 22966, 2448, 22966, 1007, 1063, 7864, 1012, 2928, 1006, 1007, 1025, 3046, 1063, 2709, 11849, 1012, 12040, 1006, 204...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java
StateDescriptor.setQueryable
public void setQueryable(String queryableStateName) { Preconditions.checkArgument( ttlConfig.getUpdateType() == StateTtlConfig.UpdateType.Disabled, "Queryable state is currently not supported with TTL"); if (this.queryableStateName == null) { this.queryableStateName = Preconditions.checkNotNull(queryableSt...
java
public void setQueryable(String queryableStateName) { Preconditions.checkArgument( ttlConfig.getUpdateType() == StateTtlConfig.UpdateType.Disabled, "Queryable state is currently not supported with TTL"); if (this.queryableStateName == null) { this.queryableStateName = Preconditions.checkNotNull(queryableSt...
[ "public", "void", "setQueryable", "(", "String", "queryableStateName", ")", "{", "Preconditions", ".", "checkArgument", "(", "ttlConfig", ".", "getUpdateType", "(", ")", "==", "StateTtlConfig", ".", "UpdateType", ".", "Disabled", ",", "\"Queryable state is currently n...
Sets the name for queries of state created from this descriptor. <p>If a name is set, the created state will be published for queries during runtime. The name needs to be unique per job. If there is another state instance published under the same name, the job will fail during runtime. @param queryableStateName State...
[ "Sets", "the", "name", "for", "queries", "of", "state", "created", "from", "this", "descriptor", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java#L211-L220
train
Sets the queryable state name.
[ 30522, 2270, 11675, 2275, 4226, 20444, 3468, 1006, 5164, 23032, 3085, 9153, 6528, 14074, 1007, 1063, 3653, 8663, 20562, 2015, 1012, 4638, 2906, 22850, 4765, 1006, 23746, 22499, 2078, 8873, 2290, 1012, 2131, 6279, 13701, 13874, 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...
alibaba/canal
dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java
LogBuffer.getFixString
public final String getFixString(final int pos, final int len, String charsetName) { if (pos + len > limit || pos < 0) throw new IllegalArgumentException("limit excceed: " + (pos < 0 ? pos : (pos + len))); final int from =...
java
public final String getFixString(final int pos, final int len, String charsetName) { if (pos + len > limit || pos < 0) throw new IllegalArgumentException("limit excceed: " + (pos < 0 ? pos : (pos + len))); final int from =...
[ "public", "final", "String", "getFixString", "(", "final", "int", "pos", ",", "final", "int", "len", ",", "String", "charsetName", ")", "{", "if", "(", "pos", "+", "len", ">", "limit", "||", "pos", "<", "0", ")", "throw", "new", "IllegalArgumentException...
Return fix length string from buffer.
[ "Return", "fix", "length", "string", "from", "buffer", "." ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java#L1061-L1077
train
Gets a string in the buffer starting at pos with len characters.
[ 30522, 2270, 2345, 5164, 2131, 8873, 2595, 3367, 4892, 1006, 2345, 20014, 13433, 2015, 1010, 2345, 20014, 18798, 1010, 5164, 25869, 13462, 18442, 1007, 1063, 2065, 1006, 13433, 2015, 1009, 18798, 1028, 5787, 1064, 1064, 13433, 2015, 1026, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/typeutils/BinaryRowSerializer.java
BinaryRowSerializer.checkSkipReadForFixLengthPart
public void checkSkipReadForFixLengthPart(AbstractPagedInputView source) throws IOException { // skip if there is no enough size. // Note: Use currentSegmentLimit instead of segmentSize. int available = source.getCurrentSegmentLimit() - source.getCurrentPositionInSegment(); if (available < getSerializedRowFixed...
java
public void checkSkipReadForFixLengthPart(AbstractPagedInputView source) throws IOException { // skip if there is no enough size. // Note: Use currentSegmentLimit instead of segmentSize. int available = source.getCurrentSegmentLimit() - source.getCurrentPositionInSegment(); if (available < getSerializedRowFixed...
[ "public", "void", "checkSkipReadForFixLengthPart", "(", "AbstractPagedInputView", "source", ")", "throws", "IOException", "{", "// skip if there is no enough size.", "// Note: Use currentSegmentLimit instead of segmentSize.", "int", "available", "=", "source", ".", "getCurrentSegme...
We need skip bytes to read when the remain bytes of current segment is not enough to write binary row fixed part. See {@link BinaryRow}.
[ "We", "need", "skip", "bytes", "to", "read", "when", "the", "remain", "bytes", "of", "current", "segment", "is", "not", "enough", "to", "write", "binary", "row", "fixed", "part", ".", "See", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/typeutils/BinaryRowSerializer.java#L298-L305
train
Check if skip read for fix length part.
[ 30522, 2270, 11675, 14148, 3211, 28139, 4215, 29278, 8873, 2595, 7770, 13512, 22269, 8445, 1006, 10061, 13704, 8718, 18780, 8584, 3120, 1007, 11618, 22834, 10288, 24422, 1063, 1013, 1013, 13558, 2065, 2045, 2003, 2053, 2438, 2946, 1012, 1013,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
launcher/src/main/java/org/apache/spark/launcher/OutputRedirector.java
OutputRedirector.containsIgnoreCase
private static boolean containsIgnoreCase(String str, String searchStr) { if (str == null || searchStr == null) { return false; } int len = searchStr.length(); int max = str.length() - len; for (int i = 0; i <= max; i++) { if (str.regionMatches(true, i, searchStr, 0, len)) { retu...
java
private static boolean containsIgnoreCase(String str, String searchStr) { if (str == null || searchStr == null) { return false; } int len = searchStr.length(); int max = str.length() - len; for (int i = 0; i <= max; i++) { if (str.regionMatches(true, i, searchStr, 0, len)) { retu...
[ "private", "static", "boolean", "containsIgnoreCase", "(", "String", "str", ",", "String", "searchStr", ")", "{", "if", "(", "str", "==", "null", "||", "searchStr", "==", "null", ")", "{", "return", "false", ";", "}", "int", "len", "=", "searchStr", ".",...
Copied from Apache Commons Lang {@code StringUtils#containsIgnoreCase(String, String)}
[ "Copied", "from", "Apache", "Commons", "Lang", "{" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/launcher/src/main/java/org/apache/spark/launcher/OutputRedirector.java#L100-L112
train
Checks if the string contains the search string ignoring case.
[ 30522, 2797, 10763, 22017, 20898, 3397, 23773, 5686, 18382, 1006, 5164, 2358, 2099, 1010, 5164, 3945, 3367, 2099, 1007, 1063, 2065, 1006, 2358, 2099, 1027, 1027, 19701, 1064, 1064, 3945, 3367, 2099, 1027, 1027, 19701, 1007, 1063, 2709, 6270...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/functions/sink/SocketClientSink.java
SocketClientSink.open
@Override public void open(Configuration parameters) throws Exception { try { synchronized (lock) { createConnection(); } } catch (IOException e) { throw new IOException("Cannot connect to socket server at " + hostName + ":" + port, e); } }
java
@Override public void open(Configuration parameters) throws Exception { try { synchronized (lock) { createConnection(); } } catch (IOException e) { throw new IOException("Cannot connect to socket server at " + hostName + ":" + port, e); } }
[ "@", "Override", "public", "void", "open", "(", "Configuration", "parameters", ")", "throws", "Exception", "{", "try", "{", "synchronized", "(", "lock", ")", "{", "createConnection", "(", ")", ";", "}", "}", "catch", "(", "IOException", "e", ")", "{", "t...
Initialize the connection with the Socket in the server. @param parameters Configuration.
[ "Initialize", "the", "connection", "with", "the", "Socket", "in", "the", "server", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/SocketClientSink.java#L125-L135
train
Open the connection to the socket server.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2330, 1006, 9563, 11709, 1007, 11618, 6453, 1063, 3046, 1063, 25549, 1006, 5843, 1007, 1063, 3443, 8663, 2638, 7542, 1006, 1007, 1025, 1065, 1065, 4608, 1006, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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-script/src/main/java/cn/hutool/script/FullSupportScriptEngine.java
FullSupportScriptEngine.compile
@Override public CompiledScript compile(String script) throws ScriptException { return ((Compilable) engine).compile(script); }
java
@Override public CompiledScript compile(String script) throws ScriptException { return ((Compilable) engine).compile(script); }
[ "@", "Override", "public", "CompiledScript", "compile", "(", "String", "script", ")", "throws", "ScriptException", "{", "return", "(", "(", "Compilable", ")", "engine", ")", ".", "compile", "(", "script", ")", ";", "}" ]
----------------------------------------------------------------------------------------------- Compilable
[ "-----------------------------------------------------------------------------------------------", "Compilable" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-script/src/main/java/cn/hutool/script/FullSupportScriptEngine.java#L78-L81
train
Compile a script.
[ 30522, 1030, 2058, 15637, 2270, 9227, 22483, 4012, 22090, 1006, 5164, 5896, 1007, 11618, 5896, 10288, 24422, 1063, 2709, 1006, 1006, 4012, 8197, 20470, 2571, 1007, 3194, 1007, 1012, 4012, 22090, 1006, 5896, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/lexer/Lexer.java
Lexer.nextToken
public final void nextToken() { skipIgnoredToken(); if (isVariableBegin()) { currentToken = new Tokenizer(input, dictionary, offset).scanVariable(); } else if (isNCharBegin()) { currentToken = new Tokenizer(input, dictionary, ++offset).scanChars(); } else if (isId...
java
public final void nextToken() { skipIgnoredToken(); if (isVariableBegin()) { currentToken = new Tokenizer(input, dictionary, offset).scanVariable(); } else if (isNCharBegin()) { currentToken = new Tokenizer(input, dictionary, ++offset).scanChars(); } else if (isId...
[ "public", "final", "void", "nextToken", "(", ")", "{", "skipIgnoredToken", "(", ")", ";", "if", "(", "isVariableBegin", "(", ")", ")", "{", "currentToken", "=", "new", "Tokenizer", "(", "input", ",", "dictionary", ",", "offset", ")", ".", "scanVariable", ...
Analyse next token.
[ "Analyse", "next", "token", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/lexer/Lexer.java#L50-L72
train
Method nextToken.
[ 30522, 2270, 2345, 11675, 2279, 18715, 2368, 1006, 1007, 1063, 13558, 23773, 19574, 18715, 2368, 1006, 1007, 1025, 2065, 1006, 2003, 10755, 19210, 4783, 11528, 1006, 1007, 1007, 1063, 2783, 18715, 2368, 1027, 2047, 19204, 17629, 1006, 7953, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/summary/KeywordExtractor.java
KeywordExtractor.getKeywords
public List<String> getKeywords(String document, int size) { return getKeywords(defaultSegment.seg(document), size); }
java
public List<String> getKeywords(String document, int size) { return getKeywords(defaultSegment.seg(document), size); }
[ "public", "List", "<", "String", ">", "getKeywords", "(", "String", "document", ",", "int", "size", ")", "{", "return", "getKeywords", "(", "defaultSegment", ".", "seg", "(", "document", ")", ",", "size", ")", ";", "}" ]
提取关键词 @param document 关键词 @param size 需要几个关键词 @return
[ "提取关键词" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/summary/KeywordExtractor.java#L81-L84
train
Get the words of a document.
[ 30522, 2270, 2862, 1026, 5164, 1028, 2131, 14839, 22104, 1006, 5164, 6254, 1010, 20014, 2946, 1007, 1063, 2709, 2131, 14839, 22104, 1006, 12398, 3366, 21693, 4765, 1012, 7367, 2290, 1006, 6254, 1007, 1010, 2946, 1007, 1025, 1065, 102, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java
HttpHeaders.addIntHeader
@Deprecated public static void addIntHeader(HttpMessage message, CharSequence name, int value) { message.headers().addInt(name, value); }
java
@Deprecated public static void addIntHeader(HttpMessage message, CharSequence name, int value) { message.headers().addInt(name, value); }
[ "@", "Deprecated", "public", "static", "void", "addIntHeader", "(", "HttpMessage", "message", ",", "CharSequence", "name", ",", "int", "value", ")", "{", "message", ".", "headers", "(", ")", ".", "addInt", "(", "name", ",", "value", ")", ";", "}" ]
@deprecated Use {@link #addInt(CharSequence, int)} instead. Adds a new integer header with the specified name and value.
[ "@deprecated", "Use", "{", "@link", "#addInt", "(", "CharSequence", "int", ")", "}", "instead", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java#L816-L819
train
Add an int header to the message.
[ 30522, 1030, 2139, 28139, 12921, 2270, 10763, 11675, 5587, 18447, 4974, 2121, 1006, 8299, 7834, 3736, 3351, 4471, 1010, 25869, 3366, 4226, 5897, 2171, 1010, 20014, 3643, 1007, 1063, 4471, 1012, 20346, 2015, 1006, 1007, 1012, 5587, 18447, 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/ReflectUtil.java
ReflectUtil.newInstanceIfPossible
public static <T> T newInstanceIfPossible(Class<T> beanClass) { Assert.notNull(beanClass); try { return newInstance(beanClass); } catch (Exception e) { // ignore // 默认构造不存在的情况下查找其它构造 } final Constructor<T>[] constructors = getConstructors(beanClass); Class<?>[] parameterTypes; for (...
java
public static <T> T newInstanceIfPossible(Class<T> beanClass) { Assert.notNull(beanClass); try { return newInstance(beanClass); } catch (Exception e) { // ignore // 默认构造不存在的情况下查找其它构造 } final Constructor<T>[] constructors = getConstructors(beanClass); Class<?>[] parameterTypes; for (...
[ "public", "static", "<", "T", ">", "T", "newInstanceIfPossible", "(", "Class", "<", "T", ">", "beanClass", ")", "{", "Assert", ".", "notNull", "(", "beanClass", ")", ";", "try", "{", "return", "newInstance", "(", "beanClass", ")", ";", "}", "catch", "(...
尝试遍历并调用此类的所有构造方法,直到构造成功并返回 @param <T> 对象类型 @param beanClass 被构造的类 @return 构造后的对象
[ "尝试遍历并调用此类的所有构造方法,直到构造成功并返回" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L698-L723
train
Creates a new instance of the specified class by looking for constructors and default values.
[ 30522, 2270, 10763, 1026, 1056, 1028, 1056, 2047, 7076, 26897, 10128, 6873, 18719, 3468, 1006, 2465, 1026, 1056, 1028, 14068, 26266, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 14068, 26266, 1007, 1025, 3046, 1063, 2709, 2047, 7076, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/typeutils/TypeSerializerUtils.java
TypeSerializerUtils.configureForBackwardsCompatibility
@SuppressWarnings({"unchecked", "deprecation"}) private static <T> TypeSerializerSnapshot<T> configureForBackwardsCompatibility( TypeSerializerSnapshot<?> snapshot, TypeSerializer<?> serializer) { TypeSerializerSnapshot<T> typedSnapshot = (TypeSerializerSnapshot<T>) snapshot; TypeSerializer<T> typedSerializ...
java
@SuppressWarnings({"unchecked", "deprecation"}) private static <T> TypeSerializerSnapshot<T> configureForBackwardsCompatibility( TypeSerializerSnapshot<?> snapshot, TypeSerializer<?> serializer) { TypeSerializerSnapshot<T> typedSnapshot = (TypeSerializerSnapshot<T>) snapshot; TypeSerializer<T> typedSerializ...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"deprecation\"", "}", ")", "private", "static", "<", "T", ">", "TypeSerializerSnapshot", "<", "T", ">", "configureForBackwardsCompatibility", "(", "TypeSerializerSnapshot", "<", "?", ">", "snapshot", ",", ...
Utility method to bind the serializer and serializer snapshot to a common generic type variable.
[ "Utility", "method", "to", "bind", "the", "serializer", "and", "serializer", "snapshot", "to", "a", "common", "generic", "type", "variable", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/typeutils/TypeSerializerUtils.java#L56-L69
train
Configure the given snapshot for backwards compatibility.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1063, 1000, 4895, 5403, 18141, 1000, 1010, 1000, 2139, 28139, 10719, 1000, 1065, 1007, 2797, 10763, 1026, 1056, 1028, 4127, 11610, 28863, 2015, 2532, 4523, 12326, 1026, 1056, 1028, 9530, 8873, 273...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec/src/main/java/io/netty/handler/codec/LineBasedFrameDecoder.java
LineBasedFrameDecoder.decode
protected Object decode(ChannelHandlerContext ctx, ByteBuf buffer) throws Exception { final int eol = findEndOfLine(buffer); if (!discarding) { if (eol >= 0) { final ByteBuf frame; final int length = eol - buffer.readerIndex(); final int delimL...
java
protected Object decode(ChannelHandlerContext ctx, ByteBuf buffer) throws Exception { final int eol = findEndOfLine(buffer); if (!discarding) { if (eol >= 0) { final ByteBuf frame; final int length = eol - buffer.readerIndex(); final int delimL...
[ "protected", "Object", "decode", "(", "ChannelHandlerContext", "ctx", ",", "ByteBuf", "buffer", ")", "throws", "Exception", "{", "final", "int", "eol", "=", "findEndOfLine", "(", "buffer", ")", ";", "if", "(", "!", "discarding", ")", "{", "if", "(", "eol",...
Create a frame out of the {@link ByteBuf} and return it. @param ctx the {@link ChannelHandlerContext} which this {@link ByteToMessageDecoder} belongs to @param buffer the {@link ByteBuf} from which to read data @return frame the {@link ByteBuf} which represent the frame or {@code nu...
[ "Create", "a", "frame", "out", "of", "the", "{", "@link", "ByteBuf", "}", "and", "return", "it", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/LineBasedFrameDecoder.java#L98-L151
train
Decodes the message.
[ 30522, 5123, 4874, 21933, 3207, 1006, 3149, 11774, 3917, 8663, 18209, 14931, 2595, 1010, 24880, 8569, 2546, 17698, 1007, 11618, 6453, 1063, 2345, 20014, 1041, 4747, 1027, 2424, 10497, 11253, 4179, 1006, 17698, 1007, 1025, 2065, 1006, 999, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/AdamicAdar.java
AdamicAdar.setMinimumScore
public AdamicAdar<K, VV, EV> setMinimumScore(float score) { Preconditions.checkArgument(score >= 0, "Minimum score must be non-negative"); this.minimumScore = score; return this; }
java
public AdamicAdar<K, VV, EV> setMinimumScore(float score) { Preconditions.checkArgument(score >= 0, "Minimum score must be non-negative"); this.minimumScore = score; return this; }
[ "public", "AdamicAdar", "<", "K", ",", "VV", ",", "EV", ">", "setMinimumScore", "(", "float", "score", ")", "{", "Preconditions", ".", "checkArgument", "(", "score", ">=", "0", ",", "\"Minimum score must be non-negative\"", ")", ";", "this", ".", "minimumScore...
Filter out Adamic-Adar scores less than the given minimum. @param score minimum score @return this
[ "Filter", "out", "Adamic", "-", "Adar", "scores", "less", "than", "the", "given", "minimum", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/AdamicAdar.java#L94-L100
train
Sets the minimum score.
[ 30522, 2270, 4205, 5555, 7662, 1026, 1047, 1010, 1058, 2615, 1010, 23408, 1028, 30524, 2442, 2022, 2512, 1011, 4997, 1000, 1007, 1025, 2023, 1012, 6263, 9363, 2890, 1027, 3556, 1025, 2709, 2023, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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/org/apache/hc/core5/http/message/copied/TokenParser.java
TokenParser.skipWhiteSpace
public void skipWhiteSpace(final CharSequence buf, final ParserCursor cursor) { Args.notNull(buf, "Char sequence"); Args.notNull(cursor, "Parser cursor"); int pos = cursor.getPos(); final int indexFrom = cursor.getPos(); final int indexTo = cursor.getUpperBound(); for (in...
java
public void skipWhiteSpace(final CharSequence buf, final ParserCursor cursor) { Args.notNull(buf, "Char sequence"); Args.notNull(cursor, "Parser cursor"); int pos = cursor.getPos(); final int indexFrom = cursor.getPos(); final int indexTo = cursor.getUpperBound(); for (in...
[ "public", "void", "skipWhiteSpace", "(", "final", "CharSequence", "buf", ",", "final", "ParserCursor", "cursor", ")", "{", "Args", ".", "notNull", "(", "buf", ",", "\"Char sequence\"", ")", ";", "Args", ".", "notNull", "(", "cursor", ",", "\"Parser cursor\"", ...
Skips semantically insignificant whitespace characters and moves the cursor to the closest non-whitespace character. @param buf buffer with the sequence of chars to be parsed @param cursor defines the bounds and current position of the buffer
[ "Skips", "semantically", "insignificant", "whitespace", "characters", "and", "moves", "the", "cursor", "to", "the", "closest", "non", "-", "whitespace", "character", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/org/apache/hc/core5/http/message/copied/TokenParser.java#L138-L152
train
Skip whitespace from the char sequence.
[ 30522, 2270, 11675, 13558, 2860, 16584, 2229, 15327, 1006, 2345, 25869, 3366, 4226, 5897, 20934, 2546, 1010, 2345, 11968, 8043, 10841, 25301, 2099, 12731, 25301, 2099, 1007, 1063, 12098, 5620, 1012, 2025, 11231, 3363, 1006, 20934, 2546, 1010,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/MultipleIdsMessageAcknowledgingSourceBase.java
MultipleIdsMessageAcknowledgingSourceBase.snapshotState
@Override public void snapshotState(FunctionSnapshotContext context) throws Exception { sessionIdsPerSnapshot.add(new Tuple2<>(context.getCheckpointId(), sessionIds)); sessionIds = new ArrayList<>(64); super.snapshotState(context); }
java
@Override public void snapshotState(FunctionSnapshotContext context) throws Exception { sessionIdsPerSnapshot.add(new Tuple2<>(context.getCheckpointId(), sessionIds)); sessionIds = new ArrayList<>(64); super.snapshotState(context); }
[ "@", "Override", "public", "void", "snapshotState", "(", "FunctionSnapshotContext", "context", ")", "throws", "Exception", "{", "sessionIdsPerSnapshot", ".", "add", "(", "new", "Tuple2", "<>", "(", "context", ".", "getCheckpointId", "(", ")", ",", "sessionIds", ...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/MultipleIdsMessageAcknowledgingSourceBase.java#L139-L144
train
This method is called by the snapshot manager to add the session ids to the list of session ids to be snapshotted.
[ 30522, 1030, 2058, 15637, 2270, 11675, 20057, 12326, 9153, 2618, 1006, 4972, 2532, 4523, 12326, 8663, 18209, 6123, 1007, 11618, 6453, 1063, 5219, 9821, 7347, 2532, 4523, 12326, 1012, 5587, 1006, 2047, 10722, 10814, 2475, 1026, 1028, 1006, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...