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
netty/netty
transport-native-epoll/src/main/java/io/netty/channel/epoll/AbstractEpollStreamChannel.java
AbstractEpollStreamChannel.spliceTo
public final ChannelFuture spliceTo(final AbstractEpollStreamChannel ch, final int len, final ChannelPromise promise) { if (ch.eventLoop() != eventLoop()) { throw new IllegalArgumentException("EventLoops are not the same."); } checkPositiveOrZe...
java
public final ChannelFuture spliceTo(final AbstractEpollStreamChannel ch, final int len, final ChannelPromise promise) { if (ch.eventLoop() != eventLoop()) { throw new IllegalArgumentException("EventLoops are not the same."); } checkPositiveOrZe...
[ "public", "final", "ChannelFuture", "spliceTo", "(", "final", "AbstractEpollStreamChannel", "ch", ",", "final", "int", "len", ",", "final", "ChannelPromise", "promise", ")", "{", "if", "(", "ch", ".", "eventLoop", "(", ")", "!=", "eventLoop", "(", ")", ")", ...
Splice from this {@link AbstractEpollStreamChannel} to another {@link AbstractEpollStreamChannel}. The {@code len} is the number of bytes to splice. If using {@link Integer#MAX_VALUE} it will splice until the {@link ChannelFuture} was canceled or it was failed. Please note: <ul> <li>both channels need to be registered...
[ "Splice", "from", "this", "{", "@link", "AbstractEpollStreamChannel", "}", "to", "another", "{", "@link", "AbstractEpollStreamChannel", "}", ".", "The", "{", "@code", "len", "}", "is", "the", "number", "of", "bytes", "to", "splice", ".", "If", "using", "{", ...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport-native-epoll/src/main/java/io/netty/channel/epoll/AbstractEpollStreamChannel.java#L162-L180
train
Splice the given channel to the given length.
[ 30522, 2270, 2345, 3149, 11263, 11244, 11867, 13231, 3406, 1006, 2345, 10061, 13699, 14511, 21422, 26058, 10381, 1010, 2345, 20014, 18798, 1010, 2345, 3149, 21572, 28732, 4872, 1007, 1063, 2065, 1006, 10381, 1012, 2724, 4135, 7361, 1006, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/servlet/ServletUtil.java
ServletUtil.fillBean
public static <T> T fillBean(ServletRequest request, T bean, boolean isIgnoreError) { return fillBean(request, bean, CopyOptions.create().setIgnoreError(isIgnoreError)); }
java
public static <T> T fillBean(ServletRequest request, T bean, boolean isIgnoreError) { return fillBean(request, bean, CopyOptions.create().setIgnoreError(isIgnoreError)); }
[ "public", "static", "<", "T", ">", "T", "fillBean", "(", "ServletRequest", "request", ",", "T", "bean", ",", "boolean", "isIgnoreError", ")", "{", "return", "fillBean", "(", "request", ",", "bean", ",", "CopyOptions", ".", "create", "(", ")", ".", "setIg...
ServletRequest 参数转Bean @param <T> Bean类型 @param request {@link ServletRequest} @param bean Bean @param isIgnoreError 是否忽略注入错误 @return Bean
[ "ServletRequest", "参数转Bean" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/servlet/ServletUtil.java#L159-L161
train
Fill a bean with the data from the request.
[ 30522, 2270, 10763, 1026, 1056, 1028, 1056, 6039, 4783, 2319, 1006, 14262, 2615, 7485, 2890, 15500, 5227, 1010, 1056, 14068, 1010, 22017, 20898, 2003, 23773, 5686, 2121, 29165, 1007, 1063, 2709, 6039, 4783, 2319, 1006, 5227, 1010, 14068, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ClassLoaderUtil.java
ClassLoaderUtil.tryLoadInnerClass
private static Class<?> tryLoadInnerClass(String name, ClassLoader classLoader, boolean isInitialized) { // 尝试获取内部类,例如java.lang.Thread.State =》java.lang.Thread$State final int lastDotIndex = name.lastIndexOf(PACKAGE_SEPARATOR); if (lastDotIndex > 0) {// 类与内部类的分隔符不能在第一位,因此>0 final String innerClassName = na...
java
private static Class<?> tryLoadInnerClass(String name, ClassLoader classLoader, boolean isInitialized) { // 尝试获取内部类,例如java.lang.Thread.State =》java.lang.Thread$State final int lastDotIndex = name.lastIndexOf(PACKAGE_SEPARATOR); if (lastDotIndex > 0) {// 类与内部类的分隔符不能在第一位,因此>0 final String innerClassName = na...
[ "private", "static", "Class", "<", "?", ">", "tryLoadInnerClass", "(", "String", "name", ",", "ClassLoader", "classLoader", ",", "boolean", "isInitialized", ")", "{", "// 尝试获取内部类,例如java.lang.Thread.State =》java.lang.Thread$State\r", "final", "int", "lastDotIndex", "=", ...
尝试转换并加载内部类,例如java.lang.Thread.State =》java.lang.Thread$State @param name 类名 @param classLoader {@link ClassLoader},{@code null} 则使用系统默认ClassLoader @param isInitialized 是否初始化类(调用static模块内容和初始化static属性) @return 类名对应的类 @since 4.1.20
[ "尝试转换并加载内部类,例如java", ".", "lang", ".", "Thread", ".", "State", "=", "》java", ".", "lang", ".", "Thread$State" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ClassLoaderUtil.java#L279-L291
train
Try to load an inner class.
[ 30522, 2797, 10763, 2465, 1026, 1029, 1028, 3046, 11066, 23111, 2121, 26266, 1006, 5164, 2171, 1010, 2465, 11066, 2121, 2465, 11066, 2121, 1010, 22017, 20898, 2003, 5498, 20925, 3550, 1007, 1063, 1013, 1013, 100, 100, 100, 100, 1773, 1960, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-formats/flink-avro/src/main/java/org/apache/flink/table/descriptors/Avro.java
Avro.recordClass
public Avro recordClass(Class<? extends SpecificRecord> recordClass) { Preconditions.checkNotNull(recordClass); this.recordClass = recordClass; return this; }
java
public Avro recordClass(Class<? extends SpecificRecord> recordClass) { Preconditions.checkNotNull(recordClass); this.recordClass = recordClass; return this; }
[ "public", "Avro", "recordClass", "(", "Class", "<", "?", "extends", "SpecificRecord", ">", "recordClass", ")", "{", "Preconditions", ".", "checkNotNull", "(", "recordClass", ")", ";", "this", ".", "recordClass", "=", "recordClass", ";", "return", "this", ";", ...
Sets the class of the Avro specific record. @param recordClass class of the Avro record.
[ "Sets", "the", "class", "of", "the", "Avro", "specific", "record", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-formats/flink-avro/src/main/java/org/apache/flink/table/descriptors/Avro.java#L49-L53
train
Sets the class of the Avro record to use.
[ 30522, 2270, 20704, 3217, 2501, 26266, 1006, 2465, 1026, 1029, 8908, 3563, 2890, 27108, 2094, 1028, 2501, 26266, 1007, 1063, 3653, 8663, 20562, 2015, 1012, 4638, 17048, 11231, 3363, 1006, 2501, 26266, 1007, 1025, 2023, 1012, 2501, 26266, 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/IterUtil.java
IterUtil.fieldValueMap
@SuppressWarnings("unchecked") public static <K, V> Map<K, V> fieldValueMap(Iterator<V> iter, String fieldName) { final Map<K, V> result = new HashMap<>(); if (null != iter) { V value; while (iter.hasNext()) { value = iter.next(); result.put((K) ReflectUtil.getFieldValue(value, fieldName), val...
java
@SuppressWarnings("unchecked") public static <K, V> Map<K, V> fieldValueMap(Iterator<V> iter, String fieldName) { final Map<K, V> result = new HashMap<>(); if (null != iter) { V value; while (iter.hasNext()) { value = iter.next(); result.put((K) ReflectUtil.getFieldValue(value, fieldName), val...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "V", ">", "fieldValueMap", "(", "Iterator", "<", "V", ">", "iter", ",", "String", "fieldName", ")", "{", "final", "Map", "<", "K", ...
字段值与列表值对应的Map,常用于元素对象中有唯一ID时需要按照这个ID查找对象的情况<br> 例如:车牌号 =》车 @param <K> 字段名对应值得类型,不确定请使用Object @param <V> 对象类型 @param iter 对象列表 @param fieldName 字段名(会通过反射获取其值) @return 某个字段值与对象对应Map @since 4.0.4
[ "字段值与列表值对应的Map,常用于元素对象中有唯一ID时需要按照这个ID查找对象的情况<br", ">", "例如:车牌号", "=", "》车" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/IterUtil.java#L196-L207
train
Creates a map from the iterator of objects and the specified field name.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 10763, 1026, 1047, 1010, 1058, 1028, 4949, 1026, 1047, 1010, 1058, 1028, 2492, 10175, 5657, 2863, 2361, 1006, 2009, 6906, 4263, 1026, 1058, 1028, 2009, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/MetricRegistryConfiguration.java
MetricRegistryConfiguration.fromConfiguration
public static MetricRegistryConfiguration fromConfiguration(Configuration configuration) { ScopeFormats scopeFormats; try { scopeFormats = ScopeFormats.fromConfig(configuration); } catch (Exception e) { LOG.warn("Failed to parse scope format, using default scope formats", e); scopeFormats = ScopeFormats....
java
public static MetricRegistryConfiguration fromConfiguration(Configuration configuration) { ScopeFormats scopeFormats; try { scopeFormats = ScopeFormats.fromConfig(configuration); } catch (Exception e) { LOG.warn("Failed to parse scope format, using default scope formats", e); scopeFormats = ScopeFormats....
[ "public", "static", "MetricRegistryConfiguration", "fromConfiguration", "(", "Configuration", "configuration", ")", "{", "ScopeFormats", "scopeFormats", ";", "try", "{", "scopeFormats", "=", "ScopeFormats", ".", "fromConfig", "(", "configuration", ")", ";", "}", "catc...
Create a metric registry configuration object from the given {@link Configuration}. @param configuration to generate the metric registry configuration from @return Metric registry configuration generated from the configuration
[ "Create", "a", "metric", "registry", "configuration", "object", "from", "the", "given", "{", "@link", "Configuration", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistryConfiguration.java#L83-L106
train
Creates a new MetricRegistryConfiguration from the given configuration.
[ 30522, 2270, 10763, 12046, 2890, 24063, 2854, 8663, 8873, 27390, 3370, 2013, 8663, 8873, 27390, 3370, 1006, 9563, 9563, 1007, 1063, 9531, 14192, 11149, 9531, 14192, 11149, 1025, 3046, 1063, 9531, 14192, 11149, 1027, 9531, 14192, 11149, 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/io/watch/WatchMonitor.java
WatchMonitor.create
public static WatchMonitor create(File file, int maxDepth, WatchEvent.Kind<?>... events){ return create(file.toPath(), maxDepth, events); }
java
public static WatchMonitor create(File file, int maxDepth, WatchEvent.Kind<?>... events){ return create(file.toPath(), maxDepth, events); }
[ "public", "static", "WatchMonitor", "create", "(", "File", "file", ",", "int", "maxDepth", ",", "WatchEvent", ".", "Kind", "<", "?", ">", "...", "events", ")", "{", "return", "create", "(", "file", ".", "toPath", "(", ")", ",", "maxDepth", ",", "events...
创建并初始化监听 @param file 文件 @param events 监听的事件列表 @param maxDepth 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录 @return 监听对象
[ "创建并初始化监听" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/watch/WatchMonitor.java#L141-L143
train
Creates a new WatchMonitor for the given file.
[ 30522, 2270, 10763, 3422, 8202, 15660, 3443, 1006, 5371, 5371, 1010, 20014, 4098, 3207, 13876, 2232, 1010, 3422, 18697, 3372, 1012, 2785, 1026, 1029, 1028, 1012, 1012, 1012, 2824, 1007, 1063, 2709, 3443, 1006, 5371, 1012, 2327, 8988, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/cell/CellUtil.java
CellUtil.isDateType
private static boolean isDateType(Cell cell, int formatIndex) { // yyyy-MM-dd----- 14 // yyyy年m月d日---- 31 // yyyy年m月------- 57 // m月d日 ---------- 58 // HH:mm----------- 20 // h时mm分 -------- 32 if (formatIndex == 14 || formatIndex == 31 || formatIndex == 57 || formatIndex == 58 || formatIndex == 20 ...
java
private static boolean isDateType(Cell cell, int formatIndex) { // yyyy-MM-dd----- 14 // yyyy年m月d日---- 31 // yyyy年m月------- 57 // m月d日 ---------- 58 // HH:mm----------- 20 // h时mm分 -------- 32 if (formatIndex == 14 || formatIndex == 31 || formatIndex == 57 || formatIndex == 58 || formatIndex == 20 ...
[ "private", "static", "boolean", "isDateType", "(", "Cell", "cell", ",", "int", "formatIndex", ")", "{", "// yyyy-MM-dd----- 14\r", "// yyyy年m月d日---- 31\r", "// yyyy年m月------- 57\r", "// m月d日 ---------- 58\r", "// HH:mm----------- 20\r", "// h时mm分 -------- 32\r", "if", "(", "f...
是否为日期格式<br> 判断方式: <pre> 1、指定序号 2、org.apache.poi.ss.usermodel.DateUtil.isADateFormat方法判定 </pre> @param cell 单元格 @param formatIndex 格式序号 @return 是否为日期格式
[ "是否为日期格式<br", ">", "判断方式:" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/cell/CellUtil.java#L267-L283
train
Checks if the given cell is of a date type.
[ 30522, 2797, 10763, 22017, 30524, 1011, 3461, 1011, 20315, 1011, 1011, 1011, 1011, 1011, 2403, 1013, 1013, 1061, 2100, 2100, 2100, 1840, 1049, 1872, 1040, 1864, 1011, 1011, 1011, 1011, 2861, 1013, 1013, 1061, 2100, 2100, 2100, 1840, 1049, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/types/parser/FieldParser.java
FieldParser.resetErrorStateAndParse
public int resetErrorStateAndParse(byte[] bytes, int startPos, int limit, byte[] delim, T reuse) { resetParserState(); return parseField(bytes, startPos, limit, delim, reuse); }
java
public int resetErrorStateAndParse(byte[] bytes, int startPos, int limit, byte[] delim, T reuse) { resetParserState(); return parseField(bytes, startPos, limit, delim, reuse); }
[ "public", "int", "resetErrorStateAndParse", "(", "byte", "[", "]", "bytes", ",", "int", "startPos", ",", "int", "limit", ",", "byte", "[", "]", "delim", ",", "T", "reuse", ")", "{", "resetParserState", "(", ")", ";", "return", "parseField", "(", "bytes",...
Parses the value of a field from the byte array, taking care of properly reset the state of this parser. The start position within the byte array and the array's valid length is given. The content of the value is delimited by a field delimiter. @param bytes The byte array that holds the value. @param startPos The inde...
[ "Parses", "the", "value", "of", "a", "field", "from", "the", "byte", "array", "taking", "care", "of", "properly", "reset", "the", "state", "of", "this", "parser", ".", "The", "start", "position", "within", "the", "byte", "array", "and", "the", "array", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/parser/FieldParser.java#L102-L105
train
Parse a field from the byte array.
[ 30522, 2270, 20014, 25141, 2121, 29165, 9153, 27058, 4859, 19362, 3366, 1006, 24880, 1031, 1033, 27507, 1010, 20014, 2707, 6873, 2015, 1010, 20014, 5787, 1010, 24880, 1031, 1033, 3972, 5714, 1010, 1056, 2128, 8557, 1007, 1063, 25141, 19362, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/HttpPostStandardRequestDecoder.java
HttpPostStandardRequestDecoder.parseBodyAttributes
private void parseBodyAttributes() { if (!undecodedChunk.hasArray()) { parseBodyAttributesStandard(); return; } SeekAheadOptimize sao = new SeekAheadOptimize(undecodedChunk); int firstpos = undecodedChunk.readerIndex(); int currentpos = firstpos; i...
java
private void parseBodyAttributes() { if (!undecodedChunk.hasArray()) { parseBodyAttributesStandard(); return; } SeekAheadOptimize sao = new SeekAheadOptimize(undecodedChunk); int firstpos = undecodedChunk.readerIndex(); int currentpos = firstpos; i...
[ "private", "void", "parseBodyAttributes", "(", ")", "{", "if", "(", "!", "undecodedChunk", ".", "hasArray", "(", ")", ")", "{", "parseBodyAttributesStandard", "(", ")", ";", "return", ";", "}", "SeekAheadOptimize", "sao", "=", "new", "SeekAheadOptimize", "(", ...
This getMethod fill the map and list with as much Attribute as possible from Body in not Multipart mode. @throws ErrorDataDecoderException if there is a problem with the charset decoding or other errors
[ "This", "getMethod", "fill", "the", "map", "and", "list", "with", "as", "much", "Attribute", "as", "possible", "from", "Body", "in", "not", "Multipart", "mode", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostStandardRequestDecoder.java#L495-L611
train
Parse the body attributes.
[ 30522, 2797, 11675, 11968, 3366, 23684, 19321, 3089, 8569, 4570, 1006, 1007, 1063, 2065, 1006, 999, 6151, 8586, 10244, 16409, 17157, 2243, 1012, 2038, 2906, 9447, 1006, 1007, 1007, 1063, 11968, 3366, 23684, 19321, 3089, 8569, 4570, 21515, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/Http2ServerInitializer.java
Http2ServerInitializer.configureSsl
private void configureSsl(SocketChannel ch) { ch.pipeline().addLast(sslCtx.newHandler(ch.alloc()), new Http2OrHttpHandler()); }
java
private void configureSsl(SocketChannel ch) { ch.pipeline().addLast(sslCtx.newHandler(ch.alloc()), new Http2OrHttpHandler()); }
[ "private", "void", "configureSsl", "(", "SocketChannel", "ch", ")", "{", "ch", ".", "pipeline", "(", ")", ".", "addLast", "(", "sslCtx", ".", "newHandler", "(", "ch", ".", "alloc", "(", ")", ")", ",", "new", "Http2OrHttpHandler", "(", ")", ")", ";", ...
Configure the pipeline for TLS NPN negotiation to HTTP/2.
[ "Configure", "the", "pipeline", "for", "TLS", "NPN", "negotiation", "to", "HTTP", "/", "2", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/Http2ServerInitializer.java#L84-L86
train
Configure SSL.
[ 30522, 2797, 11675, 9530, 8873, 27390, 7971, 2140, 1006, 22278, 26058, 10381, 1007, 1063, 10381, 1012, 13117, 1006, 1007, 1012, 5587, 8523, 2102, 1006, 7020, 15472, 2102, 2595, 1012, 2047, 11774, 3917, 1006, 10381, 1012, 2035, 10085, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/model/perceptron/model/StructuredPerceptron.java
StructuredPerceptron.update
public void update(int[] goldIndex, int[] predictIndex) { for (int i = 0; i < goldIndex.length; ++i) { if (goldIndex[i] == predictIndex[i]) continue; else // 预测与答案不一致 { parameter[goldIndex[i]]++; // 奖励正确的特征函数(将它的权值加一) ...
java
public void update(int[] goldIndex, int[] predictIndex) { for (int i = 0; i < goldIndex.length; ++i) { if (goldIndex[i] == predictIndex[i]) continue; else // 预测与答案不一致 { parameter[goldIndex[i]]++; // 奖励正确的特征函数(将它的权值加一) ...
[ "public", "void", "update", "(", "int", "[", "]", "goldIndex", ",", "int", "[", "]", "predictIndex", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "goldIndex", ".", "length", ";", "++", "i", ")", "{", "if", "(", "goldIndex", "[", "...
根据答案和预测更新参数 @param goldIndex 答案的特征函数(非压缩形式) @param predictIndex 预测的特征函数(非压缩形式)
[ "根据答案和预测更新参数" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/perceptron/model/StructuredPerceptron.java#L41-L58
train
update - > update - > update - > update - > update - > update - > update - > update
[ 30522, 2270, 11675, 10651, 1006, 20014, 1031, 1033, 2751, 22254, 10288, 1010, 20014, 1031, 1033, 16014, 22254, 10288, 1007, 1063, 2005, 1006, 20014, 1045, 1027, 1014, 1025, 1045, 1026, 2751, 22254, 10288, 1012, 3091, 1025, 1009, 1009, 1045, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/corpus/io/IOUtil.java
IOUtil.saveObjectTo
public static boolean saveObjectTo(Object o, String path) { try { ObjectOutputStream oos = new ObjectOutputStream(IOUtil.newOutputStream(path)); oos.writeObject(o); oos.close(); } catch (IOException e) { logger.warning("在保存对象" +...
java
public static boolean saveObjectTo(Object o, String path) { try { ObjectOutputStream oos = new ObjectOutputStream(IOUtil.newOutputStream(path)); oos.writeObject(o); oos.close(); } catch (IOException e) { logger.warning("在保存对象" +...
[ "public", "static", "boolean", "saveObjectTo", "(", "Object", "o", ",", "String", "path", ")", "{", "try", "{", "ObjectOutputStream", "oos", "=", "new", "ObjectOutputStream", "(", "IOUtil", ".", "newOutputStream", "(", "path", ")", ")", ";", "oos", ".", "w...
序列化对象 @param o @param path @return
[ "序列化对象" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/corpus/io/IOUtil.java#L43-L58
train
Save object to a file
[ 30522, 2270, 10763, 22017, 20898, 3828, 16429, 20614, 3406, 1006, 4874, 1051, 1010, 5164, 4130, 1007, 1063, 3046, 1063, 4874, 5833, 18780, 21422, 1051, 2891, 1027, 2047, 4874, 5833, 18780, 21422, 1006, 22834, 21823, 2140, 1012, 2047, 5833, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.getBeginValue
public static int getBeginValue(Calendar calendar, int dateField) { if(Calendar.DAY_OF_WEEK == dateField) { return calendar.getFirstDayOfWeek(); } return calendar.getActualMinimum(dateField); }
java
public static int getBeginValue(Calendar calendar, int dateField) { if(Calendar.DAY_OF_WEEK == dateField) { return calendar.getFirstDayOfWeek(); } return calendar.getActualMinimum(dateField); }
[ "public", "static", "int", "getBeginValue", "(", "Calendar", "calendar", ",", "int", "dateField", ")", "{", "if", "(", "Calendar", ".", "DAY_OF_WEEK", "==", "dateField", ")", "{", "return", "calendar", ".", "getFirstDayOfWeek", "(", ")", ";", "}", "return", ...
获取指定日期字段的最小值,例如分钟的最小值是0 @param calendar {@link Calendar} @param dateField {@link DateField} @return 字段最小值 @since 4.5.7 @see Calendar#getActualMinimum(int)
[ "获取指定日期字段的最小值,例如分钟的最小值是0" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L1680-L1685
train
Gets the beginning value of the specified field from the given calendar.
[ 30522, 2270, 10763, 20014, 2131, 4783, 11528, 10175, 5657, 1006, 8094, 8094, 1010, 20014, 3058, 3790, 1007, 1063, 2065, 1006, 8094, 1012, 2154, 1035, 1997, 1035, 2733, 1027, 1027, 3058, 3790, 1007, 1063, 2709, 8094, 1012, 2131, 8873, 12096,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java
BinaryString.concatWs
public static BinaryString concatWs(BinaryString separator, BinaryString... inputs) { return concatWs(separator, Arrays.asList(inputs)); }
java
public static BinaryString concatWs(BinaryString separator, BinaryString... inputs) { return concatWs(separator, Arrays.asList(inputs)); }
[ "public", "static", "BinaryString", "concatWs", "(", "BinaryString", "separator", ",", "BinaryString", "...", "inputs", ")", "{", "return", "concatWs", "(", "separator", ",", "Arrays", ".", "asList", "(", "inputs", ")", ")", ";", "}" ]
Concatenates input strings together into a single string using the separator. A null input is skipped. For example, concat(",", "a", null, "c") would yield "a,c".
[ "Concatenates", "input", "strings", "together", "into", "a", "single", "string", "using", "the", "separator", ".", "A", "null", "input", "is", "skipped", ".", "For", "example", "concat", "(", "a", "null", "c", ")", "would", "yield", "a", "c", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L494-L496
train
Concatenates the given strings with the given separator.
[ 30522, 2270, 10763, 12441, 3367, 4892, 9530, 11266, 9333, 1006, 12441, 3367, 4892, 19802, 30524, 20407, 1007, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
transport/src/main/java/io/netty/channel/pool/SimpleChannelPool.java
SimpleChannelPool.releaseAndOfferIfHealthy
private void releaseAndOfferIfHealthy(Channel channel, Promise<Void> promise, Future<Boolean> future) throws Exception { if (future.getNow()) { //channel turns out to be healthy, offering and releasing it. releaseAndOffer(channel, promise); } else { //channel not healthy, just re...
java
private void releaseAndOfferIfHealthy(Channel channel, Promise<Void> promise, Future<Boolean> future) throws Exception { if (future.getNow()) { //channel turns out to be healthy, offering and releasing it. releaseAndOffer(channel, promise); } else { //channel not healthy, just re...
[ "private", "void", "releaseAndOfferIfHealthy", "(", "Channel", "channel", ",", "Promise", "<", "Void", ">", "promise", ",", "Future", "<", "Boolean", ">", "future", ")", "throws", "Exception", "{", "if", "(", "future", ".", "getNow", "(", ")", ")", "{", ...
Adds the channel back to the pool only if the channel is healthy. @param channel the channel to put back to the pool @param promise offer operation promise. @param future the future that contains information fif channel is healthy or not. @throws Exception in case when failed to notify handler about release operation.
[ "Adds", "the", "channel", "back", "to", "the", "pool", "only", "if", "the", "channel", "is", "healthy", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/channel/pool/SimpleChannelPool.java#L340-L348
train
Release the resource if healthy.
[ 30522, 2797, 11675, 2713, 28574, 12494, 10128, 20192, 24658, 2100, 1006, 3149, 3149, 1010, 4872, 1026, 11675, 1028, 4872, 1010, 2925, 1026, 22017, 20898, 1028, 2925, 1007, 11618, 6453, 1063, 2065, 1006, 2925, 1012, 2131, 19779, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/json/JobResultDeserializer.java
JobResultDeserializer.assertNotEndOfInput
private static void assertNotEndOfInput( final JsonParser p, @Nullable final JsonToken jsonToken) { checkState(jsonToken != null, "Unexpected end of input at %s", p.getCurrentLocation()); }
java
private static void assertNotEndOfInput( final JsonParser p, @Nullable final JsonToken jsonToken) { checkState(jsonToken != null, "Unexpected end of input at %s", p.getCurrentLocation()); }
[ "private", "static", "void", "assertNotEndOfInput", "(", "final", "JsonParser", "p", ",", "@", "Nullable", "final", "JsonToken", "jsonToken", ")", "{", "checkState", "(", "jsonToken", "!=", "null", ",", "\"Unexpected end of input at %s\"", ",", "p", ".", "getCurre...
Asserts that the provided JsonToken is not null, i.e., not at the end of the input.
[ "Asserts", "that", "the", "provided", "JsonToken", "is", "not", "null", "i", ".", "e", ".", "not", "at", "the", "end", "of", "the", "input", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/json/JobResultDeserializer.java#L151-L155
train
Assert that the current token is not end of input.
[ 30522, 2797, 10763, 11675, 20865, 22074, 15482, 16294, 18780, 1006, 2345, 1046, 3385, 19362, 8043, 1052, 1010, 1030, 19701, 3085, 2345, 1046, 3385, 18715, 2368, 1046, 3385, 18715, 2368, 1007, 1063, 14148, 12259, 1006, 1046, 3385, 18715, 2368,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
common/src/main/java/com/alibaba/otter/canal/common/zookeeper/ZookeeperPathUtils.java
ZookeeperPathUtils.getDestinationClientRunning
public static String getDestinationClientRunning(String destination, short clientId) { return MessageFormat.format(DESTINATION_CLIENTID_RUNNING_NODE, destination, String.valueOf(clientId)); }
java
public static String getDestinationClientRunning(String destination, short clientId) { return MessageFormat.format(DESTINATION_CLIENTID_RUNNING_NODE, destination, String.valueOf(clientId)); }
[ "public", "static", "String", "getDestinationClientRunning", "(", "String", "destination", ",", "short", "clientId", ")", "{", "return", "MessageFormat", ".", "format", "(", "DESTINATION_CLIENTID_RUNNING_NODE", ",", "destination", ",", "String", ".", "valueOf", "(", ...
客户端当前正在工作的running节点
[ "客户端当前正在工作的running节点" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/common/src/main/java/com/alibaba/otter/canal/common/zookeeper/ZookeeperPathUtils.java#L147-L149
train
Gets the destination client running message.
[ 30522, 2270, 10763, 5164, 2131, 6155, 13770, 3508, 20464, 11638, 15532, 5582, 1006, 5164, 7688, 1010, 2460, 7396, 3593, 1007, 1063, 2709, 4471, 14192, 4017, 1012, 4289, 1006, 7688, 1035, 7396, 3593, 1035, 2770, 1035, 13045, 1010, 7688, 1010...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/WindowedStream.java
WindowedStream.reduce
@PublicEvolving public <R> SingleOutputStreamOperator<R> reduce(ReduceFunction<T> reduceFunction, ProcessWindowFunction<T, R, K, W> function) { TypeInformation<R> resultType = getProcessWindowFunctionReturnType(function, input.getType(), null); return reduce(reduceFunction, function, resultType); }
java
@PublicEvolving public <R> SingleOutputStreamOperator<R> reduce(ReduceFunction<T> reduceFunction, ProcessWindowFunction<T, R, K, W> function) { TypeInformation<R> resultType = getProcessWindowFunctionReturnType(function, input.getType(), null); return reduce(reduceFunction, function, resultType); }
[ "@", "PublicEvolving", "public", "<", "R", ">", "SingleOutputStreamOperator", "<", "R", ">", "reduce", "(", "ReduceFunction", "<", "T", ">", "reduceFunction", ",", "ProcessWindowFunction", "<", "T", ",", "R", ",", "K", ",", "W", ">", "function", ")", "{", ...
Applies the given window function to each window. The window function is called for each evaluation of the window for each key individually. The output of the window function is interpreted as a regular non-windowed stream. <p>Arriving data is incrementally aggregated using the given reducer. @param reduceFunction Th...
[ "Applies", "the", "given", "window", "function", "to", "each", "window", ".", "The", "window", "function", "is", "called", "for", "each", "evaluation", "of", "the", "window", "for", "each", "key", "individually", ".", "The", "output", "of", "the", "window", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/WindowedStream.java#L332-L337
train
Perform a reduce operation on the stream.
[ 30522, 1030, 2270, 6777, 4747, 6455, 2270, 1026, 1054, 1028, 2309, 5833, 18780, 21422, 25918, 8844, 1026, 1054, 1028, 5547, 1006, 5547, 11263, 27989, 1026, 1056, 1028, 5547, 11263, 27989, 1010, 2832, 11101, 5004, 11263, 27989, 1026, 1056, 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/io/file/FileWriter.java
FileWriter.append
public File append(byte[] data, int off, int len) throws IORuntimeException { return write(data, off, len, true); }
java
public File append(byte[] data, int off, int len) throws IORuntimeException { return write(data, off, len, true); }
[ "public", "File", "append", "(", "byte", "[", "]", "data", ",", "int", "off", ",", "int", "len", ")", "throws", "IORuntimeException", "{", "return", "write", "(", "data", ",", "off", ",", "len", ",", "true", ")", ";", "}" ]
追加数据到文件 @param data 数据 @param off 数据开始位置 @param len 数据长度 @return 目标文件 @throws IORuntimeException IO异常
[ "追加数据到文件" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java#L273-L275
train
Append the specified bytes to the end of the file.
[ 30522, 2270, 5371, 10439, 10497, 1006, 24880, 1031, 1033, 2951, 1010, 20014, 2125, 1010, 20014, 18798, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 2709, 4339, 1006, 2951, 1010, 2125, 1010, 18798, 1010, 2995, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/AhoCorasick/AhoCorasickDoubleArrayTrie.java
AhoCorasickDoubleArrayTrie.parseText
public List<Hit<V>> parseText(String text) { int position = 1; int currentState = 0; List<Hit<V>> collectedEmits = new LinkedList<Hit<V>>(); for (int i = 0; i < text.length(); ++i) { currentState = getState(currentState, text.charAt(i)); storeEmits(pos...
java
public List<Hit<V>> parseText(String text) { int position = 1; int currentState = 0; List<Hit<V>> collectedEmits = new LinkedList<Hit<V>>(); for (int i = 0; i < text.length(); ++i) { currentState = getState(currentState, text.charAt(i)); storeEmits(pos...
[ "public", "List", "<", "Hit", "<", "V", ">", ">", "parseText", "(", "String", "text", ")", "{", "int", "position", "=", "1", ";", "int", "currentState", "=", "0", ";", "List", "<", "Hit", "<", "V", ">", ">", "collectedEmits", "=", "new", "LinkedLis...
匹配母文本 @param text 一些文本 @return 一个pair列表
[ "匹配母文本" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/AhoCorasick/AhoCorasickDoubleArrayTrie.java#L82-L95
train
Parses the text into a list of Hit objects.
[ 30522, 2270, 2862, 1026, 2718, 1026, 1058, 1028, 1028, 11968, 13462, 10288, 2102, 1006, 5164, 3793, 1007, 1063, 20014, 2597, 1027, 1015, 1025, 20014, 14731, 12259, 1027, 1014, 1025, 2862, 1026, 2718, 1026, 1058, 1028, 1028, 5067, 23238, 321...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.loadDataMultipartStandard
private static boolean loadDataMultipartStandard(ByteBuf undecodedChunk, String delimiter, HttpData httpData) { final int startReaderIndex = undecodedChunk.readerIndex(); final int delimeterLength = delimiter.length(); int index = 0; int lastPosition = startReaderIndex; byte prev...
java
private static boolean loadDataMultipartStandard(ByteBuf undecodedChunk, String delimiter, HttpData httpData) { final int startReaderIndex = undecodedChunk.readerIndex(); final int delimeterLength = delimiter.length(); int index = 0; int lastPosition = startReaderIndex; byte prev...
[ "private", "static", "boolean", "loadDataMultipartStandard", "(", "ByteBuf", "undecodedChunk", ",", "String", "delimiter", ",", "HttpData", "httpData", ")", "{", "final", "int", "startReaderIndex", "=", "undecodedChunk", ".", "readerIndex", "(", ")", ";", "final", ...
Load the field value or file data 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", "or", "file", "data", "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#L1296-L1332
train
Load the data from a multipart form.
[ 30522, 2797, 10763, 22017, 20898, 7170, 2850, 15464, 11314, 11514, 20591, 5794, 7662, 2094, 1006, 24880, 8569, 2546, 6151, 8586, 10244, 16409, 17157, 2243, 1010, 5164, 3972, 27605, 3334, 1010, 8299, 2850, 2696, 8299, 2850, 2696, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.copyContent
public static File copyContent(File src, File dest, boolean isOverride) throws IORuntimeException { return FileCopier.create(src, dest).setCopyContentIfDir(true).setOverride(isOverride).copy(); }
java
public static File copyContent(File src, File dest, boolean isOverride) throws IORuntimeException { return FileCopier.create(src, dest).setCopyContentIfDir(true).setOverride(isOverride).copy(); }
[ "public", "static", "File", "copyContent", "(", "File", "src", ",", "File", "dest", ",", "boolean", "isOverride", ")", "throws", "IORuntimeException", "{", "return", "FileCopier", ".", "create", "(", "src", ",", "dest", ")", ".", "setCopyContentIfDir", "(", ...
复制文件或目录<br> 情况如下: <pre> 1、src和dest都为目录,则讲src下所有文件目录拷贝到dest下 2、src和dest都为文件,直接复制,名字为dest 3、src为文件,dest为目录,将src拷贝到dest目录下 </pre> @param src 源文件 @param dest 目标文件或目录,目标不存在会自动创建(目录、文件都创建) @param isOverride 是否覆盖目标文件 @return 目标目录或文件 @throws IORuntimeException IO异常
[ "复制文件或目录<br", ">", "情况如下:" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L1023-L1025
train
Copies the content of src to dest.
[ 30522, 2270, 10763, 5371, 6100, 8663, 6528, 2102, 1006, 5371, 5034, 2278, 1010, 5371, 4078, 2102, 1010, 22017, 20898, 11163, 6299, 15637, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 2709, 5371, 3597, 14756, 2099, 1012, 3443, 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
common/src/main/java/io/netty/util/AsciiString.java
AsciiString.cached
public static AsciiString cached(String string) { AsciiString asciiString = new AsciiString(string); asciiString.string = string; return asciiString; }
java
public static AsciiString cached(String string) { AsciiString asciiString = new AsciiString(string); asciiString.string = string; return asciiString; }
[ "public", "static", "AsciiString", "cached", "(", "String", "string", ")", "{", "AsciiString", "asciiString", "=", "new", "AsciiString", "(", "string", ")", ";", "asciiString", ".", "string", "=", "string", ";", "return", "asciiString", ";", "}" ]
Returns an {@link AsciiString} containing the given string and retains/caches the input string for later use in {@link #toString()}. Used for the constants (which already stored in the JVM's string table) and in cases where the guaranteed use of the {@link #toString()} method.
[ "Returns", "an", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/AsciiString.java#L1400-L1404
train
Create a cached ASCII string from the given string.
[ 30522, 2270, 10763, 2004, 6895, 2923, 4892, 17053, 2094, 1006, 5164, 5164, 1007, 1063, 2004, 6895, 2923, 4892, 2004, 6895, 2923, 4892, 1027, 2047, 2004, 6895, 2923, 4892, 1006, 5164, 1007, 1025, 2004, 6895, 2923, 4892, 1012, 5164, 1027, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/assigners/SlidingTimeWindows.java
SlidingTimeWindows.of
@Deprecated() public static SlidingTimeWindows of(Time size, Time slide) { return new SlidingTimeWindows(size.toMilliseconds(), slide.toMilliseconds()); }
java
@Deprecated() public static SlidingTimeWindows of(Time size, Time slide) { return new SlidingTimeWindows(size.toMilliseconds(), slide.toMilliseconds()); }
[ "@", "Deprecated", "(", ")", "public", "static", "SlidingTimeWindows", "of", "(", "Time", "size", ",", "Time", "slide", ")", "{", "return", "new", "SlidingTimeWindows", "(", "size", ".", "toMilliseconds", "(", ")", ",", "slide", ".", "toMilliseconds", "(", ...
Creates a new {@code SlidingTimeWindows} {@link WindowAssigner} that assigns elements to sliding time windows based on the element timestamp. @deprecated Please use {@link SlidingEventTimeWindows#of(Time, Time)}. @param size The size of the generated windows. @param slide The slide interval of the generated windows. ...
[ "Creates", "a", "new", "{", "@code", "SlidingTimeWindows", "}", "{", "@link", "WindowAssigner", "}", "that", "assigns", "elements", "to", "sliding", "time", "windows", "based", "on", "the", "element", "timestamp", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/assigners/SlidingTimeWindows.java#L49-L52
train
Creates a sliding time windows with the specified size and slide.
[ 30522, 1030, 2139, 28139, 12921, 1006, 1007, 2270, 10763, 8058, 7292, 11101, 15568, 1997, 1006, 2051, 2946, 1010, 2051, 7358, 1007, 1063, 2709, 2047, 8058, 7292, 11101, 15568, 1006, 2946, 1012, 3419, 8591, 5562, 8663, 5104, 1006, 1007, 1010...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/DataSet.java
DataSet.crossWithTiny
public <R> CrossOperator.DefaultCross<T, R> crossWithTiny(DataSet<R> other) { return new CrossOperator.DefaultCross<>(this, other, CrossHint.SECOND_IS_SMALL, Utils.getCallLocationName()); }
java
public <R> CrossOperator.DefaultCross<T, R> crossWithTiny(DataSet<R> other) { return new CrossOperator.DefaultCross<>(this, other, CrossHint.SECOND_IS_SMALL, Utils.getCallLocationName()); }
[ "public", "<", "R", ">", "CrossOperator", ".", "DefaultCross", "<", "T", ",", "R", ">", "crossWithTiny", "(", "DataSet", "<", "R", ">", "other", ")", "{", "return", "new", "CrossOperator", ".", "DefaultCross", "<>", "(", "this", ",", "other", ",", "Cro...
Initiates a Cross transformation. <p>A Cross transformation combines the elements of two {@link DataSet DataSets} into one DataSet. It builds all pair combinations of elements of both DataSets, i.e., it builds a Cartesian product. This method also gives the hint to the optimizer that the second DataSet to cross is muc...
[ "Initiates", "a", "Cross", "transformation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L1087-L1089
train
Cross with tiny data set.
[ 30522, 2270, 1026, 1054, 1028, 2892, 25918, 8844, 1012, 12398, 16458, 1026, 1056, 1010, 1054, 1028, 2892, 24415, 7629, 2100, 1006, 2951, 13462, 1026, 1054, 1028, 2060, 1007, 1063, 2709, 2047, 2892, 25918, 8844, 1012, 12398, 16458, 1026, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java
DateTimeUtils.newDateFormat
public static SimpleDateFormat newDateFormat(String format) { SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.ROOT); sdf.setLenient(false); return sdf; }
java
public static SimpleDateFormat newDateFormat(String format) { SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.ROOT); sdf.setLenient(false); return sdf; }
[ "public", "static", "SimpleDateFormat", "newDateFormat", "(", "String", "format", ")", "{", "SimpleDateFormat", "sdf", "=", "new", "SimpleDateFormat", "(", "format", ",", "Locale", ".", "ROOT", ")", ";", "sdf", ".", "setLenient", "(", "false", ")", ";", "ret...
Creates a new date formatter with Farrago specific options. Farrago parsing is strict and does not allow values such as day 0, month 13, etc. @param format {@link SimpleDateFormat} pattern
[ "Creates", "a", "new", "date", "formatter", "with", "Farrago", "specific", "options", ".", "Farrago", "parsing", "is", "strict", "and", "does", "not", "allow", "values", "such", "as", "day", "0", "month", "13", "etc", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java#L306-L310
train
Create a SimpleDateFormat object with the specified format.
[ 30522, 2270, 10763, 3722, 13701, 14192, 4017, 2047, 13701, 14192, 4017, 1006, 5164, 4289, 1007, 1063, 3722, 13701, 14192, 4017, 17371, 2546, 1027, 2047, 3722, 13701, 14192, 4017, 1006, 4289, 1010, 2334, 2063, 1012, 7117, 1007, 1025, 17371, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/util/InlineExpressionParser.java
InlineExpressionParser.splitAndEvaluate
public List<String> splitAndEvaluate() { if (null == inlineExpression) { return Collections.emptyList(); } return flatten(evaluate(split())); }
java
public List<String> splitAndEvaluate() { if (null == inlineExpression) { return Collections.emptyList(); } return flatten(evaluate(split())); }
[ "public", "List", "<", "String", ">", "splitAndEvaluate", "(", ")", "{", "if", "(", "null", "==", "inlineExpression", ")", "{", "return", "Collections", ".", "emptyList", "(", ")", ";", "}", "return", "flatten", "(", "evaluate", "(", "split", "(", ")", ...
Split and evaluate inline expression. @return result list
[ "Split", "and", "evaluate", "inline", "expression", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/util/InlineExpressionParser.java#L70-L75
train
Splits the inline expression and evaluates the result.
[ 30522, 2270, 2862, 1026, 5164, 1028, 3975, 5685, 13331, 7630, 3686, 1006, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 23881, 10288, 20110, 3258, 1007, 1063, 2709, 6407, 1012, 4064, 9863, 1006, 1007, 1025, 1065, 2709, 4257, 6528, 1006, 16157,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/FutureUtils.java
FutureUtils.getFailedFuture
public static <T> CompletableFuture<T> getFailedFuture(Throwable throwable) { CompletableFuture<T> failedAttempt = new CompletableFuture<>(); failedAttempt.completeExceptionally(throwable); return failedAttempt; }
java
public static <T> CompletableFuture<T> getFailedFuture(Throwable throwable) { CompletableFuture<T> failedAttempt = new CompletableFuture<>(); failedAttempt.completeExceptionally(throwable); return failedAttempt; }
[ "public", "static", "<", "T", ">", "CompletableFuture", "<", "T", ">", "getFailedFuture", "(", "Throwable", "throwable", ")", "{", "CompletableFuture", "<", "T", ">", "failedAttempt", "=", "new", "CompletableFuture", "<>", "(", ")", ";", "failedAttempt", ".", ...
Returns a {@link CompletableFuture} that has failed with the exception provided as argument. @param throwable the exception to fail the future with. @return The failed future.
[ "Returns", "a", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/FutureUtils.java#L38-L42
train
Gets the failed future.
[ 30522, 2270, 10763, 1026, 1056, 1028, 4012, 10814, 10880, 11263, 11244, 1026, 1056, 1028, 2131, 7011, 18450, 11263, 11244, 1006, 5466, 3085, 5466, 3085, 1007, 1063, 4012, 10814, 10880, 11263, 11244, 1026, 1056, 1028, 3478, 19321, 6633, 13876,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/servlet/multipart/MultipartFormData.java
MultipartFormData.putFile
private void putFile(String name, UploadFile uploadFile) { UploadFile[] fileUploads = requestFiles.get(name); fileUploads = fileUploads == null ? new UploadFile[] { uploadFile } : ArrayUtil.append(fileUploads, uploadFile); requestFiles.put(name, fileUploads); }
java
private void putFile(String name, UploadFile uploadFile) { UploadFile[] fileUploads = requestFiles.get(name); fileUploads = fileUploads == null ? new UploadFile[] { uploadFile } : ArrayUtil.append(fileUploads, uploadFile); requestFiles.put(name, fileUploads); }
[ "private", "void", "putFile", "(", "String", "name", ",", "UploadFile", "uploadFile", ")", "{", "UploadFile", "[", "]", "fileUploads", "=", "requestFiles", ".", "get", "(", "name", ")", ";", "fileUploads", "=", "fileUploads", "==", "null", "?", "new", "Upl...
加入上传文件 @param name 参数名 @param uploadFile 文件
[ "加入上传文件" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/servlet/multipart/MultipartFormData.java#L227-L231
train
Adds the file to the list of files to be uploaded.
[ 30522, 2797, 11675, 2404, 8873, 2571, 1006, 5164, 2171, 1010, 2039, 11066, 8873, 2571, 2039, 11066, 8873, 2571, 1007, 1063, 2039, 11066, 8873, 2571, 1031, 1033, 5371, 6279, 11066, 2015, 1027, 5227, 8873, 4244, 1012, 2131, 1006, 2171, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/mining/word2vec/Corpus.java
Corpus.searchVocab
int searchVocab(String word) { if (word == null) return -1; Integer pos = vocabIndexMap.get(word); return pos == null ? -1 : pos.intValue(); }
java
int searchVocab(String word) { if (word == null) return -1; Integer pos = vocabIndexMap.get(word); return pos == null ? -1 : pos.intValue(); }
[ "int", "searchVocab", "(", "String", "word", ")", "{", "if", "(", "word", "==", "null", ")", "return", "-", "1", ";", "Integer", "pos", "=", "vocabIndexMap", ".", "get", "(", "word", ")", ";", "return", "pos", "==", "null", "?", "-", "1", ":", "p...
Returns position of a word in the vocabulary; if the word is not found, returns -1 @param word @return
[ "Returns", "position", "of", "a", "word", "in", "the", "vocabulary", ";", "if", "the", "word", "is", "not", "found", "returns", "-", "1" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/mining/word2vec/Corpus.java#L137-L142
train
Search the vocabulary for a word.
[ 30522, 20014, 3945, 6767, 3540, 2497, 1006, 5164, 2773, 1007, 1063, 2065, 1006, 2773, 1027, 1027, 19701, 1007, 2709, 1011, 1015, 1025, 16109, 13433, 2015, 1027, 29536, 3540, 8428, 3207, 2595, 2863, 2361, 1012, 2131, 1006, 2773, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-http/src/main/java/cn/hutool/http/HtmlUtil.java
HtmlUtil.removeHtmlTag
public static String removeHtmlTag(String content, String... tagNames) { return removeHtmlTag(content, true, tagNames); }
java
public static String removeHtmlTag(String content, String... tagNames) { return removeHtmlTag(content, true, tagNames); }
[ "public", "static", "String", "removeHtmlTag", "(", "String", "content", ",", "String", "...", "tagNames", ")", "{", "return", "removeHtmlTag", "(", "content", ",", "true", ",", "tagNames", ")", ";", "}" ]
清除指定HTML标签和被标签包围的内容<br> 不区分大小写 @param content 文本 @param tagNames 要清除的标签 @return 去除标签后的文本
[ "清除指定HTML标签和被标签包围的内容<br", ">", "不区分大小写" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HtmlUtil.java#L97-L99
train
Remove HTML tags from a string.
[ 30522, 2270, 10763, 5164, 6366, 11039, 19968, 15900, 1006, 5164, 4180, 1010, 5164, 1012, 1012, 1012, 6415, 18442, 2015, 1007, 1063, 2709, 6366, 11039, 19968, 15900, 1006, 4180, 1010, 2995, 1010, 6415, 18442, 2015, 1007, 1025, 1065, 102, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/MultipleIdsMessageAcknowledgingSourceBase.java
MultipleIdsMessageAcknowledgingSourceBase.acknowledgeIDs
@Override protected final void acknowledgeIDs(long checkpointId, Set<UId> uniqueIds) { LOG.debug("Acknowledging ids for checkpoint {}", checkpointId); Iterator<Tuple2<Long, List<SessionId>>> iterator = sessionIdsPerSnapshot.iterator(); while (iterator.hasNext()) { final Tuple2<Long, List<SessionId>> next = it...
java
@Override protected final void acknowledgeIDs(long checkpointId, Set<UId> uniqueIds) { LOG.debug("Acknowledging ids for checkpoint {}", checkpointId); Iterator<Tuple2<Long, List<SessionId>>> iterator = sessionIdsPerSnapshot.iterator(); while (iterator.hasNext()) { final Tuple2<Long, List<SessionId>> next = it...
[ "@", "Override", "protected", "final", "void", "acknowledgeIDs", "(", "long", "checkpointId", ",", "Set", "<", "UId", ">", "uniqueIds", ")", "{", "LOG", ".", "debug", "(", "\"Acknowledging ids for checkpoint {}\"", ",", "checkpointId", ")", ";", "Iterator", "<",...
Acknowledges the session ids. @param checkpointId The id of the current checkout to acknowledge ids for. @param uniqueIds The checkpointed unique ids which are ignored here. They only serve as a means of de-duplicating messages when the acknowledgment after a checkpoint fails.
[ "Acknowledges", "the", "session", "ids", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/MultipleIdsMessageAcknowledgingSourceBase.java#L114-L127
train
Acknowledges the session ids for a given checkpoint.
[ 30522, 1030, 2058, 15637, 5123, 2345, 11675, 13399, 9821, 1006, 2146, 26520, 3593, 1010, 2275, 1026, 21318, 2094, 1028, 4310, 9821, 1007, 1063, 8833, 1012, 2139, 8569, 2290, 1006, 1000, 21894, 8909, 2015, 2005, 26520, 1063, 1065, 1000, 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...
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/firefox/FirefoxBinary.java
FirefoxBinary.locateFirefoxBinariesFromPlatform
private static Stream<Executable> locateFirefoxBinariesFromPlatform() { ImmutableList.Builder<Executable> executables = new ImmutableList.Builder<>(); Platform current = Platform.getCurrent(); if (current.is(WINDOWS)) { executables.addAll(Stream.of("Mozilla Firefox\\firefox.exe", ...
java
private static Stream<Executable> locateFirefoxBinariesFromPlatform() { ImmutableList.Builder<Executable> executables = new ImmutableList.Builder<>(); Platform current = Platform.getCurrent(); if (current.is(WINDOWS)) { executables.addAll(Stream.of("Mozilla Firefox\\firefox.exe", ...
[ "private", "static", "Stream", "<", "Executable", ">", "locateFirefoxBinariesFromPlatform", "(", ")", "{", "ImmutableList", ".", "Builder", "<", "Executable", ">", "executables", "=", "new", "ImmutableList", ".", "Builder", "<>", "(", ")", ";", "Platform", "curr...
Locates the firefox binary by platform.
[ "Locates", "the", "firefox", "binary", "by", "platform", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/firefox/FirefoxBinary.java#L200-L258
train
Locate firefox binary from platform.
[ 30522, 2797, 10763, 5460, 1026, 4654, 8586, 23056, 1028, 12453, 10273, 14876, 2595, 21114, 5134, 19699, 25377, 20051, 14192, 1006, 1007, 1063, 10047, 28120, 3085, 9863, 1012, 12508, 1026, 4654, 8586, 23056, 1028, 4654, 8586, 23056, 2015, 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...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/cookie/ClientCookieEncoder.java
ClientCookieEncoder.encode
public String encode(Iterable<? extends Cookie> cookies) { Iterator<? extends Cookie> cookiesIt = checkNotNull(cookies, "cookies").iterator(); if (!cookiesIt.hasNext()) { return null; } StringBuilder buf = stringBuilder(); if (strict) { Cookie firstCookie...
java
public String encode(Iterable<? extends Cookie> cookies) { Iterator<? extends Cookie> cookiesIt = checkNotNull(cookies, "cookies").iterator(); if (!cookiesIt.hasNext()) { return null; } StringBuilder buf = stringBuilder(); if (strict) { Cookie firstCookie...
[ "public", "String", "encode", "(", "Iterable", "<", "?", "extends", "Cookie", ">", "cookies", ")", "{", "Iterator", "<", "?", "extends", "Cookie", ">", "cookiesIt", "=", "checkNotNull", "(", "cookies", ",", "\"cookies\"", ")", ".", "iterator", "(", ")", ...
Encodes the specified cookies into a single Cookie header value. @param cookies some cookies @return a Rfc6265 style Cookie header value, null if no cookies are passed.
[ "Encodes", "the", "specified", "cookies", "into", "a", "single", "Cookie", "header", "value", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/cookie/ClientCookieEncoder.java#L184-L213
train
Encode a collection of cookies.
[ 30522, 2270, 5164, 4372, 16044, 1006, 2009, 6906, 3468, 1026, 1029, 8908, 17387, 1028, 16324, 1007, 1063, 2009, 6906, 4263, 1026, 1029, 8908, 17387, 1028, 16324, 4183, 1027, 4638, 17048, 11231, 3363, 1006, 16324, 1010, 1000, 16324, 1000, 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-log/src/main/java/cn/hutool/log/dialect/slf4j/Slf4jLog.java
Slf4jLog.locationAwareLog
private boolean locationAwareLog(int level_int, String msgTemplate, Object[] arguments) { return locationAwareLog(level_int, null, msgTemplate, arguments); }
java
private boolean locationAwareLog(int level_int, String msgTemplate, Object[] arguments) { return locationAwareLog(level_int, null, msgTemplate, arguments); }
[ "private", "boolean", "locationAwareLog", "(", "int", "level_int", ",", "String", "msgTemplate", ",", "Object", "[", "]", "arguments", ")", "{", "return", "locationAwareLog", "(", "level_int", ",", "null", ",", "msgTemplate", ",", "arguments", ")", ";", "}" ]
打印日志<br> 此方法用于兼容底层日志实现,通过传入当前包装类名,以解决打印日志中行号错误问题 @param level_int 日志级别,使用LocationAwareLogger中的常量 @param msgTemplate 消息模板 @param arguments 参数 @return 是否支持 LocationAwareLogger对象,如果不支持需要日志方法调用被包装类的相应方法
[ "打印日志<br", ">", "此方法用于兼容底层日志实现,通过传入当前包装类名,以解决打印日志中行号错误问题" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-log/src/main/java/cn/hutool/log/dialect/slf4j/Slf4jLog.java#L187-L189
train
Location aware log.
[ 30522, 2797, 22017, 20898, 3295, 10830, 16570, 8649, 1006, 20014, 2504, 1035, 20014, 1010, 5164, 5796, 13512, 6633, 15725, 1010, 4874, 1031, 1033, 9918, 1007, 1063, 2709, 3295, 10830, 16570, 8649, 1006, 2504, 1035, 20014, 1010, 19701, 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/convert/impl/NumberConverter.java
NumberConverter.toBigDecimal
private BigDecimal toBigDecimal(Object value) { if (value instanceof Long) { return new BigDecimal((Long) value); } else if (value instanceof Integer) { return new BigDecimal((Integer) value); } else if (value instanceof BigInteger) { return new BigDecimal((BigInteger) value); } else if(value in...
java
private BigDecimal toBigDecimal(Object value) { if (value instanceof Long) { return new BigDecimal((Long) value); } else if (value instanceof Integer) { return new BigDecimal((Integer) value); } else if (value instanceof BigInteger) { return new BigDecimal((BigInteger) value); } else if(value in...
[ "private", "BigDecimal", "toBigDecimal", "(", "Object", "value", ")", "{", "if", "(", "value", "instanceof", "Long", ")", "{", "return", "new", "BigDecimal", "(", "(", "Long", ")", "value", ")", ";", "}", "else", "if", "(", "value", "instanceof", "Intege...
转换为BigDecimal<br> 如果给定的值为空,或者转换失败,返回默认值<br> 转换失败不会报错 @param value 被转换的值 @return 结果
[ "转换为BigDecimal<br", ">", "如果给定的值为空,或者转换失败,返回默认值<br", ">", "转换失败不会报错" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/convert/impl/NumberConverter.java#L158-L175
train
Converts value to BigDecimal.
[ 30522, 2797, 2502, 3207, 6895, 9067, 2000, 5638, 2290, 3207, 6895, 9067, 1006, 4874, 3643, 1007, 1063, 2065, 1006, 3643, 6013, 11253, 2146, 1007, 1063, 2709, 2047, 2502, 3207, 6895, 9067, 1006, 1006, 2146, 1007, 3643, 1007, 1025, 1065, 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...
networknt/light-4j
client/src/main/java/com/networknt/client/oauth/OauthHelper.java
OauthHelper.getCCTokenRemotely
private static Result<Jwt> getCCTokenRemotely(final Jwt jwt) { TokenRequest tokenRequest = new ClientCredentialsRequest(); //scopes at this point is may not be set yet when issuing a new token. setScope(tokenRequest, jwt); Result<TokenResponse> result = OauthHelper.getTokenResult(tokenRe...
java
private static Result<Jwt> getCCTokenRemotely(final Jwt jwt) { TokenRequest tokenRequest = new ClientCredentialsRequest(); //scopes at this point is may not be set yet when issuing a new token. setScope(tokenRequest, jwt); Result<TokenResponse> result = OauthHelper.getTokenResult(tokenRe...
[ "private", "static", "Result", "<", "Jwt", ">", "getCCTokenRemotely", "(", "final", "Jwt", "jwt", ")", "{", "TokenRequest", "tokenRequest", "=", "new", "ClientCredentialsRequest", "(", ")", ";", "//scopes at this point is may not be set yet when issuing a new token.", "se...
get Client Credential token from auth server @param jwt the jwt you want to renew @return Jwt when success, it will be the same object as the jwt you passed in; return Status when fail;
[ "get", "Client", "Credential", "token", "from", "auth", "server" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/com/networknt/client/oauth/OauthHelper.java#L644-L662
train
Get the client credentials token remotely.
[ 30522, 2797, 10763, 2765, 1026, 1046, 26677, 1028, 2131, 9468, 18715, 2368, 28578, 12184, 2135, 1006, 2345, 1046, 26677, 1046, 26677, 1007, 1063, 19204, 2890, 15500, 19204, 2890, 15500, 1027, 2047, 7396, 16748, 16454, 26340, 2890, 15500, 1006...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-setting/src/main/java/cn/hutool/setting/AbsSetting.java
AbsSetting.getInt
public Integer getInt(String key, String group) { return getInt(key, group, null); }
java
public Integer getInt(String key, String group) { return getInt(key, group, null); }
[ "public", "Integer", "getInt", "(", "String", "key", ",", "String", "group", ")", "{", "return", "getInt", "(", "key", ",", "group", ",", "null", ")", ";", "}" ]
获取数字型型属性值 @param key 属性名 @param group 分组名 @return 属性值
[ "获取数字型型属性值" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/AbsSetting.java#L152-L154
train
Returns the value of the specified key in the specified group.
[ 30522, 2270, 16109, 2131, 18447, 1006, 5164, 3145, 1010, 5164, 2177, 1007, 1063, 2709, 2131, 18447, 1006, 3145, 1010, 2177, 1010, 19701, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/bind/BindResult.java
BindResult.map
public <U> BindResult<U> map(Function<? super T, ? extends U> mapper) { Assert.notNull(mapper, "Mapper must not be null"); return of((this.value != null) ? mapper.apply(this.value) : null); }
java
public <U> BindResult<U> map(Function<? super T, ? extends U> mapper) { Assert.notNull(mapper, "Mapper must not be null"); return of((this.value != null) ? mapper.apply(this.value) : null); }
[ "public", "<", "U", ">", "BindResult", "<", "U", ">", "map", "(", "Function", "<", "?", "super", "T", ",", "?", "extends", "U", ">", "mapper", ")", "{", "Assert", ".", "notNull", "(", "mapper", ",", "\"Mapper must not be null\"", ")", ";", "return", ...
Apply the provided mapping function to the bound value, or return an updated unbound result if no value has been bound. @param <U> the type of the result of the mapping function @param mapper a mapping function to apply to the bound value. The mapper will not be invoked if no value has been bound. @return an {@code Bin...
[ "Apply", "the", "provided", "mapping", "function", "to", "the", "bound", "value", "or", "return", "an", "updated", "unbound", "result", "if", "no", "value", "has", "been", "bound", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindResult.java#L90-L93
train
Maps this BindResult to the result of applying the given function to the result.
[ 30522, 2270, 1026, 1057, 1028, 14187, 6072, 11314, 1026, 1057, 1028, 4949, 1006, 3853, 1026, 1029, 3565, 1056, 1010, 1029, 8908, 1057, 1028, 4949, 4842, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 4949, 4842, 1010, 1000, 4949, 4842, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.printOnTaskManager
public DataSink<T> printOnTaskManager(String prefix) { return output(new PrintingOutputFormat<T>(prefix, false)); }
java
public DataSink<T> printOnTaskManager(String prefix) { return output(new PrintingOutputFormat<T>(prefix, false)); }
[ "public", "DataSink", "<", "T", ">", "printOnTaskManager", "(", "String", "prefix", ")", "{", "return", "output", "(", "new", "PrintingOutputFormat", "<", "T", ">", "(", "prefix", ",", "false", ")", ")", ";", "}" ]
Writes a DataSet to the standard output streams (stdout) of the TaskManagers that execute the program (or more specifically, the data sink operators). On a typical cluster setup, the data will appear in the TaskManagers' <i>.out</i> files. <p>To print the data to the console or stdout stream of the client process inst...
[ "Writes", "a", "DataSet", "to", "the", "standard", "output", "streams", "(", "stdout", ")", "of", "the", "TaskManagers", "that", "execute", "the", "program", "(", "or", "more", "specifically", "the", "data", "sink", "operators", ")", ".", "On", "a", "typic...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L1694-L1696
train
Print on task manager.
[ 30522, 2270, 2951, 11493, 2243, 1026, 1056, 1028, 6140, 12162, 19895, 24805, 4590, 1006, 5164, 17576, 1007, 1063, 2709, 6434, 1006, 2047, 8021, 5833, 18780, 14192, 4017, 1026, 1056, 1028, 1006, 17576, 1010, 6270, 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...
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GSAConfiguration.java
GSAConfiguration.addBroadcastSetForSumFunction
public void addBroadcastSetForSumFunction(String name, DataSet<?> data) { this.bcVarsSum.add(new Tuple2<>(name, data)); }
java
public void addBroadcastSetForSumFunction(String name, DataSet<?> data) { this.bcVarsSum.add(new Tuple2<>(name, data)); }
[ "public", "void", "addBroadcastSetForSumFunction", "(", "String", "name", ",", "DataSet", "<", "?", ">", "data", ")", "{", "this", ".", "bcVarsSum", ".", "add", "(", "new", "Tuple2", "<>", "(", "name", ",", "data", ")", ")", ";", "}" ]
Adds a data set as a broadcast set to the sum function. @param name The name under which the broadcast data is available in the sum function. @param data The data set to be broadcast.
[ "Adds", "a", "data", "set", "as", "a", "broadcast", "set", "to", "the", "sum", "function", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GSAConfiguration.java#L70-L72
train
Adds a data set to the sum function.
[ 30522, 2270, 11675, 5587, 12618, 4215, 10526, 13462, 29278, 17421, 11263, 27989, 1006, 5164, 2171, 1010, 2951, 13462, 1026, 1029, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/MessageToByteEncoder.java
MessageToByteEncoder.allocateBuffer
protected ByteBuf allocateBuffer(ChannelHandlerContext ctx, @SuppressWarnings("unused") I msg, boolean preferDirect) throws Exception { if (preferDirect) { return ctx.alloc().ioBuffer(); } else { return ctx.alloc().heapBuffer(); } }
java
protected ByteBuf allocateBuffer(ChannelHandlerContext ctx, @SuppressWarnings("unused") I msg, boolean preferDirect) throws Exception { if (preferDirect) { return ctx.alloc().ioBuffer(); } else { return ctx.alloc().heapBuffer(); } }
[ "protected", "ByteBuf", "allocateBuffer", "(", "ChannelHandlerContext", "ctx", ",", "@", "SuppressWarnings", "(", "\"unused\"", ")", "I", "msg", ",", "boolean", "preferDirect", ")", "throws", "Exception", "{", "if", "(", "preferDirect", ")", "{", "return", "ctx"...
Allocate a {@link ByteBuf} which will be used as argument of {@link #encode(ChannelHandlerContext, I, ByteBuf)}. Sub-classes may override this method to return {@link ByteBuf} with a perfect matching {@code initialCapacity}.
[ "Allocate", "a", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/MessageToByteEncoder.java#L137-L144
train
Allocate a buffer for a single message.
[ 30522, 5123, 24880, 8569, 2546, 2035, 24755, 2618, 8569, 12494, 1006, 3149, 11774, 3917, 8663, 18209, 14931, 2595, 1010, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 15171, 1000, 1007, 1045, 5796, 2290, 1010, 22017, 20898, 9544, 4305, 2890, 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...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/tasks/AbstractInvokable.java
AbstractInvokable.triggerCheckpoint
public boolean triggerCheckpoint(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, boolean advanceToEndOfEventTime) throws Exception { throw new UnsupportedOperationException(String.format("triggerCheckpoint not supported by %s", this.getClass().getName())); }
java
public boolean triggerCheckpoint(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, boolean advanceToEndOfEventTime) throws Exception { throw new UnsupportedOperationException(String.format("triggerCheckpoint not supported by %s", this.getClass().getName())); }
[ "public", "boolean", "triggerCheckpoint", "(", "CheckpointMetaData", "checkpointMetaData", ",", "CheckpointOptions", "checkpointOptions", ",", "boolean", "advanceToEndOfEventTime", ")", "throws", "Exception", "{", "throw", "new", "UnsupportedOperationException", "(", "String"...
This method is called to trigger a checkpoint, asynchronously by the checkpoint coordinator. <p>This method is called for tasks that start the checkpoints by injecting the initial barriers, i.e., the source tasks. In contrast, checkpoints on downstream operators, which are the result of receiving checkpoint barriers, ...
[ "This", "method", "is", "called", "to", "trigger", "a", "checkpoint", "asynchronously", "by", "the", "checkpoint", "coordinator", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/tasks/AbstractInvokable.java#L211-L213
train
Triggers a checkpoint.
[ 30522, 2270, 22017, 20898, 9495, 5403, 3600, 8400, 1006, 26520, 11368, 8447, 2696, 26520, 11368, 8447, 2696, 1010, 26520, 7361, 9285, 26520, 7361, 9285, 1010, 22017, 20898, 5083, 3406, 10497, 11253, 30524, 1007, 1012, 2131, 18442, 1006, 1007,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java
SSLUtils.createRestSSLContext
@Nullable private static SSLContext createRestSSLContext(Configuration config, RestSSLContextConfigMode configMode) throws Exception { checkNotNull(config, "config"); if (!isRestSSLEnabled(config)) { return null; } KeyManager[] keyManagers = null; if (configMode == RestSSLContextConfigMode.SERVER || con...
java
@Nullable private static SSLContext createRestSSLContext(Configuration config, RestSSLContextConfigMode configMode) throws Exception { checkNotNull(config, "config"); if (!isRestSSLEnabled(config)) { return null; } KeyManager[] keyManagers = null; if (configMode == RestSSLContextConfigMode.SERVER || con...
[ "@", "Nullable", "private", "static", "SSLContext", "createRestSSLContext", "(", "Configuration", "config", ",", "RestSSLContextConfigMode", "configMode", ")", "throws", "Exception", "{", "checkNotNull", "(", "config", ",", "\"config\"", ")", ";", "if", "(", "!", ...
Creates an SSL context for the external REST SSL. If mutual authentication is configured the client and the server side configuration are identical.
[ "Creates", "an", "SSL", "context", "for", "the", "external", "REST", "SSL", ".", "If", "mutual", "authentication", "is", "configured", "the", "client", "and", "the", "server", "side", "configuration", "are", "identical", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java#L269-L323
train
Creates a Rest SSL context.
[ 30522, 1030, 19701, 3085, 2797, 10763, 7020, 22499, 10111, 18413, 3443, 28533, 4757, 22499, 10111, 18413, 1006, 9563, 9530, 8873, 2290, 1010, 16626, 14540, 8663, 18209, 8663, 8873, 21693, 10244, 9530, 8873, 21693, 10244, 1007, 11618, 6453, 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-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.fromCsvReader
public static <K, VV> GraphCsvReader fromCsvReader(String edgesPath, final MapFunction<K, VV> vertexValueInitializer, ExecutionEnvironment context) { return new GraphCsvReader(edgesPath, vertexValueInitializer, context); }
java
public static <K, VV> GraphCsvReader fromCsvReader(String edgesPath, final MapFunction<K, VV> vertexValueInitializer, ExecutionEnvironment context) { return new GraphCsvReader(edgesPath, vertexValueInitializer, context); }
[ "public", "static", "<", "K", ",", "VV", ">", "GraphCsvReader", "fromCsvReader", "(", "String", "edgesPath", ",", "final", "MapFunction", "<", "K", ",", "VV", ">", "vertexValueInitializer", ",", "ExecutionEnvironment", "context", ")", "{", "return", "new", "Gr...
Creates a graph from a CSV file of edges. Vertices will be created automatically and Vertex values can be initialized using a user-defined mapper. @param edgesPath a path to a CSV file with the Edge data @param vertexValueInitializer the mapper function that initializes the vertex values. It allows to apply a map tran...
[ "Creates", "a", "graph", "from", "a", "CSV", "file", "of", "edges", ".", "Vertices", "will", "be", "created", "automatically", "and", "Vertex", "values", "can", "be", "initialized", "using", "a", "user", "-", "defined", "mapper", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L428-L431
train
Creates a GraphCsvReader from the given edgesPath and vertexValueInitializer.
[ 30522, 2270, 10763, 1026, 1047, 1010, 1058, 2615, 1028, 10629, 6169, 12229, 9648, 2099, 2013, 6169, 12229, 9648, 2099, 1006, 5164, 7926, 15069, 1010, 2345, 4949, 11263, 27989, 1026, 1047, 1010, 1058, 2615, 1028, 19449, 10175, 5657, 5498, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/ConnectedStreams.java
ConnectedStreams.keyBy
public ConnectedStreams<IN1, IN2> keyBy(int keyPosition1, int keyPosition2) { return new ConnectedStreams<>(this.environment, inputStream1.keyBy(keyPosition1), inputStream2.keyBy(keyPosition2)); }
java
public ConnectedStreams<IN1, IN2> keyBy(int keyPosition1, int keyPosition2) { return new ConnectedStreams<>(this.environment, inputStream1.keyBy(keyPosition1), inputStream2.keyBy(keyPosition2)); }
[ "public", "ConnectedStreams", "<", "IN1", ",", "IN2", ">", "keyBy", "(", "int", "keyPosition1", ",", "int", "keyPosition2", ")", "{", "return", "new", "ConnectedStreams", "<>", "(", "this", ".", "environment", ",", "inputStream1", ".", "keyBy", "(", "keyPosi...
KeyBy operation for connected data stream. Assigns keys to the elements of input1 and input2 according to keyPosition1 and keyPosition2. @param keyPosition1 The field used to compute the hashcode of the elements in the first input stream. @param keyPosition2 The field used to compute the hashcode of the elements in th...
[ "KeyBy", "operation", "for", "connected", "data", "stream", ".", "Assigns", "keys", "to", "the", "elements", "of", "input1", "and", "input2", "according", "to", "keyPosition1", "and", "keyPosition2", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/ConnectedStreams.java#L122-L125
train
KeyBy operation for connected streams.
[ 30522, 2270, 4198, 21422, 2015, 1026, 1999, 2487, 1010, 1999, 2475, 1028, 3145, 3762, 1006, 20014, 3145, 26994, 2487, 1010, 20014, 3145, 26994, 2475, 1007, 1063, 2709, 2047, 4198, 21422, 2015, 1026, 1028, 1006, 2023, 1012, 4044, 1010, 20407...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java
CollUtil.findOneByField
public static <T> T findOneByField(Iterable<T> collection, final String fieldName, final Object fieldValue) { return findOne(collection, new Filter<T>() { @Override public boolean accept(T t) { if (t instanceof Map) { final Map<?, ?> map = (Map<?, ?>) t; final Object value = map.get(fieldNam...
java
public static <T> T findOneByField(Iterable<T> collection, final String fieldName, final Object fieldValue) { return findOne(collection, new Filter<T>() { @Override public boolean accept(T t) { if (t instanceof Map) { final Map<?, ?> map = (Map<?, ?>) t; final Object value = map.get(fieldNam...
[ "public", "static", "<", "T", ">", "T", "findOneByField", "(", "Iterable", "<", "T", ">", "collection", ",", "final", "String", "fieldName", ",", "final", "Object", "fieldValue", ")", "{", "return", "findOne", "(", "collection", ",", "new", "Filter", "<", ...
查找第一个匹配元素对象<br> 如果集合元素是Map,则比对键和值是否相同,相同则返回<br> 如果为普通Bean,则通过反射比对元素字段名对应的字段值是否相同,相同则返回<br> 如果给定字段值参数是{@code null} 且元素对象中的字段值也为{@code null}则认为相同 @param <T> 集合元素类型 @param collection 集合,集合元素可以是Bean或者Map @param fieldName 集合元素对象的字段名或map的键 @param fieldValue 集合元素对象的字段值或map的值 @return 满足条件的第一个元素 @since 3.1.0
[ "查找第一个匹配元素对象<br", ">", "如果集合元素是Map,则比对键和值是否相同,相同则返回<br", ">", "如果为普通Bean,则通过反射比对元素字段名对应的字段值是否相同,相同则返回<br", ">", "如果给定字段值参数是", "{", "@code", "null", "}", "且元素对象中的字段值也为", "{", "@code", "null", "}", "则认为相同" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java#L1235-L1250
train
Find a single entity by field name.
[ 30522, 2270, 10763, 1026, 1056, 1028, 1056, 2424, 5643, 3762, 3790, 1006, 2009, 6906, 3468, 1026, 1056, 1028, 3074, 1010, 2345, 5164, 2492, 18442, 1010, 2345, 4874, 2492, 10175, 5657, 1007, 1063, 2709, 2424, 5643, 1006, 3074, 1010, 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...
netty/netty
buffer/src/main/java/io/netty/buffer/PooledByteBufAllocator.java
PooledByteBufAllocator.dumpStats
public String dumpStats() { int heapArenasLen = heapArenas == null ? 0 : heapArenas.length; StringBuilder buf = new StringBuilder(512) .append(heapArenasLen) .append(" heap arena(s):") .append(StringUtil.NEWLINE); if (heapArenasLen > 0) { ...
java
public String dumpStats() { int heapArenasLen = heapArenas == null ? 0 : heapArenas.length; StringBuilder buf = new StringBuilder(512) .append(heapArenasLen) .append(" heap arena(s):") .append(StringUtil.NEWLINE); if (heapArenasLen > 0) { ...
[ "public", "String", "dumpStats", "(", ")", "{", "int", "heapArenasLen", "=", "heapArenas", "==", "null", "?", "0", ":", "heapArenas", ".", "length", ";", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", "512", ")", ".", "append", "(", "heapArenasL...
Returns the status of the allocator (which contains all metrics) as string. Be aware this may be expensive and so should not called too frequently.
[ "Returns", "the", "status", "of", "the", "allocator", "(", "which", "contains", "all", "metrics", ")", "as", "string", ".", "Be", "aware", "this", "may", "be", "expensive", "and", "so", "should", "not", "called", "too", "frequently", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/PooledByteBufAllocator.java#L649-L673
train
Dump the stats of the tc_record_type
[ 30522, 2270, 5164, 15653, 9153, 3215, 1006, 1007, 1063, 20014, 16721, 12069, 11649, 7770, 1027, 16721, 12069, 11649, 1027, 1027, 19701, 1029, 1014, 1024, 16721, 12069, 11649, 1012, 3091, 1025, 5164, 8569, 23891, 2099, 20934, 2546, 1027, 2047,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/seg/CharacterBasedSegment.java
CharacterBasedSegment.toVertexList
protected List<Vertex> toVertexList(List<Term> wordList, boolean appendStart) { ArrayList<Vertex> vertexList = new ArrayList<Vertex>(wordList.size() + 2); if (appendStart) vertexList.add(Vertex.newB()); for (Term word : wordList) { CoreDictionary.Attribute attribute = gue...
java
protected List<Vertex> toVertexList(List<Term> wordList, boolean appendStart) { ArrayList<Vertex> vertexList = new ArrayList<Vertex>(wordList.size() + 2); if (appendStart) vertexList.add(Vertex.newB()); for (Term word : wordList) { CoreDictionary.Attribute attribute = gue...
[ "protected", "List", "<", "Vertex", ">", "toVertexList", "(", "List", "<", "Term", ">", "wordList", ",", "boolean", "appendStart", ")", "{", "ArrayList", "<", "Vertex", ">", "vertexList", "=", "new", "ArrayList", "<", "Vertex", ">", "(", "wordList", ".", ...
将中间结果转换为词网顶点, 这样就可以利用基于Vertex开发的功能, 如词性标注、NER等 @param wordList @param appendStart @return
[ "将中间结果转换为词网顶点", "这样就可以利用基于Vertex开发的功能", "如词性标注、NER等" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/CharacterBasedSegment.java#L107-L119
train
To vertex list.
[ 30522, 5123, 2862, 1026, 19449, 1028, 2000, 16874, 10288, 9863, 1006, 2862, 1026, 2744, 1028, 2773, 9863, 1010, 22017, 20898, 10439, 10497, 14117, 2102, 1007, 1063, 9140, 9863, 1026, 19449, 1028, 19449, 9863, 1027, 2047, 9140, 9863, 1026, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/QueryStringDecoder.java
QueryStringDecoder.path
public String path() { if (path == null) { path = decodeComponent(uri, 0, pathEndIdx(), charset, true); } return path; }
java
public String path() { if (path == null) { path = decodeComponent(uri, 0, pathEndIdx(), charset, true); } return path; }
[ "public", "String", "path", "(", ")", "{", "if", "(", "path", "==", "null", ")", "{", "path", "=", "decodeComponent", "(", "uri", ",", "0", ",", "pathEndIdx", "(", ")", ",", "charset", ",", "true", ")", ";", "}", "return", "path", ";", "}" ]
Returns the decoded path string of the URI.
[ "Returns", "the", "decoded", "path", "string", "of", "the", "URI", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/QueryStringDecoder.java#L168-L173
train
Get the path of the URL.
[ 30522, 2270, 5164, 4130, 1006, 1007, 1063, 2065, 1006, 4130, 1027, 1027, 19701, 1007, 1063, 4130, 1027, 21933, 3207, 9006, 29513, 3372, 1006, 24471, 2072, 1010, 1014, 1010, 4130, 10497, 3593, 2595, 1006, 1007, 1010, 25869, 13462, 1010, 2995...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/client/WebClientExchangeTags.java
WebClientExchangeTags.status
public static Tag status(ClientResponse response) { return Tag.of("status", String.valueOf(response.statusCode().value())); }
java
public static Tag status(ClientResponse response) { return Tag.of("status", String.valueOf(response.statusCode().value())); }
[ "public", "static", "Tag", "status", "(", "ClientResponse", "response", ")", "{", "return", "Tag", ".", "of", "(", "\"status\"", ",", "String", ".", "valueOf", "(", "response", ".", "statusCode", "(", ")", ".", "value", "(", ")", ")", ")", ";", "}" ]
Creates a {@code status} {@code Tag} derived from the {@link ClientResponse#statusCode()} of the given {@code response}. @param response the response @return the status tag
[ "Creates", "a", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/client/WebClientExchangeTags.java#L99-L101
train
Creates a tag from a response.
[ 30522, 2270, 10763, 6415, 3570, 1006, 7396, 6072, 26029, 3366, 3433, 1007, 1063, 2709, 6415, 1012, 1997, 1006, 1000, 3570, 1000, 1010, 5164, 1012, 3643, 11253, 1006, 3433, 1012, 3570, 16044, 1006, 1007, 1012, 3643, 1006, 1007, 1007, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/MessageParameter.java
MessageParameter.resolve
public final void resolve(X value) { Preconditions.checkState(!resolved, "This parameter was already resolved."); this.value = Preconditions.checkNotNull(value); this.resolved = true; }
java
public final void resolve(X value) { Preconditions.checkState(!resolved, "This parameter was already resolved."); this.value = Preconditions.checkNotNull(value); this.resolved = true; }
[ "public", "final", "void", "resolve", "(", "X", "value", ")", "{", "Preconditions", ".", "checkState", "(", "!", "resolved", ",", "\"This parameter was already resolved.\"", ")", ";", "this", ".", "value", "=", "Preconditions", ".", "checkNotNull", "(", "value",...
Resolves this parameter for the given value. @param value value to resolve this parameter with
[ "Resolves", "this", "parameter", "for", "the", "given", "value", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/MessageParameter.java#L64-L68
train
Resolves the parameter with the given value.
[ 30522, 2270, 2345, 11675, 10663, 1006, 1060, 3643, 1007, 1063, 3653, 8663, 20562, 2015, 1012, 14148, 12259, 1006, 999, 10395, 1010, 1000, 2023, 16381, 2001, 2525, 10395, 1012, 1000, 1007, 1025, 2023, 1012, 3643, 1027, 3653, 8663, 20562, 201...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/operators/base/GroupReduceOperatorBase.java
GroupReduceOperatorBase.executeOnCollections
@Override protected List<OUT> executeOnCollections(List<IN> inputData, RuntimeContext ctx, ExecutionConfig executionConfig) throws Exception { GroupReduceFunction<IN, OUT> function = this.userFunction.getUserCodeObject(); UnaryOperatorInformation<IN, OUT> operatorInfo = getOperatorInfo(); TypeInformation<IN> in...
java
@Override protected List<OUT> executeOnCollections(List<IN> inputData, RuntimeContext ctx, ExecutionConfig executionConfig) throws Exception { GroupReduceFunction<IN, OUT> function = this.userFunction.getUserCodeObject(); UnaryOperatorInformation<IN, OUT> operatorInfo = getOperatorInfo(); TypeInformation<IN> in...
[ "@", "Override", "protected", "List", "<", "OUT", ">", "executeOnCollections", "(", "List", "<", "IN", ">", "inputData", ",", "RuntimeContext", "ctx", ",", "ExecutionConfig", "executionConfig", ")", "throws", "Exception", "{", "GroupReduceFunction", "<", "IN", "...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/base/GroupReduceOperatorBase.java#L167-L228
train
Execute on collections.
[ 30522, 1030, 2058, 15637, 5123, 2862, 1026, 2041, 1028, 15389, 2239, 26895, 18491, 2015, 1006, 2862, 1026, 1999, 1028, 7953, 2850, 2696, 1010, 2448, 7292, 8663, 18209, 14931, 2595, 1010, 7781, 8663, 8873, 2290, 7781, 8663, 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...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/AbstractFilterRegistrationBean.java
AbstractFilterRegistrationBean.addUrlPatterns
public void addUrlPatterns(String... urlPatterns) { Assert.notNull(urlPatterns, "UrlPatterns must not be null"); Collections.addAll(this.urlPatterns, urlPatterns); }
java
public void addUrlPatterns(String... urlPatterns) { Assert.notNull(urlPatterns, "UrlPatterns must not be null"); Collections.addAll(this.urlPatterns, urlPatterns); }
[ "public", "void", "addUrlPatterns", "(", "String", "...", "urlPatterns", ")", "{", "Assert", ".", "notNull", "(", "urlPatterns", ",", "\"UrlPatterns must not be null\"", ")", ";", "Collections", ".", "addAll", "(", "this", ".", "urlPatterns", ",", "urlPatterns", ...
Add URL patterns, as defined in the Servlet specification, that the filter will be registered against. @param urlPatterns the URL patterns
[ "Add", "URL", "patterns", "as", "defined", "in", "the", "Servlet", "specification", "that", "the", "filter", "will", "be", "registered", "against", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/AbstractFilterRegistrationBean.java#L161-L164
train
Add url patterns.
[ 30522, 2270, 11675, 5587, 3126, 14277, 20097, 3619, 1006, 5164, 1012, 1012, 1012, 24471, 14277, 20097, 3619, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 24471, 14277, 20097, 3619, 1010, 1000, 24471, 14277, 20097, 3619, 2442, 2025, 2022,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
transport/src/main/java/io/netty/channel/ChannelOutboundBuffer.java
ChannelOutboundBuffer.clearNioBuffers
private void clearNioBuffers() { int count = nioBufferCount; if (count > 0) { nioBufferCount = 0; Arrays.fill(NIO_BUFFERS.get(), 0, count, null); } }
java
private void clearNioBuffers() { int count = nioBufferCount; if (count > 0) { nioBufferCount = 0; Arrays.fill(NIO_BUFFERS.get(), 0, count, null); } }
[ "private", "void", "clearNioBuffers", "(", ")", "{", "int", "count", "=", "nioBufferCount", ";", "if", "(", "count", ">", "0", ")", "{", "nioBufferCount", "=", "0", ";", "Arrays", ".", "fill", "(", "NIO_BUFFERS", ".", "get", "(", ")", ",", "0", ",", ...
See https://github.com/netty/netty/issues/3837
[ "See", "https", ":", "//", "github", ".", "com", "/", "netty", "/", "netty", "/", "issues", "/", "3837" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/channel/ChannelOutboundBuffer.java#L364-L370
train
Clear the NIO buffers.
[ 30522, 2797, 11675, 3154, 27678, 8569, 12494, 2015, 1006, 1007, 1063, 20014, 4175, 1027, 9152, 16429, 16093, 7512, 3597, 16671, 1025, 2065, 1006, 4175, 1028, 1014, 1007, 1063, 9152, 16429, 16093, 7512, 3597, 16671, 1027, 1014, 1025, 27448, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ExcelWriter.java
ExcelWriter.createStyleForCell
@Deprecated public CellStyle createStyleForCell(int x, int y) { final Cell cell = getOrCreateCell(x, y); final CellStyle cellStyle = this.workbook.createCellStyle(); cell.setCellStyle(cellStyle); return cellStyle; }
java
@Deprecated public CellStyle createStyleForCell(int x, int y) { final Cell cell = getOrCreateCell(x, y); final CellStyle cellStyle = this.workbook.createCellStyle(); cell.setCellStyle(cellStyle); return cellStyle; }
[ "@", "Deprecated", "public", "CellStyle", "createStyleForCell", "(", "int", "x", ",", "int", "y", ")", "{", "final", "Cell", "cell", "=", "getOrCreateCell", "(", "x", ",", "y", ")", ";", "final", "CellStyle", "cellStyle", "=", "this", ".", "workbook", "....
为指定单元格创建样式 @param x X坐标,从0计数,既列号 @param y Y坐标,从0计数,既行号 @return {@link CellStyle} @since 4.0.9 @deprecated 请使用{@link #getOrCreateCellStyle(int, int)}
[ "为指定单元格创建样式" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelWriter.java#L766-L772
train
Create a cell style for the specified coordinates.
[ 30522, 1030, 2139, 28139, 12921, 2270, 4442, 27983, 9005, 27983, 14821, 3363, 1006, 20014, 1060, 1010, 20014, 1061, 1007, 1063, 2345, 3526, 3526, 1027, 2131, 2953, 16748, 3686, 29109, 2140, 1006, 1060, 1010, 1061, 1007, 1025, 2345, 4442, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/map/MapProxy.java
MapProxy.create
public static MapProxy create(Map<?, ?> map) { return (map instanceof MapProxy) ? (MapProxy) map : new MapProxy(map); }
java
public static MapProxy create(Map<?, ?> map) { return (map instanceof MapProxy) ? (MapProxy) map : new MapProxy(map); }
[ "public", "static", "MapProxy", "create", "(", "Map", "<", "?", ",", "?", ">", "map", ")", "{", "return", "(", "map", "instanceof", "MapProxy", ")", "?", "(", "MapProxy", ")", "map", ":", "new", "MapProxy", "(", "map", ")", ";", "}" ]
创建代理Map<br> 此类对Map做一次包装,提供各种getXXX方法 @param map 被代理的Map @return {@link MapProxy}
[ "创建代理Map<br", ">", "此类对Map做一次包装,提供各种getXXX方法" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapProxy.java#L35-L37
train
Create a new MapProxy instance.
[ 30522, 2270, 10763, 4949, 21572, 18037, 3443, 1006, 4949, 1026, 1029, 1010, 1029, 1028, 4949, 1007, 1063, 2709, 1006, 4949, 6013, 11253, 4949, 21572, 18037, 1007, 1029, 1006, 4949, 21572, 18037, 1007, 4949, 1024, 2047, 4949, 21572, 18037, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/QueryableStateConfiguration.java
QueryableStateConfiguration.disabled
public static QueryableStateConfiguration disabled() { final Iterator<Integer> proxyPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.PROXY_PORT_RANGE.defaultValue()); final Iterator<Integer> serverPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.SERVER_PORT_RANGE.defaultValue()); return ...
java
public static QueryableStateConfiguration disabled() { final Iterator<Integer> proxyPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.PROXY_PORT_RANGE.defaultValue()); final Iterator<Integer> serverPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.SERVER_PORT_RANGE.defaultValue()); return ...
[ "public", "static", "QueryableStateConfiguration", "disabled", "(", ")", "{", "final", "Iterator", "<", "Integer", ">", "proxyPorts", "=", "NetUtils", ".", "getPortRangeFromString", "(", "QueryableStateOptions", ".", "PROXY_PORT_RANGE", ".", "defaultValue", "(", ")", ...
Gets the configuration describing the queryable state as deactivated.
[ "Gets", "the", "configuration", "describing", "the", "queryable", "state", "as", "deactivated", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/QueryableStateConfiguration.java#L136-L140
train
Returns a new configuration with the default values.
[ 30522, 2270, 10763, 23032, 3085, 9153, 26557, 2239, 8873, 27390, 3370, 9776, 1006, 1007, 1063, 2345, 2009, 6906, 4263, 1026, 16109, 1028, 24540, 25378, 1027, 5658, 21823, 4877, 1012, 2131, 6442, 24388, 12879, 21716, 3367, 4892, 1006, 23032, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java
FileWriter.appendLines
public <T> File appendLines(Collection<T> list) throws IORuntimeException { return writeLines(list, true); }
java
public <T> File appendLines(Collection<T> list) throws IORuntimeException { return writeLines(list, true); }
[ "public", "<", "T", ">", "File", "appendLines", "(", "Collection", "<", "T", ">", "list", ")", "throws", "IORuntimeException", "{", "return", "writeLines", "(", "list", ",", "true", ")", ";", "}" ]
将列表写入文件,追加模式 @param <T> 集合元素类型 @param list 列表 @return 目标文件 @throws IORuntimeException IO异常
[ "将列表写入文件,追加模式" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java#L169-L171
train
Append the lines to the file.
[ 30522, 2270, 1026, 1056, 1028, 5371, 10439, 10497, 12735, 1006, 3074, 1026, 1056, 1028, 2862, 1007, 11618, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateBetween.java
DateBetween.create
public static DateBetween create(Date begin, Date end, boolean isAbs) { return new DateBetween(begin, end, isAbs); }
java
public static DateBetween create(Date begin, Date end, boolean isAbs) { return new DateBetween(begin, end, isAbs); }
[ "public", "static", "DateBetween", "create", "(", "Date", "begin", ",", "Date", "end", ",", "boolean", "isAbs", ")", "{", "return", "new", "DateBetween", "(", "begin", ",", "end", ",", "isAbs", ")", ";", "}" ]
创建<br> 在前的日期做为起始时间,在后的做为结束时间,间隔只保留绝对值正数 @param begin 起始时间 @param end 结束时间 @param isAbs 日期间隔是否只保留绝对值正数 @return {@link DateBetween} @since 3.2.3
[ "创建<br", ">", "在前的日期做为起始时间,在后的做为结束时间,间隔只保留绝对值正数" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateBetween.java#L44-L46
train
Creates a new DateBetween object.
[ 30522, 2270, 10763, 3058, 20915, 28394, 2078, 3443, 1006, 3058, 4088, 1010, 3058, 2203, 1010, 22017, 20898, 18061, 5910, 1007, 1063, 2709, 2047, 3058, 20915, 28394, 2078, 1006, 4088, 1010, 2203, 1010, 18061, 5910, 1007, 1025, 1065, 102, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.addOperator
@Internal public void addOperator(StreamTransformation<?> transformation) { Preconditions.checkNotNull(transformation, "transformation must not be null."); this.transformations.add(transformation); }
java
@Internal public void addOperator(StreamTransformation<?> transformation) { Preconditions.checkNotNull(transformation, "transformation must not be null."); this.transformations.add(transformation); }
[ "@", "Internal", "public", "void", "addOperator", "(", "StreamTransformation", "<", "?", ">", "transformation", ")", "{", "Preconditions", ".", "checkNotNull", "(", "transformation", ",", "\"transformation must not be null.\"", ")", ";", "this", ".", "transformations"...
Adds an operator to the list of operators that should be executed when calling {@link #execute}. <p>When calling {@link #execute()} only the operators that where previously added to the list are executed. <p>This is not meant to be used by users. The API methods that create operators must call this method.
[ "Adds", "an", "operator", "to", "the", "list", "of", "operators", "that", "should", "be", "executed", "when", "calling", "{", "@link", "#execute", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L1551-L1555
train
Adds a transformation to the stream.
[ 30522, 1030, 4722, 2270, 11675, 5587, 25918, 8844, 1006, 5460, 6494, 3619, 14192, 3370, 1026, 1029, 1028, 8651, 1007, 1063, 3653, 8663, 20562, 2015, 1012, 4638, 17048, 11231, 3363, 1006, 8651, 1010, 1000, 8651, 2442, 2025, 2022, 19701, 1012...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java
HttpUtil.is100ContinueExpected
public static boolean is100ContinueExpected(HttpMessage message) { return isExpectHeaderValid(message) // unquoted tokens in the expect header are case-insensitive, thus 100-continue is case insensitive && message.headers().contains(HttpHeaderNames.EXPECT, HttpHeaderValues.CONTINUE, true); ...
java
public static boolean is100ContinueExpected(HttpMessage message) { return isExpectHeaderValid(message) // unquoted tokens in the expect header are case-insensitive, thus 100-continue is case insensitive && message.headers().contains(HttpHeaderNames.EXPECT, HttpHeaderValues.CONTINUE, true); ...
[ "public", "static", "boolean", "is100ContinueExpected", "(", "HttpMessage", "message", ")", "{", "return", "isExpectHeaderValid", "(", "message", ")", "// unquoted tokens in the expect header are case-insensitive, thus 100-continue is case insensitive", "&&", "message", ".", "hea...
Returns {@code true} if and only if the specified message contains an expect header and the only expectation present is the 100-continue expectation. Note that this method returns {@code false} if the expect header is not valid for the message (e.g., the message is a response, or the version on the message is HTTP/1.0)...
[ "Returns", "{", "@code", "true", "}", "if", "and", "only", "if", "the", "specified", "message", "contains", "an", "expect", "header", "and", "the", "only", "expectation", "present", "is", "the", "100", "-", "continue", "expectation", ".", "Note", "that", "...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java#L246-L250
train
Checks if the given message contains a 100 - continue expectation.
[ 30522, 2270, 10763, 22017, 20898, 2003, 18613, 8663, 7629, 5657, 10288, 5051, 10985, 1006, 8299, 7834, 3736, 3351, 4471, 1007, 1063, 2709, 2003, 10288, 5051, 6593, 4974, 2121, 10175, 3593, 1006, 4471, 1007, 1013, 1013, 4895, 28940, 27428, 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
launcher/src/main/java/org/apache/spark/launcher/AbstractLauncher.java
AbstractLauncher.addAppArgs
public T addAppArgs(String... args) { for (String arg : args) { checkNotNull(arg, "arg"); builder.appArgs.add(arg); } return self(); }
java
public T addAppArgs(String... args) { for (String arg : args) { checkNotNull(arg, "arg"); builder.appArgs.add(arg); } return self(); }
[ "public", "T", "addAppArgs", "(", "String", "...", "args", ")", "{", "for", "(", "String", "arg", ":", "args", ")", "{", "checkNotNull", "(", "arg", ",", "\"arg\"", ")", ";", "builder", ".", "appArgs", ".", "add", "(", "arg", ")", ";", "}", "return...
Adds command line arguments for the application. @param args Arguments to pass to the application's main class. @return This launcher.
[ "Adds", "command", "line", "arguments", "for", "the", "application", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/launcher/src/main/java/org/apache/spark/launcher/AbstractLauncher.java#L202-L208
train
Add application arguments to the generated code.
[ 30522, 2270, 1056, 5587, 29098, 2906, 5620, 1006, 5164, 1012, 1012, 1012, 12098, 5620, 1007, 1063, 2005, 1006, 5164, 12098, 2290, 1024, 12098, 5620, 1007, 1063, 4638, 17048, 11231, 3363, 1006, 12098, 2290, 1010, 1000, 12098, 2290, 1000, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java
ReflectUtil.getField
public static Field getField(Class<?> beanClass, String name) throws SecurityException { final Field[] fields = getFields(beanClass); if (ArrayUtil.isNotEmpty(fields)) { for (Field field : fields) { if ((name.equals(field.getName()))) { return field; } } } return null; }
java
public static Field getField(Class<?> beanClass, String name) throws SecurityException { final Field[] fields = getFields(beanClass); if (ArrayUtil.isNotEmpty(fields)) { for (Field field : fields) { if ((name.equals(field.getName()))) { return field; } } } return null; }
[ "public", "static", "Field", "getField", "(", "Class", "<", "?", ">", "beanClass", ",", "String", "name", ")", "throws", "SecurityException", "{", "final", "Field", "[", "]", "fields", "=", "getFields", "(", "beanClass", ")", ";", "if", "(", "ArrayUtil", ...
查找指定类中的所有字段(包括非public字段),也包括父类和Object类的字段, 字段不存在则返回<code>null</code> @param beanClass 被查找字段的类,不能为null @param name 字段名 @return 字段 @throws SecurityException 安全异常
[ "查找指定类中的所有字段(包括非public字段),也包括父类和Object类的字段,", "字段不存在则返回<code", ">", "null<", "/", "code", ">" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L115-L125
train
Gets the field with the specified name from the specified class.
[ 30522, 2270, 10763, 2492, 2131, 3790, 1006, 2465, 1026, 1029, 1028, 14068, 26266, 1010, 5164, 2171, 1007, 11618, 3036, 10288, 24422, 1063, 2345, 2492, 1031, 1033, 4249, 1027, 2131, 15155, 1006, 14068, 26266, 1007, 1025, 2065, 1006, 9140, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/Decimal.java
Decimal.fromLong
public static Decimal fromLong(long l, int precision, int scale) { checkArgument(precision > 0 && precision <= MAX_LONG_DIGITS); checkArgument((l >= 0 ? l : -l) < POW10[precision]); return new Decimal(precision, scale, l, null); }
java
public static Decimal fromLong(long l, int precision, int scale) { checkArgument(precision > 0 && precision <= MAX_LONG_DIGITS); checkArgument((l >= 0 ? l : -l) < POW10[precision]); return new Decimal(precision, scale, l, null); }
[ "public", "static", "Decimal", "fromLong", "(", "long", "l", ",", "int", "precision", ",", "int", "scale", ")", "{", "checkArgument", "(", "precision", ">", "0", "&&", "precision", "<=", "MAX_LONG_DIGITS", ")", ";", "checkArgument", "(", "(", "l", ">=", ...
the decimal result is `l / POW10[scale]`
[ "the", "decimal", "result", "is", "l", "/", "POW10", "[", "scale", "]" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/Decimal.java#L149-L153
train
Create a Decimal from a long value.
[ 30522, 2270, 10763, 26066, 2013, 10052, 1006, 2146, 1048, 1010, 20014, 11718, 1010, 20014, 4094, 1007, 1063, 4638, 2906, 22850, 4765, 1006, 11718, 1028, 1014, 1004, 1004, 11718, 1026, 1027, 4098, 1035, 2146, 1035, 16648, 1007, 1025, 4638, 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...
spring-projects/spring-boot
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/BeanTypeRegistry.java
BeanTypeRegistry.getNamesForType
public Set<String> getNamesForType(Class<?> type, TypeExtractor typeExtractor) { updateTypesIfNecessary(); return this.beanTypes.entrySet().stream().filter((entry) -> { Class<?> beanType = extractType(entry.getValue(), typeExtractor); return beanType != null && type.isAssignableFrom(beanType); }
java
public Set<String> getNamesForType(Class<?> type, TypeExtractor typeExtractor) { updateTypesIfNecessary(); return this.beanTypes.entrySet().stream().filter((entry) -> { Class<?> beanType = extractType(entry.getValue(), typeExtractor); return beanType != null && type.isAssignableFrom(beanType); }
[ "public", "Set", "<", "String", ">", "getNamesForType", "(", "Class", "<", "?", ">", "type", ",", "TypeExtractor", "typeExtractor", ")", "{", "updateTypesIfNecessary", "(", ")", ";", "return", "this", ".", "beanTypes", ".", "entrySet", "(", ")", ".", "stre...
Return the names of beans matching the given type (including subclasses), judging from either bean definitions or the value of {@link FactoryBean#getObjectType()} in the case of {@link FactoryBean FactoryBeans}. Will include singletons but will not cause early bean initialization. @param type the class or interface to ...
[ "Return", "the", "names", "of", "beans", "matching", "the", "given", "type", "(", "including", "subclasses", ")", "judging", "from", "either", "bean", "definitions", "or", "the", "value", "of", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/BeanTypeRegistry.java#L96-L101
train
Returns the names of the bean types that are assignable to the given type.
[ 30522, 2270, 2275, 1026, 5164, 1028, 2131, 18442, 22747, 11589, 18863, 1006, 2465, 1026, 1029, 1028, 2828, 1010, 2828, 10288, 6494, 16761, 2828, 10288, 6494, 16761, 1007, 1063, 10651, 13874, 5332, 2546, 2638, 9623, 10286, 2100, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
redisson/redisson
redisson-hibernate/redisson-hibernate-5/src/main/java/org/redisson/hibernate/strategy/AbstractReadWriteAccessStrategy.java
AbstractReadWriteAccessStrategy.decrementLock
protected void decrementLock(SessionImplementor session, Object key, Lock lock) { lock.unlock(region.nextTimestamp()); region.put(session, key, lock); }
java
protected void decrementLock(SessionImplementor session, Object key, Lock lock) { lock.unlock(region.nextTimestamp()); region.put(session, key, lock); }
[ "protected", "void", "decrementLock", "(", "SessionImplementor", "session", ",", "Object", "key", ",", "Lock", "lock", ")", "{", "lock", ".", "unlock", "(", "region", ".", "nextTimestamp", "(", ")", ")", ";", "region", ".", "put", "(", "session", ",", "k...
Unlock and re-put the given key, lock combination.
[ "Unlock", "and", "re", "-", "put", "the", "given", "key", "lock", "combination", "." ]
d3acc0249b2d5d658d36d99e2c808ce49332ea44
https://github.com/redisson/redisson/blob/d3acc0249b2d5d658d36d99e2c808ce49332ea44/redisson-hibernate/redisson-hibernate-5/src/main/java/org/redisson/hibernate/strategy/AbstractReadWriteAccessStrategy.java#L149-L152
train
Decrement the lock for the specified key.
[ 30522, 5123, 11675, 11703, 28578, 4765, 7878, 1006, 5219, 5714, 10814, 23065, 2099, 5219, 1010, 4874, 3145, 1010, 5843, 5843, 1007, 1063, 5843, 1012, 19829, 1006, 2555, 1012, 2279, 7292, 9153, 8737, 1006, 1007, 1007, 1025, 2555, 1012, 2404,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java
FlinkKafkaConsumerBase.setStartFromGroupOffsets
public FlinkKafkaConsumerBase<T> setStartFromGroupOffsets() { this.startupMode = StartupMode.GROUP_OFFSETS; this.startupOffsetsTimestamp = null; this.specificStartupOffsets = null; return this; }
java
public FlinkKafkaConsumerBase<T> setStartFromGroupOffsets() { this.startupMode = StartupMode.GROUP_OFFSETS; this.startupOffsetsTimestamp = null; this.specificStartupOffsets = null; return this; }
[ "public", "FlinkKafkaConsumerBase", "<", "T", ">", "setStartFromGroupOffsets", "(", ")", "{", "this", ".", "startupMode", "=", "StartupMode", ".", "GROUP_OFFSETS", ";", "this", ".", "startupOffsetsTimestamp", "=", "null", ";", "this", ".", "specificStartupOffsets", ...
Specifies the consumer to start reading from any committed group offsets found in Zookeeper / Kafka brokers. The "group.id" property must be set in the configuration properties. If no offset can be found for a partition, the behaviour in "auto.offset.reset" set in the configuration properties will be used for the parti...
[ "Specifies", "the", "consumer", "to", "start", "reading", "from", "any", "committed", "group", "offsets", "found", "in", "Zookeeper", "/", "Kafka", "brokers", ".", "The", "group", ".", "id", "property", "must", "be", "set", "in", "the", "configuration", "pro...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java#L436-L441
train
Sets the startup mode to group offsets.
[ 30522, 2270, 13109, 19839, 2912, 24316, 22684, 3619, 17897, 28483, 3366, 1026, 1056, 1028, 4520, 7559, 24475, 21716, 17058, 27475, 8454, 1006, 1007, 1063, 2023, 1012, 22752, 5302, 3207, 1027, 22752, 5302, 3207, 1012, 2177, 1035, 16396, 2015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java
KeyMap.put
public final V put(K key, V value) { final int hash = hash(key); final int slot = indexOf (hash); // search the chain from the slot for (Entry<K, V> e = table[slot]; e != null; e = e.next) { Object k; if (e.hashCode == hash && ((k = e.key) == key || key.equals(k))) { // found match V old = e.valu...
java
public final V put(K key, V value) { final int hash = hash(key); final int slot = indexOf (hash); // search the chain from the slot for (Entry<K, V> e = table[slot]; e != null; e = e.next) { Object k; if (e.hashCode == hash && ((k = e.key) == key || key.equals(k))) { // found match V old = e.valu...
[ "public", "final", "V", "put", "(", "K", "key", ",", "V", "value", ")", "{", "final", "int", "hash", "=", "hash", "(", "key", ")", ";", "final", "int", "slot", "=", "indexOf", "(", "hash", ")", ";", "// search the chain from the slot", "for", "(", "E...
Inserts the given value, mapped under the given key. If the table already contains a value for the key, the value is replaced and returned. If no value is contained, yet, the function returns null. @param key The key to insert. @param value The value to insert. @return The previously mapped value for the key, or null,...
[ "Inserts", "the", "given", "value", "mapped", "under", "the", "given", "key", ".", "If", "the", "table", "already", "contains", "a", "value", "for", "the", "key", "the", "value", "is", "replaced", "and", "returned", ".", "If", "no", "value", "is", "conta...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java#L123-L141
train
Put a value into the map.
[ 30522, 2270, 2345, 1058, 2404, 1006, 1047, 3145, 1010, 1058, 3643, 1007, 1063, 2345, 20014, 23325, 1027, 23325, 1006, 3145, 1007, 1025, 2345, 20014, 10453, 1027, 5950, 11253, 1006, 23325, 1007, 1025, 1013, 1013, 3945, 1996, 4677, 2013, 1996...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/service/RdbEtlService.java
RdbEtlService.importData
public EtlResult importData(List<String> params) { DbMapping dbMapping = config.getDbMapping(); String sql = "SELECT * FROM " + dbMapping.getDatabase() + "." + dbMapping.getTable(); return importData(sql, params); }
java
public EtlResult importData(List<String> params) { DbMapping dbMapping = config.getDbMapping(); String sql = "SELECT * FROM " + dbMapping.getDatabase() + "." + dbMapping.getTable(); return importData(sql, params); }
[ "public", "EtlResult", "importData", "(", "List", "<", "String", ">", "params", ")", "{", "DbMapping", "dbMapping", "=", "config", ".", "getDbMapping", "(", ")", ";", "String", "sql", "=", "\"SELECT * FROM \"", "+", "dbMapping", ".", "getDatabase", "(", ")",...
导入数据
[ "导入数据" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/service/RdbEtlService.java#L40-L44
train
Import data from a list of parameters
[ 30522, 2270, 3802, 20974, 2229, 11314, 12324, 2850, 2696, 1006, 2862, 1026, 5164, 1028, 11498, 5244, 1007, 1063, 16962, 2863, 14853, 16962, 2863, 14853, 1027, 9530, 8873, 2290, 1012, 2131, 18939, 2863, 14853, 1006, 1007, 1025, 5164, 29296, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java
Graph.fromTupleDataSet
public static <K, VV, EV> Graph<K, VV, EV> fromTupleDataSet(DataSet<Tuple2<K, VV>> vertices, DataSet<Tuple3<K, K, EV>> edges, ExecutionEnvironment context) { DataSet<Vertex<K, VV>> vertexDataSet = vertices .map(new Tuple2ToVertexMap<>()) .name("Type conversion"); DataSet<Edge<K, EV>> edgeDataSet = edges...
java
public static <K, VV, EV> Graph<K, VV, EV> fromTupleDataSet(DataSet<Tuple2<K, VV>> vertices, DataSet<Tuple3<K, K, EV>> edges, ExecutionEnvironment context) { DataSet<Vertex<K, VV>> vertexDataSet = vertices .map(new Tuple2ToVertexMap<>()) .name("Type conversion"); DataSet<Edge<K, EV>> edgeDataSet = edges...
[ "public", "static", "<", "K", ",", "VV", ",", "EV", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "fromTupleDataSet", "(", "DataSet", "<", "Tuple2", "<", "K", ",", "VV", ">", ">", "vertices", ",", "DataSet", "<", "Tuple3", "<", "K", ",", "...
Creates a graph from a DataSet of Tuple2 objects for vertices and Tuple3 objects for edges. <p>The first field of the Tuple2 vertex object will become the vertex ID and the second field will become the vertex value. The first field of the Tuple3 object for edges will become the source ID, the second field will become ...
[ "Creates", "a", "graph", "from", "a", "DataSet", "of", "Tuple2", "objects", "for", "vertices", "and", "Tuple3", "objects", "for", "edges", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L268-L280
train
Creates a graph from Tuple2 DataSet of Vertex and Tuple3 DataSet of Edge.
[ 30522, 2270, 10763, 1026, 1047, 1010, 1058, 2615, 1010, 23408, 1028, 10629, 1026, 1047, 1010, 1058, 2615, 1010, 23408, 1028, 2013, 8525, 21132, 6790, 13462, 1006, 2951, 13462, 1026, 10722, 10814, 2475, 1026, 1047, 1010, 1058, 2615, 1028, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-db/src/main/java/cn/hutool/db/sql/SqlUtil.java
SqlUtil.buildLikeValue
public static String buildLikeValue(String value, LikeType likeType, boolean withLikeKeyword) { if (null == value) { return value; } StringBuilder likeValue = StrUtil.builder(withLikeKeyword ? "LIKE " : ""); switch (likeType) { case StartWith: likeValue.append('%').append(value); break; ...
java
public static String buildLikeValue(String value, LikeType likeType, boolean withLikeKeyword) { if (null == value) { return value; } StringBuilder likeValue = StrUtil.builder(withLikeKeyword ? "LIKE " : ""); switch (likeType) { case StartWith: likeValue.append('%').append(value); break; ...
[ "public", "static", "String", "buildLikeValue", "(", "String", "value", ",", "LikeType", "likeType", ",", "boolean", "withLikeKeyword", ")", "{", "if", "(", "null", "==", "value", ")", "{", "return", "value", ";", "}", "StringBuilder", "likeValue", "=", "Str...
创建LIKE语句中的值,创建的结果为: <pre> 1、LikeType.StartWith: %value 2、LikeType.EndWith: value% 3、LikeType.Contains: %value% </pre> 如果withLikeKeyword为true,则结果为: <pre> 1、LikeType.StartWith: LIKE %value 2、LikeType.EndWith: LIKE value% 3、LikeType.Contains: LIKE %value% </pre> @param value 被查找值 @param likeType LIKE值类型 {@link LikeTyp...
[ "创建LIKE语句中的值,创建的结果为:" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/sql/SqlUtil.java#L103-L124
train
Creates a string representation of the given value based on the given like keyword.
[ 30522, 2270, 10763, 5164, 3857, 10359, 10175, 5657, 1006, 5164, 3643, 1010, 2066, 13874, 2066, 13874, 1010, 22017, 20898, 2007, 10359, 14839, 18351, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 3643, 1007, 1063, 2709, 3643, 1025, 1065, 5164, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractionUtils.java
TypeExtractionUtils.sameTypeVars
public static boolean sameTypeVars(Type t1, Type t2) { return t1 instanceof TypeVariable && t2 instanceof TypeVariable && ((TypeVariable<?>) t1).getName().equals(((TypeVariable<?>) t2).getName()) && ((TypeVariable<?>) t1).getGenericDeclaration().equals(((TypeVariable<?>) t2).getGenericDeclaration()); }
java
public static boolean sameTypeVars(Type t1, Type t2) { return t1 instanceof TypeVariable && t2 instanceof TypeVariable && ((TypeVariable<?>) t1).getName().equals(((TypeVariable<?>) t2).getName()) && ((TypeVariable<?>) t1).getGenericDeclaration().equals(((TypeVariable<?>) t2).getGenericDeclaration()); }
[ "public", "static", "boolean", "sameTypeVars", "(", "Type", "t1", ",", "Type", "t2", ")", "{", "return", "t1", "instanceof", "TypeVariable", "&&", "t2", "instanceof", "TypeVariable", "&&", "(", "(", "TypeVariable", "<", "?", ">", ")", "t1", ")", ".", "ge...
Checks whether two types are type variables describing the same.
[ "Checks", "whether", "two", "types", "are", "type", "variables", "describing", "the", "same", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractionUtils.java#L280-L285
train
Checks if two types are the same.
[ 30522, 2270, 10763, 22017, 20898, 2168, 13874, 10755, 2015, 1006, 2828, 1056, 2487, 1010, 2828, 1056, 2475, 1007, 1063, 2709, 1056, 2487, 6013, 11253, 2828, 10755, 19210, 1004, 1004, 1056, 2475, 6013, 11253, 2828, 10755, 19210, 1004, 1004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/tunnel/client/TunnelClient.java
TunnelClient.start
public int start() throws IOException { synchronized (this.monitor) { Assert.state(this.serverThread == null, "Server already started"); ServerSocketChannel serverSocketChannel = ServerSocketChannel.open(); serverSocketChannel.socket().bind(new InetSocketAddress(this.listenPort)); int port = serverSocketC...
java
public int start() throws IOException { synchronized (this.monitor) { Assert.state(this.serverThread == null, "Server already started"); ServerSocketChannel serverSocketChannel = ServerSocketChannel.open(); serverSocketChannel.socket().bind(new InetSocketAddress(this.listenPort)); int port = serverSocketC...
[ "public", "int", "start", "(", ")", "throws", "IOException", "{", "synchronized", "(", "this", ".", "monitor", ")", "{", "Assert", ".", "state", "(", "this", ".", "serverThread", "==", "null", ",", "\"Server already started\"", ")", ";", "ServerSocketChannel",...
Start the client and accept incoming connections. @return the port on which the client is listening @throws IOException in case of I/O errors
[ "Start", "the", "client", "and", "accept", "incoming", "connections", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/client/TunnelClient.java#L85-L96
train
Starts the server.
[ 30522, 2270, 20014, 2707, 1006, 1007, 11618, 22834, 10288, 24422, 1063, 25549, 1006, 2023, 1012, 8080, 1007, 1063, 20865, 1012, 2110, 1006, 2023, 1012, 8241, 2705, 16416, 2094, 1027, 1027, 19701, 1010, 1000, 8241, 2525, 2318, 1000, 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/spark
common/unsafe/src/main/java/org/apache/spark/unsafe/bitset/BitSetMethods.java
BitSetMethods.isSet
public static boolean isSet(Object baseObject, long baseOffset, int index) { assert index >= 0 : "index (" + index + ") should >= 0"; final long mask = 1L << (index & 0x3f); // mod 64 and shift final long wordOffset = baseOffset + (index >> 6) * WORD_SIZE; final long word = Platform.getLong(baseObject,...
java
public static boolean isSet(Object baseObject, long baseOffset, int index) { assert index >= 0 : "index (" + index + ") should >= 0"; final long mask = 1L << (index & 0x3f); // mod 64 and shift final long wordOffset = baseOffset + (index >> 6) * WORD_SIZE; final long word = Platform.getLong(baseObject,...
[ "public", "static", "boolean", "isSet", "(", "Object", "baseObject", ",", "long", "baseOffset", ",", "int", "index", ")", "{", "assert", "index", ">=", "0", ":", "\"index (\"", "+", "index", "+", "\") should >= 0\"", ";", "final", "long", "mask", "=", "1L"...
Returns {@code true} if the bit is set at the specified index.
[ "Returns", "{" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/unsafe/src/main/java/org/apache/spark/unsafe/bitset/BitSetMethods.java#L62-L68
train
Returns true if the value at the given offset is set.
[ 30522, 2270, 10763, 22017, 20898, 26354, 3388, 1006, 4874, 2918, 16429, 20614, 1010, 2146, 2918, 27475, 3388, 1010, 20014, 5950, 1007, 1063, 20865, 5950, 1028, 1027, 1014, 1024, 1000, 5950, 1006, 1000, 1009, 5950, 1009, 1000, 1007, 2323, 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/io/SplitDataProperties.java
SplitDataProperties.splitsGroupedBy
public SplitDataProperties<T> splitsGroupedBy(String groupFields) { if (groupFields == null) { throw new InvalidProgramException("GroupFields may not be null."); } String[] groupKeysA = groupFields.split(";"); if (groupKeysA.length == 0) { throw new InvalidProgramException("GroupFields may not be empty....
java
public SplitDataProperties<T> splitsGroupedBy(String groupFields) { if (groupFields == null) { throw new InvalidProgramException("GroupFields may not be null."); } String[] groupKeysA = groupFields.split(";"); if (groupKeysA.length == 0) { throw new InvalidProgramException("GroupFields may not be empty....
[ "public", "SplitDataProperties", "<", "T", ">", "splitsGroupedBy", "(", "String", "groupFields", ")", "{", "if", "(", "groupFields", "==", "null", ")", "{", "throw", "new", "InvalidProgramException", "(", "\"GroupFields may not be null.\"", ")", ";", "}", "String"...
Defines that the data within an input split is grouped on the fields defined by the field expressions. Multiple field expressions must be separated by the semicolon ';' character. All records sharing the same key (combination) must be subsequently emitted by the input format for each input split. <p><b> IMPORTANT: Pro...
[ "Defines", "that", "the", "data", "within", "an", "input", "split", "is", "grouped", "on", "the", "fields", "defined", "by", "the", "field", "expressions", ".", "Multiple", "field", "expressions", "must", "be", "separated", "by", "the", "semicolon", ";", "ch...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/io/SplitDataProperties.java#L230-L248
train
Sets the group by field.
[ 30522, 2270, 3975, 2850, 2696, 21572, 4842, 7368, 1026, 1056, 1028, 19584, 17058, 2098, 3762, 1006, 5164, 2177, 15155, 1007, 1063, 2065, 1006, 2177, 15155, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 19528, 21572, 13113, 10288, 24422, 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/src/main/java/io/netty/handler/codec/compression/Bzip2BlockCompressor.java
Bzip2BlockCompressor.write
int write(final ByteBuf buffer, int offset, int length) { int index = buffer.forEachByte(offset, length, writeProcessor); return index == -1 ? length : index - offset; }
java
int write(final ByteBuf buffer, int offset, int length) { int index = buffer.forEachByte(offset, length, writeProcessor); return index == -1 ? length : index - offset; }
[ "int", "write", "(", "final", "ByteBuf", "buffer", ",", "int", "offset", ",", "int", "length", ")", "{", "int", "index", "=", "buffer", ".", "forEachByte", "(", "offset", ",", "length", ",", "writeProcessor", ")", ";", "return", "index", "==", "-", "1"...
Writes an array to the block. @param buffer The buffer to write @param offset The offset within the input data to write from @param length The number of bytes of input data to write @return The actual number of input bytes written. May be less than the number requested, or zero if the block is already full
[ "Writes", "an", "array", "to", "the", "block", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/compression/Bzip2BlockCompressor.java#L214-L217
train
Write length bytes from buffer.
[ 30522, 20014, 4339, 1006, 2345, 24880, 8569, 2546, 17698, 1010, 20014, 16396, 1010, 20014, 3091, 1007, 1063, 20014, 5950, 1027, 17698, 1012, 18921, 6776, 3762, 2618, 1006, 16396, 1010, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/sax/ExcelSaxUtil.java
ExcelSaxUtil.getDataValue
public static Object getDataValue(CellDataType cellDataType, String value, SharedStringsTable sharedStringsTable, String numFmtString) { if (null == value) { return null; } Object result; switch (cellDataType) { case BOOL: result = (value.charAt(0) != '0'); break; case ERROR: result ...
java
public static Object getDataValue(CellDataType cellDataType, String value, SharedStringsTable sharedStringsTable, String numFmtString) { if (null == value) { return null; } Object result; switch (cellDataType) { case BOOL: result = (value.charAt(0) != '0'); break; case ERROR: result ...
[ "public", "static", "Object", "getDataValue", "(", "CellDataType", "cellDataType", ",", "String", "value", ",", "SharedStringsTable", "sharedStringsTable", ",", "String", "numFmtString", ")", "{", "if", "(", "null", "==", "value", ")", "{", "return", "null", ";"...
根据数据类型获取数据 @param cellDataType 数据类型枚举 @param value 数据值 @param sharedStringsTable {@link SharedStringsTable} @param numFmtString 数字格式名 @return 数据值
[ "根据数据类型获取数据" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/sax/ExcelSaxUtil.java#L33-L75
train
Gets the data value from the cellDataType and value pair.
[ 30522, 2270, 10763, 4874, 2131, 2850, 2696, 10175, 5657, 1006, 3526, 2850, 29336, 18863, 3526, 2850, 29336, 18863, 1010, 5164, 3643, 1010, 4207, 3367, 4892, 9153, 3468, 4207, 3367, 4892, 9153, 3468, 1010, 5164, 16371, 2213, 16715, 3215, 188...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/FlinkKafkaConsumer09.java
FlinkKafkaConsumer09.setDeserializer
private static void setDeserializer(Properties props) { final String deSerName = ByteArrayDeserializer.class.getName(); Object keyDeSer = props.get(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG); Object valDeSer = props.get(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG); if (keyDeSer != null && !keyDeSer.equa...
java
private static void setDeserializer(Properties props) { final String deSerName = ByteArrayDeserializer.class.getName(); Object keyDeSer = props.get(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG); Object valDeSer = props.get(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG); if (keyDeSer != null && !keyDeSer.equa...
[ "private", "static", "void", "setDeserializer", "(", "Properties", "props", ")", "{", "final", "String", "deSerName", "=", "ByteArrayDeserializer", ".", "class", ".", "getName", "(", ")", ";", "Object", "keyDeSer", "=", "props", ".", "get", "(", "ConsumerConfi...
Makes sure that the ByteArrayDeserializer is registered in the Kafka properties. @param props The Kafka properties to register the serializer in.
[ "Makes", "sure", "that", "the", "ByteArrayDeserializer", "is", "registered", "in", "the", "Kafka", "properties", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-0.9/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumer09.java#L307-L322
train
Sets the deserializer class name and the serializer class name.
[ 30522, 2797, 10763, 11675, 2275, 6155, 11610, 28863, 1006, 5144, 24387, 1007, 1063, 2345, 5164, 4078, 11795, 14074, 1027, 24880, 2906, 9447, 6155, 11610, 28863, 1012, 2465, 1012, 2131, 18442, 1006, 1007, 1025, 4874, 3145, 6155, 2121, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/corpus/dictionary/DictionaryMaker.java
DictionaryMaker.combine
public static DictionaryMaker combine(String... pathArray) { DictionaryMaker dictionaryMaker = new DictionaryMaker(); for (String path : pathArray) { logger.warning("正在处理" + path); dictionaryMaker.addAll(DictionaryMaker.loadAsItemList(path)); } return ...
java
public static DictionaryMaker combine(String... pathArray) { DictionaryMaker dictionaryMaker = new DictionaryMaker(); for (String path : pathArray) { logger.warning("正在处理" + path); dictionaryMaker.addAll(DictionaryMaker.loadAsItemList(path)); } return ...
[ "public", "static", "DictionaryMaker", "combine", "(", "String", "...", "pathArray", ")", "{", "DictionaryMaker", "dictionaryMaker", "=", "new", "DictionaryMaker", "(", ")", ";", "for", "(", "String", "path", ":", "pathArray", ")", "{", "logger", ".", "warning...
合并多部词典 @param pathArray @return
[ "合并多部词典" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/corpus/dictionary/DictionaryMaker.java#L237-L246
train
Combine a list of files into a single file.
[ 30522, 2270, 10763, 9206, 8571, 11506, 1006, 5164, 1012, 1012, 1012, 4130, 2906, 9447, 1007, 1063, 9206, 8571, 9206, 8571, 1027, 2047, 9206, 8571, 1006, 1007, 1025, 2005, 1006, 5164, 4130, 1024, 4130, 2906, 9447, 1007, 1063, 8833, 4590, 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/UTF8String.java
UTF8String.concat
public static UTF8String concat(UTF8String... inputs) { // Compute the total length of the result. long totalLength = 0; for (int i = 0; i < inputs.length; i++) { if (inputs[i] != null) { totalLength += (long)inputs[i].numBytes; } else { return null; } } // Allocat...
java
public static UTF8String concat(UTF8String... inputs) { // Compute the total length of the result. long totalLength = 0; for (int i = 0; i < inputs.length; i++) { if (inputs[i] != null) { totalLength += (long)inputs[i].numBytes; } else { return null; } } // Allocat...
[ "public", "static", "UTF8String", "concat", "(", "UTF8String", "...", "inputs", ")", "{", "// Compute the total length of the result.", "long", "totalLength", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "inputs", ".", "length", ";", "i", ...
Concatenates input strings together into a single string. Returns null if any input is null.
[ "Concatenates", "input", "strings", "together", "into", "a", "single", "string", ".", "Returns", "null", "if", "any", "input", "is", "null", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java#L884-L907
train
Concatenate the given UTF8String array into a single UTF8String.
[ 30522, 2270, 10763, 21183, 2546, 2620, 3367, 4892, 9530, 11266, 1006, 21183, 2546, 2620, 3367, 4892, 1012, 1012, 1012, 20407, 1007, 1063, 1013, 1013, 24134, 1996, 2561, 3091, 1997, 1996, 2765, 1012, 2146, 2561, 7770, 13512, 2232, 1027, 1014...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
handler/src/main/java/io/netty/handler/ssl/SniHandler.java
SniHandler.lookup
@Override protected Future<SslContext> lookup(ChannelHandlerContext ctx, String hostname) throws Exception { return mapping.map(hostname, ctx.executor().<SslContext>newPromise()); }
java
@Override protected Future<SslContext> lookup(ChannelHandlerContext ctx, String hostname) throws Exception { return mapping.map(hostname, ctx.executor().<SslContext>newPromise()); }
[ "@", "Override", "protected", "Future", "<", "SslContext", ">", "lookup", "(", "ChannelHandlerContext", "ctx", ",", "String", "hostname", ")", "throws", "Exception", "{", "return", "mapping", ".", "map", "(", "hostname", ",", "ctx", ".", "executor", "(", ")"...
The default implementation will simply call {@link AsyncMapping#map(Object, Promise)} but users can override this method to implement custom behavior. @see AsyncMapping#map(Object, Promise)
[ "The", "default", "implementation", "will", "simply", "call", "{", "@link", "AsyncMapping#map", "(", "Object", "Promise", ")", "}", "but", "users", "can", "override", "this", "method", "to", "implement", "custom", "behavior", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SniHandler.java#L95-L98
train
Lookup a node using the node mapping.
[ 30522, 1030, 2058, 15637, 5123, 2925, 1026, 7020, 22499, 10111, 18413, 1028, 2298, 6279, 1006, 3149, 11774, 3917, 8663, 18209, 14931, 2595, 1010, 5164, 3677, 18442, 1007, 11618, 6453, 1063, 2709, 12375, 1012, 4949, 1006, 3677, 18442, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/HanLP.java
HanLP.extractKeyword
public static List<String> extractKeyword(String document, int size) { return TextRankKeyword.getKeywordList(document, size); }
java
public static List<String> extractKeyword(String document, int size) { return TextRankKeyword.getKeywordList(document, size); }
[ "public", "static", "List", "<", "String", ">", "extractKeyword", "(", "String", "document", ",", "int", "size", ")", "{", "return", "TextRankKeyword", ".", "getKeywordList", "(", "document", ",", "size", ")", ";", "}" ]
提取关键词 @param document 文档内容 @param size 希望提取几个关键词 @return 一个列表
[ "提取关键词" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/HanLP.java#L802-L805
train
Extract a list of words from a document.
[ 30522, 2270, 10763, 2862, 1026, 5164, 1028, 14817, 14839, 18351, 1006, 5164, 6254, 1010, 20014, 2946, 1007, 1063, 2709, 3793, 26763, 14839, 18351, 1012, 2131, 14839, 18351, 9863, 1006, 6254, 1010, 2946, 1007, 1025, 1065, 102, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.write
public SoapClient write(OutputStream out) { try { this.message.writeTo(out); } catch (SOAPException | IOException e) { throw new SoapRuntimeException(e); } return this; }
java
public SoapClient write(OutputStream out) { try { this.message.writeTo(out); } catch (SOAPException | IOException e) { throw new SoapRuntimeException(e); } return this; }
[ "public", "SoapClient", "write", "(", "OutputStream", "out", ")", "{", "try", "{", "this", ".", "message", ".", "writeTo", "(", "out", ")", ";", "}", "catch", "(", "SOAPException", "|", "IOException", "e", ")", "{", "throw", "new", "SoapRuntimeException", ...
将SOAP消息的XML内容输出到流 @param out 输出流 @return this @since 4.5.6
[ "将SOAP消息的XML内容输出到流" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/webservice/SoapClient.java#L383-L390
train
Write the message to the stream.
[ 30522, 2270, 7815, 20464, 11638, 4339, 1006, 27852, 25379, 2041, 1007, 1063, 3046, 1063, 2023, 1012, 4471, 1012, 4339, 3406, 1006, 2041, 1007, 1025, 1065, 4608, 1006, 7815, 10288, 24422, 1064, 22834, 10288, 24422, 1041, 1007, 1063, 5466, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/evictors/CountEvictor.java
CountEvictor.of
public static <W extends Window> CountEvictor<W> of(long maxCount, boolean doEvictAfter) { return new CountEvictor<>(maxCount, doEvictAfter); }
java
public static <W extends Window> CountEvictor<W> of(long maxCount, boolean doEvictAfter) { return new CountEvictor<>(maxCount, doEvictAfter); }
[ "public", "static", "<", "W", "extends", "Window", ">", "CountEvictor", "<", "W", ">", "of", "(", "long", "maxCount", ",", "boolean", "doEvictAfter", ")", "{", "return", "new", "CountEvictor", "<>", "(", "maxCount", ",", "doEvictAfter", ")", ";", "}" ]
Creates a {@code CountEvictor} that keeps the given number of elements in the pane Eviction is done before/after the window function based on the value of doEvictAfter. @param maxCount The number of elements to keep in the pane. @param doEvictAfter Whether to do eviction after the window function.
[ "Creates", "a", "{", "@code", "CountEvictor", "}", "that", "keeps", "the", "given", "number", "of", "elements", "in", "the", "pane", "Eviction", "is", "done", "before", "/", "after", "the", "window", "function", "based", "on", "the", "value", "of", "doEvic...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/evictors/CountEvictor.java#L97-L99
train
Create a new count evictor.
[ 30522, 2270, 10763, 1026, 1059, 8908, 3332, 1028, 4175, 17726, 4263, 1026, 1059, 1028, 1997, 1006, 2146, 4098, 3597, 16671, 1010, 22017, 20898, 18629, 7903, 2696, 6199, 2121, 1007, 1063, 2709, 2047, 4175, 30524, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java
DnsNameResolver.resolve
public final Future<InetAddress> resolve(String inetHost, Iterable<DnsRecord> additionals, Promise<InetAddress> promise) { checkNotNull(promise, "promise"); DnsRecord[] additionalsArray = toArray(additionals, true); try { doResolve(inetHos...
java
public final Future<InetAddress> resolve(String inetHost, Iterable<DnsRecord> additionals, Promise<InetAddress> promise) { checkNotNull(promise, "promise"); DnsRecord[] additionalsArray = toArray(additionals, true); try { doResolve(inetHos...
[ "public", "final", "Future", "<", "InetAddress", ">", "resolve", "(", "String", "inetHost", ",", "Iterable", "<", "DnsRecord", ">", "additionals", ",", "Promise", "<", "InetAddress", ">", "promise", ")", "{", "checkNotNull", "(", "promise", ",", "\"promise\"",...
Resolves the specified name into an address. @param inetHost the name to resolve @param additionals additional records ({@code OPT}) @param promise the {@link Promise} which will be fulfilled when the name resolution is finished @return the address as the result of the resolution
[ "Resolves", "the", "specified", "name", "into", "an", "address", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java#L650-L660
train
Resolves the specified inet host with the specified additionals.
[ 30522, 2270, 2345, 2925, 1026, 1999, 12928, 14141, 8303, 1028, 10663, 1006, 5164, 1999, 11031, 14122, 1010, 2009, 6906, 3468, 1026, 1040, 3619, 2890, 27108, 2094, 1028, 3176, 2015, 1010, 4872, 1026, 1999, 12928, 14141, 8303, 1028, 4872, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java
ThreadUtil.interupt
public static void interupt(Thread thread, boolean isJoin) { if (null != thread && false == thread.isInterrupted()) { thread.interrupt(); if (isJoin) { waitForDie(thread); } } }
java
public static void interupt(Thread thread, boolean isJoin) { if (null != thread && false == thread.isInterrupted()) { thread.interrupt(); if (isJoin) { waitForDie(thread); } } }
[ "public", "static", "void", "interupt", "(", "Thread", "thread", ",", "boolean", "isJoin", ")", "{", "if", "(", "null", "!=", "thread", "&&", "false", "==", "thread", ".", "isInterrupted", "(", ")", ")", "{", "thread", ".", "interrupt", "(", ")", ";", ...
结束线程,调用此方法后,线程将抛出 {@link InterruptedException}异常 @param thread 线程 @param isJoin 是否等待结束
[ "结束线程,调用此方法后,线程将抛出", "{", "@link", "InterruptedException", "}", "异常" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java#L311-L318
train
Interupts the specified thread.
[ 30522, 2270, 10763, 11675, 6970, 29441, 1006, 11689, 11689, 1010, 22017, 20898, 2003, 5558, 2378, 1007, 1063, 2065, 1006, 19701, 999, 1027, 11689, 1004, 1004, 6270, 1027, 1027, 11689, 1012, 2003, 18447, 2121, 21531, 3064, 1006, 1007, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
microbench/src/main/java/io/netty/handler/codec/http2/HpackBenchmarkUtil.java
HpackBenchmarkUtil.headers
static List<HpackHeader> headers(HpackHeadersSize size, boolean limitToAscii) { return headersMap.get(new HeadersKey(size, limitToAscii)); }
java
static List<HpackHeader> headers(HpackHeadersSize size, boolean limitToAscii) { return headersMap.get(new HeadersKey(size, limitToAscii)); }
[ "static", "List", "<", "HpackHeader", ">", "headers", "(", "HpackHeadersSize", "size", ",", "boolean", "limitToAscii", ")", "{", "return", "headersMap", ".", "get", "(", "new", "HeadersKey", "(", "size", ",", "limitToAscii", ")", ")", ";", "}" ]
Gets headers for the given size and whether the key/values should be limited to ASCII.
[ "Gets", "headers", "for", "the", "given", "size", "and", "whether", "the", "key", "/", "values", "should", "be", "limited", "to", "ASCII", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/microbench/src/main/java/io/netty/handler/codec/http2/HpackBenchmarkUtil.java#L103-L105
train
Get the headers.
[ 30522, 10763, 2862, 1026, 6522, 8684, 4974, 2121, 1028, 20346, 2015, 1006, 6522, 8684, 4974, 2545, 5332, 4371, 2946, 1010, 22017, 20898, 5787, 3406, 3022, 6895, 2072, 1007, 1063, 2709, 20346, 26212, 2361, 1012, 2131, 1006, 2047, 20346, 1714...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.setStorageSize
public void setStorageSize(String name, double value, StorageUnit unit) { set(name, value + unit.getShortName()); }
java
public void setStorageSize(String name, double value, StorageUnit unit) { set(name, value + unit.getShortName()); }
[ "public", "void", "setStorageSize", "(", "String", "name", ",", "double", "value", ",", "StorageUnit", "unit", ")", "{", "set", "(", "name", ",", "value", "+", "unit", ".", "getShortName", "(", ")", ")", ";", "}" ]
Sets Storage Size for the specified key. @param name - Key to set. @param value - The numeric value to set. @param unit - Storage Unit to be used.
[ "Sets", "Storage", "Size", "for", "the", "specified", "key", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L1776-L1778
train
Sets the storage size.
[ 30522, 2270, 11675, 4520, 4263, 13923, 4697, 1006, 5164, 2171, 1010, 3313, 3643, 1010, 5527, 19496, 2102, 3131, 1007, 1063, 2275, 1006, 2171, 1010, 3643, 1009, 3131, 1012, 4152, 27794, 18442, 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, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/summary/TextRankKeyword.java
TextRankKeyword.getTermAndRank
public Map<String, Float> getTermAndRank(String content) { assert content != null; List<Term> termList = defaultSegment.seg(content); return getTermAndRank(termList); }
java
public Map<String, Float> getTermAndRank(String content) { assert content != null; List<Term> termList = defaultSegment.seg(content); return getTermAndRank(termList); }
[ "public", "Map", "<", "String", ",", "Float", ">", "getTermAndRank", "(", "String", "content", ")", "{", "assert", "content", "!=", "null", ";", "List", "<", "Term", ">", "termList", "=", "defaultSegment", ".", "seg", "(", "content", ")", ";", "return", ...
返回全部分词结果和对应的rank @param content @return
[ "返回全部分词结果和对应的rank" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/summary/TextRankKeyword.java#L68-L73
train
Get the term and rank for a given content.
[ 30522, 2270, 4949, 1026, 5164, 1010, 14257, 1028, 2131, 3334, 2386, 24914, 2243, 1006, 5164, 4180, 1007, 1063, 20865, 4180, 999, 1027, 19701, 1025, 2862, 1026, 2744, 1028, 2744, 9863, 1027, 12398, 3366, 21693, 4765, 1012, 7367, 2290, 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
common/src/main/java/io/netty/util/internal/logging/CommonsLogger.java
CommonsLogger.info
@Override public void info(String format, Object arg) { if (logger.isInfoEnabled()) { FormattingTuple ft = MessageFormatter.format(format, arg); logger.info(ft.getMessage(), ft.getThrowable()); } }
java
@Override public void info(String format, Object arg) { if (logger.isInfoEnabled()) { FormattingTuple ft = MessageFormatter.format(format, arg); logger.info(ft.getMessage(), ft.getThrowable()); } }
[ "@", "Override", "public", "void", "info", "(", "String", "format", ",", "Object", "arg", ")", "{", "if", "(", "logger", ".", "isInfoEnabled", "(", ")", ")", "{", "FormattingTuple", "ft", "=", "MessageFormatter", ".", "format", "(", "format", ",", "arg",...
Delegates to the {@link Log#info(Object)} method of the underlying {@link Log} instance. <p> However, this form avoids superfluous object creation when the logger is disabled for level INFO. </p> @param format the format string @param arg the argument
[ "Delegates", "to", "the", "{", "@link", "Log#info", "(", "Object", ")", "}", "method", "of", "the", "underlying", "{", "@link", "Log", "}", "instance", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/logging/CommonsLogger.java#L303-L309
train
Log a message at the INFO level.
[ 30522, 1030, 2058, 15637, 2270, 11675, 18558, 1006, 5164, 4289, 1010, 30524, 1063, 4289, 3436, 8525, 10814, 3027, 1027, 4471, 14192, 20097, 1012, 4289, 1006, 4289, 1010, 12098, 2290, 1007, 1025, 8833, 4590, 1012, 18558, 1006, 3027, 1012, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/WordNet.java
WordNet.getFirst
public Vertex getFirst(int line) { Iterator<Vertex> iterator = vertexes[line].iterator(); if (iterator.hasNext()) return iterator.next(); return null; }
java
public Vertex getFirst(int line) { Iterator<Vertex> iterator = vertexes[line].iterator(); if (iterator.hasNext()) return iterator.next(); return null; }
[ "public", "Vertex", "getFirst", "(", "int", "line", ")", "{", "Iterator", "<", "Vertex", ">", "iterator", "=", "vertexes", "[", "line", "]", ".", "iterator", "(", ")", ";", "if", "(", "iterator", ".", "hasNext", "(", ")", ")", "return", "iterator", "...
获取某一行的第一个节点 @param line @return
[ "获取某一行的第一个节点" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/common/WordNet.java#L219-L225
train
Get the first CIDCTYPE in a line.
[ 30522, 2270, 19449, 2131, 8873, 12096, 1006, 20014, 2240, 1007, 1063, 2009, 6906, 4263, 1026, 19449, 1028, 2009, 6906, 4263, 1027, 19449, 2229, 1031, 2240, 1033, 1012, 2009, 6906, 4263, 1006, 1007, 1025, 2065, 1006, 2009, 6906, 4263, 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...
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/interactions/Actions.java
Actions.clickAndHold
public Actions clickAndHold(WebElement target) { if (isBuildingActions()) { action.addAction(new ClickAndHoldAction(jsonMouse, (Locatable) target)); } return moveInTicks(target, 0, 0) .tick(defaultMouse.createPointerDown(LEFT.asArg())); }
java
public Actions clickAndHold(WebElement target) { if (isBuildingActions()) { action.addAction(new ClickAndHoldAction(jsonMouse, (Locatable) target)); } return moveInTicks(target, 0, 0) .tick(defaultMouse.createPointerDown(LEFT.asArg())); }
[ "public", "Actions", "clickAndHold", "(", "WebElement", "target", ")", "{", "if", "(", "isBuildingActions", "(", ")", ")", "{", "action", ".", "addAction", "(", "new", "ClickAndHoldAction", "(", "jsonMouse", ",", "(", "Locatable", ")", "target", ")", ")", ...
Clicks (without releasing) in the middle of the given element. This is equivalent to: <i>Actions.moveToElement(onElement).clickAndHold()</i> @param target Element to move to and click. @return A self reference.
[ "Clicks", "(", "without", "releasing", ")", "in", "the", "middle", "of", "the", "given", "element", ".", "This", "is", "equivalent", "to", ":", "<i", ">", "Actions", ".", "moveToElement", "(", "onElement", ")", ".", "clickAndHold", "()", "<", "/", "i", ...
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/interactions/Actions.java#L232-L238
train
Click and hold.
[ 30522, 2270, 4506, 11562, 5685, 12640, 1006, 4773, 12260, 3672, 4539, 1007, 1063, 2065, 1006, 2003, 25820, 18908, 8496, 1006, 1007, 1007, 1063, 2895, 1012, 5587, 18908, 3258, 1006, 2047, 11562, 5685, 12640, 18908, 3258, 1006, 1046, 3385, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/core/memory/MemorySegment.java
MemorySegment.getLong
public final long getLong(int index) { final long pos = address + index; if (index >= 0 && pos <= addressLimit - 8) { return UNSAFE.getLong(heapMemory, pos); } else if (address > addressLimit) { throw new IllegalStateException("segment has been freed"); } else { // index is in fact invalid throw...
java
public final long getLong(int index) { final long pos = address + index; if (index >= 0 && pos <= addressLimit - 8) { return UNSAFE.getLong(heapMemory, pos); } else if (address > addressLimit) { throw new IllegalStateException("segment has been freed"); } else { // index is in fact invalid throw...
[ "public", "final", "long", "getLong", "(", "int", "index", ")", "{", "final", "long", "pos", "=", "address", "+", "index", ";", "if", "(", "index", ">=", "0", "&&", "pos", "<=", "addressLimit", "-", "8", ")", "{", "return", "UNSAFE", ".", "getLong", ...
Reads a long value (64bit, 8 bytes) from the given position, in the system's native byte order. This method offers the best speed for long integer reading and should be used unless a specific byte order is required. In most cases, it suffices to know that the byte order in which the value is written is the same as the ...
[ "Reads", "a", "long", "value", "(", "64bit", "8", "bytes", ")", "from", "the", "given", "position", "in", "the", "system", "s", "native", "byte", "order", ".", "This", "method", "offers", "the", "best", "speed", "for", "long", "integer", "reading", "and"...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/memory/MemorySegment.java#L834-L846
train
Gets a long value from the memory.
[ 30522, 2270, 2345, 2146, 2131, 10052, 1006, 20014, 5950, 1007, 1063, 2345, 2146, 13433, 2015, 1027, 4769, 1009, 5950, 1025, 2065, 1006, 5950, 1028, 1027, 1014, 1004, 1004, 13433, 2015, 1026, 1027, 4769, 17960, 4183, 1011, 1022, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/builder/CompareToBuilder.java
CompareToBuilder.reflectionCompare
public static int reflectionCompare(final Object lhs, final Object rhs, final boolean compareTransients) { return reflectionCompare(lhs, rhs, compareTransients, null); }
java
public static int reflectionCompare(final Object lhs, final Object rhs, final boolean compareTransients) { return reflectionCompare(lhs, rhs, compareTransients, null); }
[ "public", "static", "int", "reflectionCompare", "(", "final", "Object", "lhs", ",", "final", "Object", "rhs", ",", "final", "boolean", "compareTransients", ")", "{", "return", "reflectionCompare", "(", "lhs", ",", "rhs", ",", "compareTransients", ",", "null", ...
<p>Compares two <code>Object</code>s via reflection.</p> <p>Fields can be private, thus <code>AccessibleObject.setAccessible</code> is used to bypass normal access control checks. This will fail under a security manager unless the appropriate permissions are set.</p> <ul> <li>Static fields will not be compared</li> <...
[ "<p", ">", "Compares", "two", "<code", ">", "Object<", "/", "code", ">", "s", "via", "reflection", ".", "<", "/", "p", ">" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/builder/CompareToBuilder.java#L120-L122
train
Compare two classes.
[ 30522, 2270, 10763, 20014, 9185, 9006, 19362, 2063, 1006, 2345, 4874, 1048, 7898, 1010, 2345, 4874, 1054, 7898, 1010, 2345, 22017, 20898, 12826, 6494, 3619, 11638, 2015, 1007, 1063, 2709, 9185, 9006, 19362, 2063, 1006, 1048, 7898, 1010, 105...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/common/AbstractResource.java
AbstractResource.createRelative
@Override public org.springframework.core.io.Resource createRelative(String relativePath) throws IOException { throw new FileNotFoundException("Cannot create a relative resource for " + getDescription()); }
java
@Override public org.springframework.core.io.Resource createRelative(String relativePath) throws IOException { throw new FileNotFoundException("Cannot create a relative resource for " + getDescription()); }
[ "@", "Override", "public", "org", ".", "springframework", ".", "core", ".", "io", ".", "Resource", "createRelative", "(", "String", "relativePath", ")", "throws", "IOException", "{", "throw", "new", "FileNotFoundException", "(", "\"Cannot create a relative resource fo...
This implementation throws a FileNotFoundException, assuming that relative resources cannot be created for this resource.
[ "This", "implementation", "throws", "a", "FileNotFoundException", "assuming", "that", "relative", "resources", "cannot", "be", "created", "for", "this", "resource", "." ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/common/AbstractResource.java#L158-L161
train
Create a relative resource.
[ 30522, 1030, 2058, 15637, 2270, 8917, 1012, 3500, 15643, 6198, 1012, 4563, 1012, 22834, 1012, 7692, 3443, 16570, 8082, 1006, 5164, 5816, 15069, 1007, 11618, 22834, 10288, 24422, 1063, 5466, 2047, 5371, 17048, 14876, 8630, 10288, 24422, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/resource/ClassPathResource.java
ClassPathResource.initUrl
private void initUrl() { if (null != this.clazz) { super.url = this.clazz.getResource(this.path); } else if (null != this.classLoader) { super.url = this.classLoader.getResource(this.path); } else { super.url = ClassLoader.getSystemResource(this.path); } if (null == super.url) { throw new...
java
private void initUrl() { if (null != this.clazz) { super.url = this.clazz.getResource(this.path); } else if (null != this.classLoader) { super.url = this.classLoader.getResource(this.path); } else { super.url = ClassLoader.getSystemResource(this.path); } if (null == super.url) { throw new...
[ "private", "void", "initUrl", "(", ")", "{", "if", "(", "null", "!=", "this", ".", "clazz", ")", "{", "super", ".", "url", "=", "this", ".", "clazz", ".", "getResource", "(", "this", ".", "path", ")", ";", "}", "else", "if", "(", "null", "!=", ...
根据给定资源初始化URL
[ "根据给定资源初始化URL" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/resource/ClassPathResource.java#L112-L123
train
Initializes the url.
[ 30522, 2797, 11675, 1999, 4183, 3126, 2140, 1006, 1007, 1063, 2065, 1006, 19701, 999, 1027, 2023, 1012, 18856, 10936, 2480, 1007, 1063, 3565, 1012, 24471, 2140, 1027, 2023, 1012, 18856, 10936, 2480, 1012, 2131, 6072, 8162, 3401, 1006, 2023,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
networknt/light-4j
metrics/src/main/java/io/dropwizard/metrics/WeightedSnapshot.java
WeightedSnapshot.getMean
@Override public double getMean() { if (values.length == 0) { return 0; } double sum = 0; for (int i = 0; i < values.length; i++) { sum += values[i] * normWeights[i]; } return sum; }
java
@Override public double getMean() { if (values.length == 0) { return 0; } double sum = 0; for (int i = 0; i < values.length; i++) { sum += values[i] * normWeights[i]; } return sum; }
[ "@", "Override", "public", "double", "getMean", "(", ")", "{", "if", "(", "values", ".", "length", "==", "0", ")", "{", "return", "0", ";", "}", "double", "sum", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "values", ".", "...
Returns the weighted arithmetic mean of the values in the snapshot. @return the weighted arithmetic mean
[ "Returns", "the", "weighted", "arithmetic", "mean", "of", "the", "values", "in", "the", "snapshot", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/metrics/src/main/java/io/dropwizard/metrics/WeightedSnapshot.java#L168-L179
train
Gets the mean value of the class attribute.
[ 30522, 1030, 2058, 15637, 2270, 3313, 2131, 4168, 2319, 1006, 1007, 1063, 2065, 1006, 5300, 1012, 3091, 1027, 1027, 1014, 1007, 1063, 2709, 1014, 1025, 1065, 3313, 7680, 1027, 1014, 1025, 2005, 1006, 20014, 1045, 1027, 1014, 1025, 1045, 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-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessage.java
HAProxyMessage.portStringToInt
private static int portStringToInt(String value) { int port; try { port = Integer.parseInt(value); } catch (NumberFormatException e) { throw new HAProxyProtocolException("invalid port: " + value, e); } if (port <= 0 || port > 65535) { throw ne...
java
private static int portStringToInt(String value) { int port; try { port = Integer.parseInt(value); } catch (NumberFormatException e) { throw new HAProxyProtocolException("invalid port: " + value, e); } if (port <= 0 || port > 65535) { throw ne...
[ "private", "static", "int", "portStringToInt", "(", "String", "value", ")", "{", "int", "port", ";", "try", "{", "port", "=", "Integer", ".", "parseInt", "(", "value", ")", ";", "}", "catch", "(", "NumberFormatException", "e", ")", "{", "throw", "new", ...
Convert port to integer @param value the port @return port as an integer @throws HAProxyProtocolException if port is not a valid integer
[ "Convert", "port", "to", "integer" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessage.java#L396-L409
train
Convert a string representation of a port number to an int.
[ 30522, 2797, 10763, 20014, 8831, 18886, 3070, 3406, 18447, 1006, 5164, 3643, 1007, 1063, 20014, 3417, 1025, 3046, 1063, 3417, 1027, 16109, 1012, 11968, 20240, 3372, 1006, 3643, 1007, 1025, 1065, 4608, 1006, 2193, 14192, 3686, 2595, 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...