repo
stringclasses
11 values
path
stringlengths
41
234
func_name
stringlengths
5
78
original_string
stringlengths
71
14.1k
language
stringclasses
1 value
code
stringlengths
71
14.1k
code_tokens
listlengths
22
2.65k
docstring
stringlengths
2
5.35k
docstring_tokens
listlengths
1
369
sha
stringclasses
11 values
url
stringlengths
129
339
partition
stringclasses
1 value
summary
stringlengths
7
175
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
apache/flink
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer.java
FlinkKafkaProducer.flush
private void flush(FlinkKafkaProducer.KafkaTransactionState transaction) throws FlinkKafkaException { if (transaction.producer != null) { transaction.producer.flush(); } long pendingRecordsCount = pendingRecords.get(); if (pendingRecordsCount != 0) { throw new IllegalStateException("Pending record count m...
java
private void flush(FlinkKafkaProducer.KafkaTransactionState transaction) throws FlinkKafkaException { if (transaction.producer != null) { transaction.producer.flush(); } long pendingRecordsCount = pendingRecords.get(); if (pendingRecordsCount != 0) { throw new IllegalStateException("Pending record count m...
[ "private", "void", "flush", "(", "FlinkKafkaProducer", ".", "KafkaTransactionState", "transaction", ")", "throws", "FlinkKafkaException", "{", "if", "(", "transaction", ".", "producer", "!=", "null", ")", "{", "transaction", ".", "producer", ".", "flush", "(", "...
Flush pending records. @param transaction
[ "Flush", "pending", "records", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer.java#L777-L788
train
Flushes the current transaction.
[ 30522, 2797, 11675, 13862, 1006, 13109, 19839, 2912, 24316, 9331, 14127, 18796, 2099, 1012, 10556, 24316, 4017, 5521, 3736, 22014, 12259, 12598, 1007, 11618, 13109, 19839, 2912, 24316, 6679, 2595, 24422, 1063, 2065, 1006, 12598, 1012, 3135, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.insert
@SuppressWarnings("unchecked") public static <T> Object insert(Object array, int index, T... newElements) { if (isEmpty(newElements)) { return array; } if(isEmpty(array)) { return newElements; } final int len = length(array); if (index < 0) { index = (index % len) + len; } ...
java
@SuppressWarnings("unchecked") public static <T> Object insert(Object array, int index, T... newElements) { if (isEmpty(newElements)) { return array; } if(isEmpty(array)) { return newElements; } final int len = length(array); if (index < 0) { index = (index % len) + len; } ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "Object", "insert", "(", "Object", "array", ",", "int", "index", ",", "T", "...", "newElements", ")", "{", "if", "(", "isEmpty", "(", "newElements", ")", ")", "{", "...
将新元素插入到到已有数组中的某个位置<br> 添加新元素会生成一个新的数组,不影响原数组<br> 如果插入位置为为负数,从原数组从后向前计数,若大于原数组长度,则空白处用null填充 @param <T> 数组元素类型 @param array 已有数组 @param index 插入位置,此位置为对应此位置元素之前的空档 @param newElements 新元素 @return 新数组 @since 4.0.8
[ "将新元素插入到到已有数组中的某个位置<br", ">", "添加新元素会生成一个新的数组,不影响原数组<br", ">", "如果插入位置为为负数,从原数组从后向前计数,若大于原数组长度,则空白处用null填充" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java#L473-L494
train
Inserts the specified elements into the specified array at the specified index.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 10763, 1026, 1056, 1028, 4874, 19274, 1006, 4874, 9140, 1010, 20014, 5950, 1010, 1056, 1012, 1012, 1012, 2047, 12260, 8163, 1007, 1063, 2065, 1006, 2003,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/ClosableBlockingQueue.java
ClosableBlockingQueue.getElementBlocking
public E getElementBlocking(long timeoutMillis) throws InterruptedException { if (timeoutMillis == 0L) { // wait forever case return getElementBlocking(); } else if (timeoutMillis < 0L) { throw new IllegalArgumentException("invalid timeout"); } final long deadline = System.nanoTime() + timeoutMillis *...
java
public E getElementBlocking(long timeoutMillis) throws InterruptedException { if (timeoutMillis == 0L) { // wait forever case return getElementBlocking(); } else if (timeoutMillis < 0L) { throw new IllegalArgumentException("invalid timeout"); } final long deadline = System.nanoTime() + timeoutMillis *...
[ "public", "E", "getElementBlocking", "(", "long", "timeoutMillis", ")", "throws", "InterruptedException", "{", "if", "(", "timeoutMillis", "==", "0L", ")", "{", "// wait forever case", "return", "getElementBlocking", "(", ")", ";", "}", "else", "if", "(", "timeo...
Returns the next element in the queue. If the queue is empty, this method waits at most a certain time until an element becomes available. If no element is available after that time, the method returns null. <p>The method throws an {@code IllegalStateException} if the queue is closed. Checking whether the queue is ope...
[ "Returns", "the", "next", "element", "in", "the", "queue", ".", "If", "the", "queue", "is", "empty", "this", "method", "waits", "at", "most", "a", "certain", "time", "until", "an", "element", "becomes", "available", ".", "If", "no", "element", "is", "ava...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/ClosableBlockingQueue.java#L352-L380
train
Get the next element in the queue blocking until it is empty.
[ 30522, 2270, 1041, 2131, 12260, 3672, 23467, 2075, 1006, 2146, 2051, 5833, 19912, 2483, 1007, 11618, 7153, 10288, 24422, 1063, 2065, 1006, 2051, 5833, 19912, 2483, 1027, 1027, 1014, 2140, 1007, 1063, 1013, 1013, 3524, 5091, 2553, 2709, 2131...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/ZookeeperOffsetHandler.java
ZookeeperOffsetHandler.setOffsetInZooKeeper
public static void setOffsetInZooKeeper(CuratorFramework curatorClient, String groupId, String topic, int partition, long offset) throws Exception { ZKGroupTopicDirs topicDirs = new ZKGroupTopicDirs(groupId, topic); String path = topicDirs.consumerOffsetDir() + "/" + partition; curatorClient.newNamespaceAwareEnsu...
java
public static void setOffsetInZooKeeper(CuratorFramework curatorClient, String groupId, String topic, int partition, long offset) throws Exception { ZKGroupTopicDirs topicDirs = new ZKGroupTopicDirs(groupId, topic); String path = topicDirs.consumerOffsetDir() + "/" + partition; curatorClient.newNamespaceAwareEnsu...
[ "public", "static", "void", "setOffsetInZooKeeper", "(", "CuratorFramework", "curatorClient", ",", "String", "groupId", ",", "String", "topic", ",", "int", "partition", ",", "long", "offset", ")", "throws", "Exception", "{", "ZKGroupTopicDirs", "topicDirs", "=", "...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/ZookeeperOffsetHandler.java#L119-L125
train
Sets the offset in ZooKeeper.
[ 30522, 2270, 10763, 11675, 2275, 27475, 20624, 25650, 11045, 13699, 2121, 1006, 13023, 15643, 6198, 13023, 20464, 11638, 1010, 5164, 2177, 3593, 1010, 5164, 8476, 1010, 20014, 13571, 1010, 2146, 16396, 1007, 11618, 6453, 1063, 1062, 2243, 170...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/format/FastDateFormat.java
FastDateFormat.getDateInstance
public static FastDateFormat getDateInstance(final int style, final TimeZone timeZone) { return cache.getDateInstance(style, timeZone, null); }
java
public static FastDateFormat getDateInstance(final int style, final TimeZone timeZone) { return cache.getDateInstance(style, timeZone, null); }
[ "public", "static", "FastDateFormat", "getDateInstance", "(", "final", "int", "style", ",", "final", "TimeZone", "timeZone", ")", "{", "return", "cache", ".", "getDateInstance", "(", "style", ",", "timeZone", ",", "null", ")", ";", "}" ]
获得 {@link FastDateFormat} 实例<br> 支持缓存 @param style date style: FULL, LONG, MEDIUM, or SHORT @param timeZone 时区{@link TimeZone} @return 本地化 {@link FastDateFormat}
[ "获得", "{", "@link", "FastDateFormat", "}", "实例<br", ">", "支持缓存" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/format/FastDateFormat.java#L145-L147
train
Gets the date instance.
[ 30522, 2270, 10763, 3435, 13701, 14192, 4017, 2131, 13701, 7076, 26897, 1006, 2345, 20014, 2806, 1010, 2345, 2051, 15975, 2051, 15975, 1007, 1063, 2709, 17053, 1012, 2131, 13701, 7076, 26897, 1006, 2806, 1010, 2051, 15975, 1010, 19701, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/TopNBuffer.java
TopNBuffer.putAll
void putAll(BaseRow sortKey, Collection<BaseRow> values) { treeMap.put(sortKey, values); currentTopNum += values.size(); }
java
void putAll(BaseRow sortKey, Collection<BaseRow> values) { treeMap.put(sortKey, values); currentTopNum += values.size(); }
[ "void", "putAll", "(", "BaseRow", "sortKey", ",", "Collection", "<", "BaseRow", ">", "values", ")", "{", "treeMap", ".", "put", "(", "sortKey", ",", "values", ")", ";", "currentTopNum", "+=", "values", ".", "size", "(", ")", ";", "}" ]
Puts a record list into the buffer under the sortKey. Note: if buffer already contains sortKey, putAll will overwrite the previous value @param sortKey sort key with which the specified values are to be associated @param values record lists to be associated with the specified key
[ "Puts", "a", "record", "list", "into", "the", "buffer", "under", "the", "sortKey", ".", "Note", ":", "if", "buffer", "already", "contains", "sortKey", "putAll", "will", "overwrite", "the", "previous", "value" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/TopNBuffer.java#L77-L80
train
Adds all values to the tree.
[ 30522, 11675, 2404, 8095, 1006, 2918, 10524, 4066, 14839, 1010, 3074, 1026, 2918, 10524, 1028, 5300, 1007, 1063, 3392, 2863, 2361, 1012, 2404, 1006, 4066, 14839, 1010, 5300, 1007, 1025, 2783, 14399, 19172, 1009, 1027, 5300, 1012, 2946, 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...
alibaba/canal
client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/monitor/remote/DbRemoteConfigLoader.java
DbRemoteConfigLoader.loadRemoteAdapterConfigs
@Override public void loadRemoteAdapterConfigs() { try { // 加载远程adapter配置 loadModifiedAdapterConfigs(); } catch (Exception e) { logger.error(e.getMessage(), e); } }
java
@Override public void loadRemoteAdapterConfigs() { try { // 加载远程adapter配置 loadModifiedAdapterConfigs(); } catch (Exception e) { logger.error(e.getMessage(), e); } }
[ "@", "Override", "public", "void", "loadRemoteAdapterConfigs", "(", ")", "{", "try", "{", "// 加载远程adapter配置\r", "loadModifiedAdapterConfigs", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "logger", ".", "error", "(", "e", ".", "getMessage", "...
加载adapter配置
[ "加载adapter配置" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/monitor/remote/DbRemoteConfigLoader.java#L134-L142
train
Override this method to load the remote adapter configs.
[ 30522, 1030, 2058, 15637, 2270, 11675, 7170, 28578, 12184, 8447, 13876, 2121, 8663, 8873, 5620, 1006, 1007, 1063, 3046, 1063, 1013, 1013, 1779, 100, 100, 100, 15581, 2121, 100, 100, 7170, 5302, 4305, 10451, 8447, 13876, 2121, 8663, 8873, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java
StreamGraphGenerator.transformTwoInputTransform
private <IN1, IN2, OUT> Collection<Integer> transformTwoInputTransform(TwoInputTransformation<IN1, IN2, OUT> transform) { Collection<Integer> inputIds1 = transform(transform.getInput1()); Collection<Integer> inputIds2 = transform(transform.getInput2()); // the recursive call might have already transformed this ...
java
private <IN1, IN2, OUT> Collection<Integer> transformTwoInputTransform(TwoInputTransformation<IN1, IN2, OUT> transform) { Collection<Integer> inputIds1 = transform(transform.getInput1()); Collection<Integer> inputIds2 = transform(transform.getInput2()); // the recursive call might have already transformed this ...
[ "private", "<", "IN1", ",", "IN2", ",", "OUT", ">", "Collection", "<", "Integer", ">", "transformTwoInputTransform", "(", "TwoInputTransformation", "<", "IN1", ",", "IN2", ",", "OUT", ">", "transform", ")", "{", "Collection", "<", "Integer", ">", "inputIds1"...
Transforms a {@code TwoInputTransformation}. <p>This recursively transforms the inputs, creates a new {@code StreamNode} in the graph and wired the inputs to this new node.
[ "Transforms", "a", "{", "@code", "TwoInputTransformation", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java#L577-L626
train
Transform two input transforms.
[ 30522, 2797, 1026, 1999, 2487, 1010, 1999, 2475, 1010, 2041, 1028, 3074, 1026, 16109, 1028, 10938, 2102, 12155, 2378, 18780, 6494, 3619, 14192, 1006, 2048, 2378, 18780, 6494, 3619, 14192, 3370, 1026, 1999, 2487, 1010, 1999, 2475, 1010, 2041...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/operators/TwoInputUdfOperator.java
TwoInputUdfOperator.withForwardedFieldsFirst
@SuppressWarnings("unchecked") public O withForwardedFieldsFirst(String... forwardedFieldsFirst) { if (this.udfSemantics == null || this.analyzedUdfSemantics) { // extract semantic properties from function annotations setSemanticProperties(extractSemanticAnnotationsFromUdf(getFunction().getClass())); } if...
java
@SuppressWarnings("unchecked") public O withForwardedFieldsFirst(String... forwardedFieldsFirst) { if (this.udfSemantics == null || this.analyzedUdfSemantics) { // extract semantic properties from function annotations setSemanticProperties(extractSemanticAnnotationsFromUdf(getFunction().getClass())); } if...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "O", "withForwardedFieldsFirst", "(", "String", "...", "forwardedFieldsFirst", ")", "{", "if", "(", "this", ".", "udfSemantics", "==", "null", "||", "this", ".", "analyzedUdfSemantics", ")", "{", "// ...
Adds semantic information about forwarded fields of the first input of the user-defined function. The forwarded fields information declares fields which are never modified by the function and which are forwarded at the same position to the output or unchanged copied to another position in the output. <p>Fields that ar...
[ "Adds", "semantic", "information", "about", "forwarded", "fields", "of", "the", "first", "input", "of", "the", "user", "-", "defined", "function", ".", "The", "forwarded", "fields", "information", "declares", "fields", "which", "are", "never", "modified", "by", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/TwoInputUdfOperator.java#L152-L177
train
Adds forwarded fields to the result of this operator.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 1051, 2007, 29278, 7652, 2098, 15155, 8873, 12096, 1006, 5164, 1012, 1012, 1012, 2830, 2098, 15155, 8873, 12096, 1007, 1063, 2065, 1006, 2023, 1012, 2090...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ConfigurationUtils.java
ConfigurationUtils.getTaskManagerHeapMemory
public static MemorySize getTaskManagerHeapMemory(Configuration configuration) { if (configuration.containsKey(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY.key())) { return MemorySize.parse(configuration.getString(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY)); } else if (configuration.containsKey(TaskManagerOptio...
java
public static MemorySize getTaskManagerHeapMemory(Configuration configuration) { if (configuration.containsKey(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY.key())) { return MemorySize.parse(configuration.getString(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY)); } else if (configuration.containsKey(TaskManagerOptio...
[ "public", "static", "MemorySize", "getTaskManagerHeapMemory", "(", "Configuration", "configuration", ")", "{", "if", "(", "configuration", ".", "containsKey", "(", "TaskManagerOptions", ".", "TASK_MANAGER_HEAP_MEMORY", ".", "key", "(", ")", ")", ")", "{", "return", ...
Get task manager's heap memory. This method will check the new key {@link TaskManagerOptions#TASK_MANAGER_HEAP_MEMORY} and the old key {@link TaskManagerOptions#TASK_MANAGER_HEAP_MEMORY_MB} for backwards compatibility. @param configuration the configuration object @return the memory size of task manager's heap memory.
[ "Get", "task", "manager", "s", "heap", "memory", ".", "This", "method", "will", "check", "the", "new", "key", "{", "@link", "TaskManagerOptions#TASK_MANAGER_HEAP_MEMORY", "}", "and", "the", "old", "key", "{", "@link", "TaskManagerOptions#TASK_MANAGER_HEAP_MEMORY_MB", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/ConfigurationUtils.java#L67-L76
train
Get the task manager heap memory size from the configuration.
[ 30522, 2270, 10763, 3638, 5332, 4371, 2131, 10230, 22287, 5162, 4590, 20192, 9737, 6633, 10253, 1006, 9563, 9563, 1007, 1063, 2065, 1006, 9563, 1012, 3397, 14839, 1006, 4708, 24805, 4590, 7361, 9285, 1012, 4708, 1035, 3208, 1035, 16721, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java
MimeMappings.get
public String get(String extension) { Mapping mapping = this.map.get(extension); return (mapping != null) ? mapping.getMimeType() : null; }
java
public String get(String extension) { Mapping mapping = this.map.get(extension); return (mapping != null) ? mapping.getMimeType() : null; }
[ "public", "String", "get", "(", "String", "extension", ")", "{", "Mapping", "mapping", "=", "this", ".", "map", ".", "get", "(", "extension", ")", ";", "return", "(", "mapping", "!=", "null", ")", "?", "mapping", ".", "getMimeType", "(", ")", ":", "n...
Get a mime mapping for the given extension. @param extension the file extension (excluding '.') @return a mime mapping or {@code null}
[ "Get", "a", "mime", "mapping", "for", "the", "given", "extension", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java#L290-L293
train
Get mime type for the given extension.
[ 30522, 2270, 5164, 2131, 1006, 5164, 5331, 1007, 1063, 12375, 12375, 1027, 2023, 1012, 4949, 1012, 2131, 1006, 5331, 1007, 1025, 2709, 1006, 12375, 999, 1027, 19701, 1007, 1029, 12375, 1012, 2131, 4328, 11368, 18863, 1006, 1007, 1024, 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...
netty/netty
codec/src/main/java/io/netty/handler/codec/protobuf/ProtobufVarint32FrameDecoder.java
ProtobufVarint32FrameDecoder.readRawVarint32
private static int readRawVarint32(ByteBuf buffer) { if (!buffer.isReadable()) { return 0; } buffer.markReaderIndex(); byte tmp = buffer.readByte(); if (tmp >= 0) { return tmp; } else { int result = tmp & 127; if (!buffer.is...
java
private static int readRawVarint32(ByteBuf buffer) { if (!buffer.isReadable()) { return 0; } buffer.markReaderIndex(); byte tmp = buffer.readByte(); if (tmp >= 0) { return tmp; } else { int result = tmp & 127; if (!buffer.is...
[ "private", "static", "int", "readRawVarint32", "(", "ByteBuf", "buffer", ")", "{", "if", "(", "!", "buffer", ".", "isReadable", "(", ")", ")", "{", "return", "0", ";", "}", "buffer", ".", "markReaderIndex", "(", ")", ";", "byte", "tmp", "=", "buffer", ...
Reads variable length 32bit int from buffer @return decoded int if buffers readerIndex has been forwarded else nonsense value
[ "Reads", "variable", "length", "32bit", "int", "from", "buffer" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/protobuf/ProtobufVarint32FrameDecoder.java#L73-L120
train
readRawVarint32 This method is used to read a varint from the buffer.
[ 30522, 2797, 10763, 20014, 3191, 2527, 2860, 10755, 18447, 16703, 1006, 24880, 8569, 2546, 17698, 1007, 1063, 2065, 1006, 999, 17698, 1012, 2003, 16416, 20782, 1006, 1007, 1007, 1063, 2709, 1014, 1025, 1065, 17698, 1012, 2928, 16416, 4063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ObjectUtil.java
ObjectUtil.compare
public static <T extends Comparable<? super T>> int compare(T c1, T c2) { return CompareUtil.compare(c1, c2); }
java
public static <T extends Comparable<? super T>> int compare(T c1, T c2) { return CompareUtil.compare(c1, c2); }
[ "public", "static", "<", "T", "extends", "Comparable", "<", "?", "super", "T", ">", ">", "int", "compare", "(", "T", "c1", ",", "T", "c2", ")", "{", "return", "CompareUtil", ".", "compare", "(", "c1", ",", "c2", ")", ";", "}" ]
{@code null}安全的对象比较,{@code null}对象排在末尾 @param <T> 被比较对象类型 @param c1 对象1,可以为{@code null} @param c2 对象2,可以为{@code null} @return 比较结果,如果c1 &lt; c2,返回数小于0,c1==c2返回0,c1 &gt; c2 大于0 @since 3.0.7 @see java.util.Comparator#compare(Object, Object)
[ "{", "@code", "null", "}", "安全的对象比较,", "{", "@code", "null", "}", "对象排在末尾" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ObjectUtil.java#L437-L439
train
Compares two Comparable objects.
[ 30522, 2270, 10763, 1026, 1056, 8908, 12435, 1026, 1029, 3565, 1056, 1028, 1028, 20014, 12826, 1006, 1056, 27723, 1010, 1056, 29248, 1007, 1063, 2709, 12826, 21823, 2140, 1012, 12826, 1006, 27723, 1010, 29248, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/SM2Engine.java
SM2Engine.decrypt
private byte[] decrypt(byte[] in, int inOff, int inLen) { // 获取曲线点 final byte[] c1 = new byte[this.curveLength * 2 + 1]; System.arraycopy(in, inOff, c1, 0, c1.length); ECPoint c1P = this.ecParams.getCurve().decodePoint(c1); if (c1P.multiply(this.ecParams.getH()).isInfinity()) { throw new CryptoExce...
java
private byte[] decrypt(byte[] in, int inOff, int inLen) { // 获取曲线点 final byte[] c1 = new byte[this.curveLength * 2 + 1]; System.arraycopy(in, inOff, c1, 0, c1.length); ECPoint c1P = this.ecParams.getCurve().decodePoint(c1); if (c1P.multiply(this.ecParams.getH()).isInfinity()) { throw new CryptoExce...
[ "private", "byte", "[", "]", "decrypt", "(", "byte", "[", "]", "in", ",", "int", "inOff", ",", "int", "inLen", ")", "{", "// 获取曲线点\r", "final", "byte", "[", "]", "c1", "=", "new", "byte", "[", "this", ".", "curveLength", "*", "2", "+", "1", "]", ...
解密,只支持私钥解密 @param in 密文 @param inOff 位置 @param inLen 长度 @return 解密后的内容
[ "解密,只支持私钥解密" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/SM2Engine.java#L218-L265
train
Decrypt a block of data.
[ 30522, 2797, 24880, 1031, 1033, 11703, 2854, 13876, 1006, 24880, 1031, 1033, 1999, 1010, 20014, 1999, 7245, 1010, 20014, 1999, 7770, 1007, 1063, 1013, 1013, 100, 100, 1870, 100, 100, 2345, 24880, 1031, 1033, 27723, 1027, 2047, 24880, 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...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java
StateDescriptor.enableTimeToLive
public void enableTimeToLive(StateTtlConfig ttlConfig) { Preconditions.checkNotNull(ttlConfig); Preconditions.checkArgument( ttlConfig.getUpdateType() != StateTtlConfig.UpdateType.Disabled && queryableStateName == null, "Queryable state is currently not supported with TTL"); this.ttlConfig = ttlConfig; ...
java
public void enableTimeToLive(StateTtlConfig ttlConfig) { Preconditions.checkNotNull(ttlConfig); Preconditions.checkArgument( ttlConfig.getUpdateType() != StateTtlConfig.UpdateType.Disabled && queryableStateName == null, "Queryable state is currently not supported with TTL"); this.ttlConfig = ttlConfig; ...
[ "public", "void", "enableTimeToLive", "(", "StateTtlConfig", "ttlConfig", ")", "{", "Preconditions", ".", "checkNotNull", "(", "ttlConfig", ")", ";", "Preconditions", ".", "checkArgument", "(", "ttlConfig", ".", "getUpdateType", "(", ")", "!=", "StateTtlConfig", "...
Configures optional activation of state time-to-live (TTL). <p>State user value will expire, become unavailable and be cleaned up in storage depending on configured {@link StateTtlConfig}. @param ttlConfig configuration of state TTL
[ "Configures", "optional", "activation", "of", "state", "time", "-", "to", "-", "live", "(", "TTL", ")", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java#L250-L257
train
Enables TTL for the state.
[ 30522, 2270, 11675, 9585, 7292, 3406, 3669, 3726, 1006, 2110, 4779, 22499, 2078, 8873, 2290, 23746, 22499, 2078, 8873, 2290, 1007, 1063, 3653, 8663, 20562, 2015, 1012, 4638, 17048, 11231, 3363, 1006, 23746, 22499, 2078, 8873, 2290, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/sampling/DistributedRandomSampler.java
DistributedRandomSampler.sampleInCoordinator
public Iterator<T> sampleInCoordinator(Iterator<IntermediateSampleData<T>> input) { if (numSamples == 0) { return emptyIterable; } // This queue holds fixed number elements with the top K weight for the coordinator. PriorityQueue<IntermediateSampleData<T>> reservoir = new PriorityQueue<IntermediateSampleDat...
java
public Iterator<T> sampleInCoordinator(Iterator<IntermediateSampleData<T>> input) { if (numSamples == 0) { return emptyIterable; } // This queue holds fixed number elements with the top K weight for the coordinator. PriorityQueue<IntermediateSampleData<T>> reservoir = new PriorityQueue<IntermediateSampleDat...
[ "public", "Iterator", "<", "T", ">", "sampleInCoordinator", "(", "Iterator", "<", "IntermediateSampleData", "<", "T", ">", ">", "input", ")", "{", "if", "(", "numSamples", "==", "0", ")", "{", "return", "emptyIterable", ";", "}", "// This queue holds fixed num...
Sample algorithm for the second phase. This operation should be executed as the UDF of an all reduce operation. @param input The intermediate sample output generated in the first phase. @return The sampled output.
[ "Sample", "algorithm", "for", "the", "second", "phase", ".", "This", "operation", "should", "be", "executed", "as", "the", "UDF", "of", "an", "all", "reduce", "operation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/sampling/DistributedRandomSampler.java#L73-L117
train
Samples the elements in the input iterator in the coordinator.
[ 30522, 2270, 2009, 6906, 4263, 1026, 1056, 1028, 7099, 2378, 3597, 8551, 23207, 1006, 2009, 6906, 4263, 1026, 7783, 21559, 21132, 6790, 1026, 1056, 1028, 1028, 7953, 1007, 1063, 2065, 1006, 16371, 5244, 16613, 4244, 1027, 1027, 1014, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java
RabbitProperties.determinePort
public int determinePort() { if (CollectionUtils.isEmpty(this.parsedAddresses)) { return getPort(); } Address address = this.parsedAddresses.get(0); return address.port; }
java
public int determinePort() { if (CollectionUtils.isEmpty(this.parsedAddresses)) { return getPort(); } Address address = this.parsedAddresses.get(0); return address.port; }
[ "public", "int", "determinePort", "(", ")", "{", "if", "(", "CollectionUtils", ".", "isEmpty", "(", "this", ".", "parsedAddresses", ")", ")", "{", "return", "getPort", "(", ")", ";", "}", "Address", "address", "=", "this", ".", "parsedAddresses", ".", "g...
Returns the port from the first address, or the configured port if no addresses have been set. @return the port @see #setAddresses(String) @see #getPort()
[ "Returns", "the", "port", "from", "the", "first", "address", "or", "the", "configured", "port", "if", "no", "addresses", "have", "been", "set", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java#L149-L155
train
Determine the port number from the address.
[ 30522, 2270, 20014, 5646, 6442, 1006, 1007, 1063, 2065, 1006, 3074, 21823, 4877, 1012, 2003, 6633, 13876, 2100, 1006, 2023, 1012, 11968, 6924, 4215, 16200, 11393, 2015, 1007, 1007, 1063, 2709, 2131, 6442, 1006, 1007, 1025, 1065, 4769, 4769,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.cut
public static BufferedImage cut(Image srcImage, Rectangle rectangle) { return Img.from(srcImage).setPositionBaseCentre(false).cut(rectangle).getImg(); }
java
public static BufferedImage cut(Image srcImage, Rectangle rectangle) { return Img.from(srcImage).setPositionBaseCentre(false).cut(rectangle).getImg(); }
[ "public", "static", "BufferedImage", "cut", "(", "Image", "srcImage", ",", "Rectangle", "rectangle", ")", "{", "return", "Img", ".", "from", "(", "srcImage", ")", ".", "setPositionBaseCentre", "(", "false", ")", ".", "cut", "(", "rectangle", ")", ".", "get...
图像切割(按指定起点坐标和宽高切割) @param srcImage 源图像 @param rectangle 矩形对象,表示矩形区域的x,y,width,height @return {@link BufferedImage} @since 3.1.0
[ "图像切割", "(", "按指定起点坐标和宽高切割", ")" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L331-L333
train
Cut the image around the given rectangle.
[ 30522, 2270, 10763, 17698, 2098, 9581, 3351, 3013, 1006, 3746, 5034, 6895, 26860, 1010, 28667, 23395, 28667, 23395, 1007, 1063, 2709, 10047, 2290, 1012, 2013, 1006, 5034, 6895, 26860, 1007, 1012, 2275, 26994, 15058, 13013, 2890, 1006, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java
DateUtil.rangeToList
public static List<DateTime> rangeToList(Date start, Date end, final DateField unit) { return CollUtil.newArrayList((Iterable<DateTime>) range(start, end, unit)); }
java
public static List<DateTime> rangeToList(Date start, Date end, final DateField unit) { return CollUtil.newArrayList((Iterable<DateTime>) range(start, end, unit)); }
[ "public", "static", "List", "<", "DateTime", ">", "rangeToList", "(", "Date", "start", ",", "Date", "end", ",", "final", "DateField", "unit", ")", "{", "return", "CollUtil", ".", "newArrayList", "(", "(", "Iterable", "<", "DateTime", ">", ")", "range", "...
创建日期范围生成器 @param start 起始日期时间 @param end 结束日期时间 @param unit 步进单位 @return {@link DateRange}
[ "创建日期范围生成器" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L1644-L1646
train
Returns a list of dates in the specified range.
[ 30522, 2270, 10763, 2862, 1026, 3058, 7292, 1028, 2846, 3406, 9863, 1006, 3058, 2707, 1010, 3058, 2203, 1010, 2345, 3058, 3790, 3131, 1007, 1063, 2709, 8902, 7630, 3775, 2140, 1012, 2047, 2906, 9447, 9863, 1006, 1006, 2009, 6906, 3468, 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...
networknt/light-4j
handler/src/main/java/com/networknt/handler/Handler.java
Handler.next
public static void next(HttpServerExchange httpServerExchange, String execName, Boolean returnToOrigFlow) throws Exception { String currentChainId = httpServerExchange.getAttachment(CHAIN_ID); Integer currentNextIndex = httpServerExchange.getAttachment(CHAIN_SEQ); httpServerExchange.putAttachment(CHAIN_ID, ex...
java
public static void next(HttpServerExchange httpServerExchange, String execName, Boolean returnToOrigFlow) throws Exception { String currentChainId = httpServerExchange.getAttachment(CHAIN_ID); Integer currentNextIndex = httpServerExchange.getAttachment(CHAIN_SEQ); httpServerExchange.putAttachment(CHAIN_ID, ex...
[ "public", "static", "void", "next", "(", "HttpServerExchange", "httpServerExchange", ",", "String", "execName", ",", "Boolean", "returnToOrigFlow", ")", "throws", "Exception", "{", "String", "currentChainId", "=", "httpServerExchange", ".", "getAttachment", "(", "CHAI...
Allow nexting directly to a flow. @param httpServerExchange The current requests server exchange. @param execName The name of the next executable to go to, ie chain or handler. Chain resolved first. @param returnToOrigFlow True if you want to call the next handler defined in your original chain after the provided exec...
[ "Allow", "nexting", "directly", "to", "a", "flow", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/handler/src/main/java/com/networknt/handler/Handler.java#L246-L262
train
Next method.
[ 30522, 2270, 10763, 11675, 2279, 1006, 16770, 2121, 28943, 2595, 22305, 2063, 16770, 2121, 28943, 2595, 22305, 2063, 1010, 5164, 4654, 8586, 18442, 1010, 22017, 20898, 2709, 3406, 10050, 25708, 8261, 1007, 11618, 6453, 1063, 5164, 2783, 24925...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.writeAsCsv
public DataSink<T> writeAsCsv(String filePath, String rowDelimiter, String fieldDelimiter, WriteMode writeMode) { return internalWriteAsCsv(new Path(filePath), rowDelimiter, fieldDelimiter, writeMode); }
java
public DataSink<T> writeAsCsv(String filePath, String rowDelimiter, String fieldDelimiter, WriteMode writeMode) { return internalWriteAsCsv(new Path(filePath), rowDelimiter, fieldDelimiter, writeMode); }
[ "public", "DataSink", "<", "T", ">", "writeAsCsv", "(", "String", "filePath", ",", "String", "rowDelimiter", ",", "String", "fieldDelimiter", ",", "WriteMode", "writeMode", ")", "{", "return", "internalWriteAsCsv", "(", "new", "Path", "(", "filePath", ")", ","...
Writes a {@link Tuple} DataSet as CSV file(s) to the specified location with the specified field and line delimiters. <p><b>Note: Only a Tuple DataSet can written as a CSV file.</b> For each Tuple field the result of {@link Object#toString()} is written. @param filePath The path pointing to the location the CSV file ...
[ "Writes", "a", "{", "@link", "Tuple", "}", "DataSet", "as", "CSV", "file", "(", "s", ")", "to", "the", "specified", "location", "with", "the", "specified", "field", "and", "line", "delimiters", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L1624-L1626
train
Write data sink to file using CSV.
[ 30522, 2270, 2951, 11493, 2243, 1026, 1056, 1028, 4339, 3022, 6169, 2615, 1006, 5164, 5371, 15069, 1010, 5164, 5216, 9247, 27605, 3334, 1010, 5164, 2492, 9247, 27605, 3334, 1010, 4339, 5302, 3207, 4339, 5302, 3207, 1007, 1063, 2709, 4722, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/ColumnOperationUtils.java
ColumnOperationUtils.dropFields
public static List<Expression> dropFields(List<String> inputFields, List<Expression> dropExpressions) { Set<String> columnsToDrop = dropExpressions.stream() .map(expr -> expr.accept(dropColumnsExtractor)) .collect(Collectors.toSet()); columnsToDrop.forEach(c -> { if (!inputFields.contains(c)) { throw ...
java
public static List<Expression> dropFields(List<String> inputFields, List<Expression> dropExpressions) { Set<String> columnsToDrop = dropExpressions.stream() .map(expr -> expr.accept(dropColumnsExtractor)) .collect(Collectors.toSet()); columnsToDrop.forEach(c -> { if (!inputFields.contains(c)) { throw ...
[ "public", "static", "List", "<", "Expression", ">", "dropFields", "(", "List", "<", "String", ">", "inputFields", ",", "List", "<", "Expression", ">", "dropExpressions", ")", "{", "Set", "<", "String", ">", "columnsToDrop", "=", "dropExpressions", ".", "stre...
Creates a projection list that removes given columns. <p><b>NOTE:</b> Resulting expression are still unresolved. @param inputFields names of current columns @param dropExpressions columns to remove @return projection expressions
[ "Creates", "a", "projection", "list", "that", "removes", "given", "columns", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/ColumnOperationUtils.java#L100-L115
train
Drop fields from the source table.
[ 30522, 2270, 10763, 2862, 1026, 3670, 1028, 4530, 15155, 1006, 2862, 1026, 5164, 1028, 7953, 15155, 1010, 2862, 1026, 3670, 1028, 4530, 10288, 20110, 8496, 1007, 1063, 2275, 1026, 5164, 1028, 7753, 3406, 25711, 1027, 4530, 10288, 20110, 849...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/aggregate/BytesHashMap.java
BytesHashMap.reset
public void reset() { int numBuckets = bucketSegments.size() * numBucketsPerSegment; this.log2NumBuckets = MathUtils.log2strict(numBuckets); this.numBucketsMask = (1 << MathUtils.log2strict(numBuckets)) - 1; this.numBucketsMask2 = (1 << MathUtils.log2strict(numBuckets >> 1)) - 1; this.growthThreshold = (int) ...
java
public void reset() { int numBuckets = bucketSegments.size() * numBucketsPerSegment; this.log2NumBuckets = MathUtils.log2strict(numBuckets); this.numBucketsMask = (1 << MathUtils.log2strict(numBuckets)) - 1; this.numBucketsMask2 = (1 << MathUtils.log2strict(numBuckets >> 1)) - 1; this.growthThreshold = (int) ...
[ "public", "void", "reset", "(", ")", "{", "int", "numBuckets", "=", "bucketSegments", ".", "size", "(", ")", "*", "numBucketsPerSegment", ";", "this", ".", "log2NumBuckets", "=", "MathUtils", ".", "log2strict", "(", "numBuckets", ")", ";", "this", ".", "nu...
reset the map's record and bucket area's memory segments for reusing.
[ "reset", "the", "map", "s", "record", "and", "bucket", "area", "s", "memory", "segments", "for", "reusing", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/aggregate/BytesHashMap.java#L494-L507
train
Resets the BytesHashMap.
[ 30522, 2270, 11675, 25141, 1006, 1007, 1063, 20014, 15903, 12722, 8454, 1027, 13610, 3366, 21693, 11187, 1012, 2946, 1006, 1007, 1008, 15903, 12722, 8454, 7347, 13910, 3672, 1025, 2023, 1012, 8833, 2475, 19172, 24204, 8454, 1027, 8785, 21823,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dependency/nnparser/NeuralNetworkParser.java
NeuralNetworkParser.DEPREL
int DEPREL(final List<Integer> deprels, int id) { return ((id != -1) ? (deprels.get(id) + kDeprelInFeaturespace) : kNilDeprel); }
java
int DEPREL(final List<Integer> deprels, int id) { return ((id != -1) ? (deprels.get(id) + kDeprelInFeaturespace) : kNilDeprel); }
[ "int", "DEPREL", "(", "final", "List", "<", "Integer", ">", "deprels", ",", "int", "id", ")", "{", "return", "(", "(", "id", "!=", "-", "1", ")", "?", "(", "deprels", ".", "get", "(", "id", ")", "+", "kDeprelInFeaturespace", ")", ":", "kNilDeprel",...
获取依存 @param deprels 依存列表 @param id 依存下标 @return 依存
[ "获取依存" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dependency/nnparser/NeuralNetworkParser.java#L650-L653
train
Get the DEPREL value for a given ID.
[ 30522, 20014, 2139, 28139, 2140, 1006, 2345, 2862, 1026, 16109, 1028, 2139, 28139, 4877, 1010, 20014, 8909, 1007, 1063, 2709, 1006, 1006, 8909, 999, 1027, 1011, 1015, 1007, 1029, 1006, 2139, 28139, 4877, 1012, 2131, 1006, 8909, 1007, 1009, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/functions/util/AbstractRuntimeUDFContext.java
AbstractRuntimeUDFContext.getAccumulator
@SuppressWarnings("unchecked") private <V, A extends Serializable> Accumulator<V, A> getAccumulator(String name, Class<? extends Accumulator<V, A>> accumulatorClass) { Accumulator<?, ?> accumulator = accumulators.get(name); if (accumulator != null) { AccumulatorHelper.compareAccumulatorTypes(name, accumula...
java
@SuppressWarnings("unchecked") private <V, A extends Serializable> Accumulator<V, A> getAccumulator(String name, Class<? extends Accumulator<V, A>> accumulatorClass) { Accumulator<?, ?> accumulator = accumulators.get(name); if (accumulator != null) { AccumulatorHelper.compareAccumulatorTypes(name, accumula...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "<", "V", ",", "A", "extends", "Serializable", ">", "Accumulator", "<", "V", ",", "A", ">", "getAccumulator", "(", "String", "name", ",", "Class", "<", "?", "extends", "Accumulator", "<", "V", ...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/functions/util/AbstractRuntimeUDFContext.java#L180-L199
train
Gets an accumulator by name.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2797, 1026, 1058, 1010, 1037, 8908, 7642, 21335, 3468, 1028, 16222, 2819, 20350, 1026, 1058, 1010, 1037, 1028, 2131, 6305, 24894, 20350, 1006, 5164, 2171, 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/spark
core/src/main/java/org/apache/spark/util/collection/unsafe/sort/RadixSort.java
RadixSort.transformCountsToOffsets
private static long[] transformCountsToOffsets( long[] counts, long numRecords, long outputOffset, long bytesPerRecord, boolean desc, boolean signed) { assert counts.length == 256; int start = signed ? 128 : 0; // output the negative records first (values 129-255). if (desc) { long pos = ...
java
private static long[] transformCountsToOffsets( long[] counts, long numRecords, long outputOffset, long bytesPerRecord, boolean desc, boolean signed) { assert counts.length == 256; int start = signed ? 128 : 0; // output the negative records first (values 129-255). if (desc) { long pos = ...
[ "private", "static", "long", "[", "]", "transformCountsToOffsets", "(", "long", "[", "]", "counts", ",", "long", "numRecords", ",", "long", "outputOffset", ",", "long", "bytesPerRecord", ",", "boolean", "desc", ",", "boolean", "signed", ")", "{", "assert", "...
Transforms counts into the proper unsafe output offsets for the sort type. @param counts counts for each byte value. This routine destructively modifies this array. @param numRecords number of data records in the original data array. @param outputOffset output offset in bytes from the base array object. @param bytesPe...
[ "Transforms", "counts", "into", "the", "proper", "unsafe", "output", "offsets", "for", "the", "sort", "type", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/RadixSort.java#L150-L170
train
Transform counts to offsets.
[ 30522, 2797, 10763, 2146, 1031, 1033, 10938, 3597, 16671, 16033, 27475, 8454, 1006, 2146, 1031, 1033, 9294, 1010, 2146, 16371, 2213, 2890, 27108, 5104, 1010, 2146, 6434, 27475, 3388, 1010, 2146, 27507, 4842, 2890, 27108, 2094, 1010, 22017, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostRequestEncoder.java
HttpPostRequestEncoder.finalizeRequest
public HttpRequest finalizeRequest() throws ErrorDataEncoderException { // Finalize the multipartHttpDatas if (!headerFinalized) { if (isMultipart) { InternalAttribute internal = new InternalAttribute(charset); if (duringMixedMode) { intern...
java
public HttpRequest finalizeRequest() throws ErrorDataEncoderException { // Finalize the multipartHttpDatas if (!headerFinalized) { if (isMultipart) { InternalAttribute internal = new InternalAttribute(charset); if (duringMixedMode) { intern...
[ "public", "HttpRequest", "finalizeRequest", "(", ")", "throws", "ErrorDataEncoderException", "{", "// Finalize the multipartHttpDatas", "if", "(", "!", "headerFinalized", ")", "{", "if", "(", "isMultipart", ")", "{", "InternalAttribute", "internal", "=", "new", "Inter...
Finalize the request by preparing the Header in the request and returns the request ready to be sent.<br> Once finalized, no data must be added.<br> If the request does not need chunk (isChunked() == false), this request is the only object to send to the remote server. @return the request object (chunked or not accord...
[ "Finalize", "the", "request", "by", "preparing", "the", "Header", "in", "the", "request", "and", "returns", "the", "request", "ready", "to", "be", "sent", ".", "<br", ">", "Once", "finalized", "no", "data", "must", "be", "added", ".", "<br", ">", "If", ...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostRequestEncoder.java#L737-L820
train
Finalize the request.
[ 30522, 2270, 8299, 2890, 15500, 2345, 17629, 2063, 15500, 1006, 1007, 11618, 7561, 2850, 2696, 2368, 16044, 2890, 2595, 24422, 1063, 1013, 1013, 2345, 4697, 1996, 4800, 19362, 2705, 4779, 17299, 6790, 2015, 2065, 1006, 999, 20346, 16294, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dictionary/CustomDictionary.java
CustomDictionary.commonPrefixSearch
public static LinkedList<Map.Entry<String, CoreDictionary.Attribute>> commonPrefixSearch(char[] chars, int begin) { return trie.commonPrefixSearchWithValue(chars, begin); }
java
public static LinkedList<Map.Entry<String, CoreDictionary.Attribute>> commonPrefixSearch(char[] chars, int begin) { return trie.commonPrefixSearchWithValue(chars, begin); }
[ "public", "static", "LinkedList", "<", "Map", ".", "Entry", "<", "String", ",", "CoreDictionary", ".", "Attribute", ">", ">", "commonPrefixSearch", "(", "char", "[", "]", "chars", ",", "int", "begin", ")", "{", "return", "trie", ".", "commonPrefixSearchWithV...
前缀查询 @param chars @param begin @return
[ "前缀查询" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dictionary/CustomDictionary.java#L458-L461
train
Returns a list of entries that are common prefixes of the specified characters.
[ 30522, 2270, 10763, 5799, 9863, 1026, 4949, 1012, 4443, 1026, 5164, 1010, 4563, 29201, 3258, 5649, 1012, 17961, 1028, 1028, 2691, 28139, 8873, 2595, 17310, 11140, 1006, 25869, 1031, 1033, 25869, 2015, 1010, 20014, 4088, 1007, 1063, 2709, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ReUtil.java
ReUtil.findAll
public static <T extends Collection<String>> T findAll(String regex, CharSequence content, int group, T collection) { if (null == regex) { return collection; } return findAll(Pattern.compile(regex, Pattern.DOTALL), content, group, collection); }
java
public static <T extends Collection<String>> T findAll(String regex, CharSequence content, int group, T collection) { if (null == regex) { return collection; } return findAll(Pattern.compile(regex, Pattern.DOTALL), content, group, collection); }
[ "public", "static", "<", "T", "extends", "Collection", "<", "String", ">", ">", "T", "findAll", "(", "String", "regex", ",", "CharSequence", "content", ",", "int", "group", ",", "T", "collection", ")", "{", "if", "(", "null", "==", "regex", ")", "{", ...
取得内容中匹配的所有结果 @param <T> 集合类型 @param regex 正则 @param content 被查找的内容 @param group 正则的分组 @param collection 返回的集合类型 @return 结果集
[ "取得内容中匹配的所有结果" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReUtil.java#L402-L408
train
Finds all records matching the given regular expression and group.
[ 30522, 2270, 10763, 1026, 1056, 8908, 3074, 1026, 5164, 1028, 1028, 1056, 2424, 8095, 1006, 5164, 19723, 10288, 1010, 25869, 3366, 4226, 5897, 4180, 1010, 20014, 2177, 1010, 1056, 3074, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 19723, 1028...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/clusterframework/BootstrapTools.java
BootstrapTools.startActorSystem
public static ActorSystem startActorSystem( Configuration configuration, String listeningAddress, int listeningPort, Logger logger, ActorSystemExecutorConfiguration actorSystemExecutorConfiguration) throws Exception { return startActorSystem( configuration, AkkaUtils.getFlinkActorSystemName(...
java
public static ActorSystem startActorSystem( Configuration configuration, String listeningAddress, int listeningPort, Logger logger, ActorSystemExecutorConfiguration actorSystemExecutorConfiguration) throws Exception { return startActorSystem( configuration, AkkaUtils.getFlinkActorSystemName(...
[ "public", "static", "ActorSystem", "startActorSystem", "(", "Configuration", "configuration", ",", "String", "listeningAddress", ",", "int", "listeningPort", ",", "Logger", "logger", ",", "ActorSystemExecutorConfiguration", "actorSystemExecutorConfiguration", ")", "throws", ...
Starts an Actor System at a specific port. @param configuration The Flink configuration. @param listeningAddress The address to listen at. @param listeningPort The port to listen at. @param logger the logger to output log information. @param actorSystemExecutorConfiguration configuration for the ActorSystem's underlyin...
[ "Starts", "an", "Actor", "System", "at", "a", "specific", "port", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java#L209-L222
train
Start an actor system with the given configuration.
[ 30522, 2270, 10763, 5889, 27268, 6633, 2707, 18908, 5668, 27268, 6633, 1006, 9563, 9563, 1010, 5164, 5962, 4215, 16200, 4757, 1010, 20014, 5962, 6442, 1010, 8833, 4590, 8833, 4590, 1010, 5889, 27268, 21382, 2595, 8586, 16161, 29566, 2078, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/utils/DataSetUtils.java
DataSetUtils.sample
public static <T> MapPartitionOperator<T, T> sample( DataSet <T> input, final boolean withReplacement, final double fraction) { return sample(input, withReplacement, fraction, Utils.RNG.nextLong()); }
java
public static <T> MapPartitionOperator<T, T> sample( DataSet <T> input, final boolean withReplacement, final double fraction) { return sample(input, withReplacement, fraction, Utils.RNG.nextLong()); }
[ "public", "static", "<", "T", ">", "MapPartitionOperator", "<", "T", ",", "T", ">", "sample", "(", "DataSet", "<", "T", ">", "input", ",", "final", "boolean", "withReplacement", ",", "final", "double", "fraction", ")", "{", "return", "sample", "(", "inpu...
Generate a sample of DataSet by the probability fraction of each element. @param withReplacement Whether element can be selected more than once. @param fraction Probability that each element is chosen, should be [0,1] without replacement, and [0, ∞) with replacement. While fraction is larger than 1, the element...
[ "Generate", "a", "sample", "of", "DataSet", "by", "the", "probability", "fraction", "of", "each", "element", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/DataSetUtils.java#L195-L201
train
Samples from a data set using the CID algorithm.
[ 30522, 2270, 10763, 1026, 1056, 1028, 4949, 19362, 3775, 3508, 25918, 8844, 1026, 1056, 1010, 1056, 1028, 7099, 1006, 2951, 13462, 1026, 1056, 1028, 7953, 1010, 2345, 22017, 20898, 2007, 2890, 24759, 10732, 3672, 1010, 2345, 3313, 12884, 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/server/src/org/openqa/grid/internal/DefaultGridRegistry.java
DefaultGridRegistry.terminate
@Override public void terminate(final TestSession session, final SessionTerminationReason reason) { // Thread safety reviewed new Thread(() -> _release(session.getSlot(), reason)).start(); }
java
@Override public void terminate(final TestSession session, final SessionTerminationReason reason) { // Thread safety reviewed new Thread(() -> _release(session.getSlot(), reason)).start(); }
[ "@", "Override", "public", "void", "terminate", "(", "final", "TestSession", "session", ",", "final", "SessionTerminationReason", "reason", ")", "{", "// Thread safety reviewed", "new", "Thread", "(", "(", ")", "->", "_release", "(", "session", ".", "getSlot", "...
Ends this test session for the hub, releasing the resources in the hub / registry. It does not release anything on the remote. The resources are released in a separate thread, so the call returns immediately. It allows release with long duration not to block the test while the hub is releasing the resource. @param ses...
[ "Ends", "this", "test", "session", "for", "the", "hub", "releasing", "the", "resources", "in", "the", "hub", "/", "registry", ".", "It", "does", "not", "release", "anything", "on", "the", "remote", ".", "The", "resources", "are", "released", "in", "a", "...
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/server/src/org/openqa/grid/internal/DefaultGridRegistry.java#L113-L117
train
Terminate the test session.
[ 30522, 1030, 2058, 15637, 2270, 11675, 20320, 1006, 2345, 5852, 7971, 3258, 5219, 1010, 2345, 5219, 3334, 22311, 3508, 16416, 3385, 3114, 1007, 1063, 1013, 1013, 11689, 3808, 8182, 2047, 11689, 1006, 1006, 1007, 1011, 1028, 1035, 2713, 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-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/drivers/EdgeList.java
EdgeList.hasNullValueEdges
private static <T, ET> boolean hasNullValueEdges(DataSet<Edge<T, ET>> edges) { TypeInformation<?> genericTypeInfo = edges.getType(); @SuppressWarnings("unchecked") TupleTypeInfo<Tuple3<T, T, ET>> tupleTypeInfo = (TupleTypeInfo<Tuple3<T, T, ET>>) genericTypeInfo; return tupleTypeInfo.getTypeAt(2).equals(ValueTy...
java
private static <T, ET> boolean hasNullValueEdges(DataSet<Edge<T, ET>> edges) { TypeInformation<?> genericTypeInfo = edges.getType(); @SuppressWarnings("unchecked") TupleTypeInfo<Tuple3<T, T, ET>> tupleTypeInfo = (TupleTypeInfo<Tuple3<T, T, ET>>) genericTypeInfo; return tupleTypeInfo.getTypeAt(2).equals(ValueTy...
[ "private", "static", "<", "T", ",", "ET", ">", "boolean", "hasNullValueEdges", "(", "DataSet", "<", "Edge", "<", "T", ",", "ET", ">", ">", "edges", ")", "{", "TypeInformation", "<", "?", ">", "genericTypeInfo", "=", "edges", ".", "getType", "(", ")", ...
Check whether the edge type of the {@link DataSet} is {@link NullValue}. @param edges data set for introspection @param <T> graph ID type @param <ET> edge value type @return whether the edge type of the {@link DataSet} is {@link NullValue}
[ "Check", "whether", "the", "edge", "type", "of", "the", "{", "@link", "DataSet", "}", "is", "{", "@link", "NullValue", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/drivers/EdgeList.java#L73-L79
train
Returns true if the given data set contains edges with null values.
[ 30522, 2797, 10763, 1026, 1056, 1010, 3802, 1028, 22017, 20898, 8440, 18083, 10175, 5657, 24225, 2015, 1006, 2951, 13462, 1026, 3341, 1026, 1056, 1010, 3802, 1028, 1028, 7926, 1007, 1063, 2828, 2378, 14192, 3370, 1026, 1029, 1028, 12391, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/OperatorMetricGroup.java
OperatorMetricGroup.putVariables
@Override protected void putVariables(Map<String, String> variables) { variables.put(ScopeFormat.SCOPE_OPERATOR_ID, String.valueOf(operatorID)); variables.put(ScopeFormat.SCOPE_OPERATOR_NAME, operatorName); // we don't enter the subtask_index as the task group does that already }
java
@Override protected void putVariables(Map<String, String> variables) { variables.put(ScopeFormat.SCOPE_OPERATOR_ID, String.valueOf(operatorID)); variables.put(ScopeFormat.SCOPE_OPERATOR_NAME, operatorName); // we don't enter the subtask_index as the task group does that already }
[ "@", "Override", "protected", "void", "putVariables", "(", "Map", "<", "String", ",", "String", ">", "variables", ")", "{", "variables", ".", "put", "(", "ScopeFormat", ".", "SCOPE_OPERATOR_ID", ",", "String", ".", "valueOf", "(", "operatorID", ")", ")", "...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/OperatorMetricGroup.java#L79-L84
train
put variables for the operator
[ 30522, 1030, 2058, 15637, 5123, 11675, 2404, 10755, 19210, 2015, 1006, 4949, 1026, 5164, 1010, 5164, 1028, 10857, 1007, 1063, 10857, 1012, 2404, 1006, 9531, 14192, 4017, 1012, 9531, 1035, 6872, 1035, 8909, 1010, 5164, 1012, 3643, 11253, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/metrics/MetricStore.java
MetricStore.getSubtaskMetricStore
public synchronized ComponentMetricStore getSubtaskMetricStore(String jobID, String taskID, int subtaskIndex) { JobMetricStore job = jobID == null ? null : jobs.get(jobID); if (job == null) { return null; } TaskMetricStore task = job.getTaskMetricStore(taskID); if (task == null) { return null; } ret...
java
public synchronized ComponentMetricStore getSubtaskMetricStore(String jobID, String taskID, int subtaskIndex) { JobMetricStore job = jobID == null ? null : jobs.get(jobID); if (job == null) { return null; } TaskMetricStore task = job.getTaskMetricStore(taskID); if (task == null) { return null; } ret...
[ "public", "synchronized", "ComponentMetricStore", "getSubtaskMetricStore", "(", "String", "jobID", ",", "String", "taskID", ",", "int", "subtaskIndex", ")", "{", "JobMetricStore", "job", "=", "jobID", "==", "null", "?", "null", ":", "jobs", ".", "get", "(", "j...
Returns the {@link ComponentMetricStore} for the given job/task ID and subtask index. @param jobID job ID @param taskID task ID @param subtaskIndex subtask index @return SubtaskMetricStore for the given IDs and index, or null if no store for the given arguments exists
[ "Returns", "the", "{", "@link", "ComponentMetricStore", "}", "for", "the", "given", "job", "/", "task", "ID", "and", "subtask", "index", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/metrics/MetricStore.java#L145-L155
train
Returns the subtask metric store for the given job and task ID.
[ 30522, 2270, 25549, 6922, 12589, 23809, 2063, 4152, 12083, 10230, 22287, 3388, 7277, 23809, 2063, 1006, 5164, 3105, 3593, 1010, 5164, 4708, 3593, 1010, 20014, 4942, 10230, 18824, 10288, 1007, 1063, 3105, 12589, 23809, 2063, 3105, 1027, 3105, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.sortByPinyin
public static <T> List<String> sortByPinyin(List<String> list) { return sort(list, new PinyinComparator()); }
java
public static <T> List<String> sortByPinyin(List<String> list) { return sort(list, new PinyinComparator()); }
[ "public", "static", "<", "T", ">", "List", "<", "String", ">", "sortByPinyin", "(", "List", "<", "String", ">", "list", ")", "{", "return", "sort", "(", "list", ",", "new", "PinyinComparator", "(", ")", ")", ";", "}" ]
根据汉字的拼音顺序排序 @param list List @return 排序后的List @since 4.0.8
[ "根据汉字的拼音顺序排序" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java#L2147-L2149
train
Sort a list of strings by Pinyin.
[ 30522, 2270, 10763, 1026, 1056, 1028, 2862, 1026, 5164, 1028, 4066, 3762, 8091, 25811, 1006, 2862, 1026, 5164, 1028, 2862, 1007, 1063, 2709, 4066, 1006, 2862, 1010, 2047, 9973, 9006, 28689, 4263, 1006, 1007, 1007, 1025, 1065, 102, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-setting/src/main/java/cn/hutool/setting/GroupedSet.java
GroupedSet.getValues
public LinkedHashSet<String> getValues(String group) { if (group == null) { group = StrUtil.EMPTY; } return super.get(group); }
java
public LinkedHashSet<String> getValues(String group) { if (group == null) { group = StrUtil.EMPTY; } return super.get(group); }
[ "public", "LinkedHashSet", "<", "String", ">", "getValues", "(", "String", "group", ")", "{", "if", "(", "group", "==", "null", ")", "{", "group", "=", "StrUtil", ".", "EMPTY", ";", "}", "return", "super", ".", "get", "(", "group", ")", ";", "}" ]
获得对应分组的所有值 @param group 分组名 @return 分组的值集合
[ "获得对应分组的所有值" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/GroupedSet.java#L266-L271
train
Returns the values of the specified group.
[ 30522, 2270, 5799, 14949, 7898, 3388, 1026, 5164, 1028, 2131, 10175, 15808, 1006, 5164, 2177, 1007, 1063, 2065, 1006, 2177, 1027, 1027, 19701, 1007, 1063, 2177, 1027, 2358, 22134, 4014, 1012, 4064, 1025, 1065, 2709, 3565, 1012, 2131, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/LocalInputChannel.java
LocalInputChannel.requestSubpartition
@Override void requestSubpartition(int subpartitionIndex) throws IOException, InterruptedException { boolean retriggerRequest = false; // The lock is required to request only once in the presence of retriggered requests. synchronized (requestLock) { checkState(!isReleased, "LocalInputChannel has been releas...
java
@Override void requestSubpartition(int subpartitionIndex) throws IOException, InterruptedException { boolean retriggerRequest = false; // The lock is required to request only once in the presence of retriggered requests. synchronized (requestLock) { checkState(!isReleased, "LocalInputChannel has been releas...
[ "@", "Override", "void", "requestSubpartition", "(", "int", "subpartitionIndex", ")", "throws", "IOException", ",", "InterruptedException", "{", "boolean", "retriggerRequest", "=", "false", ";", "// The lock is required to request only once in the presence of retriggered requests...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/LocalInputChannel.java#L96-L141
train
Requests a subpartition of the local input channel.
[ 30522, 1030, 2058, 15637, 11675, 11186, 30524, 5843, 2003, 3223, 2000, 5227, 2069, 2320, 1999, 1996, 3739, 1997, 2128, 18886, 13327, 2098, 11186, 1012, 25549, 1006, 5227, 7878, 1007, 1063, 14148, 12259, 1006, 999, 2003, 16570, 25063, 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/lang/PatternPool.java
PatternPool.get
public static Pattern get(String regex, int flags) { final RegexWithFlag regexWithFlag = new RegexWithFlag(regex, flags); Pattern pattern = POOL.get(regexWithFlag); if (null == pattern) { pattern = Pattern.compile(regex, flags); POOL.put(regexWithFlag, pattern); } return pattern; }
java
public static Pattern get(String regex, int flags) { final RegexWithFlag regexWithFlag = new RegexWithFlag(regex, flags); Pattern pattern = POOL.get(regexWithFlag); if (null == pattern) { pattern = Pattern.compile(regex, flags); POOL.put(regexWithFlag, pattern); } return pattern; }
[ "public", "static", "Pattern", "get", "(", "String", "regex", ",", "int", "flags", ")", "{", "final", "RegexWithFlag", "regexWithFlag", "=", "new", "RegexWithFlag", "(", "regex", ",", "flags", ")", ";", "Pattern", "pattern", "=", "POOL", ".", "get", "(", ...
先从Pattern池中查找正则对应的{@link Pattern},找不到则编译正则表达式并入池。 @param regex 正则表达式 @param flags 正则标识位集合 {@link Pattern} @return {@link Pattern}
[ "先从Pattern池中查找正则对应的", "{", "@link", "Pattern", "}", ",找不到则编译正则表达式并入池。" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/PatternPool.java#L82-L91
train
Gets a pattern from the pool.
[ 30522, 2270, 10763, 5418, 2131, 1006, 5164, 19723, 10288, 1010, 20014, 9245, 1007, 1063, 2345, 19723, 10288, 24415, 10258, 8490, 19723, 10288, 24415, 10258, 8490, 1027, 2047, 19723, 10288, 24415, 10258, 8490, 1006, 19723, 10288, 1010, 9245, 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/incubator-shardingsphere
sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/communication/jdbc/recognizer/JDBCDriverURLRecognizerEngine.java
JDBCDriverURLRecognizerEngine.getDriverClassName
public static String getDriverClassName(final String url) { for (Entry<String, String> entry : URL_PREFIX_AND_DRIVER_CLASS_NAME_MAPPER.entrySet()) { if (url.startsWith(entry.getKey())) { return entry.getValue(); } } throw new ShardingException("Cannot reso...
java
public static String getDriverClassName(final String url) { for (Entry<String, String> entry : URL_PREFIX_AND_DRIVER_CLASS_NAME_MAPPER.entrySet()) { if (url.startsWith(entry.getKey())) { return entry.getValue(); } } throw new ShardingException("Cannot reso...
[ "public", "static", "String", "getDriverClassName", "(", "final", "String", "url", ")", "{", "for", "(", "Entry", "<", "String", ",", "String", ">", "entry", ":", "URL_PREFIX_AND_DRIVER_CLASS_NAME_MAPPER", ".", "entrySet", "(", ")", ")", "{", "if", "(", "url...
Get JDBC driver class name. @param url JDBC URL @return driver class name
[ "Get", "JDBC", "driver", "class", "name", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/communication/jdbc/recognizer/JDBCDriverURLRecognizerEngine.java#L59-L66
train
Get the driver class name for the JDBC url.
[ 30522, 2270, 10763, 5164, 2131, 23663, 11890, 27102, 18442, 1006, 2345, 5164, 24471, 2140, 1007, 1063, 2005, 1006, 4443, 1026, 5164, 1010, 5164, 1028, 4443, 1024, 24471, 2140, 1035, 17576, 1035, 1998, 1035, 4062, 1035, 2465, 1035, 2171, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/ssh/Sftp.java
Sftp.delDir
@Override @SuppressWarnings("unchecked") public boolean delDir(String dirPath) { if (false == cd(dirPath)) { return false; } Vector<LsEntry> list = null; try { list = channel.ls(channel.pwd()); } catch (SftpException e) { throw new JschRuntimeException(e); } String fileName; ...
java
@Override @SuppressWarnings("unchecked") public boolean delDir(String dirPath) { if (false == cd(dirPath)) { return false; } Vector<LsEntry> list = null; try { list = channel.ls(channel.pwd()); } catch (SftpException e) { throw new JschRuntimeException(e); } String fileName; ...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "boolean", "delDir", "(", "String", "dirPath", ")", "{", "if", "(", "false", "==", "cd", "(", "dirPath", ")", ")", "{", "return", "false", ";", "}", "Vector", "<", "LsEntry", ...
删除文件夹及其文件夹下的所有文件 @param dirPath 文件夹路径 @return boolean 是否删除成功
[ "删除文件夹及其文件夹下的所有文件" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/ssh/Sftp.java#L311-L348
train
Deletes the file or directory with the specified path.
[ 30522, 1030, 2058, 15637, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 22017, 20898, 3972, 4305, 2099, 1006, 5164, 16101, 15069, 1007, 1063, 2065, 1006, 6270, 1027, 1027, 3729, 1006, 16101, 15069, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/operators/SingleInputSemanticProperties.java
SingleInputSemanticProperties.addForwardedField
public void addForwardedField(int sourceField, int targetField) { if(isTargetFieldPresent(targetField)) { throw new InvalidSemanticAnnotationException("Target field "+targetField+" was added twice."); } FieldSet targetFields = fieldMapping.get(sourceField); if (targetFields != null) { fieldMapping.put(so...
java
public void addForwardedField(int sourceField, int targetField) { if(isTargetFieldPresent(targetField)) { throw new InvalidSemanticAnnotationException("Target field "+targetField+" was added twice."); } FieldSet targetFields = fieldMapping.get(sourceField); if (targetFields != null) { fieldMapping.put(so...
[ "public", "void", "addForwardedField", "(", "int", "sourceField", ",", "int", "targetField", ")", "{", "if", "(", "isTargetFieldPresent", "(", "targetField", ")", ")", "{", "throw", "new", "InvalidSemanticAnnotationException", "(", "\"Target field \"", "+", "targetF...
Adds, to the existing information, a field that is forwarded directly from the source record(s) to the destination record(s). @param sourceField the position in the source record(s) @param targetField the position in the destination record(s)
[ "Adds", "to", "the", "existing", "information", "a", "field", "that", "is", "forwarded", "directly", "from", "the", "source", "record", "(", "s", ")", "to", "the", "destination", "record", "(", "s", ")", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/SingleInputSemanticProperties.java#L89-L100
train
Adds a field to the forwarded list of fields.
[ 30522, 2270, 11675, 5587, 29278, 7652, 2098, 3790, 1006, 20014, 3120, 3790, 1010, 20014, 4539, 3790, 1007, 1063, 2065, 1006, 21541, 2906, 18150, 3790, 28994, 4765, 1006, 4539, 3790, 1007, 1007, 1063, 5466, 2047, 19528, 3366, 2386, 22723, 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-http/src/main/java/cn/hutool/http/webservice/SoapClient.java
SoapClient.setParam
@SuppressWarnings("rawtypes") private static SOAPElement setParam(SOAPElement ele, String name, Object value, String prefix) { final SOAPElement childEle; try { if (StrUtil.isNotBlank(prefix)) { childEle = ele.addChildElement(name, prefix); } else { childEle = ele.addChildElement(name); } ...
java
@SuppressWarnings("rawtypes") private static SOAPElement setParam(SOAPElement ele, String name, Object value, String prefix) { final SOAPElement childEle; try { if (StrUtil.isNotBlank(prefix)) { childEle = ele.addChildElement(name, prefix); } else { childEle = ele.addChildElement(name); } ...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "private", "static", "SOAPElement", "setParam", "(", "SOAPElement", "ele", ",", "String", "name", ",", "Object", "value", ",", "String", "prefix", ")", "{", "final", "SOAPElement", "childEle", ";", "try", "{",...
设置方法参数 @param ele 方法节点 @param name 参数名 @param value 参数值 @param prefix 命名空间前缀 @return {@link SOAPElement}子节点
[ "设置方法参数" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/webservice/SoapClient.java#L464-L496
train
Sets the parameter of a SOAP element.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 6315, 13874, 2015, 1000, 1007, 2797, 10763, 7815, 12260, 3672, 2275, 28689, 2213, 1006, 7815, 12260, 3672, 3449, 2063, 1010, 5164, 2171, 1010, 4874, 3643, 1010, 5164, 17576, 1007, 1063, 2345...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
java/client/src/com/thoughtworks/selenium/HttpCommandProcessor.java
HttpCommandProcessor.executeCommandOnServlet
public String executeCommandOnServlet(String command) { try { return getCommandResponseAsString(command); } catch (IOException e) { if (e instanceof ConnectException) { throw new SeleniumException(e.getMessage(), e); } e.printStackTrace(); throw new UnsupportedOperationExce...
java
public String executeCommandOnServlet(String command) { try { return getCommandResponseAsString(command); } catch (IOException e) { if (e instanceof ConnectException) { throw new SeleniumException(e.getMessage(), e); } e.printStackTrace(); throw new UnsupportedOperationExce...
[ "public", "String", "executeCommandOnServlet", "(", "String", "command", ")", "{", "try", "{", "return", "getCommandResponseAsString", "(", "command", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "if", "(", "e", "instanceof", "ConnectException", ...
Sends the specified command string to the bridge servlet @param command command to execute @return response from the command execution
[ "Sends", "the", "specified", "command", "string", "to", "the", "bridge", "servlet" ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/com/thoughtworks/selenium/HttpCommandProcessor.java#L120-L131
train
Execute a command on the servlet.
[ 30522, 2270, 5164, 15389, 9006, 2386, 5280, 8043, 2615, 7485, 1006, 5164, 3094, 1007, 1063, 3046, 1063, 2709, 2131, 9006, 2386, 16200, 13102, 5644, 5243, 4757, 18886, 3070, 1006, 3094, 1007, 1025, 1065, 4608, 1006, 22834, 10288, 24422, 1041...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/dictionary/CoreSynonymDictionaryEx.java
CoreSynonymDictionaryEx.getLexemeArray
public static long[] getLexemeArray(List<CommonSynonymDictionary.SynonymItem> synonymItemList) { long[] array = new long[synonymItemList.size()]; int i = 0; for (CommonSynonymDictionary.SynonymItem item : synonymItemList) { array[i++] = item.entry.id; } re...
java
public static long[] getLexemeArray(List<CommonSynonymDictionary.SynonymItem> synonymItemList) { long[] array = new long[synonymItemList.size()]; int i = 0; for (CommonSynonymDictionary.SynonymItem item : synonymItemList) { array[i++] = item.entry.id; } re...
[ "public", "static", "long", "[", "]", "getLexemeArray", "(", "List", "<", "CommonSynonymDictionary", ".", "SynonymItem", ">", "synonymItemList", ")", "{", "long", "[", "]", "array", "=", "new", "long", "[", "synonymItemList", ".", "size", "(", ")", "]", ";...
获取语义标签 @return
[ "获取语义标签" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dictionary/CoreSynonymDictionaryEx.java#L116-L125
train
Get the lemma array from a list of CommonSynonymDictionary. SynonymItem objects.
[ 30522, 2270, 10763, 2146, 1031, 1033, 2131, 2571, 2595, 21382, 2906, 9447, 1006, 2862, 1026, 7674, 6038, 16585, 26876, 28097, 5649, 1012, 10675, 4221, 2213, 1028, 10675, 4221, 19968, 2923, 1007, 1063, 2146, 1031, 1033, 9140, 1027, 2047, 214...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/seg/common/CWSEvaluator.java
CWSEvaluator.evaluate
public static CWSEvaluator.Result evaluate(Segment segment, String testFile, String outputPath, String goldFile, String dictPath) throws IOException { return evaluate(segment, outputPath, goldFile, dictPath); }
java
public static CWSEvaluator.Result evaluate(Segment segment, String testFile, String outputPath, String goldFile, String dictPath) throws IOException { return evaluate(segment, outputPath, goldFile, dictPath); }
[ "public", "static", "CWSEvaluator", ".", "Result", "evaluate", "(", "Segment", "segment", ",", "String", "testFile", ",", "String", "outputPath", ",", "String", "goldFile", ",", "String", "dictPath", ")", "throws", "IOException", "{", "return", "evaluate", "(", ...
标准化评测分词器 @param segment 分词器 @param testFile 测试集raw text @param outputPath 分词预测输出文件 @param goldFile 测试集segmented file @param dictPath 训练集单词列表 @return 一个储存准确率的结构 @throws IOException
[ "标准化评测分词器" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/common/CWSEvaluator.java#L223-L226
train
Evaluate a CWSE value on a segment.
[ 30522, 2270, 10763, 19296, 3366, 10175, 6692, 4263, 1012, 2765, 16157, 1006, 6903, 6903, 1010, 5164, 3231, 8873, 2571, 1010, 5164, 6434, 15069, 1010, 5164, 2751, 8873, 2571, 1010, 5164, 4487, 6593, 15069, 1007, 11618, 22834, 10288, 24422, 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-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/JDBCInputFormat.java
JDBCInputFormat.nextRecord
@Override public Row nextRecord(Row row) throws IOException { try { if (!hasNext) { return null; } for (int pos = 0; pos < row.getArity(); pos++) { row.setField(pos, resultSet.getObject(pos + 1)); } //update hasNext after we've read the record hasNext = resultSet.next(); return row; } ...
java
@Override public Row nextRecord(Row row) throws IOException { try { if (!hasNext) { return null; } for (int pos = 0; pos < row.getArity(); pos++) { row.setField(pos, resultSet.getObject(pos + 1)); } //update hasNext after we've read the record hasNext = resultSet.next(); return row; } ...
[ "@", "Override", "public", "Row", "nextRecord", "(", "Row", "row", ")", "throws", "IOException", "{", "try", "{", "if", "(", "!", "hasNext", ")", "{", "return", "null", ";", "}", "for", "(", "int", "pos", "=", "0", ";", "pos", "<", "row", ".", "g...
Stores the next resultSet row in a tuple. @param row row to be reused. @return row containing next {@link Row} @throws java.io.IOException
[ "Stores", "the", "next", "resultSet", "row", "in", "a", "tuple", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/JDBCInputFormat.java#L289-L306
train
Returns the next row of the data.
[ 30522, 1030, 2058, 15637, 2270, 5216, 2279, 2890, 27108, 2094, 1006, 5216, 5216, 1007, 11618, 22834, 10288, 24422, 1063, 3046, 1063, 2065, 1006, 999, 8440, 10288, 2102, 1007, 1063, 2709, 19701, 1025, 1065, 2005, 1006, 20014, 13433, 2015, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java
SpringApplication.run
public static ConfigurableApplicationContext run(Class<?> primarySource, String... args) { return run(new Class<?>[] { primarySource }, args); }
java
public static ConfigurableApplicationContext run(Class<?> primarySource, String... args) { return run(new Class<?>[] { primarySource }, args); }
[ "public", "static", "ConfigurableApplicationContext", "run", "(", "Class", "<", "?", ">", "primarySource", ",", "String", "...", "args", ")", "{", "return", "run", "(", "new", "Class", "<", "?", ">", "[", "]", "{", "primarySource", "}", ",", "args", ")",...
Static helper that can be used to run a {@link SpringApplication} from the specified source using default settings. @param primarySource the primary source to load @param args the application arguments (usually passed from a Java main method) @return the running {@link ApplicationContext}
[ "Static", "helper", "that", "can", "be", "used", "to", "run", "a", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java#L1261-L1264
train
Run application with given primary source and arguments.
[ 30522, 2270, 10763, 9530, 8873, 27390, 3085, 29098, 19341, 3508, 8663, 18209, 2448, 1006, 2465, 1026, 1029, 1028, 3078, 6499, 3126, 3401, 1010, 5164, 1012, 1012, 1012, 12098, 5620, 1007, 1063, 2709, 2448, 1006, 2047, 2465, 1026, 1029, 1028,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-sql-client/src/main/java/org/apache/flink/table/client/config/entries/DeploymentEntry.java
DeploymentEntry.merge
public static DeploymentEntry merge(DeploymentEntry deployment1, DeploymentEntry deployment2) { final Map<String, String> mergedProperties = new HashMap<>(deployment1.asMap()); mergedProperties.putAll(deployment2.asMap()); final DescriptorProperties properties = new DescriptorProperties(true); properties.putPr...
java
public static DeploymentEntry merge(DeploymentEntry deployment1, DeploymentEntry deployment2) { final Map<String, String> mergedProperties = new HashMap<>(deployment1.asMap()); mergedProperties.putAll(deployment2.asMap()); final DescriptorProperties properties = new DescriptorProperties(true); properties.putPr...
[ "public", "static", "DeploymentEntry", "merge", "(", "DeploymentEntry", "deployment1", ",", "DeploymentEntry", "deployment2", ")", "{", "final", "Map", "<", "String", ",", "String", ">", "mergedProperties", "=", "new", "HashMap", "<>", "(", "deployment1", ".", "...
Merges two deployments entries. The properties of the first deployment entry might be overwritten by the second one.
[ "Merges", "two", "deployments", "entries", ".", "The", "properties", "of", "the", "first", "deployment", "entry", "might", "be", "overwritten", "by", "the", "second", "one", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/config/entries/DeploymentEntry.java#L139-L147
train
Merge two deployments.
[ 30522, 2270, 10763, 10813, 4765, 2854, 13590, 1006, 10813, 4765, 2854, 10813, 2487, 1010, 10813, 4765, 2854, 10813, 2475, 1007, 1063, 2345, 4949, 1026, 5164, 1010, 5164, 1028, 5314, 21572, 4842, 7368, 1027, 2047, 23325, 2863, 2361, 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...
apache/flink
flink-connectors/flink-connector-kafka-0.9/src/main/java/org/apache/flink/streaming/connectors/kafka/internal/KafkaConsumerThread.java
KafkaConsumerThread.getRecordsFromKafka
@VisibleForTesting protected ConsumerRecords<byte[], byte[]> getRecordsFromKafka() { ConsumerRecords<byte[], byte[]> records = consumer.poll(pollTimeout); if (rateLimiter != null) { int bytesRead = getRecordBatchSize(records); rateLimiter.acquire(bytesRead); } return records; }
java
@VisibleForTesting protected ConsumerRecords<byte[], byte[]> getRecordsFromKafka() { ConsumerRecords<byte[], byte[]> records = consumer.poll(pollTimeout); if (rateLimiter != null) { int bytesRead = getRecordBatchSize(records); rateLimiter.acquire(bytesRead); } return records; }
[ "@", "VisibleForTesting", "protected", "ConsumerRecords", "<", "byte", "[", "]", ",", "byte", "[", "]", ">", "getRecordsFromKafka", "(", ")", "{", "ConsumerRecords", "<", "byte", "[", "]", ",", "byte", "[", "]", ">", "records", "=", "consumer", ".", "pol...
Get records from Kafka. If the rate-limiting feature is turned on, this method is called at a rate specified by the {@link #rateLimiter}. @return ConsumerRecords
[ "Get", "records", "from", "Kafka", ".", "If", "the", "rate", "-", "limiting", "feature", "is", "turned", "on", "this", "method", "is", "called", "at", "a", "rate", "specified", "by", "the", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-0.9/src/main/java/org/apache/flink/streaming/connectors/kafka/internal/KafkaConsumerThread.java#L537-L545
train
Get records from Kafka.
[ 30522, 1030, 5710, 13028, 4355, 2075, 5123, 7325, 2890, 27108, 5104, 1026, 24880, 1031, 1033, 1010, 24880, 1031, 1033, 1028, 2131, 2890, 27108, 5104, 19699, 5358, 2912, 24316, 2050, 1006, 1007, 1063, 7325, 2890, 27108, 5104, 1026, 24880, 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/collection/CollUtil.java
CollUtil.join
public static <T> String join(Iterable<T> iterable, CharSequence conjunction) { return IterUtil.join(iterable, conjunction); }
java
public static <T> String join(Iterable<T> iterable, CharSequence conjunction) { return IterUtil.join(iterable, conjunction); }
[ "public", "static", "<", "T", ">", "String", "join", "(", "Iterable", "<", "T", ">", "iterable", ",", "CharSequence", "conjunction", ")", "{", "return", "IterUtil", ".", "join", "(", "iterable", ",", "conjunction", ")", ";", "}" ]
以 conjunction 为分隔符将集合转换为字符串<br> 如果集合元素为数组、{@link Iterable}或{@link Iterator},则递归组合其为字符串 @param <T> 集合元素类型 @param iterable {@link Iterable} @param conjunction 分隔符 @return 连接后的字符串 @see IterUtil#join(Iterable, CharSequence)
[ "以", "conjunction", "为分隔符将集合转换为字符串<br", ">", "如果集合元素为数组、", "{", "@link", "Iterable", "}", "或", "{", "@link", "Iterator", "}", ",则递归组合其为字符串" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java#L276-L278
train
Join the given iterable with the given conjunction.
[ 30522, 2270, 10763, 1026, 1056, 1028, 5164, 3693, 1006, 2009, 6906, 3468, 1026, 1056, 1028, 2009, 6906, 3468, 1010, 25869, 3366, 4226, 5897, 9595, 1007, 1063, 2709, 2009, 2121, 21823, 2140, 1012, 3693, 1006, 2009, 6906, 3468, 1010, 9595, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.pressImage
public static void pressImage(ImageInputStream srcStream, ImageOutputStream destStream, Image pressImg, int x, int y, float alpha) throws IORuntimeException { pressImage(read(srcStream), destStream, pressImg, x, y, alpha); }
java
public static void pressImage(ImageInputStream srcStream, ImageOutputStream destStream, Image pressImg, int x, int y, float alpha) throws IORuntimeException { pressImage(read(srcStream), destStream, pressImg, x, y, alpha); }
[ "public", "static", "void", "pressImage", "(", "ImageInputStream", "srcStream", ",", "ImageOutputStream", "destStream", ",", "Image", "pressImg", ",", "int", "x", ",", "int", "y", ",", "float", "alpha", ")", "throws", "IORuntimeException", "{", "pressImage", "("...
给图片添加图片水印<br> 此方法并不关闭流 @param srcStream 源图像流 @param destStream 目标图像流 @param pressImg 水印图片,可以使用{@link ImageIO#read(File)}方法读取文件 @param x 修正值。 默认在中间,偏移量相对于中间偏移 @param y 修正值。 默认在中间,偏移量相对于中间偏移 @param alpha 透明度:alpha 必须是范围 [0.0, 1.0] 之内(包含边界值)的一个浮点数字 @throws IORuntimeException IO异常
[ "给图片添加图片水印<br", ">", "此方法并不关闭流" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L907-L909
train
Press image from srcStream to destStream.
[ 30522, 2270, 10763, 11675, 2811, 9581, 3351, 1006, 3746, 2378, 18780, 21422, 5034, 6169, 25379, 1010, 3746, 5833, 18780, 21422, 4078, 3215, 25379, 1010, 3746, 2811, 5714, 2290, 1010, 20014, 1060, 1010, 20014, 1061, 1010, 14257, 6541, 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-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
SqlValidatorImpl.validateGroupClause
protected void validateGroupClause(SqlSelect select) { SqlNodeList groupList = select.getGroup(); if (groupList == null) { return; } final String clause = "GROUP BY"; validateNoAggs(aggOrOverFinder, groupList, clause); final SqlValidatorScope groupScope = getGroupScope(select); inferUnknownTypes(unknow...
java
protected void validateGroupClause(SqlSelect select) { SqlNodeList groupList = select.getGroup(); if (groupList == null) { return; } final String clause = "GROUP BY"; validateNoAggs(aggOrOverFinder, groupList, clause); final SqlValidatorScope groupScope = getGroupScope(select); inferUnknownTypes(unknow...
[ "protected", "void", "validateGroupClause", "(", "SqlSelect", "select", ")", "{", "SqlNodeList", "groupList", "=", "select", ".", "getGroup", "(", ")", ";", "if", "(", "groupList", "==", "null", ")", "{", "return", ";", "}", "final", "String", "clause", "=...
Validates the GROUP BY clause of a SELECT statement. This method is called even if no GROUP BY clause is present.
[ "Validates", "the", "GROUP", "BY", "clause", "of", "a", "SELECT", "statement", ".", "This", "method", "is", "called", "even", "if", "no", "GROUP", "BY", "clause", "is", "present", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3891-L3948
train
Validate the GROUP BY clause.
[ 30522, 5123, 11675, 9398, 3686, 17058, 20464, 20559, 2063, 1006, 29296, 11246, 30524, 11075, 1027, 1000, 2177, 2011, 1000, 1025, 9398, 3686, 3630, 8490, 5620, 1006, 12943, 20255, 7840, 23695, 1010, 2177, 9863, 1010, 11075, 1007, 1025, 2345, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java
ConfigurationPropertyName.isAncestorOf
public boolean isAncestorOf(ConfigurationPropertyName name) { Assert.notNull(name, "Name must not be null"); if (this.getNumberOfElements() >= name.getNumberOfElements()) { return false; } return elementsEqual(name); }
java
public boolean isAncestorOf(ConfigurationPropertyName name) { Assert.notNull(name, "Name must not be null"); if (this.getNumberOfElements() >= name.getNumberOfElements()) { return false; } return elementsEqual(name); }
[ "public", "boolean", "isAncestorOf", "(", "ConfigurationPropertyName", "name", ")", "{", "Assert", ".", "notNull", "(", "name", ",", "\"Name must not be null\"", ")", ";", "if", "(", "this", ".", "getNumberOfElements", "(", ")", ">=", "name", ".", "getNumberOfEl...
Returns {@code true} if this element is an ancestor (immediate or nested parent) of the specified name. @param name the name to check @return {@code true} if this name is an ancestor
[ "Returns", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java#L235-L241
train
Checks if this configuration property name is an ancestor of the given name.
[ 30522, 2270, 22017, 20898, 18061, 5897, 23809, 11253, 1006, 9563, 21572, 4842, 25680, 14074, 2171, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 2171, 1010, 1000, 2171, 2442, 2025, 2022, 19701, 1000, 1007, 1025, 2065, 1006, 2023, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java
XmlUtil.createDocumentBuilder
public static DocumentBuilder createDocumentBuilder() { final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); disableXXE(dbf); DocumentBuilder builder = null; try { builder = dbf.newDocumentBuilder(); } catch (Exception e) { throw new UtilException(e, "Create xml document error...
java
public static DocumentBuilder createDocumentBuilder() { final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); disableXXE(dbf); DocumentBuilder builder = null; try { builder = dbf.newDocumentBuilder(); } catch (Exception e) { throw new UtilException(e, "Create xml document error...
[ "public", "static", "DocumentBuilder", "createDocumentBuilder", "(", ")", "{", "final", "DocumentBuilderFactory", "dbf", "=", "DocumentBuilderFactory", ".", "newInstance", "(", ")", ";", "disableXXE", "(", "dbf", ")", ";", "DocumentBuilder", "builder", "=", "null", ...
创建 DocumentBuilder @return DocumentBuilder @since 4.1.2
[ "创建", "DocumentBuilder" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java#L386-L396
train
Create a DocumentBuilder object.
[ 30522, 2270, 10763, 6254, 8569, 23891, 2099, 2580, 10085, 27417, 2102, 8569, 23891, 2099, 1006, 1007, 1063, 2345, 6254, 8569, 23891, 12881, 18908, 10253, 16962, 2546, 1027, 6254, 8569, 23891, 12881, 18908, 10253, 1012, 2047, 7076, 26897, 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/multipart/HttpPostMultipartRequestDecoder.java
HttpPostMultipartRequestDecoder.loadDataMultipart
private static boolean loadDataMultipart(ByteBuf undecodedChunk, String delimiter, HttpData httpData) { if (!undecodedChunk.hasArray()) { return loadDataMultipartStandard(undecodedChunk, delimiter, httpData); } final SeekAheadOptimize sao = new SeekAheadOptimize(undecodedChunk); ...
java
private static boolean loadDataMultipart(ByteBuf undecodedChunk, String delimiter, HttpData httpData) { if (!undecodedChunk.hasArray()) { return loadDataMultipartStandard(undecodedChunk, delimiter, httpData); } final SeekAheadOptimize sao = new SeekAheadOptimize(undecodedChunk); ...
[ "private", "static", "boolean", "loadDataMultipart", "(", "ByteBuf", "undecodedChunk", ",", "String", "delimiter", ",", "HttpData", "httpData", ")", "{", "if", "(", "!", "undecodedChunk", ".", "hasArray", "(", ")", ")", "{", "return", "loadDataMultipartStandard", ...
Load the field value from a Multipart request @return {@code true} if the last chunk is loaded (boundary delimiter found), {@code false} if need more chunks @throws ErrorDataDecoderException
[ "Load", "the", "field", "value", "from", "a", "Multipart", "request" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostMultipartRequestDecoder.java#L1340-L1381
train
Load the data from a multipart request.
[ 30522, 2797, 10763, 22017, 20898, 7170, 2850, 15464, 11314, 11514, 8445, 1006, 24880, 8569, 2546, 6151, 8586, 10244, 16409, 17157, 2243, 1010, 5164, 3972, 27605, 3334, 1010, 8299, 2850, 2696, 8299, 2850, 2696, 1007, 1063, 2065, 1006, 999, 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...
netty/netty
common/src/main/java/io/netty/util/internal/ReflectionUtil.java
ReflectionUtil.trySetAccessible
public static Throwable trySetAccessible(AccessibleObject object, boolean checkAccessible) { if (checkAccessible && !PlatformDependent0.isExplicitTryReflectionSetAccessible()) { return new UnsupportedOperationException("Reflective setAccessible(true) disabled"); } try { o...
java
public static Throwable trySetAccessible(AccessibleObject object, boolean checkAccessible) { if (checkAccessible && !PlatformDependent0.isExplicitTryReflectionSetAccessible()) { return new UnsupportedOperationException("Reflective setAccessible(true) disabled"); } try { o...
[ "public", "static", "Throwable", "trySetAccessible", "(", "AccessibleObject", "object", ",", "boolean", "checkAccessible", ")", "{", "if", "(", "checkAccessible", "&&", "!", "PlatformDependent0", ".", "isExplicitTryReflectionSetAccessible", "(", ")", ")", "{", "return...
Try to call {@link AccessibleObject#setAccessible(boolean)} but will catch any {@link SecurityException} and {@link java.lang.reflect.InaccessibleObjectException} and return it. The caller must check if it returns {@code null} and if not handle the returned exception.
[ "Try", "to", "call", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/ReflectionUtil.java#L29-L41
train
Try to set the accessible flag of the given object.
[ 30522, 2270, 10763, 5466, 3085, 3046, 13462, 6305, 9623, 19307, 1006, 7801, 16429, 20614, 4874, 1010, 22017, 20898, 4638, 6305, 9623, 19307, 1007, 1063, 2065, 1006, 4638, 6305, 9623, 19307, 1004, 1004, 999, 4132, 3207, 11837, 16454, 2692, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpServerKeepAliveHandler.java
HttpServerKeepAliveHandler.isSelfDefinedMessageLength
private static boolean isSelfDefinedMessageLength(HttpResponse response) { return isContentLengthSet(response) || isTransferEncodingChunked(response) || isMultipart(response) || isInformational(response) || response.status().code() == HttpResponseStatus.NO_CONTENT.code(); }
java
private static boolean isSelfDefinedMessageLength(HttpResponse response) { return isContentLengthSet(response) || isTransferEncodingChunked(response) || isMultipart(response) || isInformational(response) || response.status().code() == HttpResponseStatus.NO_CONTENT.code(); }
[ "private", "static", "boolean", "isSelfDefinedMessageLength", "(", "HttpResponse", "response", ")", "{", "return", "isContentLengthSet", "(", "response", ")", "||", "isTransferEncodingChunked", "(", "response", ")", "||", "isMultipart", "(", "response", ")", "||", "...
Keep-alive only works if the client can detect when the message has ended without relying on the connection being closed. <p> <ul> <li>See <a href="https://tools.ietf.org/html/rfc7230#section-6.3"/></li> <li>See <a href="https://tools.ietf.org/html/rfc7230#section-3.3.2"/></li> <li>See <a href="https://tools.ietf.org/h...
[ "Keep", "-", "alive", "only", "works", "if", "the", "client", "can", "detect", "when", "the", "message", "has", "ended", "without", "relying", "on", "the", "connection", "being", "closed", ".", "<p", ">", "<ul", ">", "<li", ">", "See", "<a", "href", "=...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpServerKeepAliveHandler.java#L114-L117
train
Returns true if the response is self - defined.
[ 30522, 2797, 10763, 22017, 20898, 26354, 2884, 2546, 3207, 23460, 22117, 7971, 4270, 7770, 13512, 2232, 1006, 8299, 6072, 26029, 3366, 3433, 1007, 1063, 2709, 2003, 8663, 6528, 9286, 3070, 26830, 3388, 1006, 3433, 1007, 1064, 1064, 21541, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java
DateUtil.truncate
public static DateTime truncate(Date date, DateField dateField) { return new DateTime(truncate(calendar(date), dateField)); }
java
public static DateTime truncate(Date date, DateField dateField) { return new DateTime(truncate(calendar(date), dateField)); }
[ "public", "static", "DateTime", "truncate", "(", "Date", "date", ",", "DateField", "dateField", ")", "{", "return", "new", "DateTime", "(", "truncate", "(", "calendar", "(", "date", ")", ",", "dateField", ")", ")", ";", "}" ]
修改日期为某个时间字段起始时间 @param date {@link Date} @param dateField 时间字段 @return {@link DateTime} @since 4.5.7
[ "修改日期为某个时间字段起始时间" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L755-L757
train
Truncate the given date to the given dateField.
[ 30522, 2270, 10763, 3058, 7292, 19817, 4609, 16280, 1006, 3058, 3058, 1010, 3058, 3790, 3058, 3790, 1007, 1063, 2709, 2047, 3058, 7292, 1006, 19817, 4609, 16280, 1006, 8094, 1006, 3058, 1007, 1010, 3058, 3790, 1007, 1007, 1025, 1065, 102, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/MapConverter.java
MapConverter.convertMapToMap
private void convertMapToMap(Map<?, ?> srcMap, Map<Object, Object> targetMap) { final ConverterRegistry convert = ConverterRegistry.getInstance(); Object key; Object value; for (Entry<?, ?> entry : srcMap.entrySet()) { key = TypeUtil.isUnknow(this.keyType) ? entry.getKey() : convert.convert(this.keyType...
java
private void convertMapToMap(Map<?, ?> srcMap, Map<Object, Object> targetMap) { final ConverterRegistry convert = ConverterRegistry.getInstance(); Object key; Object value; for (Entry<?, ?> entry : srcMap.entrySet()) { key = TypeUtil.isUnknow(this.keyType) ? entry.getKey() : convert.convert(this.keyType...
[ "private", "void", "convertMapToMap", "(", "Map", "<", "?", ",", "?", ">", "srcMap", ",", "Map", "<", "Object", ",", "Object", ">", "targetMap", ")", "{", "final", "ConverterRegistry", "convert", "=", "ConverterRegistry", ".", "getInstance", "(", ")", ";",...
Map转Map @param srcMap 源Map @param targetMap 目标Map
[ "Map转Map" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/convert/impl/MapConverter.java#L80-L89
train
Convert map to target map.
[ 30522, 2797, 11675, 10463, 2863, 13876, 9626, 2361, 1006, 4949, 1026, 1029, 1010, 1029, 1028, 5034, 27487, 9331, 1010, 4949, 1026, 4874, 1010, 4874, 1028, 4539, 2863, 2361, 1007, 1063, 2345, 10463, 28849, 24063, 2854, 10463, 1027, 10463, 28...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
buffer/src/main/java/io/netty/buffer/PoolChunk.java
PoolChunk.allocateNode
private int allocateNode(int d) { int id = 1; int initial = - (1 << d); // has last d bits = 0 and rest all = 1 byte val = value(id); if (val > d) { // unusable return -1; } while (val < d || (id & initial) == 0) { // id & initial == 1 << d for all ids at dept...
java
private int allocateNode(int d) { int id = 1; int initial = - (1 << d); // has last d bits = 0 and rest all = 1 byte val = value(id); if (val > d) { // unusable return -1; } while (val < d || (id & initial) == 0) { // id & initial == 1 << d for all ids at dept...
[ "private", "int", "allocateNode", "(", "int", "d", ")", "{", "int", "id", "=", "1", ";", "int", "initial", "=", "-", "(", "1", "<<", "d", ")", ";", "// has last d bits = 0 and rest all = 1", "byte", "val", "=", "value", "(", "id", ")", ";", "if", "("...
Algorithm to allocate an index in memoryMap when we query for a free node at depth d @param d depth @return index in memoryMap
[ "Algorithm", "to", "allocate", "an", "index", "in", "memoryMap", "when", "we", "query", "for", "a", "free", "node", "at", "depth", "d" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/PoolChunk.java#L293-L314
train
Allocate a node in the cache.
[ 30522, 2797, 20014, 2035, 24755, 6528, 10244, 1006, 20014, 1040, 1007, 1063, 20014, 8909, 1027, 1015, 1025, 20014, 3988, 1027, 1011, 1006, 1015, 1026, 1026, 1040, 1007, 1025, 1013, 1013, 2038, 2197, 1040, 9017, 1027, 1014, 1998, 2717, 2035,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java
StateAssignmentOperation.getManagedKeyedStateHandles
public static List<KeyedStateHandle> getManagedKeyedStateHandles( OperatorState operatorState, KeyGroupRange subtaskKeyGroupRange) { final int parallelism = operatorState.getParallelism(); List<KeyedStateHandle> subtaskKeyedStateHandles = null; for (int i = 0; i < parallelism; i++) { if (operatorState.g...
java
public static List<KeyedStateHandle> getManagedKeyedStateHandles( OperatorState operatorState, KeyGroupRange subtaskKeyGroupRange) { final int parallelism = operatorState.getParallelism(); List<KeyedStateHandle> subtaskKeyedStateHandles = null; for (int i = 0; i < parallelism; i++) { if (operatorState.g...
[ "public", "static", "List", "<", "KeyedStateHandle", ">", "getManagedKeyedStateHandles", "(", "OperatorState", "operatorState", ",", "KeyGroupRange", "subtaskKeyGroupRange", ")", "{", "final", "int", "parallelism", "=", "operatorState", ".", "getParallelism", "(", ")", ...
Collect {@link KeyGroupsStateHandle managedKeyedStateHandles} which have intersection with given {@link KeyGroupRange} from {@link TaskState operatorState} @param operatorState all state handles of a operator @param subtaskKeyGroupRange the KeyGroupRange of a subtask @return all managedKeyedStateHandles which ...
[ "Collect", "{", "@link", "KeyGroupsStateHandle", "managedKeyedStateHandles", "}", "which", "have", "intersection", "with", "given", "{", "@link", "KeyGroupRange", "}", "from", "{", "@link", "TaskState", "operatorState", "}" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java#L399-L424
train
Gets the managed keyed state handles.
[ 30522, 2270, 10763, 2862, 1026, 3145, 2098, 9153, 2618, 11774, 2571, 1028, 2131, 24805, 5999, 14839, 2098, 9153, 2618, 11774, 4244, 1006, 9224, 12259, 9224, 12259, 1010, 3145, 17058, 24388, 2063, 4942, 10230, 19658, 3240, 17058, 24388, 2063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/watch/WatchMonitor.java
WatchMonitor.createAll
public static WatchMonitor createAll(Path path, Watcher watcher){ final WatchMonitor watchMonitor = create(path, EVENTS_ALL); watchMonitor.setWatcher(watcher); return watchMonitor; }
java
public static WatchMonitor createAll(Path path, Watcher watcher){ final WatchMonitor watchMonitor = create(path, EVENTS_ALL); watchMonitor.setWatcher(watcher); return watchMonitor; }
[ "public", "static", "WatchMonitor", "createAll", "(", "Path", "path", ",", "Watcher", "watcher", ")", "{", "final", "WatchMonitor", "watchMonitor", "=", "create", "(", "path", ",", "EVENTS_ALL", ")", ";", "watchMonitor", ".", "setWatcher", "(", "watcher", ")",...
创建并初始化监听,监听所有事件 @param path 路径 @param watcher {@link Watcher} @return {@link WatchMonitor}
[ "创建并初始化监听,监听所有事件" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/watch/WatchMonitor.java#L238-L242
train
Creates a new WatchMonitor and sets the given Watcher.
[ 30522, 2270, 10763, 3422, 8202, 15660, 3443, 8095, 1006, 4130, 4130, 1010, 3422, 2121, 3422, 2121, 1007, 1063, 2345, 3422, 8202, 15660, 3422, 8202, 15660, 1027, 3443, 1006, 4130, 30524, 15660, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ModifierUtil.java
ModifierUtil.hasModifier
public static boolean hasModifier(Constructor<?> constructor, ModifierType... modifierTypes) { if (null == constructor || ArrayUtil.isEmpty(modifierTypes)) { return false; } return 0 != (constructor.getModifiers() & modifiersToInt(modifierTypes)); }
java
public static boolean hasModifier(Constructor<?> constructor, ModifierType... modifierTypes) { if (null == constructor || ArrayUtil.isEmpty(modifierTypes)) { return false; } return 0 != (constructor.getModifiers() & modifiersToInt(modifierTypes)); }
[ "public", "static", "boolean", "hasModifier", "(", "Constructor", "<", "?", ">", "constructor", ",", "ModifierType", "...", "modifierTypes", ")", "{", "if", "(", "null", "==", "constructor", "||", "ArrayUtil", ".", "isEmpty", "(", "modifierTypes", ")", ")", ...
是否同时存在一个或多个修饰符(可能有多个修饰符,如果有指定的修饰符则返回true) @param constructor 构造方法 @param modifierTypes 修饰符枚举 @return 是否有指定修饰符,如果有返回true,否则false,如果提供参数为null返回false
[ "是否同时存在一个或多个修饰符(可能有多个修饰符,如果有指定的修饰符则返回true)" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ModifierUtil.java#L88-L93
train
Checks if the given constructor has one of the given modifiers.
[ 30522, 2270, 10763, 22017, 20898, 2038, 5302, 4305, 8873, 2121, 1006, 9570, 2953, 1026, 1029, 1028, 9570, 2953, 1010, 16913, 18095, 13874, 1012, 1012, 1012, 16913, 18095, 13874, 2015, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 9570, 2953, 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...
spring-projects/spring-boot
spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java
Restarter.addUrls
public void addUrls(Collection<URL> urls) { Assert.notNull(urls, "Urls must not be null"); this.urls.addAll(urls); }
java
public void addUrls(Collection<URL> urls) { Assert.notNull(urls, "Urls must not be null"); this.urls.addAll(urls); }
[ "public", "void", "addUrls", "(", "Collection", "<", "URL", ">", "urls", ")", "{", "Assert", ".", "notNull", "(", "urls", ",", "\"Urls must not be null\"", ")", ";", "this", ".", "urls", ".", "addAll", "(", "urls", ")", ";", "}" ]
Add additional URLs to be includes in the next restart. @param urls the urls to add
[ "Add", "additional", "URLs", "to", "be", "includes", "in", "the", "next", "restart", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java#L212-L215
train
Add a collection of URLs to the list of URLs.
[ 30522, 2270, 11675, 5587, 3126, 4877, 1006, 3074, 1026, 24471, 2140, 1028, 24471, 4877, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 24471, 4877, 1010, 1000, 24471, 4877, 2442, 2025, 2022, 19701, 1000, 1007, 1025, 2023, 1012, 24471, 48...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-http/src/main/java/cn/hutool/http/HttpUtil.java
HttpUtil.decodeParams
public static Map<String, List<String>> decodeParams(String paramsStr, String charset) { if (StrUtil.isBlank(paramsStr)) { return Collections.emptyMap(); } // 去掉Path部分 int pathEndPos = paramsStr.indexOf('?'); if (pathEndPos > -1) { paramsStr = StrUtil.subSuf(paramsStr, pathEndPos + 1); } ...
java
public static Map<String, List<String>> decodeParams(String paramsStr, String charset) { if (StrUtil.isBlank(paramsStr)) { return Collections.emptyMap(); } // 去掉Path部分 int pathEndPos = paramsStr.indexOf('?'); if (pathEndPos > -1) { paramsStr = StrUtil.subSuf(paramsStr, pathEndPos + 1); } ...
[ "public", "static", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "decodeParams", "(", "String", "paramsStr", ",", "String", "charset", ")", "{", "if", "(", "StrUtil", ".", "isBlank", "(", "paramsStr", ")", ")", "{", "return", "Collections"...
将URL参数解析为Map(也可以解析Post中的键值对参数) @param paramsStr 参数字符串(或者带参数的Path) @param charset 字符集 @return 参数Map
[ "将URL参数解析为Map(也可以解析Post中的键值对参数)" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpUtil.java#L543-L592
train
Decodes the parameters string.
[ 30522, 2270, 10763, 4949, 1026, 5164, 1010, 2862, 1026, 5164, 1028, 1028, 21933, 3207, 28689, 5244, 1006, 5164, 11498, 5244, 3367, 2099, 1010, 5164, 25869, 13462, 1007, 1063, 2065, 1006, 2358, 22134, 4014, 1012, 2003, 28522, 8950, 1006, 114...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/ssh/JschUtil.java
JschUtil.createSftp
public static Sftp createSftp(String sshHost, int sshPort, String sshUser, String sshPass) { return new Sftp(sshHost, sshPort, sshUser, sshPass); }
java
public static Sftp createSftp(String sshHost, int sshPort, String sshUser, String sshPass) { return new Sftp(sshHost, sshPort, sshUser, sshPass); }
[ "public", "static", "Sftp", "createSftp", "(", "String", "sshHost", ",", "int", "sshPort", ",", "String", "sshUser", ",", "String", "sshPass", ")", "{", "return", "new", "Sftp", "(", "sshHost", ",", "sshPort", ",", "sshUser", ",", "sshPass", ")", ";", "}...
创建Sftp @param sshHost 远程主机 @param sshPort 远程主机端口 @param sshUser 远程主机用户名 @param sshPass 远程主机密码 @return {@link Sftp} @since 4.0.3
[ "创建Sftp" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/ssh/JschUtil.java#L184-L186
train
Creates a new Sftp object.
[ 30522, 2270, 10763, 16420, 25856, 9005, 6199, 2361, 1006, 5164, 7020, 23644, 14122, 1010, 20014, 7020, 22269, 11589, 1010, 5164, 7020, 9825, 2121, 1010, 5164, 7020, 22269, 12054, 1007, 1063, 2709, 2047, 16420, 25856, 1006, 7020, 23644, 14122,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/KinesisDataFetcher.java
KinesisDataFetcher.advanceLastDiscoveredShardOfStream
public void advanceLastDiscoveredShardOfStream(String stream, String shardId) { String lastSeenShardIdOfStream = this.subscribedStreamsToLastDiscoveredShardIds.get(stream); // the update is valid only if the given shard id is greater // than the previous last seen shard id of the stream if (lastSeenShardIdOfSt...
java
public void advanceLastDiscoveredShardOfStream(String stream, String shardId) { String lastSeenShardIdOfStream = this.subscribedStreamsToLastDiscoveredShardIds.get(stream); // the update is valid only if the given shard id is greater // than the previous last seen shard id of the stream if (lastSeenShardIdOfSt...
[ "public", "void", "advanceLastDiscoveredShardOfStream", "(", "String", "stream", ",", "String", "shardId", ")", "{", "String", "lastSeenShardIdOfStream", "=", "this", ".", "subscribedStreamsToLastDiscoveredShardIds", ".", "get", "(", "stream", ")", ";", "// the update i...
Updates the last discovered shard of a subscribed stream; only updates if the update is valid.
[ "Updates", "the", "last", "discovered", "shard", "of", "a", "subscribed", "stream", ";", "only", "updates", "if", "the", "update", "is", "valid", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/KinesisDataFetcher.java#L519-L530
train
Advance the last discovered shard of the given stream.
[ 30522, 2270, 11675, 5083, 8523, 2102, 10521, 3597, 25896, 7377, 20683, 10343, 25379, 1006, 5164, 5460, 1010, 5164, 21146, 17080, 2094, 1007, 1063, 5164, 16180, 12129, 7377, 17080, 3527, 10343, 25379, 1027, 2023, 1012, 4942, 29234, 5104, 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...
netty/netty
common/src/main/java/io/netty/util/internal/PlatformDependent.java
PlatformDependent.hashCodeAscii
public static int hashCodeAscii(CharSequence bytes) { final int length = bytes.length(); final int remainingBytes = length & 7; int hash = HASH_CODE_ASCII_SEED; // Benchmarking shows that by just naively looping for inputs 8~31 bytes long we incur a relatively large // performanc...
java
public static int hashCodeAscii(CharSequence bytes) { final int length = bytes.length(); final int remainingBytes = length & 7; int hash = HASH_CODE_ASCII_SEED; // Benchmarking shows that by just naively looping for inputs 8~31 bytes long we incur a relatively large // performanc...
[ "public", "static", "int", "hashCodeAscii", "(", "CharSequence", "bytes", ")", "{", "final", "int", "length", "=", "bytes", ".", "length", "(", ")", ";", "final", "int", "remainingBytes", "=", "length", "&", "7", ";", "int", "hash", "=", "HASH_CODE_ASCII_S...
Calculate a hash code of a byte array assuming ASCII character encoding. The resulting hash code will be case insensitive. <p> This method assumes that {@code bytes} is equivalent to a {@code byte[]} but just using {@link CharSequence} for storage. The upper most byte of each {@code char} from {@code bytes} is ignored....
[ "Calculate", "a", "hash", "code", "of", "a", "byte", "array", "assuming", "ASCII", "character", "encoding", ".", "The", "resulting", "hash", "code", "will", "be", "case", "insensitive", ".", "<p", ">", "This", "method", "assumes", "that", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/PlatformDependent.java#L767-L805
train
Returns the hash code of the given bytes in ASCII.
[ 30522, 2270, 10763, 20014, 23325, 16044, 3022, 6895, 2072, 1006, 25869, 3366, 4226, 5897, 27507, 1007, 1063, 2345, 20014, 3091, 1027, 27507, 1012, 3091, 1006, 1007, 1025, 2345, 20014, 3588, 3762, 4570, 1027, 3091, 1004, 1021, 1025, 20014, 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...
networknt/light-4j
metrics/src/main/java/io/dropwizard/metrics/Timer.java
Timer.time
public void time(Runnable event) { long startTime = this.clock.getTick(); try { event.run(); } finally { update(this.clock.getTick() - startTime); } }
java
public void time(Runnable event) { long startTime = this.clock.getTick(); try { event.run(); } finally { update(this.clock.getTick() - startTime); } }
[ "public", "void", "time", "(", "Runnable", "event", ")", "{", "long", "startTime", "=", "this", ".", "clock", ".", "getTick", "(", ")", ";", "try", "{", "event", ".", "run", "(", ")", ";", "}", "finally", "{", "update", "(", "this", ".", "clock", ...
Times and records the duration of an event. @param event a {@link Runnable} whose {@link Runnable#run()} method implements a process whose duration should be timed
[ "Times", "and", "records", "the", "duration", "of", "an", "event", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/metrics/src/main/java/io/dropwizard/metrics/Timer.java#L134-L141
train
Time event.
[ 30522, 2270, 11675, 2051, 1006, 2448, 22966, 2724, 1007, 1063, 2146, 2707, 7292, 1027, 2023, 1012, 5119, 1012, 2131, 26348, 1006, 1007, 1025, 3046, 1063, 2724, 1012, 2448, 1006, 1007, 1025, 1065, 2633, 1063, 10651, 1006, 2023, 1012, 5119, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.mkdir
public static File mkdir(String dirPath) { if (dirPath == null) { return null; } final File dir = file(dirPath); return mkdir(dir); }
java
public static File mkdir(String dirPath) { if (dirPath == null) { return null; } final File dir = file(dirPath); return mkdir(dir); }
[ "public", "static", "File", "mkdir", "(", "String", "dirPath", ")", "{", "if", "(", "dirPath", "==", "null", ")", "{", "return", "null", ";", "}", "final", "File", "dir", "=", "file", "(", "dirPath", ")", ";", "return", "mkdir", "(", "dir", ")", ";...
创建文件夹,如果存在直接返回此文件夹<br> 此方法不对File对象类型做判断,如果File不存在,无法判断其类型 @param dirPath 文件夹路径,使用POSIX格式,无论哪个平台 @return 创建的目录
[ "创建文件夹,如果存在直接返回此文件夹<br", ">", "此方法不对File对象类型做判断,如果File不存在,无法判断其类型" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L836-L842
train
Creates a directory with the specified path.
[ 30522, 2270, 10763, 5371, 12395, 4305, 2099, 1006, 5164, 16101, 15069, 1007, 1063, 2065, 1006, 16101, 15069, 1027, 1027, 19701, 1007, 1063, 2709, 19701, 1025, 1065, 2345, 5371, 16101, 1027, 5371, 1006, 16101, 15069, 1007, 1025, 2709, 12395, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/LexerEngine.java
LexerEngine.accept
public void accept(final TokenType tokenType) { if (lexer.getCurrentToken().getType() != tokenType) { throw new SQLParsingException(lexer, tokenType); } lexer.nextToken(); }
java
public void accept(final TokenType tokenType) { if (lexer.getCurrentToken().getType() != tokenType) { throw new SQLParsingException(lexer, tokenType); } lexer.nextToken(); }
[ "public", "void", "accept", "(", "final", "TokenType", "tokenType", ")", "{", "if", "(", "lexer", ".", "getCurrentToken", "(", ")", ".", "getType", "(", ")", "!=", "tokenType", ")", "{", "throw", "new", "SQLParsingException", "(", "lexer", ",", "tokenType"...
Assert current token type should equals input token and go to next token type. @param tokenType token type
[ "Assert", "current", "token", "type", "should", "equals", "input", "token", "and", "go", "to", "next", "token", "type", "." ]
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/LexerEngine.java#L120-L125
train
Accept a token.
[ 30522, 2270, 11675, 5138, 1006, 2345, 19204, 13874, 19204, 13874, 1007, 1063, 2065, 1006, 17244, 2121, 1012, 2131, 10841, 14343, 3372, 18715, 2368, 1006, 1007, 1012, 2131, 13874, 1006, 1007, 999, 1027, 19204, 13874, 1007, 1063, 5466, 2047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-shardingsphere
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/state/node/StateNode.java
StateNode.getInstancesNodeFullPath
public String getInstancesNodeFullPath(final String instanceId) { return Joiner.on("/").join("", name, ROOT, INSTANCES_NODE_PATH, instanceId); }
java
public String getInstancesNodeFullPath(final String instanceId) { return Joiner.on("/").join("", name, ROOT, INSTANCES_NODE_PATH, instanceId); }
[ "public", "String", "getInstancesNodeFullPath", "(", "final", "String", "instanceId", ")", "{", "return", "Joiner", ".", "on", "(", "\"/\"", ")", ".", "join", "(", "\"\"", ",", "name", ",", "ROOT", ",", "INSTANCES_NODE_PATH", ",", "instanceId", ")", ";", "...
Get instance node full path. @param instanceId instance id @return instance node full path
[ "Get", "instance", "node", "full", "path", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/state/node/StateNode.java#L46-L48
train
Gets the full path of the instances node.
[ 30522, 2270, 5164, 2131, 7076, 26897, 2015, 3630, 3207, 3993, 14277, 8988, 1006, 2345, 5164, 6013, 3593, 1007, 1063, 2709, 3693, 2121, 1012, 2006, 1006, 1000, 1013, 1000, 1007, 1012, 3693, 1006, 1000, 1000, 1010, 2171, 1010, 7117, 1010, 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/spark
common/unsafe/src/main/java/org/apache/spark/unsafe/types/CalendarInterval.java
CalendarInterval.fromYearMonthString
public static CalendarInterval fromYearMonthString(String s) throws IllegalArgumentException { CalendarInterval result = null; if (s == null) { throw new IllegalArgumentException("Interval year-month string was null"); } s = s.trim(); Matcher m = yearMonthPattern.matcher(s); if (!m.matches...
java
public static CalendarInterval fromYearMonthString(String s) throws IllegalArgumentException { CalendarInterval result = null; if (s == null) { throw new IllegalArgumentException("Interval year-month string was null"); } s = s.trim(); Matcher m = yearMonthPattern.matcher(s); if (!m.matches...
[ "public", "static", "CalendarInterval", "fromYearMonthString", "(", "String", "s", ")", "throws", "IllegalArgumentException", "{", "CalendarInterval", "result", "=", "null", ";", "if", "(", "s", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "...
Parse YearMonth string in form: [-]YYYY-MM adapted from HiveIntervalYearMonth.valueOf
[ "Parse", "YearMonth", "string", "in", "form", ":", "[", "-", "]", "YYYY", "-", "MM" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/unsafe/src/main/java/org/apache/spark/unsafe/types/CalendarInterval.java#L108-L130
train
Create an interval from a year - month string.
[ 30522, 2270, 10763, 8094, 18447, 2121, 10175, 2013, 29100, 9629, 7898, 18886, 3070, 1006, 5164, 1055, 1007, 11618, 6206, 2906, 22850, 15781, 2595, 24422, 1063, 8094, 18447, 2121, 10175, 2765, 1027, 19701, 1025, 2065, 1006, 1055, 1027, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/operators/TwoInputUdfOperator.java
TwoInputUdfOperator.returns
public O returns(TypeInformation<OUT> typeInfo) { requireNonNull(typeInfo, "TypeInformation must not be null"); fillInType(typeInfo); @SuppressWarnings("unchecked") O returnType = (O) this; return returnType; }
java
public O returns(TypeInformation<OUT> typeInfo) { requireNonNull(typeInfo, "TypeInformation must not be null"); fillInType(typeInfo); @SuppressWarnings("unchecked") O returnType = (O) this; return returnType; }
[ "public", "O", "returns", "(", "TypeInformation", "<", "OUT", ">", "typeInfo", ")", "{", "requireNonNull", "(", "typeInfo", ",", "\"TypeInformation must not be null\"", ")", ";", "fillInType", "(", "typeInfo", ")", ";", "@", "SuppressWarnings", "(", "\"unchecked\"...
Adds a type information hint about the return type of this operator. This method can be used in cases where Flink cannot determine automatically what the produced type of a function is. That can be the case if the function uses generic type variables in the return type that cannot be inferred from the input type. <p>I...
[ "Adds", "a", "type", "information", "hint", "about", "the", "return", "type", "of", "this", "operator", ".", "This", "method", "can", "be", "used", "in", "cases", "where", "Flink", "cannot", "determine", "automatically", "what", "the", "produced", "type", "o...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/TwoInputUdfOperator.java#L321-L328
train
Returns an object of the specified type.
[ 30522, 2270, 1051, 5651, 1006, 2828, 2378, 14192, 3370, 1026, 2041, 1028, 2828, 2378, 14876, 1007, 1063, 5478, 8540, 11231, 3363, 1006, 2828, 2378, 14876, 1010, 1000, 2828, 2378, 14192, 3370, 2442, 2025, 2022, 19701, 1000, 1007, 1025, 6039,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopFileSystem.java
HadoopFileSystem.toHadoopPath
public static org.apache.hadoop.fs.Path toHadoopPath(Path path) { return new org.apache.hadoop.fs.Path(path.toUri()); }
java
public static org.apache.hadoop.fs.Path toHadoopPath(Path path) { return new org.apache.hadoop.fs.Path(path.toUri()); }
[ "public", "static", "org", ".", "apache", ".", "hadoop", ".", "fs", ".", "Path", "toHadoopPath", "(", "Path", "path", ")", "{", "return", "new", "org", ".", "apache", ".", "hadoop", ".", "fs", ".", "Path", "(", "path", ".", "toUri", "(", ")", ")", ...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopFileSystem.java#L209-L211
train
Converts a Hadoop Path to a Hadoop Path.
[ 30522, 2270, 10763, 8917, 1012, 15895, 1012, 2018, 18589, 1012, 1042, 2015, 1012, 4130, 2000, 16102, 18589, 15069, 1006, 4130, 4130, 1007, 1063, 2709, 2047, 8917, 1012, 15895, 1012, 2018, 18589, 1012, 1042, 2015, 1012, 4130, 1006, 4130, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.writeLines
public static <T> File writeLines(Collection<T> list, File file, String charset, boolean isAppend) throws IORuntimeException { return FileWriter.create(file, CharsetUtil.charset(charset)).writeLines(list, isAppend); }
java
public static <T> File writeLines(Collection<T> list, File file, String charset, boolean isAppend) throws IORuntimeException { return FileWriter.create(file, CharsetUtil.charset(charset)).writeLines(list, isAppend); }
[ "public", "static", "<", "T", ">", "File", "writeLines", "(", "Collection", "<", "T", ">", "list", ",", "File", "file", ",", "String", "charset", ",", "boolean", "isAppend", ")", "throws", "IORuntimeException", "{", "return", "FileWriter", ".", "create", "...
将列表写入文件 @param <T> 集合元素类型 @param list 列表 @param file 文件 @param charset 字符集 @param isAppend 是否追加 @return 目标文件 @throws IORuntimeException IO异常
[ "将列表写入文件" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L3056-L3058
train
Write lines to a file.
[ 30522, 2270, 10763, 1026, 1056, 1028, 5371, 4339, 12735, 1006, 3074, 1026, 1056, 1028, 2862, 1010, 5371, 5371, 1010, 5164, 25869, 13462, 1010, 22017, 20898, 18061, 21512, 4859, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 2709, 5371, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.isAssignable
public static boolean isAssignable(Class<?> targetType, Class<?> sourceType) { if (null == targetType || null == sourceType) { return false; } // 对象类型 if (targetType.isAssignableFrom(sourceType)) { return true; } // 基本类型 if (targetType.isPrimitive()) { // 原始类型 Class<?> resolvedP...
java
public static boolean isAssignable(Class<?> targetType, Class<?> sourceType) { if (null == targetType || null == sourceType) { return false; } // 对象类型 if (targetType.isAssignableFrom(sourceType)) { return true; } // 基本类型 if (targetType.isPrimitive()) { // 原始类型 Class<?> resolvedP...
[ "public", "static", "boolean", "isAssignable", "(", "Class", "<", "?", ">", "targetType", ",", "Class", "<", "?", ">", "sourceType", ")", "{", "if", "(", "null", "==", "targetType", "||", "null", "==", "sourceType", ")", "{", "return", "false", ";", "}...
检查目标类是否可以从原类转化<br> 转化包括:<br> 1、原类是对象,目标类型是原类型实现的接口<br> 2、目标类型是原类型的父类<br> 3、两者是原始类型或者包装类型(相互转换) @param targetType 目标类型 @param sourceType 原类型 @return 是否可转化
[ "检查目标类是否可以从原类转化<br", ">", "转化包括:<br", ">", "1、原类是对象,目标类型是原类型实现的接口<br", ">", "2、目标类型是原类型的父类<br", ">", "3、两者是原始类型或者包装类型(相互转换)" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ClassUtil.java#L770-L795
train
Checks if the targetType is assignable from the sourceType.
[ 30522, 2270, 10763, 22017, 20898, 18061, 18719, 16989, 3468, 1006, 2465, 1026, 1029, 1028, 4539, 13874, 1010, 2465, 1026, 1029, 1028, 3120, 13874, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 4539, 13874, 1064, 1064, 19701, 1027, 1027, 3120, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/AbstractCommandBuilder.java
AbstractCommandBuilder.addToClassPath
private void addToClassPath(Set<String> cp, String entries) { if (isEmpty(entries)) { return; } String[] split = entries.split(Pattern.quote(File.pathSeparator)); for (String entry : split) { if (!isEmpty(entry)) { if (new File(entry).isDirectory() && !entry.endsWith(File.separator))...
java
private void addToClassPath(Set<String> cp, String entries) { if (isEmpty(entries)) { return; } String[] split = entries.split(Pattern.quote(File.pathSeparator)); for (String entry : split) { if (!isEmpty(entry)) { if (new File(entry).isDirectory() && !entry.endsWith(File.separator))...
[ "private", "void", "addToClassPath", "(", "Set", "<", "String", ">", "cp", ",", "String", "entries", ")", "{", "if", "(", "isEmpty", "(", "entries", ")", ")", "{", "return", ";", "}", "String", "[", "]", "split", "=", "entries", ".", "split", "(", ...
Adds entries to the classpath. @param cp List to which the new entries are appended. @param entries New classpath entries (separated by File.pathSeparator).
[ "Adds", "entries", "to", "the", "classpath", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/launcher/src/main/java/org/apache/spark/launcher/AbstractCommandBuilder.java#L217-L230
train
Add the entries to the classpath.
[ 30522, 2797, 11675, 5587, 3406, 26266, 15069, 1006, 2275, 1026, 5164, 1028, 18133, 1010, 5164, 10445, 1007, 1063, 2065, 1006, 2003, 6633, 13876, 2100, 1006, 10445, 1007, 1007, 1063, 2709, 1025, 1065, 5164, 1031, 1033, 3975, 1027, 10445, 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...
looly/hutool
hutool-json/src/main/java/cn/hutool/json/JSONUtil.java
JSONUtil.toBean
public static <T> T toBean(String jsonString, Type beanType, boolean ignoreError) { return toBean(parseObj(jsonString), beanType, ignoreError); }
java
public static <T> T toBean(String jsonString, Type beanType, boolean ignoreError) { return toBean(parseObj(jsonString), beanType, ignoreError); }
[ "public", "static", "<", "T", ">", "T", "toBean", "(", "String", "jsonString", ",", "Type", "beanType", ",", "boolean", "ignoreError", ")", "{", "return", "toBean", "(", "parseObj", "(", "jsonString", ")", ",", "beanType", ",", "ignoreError", ")", ";", "...
JSON字符串转为实体类对象,转换异常将被抛出 @param <T> Bean类型 @param jsonString JSON字符串 @param beanType 实体类对象类型 @return 实体类对象 @since 4.3.2
[ "JSON字符串转为实体类对象,转换异常将被抛出" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/JSONUtil.java#L355-L357
train
Converts a JSON string to a Java Bean.
[ 30522, 2270, 10763, 1026, 1056, 1028, 1056, 2000, 4783, 2319, 1006, 5164, 1046, 23345, 18886, 3070, 1010, 2828, 14068, 13874, 1010, 22017, 20898, 8568, 2121, 29165, 1007, 1063, 2709, 2000, 4783, 2319, 1006, 11968, 3366, 16429, 3501, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/digest/HMac.java
HMac.init
public HMac init(String algorithm, SecretKey key){ try { mac = Mac.getInstance(algorithm); if(null != key){ this.secretKey = key; }else{ this.secretKey = SecureUtil.generateKey(algorithm); } mac.init(this.secretKey); } catch (Exception e) { throw new CryptoException(e); } r...
java
public HMac init(String algorithm, SecretKey key){ try { mac = Mac.getInstance(algorithm); if(null != key){ this.secretKey = key; }else{ this.secretKey = SecureUtil.generateKey(algorithm); } mac.init(this.secretKey); } catch (Exception e) { throw new CryptoException(e); } r...
[ "public", "HMac", "init", "(", "String", "algorithm", ",", "SecretKey", "key", ")", "{", "try", "{", "mac", "=", "Mac", ".", "getInstance", "(", "algorithm", ")", ";", "if", "(", "null", "!=", "key", ")", "{", "this", ".", "secretKey", "=", "key", ...
初始化 @param algorithm 算法 @param key 密钥 {@link SecretKey} @return {@link HMac} @throws CryptoException Cause by IOException
[ "初始化" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/digest/HMac.java#L80-L93
train
Initializes the HMac object with the given algorithm and secret key.
[ 30522, 2270, 20287, 6305, 1999, 4183, 1006, 5164, 9896, 1010, 3595, 14839, 3145, 1007, 1063, 3046, 1063, 6097, 1027, 6097, 1012, 2131, 7076, 26897, 1006, 9896, 1007, 1025, 2065, 1006, 19701, 999, 1027, 3145, 1007, 1063, 2023, 1012, 3595, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.setJobManagerAddressInConfig
static void setJobManagerAddressInConfig(Configuration config, InetSocketAddress address) { config.setString(JobManagerOptions.ADDRESS, address.getHostString()); config.setInteger(JobManagerOptions.PORT, address.getPort()); config.setString(RestOptions.ADDRESS, address.getHostString()); config.setInteger(RestOp...
java
static void setJobManagerAddressInConfig(Configuration config, InetSocketAddress address) { config.setString(JobManagerOptions.ADDRESS, address.getHostString()); config.setInteger(JobManagerOptions.PORT, address.getPort()); config.setString(RestOptions.ADDRESS, address.getHostString()); config.setInteger(RestOp...
[ "static", "void", "setJobManagerAddressInConfig", "(", "Configuration", "config", ",", "InetSocketAddress", "address", ")", "{", "config", ".", "setString", "(", "JobManagerOptions", ".", "ADDRESS", ",", "address", ".", "getHostString", "(", ")", ")", ";", "config...
Writes the given job manager address to the associated configuration object. @param address Address to write to the configuration @param config The configuration to write to
[ "Writes", "the", "given", "job", "manager", "address", "to", "the", "associated", "configuration", "object", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L1103-L1108
train
Sets the job manager address in the configuration.
[ 30522, 10763, 11675, 2275, 5558, 25526, 5162, 4590, 4215, 16200, 18719, 15305, 2078, 8873, 2290, 1006, 9563, 9530, 8873, 2290, 1010, 1999, 8454, 7432, 12928, 14141, 8303, 4769, 1007, 1063, 9530, 8873, 2290, 1012, 4520, 18886, 3070, 1006, 31...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-db/src/main/java/cn/hutool/db/AbstractDb.java
AbstractDb.execute
public int execute(String sql, Object... params) throws SQLException { Connection conn = null; try { conn = this.getConnection(); return SqlExecutor.execute(conn, sql, params); } catch (SQLException e) { throw e; } finally { this.closeConnection(conn); } }
java
public int execute(String sql, Object... params) throws SQLException { Connection conn = null; try { conn = this.getConnection(); return SqlExecutor.execute(conn, sql, params); } catch (SQLException e) { throw e; } finally { this.closeConnection(conn); } }
[ "public", "int", "execute", "(", "String", "sql", ",", "Object", "...", "params", ")", "throws", "SQLException", "{", "Connection", "conn", "=", "null", ";", "try", "{", "conn", "=", "this", ".", "getConnection", "(", ")", ";", "return", "SqlExecutor", "...
执行非查询语句<br> 语句包括 插入、更新、删除 @param sql SQL @param params 参数 @return 影响行数 @throws SQLException SQL执行异常
[ "执行非查询语句<br", ">", "语句包括", "插入、更新、删除" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/AbstractDb.java#L165-L175
train
Executes a SELECT statement with the specified parameters.
[ 30522, 2270, 20014, 15389, 1006, 5164, 29296, 1010, 4874, 1012, 1012, 1012, 11498, 5244, 1007, 11618, 29296, 10288, 24422, 1063, 4434, 9530, 2078, 1027, 19701, 1025, 3046, 1063, 9530, 2078, 1027, 2023, 1012, 2131, 8663, 2638, 7542, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
store/src/main/java/com/alibaba/otter/canal/store/memory/MemoryEventStoreWithBuffer.java
MemoryEventStoreWithBuffer.checkUnGetSlotAt
private boolean checkUnGetSlotAt(LogPosition startPosition, int batchSize) { if (batchMode.isItemSize()) { long current = getSequence.get(); long maxAbleSequence = putSequence.get(); long next = current; if (startPosition == null || !startPosition.getPostion().isI...
java
private boolean checkUnGetSlotAt(LogPosition startPosition, int batchSize) { if (batchMode.isItemSize()) { long current = getSequence.get(); long maxAbleSequence = putSequence.get(); long next = current; if (startPosition == null || !startPosition.getPostion().isI...
[ "private", "boolean", "checkUnGetSlotAt", "(", "LogPosition", "startPosition", ",", "int", "batchSize", ")", "{", "if", "(", "batchMode", ".", "isItemSize", "(", ")", ")", "{", "long", "current", "=", "getSequence", ".", "get", "(", ")", ";", "long", "maxA...
检查是否存在需要get的数据,并且数量>=batchSize
[ "检查是否存在需要get的数据", "并且数量", ">", "=", "batchSize" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/store/src/main/java/com/alibaba/otter/canal/store/memory/MemoryEventStoreWithBuffer.java#L530-L555
train
checkUnGetSlotAt - Check if unget slot at.
[ 30522, 2797, 22017, 20898, 4638, 5575, 8454, 10994, 4017, 1006, 8833, 26994, 2707, 26994, 1010, 20014, 14108, 5332, 4371, 1007, 1063, 2065, 1006, 14108, 5302, 3207, 1012, 2003, 4221, 5244, 4697, 1006, 1007, 1007, 1063, 2146, 2783, 1027, 415...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-cron/src/main/java/cn/hutool/cron/CronUtil.java
CronUtil.setCronSetting
public static void setCronSetting(String cronSettingPath) { try { crontabSetting = new Setting(cronSettingPath, Setting.DEFAULT_CHARSET, false); } catch (SettingRuntimeException | NoResourceException e) { // ignore setting file parse error and no config error } }
java
public static void setCronSetting(String cronSettingPath) { try { crontabSetting = new Setting(cronSettingPath, Setting.DEFAULT_CHARSET, false); } catch (SettingRuntimeException | NoResourceException e) { // ignore setting file parse error and no config error } }
[ "public", "static", "void", "setCronSetting", "(", "String", "cronSettingPath", ")", "{", "try", "{", "crontabSetting", "=", "new", "Setting", "(", "cronSettingPath", ",", "Setting", ".", "DEFAULT_CHARSET", ",", "false", ")", ";", "}", "catch", "(", "SettingRu...
自定义定时任务配置文件路径 @param cronSettingPath 定时任务配置文件路径(相对绝对都可)
[ "自定义定时任务配置文件路径" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-cron/src/main/java/cn/hutool/cron/CronUtil.java#L45-L51
train
Set the Cron Setting
[ 30522, 2270, 10763, 11675, 2275, 26775, 5644, 18319, 3070, 1006, 5164, 13675, 5644, 18319, 3070, 15069, 1007, 1063, 3046, 1063, 13675, 12162, 7875, 21678, 2075, 1027, 2047, 4292, 1006, 13675, 5644, 18319, 3070, 15069, 1010, 4292, 1012, 12398,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/antlr/filler/common/dml/PredicateUtils.java
PredicateUtils.createCompareCondition
public static Optional<Condition> createCompareCondition(final PredicateCompareRightValue compareRightValue, final Column column) { return compareRightValue.getExpression() instanceof SimpleExpressionSegment ? Optional.of(new Condition(column, ((SimpleExpressionSegment) compareRightValue.getExpr...
java
public static Optional<Condition> createCompareCondition(final PredicateCompareRightValue compareRightValue, final Column column) { return compareRightValue.getExpression() instanceof SimpleExpressionSegment ? Optional.of(new Condition(column, ((SimpleExpressionSegment) compareRightValue.getExpr...
[ "public", "static", "Optional", "<", "Condition", ">", "createCompareCondition", "(", "final", "PredicateCompareRightValue", "compareRightValue", ",", "final", "Column", "column", ")", "{", "return", "compareRightValue", ".", "getExpression", "(", ")", "instanceof", "...
Create condition of compare operator. @param compareRightValue right value of compare operator @param column column @return condition
[ "Create", "condition", "of", "compare", "operator", "." ]
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/antlr/filler/common/dml/PredicateUtils.java#L100-L103
train
Create compare condition optional.
[ 30522, 2270, 10763, 11887, 1026, 4650, 1028, 3443, 9006, 19362, 8586, 15422, 22753, 1006, 2345, 3653, 16467, 9006, 19362, 11124, 13900, 10175, 5657, 12826, 15950, 10175, 5657, 1010, 2345, 5930, 5930, 1007, 1063, 2709, 12826, 15950, 10175, 565...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/taskmanager/NetworkEnvironmentConfiguration.java
NetworkEnvironmentConfiguration.calculateNetworkBufferMemory
@SuppressWarnings("deprecation") public static long calculateNetworkBufferMemory(long totalJavaMemorySize, Configuration config) { final int segmentSize = getPageSize(config); final long networkBufBytes; if (hasNewNetworkConfig(config)) { float networkBufFraction = config.getFloat(TaskManagerOptions.NETWORK_...
java
@SuppressWarnings("deprecation") public static long calculateNetworkBufferMemory(long totalJavaMemorySize, Configuration config) { final int segmentSize = getPageSize(config); final long networkBufBytes; if (hasNewNetworkConfig(config)) { float networkBufFraction = config.getFloat(TaskManagerOptions.NETWORK_...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "static", "long", "calculateNetworkBufferMemory", "(", "long", "totalJavaMemorySize", ",", "Configuration", "config", ")", "{", "final", "int", "segmentSize", "=", "getPageSize", "(", "config", ")", ";"...
Calculates the amount of memory used for network buffers based on the total memory to use and the according configuration parameters. <p>The following configuration parameters are involved: <ul> <li>{@link TaskManagerOptions#NETWORK_BUFFERS_MEMORY_FRACTION},</li> <li>{@link TaskManagerOptions#NETWORK_BUFFERS_MEMORY_MI...
[ "Calculates", "the", "amount", "of", "memory", "used", "for", "network", "buffers", "based", "on", "the", "total", "memory", "to", "use", "and", "the", "according", "configuration", "parameters", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/NetworkEnvironmentConfiguration.java#L236-L259
train
Calculate the network buffer memory size.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 2139, 28139, 10719, 1000, 1007, 2270, 10763, 2146, 18422, 7159, 6198, 8569, 12494, 4168, 5302, 2854, 1006, 2146, 2561, 3900, 3567, 4168, 5302, 24769, 4697, 1010, 9563, 9530, 8873, 2290, 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-poi/src/main/java/cn/hutool/poi/excel/cell/CellUtil.java
CellUtil.getNumericValue
private static Object getNumericValue(Cell cell) { final double value = cell.getNumericCellValue(); final CellStyle style = cell.getCellStyle(); if (null == style) { return value; } final short formatIndex = style.getDataFormat(); // 判断是否为日期 if (isDateType(cell, formatIndex)) { return D...
java
private static Object getNumericValue(Cell cell) { final double value = cell.getNumericCellValue(); final CellStyle style = cell.getCellStyle(); if (null == style) { return value; } final short formatIndex = style.getDataFormat(); // 判断是否为日期 if (isDateType(cell, formatIndex)) { return D...
[ "private", "static", "Object", "getNumericValue", "(", "Cell", "cell", ")", "{", "final", "double", "value", "=", "cell", ".", "getNumericCellValue", "(", ")", ";", "final", "CellStyle", "style", "=", "cell", ".", "getCellStyle", "(", ")", ";", "if", "(", ...
获取数字类型的单元格值 @param cell 单元格 @return 单元格值,可能为Long、Double、Date
[ "获取数字类型的单元格值" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/cell/CellUtil.java#L228-L252
train
Gets the numeric value from the cell.
[ 30522, 2797, 10763, 4874, 2131, 19172, 22420, 10175, 5657, 1006, 3526, 3526, 1007, 1063, 2345, 3313, 3643, 1027, 3526, 1012, 2131, 19172, 22420, 29109, 22144, 7630, 2063, 1006, 1007, 1025, 2345, 4442, 27983, 2806, 1027, 3526, 1012, 2131, 29...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Dict.java
Dict.toBean
public <T> T toBean(T bean, boolean isToCamelCase) { BeanUtil.fillBeanWithMap(this, bean, isToCamelCase, false); return bean; }
java
public <T> T toBean(T bean, boolean isToCamelCase) { BeanUtil.fillBeanWithMap(this, bean, isToCamelCase, false); return bean; }
[ "public", "<", "T", ">", "T", "toBean", "(", "T", "bean", ",", "boolean", "isToCamelCase", ")", "{", "BeanUtil", ".", "fillBeanWithMap", "(", "this", ",", "bean", ",", "isToCamelCase", ",", "false", ")", ";", "return", "bean", ";", "}" ]
转换为Bean对象 @param <T> Bean类型 @param bean Bean @param isToCamelCase 是否转换为驼峰模式 @return Bean
[ "转换为Bean对象" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Dict.java#L118-L121
train
Converts this object to a bean.
[ 30522, 2270, 1026, 1056, 1028, 1056, 2000, 4783, 2319, 1006, 1056, 14068, 1010, 22017, 20898, 21541, 24755, 10199, 18382, 1007, 1063, 14068, 21823, 2140, 1012, 6039, 4783, 2319, 24415, 2863, 2361, 1006, 2023, 1010, 14068, 1010, 21541, 24755, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONTokener.java
JSONTokener.skipToEndOfLine
private void skipToEndOfLine() { for (; this.pos < this.in.length(); this.pos++) { char c = this.in.charAt(this.pos); if (c == '\r' || c == '\n') { this.pos++; break; } } }
java
private void skipToEndOfLine() { for (; this.pos < this.in.length(); this.pos++) { char c = this.in.charAt(this.pos); if (c == '\r' || c == '\n') { this.pos++; break; } } }
[ "private", "void", "skipToEndOfLine", "(", ")", "{", "for", "(", ";", "this", ".", "pos", "<", "this", ".", "in", ".", "length", "(", ")", ";", "this", ".", "pos", "++", ")", "{", "char", "c", "=", "this", ".", "in", ".", "charAt", "(", "this",...
Advances the position until after the next newline character. If the line is terminated by "\r\n", the '\n' must be consumed as whitespace by the caller.
[ "Advances", "the", "position", "until", "after", "the", "next", "newline", "character", ".", "If", "the", "line", "is", "terminated", "by", "\\", "r", "\\", "n", "the", "\\", "n", "must", "be", "consumed", "as", "whitespace", "by", "the", "caller", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONTokener.java#L171-L179
train
Skip to the end of line.
[ 30522, 2797, 11675, 13558, 3406, 10497, 11253, 4179, 1006, 1007, 1063, 2005, 1006, 1025, 2023, 1012, 13433, 2015, 1026, 2023, 1012, 1999, 1012, 3091, 1006, 1007, 1025, 2023, 1012, 13433, 2015, 1009, 1009, 1007, 1063, 25869, 1039, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/ClassScaner.java
ClassScaner.subPathBeforePackage
private String subPathBeforePackage(File file) { String filePath = file.getAbsolutePath(); if (StrUtil.isNotEmpty(this.packageDirName)) { filePath = StrUtil.subBefore(filePath, this.packageDirName, true); } return StrUtil.addSuffixIfNot(filePath, File.separator); }
java
private String subPathBeforePackage(File file) { String filePath = file.getAbsolutePath(); if (StrUtil.isNotEmpty(this.packageDirName)) { filePath = StrUtil.subBefore(filePath, this.packageDirName, true); } return StrUtil.addSuffixIfNot(filePath, File.separator); }
[ "private", "String", "subPathBeforePackage", "(", "File", "file", ")", "{", "String", "filePath", "=", "file", ".", "getAbsolutePath", "(", ")", ";", "if", "(", "StrUtil", ".", "isNotEmpty", "(", "this", ".", "packageDirName", ")", ")", "{", "filePath", "=...
截取文件绝对路径中包名之前的部分 @param file 文件 @return 包名之前的部分
[ "截取文件绝对路径中包名之前的部分" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/ClassScaner.java#L324-L330
train
Subpath before package name.
[ 30522, 2797, 5164, 4942, 15069, 4783, 29278, 13699, 8684, 4270, 1006, 5371, 5371, 1007, 1063, 5164, 5371, 15069, 1027, 5371, 1012, 2131, 7875, 19454, 10421, 15069, 1006, 1007, 1025, 2065, 1006, 2358, 22134, 4014, 1012, 3475, 12184, 27718, 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...
netty/netty
codec-dns/src/main/java/io/netty/handler/codec/dns/DnsResponseCode.java
DnsResponseCode.valueOf
public static DnsResponseCode valueOf(int responseCode) { switch (responseCode) { case 0: return NOERROR; case 1: return FORMERR; case 2: return SERVFAIL; case 3: return NXDOMAIN; case 4: return NOTIMP; c...
java
public static DnsResponseCode valueOf(int responseCode) { switch (responseCode) { case 0: return NOERROR; case 1: return FORMERR; case 2: return SERVFAIL; case 3: return NXDOMAIN; case 4: return NOTIMP; c...
[ "public", "static", "DnsResponseCode", "valueOf", "(", "int", "responseCode", ")", "{", "switch", "(", "responseCode", ")", "{", "case", "0", ":", "return", "NOERROR", ";", "case", "1", ":", "return", "FORMERR", ";", "case", "2", ":", "return", "SERVFAIL",...
Returns the {@link DnsResponseCode} that corresponds with the given {@code responseCode}. @param responseCode the DNS RCODE @return the corresponding {@link DnsResponseCode}
[ "Returns", "the", "{", "@link", "DnsResponseCode", "}", "that", "corresponds", "with", "the", "given", "{", "@code", "responseCode", "}", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-dns/src/main/java/io/netty/handler/codec/dns/DnsResponseCode.java#L121-L160
train
Gets the DnsResponseCode object from the response code.
[ 30522, 2270, 10763, 1040, 3619, 6072, 26029, 3366, 16044, 3643, 11253, 1006, 20014, 3433, 16044, 1007, 1063, 6942, 1006, 3433, 16044, 1007, 1063, 2553, 1014, 1024, 2709, 2053, 2121, 29165, 1025, 2553, 1015, 1024, 2709, 2280, 2099, 1025, 255...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TGetFunctionsReq.java
TGetFunctionsReq.isSet
public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SESSION_HANDLE: return isSetSessionHandle(); case CATALOG_NAME: return isSetCatalogName(); case SCHEMA_NAME: return isSetSchemaName(); case FUNCTI...
java
public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SESSION_HANDLE: return isSetSessionHandle(); case CATALOG_NAME: return isSetCatalogName(); case SCHEMA_NAME: return isSetSchemaName(); case FUNCTI...
[ "public", "boolean", "isSet", "(", "_Fields", "field", ")", "{", "if", "(", "field", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "switch", "(", "field", ")", "{", "case", "SESSION_HANDLE", ":", "return", "isSet...
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
[ "Returns", "true", "if", "field", "corresponding", "to", "fieldID", "is", "set", "(", "has", "been", "assigned", "a", "value", ")", "and", "false", "otherwise" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TGetFunctionsReq.java#L327-L343
train
Checks if the specified field is set to a value of a CRA_ object.
[ 30522, 2270, 22017, 20898, 26354, 3388, 1006, 1035, 4249, 2492, 1007, 1063, 2065, 1006, 2492, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 6206, 2906, 22850, 15781, 2595, 24422, 1006, 1007, 1025, 1065, 6942, 1006, 2492, 1007, 1063, 2553, 5219...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/type/InternalTypeUtils.java
InternalTypeUtils.shouldAutoCastTo
public static boolean shouldAutoCastTo(PrimitiveType from, PrimitiveType to) { InternalType[] castTypes = POSSIBLE_CAST_MAP.get(from); if (castTypes != null) { for (InternalType type : POSSIBLE_CAST_MAP.get(from)) { if (type.equals(to)) { return true; } } } return false; }
java
public static boolean shouldAutoCastTo(PrimitiveType from, PrimitiveType to) { InternalType[] castTypes = POSSIBLE_CAST_MAP.get(from); if (castTypes != null) { for (InternalType type : POSSIBLE_CAST_MAP.get(from)) { if (type.equals(to)) { return true; } } } return false; }
[ "public", "static", "boolean", "shouldAutoCastTo", "(", "PrimitiveType", "from", ",", "PrimitiveType", "to", ")", "{", "InternalType", "[", "]", "castTypes", "=", "POSSIBLE_CAST_MAP", ".", "get", "(", "from", ")", ";", "if", "(", "castTypes", "!=", "null", "...
Returns whether this type should be automatically casted to the target type in an arithmetic operation.
[ "Returns", "whether", "this", "type", "should", "be", "automatically", "casted", "to", "the", "target", "type", "in", "an", "arithmetic", "operation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/type/InternalTypeUtils.java#L81-L91
train
Returns true if the given primitive type should be auto - cast to the given primitive type.
[ 30522, 2270, 10763, 22017, 20898, 2323, 4887, 3406, 10526, 3406, 1006, 10968, 13874, 2013, 1010, 10968, 13874, 2000, 1007, 1063, 4722, 13874, 1031, 1033, 3459, 13874, 2015, 1027, 2825, 1035, 3459, 1035, 4949, 1012, 2131, 1006, 2013, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java
DateUtil.ceiling
public static DateTime ceiling(Date date, DateField dateField) { return new DateTime(ceiling(calendar(date), dateField)); }
java
public static DateTime ceiling(Date date, DateField dateField) { return new DateTime(ceiling(calendar(date), dateField)); }
[ "public", "static", "DateTime", "ceiling", "(", "Date", "date", ",", "DateField", "dateField", ")", "{", "return", "new", "DateTime", "(", "ceiling", "(", "calendar", "(", "date", ")", ",", "dateField", ")", ")", ";", "}" ]
修改日期为某个时间字段结束时间 @param date {@link Date} @param dateField 时间字段 @return {@link DateTime} @since 4.5.7
[ "修改日期为某个时间字段结束时间" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L803-L805
train
Returns a new DateTime object representing the ceiling of the specified date field.
[ 30522, 2270, 10763, 3058, 7292, 5894, 1006, 3058, 3058, 1010, 3058, 3790, 3058, 3790, 1007, 1063, 2709, 2047, 3058, 7292, 1006, 5894, 1006, 8094, 1006, 3058, 1007, 1010, 3058, 3790, 1007, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java
Configuration.getTrimmedStrings
public String[] getTrimmedStrings(String name) { String valueString = get(name); return StringUtils.getTrimmedStrings(valueString); }
java
public String[] getTrimmedStrings(String name) { String valueString = get(name); return StringUtils.getTrimmedStrings(valueString); }
[ "public", "String", "[", "]", "getTrimmedStrings", "(", "String", "name", ")", "{", "String", "valueString", "=", "get", "(", "name", ")", ";", "return", "StringUtils", ".", "getTrimmedStrings", "(", "valueString", ")", ";", "}" ]
Get the comma delimited values of the <code>name</code> property as an array of <code>String</code>s, trimmed of the leading and trailing whitespace. If no such property is specified then an empty array is returned. @param name property name. @return property value as an array of trimmed <code>String</code>s, or empty...
[ "Get", "the", "comma", "delimited", "values", "of", "the", "<code", ">", "name<", "/", "code", ">", "property", "as", "an", "array", "of", "<code", ">", "String<", "/", "code", ">", "s", "trimmed", "of", "the", "leading", "and", "trailing", "whitespace",...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L2111-L2114
train
Returns the trimmed string array for the given name.
[ 30522, 2270, 5164, 1031, 1033, 2131, 18886, 20058, 5104, 18886, 3070, 2015, 1006, 5164, 2171, 1007, 1063, 5164, 5300, 18886, 3070, 1027, 2131, 1006, 2171, 1007, 1025, 2709, 5164, 21823, 4877, 1012, 2131, 18886, 20058, 5104, 18886, 3070, 201...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/cell/CellUtil.java
CellUtil.mergingCells
public static int mergingCells(Sheet sheet, int firstRow, int lastRow, int firstColumn, int lastColumn, CellStyle cellStyle) { final CellRangeAddress cellRangeAddress = new CellRangeAddress(// firstRow, // first row (0-based) lastRow, // last row (0-based) firstColumn, // first column (0-based) l...
java
public static int mergingCells(Sheet sheet, int firstRow, int lastRow, int firstColumn, int lastColumn, CellStyle cellStyle) { final CellRangeAddress cellRangeAddress = new CellRangeAddress(// firstRow, // first row (0-based) lastRow, // last row (0-based) firstColumn, // first column (0-based) l...
[ "public", "static", "int", "mergingCells", "(", "Sheet", "sheet", ",", "int", "firstRow", ",", "int", "lastRow", ",", "int", "firstColumn", ",", "int", "lastColumn", ",", "CellStyle", "cellStyle", ")", "{", "final", "CellRangeAddress", "cellRangeAddress", "=", ...
合并单元格,可以根据设置的值来合并行和列 @param sheet 表对象 @param firstRow 起始行,0开始 @param lastRow 结束行,0开始 @param firstColumn 起始列,0开始 @param lastColumn 结束列,0开始 @param cellStyle 单元格样式,只提取边框样式 @return 合并后的单元格号
[ "合并单元格,可以根据设置的值来合并行和列" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/cell/CellUtil.java#L204-L219
train
Merges two cells in a sheet.
[ 30522, 2270, 10763, 20014, 16468, 29109, 4877, 1006, 7123, 7123, 1010, 20014, 2034, 10524, 1010, 20014, 2197, 10524, 1010, 20014, 2034, 25778, 2819, 2078, 1010, 20014, 2197, 25778, 2819, 2078, 1010, 4442, 27983, 4442, 27983, 1007, 1063, 2345,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/seg/common/CWSEvaluator.java
CWSEvaluator.evaluate
public static Result evaluate(String goldFile, String predFile, String dictPath) throws IOException { IOUtil.LineIterator goldIter = new IOUtil.LineIterator(goldFile); IOUtil.LineIterator predIter = new IOUtil.LineIterator(predFile); CWSEvaluator evaluator = new CWSEvaluator(dictPath); ...
java
public static Result evaluate(String goldFile, String predFile, String dictPath) throws IOException { IOUtil.LineIterator goldIter = new IOUtil.LineIterator(goldFile); IOUtil.LineIterator predIter = new IOUtil.LineIterator(predFile); CWSEvaluator evaluator = new CWSEvaluator(dictPath); ...
[ "public", "static", "Result", "evaluate", "(", "String", "goldFile", ",", "String", "predFile", ",", "String", "dictPath", ")", "throws", "IOException", "{", "IOUtil", ".", "LineIterator", "goldIter", "=", "new", "IOUtil", ".", "LineIterator", "(", "goldFile", ...
在标准答案与分词结果上执行评测 @param goldFile @param predFile @return
[ "在标准答案与分词结果上执行评测" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/common/CWSEvaluator.java#L235-L245
train
Evaluate the CWSE formula.
[ 30522, 2270, 10763, 2765, 16157, 1006, 5164, 2751, 8873, 2571, 1010, 5164, 3653, 20952, 9463, 1010, 5164, 4487, 6593, 15069, 1007, 11618, 22834, 10288, 24422, 1063, 22834, 21823, 2140, 1012, 2240, 21646, 8844, 2751, 21646, 1027, 2047, 22834, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-api-java/src/main/java/org/apache/flink/table/catalog/GenericInMemoryCatalog.java
GenericInMemoryCatalog.createFunction
@Override public void createFunction(ObjectPath functionPath, CatalogFunction function, boolean ignoreIfExists) throws FunctionAlreadyExistException, DatabaseNotExistException { checkNotNull(functionPath); checkNotNull(function); if (!databaseExists(functionPath.getDatabaseName())) { throw new DatabaseNot...
java
@Override public void createFunction(ObjectPath functionPath, CatalogFunction function, boolean ignoreIfExists) throws FunctionAlreadyExistException, DatabaseNotExistException { checkNotNull(functionPath); checkNotNull(function); if (!databaseExists(functionPath.getDatabaseName())) { throw new DatabaseNot...
[ "@", "Override", "public", "void", "createFunction", "(", "ObjectPath", "functionPath", ",", "CatalogFunction", "function", ",", "boolean", "ignoreIfExists", ")", "throws", "FunctionAlreadyExistException", ",", "DatabaseNotExistException", "{", "checkNotNull", "(", "funct...
------ functions ------
[ "------", "functions", "------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/GenericInMemoryCatalog.java#L302-L319
train
Create a new function in the catalog.
[ 30522, 1030, 2058, 15637, 2270, 11675, 3443, 11263, 27989, 1006, 4874, 15069, 3853, 15069, 1010, 12105, 11263, 27989, 3853, 1010, 22017, 20898, 8568, 29323, 9048, 12837, 1007, 11618, 8360, 16416, 5149, 10288, 27870, 2595, 24422, 1010, 7809, 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/codec/Base64Decoder.java
Base64Decoder.decode
public static byte[] decode(byte[] in, int pos, int length) { if (ArrayUtil.isEmpty(in)) { return in; } final IntWrapper offset = new IntWrapper(pos); byte sestet0; byte sestet1; byte sestet2; byte sestet3; int maxPos = pos + length - 1; int octetId = 0; byte[] octet = new byte[len...
java
public static byte[] decode(byte[] in, int pos, int length) { if (ArrayUtil.isEmpty(in)) { return in; } final IntWrapper offset = new IntWrapper(pos); byte sestet0; byte sestet1; byte sestet2; byte sestet3; int maxPos = pos + length - 1; int octetId = 0; byte[] octet = new byte[len...
[ "public", "static", "byte", "[", "]", "decode", "(", "byte", "[", "]", "in", ",", "int", "pos", ",", "int", "length", ")", "{", "if", "(", "ArrayUtil", ".", "isEmpty", "(", "in", ")", ")", "{", "return", "in", ";", "}", "final", "IntWrapper", "of...
解码Base64 @param in 输入 @param pos 开始位置 @param length 长度 @return 解码后的bytes
[ "解码Base64" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/codec/Base64Decoder.java#L126-L163
train
Decodes a sequence of bytes starting at the given position.
[ 30522, 2270, 10763, 24880, 1031, 1033, 21933, 3207, 1006, 24880, 1031, 1033, 1999, 1010, 20014, 13433, 2015, 1010, 20014, 3091, 1007, 1063, 2065, 1006, 9140, 21823, 2140, 1012, 2003, 6633, 13876, 2100, 1006, 1999, 1007, 1007, 1063, 2709, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...