repo
stringclasses
11 values
path
stringlengths
41
214
func_name
stringlengths
7
82
original_string
stringlengths
77
11.9k
language
stringclasses
1 value
code
stringlengths
77
11.9k
code_tokens
listlengths
22
1.57k
docstring
stringlengths
2
2.27k
docstring_tokens
listlengths
1
352
sha
stringclasses
11 values
url
stringlengths
129
319
partition
stringclasses
1 value
summary
stringlengths
7
191
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java
BootstrapTools.getTaskManagerShellCommand
public static String getTaskManagerShellCommand( Configuration flinkConfig, ContaineredTaskManagerParameters tmParams, String configDirectory, String logDirectory, boolean hasLogback, boolean hasLog4j, boolean hasKrb5, Class<?> mainClass) { final Map<String, String> startCommandValues = new H...
java
public static String getTaskManagerShellCommand( Configuration flinkConfig, ContaineredTaskManagerParameters tmParams, String configDirectory, String logDirectory, boolean hasLogback, boolean hasLog4j, boolean hasKrb5, Class<?> mainClass) { final Map<String, String> startCommandValues = new H...
[ "public", "static", "String", "getTaskManagerShellCommand", "(", "Configuration", "flinkConfig", ",", "ContaineredTaskManagerParameters", "tmParams", ",", "String", "configDirectory", ",", "String", "logDirectory", ",", "boolean", "hasLogback", ",", "boolean", "hasLog4j", ...
Generates the shell command to start a task manager. @param flinkConfig The Flink configuration. @param tmParams Parameters for the task manager. @param configDirectory The configuration directory for the flink-conf.yaml @param logDirectory The log directory. @param hasLogback Uses logback? @param hasLog4j Uses log4j? ...
[ "Generates", "the", "shell", "command", "to", "start", "a", "task", "manager", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java#L413-L476
train
Returns the shell command to run the task manager.
[ 30522, 2270, 10763, 5164, 2131, 10230, 22287, 5162, 15776, 18223, 9006, 2386, 2094, 1006, 9563, 13109, 19839, 8663, 8873, 2290, 1010, 11661, 2098, 10230, 22287, 5162, 4590, 30524, 5963, 1010, 22017, 20898, 2038, 21197, 2549, 3501, 1010, 22017...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraCommitter.java
CassandraCommitter.createResource
@Override public void createResource() throws Exception { cluster = builder.getCluster(); session = cluster.connect(); session.execute(String.format("CREATE KEYSPACE IF NOT EXISTS %s with replication={'class':'SimpleStrategy', 'replication_factor':1};", keySpace)); session.execute(String.format("CREATE TABLE ...
java
@Override public void createResource() throws Exception { cluster = builder.getCluster(); session = cluster.connect(); session.execute(String.format("CREATE KEYSPACE IF NOT EXISTS %s with replication={'class':'SimpleStrategy', 'replication_factor':1};", keySpace)); session.execute(String.format("CREATE TABLE ...
[ "@", "Override", "public", "void", "createResource", "(", ")", "throws", "Exception", "{", "cluster", "=", "builder", ".", "getCluster", "(", ")", ";", "session", "=", "cluster", ".", "connect", "(", ")", ";", "session", ".", "execute", "(", "String", "....
Generates the necessary tables to store information. @throws Exception
[ "Generates", "the", "necessary", "tables", "to", "store", "information", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraCommitter.java#L78-L96
train
Create the resource.
[ 30522, 1030, 2058, 15637, 2270, 11675, 3443, 6072, 8162, 3401, 1006, 1007, 11618, 6453, 1063, 9324, 1027, 12508, 1012, 2131, 20464, 19966, 2121, 1006, 1007, 1025, 5219, 1027, 9324, 1012, 7532, 1006, 1007, 1025, 5219, 1012, 15389, 1006, 5164...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
networknt/light-4j
metrics/src/main/java/io/dropwizard/metrics/InstrumentedExecutors.java
InstrumentedExecutors.newScheduledThreadPool
public static InstrumentedScheduledExecutorService newScheduledThreadPool( int corePoolSize, ThreadFactory threadFactory, MetricRegistry registry, String name) { return new InstrumentedScheduledExecutorService( Executors.newScheduledThreadPool(corePoolSize, threadFactory), registry, ...
java
public static InstrumentedScheduledExecutorService newScheduledThreadPool( int corePoolSize, ThreadFactory threadFactory, MetricRegistry registry, String name) { return new InstrumentedScheduledExecutorService( Executors.newScheduledThreadPool(corePoolSize, threadFactory), registry, ...
[ "public", "static", "InstrumentedScheduledExecutorService", "newScheduledThreadPool", "(", "int", "corePoolSize", ",", "ThreadFactory", "threadFactory", ",", "MetricRegistry", "registry", ",", "String", "name", ")", "{", "return", "new", "InstrumentedScheduledExecutorService"...
Creates an instrumented thread pool that can schedule commands to run after a given delay, or to execute periodically. @param corePoolSize the number of threads to keep in the pool, even if they are idle @param threadFactory the factory to use when the executor creates a new thread @param registry the {@link Met...
[ "Creates", "an", "instrumented", "thread", "pool", "that", "can", "schedule", "commands", "to", "run", "after", "a", "given", "delay", "or", "to", "execute", "periodically", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/metrics/src/main/java/io/dropwizard/metrics/InstrumentedExecutors.java#L439-L443
train
Create a new scheduled thread pool InstrumentedScheduledExecutorService.
[ 30522, 2270, 10763, 6602, 2098, 22842, 8566, 3709, 10288, 8586, 16161, 22573, 2099, 7903, 2063, 2739, 7690, 18696, 2705, 16416, 18927, 13669, 1006, 20014, 4563, 16869, 5332, 4371, 1010, 11689, 21450, 11689, 21450, 1010, 12046, 2890, 24063, 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...
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/AvroUtils.java
AvroUtils.getAvroUtils
public static AvroUtils getAvroUtils() { // try and load the special AvroUtils from the flink-avro package try { Class<?> clazz = Class.forName(AVRO_KRYO_UTILS, false, Thread.currentThread().getContextClassLoader()); return clazz.asSubclass(AvroUtils.class).getConstructor().newInstance(); } catch (ClassNotF...
java
public static AvroUtils getAvroUtils() { // try and load the special AvroUtils from the flink-avro package try { Class<?> clazz = Class.forName(AVRO_KRYO_UTILS, false, Thread.currentThread().getContextClassLoader()); return clazz.asSubclass(AvroUtils.class).getConstructor().newInstance(); } catch (ClassNotF...
[ "public", "static", "AvroUtils", "getAvroUtils", "(", ")", "{", "// try and load the special AvroUtils from the flink-avro package", "try", "{", "Class", "<", "?", ">", "clazz", "=", "Class", ".", "forName", "(", "AVRO_KRYO_UTILS", ",", "false", ",", "Thread", ".", ...
Returns either the default {@link AvroUtils} which throw an exception in cases where Avro would be needed or loads the specific utils for Avro from flink-avro.
[ "Returns", "either", "the", "default", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/AvroUtils.java#L44-L55
train
Get the AvroUtils instance.
[ 30522, 2270, 10763, 20704, 22494, 3775, 4877, 2131, 11431, 22494, 3775, 4877, 1006, 1007, 1063, 1013, 1013, 3046, 1998, 7170, 1996, 2569, 20704, 22494, 3775, 4877, 2013, 1996, 13109, 19839, 1011, 20704, 3217, 7427, 3046, 1063, 2465, 1026, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/util/ConfigurationParserUtils.java
ConfigurationParserUtils.checkConfigParameter
public static void checkConfigParameter(boolean condition, Object parameter, String name, String errorMessage) throws IllegalConfigurationException { if (!condition) { throw new IllegalConfigurationException("Invalid configuration value for " + name + " : " + parameter + " - " + errorMessage); } }
java
public static void checkConfigParameter(boolean condition, Object parameter, String name, String errorMessage) throws IllegalConfigurationException { if (!condition) { throw new IllegalConfigurationException("Invalid configuration value for " + name + " : " + parameter + " - " + errorMessage); } }
[ "public", "static", "void", "checkConfigParameter", "(", "boolean", "condition", ",", "Object", "parameter", ",", "String", "name", ",", "String", "errorMessage", ")", "throws", "IllegalConfigurationException", "{", "if", "(", "!", "condition", ")", "{", "throw", ...
Validates a condition for a config parameter and displays a standard exception, if the the condition does not hold. @param condition The condition that must hold. If the condition is false, an exception is thrown. @param parameter The parameter value. Will be shown in the exception message. @param ...
[ "Validates", "a", "condition", "for", "a", "config", "parameter", "and", "displays", "a", "standard", "exception", "if", "the", "the", "condition", "does", "not", "hold", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/ConfigurationParserUtils.java#L127-L133
train
Check configuration parameter.
[ 30522, 2270, 10763, 11675, 4638, 8663, 8873, 21600, 5400, 22828, 1006, 22017, 20898, 4650, 1010, 4874, 16381, 1010, 5164, 2171, 1010, 5164, 7561, 7834, 3736, 3351, 1007, 11618, 6206, 8663, 8873, 27390, 3370, 10288, 24422, 1063, 2065, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/map/MapBuilder.java
MapBuilder.put
public MapBuilder<K, V> put(K k, V v) { map.put(k, v); return this; }
java
public MapBuilder<K, V> put(K k, V v) { map.put(k, v); return this; }
[ "public", "MapBuilder", "<", "K", ",", "V", ">", "put", "(", "K", "k", ",", "V", "v", ")", "{", "map", ".", "put", "(", "k", ",", "v", ")", ";", "return", "this", ";", "}" ]
链式Map创建 @param k Key类型 @param v Value类型 @return 当前类
[ "链式Map创建" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapBuilder.java#L44-L47
train
Adds a mapping between the specified key and value to the map.
[ 30522, 2270, 4949, 8569, 23891, 2099, 1026, 1047, 1010, 1058, 1028, 2404, 1006, 1047, 1047, 1010, 1058, 1058, 1007, 1063, 4949, 1012, 2404, 1006, 1047, 1010, 1058, 1007, 1025, 2709, 2023, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/RuntimeUtil.java
RuntimeUtil.exec
public static Process exec(String[] envp, File dir, String... cmds) { if (ArrayUtil.isEmpty(cmds)) { throw new NullPointerException("Command is empty !"); } // 单条命令的情况 if (1 == cmds.length) { final String cmd = cmds[0]; if (StrUtil.isBlank(cmd)) { throw new NullPointerException("Command i...
java
public static Process exec(String[] envp, File dir, String... cmds) { if (ArrayUtil.isEmpty(cmds)) { throw new NullPointerException("Command is empty !"); } // 单条命令的情况 if (1 == cmds.length) { final String cmd = cmds[0]; if (StrUtil.isBlank(cmd)) { throw new NullPointerException("Command i...
[ "public", "static", "Process", "exec", "(", "String", "[", "]", "envp", ",", "File", "dir", ",", "String", "...", "cmds", ")", "{", "if", "(", "ArrayUtil", ".", "isEmpty", "(", "cmds", ")", ")", "{", "throw", "new", "NullPointerException", "(", "\"Comm...
执行命令<br> 命令带参数时参数可作为其中一个参数,也可以将命令和参数组合为一个字符串传入 @param envp 环境变量参数,传入形式为key=value,null表示继承系统环境变量 @param dir 执行命令所在目录(用于相对路径命令执行),null表示使用当前进程执行的目录 @param cmds 命令 @return {@link Process} @since 4.1.6
[ "执行命令<br", ">", "命令带参数时参数可作为其中一个参数,也可以将命令和参数组合为一个字符串传入" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/RuntimeUtil.java#L122-L140
train
Executes a command on the specified directory.
[ 30522, 2270, 10763, 2832, 4654, 8586, 1006, 5164, 1031, 1033, 4372, 2615, 2361, 1010, 5371, 16101, 1010, 5164, 1012, 1012, 1012, 4642, 5104, 1007, 1063, 2065, 1006, 9140, 21823, 2140, 1012, 2003, 6633, 13876, 2100, 1006, 4642, 5104, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/SqlClient.java
SqlClient.main
public static void main(String[] args) { if (args.length < 1) { CliOptionsParser.printHelpClient(); return; } switch (args[0]) { case MODE_EMBEDDED: // remove mode final String[] modeArgs = Arrays.copyOfRange(args, 1, args.length); final CliOptions options = CliOptionsParser.parseEmbeddedMo...
java
public static void main(String[] args) { if (args.length < 1) { CliOptionsParser.printHelpClient(); return; } switch (args[0]) { case MODE_EMBEDDED: // remove mode final String[] modeArgs = Arrays.copyOfRange(args, 1, args.length); final CliOptions options = CliOptionsParser.parseEmbeddedMo...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "if", "(", "args", ".", "length", "<", "1", ")", "{", "CliOptionsParser", ".", "printHelpClient", "(", ")", ";", "return", ";", "}", "switch", "(", "args", "[", "0", "]"...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/SqlClient.java#L177-L217
train
Main method for the command line tool.
[ 30522, 2270, 10763, 11675, 2364, 1006, 5164, 1031, 1033, 12098, 5620, 1007, 1063, 2065, 1006, 12098, 5620, 1012, 3091, 1026, 1015, 1007, 1063, 18856, 3695, 16790, 27694, 8043, 1012, 6140, 16001, 15042, 8751, 3372, 1006, 1007, 1025, 2709, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-http/src/main/java/cn/hutool/http/webservice/SoapClient.java
SoapClient.send
public String send(boolean pretty) { final String body = sendForResponse().body(); return pretty ? XmlUtil.format(body) : body; }
java
public String send(boolean pretty) { final String body = sendForResponse().body(); return pretty ? XmlUtil.format(body) : body; }
[ "public", "String", "send", "(", "boolean", "pretty", ")", "{", "final", "String", "body", "=", "sendForResponse", "(", ")", ".", "body", "(", ")", ";", "return", "pretty", "?", "XmlUtil", ".", "format", "(", "body", ")", ":", "body", ";", "}" ]
执行Webservice请求,既发送SOAP内容 @param pretty 是否格式化 @return 返回结果
[ "执行Webservice请求,既发送SOAP内容" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/webservice/SoapClient.java#L427-L430
train
Send the request and return the response body as a string.
[ 30522, 2270, 5164, 4604, 1006, 22017, 20898, 3492, 1007, 1063, 2345, 5164, 2303, 1027, 4604, 29278, 6072, 26029, 3366, 1006, 1007, 1012, 2303, 1006, 1007, 1025, 2709, 3492, 1029, 20950, 21823, 2140, 1012, 4289, 1006, 2303, 1007, 1024, 2303,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/handler/HandleHelper.java
HandleHelper.handleRow
public static <T extends Entity> T handleRow(T row, int columnCount, ResultSetMetaData meta, ResultSet rs, boolean withMetaInfo) throws SQLException { String columnLabel; int type; for (int i = 1; i <= columnCount; i++) { columnLabel = meta.getColumnLabel(i); type = meta.getColumnType(i); row.put(c...
java
public static <T extends Entity> T handleRow(T row, int columnCount, ResultSetMetaData meta, ResultSet rs, boolean withMetaInfo) throws SQLException { String columnLabel; int type; for (int i = 1; i <= columnCount; i++) { columnLabel = meta.getColumnLabel(i); type = meta.getColumnType(i); row.put(c...
[ "public", "static", "<", "T", "extends", "Entity", ">", "T", "handleRow", "(", "T", "row", ",", "int", "columnCount", ",", "ResultSetMetaData", "meta", ",", "ResultSet", "rs", ",", "boolean", "withMetaInfo", ")", "throws", "SQLException", "{", "String", "col...
处理单条数据 @param <T> Entity及其子对象 @param row Entity对象 @param columnCount 列数 @param meta ResultSetMetaData @param rs 数据集 @param withMetaInfo 是否包含表名、字段名等元信息 @return 每一行的Entity @throws SQLException SQL执行异常 @since 3.3.1
[ "处理单条数据" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/handler/HandleHelper.java#L128-L141
train
Handles a single row of a table from a ResultSet.
[ 30522, 2270, 10763, 1026, 1056, 8908, 9178, 1028, 1056, 28213, 5004, 1006, 1056, 5216, 1010, 20014, 5930, 3597, 16671, 1010, 3463, 3388, 11368, 8447, 2696, 18804, 1010, 3463, 3388, 12667, 1010, 22017, 20898, 2007, 11368, 8113, 14876, 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-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.executeProgram
protected void executeProgram(PackagedProgram program, ClusterClient<?> client, int parallelism) throws ProgramMissingJobException, ProgramInvocationException { logAndSysout("Starting execution of program"); final JobSubmissionResult result = client.run(program, parallelism); if (null == result) { throw new ...
java
protected void executeProgram(PackagedProgram program, ClusterClient<?> client, int parallelism) throws ProgramMissingJobException, ProgramInvocationException { logAndSysout("Starting execution of program"); final JobSubmissionResult result = client.run(program, parallelism); if (null == result) { throw new ...
[ "protected", "void", "executeProgram", "(", "PackagedProgram", "program", ",", "ClusterClient", "<", "?", ">", "client", ",", "int", "parallelism", ")", "throws", "ProgramMissingJobException", ",", "ProgramInvocationException", "{", "logAndSysout", "(", "\"Starting exec...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L739-L762
train
Execute a packaged program.
[ 30522, 5123, 11675, 15389, 21572, 13113, 1006, 21972, 21572, 13113, 2565, 1010, 9324, 20464, 11638, 1026, 1029, 1028, 7396, 1010, 20014, 5903, 2964, 1007, 11618, 2565, 15630, 7741, 5558, 4783, 2595, 24422, 1010, 2565, 2378, 19152, 10288, 2442...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/iomanager/IOManagerAsync.java
IOManagerAsync.createBlockChannelReader
@Override public BlockChannelReader<MemorySegment> createBlockChannelReader(FileIOChannel.ID channelID, LinkedBlockingQueue<MemorySegment> returnQueue) throws IOException { checkState(!isShutdown.get(), "I/O-Manager is shut down."); return new AsynchronousBlockReader(channelID, this.readers[channelID.ge...
java
@Override public BlockChannelReader<MemorySegment> createBlockChannelReader(FileIOChannel.ID channelID, LinkedBlockingQueue<MemorySegment> returnQueue) throws IOException { checkState(!isShutdown.get(), "I/O-Manager is shut down."); return new AsynchronousBlockReader(channelID, this.readers[channelID.ge...
[ "@", "Override", "public", "BlockChannelReader", "<", "MemorySegment", ">", "createBlockChannelReader", "(", "FileIOChannel", ".", "ID", "channelID", ",", "LinkedBlockingQueue", "<", "MemorySegment", ">", "returnQueue", ")", "throws", "IOException", "{", "checkState", ...
Creates a block channel reader that reads blocks from the given channel. The reader reads asynchronously, such that a read request is accepted, carried out at some (close) point in time, and the full segment is pushed to the given queue. @param channelID The descriptor for the channel to write to. @param returnQueue T...
[ "Creates", "a", "block", "channel", "reader", "that", "reads", "blocks", "from", "the", "given", "channel", ".", "The", "reader", "reads", "asynchronously", "such", "that", "a", "read", "request", "is", "accepted", "carried", "out", "at", "some", "(", "close...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/iomanager/IOManagerAsync.java#L220-L226
train
Create a block channel reader.
[ 30522, 1030, 2058, 15637, 2270, 3796, 26058, 16416, 4063, 1026, 3638, 3366, 21693, 4765, 1028, 3443, 23467, 26058, 16416, 4063, 1006, 5371, 3695, 26058, 1012, 8909, 3149, 3593, 1010, 5799, 23467, 2075, 4226, 5657, 1026, 3638, 3366, 21693, 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...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java
ExecutionVertex.getPreferredLocationsBasedOnState
public Collection<CompletableFuture<TaskManagerLocation>> getPreferredLocationsBasedOnState() { TaskManagerLocation priorLocation; if (currentExecution.getTaskRestore() != null && (priorLocation = getLatestPriorLocation()) != null) { return Collections.singleton(CompletableFuture.completedFuture(priorLocation));...
java
public Collection<CompletableFuture<TaskManagerLocation>> getPreferredLocationsBasedOnState() { TaskManagerLocation priorLocation; if (currentExecution.getTaskRestore() != null && (priorLocation = getLatestPriorLocation()) != null) { return Collections.singleton(CompletableFuture.completedFuture(priorLocation));...
[ "public", "Collection", "<", "CompletableFuture", "<", "TaskManagerLocation", ">", ">", "getPreferredLocationsBasedOnState", "(", ")", "{", "TaskManagerLocation", "priorLocation", ";", "if", "(", "currentExecution", ".", "getTaskRestore", "(", ")", "!=", "null", "&&",...
Gets the preferred location to execute the current task execution attempt, based on the state that the execution attempt will resume. @return A size-one collection with the location preference, or null, if there is no location preference based on the state.
[ "Gets", "the", "preferred", "location", "to", "execute", "the", "current", "task", "execution", "attempt", "based", "on", "the", "state", "that", "the", "execution", "attempt", "will", "resume", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java#L504-L512
train
Returns the list of preferred locations based on the current state of the task manager.
[ 30522, 2270, 3074, 1026, 4012, 10814, 10880, 11263, 11244, 1026, 4708, 24805, 4590, 4135, 10719, 1028, 1028, 2131, 28139, 7512, 5596, 4135, 10719, 19022, 11022, 5280, 9153, 2618, 1006, 1007, 1063, 4708, 24805, 4590, 4135, 10719, 3188, 4135, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
ExecutionGraph.attachJobGraph
public void attachJobGraph(List<JobVertex> topologiallySorted) throws JobException { assertRunningInJobMasterMainThread(); LOG.debug("Attaching {} topologically sorted vertices to existing job graph with {} " + "vertices and {} intermediate results.", topologiallySorted.size(), tasks.size(), intermed...
java
public void attachJobGraph(List<JobVertex> topologiallySorted) throws JobException { assertRunningInJobMasterMainThread(); LOG.debug("Attaching {} topologically sorted vertices to existing job graph with {} " + "vertices and {} intermediate results.", topologiallySorted.size(), tasks.size(), intermed...
[ "public", "void", "attachJobGraph", "(", "List", "<", "JobVertex", ">", "topologiallySorted", ")", "throws", "JobException", "{", "assertRunningInJobMasterMainThread", "(", ")", ";", "LOG", ".", "debug", "(", "\"Attaching {} topologically sorted vertices to existing job gra...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java#L807-L858
train
Attaches a list of job vertices to the existing job graph.
[ 30522, 2270, 11675, 22476, 5558, 2497, 14413, 1006, 2862, 1026, 3105, 16874, 10288, 1028, 2327, 12898, 10440, 9215, 21748, 3064, 1007, 11618, 3105, 10288, 24422, 1063, 20865, 15532, 5582, 2378, 5558, 25526, 24268, 24238, 2705, 16416, 2094, 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-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BaseHybridHashTable.java
BaseHybridHashTable.freeCurrent
public void freeCurrent() { int beforeReleaseNum = availableMemory.size(); memManager.release(availableMemory); allocatedFloatingNum -= (beforeReleaseNum - availableMemory.size()); }
java
public void freeCurrent() { int beforeReleaseNum = availableMemory.size(); memManager.release(availableMemory); allocatedFloatingNum -= (beforeReleaseNum - availableMemory.size()); }
[ "public", "void", "freeCurrent", "(", ")", "{", "int", "beforeReleaseNum", "=", "availableMemory", ".", "size", "(", ")", ";", "memManager", ".", "release", "(", "availableMemory", ")", ";", "allocatedFloatingNum", "-=", "(", "beforeReleaseNum", "-", "availableM...
Free the memory not used.
[ "Free", "the", "memory", "not", "used", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BaseHybridHashTable.java#L484-L488
train
Free the current memory.
[ 30522, 2270, 11675, 2489, 10841, 14343, 3372, 1006, 1007, 1063, 20014, 2077, 16570, 19500, 19172, 1027, 2800, 4168, 5302, 2854, 1012, 2946, 1006, 1007, 1025, 2033, 14760, 27031, 2099, 1012, 2713, 1006, 2800, 4168, 5302, 2854, 1007, 1025, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.div
public static BigDecimal div(Number v1, Number v2) { return div(v1, v2, DEFAUT_DIV_SCALE); }
java
public static BigDecimal div(Number v1, Number v2) { return div(v1, v2, DEFAUT_DIV_SCALE); }
[ "public", "static", "BigDecimal", "div", "(", "Number", "v1", ",", "Number", "v2", ")", "{", "return", "div", "(", "v1", ",", "v2", ",", "DEFAUT_DIV_SCALE", ")", ";", "}" ]
提供(相对)精确的除法运算,当发生除不尽的情况的时候,精确到小数点后10位,后面的四舍五入 @param v1 被除数 @param v2 除数 @return 两个参数的商 @since 3.1.0
[ "提供", "(", "相对", ")", "精确的除法运算", "当发生除不尽的情况的时候", "精确到小数点后10位", "后面的四舍五入" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L539-L541
train
Divide two numbers.
[ 30522, 2270, 10763, 2502, 3207, 6895, 9067, 4487, 2615, 1006, 2193, 1058, 2487, 1010, 2193, 1058, 2475, 1007, 1063, 2709, 4487, 2615, 1006, 1058, 2487, 1010, 1058, 2475, 1010, 13366, 4887, 2102, 1035, 4487, 2615, 1035, 4094, 1007, 1025, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/clause/InsertDuplicateKeyUpdateClauseParser.java
InsertDuplicateKeyUpdateClauseParser.parse
public void parse(final InsertStatement insertStatement) { if (!lexerEngine.skipIfEqual(getCustomizedInsertKeywords())) { return; } lexerEngine.accept(DefaultKeyword.DUPLICATE); lexerEngine.accept(DefaultKeyword.KEY); lexerEngine.accept(DefaultKeyword.UPDATE); ...
java
public void parse(final InsertStatement insertStatement) { if (!lexerEngine.skipIfEqual(getCustomizedInsertKeywords())) { return; } lexerEngine.accept(DefaultKeyword.DUPLICATE); lexerEngine.accept(DefaultKeyword.KEY); lexerEngine.accept(DefaultKeyword.UPDATE); ...
[ "public", "void", "parse", "(", "final", "InsertStatement", "insertStatement", ")", "{", "if", "(", "!", "lexerEngine", ".", "skipIfEqual", "(", "getCustomizedInsertKeywords", "(", ")", ")", ")", "{", "return", ";", "}", "lexerEngine", ".", "accept", "(", "D...
Parse insert duplicate key update. @param insertStatement insert statement
[ "Parse", "insert", "duplicate", "key", "update", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/clause/InsertDuplicateKeyUpdateClauseParser.java#L56-L79
train
Parse INSERT INTO... ON DUPLICATE KEY UPDATE...
[ 30522, 2270, 11675, 11968, 3366, 1006, 2345, 19274, 9153, 18532, 4765, 19274, 9153, 18532, 4765, 1007, 1063, 2065, 1006, 999, 17244, 7869, 3070, 3170, 1012, 13558, 29323, 26426, 1006, 2131, 7874, 20389, 3550, 7076, 8743, 14839, 22104, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/Broker.java
Broker.retrieveSharedQueue
private BlockingQueue<V> retrieveSharedQueue(String key) { BlockingQueue<V> queue = mediations.get(key); if (queue == null) { queue = new ArrayBlockingQueue<V>(1); BlockingQueue<V> commonQueue = mediations.putIfAbsent(key, queue); return commonQueue != null ? commonQueue : queue; } else { return queue...
java
private BlockingQueue<V> retrieveSharedQueue(String key) { BlockingQueue<V> queue = mediations.get(key); if (queue == null) { queue = new ArrayBlockingQueue<V>(1); BlockingQueue<V> commonQueue = mediations.putIfAbsent(key, queue); return commonQueue != null ? commonQueue : queue; } else { return queue...
[ "private", "BlockingQueue", "<", "V", ">", "retrieveSharedQueue", "(", "String", "key", ")", "{", "BlockingQueue", "<", "V", ">", "queue", "=", "mediations", ".", "get", "(", "key", ")", ";", "if", "(", "queue", "==", "null", ")", "{", "queue", "=", ...
Thread-safe call to get a shared {@link BlockingQueue}.
[ "Thread", "-", "safe", "call", "to", "get", "a", "shared", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/Broker.java#L75-L84
train
Retrieve a shared queue.
[ 30522, 2797, 10851, 4226, 5657, 1026, 1058, 1028, 12850, 7377, 5596, 4226, 5657, 1006, 5164, 3145, 1007, 1063, 10851, 4226, 5657, 1026, 1058, 1028, 24240, 1027, 26435, 2015, 1012, 2131, 1006, 3145, 1007, 1025, 2065, 1006, 24240, 1027, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/directed/TriangleListing.java
TriangleListing.runInternal
@Override public DataSet<Result<K>> runInternal(Graph<K, VV, EV> input) throws Exception { // u, v, bitmask where u < v DataSet<Tuple3<K, K, ByteValue>> filteredByID = input .getEdges() .map(new OrderByID<>()) .setParallelism(parallelism) .name("Order by ID") .groupBy(0, 1) .reduceGroup(new ...
java
@Override public DataSet<Result<K>> runInternal(Graph<K, VV, EV> input) throws Exception { // u, v, bitmask where u < v DataSet<Tuple3<K, K, ByteValue>> filteredByID = input .getEdges() .map(new OrderByID<>()) .setParallelism(parallelism) .name("Order by ID") .groupBy(0, 1) .reduceGroup(new ...
[ "@", "Override", "public", "DataSet", "<", "Result", "<", "K", ">", ">", "runInternal", "(", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "input", ")", "throws", "Exception", "{", "// u, v, bitmask where u < v", "DataSet", "<", "Tuple3", "<", "K", ",", ...
/* Implementation notes: The requirement that "K extends CopyableValue<K>" can be removed when Flink has a self-join and GenerateTriplets is implemented as such. ProjectTriangles should eventually be replaced by ".projectFirst("*")" when projections use code generation.
[ "/", "*", "Implementation", "notes", ":" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/directed/TriangleListing.java#L81-L136
train
This method is used to run the H2O algorithm on the input Graph.
[ 30522, 1030, 2058, 15637, 2270, 2951, 13462, 1026, 2765, 1026, 1047, 1028, 1028, 2448, 18447, 11795, 2389, 1006, 10629, 1026, 1047, 1010, 1058, 2615, 1010, 23408, 1028, 7953, 1007, 11618, 6453, 1063, 1013, 1013, 1057, 1010, 1058, 1010, 2978...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
SqlValidatorImpl.setValidatedNodeType
@SuppressWarnings("deprecation") public final void setValidatedNodeType(SqlNode node, RelDataType type) { Objects.requireNonNull(type); Objects.requireNonNull(node); if (type.equals(unknownType)) { // don't set anything until we know what it is, and don't overwrite // a known type with the unknown type ...
java
@SuppressWarnings("deprecation") public final void setValidatedNodeType(SqlNode node, RelDataType type) { Objects.requireNonNull(type); Objects.requireNonNull(node); if (type.equals(unknownType)) { // don't set anything until we know what it is, and don't overwrite // a known type with the unknown type ...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "final", "void", "setValidatedNodeType", "(", "SqlNode", "node", ",", "RelDataType", "type", ")", "{", "Objects", ".", "requireNonNull", "(", "type", ")", ";", "Objects", ".", "requireNonNull", "(",...
Saves the type of a {@link SqlNode}, now that it has been validated. <p>Unlike the base class method, this method is not deprecated. It is available from within Calcite, but is not part of the public API. @param node A SQL parse tree node, never null @param type Its type; must not be null
[ "Saves", "the", "type", "of", "a", "{", "@link", "SqlNode", "}", "now", "that", "it", "has", "been", "validated", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L1598-L1608
train
Sets the validated type for the given node.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 2139, 28139, 10719, 1000, 1007, 2270, 2345, 11675, 2275, 10175, 8524, 3064, 3630, 3207, 13874, 1006, 29296, 3630, 3207, 13045, 1010, 2128, 15150, 29336, 18863, 2828, 1007, 1063, 5200, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/io/CsvReader.java
CsvReader.types
public <T0, T1> DataSource<Tuple2<T0, T1>> types(Class<T0> type0, Class<T1> type1) { TupleTypeInfo<Tuple2<T0, T1>> types = TupleTypeInfo.getBasicAndBasicValueTupleTypeInfo(type0, type1); CsvInputFormat<Tuple2<T0, T1>> inputFormat = new TupleCsvInputFormat<Tuple2<T0, T1>>(path, types, this.includedMask); configure...
java
public <T0, T1> DataSource<Tuple2<T0, T1>> types(Class<T0> type0, Class<T1> type1) { TupleTypeInfo<Tuple2<T0, T1>> types = TupleTypeInfo.getBasicAndBasicValueTupleTypeInfo(type0, type1); CsvInputFormat<Tuple2<T0, T1>> inputFormat = new TupleCsvInputFormat<Tuple2<T0, T1>>(path, types, this.includedMask); configure...
[ "public", "<", "T0", ",", "T1", ">", "DataSource", "<", "Tuple2", "<", "T0", ",", "T1", ">", ">", "types", "(", "Class", "<", "T0", ">", "type0", ",", "Class", "<", "T1", ">", "type1", ")", "{", "TupleTypeInfo", "<", "Tuple2", "<", "T0", ",", "...
Specifies the types for the CSV fields. This method parses the CSV data to a 2-tuple which has fields of the specified types. This method is overloaded for each possible length of the tuples to support type safe creation of data sets through CSV parsing. @param type0 The type of CSV field 0 and the type of field 0 in ...
[ "Specifies", "the", "types", "for", "the", "CSV", "fields", ".", "This", "method", "parses", "the", "CSV", "data", "to", "a", "2", "-", "tuple", "which", "has", "fields", "of", "the", "specified", "types", ".", "This", "method", "is", "overloaded", "for"...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/io/CsvReader.java#L409-L414
train
Creates a DataSource that contains tuples of the given type.
[ 30522, 2270, 1026, 1056, 2692, 1010, 1056, 2487, 1028, 2951, 6499, 3126, 3401, 1026, 10722, 10814, 2475, 1026, 1056, 2692, 1010, 1056, 2487, 1028, 1028, 4127, 1006, 2465, 1026, 1056, 2692, 1028, 2828, 2692, 1010, 2465, 1026, 1056, 2487, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java
Restarter.relaunch
protected Throwable relaunch(ClassLoader classLoader) throws Exception { RestartLauncher launcher = new RestartLauncher(classLoader, this.mainClassName, this.args, this.exceptionHandler); launcher.start(); launcher.join(); return launcher.getError(); }
java
protected Throwable relaunch(ClassLoader classLoader) throws Exception { RestartLauncher launcher = new RestartLauncher(classLoader, this.mainClassName, this.args, this.exceptionHandler); launcher.start(); launcher.join(); return launcher.getError(); }
[ "protected", "Throwable", "relaunch", "(", "ClassLoader", "classLoader", ")", "throws", "Exception", "{", "RestartLauncher", "launcher", "=", "new", "RestartLauncher", "(", "classLoader", ",", "this", ".", "mainClassName", ",", "this", ".", "args", ",", "this", ...
Relaunch the application using the specified classloader. @param classLoader the classloader to use @return any exception that caused the launch to fail or {@code null} @throws Exception in case of errors
[ "Relaunch", "the", "application", "using", "the", "specified", "classloader", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java#L295-L301
train
Relaunch the application.
[ 30522, 5123, 5466, 3085, 2128, 17298, 12680, 1006, 2465, 11066, 2121, 2465, 11066, 2121, 1007, 11618, 6453, 1063, 23818, 17298, 26091, 2099, 22742, 1027, 2047, 23818, 17298, 26091, 2099, 1006, 2465, 11066, 2121, 1010, 2023, 1012, 2364, 26266,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-json/src/main/java/cn/hutool/json/JSONTokener.java
JSONTokener.nextString
public String nextString(char quote) throws JSONException { char c; StringBuilder sb = new StringBuilder(); for (;;) { c = this.next(); switch (c) { case 0: case '\n': case '\r': throw this.syntaxError("Unterminated string"); case '\\':// 转义符 c = this.next(); switch (c) { case 'b...
java
public String nextString(char quote) throws JSONException { char c; StringBuilder sb = new StringBuilder(); for (;;) { c = this.next(); switch (c) { case 0: case '\n': case '\r': throw this.syntaxError("Unterminated string"); case '\\':// 转义符 c = this.next(); switch (c) { case 'b...
[ "public", "String", "nextString", "(", "char", "quote", ")", "throws", "JSONException", "{", "char", "c", ";", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", ";", ";", ")", "{", "c", "=", "this", ".", "next", "(", ")",...
返回当前位置到指定引号前的所有字符,反斜杠的转义符也会被处理。<br> 标准的JSON是不允许使用单引号包含字符串的,但是此实现允许。 @param quote 字符引号, 包括 <code>"</code>(双引号) 或 <code>'</code>(单引号)。 @return 截止到引号前的字符串 @throws JSONException 出现无结束的字符串时抛出此异常
[ "返回当前位置到指定引号前的所有字符,反斜杠的转义符也会被处理。<br", ">", "标准的JSON是不允许使用单引号包含字符串的,但是此实现允许。" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/JSONTokener.java#L200-L248
train
Returns the next string in the JSON stream.
[ 30522, 2270, 5164, 2279, 3367, 4892, 1006, 25869, 14686, 1007, 11618, 1046, 3385, 10288, 24422, 1063, 30524, 1005, 1024, 5466, 2023, 1012, 20231, 2121, 29165, 1006, 1000, 4895, 3334, 26972, 5164, 1000, 1007, 1025, 2553, 1005, 1032, 1032, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-twitter/src/main/java/org/apache/flink/streaming/connectors/twitter/TwitterSource.java
TwitterSource.setCustomEndpointInitializer
public void setCustomEndpointInitializer(EndpointInitializer initializer) { Objects.requireNonNull(initializer, "Initializer has to be set"); ClosureCleaner.ensureSerializable(initializer); this.initializer = initializer; }
java
public void setCustomEndpointInitializer(EndpointInitializer initializer) { Objects.requireNonNull(initializer, "Initializer has to be set"); ClosureCleaner.ensureSerializable(initializer); this.initializer = initializer; }
[ "public", "void", "setCustomEndpointInitializer", "(", "EndpointInitializer", "initializer", ")", "{", "Objects", ".", "requireNonNull", "(", "initializer", ",", "\"Initializer has to be set\"", ")", ";", "ClosureCleaner", ".", "ensureSerializable", "(", "initializer", ")...
Set a custom endpoint initializer.
[ "Set", "a", "custom", "endpoint", "initializer", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-twitter/src/main/java/org/apache/flink/streaming/connectors/twitter/TwitterSource.java#L106-L110
train
Sets the custom endpoint initializer.
[ 30522, 2270, 11675, 2275, 7874, 20389, 10497, 8400, 5498, 20925, 17629, 1006, 2203, 8400, 5498, 20925, 17629, 3988, 17629, 1007, 1063, 5200, 1012, 5478, 8540, 11231, 3363, 1006, 3988, 17629, 1010, 1000, 3988, 17629, 2038, 2000, 2022, 2275, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Segment.java
Segment.convert
protected static List<Term> convert(List<Vertex> vertexList, boolean offsetEnabled) { assert vertexList != null; assert vertexList.size() >= 2 : "这条路径不应当短于2" + vertexList.toString(); int length = vertexList.size() - 2; List<Term> resultList = new ArrayList<Term>(length); Iter...
java
protected static List<Term> convert(List<Vertex> vertexList, boolean offsetEnabled) { assert vertexList != null; assert vertexList.size() >= 2 : "这条路径不应当短于2" + vertexList.toString(); int length = vertexList.size() - 2; List<Term> resultList = new ArrayList<Term>(length); Iter...
[ "protected", "static", "List", "<", "Term", ">", "convert", "(", "List", "<", "Vertex", ">", "vertexList", ",", "boolean", "offsetEnabled", ")", "{", "assert", "vertexList", "!=", "null", ";", "assert", "vertexList", ".", "size", "(", ")", ">=", "2", ":"...
将一条路径转为最终结果 @param vertexList @param offsetEnabled 是否计算offset @return
[ "将一条路径转为最终结果" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/Segment.java#L358-L388
train
Convert a list of Vertex objects to a list of Term objects.
[ 30522, 5123, 10763, 2862, 1026, 2744, 1028, 10463, 1006, 2862, 1026, 19449, 1028, 19449, 9863, 1010, 22017, 20898, 16396, 8189, 23242, 1007, 1063, 20865, 19449, 9863, 999, 1027, 19701, 1025, 20865, 19449, 9863, 1012, 2946, 1006, 1007, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java
ReflectUtil.getFieldValue
public static Object getFieldValue(Object obj, Field field) throws UtilException { if (null == obj || null == field) { return null; } field.setAccessible(true); Object result = null; try { result = field.get(obj); } catch (IllegalAccessException e) { throw new UtilException(e, "IllegalAcce...
java
public static Object getFieldValue(Object obj, Field field) throws UtilException { if (null == obj || null == field) { return null; } field.setAccessible(true); Object result = null; try { result = field.get(obj); } catch (IllegalAccessException e) { throw new UtilException(e, "IllegalAcce...
[ "public", "static", "Object", "getFieldValue", "(", "Object", "obj", ",", "Field", "field", ")", "throws", "UtilException", "{", "if", "(", "null", "==", "obj", "||", "null", "==", "field", ")", "{", "return", "null", ";", "}", "field", ".", "setAccessib...
获取字段值 @param obj 对象 @param field 字段 @return 字段值 @throws UtilException 包装IllegalAccessException异常
[ "获取字段值" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L194-L206
train
Gets the value of a field from an object.
[ 30522, 2270, 10763, 4874, 2131, 3790, 10175, 5657, 1006, 4874, 27885, 3501, 1010, 2492, 2492, 1007, 11618, 21183, 9463, 2595, 24422, 1063, 2065, 1006, 19701, 1027, 1027, 27885, 3501, 1064, 1064, 19701, 1027, 1027, 2492, 1007, 1063, 2709, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostMultipartRequestDecoder.java
HttpPostMultipartRequestDecoder.readDelimiterStandard
private static String readDelimiterStandard(ByteBuf undecodedChunk, String delimiter) { int readerIndex = undecodedChunk.readerIndex(); try { StringBuilder sb = new StringBuilder(64); int delimiterPos = 0; int len = delimiter.length(); while (undecodedChun...
java
private static String readDelimiterStandard(ByteBuf undecodedChunk, String delimiter) { int readerIndex = undecodedChunk.readerIndex(); try { StringBuilder sb = new StringBuilder(64); int delimiterPos = 0; int len = delimiter.length(); while (undecodedChun...
[ "private", "static", "String", "readDelimiterStandard", "(", "ByteBuf", "undecodedChunk", ",", "String", "delimiter", ")", "{", "int", "readerIndex", "=", "undecodedChunk", ".", "readerIndex", "(", ")", ";", "try", "{", "StringBuilder", "sb", "=", "new", "String...
Read one line up to --delimiter or --delimiter-- and if existing the CRLF or LF Read one line up to --delimiter or --delimiter-- and if existing the CRLF or LF. Note that CRLF or LF are mandatory for opening delimiter (--delimiter) but not for closing delimiter (--delimiter--) since some clients does not include CRLF i...
[ "Read", "one", "line", "up", "to", "--", "delimiter", "or", "--", "delimiter", "--", "and", "if", "existing", "the", "CRLF", "or", "LF", "Read", "one", "line", "up", "to", "--", "delimiter", "or", "--", "delimiter", "--", "and", "if", "existing", "the"...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostMultipartRequestDecoder.java#L1086-L1164
train
Reads the standard delimiter from the given byte buffer.
[ 30522, 2797, 10763, 5164, 3191, 9247, 27605, 7747, 5794, 7662, 2094, 1006, 24880, 8569, 2546, 6151, 8586, 10244, 16409, 17157, 2243, 1010, 5164, 3972, 27605, 3334, 1007, 1063, 20014, 8068, 22254, 10288, 1027, 6151, 8586, 10244, 16409, 17157, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/SqlBuilder.java
SqlBuilder.join
public SqlBuilder join(String tableName, Join join) { if (StrUtil.isBlank(tableName)) { throw new DbRuntimeException("Table name is blank !"); } if (null != join) { sql.append(StrUtil.SPACE).append(join).append(" JOIN "); if (null != wrapper) { // 包装表名 tableName = wrapper.wrap(tableName...
java
public SqlBuilder join(String tableName, Join join) { if (StrUtil.isBlank(tableName)) { throw new DbRuntimeException("Table name is blank !"); } if (null != join) { sql.append(StrUtil.SPACE).append(join).append(" JOIN "); if (null != wrapper) { // 包装表名 tableName = wrapper.wrap(tableName...
[ "public", "SqlBuilder", "join", "(", "String", "tableName", ",", "Join", "join", ")", "{", "if", "(", "StrUtil", ".", "isBlank", "(", "tableName", ")", ")", "{", "throw", "new", "DbRuntimeException", "(", "\"Table name is blank !\"", ")", ";", "}", "if", "...
多表关联 @param tableName 被关联的表名 @param join 内联方式 @return 自己
[ "多表关联" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/sql/SqlBuilder.java#L439-L453
train
Appends a JOIN clause to the SQL statement.
[ 30522, 2270, 29296, 8569, 23891, 2099, 3693, 1006, 5164, 2795, 18442, 1010, 3693, 3693, 1007, 1063, 2065, 1006, 2358, 22134, 4014, 1012, 2003, 28522, 8950, 1006, 2795, 18442, 1007, 1007, 1063, 5466, 2047, 16962, 15532, 7292, 10288, 24422, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java
AllWindowedStream.reduce
@PublicEvolving public <R> SingleOutputStreamOperator<R> reduce( ReduceFunction<T> reduceFunction, AllWindowFunction<T, R, W> function) { TypeInformation<T> inType = input.getType(); TypeInformation<R> resultType = getAllWindowFunctionReturnType(function, inType); return reduce(reduceFunction, function, ...
java
@PublicEvolving public <R> SingleOutputStreamOperator<R> reduce( ReduceFunction<T> reduceFunction, AllWindowFunction<T, R, W> function) { TypeInformation<T> inType = input.getType(); TypeInformation<R> resultType = getAllWindowFunctionReturnType(function, inType); return reduce(reduceFunction, function, ...
[ "@", "PublicEvolving", "public", "<", "R", ">", "SingleOutputStreamOperator", "<", "R", ">", "reduce", "(", "ReduceFunction", "<", "T", ">", "reduceFunction", ",", "AllWindowFunction", "<", "T", ",", "R", ",", "W", ">", "function", ")", "{", "TypeInformation...
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/AllWindowedStream.java#L232-L241
train
Returns a new stream that combines the results of applying the given reduce function and all window functions.
[ 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, 2035, 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/collection/CollUtil.java
CollUtil.toMapList
public static <K, V> List<Map<K, V>> toMapList(Map<K, ? extends Iterable<V>> listMap) { return MapUtil.toMapList(listMap); }
java
public static <K, V> List<Map<K, V>> toMapList(Map<K, ? extends Iterable<V>> listMap) { return MapUtil.toMapList(listMap); }
[ "public", "static", "<", "K", ",", "V", ">", "List", "<", "Map", "<", "K", ",", "V", ">", ">", "toMapList", "(", "Map", "<", "K", ",", "?", "extends", "Iterable", "<", "V", ">", ">", "listMap", ")", "{", "return", "MapUtil", ".", "toMapList", "...
列转行。将Map中值列表分别按照其位置与key组成新的map。<br> 是{@link #toListMap(Iterable)}的逆方法<br> 比如传入数据: <pre> { a: [1,2,3,4] b: [1,2,3,] c: [1] } </pre> 结果是: <pre> [ {a: 1, b: 1, c: 1} {a: 2, b: 2} {a: 3, b: 3} {a: 4} ] </pre> @param <K> 键类型 @param <V> 值类型 @param listMap 列表Map @return Map列表 @see MapUtil#toMapList(Map)
[ "列转行。将Map中值列表分别按照其位置与key组成新的map。<br", ">", "是", "{", "@link", "#toListMap", "(", "Iterable", ")", "}", "的逆方法<br", ">", "比如传入数据:" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java#L1677-L1679
train
Converts a Map to a List of Maps.
[ 30522, 2270, 10763, 1026, 1047, 1010, 1058, 1028, 2862, 1026, 4949, 1026, 1047, 1010, 1058, 1028, 1028, 3419, 9331, 9863, 1006, 4949, 1026, 1047, 1010, 1029, 8908, 2009, 6906, 3468, 1026, 1058, 1028, 1028, 2862, 2863, 2361, 1007, 1063, 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...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletListenerRegistrationBean.java
ServletListenerRegistrationBean.isSupportedType
public static boolean isSupportedType(EventListener listener) { for (Class<?> type : SUPPORTED_TYPES) { if (ClassUtils.isAssignableValue(type, listener)) { return true; } } return false; }
java
public static boolean isSupportedType(EventListener listener) { for (Class<?> type : SUPPORTED_TYPES) { if (ClassUtils.isAssignableValue(type, listener)) { return true; } } return false; }
[ "public", "static", "boolean", "isSupportedType", "(", "EventListener", "listener", ")", "{", "for", "(", "Class", "<", "?", ">", "type", ":", "SUPPORTED_TYPES", ")", "{", "if", "(", "ClassUtils", ".", "isAssignableValue", "(", "type", ",", "listener", ")", ...
Returns {@code true} if the specified listener is one of the supported types. @param listener the listener to test @return if the listener is of a supported type
[ "Returns", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletListenerRegistrationBean.java#L131-L138
train
Checks if the given listener is an instance of a supported type.
[ 30522, 2270, 10763, 22017, 20898, 26354, 6279, 6442, 2098, 13874, 1006, 2724, 9863, 24454, 19373, 1007, 1063, 2005, 1006, 2465, 1026, 1029, 1028, 2828, 1024, 3569, 1035, 4127, 1007, 1063, 2065, 1006, 2465, 21823, 4877, 1012, 18061, 18719, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/corpus/dictionary/CommonSuffixExtractor.java
CommonSuffixExtractor.extractSuffix
public List<String> extractSuffix(int length, int size, boolean extend) { TFDictionary suffixTreeSet = new TFDictionary(); for (String key : tfDictionary.keySet()) { if (key.length() > length) { suffixTreeSet.add(key.substring(key.length() - length, ke...
java
public List<String> extractSuffix(int length, int size, boolean extend) { TFDictionary suffixTreeSet = new TFDictionary(); for (String key : tfDictionary.keySet()) { if (key.length() > length) { suffixTreeSet.add(key.substring(key.length() - length, ke...
[ "public", "List", "<", "String", ">", "extractSuffix", "(", "int", "length", ",", "int", "size", ",", "boolean", "extend", ")", "{", "TFDictionary", "suffixTreeSet", "=", "new", "TFDictionary", "(", ")", ";", "for", "(", "String", "key", ":", "tfDictionary...
提取公共后缀 @param length 公共后缀长度 @param size 频率最高的前多少个公共后缀 @param extend 长度是否拓展为从1到length为止的后缀 @return 公共后缀列表
[ "提取公共后缀" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/corpus/dictionary/CommonSuffixExtractor.java#L54-L78
train
Extract suffix from the TFDictionary.
[ 30522, 2270, 2862, 1026, 5164, 1028, 27059, 16093, 8873, 2595, 1006, 20014, 3091, 1010, 20014, 2946, 1010, 22017, 20898, 7949, 1007, 1063, 1056, 2546, 29201, 3258, 5649, 16809, 13334, 13462, 1027, 2047, 1056, 2546, 29201, 3258, 5649, 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...
redisson/redisson
redisson/src/main/java/org/redisson/api/CronSchedule.java
CronSchedule.weeklyOnDayAndHourAndMinute
public static CronSchedule weeklyOnDayAndHourAndMinute(int hour, int minute, Integer... daysOfWeek) { if (daysOfWeek == null || daysOfWeek.length == 0) { throw new IllegalArgumentException("You must specify at least one day of week."); } String expression = String.format("0 %d %d ? ...
java
public static CronSchedule weeklyOnDayAndHourAndMinute(int hour, int minute, Integer... daysOfWeek) { if (daysOfWeek == null || daysOfWeek.length == 0) { throw new IllegalArgumentException("You must specify at least one day of week."); } String expression = String.format("0 %d %d ? ...
[ "public", "static", "CronSchedule", "weeklyOnDayAndHourAndMinute", "(", "int", "hour", ",", "int", "minute", ",", "Integer", "...", "daysOfWeek", ")", "{", "if", "(", "daysOfWeek", "==", "null", "||", "daysOfWeek", ".", "length", "==", "0", ")", "{", "throw"...
Creates cron expression which schedule task execution every given days of the week at the given time. Use Calendar object constants to define day. @param hour of schedule @param minute of schedule @param daysOfWeek - Calendar object constants @return object
[ "Creates", "cron", "expression", "which", "schedule", "task", "execution", "every", "given", "days", "of", "the", "week", "at", "the", "given", "time", ".", "Use", "Calendar", "object", "constants", "to", "define", "day", "." ]
d3acc0249b2d5d658d36d99e2c808ce49332ea44
https://github.com/redisson/redisson/blob/d3acc0249b2d5d658d36d99e2c808ce49332ea44/redisson/src/main/java/org/redisson/api/CronSchedule.java#L75-L86
train
Create a CronSchedule that schedules a single instance of a CronSchedule for a single hour and minute on a given number of days of the week.
[ 30522, 2270, 10763, 13675, 5644, 7690, 9307, 4882, 29067, 7054, 16425, 8162, 5685, 10020, 10421, 1006, 20014, 3178, 1010, 20014, 3371, 1010, 16109, 1012, 1012, 1012, 2420, 11253, 28075, 1007, 1063, 2065, 1006, 2420, 11253, 28075, 1027, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/async/queue/UnorderedStreamElementQueue.java
UnorderedStreamElementQueue.onCompleteHandler
public void onCompleteHandler(StreamElementQueueEntry<?> streamElementQueueEntry) throws InterruptedException { lock.lockInterruptibly(); try { if (firstSet.remove(streamElementQueueEntry)) { completedQueue.offer(streamElementQueueEntry); while (firstSet.isEmpty() && firstSet != lastSet) { firstSe...
java
public void onCompleteHandler(StreamElementQueueEntry<?> streamElementQueueEntry) throws InterruptedException { lock.lockInterruptibly(); try { if (firstSet.remove(streamElementQueueEntry)) { completedQueue.offer(streamElementQueueEntry); while (firstSet.isEmpty() && firstSet != lastSet) { firstSe...
[ "public", "void", "onCompleteHandler", "(", "StreamElementQueueEntry", "<", "?", ">", "streamElementQueueEntry", ")", "throws", "InterruptedException", "{", "lock", ".", "lockInterruptibly", "(", ")", ";", "try", "{", "if", "(", "firstSet", ".", "remove", "(", "...
Callback for onComplete events for the given stream element queue entry. Whenever a queue entry is completed, it is checked whether this entry belongs to the first set. If this is the case, then the element is added to the completed entries queue from where it can be consumed. If the first set becomes empty, then the n...
[ "Callback", "for", "onComplete", "events", "for", "the", "given", "stream", "element", "queue", "entry", ".", "Whenever", "a", "queue", "entry", "is", "completed", "it", "is", "checked", "whether", "this", "entry", "belongs", "to", "the", "first", "set", "."...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/async/queue/UnorderedStreamElementQueue.java#L231-L259
train
Called when the stream element queue is complete.
[ 30522, 2270, 11675, 2006, 9006, 10814, 2618, 11774, 3917, 1006, 5460, 12260, 3672, 4226, 5657, 4765, 2854, 1026, 1029, 1028, 5460, 12260, 3672, 4226, 5657, 4765, 2854, 1007, 11618, 7153, 10288, 24422, 1063, 5843, 1012, 5843, 18447, 2121, 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-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/AWSUtil.java
AWSUtil.createKinesisClient
public static AmazonKinesis createKinesisClient(Properties configProps, ClientConfiguration awsClientConfig) { // set a Flink-specific user agent awsClientConfig.setUserAgentPrefix(String.format(USER_AGENT_FORMAT, EnvironmentInformation.getVersion(), EnvironmentInformation.getRevisionInformation().commitId)...
java
public static AmazonKinesis createKinesisClient(Properties configProps, ClientConfiguration awsClientConfig) { // set a Flink-specific user agent awsClientConfig.setUserAgentPrefix(String.format(USER_AGENT_FORMAT, EnvironmentInformation.getVersion(), EnvironmentInformation.getRevisionInformation().commitId)...
[ "public", "static", "AmazonKinesis", "createKinesisClient", "(", "Properties", "configProps", ",", "ClientConfiguration", "awsClientConfig", ")", "{", "// set a Flink-specific user agent", "awsClientConfig", ".", "setUserAgentPrefix", "(", "String", ".", "format", "(", "USE...
Creates an Amazon Kinesis Client. @param configProps configuration properties containing the access key, secret key, and region @param awsClientConfig preconfigured AWS SDK client configuration @return a new Amazon Kinesis Client
[ "Creates", "an", "Amazon", "Kinesis", "Client", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/AWSUtil.java#L76-L96
train
Creates a Kinesis client using the specified properties.
[ 30522, 2270, 10763, 9733, 4939, 19009, 3443, 4939, 19009, 20464, 11638, 1006, 5144, 9530, 8873, 21600, 18981, 2015, 1010, 7396, 8663, 8873, 27390, 3370, 22091, 11020, 8751, 3372, 8663, 8873, 2290, 1007, 1063, 1013, 1013, 2275, 1037, 13109, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/CompactingHashTable.java
CompactingHashTable.insertBucketEntryFromStart
private void insertBucketEntryFromStart(MemorySegment bucket, int bucketInSegmentPos, int hashCode, long pointer, int partitionNumber) throws IOException { boolean checkForResize = false; // find the position to put the hash code and pointer final int count = bucket.getInt(bucketInSegmentPos + HEADER...
java
private void insertBucketEntryFromStart(MemorySegment bucket, int bucketInSegmentPos, int hashCode, long pointer, int partitionNumber) throws IOException { boolean checkForResize = false; // find the position to put the hash code and pointer final int count = bucket.getInt(bucketInSegmentPos + HEADER...
[ "private", "void", "insertBucketEntryFromStart", "(", "MemorySegment", "bucket", ",", "int", "bucketInSegmentPos", ",", "int", "hashCode", ",", "long", "pointer", ",", "int", "partitionNumber", ")", "throws", "IOException", "{", "boolean", "checkForResize", "=", "fa...
IMPORTANT!!! We pass only the partition number, because we must make sure we get a fresh partition reference. The partition reference used during search for the key may have become invalid during the compaction.
[ "IMPORTANT!!!", "We", "pass", "only", "the", "partition", "number", "because", "we", "must", "make", "sure", "we", "get", "a", "fresh", "partition", "reference", ".", "The", "partition", "reference", "used", "during", "search", "for", "the", "key", "may", "h...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/CompactingHashTable.java#L479-L578
train
Insert the bucket entry from the start of the given bucket.
[ 30522, 2797, 11675, 19274, 24204, 12870, 3372, 2854, 19699, 22225, 7559, 2102, 1006, 3638, 3366, 21693, 4765, 13610, 1010, 20014, 13610, 7076, 13910, 3672, 6873, 2015, 1010, 20014, 23325, 16044, 1010, 2146, 20884, 1010, 20014, 13571, 19172, 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...
redisson/redisson
redisson/src/main/java/org/redisson/api/BatchResult.java
BatchResult.addAll
@Deprecated public boolean addAll(int index, Collection<? extends E> c) { return responses.addAll(index, c); }
java
@Deprecated public boolean addAll(int index, Collection<? extends E> c) { return responses.addAll(index, c); }
[ "@", "Deprecated", "public", "boolean", "addAll", "(", "int", "index", ",", "Collection", "<", "?", "extends", "E", ">", "c", ")", "{", "return", "responses", ".", "addAll", "(", "index", ",", "c", ")", ";", "}" ]
Use {@link #getResponses()}
[ "Use", "{" ]
d3acc0249b2d5d658d36d99e2c808ce49332ea44
https://github.com/redisson/redisson/blob/d3acc0249b2d5d658d36d99e2c808ce49332ea44/redisson/src/main/java/org/redisson/api/BatchResult.java#L140-L143
train
Add all the elements in the Collection to the list.
[ 30522, 1030, 2139, 28139, 12921, 2270, 22017, 20898, 5587, 8095, 1006, 20014, 5950, 1010, 3074, 1026, 1029, 8908, 1041, 1028, 1039, 1007, 1063, 2709, 10960, 1012, 5587, 8095, 1006, 5950, 1010, 1039, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-dns/src/main/java/io/netty/handler/codec/dns/DatagramDnsResponseEncoder.java
DatagramDnsResponseEncoder.allocateBuffer
protected ByteBuf allocateBuffer( ChannelHandlerContext ctx, @SuppressWarnings("unused") AddressedEnvelope<DnsResponse, InetSocketAddress> msg) throws Exception { return ctx.alloc().ioBuffer(1024); }
java
protected ByteBuf allocateBuffer( ChannelHandlerContext ctx, @SuppressWarnings("unused") AddressedEnvelope<DnsResponse, InetSocketAddress> msg) throws Exception { return ctx.alloc().ioBuffer(1024); }
[ "protected", "ByteBuf", "allocateBuffer", "(", "ChannelHandlerContext", "ctx", ",", "@", "SuppressWarnings", "(", "\"unused\"", ")", "AddressedEnvelope", "<", "DnsResponse", ",", "InetSocketAddress", ">", "msg", ")", "throws", "Exception", "{", "return", "ctx", ".",...
Allocate a {@link ByteBuf} which will be used for constructing a datagram packet. Sub-classes may override this method to return a {@link ByteBuf} with a perfect matching initial capacity.
[ "Allocate", "a", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-dns/src/main/java/io/netty/handler/codec/dns/DatagramDnsResponseEncoder.java#L85-L89
train
Allocate a buffer for a single record.
[ 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, 8280, 2368, 15985, 17635, 1026, 1040, 3619, 6072, 26029, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/instance/SimpleSlot.java
SimpleSlot.tryAssignPayload
@Override public boolean tryAssignPayload(Payload payload) { Preconditions.checkNotNull(payload); // check that we can actually run in this slot if (isCanceled()) { return false; } // atomically assign the vertex if (!PAYLOAD_UPDATER.compareAndSet(this, null, payload)) { return false; } // we ...
java
@Override public boolean tryAssignPayload(Payload payload) { Preconditions.checkNotNull(payload); // check that we can actually run in this slot if (isCanceled()) { return false; } // atomically assign the vertex if (!PAYLOAD_UPDATER.compareAndSet(this, null, payload)) { return false; } // we ...
[ "@", "Override", "public", "boolean", "tryAssignPayload", "(", "Payload", "payload", ")", "{", "Preconditions", ".", "checkNotNull", "(", "payload", ")", ";", "// check that we can actually run in this slot", "if", "(", "isCanceled", "(", ")", ")", "{", "return", ...
Atomically sets the executed vertex, if no vertex has been assigned to this slot so far. @param payload The vertex to assign to this slot. @return True, if the vertex was assigned, false, otherwise.
[ "Atomically", "sets", "the", "executed", "vertex", "if", "no", "vertex", "has", "been", "assigned", "to", "this", "slot", "so", "far", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/instance/SimpleSlot.java#L171-L192
train
Try to assign a payload to this vertex.
[ 30522, 1030, 2058, 15637, 2270, 22017, 20898, 3046, 12054, 23773, 4502, 8516, 10441, 2094, 1006, 18093, 18093, 1007, 1063, 3653, 8663, 20562, 2015, 1012, 4638, 17048, 11231, 3363, 1006, 18093, 1007, 1025, 1013, 1013, 4638, 2008, 2057, 2064, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java
ThriftHttpServlet.getClientNameFromCookie
private String getClientNameFromCookie(Cookie[] cookies) { // Current Cookie Name, Current Cookie Value String currName, currValue; // Following is the main loop which iterates through all the cookies send by the client. // The HS2 generated cookies are of the format hive.server2.auth=<value> // A ...
java
private String getClientNameFromCookie(Cookie[] cookies) { // Current Cookie Name, Current Cookie Value String currName, currValue; // Following is the main loop which iterates through all the cookies send by the client. // The HS2 generated cookies are of the format hive.server2.auth=<value> // A ...
[ "private", "String", "getClientNameFromCookie", "(", "Cookie", "[", "]", "cookies", ")", "{", "// Current Cookie Name, Current Cookie Value", "String", "currName", ",", "currValue", ";", "// Following is the main loop which iterates through all the cookies send by the client.", "//...
Retrieves the client name from cookieString. If the cookie does not correspond to a valid client, the function returns null. @param cookies HTTP Request cookies. @return Client Username if cookieString has a HS2 Generated cookie that is currently valid. Else, returns null.
[ "Retrieves", "the", "client", "name", "from", "cookieString", ".", "If", "the", "cookie", "does", "not", "correspond", "to", "a", "valid", "client", "the", "function", "returns", "null", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java#L196-L234
train
Gets the client name from the cookies.
[ 30522, 2797, 5164, 2131, 20464, 11638, 18442, 19699, 5358, 3597, 23212, 2063, 1006, 17387, 1031, 1033, 16324, 1007, 1063, 1013, 1013, 2783, 17387, 2171, 1010, 2783, 17387, 3643, 5164, 12731, 12171, 18442, 1010, 12731, 12171, 10175, 5657, 1025...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
common/src/main/java/io/netty/util/AsciiString.java
AsciiString.trim
public static CharSequence trim(CharSequence c) { if (c.getClass() == AsciiString.class) { return ((AsciiString) c).trim(); } if (c instanceof String) { return ((String) c).trim(); } int start = 0, last = c.length() - 1; int end = last; whi...
java
public static CharSequence trim(CharSequence c) { if (c.getClass() == AsciiString.class) { return ((AsciiString) c).trim(); } if (c instanceof String) { return ((String) c).trim(); } int start = 0, last = c.length() - 1; int end = last; whi...
[ "public", "static", "CharSequence", "trim", "(", "CharSequence", "c", ")", "{", "if", "(", "c", ".", "getClass", "(", ")", "==", "AsciiString", ".", "class", ")", "{", "return", "(", "(", "AsciiString", ")", "c", ")", ".", "trim", "(", ")", ";", "}...
Copies this string removing white space characters from the beginning and end of the string, and tries not to copy if possible. @param c The {@link CharSequence} to trim. @return a new string with characters {@code <= \\u0020} removed from the beginning and the end.
[ "Copies", "this", "string", "removing", "white", "space", "characters", "from", "the", "beginning", "and", "end", "of", "the", "string", "and", "tries", "not", "to", "copy", "if", "possible", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/AsciiString.java#L990-L1009
train
Trims a CharSequence.
[ 30522, 2270, 10763, 25869, 3366, 4226, 5897, 12241, 1006, 25869, 3366, 4226, 5897, 1039, 1007, 1063, 2065, 1006, 1039, 1012, 2131, 26266, 1006, 1007, 1027, 1027, 2004, 6895, 2923, 4892, 1012, 2465, 1007, 1063, 2709, 1006, 1006, 2004, 6895, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.addAll
public static <T> Collection<T> addAll(Collection<T> collection, Object value) { return addAll(collection, value, TypeUtil.getTypeArgument(collection.getClass())); }
java
public static <T> Collection<T> addAll(Collection<T> collection, Object value) { return addAll(collection, value, TypeUtil.getTypeArgument(collection.getClass())); }
[ "public", "static", "<", "T", ">", "Collection", "<", "T", ">", "addAll", "(", "Collection", "<", "T", ">", "collection", ",", "Object", "value", ")", "{", "return", "addAll", "(", "collection", ",", "value", ",", "TypeUtil", ".", "getTypeArgument", "(",...
将指定对象全部加入到集合中<br> 提供的对象如果为集合类型,会自动转换为目标元素类型<br> @param <T> 元素类型 @param collection 被加入的集合 @param value 对象,可能为Iterator、Iterable、Enumeration、Array @return 被加入集合
[ "将指定对象全部加入到集合中<br", ">", "提供的对象如果为集合类型,会自动转换为目标元素类型<br", ">" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java#L1690-L1692
train
Add all elements of the given collection to the given value.
[ 30522, 2270, 10763, 1026, 1056, 1028, 3074, 1026, 1056, 1028, 5587, 8095, 1006, 3074, 1026, 1056, 1028, 3074, 1010, 4874, 3643, 1007, 1063, 2709, 5587, 8095, 1006, 3074, 1010, 3643, 1010, 2828, 21823, 2140, 1012, 2131, 13874, 2906, 22850, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-shardingsphere
sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/SQLBuilder.java
SQLBuilder.toSQL
public String toSQL(final MasterSlaveRule masterSlaveRule, final ShardingDataSourceMetaData shardingDataSourceMetaData) { StringBuilder result = new StringBuilder(); for (Object each : segments) { if (each instanceof SchemaPlaceholder) { result.append(shardingDataSourceMetaDa...
java
public String toSQL(final MasterSlaveRule masterSlaveRule, final ShardingDataSourceMetaData shardingDataSourceMetaData) { StringBuilder result = new StringBuilder(); for (Object each : segments) { if (each instanceof SchemaPlaceholder) { result.append(shardingDataSourceMetaDa...
[ "public", "String", "toSQL", "(", "final", "MasterSlaveRule", "masterSlaveRule", ",", "final", "ShardingDataSourceMetaData", "shardingDataSourceMetaData", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Object", "each", ...
Convert to SQL unit. @param masterSlaveRule master slave rule @param shardingDataSourceMetaData sharding data source meta data @return SQL
[ "Convert", "to", "SQL", "unit", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/SQLBuilder.java#L131-L141
train
To SQL.
[ 30522, 2270, 5164, 2000, 2015, 4160, 2140, 1006, 2345, 5972, 14973, 2121, 9307, 5972, 14973, 2121, 9307, 1010, 2345, 21146, 17080, 3070, 2850, 10230, 8162, 3401, 11368, 8447, 2696, 21146, 17080, 3070, 2850, 10230, 8162, 3401, 11368, 8447, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-log/src/main/java/cn/hutool/log/StaticLog.java
StaticLog.error
public static void error(Log log, Throwable e, String format, Object... arguments) { if (false == log(log, Level.ERROR, e, format, arguments)) { log.error(e, format, arguments); } }
java
public static void error(Log log, Throwable e, String format, Object... arguments) { if (false == log(log, Level.ERROR, e, format, arguments)) { log.error(e, format, arguments); } }
[ "public", "static", "void", "error", "(", "Log", "log", ",", "Throwable", "e", ",", "String", "format", ",", "Object", "...", "arguments", ")", "{", "if", "(", "false", "==", "log", "(", "log", ",", "Level", ".", "ERROR", ",", "e", ",", "format", "...
Error等级日志<br> @param log 日志对象 @param e 需在日志中堆栈打印的异常 @param format 格式文本,{} 代表变量 @param arguments 变量对应的参数
[ "Error等级日志<br", ">" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-log/src/main/java/cn/hutool/log/StaticLog.java#L207-L211
train
Logs an error with a throwable.
[ 30522, 2270, 10763, 11675, 7561, 1006, 8833, 8833, 1010, 5466, 3085, 1041, 1010, 5164, 4289, 1010, 4874, 1012, 1012, 1012, 9918, 1007, 1063, 2065, 1006, 6270, 1027, 1027, 8833, 1006, 8833, 1010, 2504, 1012, 7561, 1010, 1041, 1010, 4289, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/Bindable.java
Bindable.setOf
public static <E> Bindable<Set<E>> setOf(Class<E> elementType) { return of(ResolvableType.forClassWithGenerics(Set.class, elementType)); }
java
public static <E> Bindable<Set<E>> setOf(Class<E> elementType) { return of(ResolvableType.forClassWithGenerics(Set.class, elementType)); }
[ "public", "static", "<", "E", ">", "Bindable", "<", "Set", "<", "E", ">", ">", "setOf", "(", "Class", "<", "E", ">", "elementType", ")", "{", "return", "of", "(", "ResolvableType", ".", "forClassWithGenerics", "(", "Set", ".", "class", ",", "elementTyp...
Create a new {@link Bindable} {@link Set} of the specified element type. @param <E> the element type @param elementType the set element type @return a {@link Bindable} instance
[ "Create", "a", "new", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/Bindable.java#L223-L225
train
Create a set type binding for the given element type.
[ 30522, 2270, 10763, 1026, 1041, 1028, 14187, 3085, 1026, 2275, 1026, 1041, 1028, 1028, 2275, 11253, 1006, 2465, 1026, 1041, 1028, 5783, 13874, 1007, 1063, 2709, 1997, 1006, 24501, 4747, 12423, 13874, 1012, 2005, 26266, 24415, 6914, 22420, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-db/src/main/java/cn/hutool/db/SqlConnRunner.java
SqlConnRunner.find
public <T> T find(Connection conn, Collection<String> fields, Entity where, RsHandler<T> rsh) throws SQLException { final Query query = new Query(SqlUtil.buildConditions(where), where.getTableName()); query.setFields(fields); return find(conn, query, rsh); }
java
public <T> T find(Connection conn, Collection<String> fields, Entity where, RsHandler<T> rsh) throws SQLException { final Query query = new Query(SqlUtil.buildConditions(where), where.getTableName()); query.setFields(fields); return find(conn, query, rsh); }
[ "public", "<", "T", ">", "T", "find", "(", "Connection", "conn", ",", "Collection", "<", "String", ">", "fields", ",", "Entity", "where", ",", "RsHandler", "<", "T", ">", "rsh", ")", "throws", "SQLException", "{", "final", "Query", "query", "=", "new",...
查询<br> 此方法不会关闭Connection @param <T> 结果对象类型 @param conn 数据库连接对象 @param fields 返回的字段列表,null则返回所有字段 @param where 条件实体类(包含表名) @param rsh 结果集处理对象 @return 结果对象 @throws SQLException SQL执行异常
[ "查询<br", ">", "此方法不会关闭Connection" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/SqlConnRunner.java#L330-L334
train
Find records in the database.
[ 30522, 2270, 1026, 1056, 1028, 1056, 2424, 1006, 4434, 9530, 2078, 1010, 3074, 1026, 5164, 1028, 4249, 1010, 9178, 2073, 1010, 12667, 11774, 3917, 1026, 1056, 1028, 12667, 2232, 1007, 11618, 29296, 10288, 24422, 1063, 2345, 23032, 23032, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
common/src/main/java/io/netty/util/internal/MacAddressUtil.java
MacAddressUtil.bestAvailableMac
public static byte[] bestAvailableMac() { // Find the best MAC address available. byte[] bestMacAddr = EMPTY_BYTES; InetAddress bestInetAddr = NetUtil.LOCALHOST4; // Retrieve the list of available network interfaces. Map<NetworkInterface, InetAddress> ifaces = new LinkedHashMap<...
java
public static byte[] bestAvailableMac() { // Find the best MAC address available. byte[] bestMacAddr = EMPTY_BYTES; InetAddress bestInetAddr = NetUtil.LOCALHOST4; // Retrieve the list of available network interfaces. Map<NetworkInterface, InetAddress> ifaces = new LinkedHashMap<...
[ "public", "static", "byte", "[", "]", "bestAvailableMac", "(", ")", "{", "// Find the best MAC address available.", "byte", "[", "]", "bestMacAddr", "=", "EMPTY_BYTES", ";", "InetAddress", "bestInetAddr", "=", "NetUtil", ".", "LOCALHOST4", ";", "// Retrieve the list o...
Obtains the best MAC address found on local network interfaces. Generally speaking, an active network interface used on public networks is better than a local network interface. @return byte array containing a MAC. null if no MAC can be found.
[ "Obtains", "the", "best", "MAC", "address", "found", "on", "local", "network", "interfaces", ".", "Generally", "speaking", "an", "active", "network", "interface", "used", "on", "public", "networks", "is", "better", "than", "a", "local", "network", "interface", ...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/MacAddressUtil.java#L47-L131
train
Returns the best MAC address available in the system.
[ 30522, 2270, 10763, 24880, 1031, 1033, 2190, 12462, 11733, 3468, 22911, 1006, 1007, 1063, 1013, 1013, 2424, 1996, 2190, 6097, 4769, 2800, 1012, 24880, 1031, 1033, 2190, 22911, 4215, 13626, 1027, 4064, 1035, 27507, 1025, 1999, 12928, 14141, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Operator.java
Operator.createUnionCascade
public static <T> Operator<T> createUnionCascade(Operator<T>... operators) { return createUnionCascade(null, operators); }
java
public static <T> Operator<T> createUnionCascade(Operator<T>... operators) { return createUnionCascade(null, operators); }
[ "public", "static", "<", "T", ">", "Operator", "<", "T", ">", "createUnionCascade", "(", "Operator", "<", "T", ">", "...", "operators", ")", "{", "return", "createUnionCascade", "(", "null", ",", "operators", ")", ";", "}" ]
Takes a list of operators and creates a cascade of unions of this inputs, if needed. If not needed (there was only one operator in the list), then that operator is returned. @param operators The operators. @return The single operator or a cascade of unions of the operators.
[ "Takes", "a", "list", "of", "operators", "and", "creates", "a", "cascade", "of", "unions", "of", "this", "inputs", "if", "needed", ".", "If", "not", "needed", "(", "there", "was", "only", "one", "operator", "in", "the", "list", ")", "then", "that", "op...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/Operator.java#L259-L261
train
Create an Union cascading operator from the given operators.
[ 30522, 2270, 10763, 1026, 1056, 1028, 6872, 1026, 1056, 1028, 3443, 19496, 2239, 15671, 21869, 1006, 6872, 1026, 1056, 1028, 1012, 1012, 1012, 9224, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/sort/PartialOrderPriorityQueue.java
PartialOrderPriorityQueue.poll
public final T poll() { if (size > 0) { T result = heap[1]; // save first value heap[1] = heap[size]; // move last to first heap[size] = null; // permit GC of objects size--; downHeap(); // adjust heap return result; } else { return null; } }
java
public final T poll() { if (size > 0) { T result = heap[1]; // save first value heap[1] = heap[size]; // move last to first heap[size] = null; // permit GC of objects size--; downHeap(); // adjust heap return result; } else { return null; } }
[ "public", "final", "T", "poll", "(", ")", "{", "if", "(", "size", ">", "0", ")", "{", "T", "result", "=", "heap", "[", "1", "]", ";", "// save first value", "heap", "[", "1", "]", "=", "heap", "[", "size", "]", ";", "// move last to first", "heap",...
Removes and returns the least element of the PriorityQueue in log(size) time. @return The least element.
[ "Removes", "and", "returns", "the", "least", "element", "of", "the", "PriorityQueue", "in", "log", "(", "size", ")", "time", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/sort/PartialOrderPriorityQueue.java#L143-L154
train
Poll the object from the queue.
[ 30522, 2270, 2345, 1056, 8554, 1006, 1007, 1063, 2065, 1006, 2946, 1028, 1014, 1007, 1063, 1056, 2765, 1027, 16721, 1031, 30524, 2278, 1997, 5200, 2946, 1011, 1011, 1025, 2091, 20192, 2361, 1006, 1007, 1025, 1013, 1013, 14171, 16721, 2709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
networknt/light-4j
handler/src/main/java/com/networknt/handler/Handler.java
Handler.getNext
public static HttpHandler getNext(HttpServerExchange httpServerExchange) { String chainId = httpServerExchange.getAttachment(CHAIN_ID); List<HttpHandler> handlersForId = handlerListById.get(chainId); Integer nextIndex = httpServerExchange.getAttachment(CHAIN_SEQ); // Check if we've reached the end of the chain....
java
public static HttpHandler getNext(HttpServerExchange httpServerExchange) { String chainId = httpServerExchange.getAttachment(CHAIN_ID); List<HttpHandler> handlersForId = handlerListById.get(chainId); Integer nextIndex = httpServerExchange.getAttachment(CHAIN_SEQ); // Check if we've reached the end of the chain....
[ "public", "static", "HttpHandler", "getNext", "(", "HttpServerExchange", "httpServerExchange", ")", "{", "String", "chainId", "=", "httpServerExchange", ".", "getAttachment", "(", "CHAIN_ID", ")", ";", "List", "<", "HttpHandler", ">", "handlersForId", "=", "handlerL...
Returns the instance of the next handler, rather then calling handleRequest on it. @param httpServerExchange The current requests server exchange. @return The HttpHandler that should be executed next.
[ "Returns", "the", "instance", "of", "the", "next", "handler", "rather", "then", "calling", "handleRequest", "on", "it", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/handler/src/main/java/com/networknt/handler/Handler.java#L272-L282
train
Get the next handler in the chain.
[ 30522, 2270, 10763, 8299, 11774, 3917, 2131, 2638, 18413, 1006, 16770, 2121, 28943, 2595, 22305, 2063, 16770, 2121, 28943, 2595, 22305, 2063, 1007, 1063, 5164, 4677, 3593, 1027, 16770, 2121, 28943, 2595, 22305, 2063, 1012, 2131, 19321, 6776, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/proxy/KinesisProxy.java
KinesisProxy.createKinesisClient
protected AmazonKinesis createKinesisClient(Properties configProps) { ClientConfiguration awsClientConfig = new ClientConfigurationFactory().getConfig(); AWSUtil.setAwsClientConfigProperties(awsClientConfig, configProps); return AWSUtil.createKinesisClient(configProps, awsClientConfig); }
java
protected AmazonKinesis createKinesisClient(Properties configProps) { ClientConfiguration awsClientConfig = new ClientConfigurationFactory().getConfig(); AWSUtil.setAwsClientConfigProperties(awsClientConfig, configProps); return AWSUtil.createKinesisClient(configProps, awsClientConfig); }
[ "protected", "AmazonKinesis", "createKinesisClient", "(", "Properties", "configProps", ")", "{", "ClientConfiguration", "awsClientConfig", "=", "new", "ClientConfigurationFactory", "(", ")", ".", "getConfig", "(", ")", ";", "AWSUtil", ".", "setAwsClientConfigProperties", ...
Create the Kinesis client, using the provided configuration properties and default {@link ClientConfiguration}. Derived classes can override this method to customize the client configuration. @param configProps @return
[ "Create", "the", "Kinesis", "client", "using", "the", "provided", "configuration", "properties", "and", "default", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/proxy/KinesisProxy.java#L219-L224
train
Creates a Kinesis client with the specified properties.
[ 30522, 5123, 9733, 4939, 19009, 3443, 4939, 19009, 20464, 11638, 1006, 5144, 9530, 8873, 21600, 18981, 2015, 1007, 1063, 7396, 8663, 8873, 27390, 3370, 22091, 11020, 8751, 3372, 8663, 8873, 2290, 1027, 2047, 7396, 8663, 8873, 27390, 3370, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/LeadLagAggFunction.java
LeadLagAggFunction.retractExpressions
@Override public Expression[] retractExpressions() { return new Expression[] {existDefaultValue ? cast(operand(2), typeLiteral(getResultType())) : literal(null, getResultType())}; }
java
@Override public Expression[] retractExpressions() { return new Expression[] {existDefaultValue ? cast(operand(2), typeLiteral(getResultType())) : literal(null, getResultType())}; }
[ "@", "Override", "public", "Expression", "[", "]", "retractExpressions", "(", ")", "{", "return", "new", "Expression", "[", "]", "{", "existDefaultValue", "?", "cast", "(", "operand", "(", "2", ")", ",", "typeLiteral", "(", "getResultType", "(", ")", ")", ...
TODO hack, use the current input reset the buffer value.
[ "TODO", "hack", "use", "the", "current", "input", "reset", "the", "buffer", "value", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/LeadLagAggFunction.java#L94-L98
train
Returns an array of expressions that can be used to create a null value.
[ 30522, 1030, 2058, 15637, 2270, 3670, 1031, 1033, 2128, 6494, 6593, 10288, 20110, 8496, 1006, 1007, 1063, 2709, 2047, 3670, 1031, 1033, 1063, 4839, 3207, 7011, 11314, 10175, 5657, 1029, 3459, 1006, 3850, 4859, 1006, 1016, 1007, 1010, 2828, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Layouts.java
Layouts.forFile
public static Layout forFile(File file) { if (file == null) { throw new IllegalArgumentException("File must not be null"); } String lowerCaseFileName = file.getName().toLowerCase(Locale.ENGLISH); if (lowerCaseFileName.endsWith(".jar")) { return new Jar(); } if (lowerCaseFileName.endsWith(".war")) { ...
java
public static Layout forFile(File file) { if (file == null) { throw new IllegalArgumentException("File must not be null"); } String lowerCaseFileName = file.getName().toLowerCase(Locale.ENGLISH); if (lowerCaseFileName.endsWith(".jar")) { return new Jar(); } if (lowerCaseFileName.endsWith(".war")) { ...
[ "public", "static", "Layout", "forFile", "(", "File", "file", ")", "{", "if", "(", "file", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"File must not be null\"", ")", ";", "}", "String", "lowerCaseFileName", "=", "file", ".", "...
Return a layout for the given source file. @param file the source file @return a {@link Layout}
[ "Return", "a", "layout", "for", "the", "given", "source", "file", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Layouts.java#L42-L57
train
Returns a layout for the given file.
[ 30522, 2270, 10763, 9621, 2005, 8873, 2571, 1006, 5371, 5371, 1007, 1063, 2065, 1006, 5371, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 6206, 2906, 22850, 15781, 2595, 24422, 1006, 1000, 5371, 2442, 2025, 2022, 19701, 1000, 1007, 1025, 1065,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBuffer.java
SharedBuffer.isEmpty
public boolean isEmpty() throws Exception { return Iterables.isEmpty(eventsBufferCache.keySet()) && Iterables.isEmpty(eventsBuffer.keys()); }
java
public boolean isEmpty() throws Exception { return Iterables.isEmpty(eventsBufferCache.keySet()) && Iterables.isEmpty(eventsBuffer.keys()); }
[ "public", "boolean", "isEmpty", "(", ")", "throws", "Exception", "{", "return", "Iterables", ".", "isEmpty", "(", "eventsBufferCache", ".", "keySet", "(", ")", ")", "&&", "Iterables", ".", "isEmpty", "(", "eventsBuffer", ".", "keys", "(", ")", ")", ";", ...
Checks if there is no elements in the buffer. @return true if there is no elements in the buffer @throws Exception Thrown if the system cannot access the state.
[ "Checks", "if", "there", "is", "no", "elements", "in", "the", "buffer", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBuffer.java#L152-L154
train
Returns true if the cache and buffer are empty.
[ 30522, 2270, 22017, 20898, 2003, 6633, 13876, 2100, 1006, 1007, 11618, 6453, 1063, 2709, 2009, 6906, 13510, 1012, 2003, 6633, 13876, 2100, 1006, 2824, 8569, 12494, 3540, 5403, 1012, 6309, 3388, 1006, 1007, 1007, 1004, 1004, 2009, 6906, 1351...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeUtil.java
QrCodeUtil.encode
public static BitMatrix encode(String content, int width, int height) { return encode(content, BarcodeFormat.QR_CODE, width, height); }
java
public static BitMatrix encode(String content, int width, int height) { return encode(content, BarcodeFormat.QR_CODE, width, height); }
[ "public", "static", "BitMatrix", "encode", "(", "String", "content", ",", "int", "width", ",", "int", "height", ")", "{", "return", "encode", "(", "content", ",", "BarcodeFormat", ".", "QR_CODE", ",", "width", ",", "height", ")", ";", "}" ]
将文本内容编码为二维码 @param content 文本内容 @param width 宽度 @param height 高度 @return {@link BitMatrix}
[ "将文本内容编码为二维码" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeUtil.java#L209-L211
train
Encodes a String into a BitMatrix.
[ 30522, 2270, 10763, 2978, 18900, 17682, 4372, 16044, 1006, 5164, 4180, 1010, 20014, 9381, 1010, 20014, 4578, 1007, 1063, 2709, 4372, 16044, 1006, 4180, 1010, 3347, 16044, 14192, 4017, 1012, 1053, 2099, 1035, 3642, 1010, 9381, 1010, 4578, 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/SqlExecutor.java
SqlExecutor.callQuery
public static ResultSet callQuery(Connection conn, String sql, Object... params) throws SQLException { CallableStatement proc = null; try { proc = StatementUtil.prepareCall(conn, sql, params); return proc.executeQuery(); } finally { DbUtil.close(proc); } }
java
public static ResultSet callQuery(Connection conn, String sql, Object... params) throws SQLException { CallableStatement proc = null; try { proc = StatementUtil.prepareCall(conn, sql, params); return proc.executeQuery(); } finally { DbUtil.close(proc); } }
[ "public", "static", "ResultSet", "callQuery", "(", "Connection", "conn", ",", "String", "sql", ",", "Object", "...", "params", ")", "throws", "SQLException", "{", "CallableStatement", "proc", "=", "null", ";", "try", "{", "proc", "=", "StatementUtil", ".", "...
执行调用存储过程<br> 此方法不会关闭Connection @param conn 数据库连接对象 @param sql SQL @param params 参数 @return ResultSet @throws SQLException SQL执行异常 @since 4.1.4
[ "执行调用存储过程<br", ">", "此方法不会关闭Connection" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/sql/SqlExecutor.java#L94-L102
train
Call a query on a database connection.
[ 30522, 2270, 10763, 3463, 3388, 2655, 4226, 2854, 1006, 4434, 9530, 2078, 1010, 5164, 29296, 1010, 4874, 1012, 1012, 1012, 11498, 5244, 1007, 11618, 29296, 10288, 24422, 1063, 2655, 3085, 9153, 18532, 4765, 4013, 2278, 1027, 19701, 1025, 30...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java
DelegatingDecompressorFrameListener.nextReadableBuf
private static ByteBuf nextReadableBuf(EmbeddedChannel decompressor) { for (;;) { final ByteBuf buf = decompressor.readInbound(); if (buf == null) { return null; } if (!buf.isReadable()) { buf.release(); continue; ...
java
private static ByteBuf nextReadableBuf(EmbeddedChannel decompressor) { for (;;) { final ByteBuf buf = decompressor.readInbound(); if (buf == null) { return null; } if (!buf.isReadable()) { buf.release(); continue; ...
[ "private", "static", "ByteBuf", "nextReadableBuf", "(", "EmbeddedChannel", "decompressor", ")", "{", "for", "(", ";", ";", ")", "{", "final", "ByteBuf", "buf", "=", "decompressor", ".", "readInbound", "(", ")", ";", "if", "(", "buf", "==", "null", ")", "...
Read the next decompressed {@link ByteBuf} from the {@link EmbeddedChannel} or {@code null} if one does not exist. @param decompressor The channel to read from @return The next decoded {@link ByteBuf} from the {@link EmbeddedChannel} or {@code null} if one does not exist
[ "Read", "the", "next", "decompressed", "{", "@link", "ByteBuf", "}", "from", "the", "{", "@link", "EmbeddedChannel", "}", "or", "{", "@code", "null", "}", "if", "one", "does", "not", "exist", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java#L269-L281
train
Read the next readable ByteBuf from the decompressor.
[ 30522, 2797, 10763, 24880, 8569, 2546, 2279, 16416, 20782, 8569, 2546, 1006, 11157, 26058, 21933, 8737, 8303, 2953, 1007, 1063, 2005, 1006, 1025, 1025, 1007, 1063, 2345, 24880, 8569, 2546, 20934, 2546, 1027, 21933, 8737, 8303, 2953, 1012, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java
SegmentsUtil.setInt
public static void setInt(MemorySegment[] segments, int offset, int value) { if (inFirstSegment(segments, offset, 4)) { segments[0].putInt(offset, value); } else { setIntMultiSegments(segments, offset, value); } }
java
public static void setInt(MemorySegment[] segments, int offset, int value) { if (inFirstSegment(segments, offset, 4)) { segments[0].putInt(offset, value); } else { setIntMultiSegments(segments, offset, value); } }
[ "public", "static", "void", "setInt", "(", "MemorySegment", "[", "]", "segments", ",", "int", "offset", ",", "int", "value", ")", "{", "if", "(", "inFirstSegment", "(", "segments", ",", "offset", ",", "4", ")", ")", "{", "segments", "[", "0", "]", "....
set int from segments. @param segments target segments. @param offset value offset.
[ "set", "int", "from", "segments", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java#L664-L670
train
set int from segments.
[ 30522, 2270, 10763, 11675, 2275, 18447, 1006, 3638, 3366, 21693, 4765, 1031, 1033, 9214, 1010, 20014, 16396, 1010, 20014, 3643, 1007, 1063, 2065, 1006, 1999, 8873, 12096, 3366, 21693, 4765, 1006, 9214, 1010, 16396, 1010, 1018, 1007, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/MDAG/MDAGNode.java
MDAGNode.haveSameTransitions
public static boolean haveSameTransitions(MDAGNode node1, MDAGNode node2) { TreeMap<Character, MDAGNode> outgoingTransitionTreeMap1 = node1.outgoingTransitionTreeMap; TreeMap<Character, MDAGNode> outgoingTransitionTreeMap2 = node2.outgoingTransitionTreeMap; if(outgoingTransitionTree...
java
public static boolean haveSameTransitions(MDAGNode node1, MDAGNode node2) { TreeMap<Character, MDAGNode> outgoingTransitionTreeMap1 = node1.outgoingTransitionTreeMap; TreeMap<Character, MDAGNode> outgoingTransitionTreeMap2 = node2.outgoingTransitionTreeMap; if(outgoingTransitionTree...
[ "public", "static", "boolean", "haveSameTransitions", "(", "MDAGNode", "node1", ",", "MDAGNode", "node2", ")", "{", "TreeMap", "<", "Character", ",", "MDAGNode", ">", "outgoingTransitionTreeMap1", "=", "node1", ".", "outgoingTransitionTreeMap", ";", "TreeMap", "<", ...
是否含有相同的转移函数 @param node1 @param node2 @return
[ "是否含有相同的转移函数" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/MDAG/MDAGNode.java#L451-L474
train
Checks if two nodes have the same outgoing transitions.
[ 30522, 2270, 10763, 22017, 20898, 2031, 21559, 3388, 5521, 28032, 8496, 1006, 9108, 8490, 3630, 3207, 13045, 2487, 1010, 9108, 8490, 3630, 3207, 13045, 2475, 1007, 1063, 3392, 2863, 2361, 1026, 2839, 1010, 9108, 8490, 3630, 3207, 1028, 2201...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-mqtt/src/main/java/io/netty/handler/codec/mqtt/MqttDecoder.java
MqttDecoder.decodeVariableHeader
private static Result<?> decodeVariableHeader(ByteBuf buffer, MqttFixedHeader mqttFixedHeader) { switch (mqttFixedHeader.messageType()) { case CONNECT: return decodeConnectionVariableHeader(buffer); case CONNACK: return decodeConnAckVariableHeader(buffer)...
java
private static Result<?> decodeVariableHeader(ByteBuf buffer, MqttFixedHeader mqttFixedHeader) { switch (mqttFixedHeader.messageType()) { case CONNECT: return decodeConnectionVariableHeader(buffer); case CONNACK: return decodeConnAckVariableHeader(buffer)...
[ "private", "static", "Result", "<", "?", ">", "decodeVariableHeader", "(", "ByteBuf", "buffer", ",", "MqttFixedHeader", "mqttFixedHeader", ")", "{", "switch", "(", "mqttFixedHeader", ".", "messageType", "(", ")", ")", "{", "case", "CONNECT", ":", "return", "de...
Decodes the variable header (if any) @param buffer the buffer to decode from @param mqttFixedHeader MqttFixedHeader of the same message @return the variable header
[ "Decodes", "the", "variable", "header", "(", "if", "any", ")" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-mqtt/src/main/java/io/netty/handler/codec/mqtt/MqttDecoder.java#L179-L207
train
Decode the variable header.
[ 30522, 2797, 10763, 2765, 1026, 1029, 30524, 2546, 17698, 1010, 1049, 4160, 4779, 23901, 4974, 2121, 1049, 4160, 4779, 23901, 4974, 2121, 1007, 1063, 6942, 1006, 1049, 4160, 4779, 23901, 4974, 2121, 1012, 4471, 13874, 1006, 1007, 1007, 1063...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/MutableHashTable.java
MutableHashTable.buildBloomFilterForBucket
final void buildBloomFilterForBucket(int bucketInSegmentPos, MemorySegment bucket, HashPartition<BT, PT> p) { final int count = bucket.getShort(bucketInSegmentPos + HEADER_COUNT_OFFSET); if (count <= 0) { return; } int[] hashCodes = new int[count]; // As the hashcode and bloom filter occupy same bytes, so...
java
final void buildBloomFilterForBucket(int bucketInSegmentPos, MemorySegment bucket, HashPartition<BT, PT> p) { final int count = bucket.getShort(bucketInSegmentPos + HEADER_COUNT_OFFSET); if (count <= 0) { return; } int[] hashCodes = new int[count]; // As the hashcode and bloom filter occupy same bytes, so...
[ "final", "void", "buildBloomFilterForBucket", "(", "int", "bucketInSegmentPos", ",", "MemorySegment", "bucket", ",", "HashPartition", "<", "BT", ",", "PT", ">", "p", ")", "{", "final", "int", "count", "=", "bucket", ".", "getShort", "(", "bucketInSegmentPos", ...
Set all the bucket memory except bucket header as the bit set of bloom filter, and use hash code of build records to build bloom filter.
[ "Set", "all", "the", "bucket", "memory", "except", "bucket", "header", "as", "the", "bit", "set", "of", "bloom", "filter", "and", "use", "hash", "code", "of", "build", "records", "to", "build", "bloom", "filter", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/MutableHashTable.java#L1269-L1285
train
Builds the bloom filter for the given bucket.
[ 30522, 2345, 11675, 3857, 16558, 17650, 8873, 21928, 29278, 24204, 3388, 1006, 20014, 13610, 7076, 13910, 3672, 6873, 2015, 1010, 3638, 3366, 21693, 4765, 13610, 1010, 23325, 19362, 3775, 3508, 1026, 18411, 1010, 13866, 1028, 1052, 1007, 1063...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java
AbstractErrorWebExceptionHandler.isTraceEnabled
protected boolean isTraceEnabled(ServerRequest request) { String parameter = request.queryParam("trace").orElse("false"); return !"false".equalsIgnoreCase(parameter); }
java
protected boolean isTraceEnabled(ServerRequest request) { String parameter = request.queryParam("trace").orElse("false"); return !"false".equalsIgnoreCase(parameter); }
[ "protected", "boolean", "isTraceEnabled", "(", "ServerRequest", "request", ")", "{", "String", "parameter", "=", "request", ".", "queryParam", "(", "\"trace\"", ")", ".", "orElse", "(", "\"false\"", ")", ";", "return", "!", "\"false\"", ".", "equalsIgnoreCase", ...
Check whether the trace attribute has been set on the given request. @param request the source request @return {@code true} if the error trace has been requested, {@code false} otherwise
[ "Check", "whether", "the", "trace", "attribute", "has", "been", "set", "on", "the", "given", "request", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java#L157-L160
train
Returns true if the request is trace - able.
[ 30522, 5123, 22017, 20898, 21541, 22903, 8189, 23242, 1006, 8241, 2890, 15500, 5227, 1007, 1063, 5164, 16381, 1027, 5227, 1012, 23032, 28689, 2213, 1006, 1000, 7637, 1000, 1007, 1012, 10848, 4877, 2063, 1006, 1000, 6270, 1000, 1007, 1025, 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/ConditionEvaluationReport.java
ConditionEvaluationReport.recordExclusions
public void recordExclusions(Collection<String> exclusions) { Assert.notNull(exclusions, "exclusions must not be null"); this.exclusions.addAll(exclusions); }
java
public void recordExclusions(Collection<String> exclusions) { Assert.notNull(exclusions, "exclusions must not be null"); this.exclusions.addAll(exclusions); }
[ "public", "void", "recordExclusions", "(", "Collection", "<", "String", ">", "exclusions", ")", "{", "Assert", ".", "notNull", "(", "exclusions", ",", "\"exclusions must not be null\"", ")", ";", "this", ".", "exclusions", ".", "addAll", "(", "exclusions", ")", ...
Records the names of the classes that have been excluded from condition evaluation. @param exclusions the names of the excluded classes
[ "Records", "the", "names", "of", "the", "classes", "that", "have", "been", "excluded", "from", "condition", "evaluation", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionEvaluationReport.java#L95-L98
train
Records the exclusions of the current resource.
[ 30522, 2270, 11675, 2501, 10288, 20464, 22016, 1006, 3074, 1026, 5164, 1028, 15945, 2015, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 15945, 2015, 1010, 1000, 15945, 2015, 2442, 2025, 2022, 19701, 1000, 1007, 1025, 2023, 1012, 15945, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.newInstance
public static <T> T newInstance(Class<T> clazz, Object... params) throws UtilException { if (ArrayUtil.isEmpty(params)) { final Constructor<T> constructor = getConstructor(clazz); try { return constructor.newInstance(); } catch (Exception e) { throw new UtilException(e, "Instance class [{}] err...
java
public static <T> T newInstance(Class<T> clazz, Object... params) throws UtilException { if (ArrayUtil.isEmpty(params)) { final Constructor<T> constructor = getConstructor(clazz); try { return constructor.newInstance(); } catch (Exception e) { throw new UtilException(e, "Instance class [{}] err...
[ "public", "static", "<", "T", ">", "T", "newInstance", "(", "Class", "<", "T", ">", "clazz", ",", "Object", "...", "params", ")", "throws", "UtilException", "{", "if", "(", "ArrayUtil", ".", "isEmpty", "(", "params", ")", ")", "{", "final", "Constructo...
实例化对象 @param <T> 对象类型 @param clazz 类 @param params 构造函数参数 @return 对象 @throws UtilException 包装各类异常
[ "实例化对象" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L669-L689
train
Creates an instance of the specified class using the specified parameters.
[ 30522, 2270, 10763, 1026, 1056, 1028, 1056, 2047, 7076, 26897, 1006, 2465, 1026, 1056, 1028, 18856, 10936, 2480, 1010, 4874, 1012, 1012, 1012, 11498, 5244, 1007, 11618, 21183, 9463, 2595, 24422, 1063, 2065, 1006, 9140, 21823, 2140, 1012, 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...
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2StreamChannelBootstrap.java
Http2StreamChannelBootstrap.option
@SuppressWarnings("unchecked") public <T> Http2StreamChannelBootstrap option(ChannelOption<T> option, T value) { if (option == null) { throw new NullPointerException("option"); } if (value == null) { synchronized (options) { options.remove(option); ...
java
@SuppressWarnings("unchecked") public <T> Http2StreamChannelBootstrap option(ChannelOption<T> option, T value) { if (option == null) { throw new NullPointerException("option"); } if (value == null) { synchronized (options) { options.remove(option); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "Http2StreamChannelBootstrap", "option", "(", "ChannelOption", "<", "T", ">", "option", ",", "T", "value", ")", "{", "if", "(", "option", "==", "null", ")", "{", "throw", "new", ...
Allow to specify a {@link ChannelOption} which is used for the {@link Http2StreamChannel} instances once they got created. Use a value of {@code null} to remove a previous set {@link ChannelOption}.
[ "Allow", "to", "specify", "a", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2StreamChannelBootstrap.java#L56-L71
train
Sets the specified option to the specified value.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 1026, 1056, 1028, 8299, 2475, 21422, 26058, 27927, 20528, 2361, 5724, 1006, 3149, 7361, 3508, 1026, 1056, 1028, 5724, 1010, 1056, 3643, 1007, 1063, 2065,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java
Configuration.getPropertySources
@InterfaceStability.Unstable public synchronized String[] getPropertySources(String name) { if (properties == null) { // If properties is null, it means a resource was newly added // but the props were cleared so as to load it upon future // requests. So lets force a load by asking a properties list. get...
java
@InterfaceStability.Unstable public synchronized String[] getPropertySources(String name) { if (properties == null) { // If properties is null, it means a resource was newly added // but the props were cleared so as to load it upon future // requests. So lets force a load by asking a properties list. get...
[ "@", "InterfaceStability", ".", "Unstable", "public", "synchronized", "String", "[", "]", "getPropertySources", "(", "String", "name", ")", "{", "if", "(", "properties", "==", "null", ")", "{", "// If properties is null, it means a resource was newly added", "// but the...
Gets information about why a property was set. Typically this is the path to the resource objects (file, URL, etc.) the property came from, but it can also indicate that it was set programmatically, or because of the command line. @param name - The property name to get the source of. @return null - If the property or...
[ "Gets", "information", "about", "why", "a", "property", "was", "set", ".", "Typically", "this", "is", "the", "path", "to", "the", "resource", "objects", "(", "file", "URL", "etc", ".", ")", "the", "property", "came", "from", "but", "it", "can", "also", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L1846-L1866
train
Returns the property sources for the specified property name.
[ 30522, 1030, 19706, 2696, 8553, 1012, 14480, 2270, 25549, 5164, 1031, 1033, 2131, 21572, 4842, 3723, 6499, 3126, 9623, 1006, 5164, 2171, 1007, 1063, 2065, 1006, 5144, 1027, 1027, 19701, 1007, 1063, 1013, 1013, 2065, 5144, 2003, 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/bean/BeanUtil.java
BeanUtil.internalGetPropertyDescriptorMap
private static Map<String, PropertyDescriptor> internalGetPropertyDescriptorMap(Class<?> clazz, boolean ignoreCase) throws BeanException { final PropertyDescriptor[] propertyDescriptors = getPropertyDescriptors(clazz); final Map<String, PropertyDescriptor> map = ignoreCase ? new CaseInsensitiveMap<String, Propert...
java
private static Map<String, PropertyDescriptor> internalGetPropertyDescriptorMap(Class<?> clazz, boolean ignoreCase) throws BeanException { final PropertyDescriptor[] propertyDescriptors = getPropertyDescriptors(clazz); final Map<String, PropertyDescriptor> map = ignoreCase ? new CaseInsensitiveMap<String, Propert...
[ "private", "static", "Map", "<", "String", ",", "PropertyDescriptor", ">", "internalGetPropertyDescriptorMap", "(", "Class", "<", "?", ">", "clazz", ",", "boolean", "ignoreCase", ")", "throws", "BeanException", "{", "final", "PropertyDescriptor", "[", "]", "proper...
获得字段名和字段描述Map。内部使用,直接获取Bean类的PropertyDescriptor @param clazz Bean类 @param ignoreCase 是否忽略大小写 @return 字段名和字段描述Map @throws BeanException 获取属性异常
[ "获得字段名和字段描述Map。内部使用,直接获取Bean类的PropertyDescriptor" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/bean/BeanUtil.java#L209-L218
train
Returns a map of property names to PropertyDescriptor objects.
[ 30522, 2797, 10763, 4949, 1026, 5164, 1010, 3200, 6155, 23235, 2953, 1028, 4722, 18150, 21572, 4842, 3723, 6155, 23235, 2953, 2863, 2361, 1006, 2465, 1026, 1029, 1028, 18856, 10936, 2480, 1010, 22017, 20898, 8568, 18382, 1007, 11618, 14068, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/rest/CommonRest.java
CommonRest.count
@GetMapping("/count/{type}/{key}/{task}") public Map<String, Object> count(@PathVariable String type, @PathVariable String key, @PathVariable String task) { OuterAdapter adapter = loader.getExtension(type, key); return adapter.count(task); }
java
@GetMapping("/count/{type}/{key}/{task}") public Map<String, Object> count(@PathVariable String type, @PathVariable String key, @PathVariable String task) { OuterAdapter adapter = loader.getExtension(type, key); return adapter.count(task); }
[ "@", "GetMapping", "(", "\"/count/{type}/{key}/{task}\"", ")", "public", "Map", "<", "String", ",", "Object", ">", "count", "(", "@", "PathVariable", "String", "type", ",", "@", "PathVariable", "String", "key", ",", "@", "PathVariable", "String", "task", ")", ...
统计总数 curl http://127.0.0.1:8081/count/rdb/oracle1/mytest_user.yml @param type 类型 hbase, es @param key adapter key @param task 任务名对应配置文件名 mytest_person2.yml @return
[ "统计总数", "curl", "http", ":", "//", "127", ".", "0", ".", "0", ".", "1", ":", "8081", "/", "count", "/", "rdb", "/", "oracle1", "/", "mytest_user", ".", "yml" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/rest/CommonRest.java#L134-L138
train
Count the number of items in a single resource.
[ 30522, 1030, 2131, 2863, 14853, 1006, 1000, 1013, 4175, 1013, 1063, 2828, 1065, 1013, 1063, 3145, 1065, 1013, 1063, 4708, 1065, 1000, 1007, 2270, 4949, 1026, 5164, 1010, 4874, 1028, 4175, 1006, 1030, 4130, 10755, 19210, 5164, 2828, 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-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistryImpl.java
MetricRegistryImpl.register
@Override public void register(Metric metric, String metricName, AbstractMetricGroup group) { synchronized (lock) { if (isShutdown()) { LOG.warn("Cannot register metric, because the MetricRegistry has already been shut down."); } else { if (reporters != null) { for (int i = 0; i < reporters.size()...
java
@Override public void register(Metric metric, String metricName, AbstractMetricGroup group) { synchronized (lock) { if (isShutdown()) { LOG.warn("Cannot register metric, because the MetricRegistry has already been shut down."); } else { if (reporters != null) { for (int i = 0; i < reporters.size()...
[ "@", "Override", "public", "void", "register", "(", "Metric", "metric", ",", "String", "metricName", ",", "AbstractMetricGroup", "group", ")", "{", "synchronized", "(", "lock", ")", "{", "if", "(", "isShutdown", "(", ")", ")", "{", "LOG", ".", "warn", "(...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistryImpl.java#L326-L364
train
Register a metric with the MetricRegistry.
[ 30522, 1030, 2058, 15637, 2270, 11675, 4236, 1006, 12046, 12046, 1010, 5164, 12046, 18442, 1010, 10061, 12589, 17058, 2177, 1007, 1063, 25549, 1006, 5843, 1007, 1063, 2065, 1006, 26354, 6979, 2102, 7698, 1006, 1007, 1007, 1063, 8833, 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/Proxy.java
Proxy.setHttpProxy
public Proxy setHttpProxy(String httpProxy) { verifyProxyTypeCompatibility(ProxyType.MANUAL); this.proxyType = ProxyType.MANUAL; this.httpProxy = httpProxy; return this; }
java
public Proxy setHttpProxy(String httpProxy) { verifyProxyTypeCompatibility(ProxyType.MANUAL); this.proxyType = ProxyType.MANUAL; this.httpProxy = httpProxy; return this; }
[ "public", "Proxy", "setHttpProxy", "(", "String", "httpProxy", ")", "{", "verifyProxyTypeCompatibility", "(", "ProxyType", ".", "MANUAL", ")", ";", "this", ".", "proxyType", "=", "ProxyType", ".", "MANUAL", ";", "this", ".", "httpProxy", "=", "httpProxy", ";",...
Specify which proxy to use for HTTP connections. @param httpProxy the proxy host, expected format is <code>hostname:1234</code> @return reference to self
[ "Specify", "which", "proxy", "to", "use", "for", "HTTP", "connections", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/Proxy.java#L239-L244
train
Sets the http proxy.
[ 30522, 2270, 24540, 6662, 4779, 9397, 3217, 18037, 1006, 5164, 8299, 21572, 18037, 1007, 1063, 20410, 21572, 18037, 13874, 9006, 24952, 8553, 1006, 24540, 13874, 1012, 6410, 1007, 1025, 2023, 1012, 24540, 13874, 1027, 24540, 13874, 1012, 6410...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/concurrent/PromiseCombiner.java
PromiseCombiner.add
@SuppressWarnings({ "unchecked", "rawtypes" }) public void add(Future future) { checkAddAllowed(); checkInEventLoop(); ++expectedCount; future.addListener(listener); }
java
@SuppressWarnings({ "unchecked", "rawtypes" }) public void add(Future future) { checkAddAllowed(); checkInEventLoop(); ++expectedCount; future.addListener(listener); }
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "public", "void", "add", "(", "Future", "future", ")", "{", "checkAddAllowed", "(", ")", ";", "checkInEventLoop", "(", ")", ";", "++", "expectedCount", ";", "future", ".", "...
Adds a new future to be combined. New futures may be added until an aggregate promise is added via the {@link PromiseCombiner#finish(Promise)} method. @param future the future to add to this promise combiner
[ "Adds", "a", "new", "future", "to", "be", "combined", ".", "New", "futures", "may", "be", "added", "until", "an", "aggregate", "promise", "is", "added", "via", "the", "{", "@link", "PromiseCombiner#finish", "(", "Promise", ")", "}", "method", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/concurrent/PromiseCombiner.java#L106-L112
train
Add a new resource to the resource.
[ 30522, 1030, 16081, 9028, 5582, 2015, 30524, 1063, 4638, 4215, 9305, 27663, 2094, 1006, 1007, 1025, 4638, 3170, 15338, 4135, 7361, 1006, 1007, 1025, 1009, 1009, 3517, 3597, 16671, 1025, 2925, 1012, 5587, 9863, 24454, 1006, 19373, 1007, 1025...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/watch/watchers/DelayWatcher.java
DelayWatcher.onModify
@Override public void onModify(WatchEvent<?> event, Path currentPath) { if(this.delay < 1) { this.watcher.onModify(event, currentPath); }else { onDelayModify(event, currentPath); } }
java
@Override public void onModify(WatchEvent<?> event, Path currentPath) { if(this.delay < 1) { this.watcher.onModify(event, currentPath); }else { onDelayModify(event, currentPath); } }
[ "@", "Override", "public", "void", "onModify", "(", "WatchEvent", "<", "?", ">", "event", ",", "Path", "currentPath", ")", "{", "if", "(", "this", ".", "delay", "<", "1", ")", "{", "this", ".", "watcher", ".", "onModify", "(", "event", ",", "currentP...
---------------------------------------------------------------------------------------------------------- Constructor end
[ "----------------------------------------------------------------------------------------------------------", "Constructor", "end" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/watch/watchers/DelayWatcher.java#L49-L56
train
Override this method to handle modify events.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2006, 5302, 4305, 12031, 1006, 3422, 18697, 3372, 1026, 1029, 1028, 2724, 1010, 4130, 2783, 15069, 1007, 1063, 2065, 1006, 2023, 1012, 8536, 1026, 1015, 1007, 1063, 2023, 1012, 3422, 2121, 1012, 2006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java
ParameterTool.getRequired
public String getRequired(String key) { addToDefaults(key, null); String value = get(key); if (value == null) { throw new RuntimeException("No data for required key '" + key + "'"); } return value; }
java
public String getRequired(String key) { addToDefaults(key, null); String value = get(key); if (value == null) { throw new RuntimeException("No data for required key '" + key + "'"); } return value; }
[ "public", "String", "getRequired", "(", "String", "key", ")", "{", "addToDefaults", "(", "key", ",", "null", ")", ";", "String", "value", "=", "get", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "RuntimeException", ...
Returns the String value for the given key. If the key does not exist it will throw a {@link RuntimeException}.
[ "Returns", "the", "String", "value", "for", "the", "given", "key", ".", "If", "the", "key", "does", "not", "exist", "it", "will", "throw", "a", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java#L247-L254
train
Returns the value for the given key.
[ 30522, 2270, 5164, 2131, 2890, 15549, 5596, 1006, 5164, 3145, 1007, 1063, 5587, 3406, 3207, 7011, 11314, 2015, 1006, 3145, 1010, 19701, 1007, 1025, 5164, 3643, 1027, 2131, 1006, 3145, 1007, 1025, 2065, 1006, 3643, 1027, 1027, 19701, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
TypeExtractor.getAllDeclaredFields
@PublicEvolving public static List<Field> getAllDeclaredFields(Class<?> clazz, boolean ignoreDuplicates) { List<Field> result = new ArrayList<Field>(); while (clazz != null) { Field[] fields = clazz.getDeclaredFields(); for (Field field : fields) { if(Modifier.isTransient(field.getModifiers()) || Modifie...
java
@PublicEvolving public static List<Field> getAllDeclaredFields(Class<?> clazz, boolean ignoreDuplicates) { List<Field> result = new ArrayList<Field>(); while (clazz != null) { Field[] fields = clazz.getDeclaredFields(); for (Field field : fields) { if(Modifier.isTransient(field.getModifiers()) || Modifie...
[ "@", "PublicEvolving", "public", "static", "List", "<", "Field", ">", "getAllDeclaredFields", "(", "Class", "<", "?", ">", "clazz", ",", "boolean", "ignoreDuplicates", ")", "{", "List", "<", "Field", ">", "result", "=", "new", "ArrayList", "<", "Field", ">...
Recursively determine all declared fields This is required because class.getFields() is not returning fields defined in parent classes. @param clazz class to be analyzed @param ignoreDuplicates if true, in case of duplicate field names only the lowest one in a hierarchy will be returned; throws an exception otherwise ...
[ "Recursively", "determine", "all", "declared", "fields", "This", "is", "required", "because", "class", ".", "getFields", "()", "is", "not", "returning", "fields", "defined", "in", "parent", "classes", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java#L1929-L1951
train
Returns a list of all declared fields of the given class.
[ 30522, 1030, 2270, 6777, 4747, 6455, 2270, 10763, 2862, 1026, 2492, 1028, 2131, 8095, 3207, 20464, 12069, 20952, 12891, 2015, 1006, 2465, 1026, 1029, 1028, 18856, 10936, 2480, 1010, 22017, 20898, 6439, 6279, 19341, 4570, 1007, 1063, 2862, 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
resolver/src/main/java/io/netty/resolver/HostsFileParser.java
HostsFileParser.parseSilently
public static HostsFileEntries parseSilently(Charset... charsets) { File hostsFile = locateHostsFile(); try { return parse(hostsFile, charsets); } catch (IOException e) { if (logger.isWarnEnabled()) { logger.warn("Failed to load and parse hosts file at " +...
java
public static HostsFileEntries parseSilently(Charset... charsets) { File hostsFile = locateHostsFile(); try { return parse(hostsFile, charsets); } catch (IOException e) { if (logger.isWarnEnabled()) { logger.warn("Failed to load and parse hosts file at " +...
[ "public", "static", "HostsFileEntries", "parseSilently", "(", "Charset", "...", "charsets", ")", "{", "File", "hostsFile", "=", "locateHostsFile", "(", ")", ";", "try", "{", "return", "parse", "(", "hostsFile", ",", "charsets", ")", ";", "}", "catch", "(", ...
Parse hosts file at standard OS location using the given {@link Charset}s one after each other until we were able to parse something or none is left. @param charsets the {@link Charset}s to try as file encodings when parsing. @return a {@link HostsFileEntries}
[ "Parse", "hosts", "file", "at", "standard", "OS", "location", "using", "the", "given", "{", "@link", "Charset", "}", "s", "one", "after", "each", "other", "until", "we", "were", "able", "to", "parse", "something", "or", "none", "is", "left", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/resolver/src/main/java/io/netty/resolver/HostsFileParser.java#L86-L96
train
Parses the hosts file with the specified charset ignoring any exceptions.
[ 30522, 2270, 10763, 6184, 8873, 24129, 21011, 11968, 8583, 9463, 20630, 1006, 25869, 13462, 1012, 1012, 1012, 25869, 13462, 2015, 1007, 1063, 5371, 6184, 8873, 2571, 1027, 12453, 15006, 3215, 8873, 2571, 1006, 1007, 1025, 3046, 1063, 2709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
networknt/light-4j
client/src/main/java/org/apache/hc/core5/util/copied/CharArrayBuffer.java
CharArrayBuffer.append
public void append(final byte[] b, final int off, final int len) { if (b == null) { return; } if ((off < 0) || (off > b.length) || (len < 0) || ((off + len) < 0) || ((off + len) > b.length)) { throw new IndexOutOfBoundsException("off: "+off+" len: "+len+" ...
java
public void append(final byte[] b, final int off, final int len) { if (b == null) { return; } if ((off < 0) || (off > b.length) || (len < 0) || ((off + len) < 0) || ((off + len) > b.length)) { throw new IndexOutOfBoundsException("off: "+off+" len: "+len+" ...
[ "public", "void", "append", "(", "final", "byte", "[", "]", "b", ",", "final", "int", "off", ",", "final", "int", "len", ")", "{", "if", "(", "b", "==", "null", ")", "{", "return", ";", "}", "if", "(", "(", "off", "<", "0", ")", "||", "(", ...
Appends {@code len} bytes to this buffer from the given source array starting at index {@code off}. The capacity of the buffer is increased, if necessary, to accommodate all {@code len} bytes. <p> The bytes are converted to chars using simple cast. @param b the bytes to be appended. @param off the inde...
[ "Appends", "{", "@code", "len", "}", "bytes", "to", "this", "buffer", "from", "the", "given", "source", "array", "starting", "at", "index", "{", "@code", "off", "}", ".", "The", "capacity", "of", "the", "buffer", "is", "increased", "if", "necessary", "to...
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/org/apache/hc/core5/util/copied/CharArrayBuffer.java#L176-L196
train
Append a byte array to this array.
[ 30522, 2270, 11675, 10439, 10497, 1006, 2345, 24880, 1031, 1033, 1038, 1010, 2345, 20014, 2125, 1010, 2345, 20014, 18798, 1007, 1063, 2065, 1006, 1038, 1027, 1027, 19701, 1007, 1063, 2709, 1025, 1065, 2065, 1006, 1006, 2125, 1026, 1014, 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/io/IoUtil.java
IoUtil.readObj
public static <T> T readObj(InputStream in) throws IORuntimeException, UtilException { if (in == null) { throw new IllegalArgumentException("The InputStream must not be null"); } ObjectInputStream ois = null; try { ois = new ObjectInputStream(in); @SuppressWarnings("unchecked") // may fail with ...
java
public static <T> T readObj(InputStream in) throws IORuntimeException, UtilException { if (in == null) { throw new IllegalArgumentException("The InputStream must not be null"); } ObjectInputStream ois = null; try { ois = new ObjectInputStream(in); @SuppressWarnings("unchecked") // may fail with ...
[ "public", "static", "<", "T", ">", "T", "readObj", "(", "InputStream", "in", ")", "throws", "IORuntimeException", ",", "UtilException", "{", "if", "(", "in", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The InputStream must not be ...
从流中读取内容,读到输出流中 @param <T> 读取对象的类型 @param in 输入流 @return 输出流 @throws IORuntimeException IO异常 @throws UtilException ClassNotFoundException包装
[ "从流中读取内容,读到输出流中" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java#L604-L619
train
Reads a single object from an input stream.
[ 30522, 2270, 10763, 1026, 1056, 1028, 1056, 3191, 16429, 3501, 1006, 20407, 25379, 1999, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1010, 21183, 9463, 2595, 24422, 1063, 2065, 1006, 1999, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 6206, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/network/messages/MessageSerializer.java
MessageSerializer.writePayload
private static ByteBuf writePayload( final ByteBufAllocator alloc, final long requestId, final MessageType messageType, final byte[] payload) { final int frameLength = HEADER_LENGTH + REQUEST_ID_SIZE + payload.length; final ByteBuf buf = alloc.ioBuffer(frameLength + Integer.BYTES); buf.writeInt(fram...
java
private static ByteBuf writePayload( final ByteBufAllocator alloc, final long requestId, final MessageType messageType, final byte[] payload) { final int frameLength = HEADER_LENGTH + REQUEST_ID_SIZE + payload.length; final ByteBuf buf = alloc.ioBuffer(frameLength + Integer.BYTES); buf.writeInt(fram...
[ "private", "static", "ByteBuf", "writePayload", "(", "final", "ByteBufAllocator", "alloc", ",", "final", "long", "requestId", ",", "final", "MessageType", "messageType", ",", "final", "byte", "[", "]", "payload", ")", "{", "final", "int", "frameLength", "=", "...
Helper for serializing the messages. @param alloc The {@link ByteBufAllocator} used to allocate the buffer to serialize the message into. @param requestId The id of the request to which the message refers to. @param messageType The {@link MessageType type of the message}. @param payload The serialized version of t...
[ "Helper", "for", "serializing", "the", "messages", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/network/messages/MessageSerializer.java#L199-L213
train
Write the payload.
[ 30522, 2797, 10763, 24880, 8569, 2546, 4339, 4502, 8516, 10441, 2094, 1006, 2345, 24880, 8569, 13976, 24755, 4263, 2035, 10085, 1010, 2345, 2146, 5227, 3593, 1010, 2345, 4471, 13874, 4471, 13874, 1010, 2345, 24880, 1031, 1033, 18093, 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/qrcode/QrCodeUtil.java
QrCodeUtil.toImage
public static BufferedImage toImage(BitMatrix matrix, int foreColor, int backColor) { final int width = matrix.getWidth(); final int height = matrix.getHeight(); BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); for (int x = 0; x < width; x++) { for (int y = 0; y < heig...
java
public static BufferedImage toImage(BitMatrix matrix, int foreColor, int backColor) { final int width = matrix.getWidth(); final int height = matrix.getHeight(); BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); for (int x = 0; x < width; x++) { for (int y = 0; y < heig...
[ "public", "static", "BufferedImage", "toImage", "(", "BitMatrix", "matrix", ",", "int", "foreColor", ",", "int", "backColor", ")", "{", "final", "int", "width", "=", "matrix", ".", "getWidth", "(", ")", ";", "final", "int", "height", "=", "matrix", ".", ...
BitMatrix转BufferedImage @param matrix BitMatrix @param foreColor 前景色 @param backColor 背景色 @return BufferedImage @since 4.1.2
[ "BitMatrix转BufferedImage" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeUtil.java#L341-L351
train
Converts a BitMatrix to a BufferedImage.
[ 30522, 2270, 10763, 17698, 2098, 9581, 3351, 2000, 9581, 3351, 1006, 2978, 18900, 17682, 8185, 1010, 20014, 18921, 18717, 1010, 20014, 2067, 18717, 1007, 1063, 2345, 20014, 9381, 1027, 8185, 1012, 2131, 9148, 11927, 2232, 1006, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/operators/util/FieldList.java
FieldList.addField
@Override public FieldList addField(Integer fieldID) { if (fieldID == null) { throw new IllegalArgumentException("Field ID must not be null."); } if (size() == 0) { return new FieldList(fieldID); } else { ArrayList<Integer> list = new ArrayList<Integer>(size() + 1); list.addAll(this.collection);...
java
@Override public FieldList addField(Integer fieldID) { if (fieldID == null) { throw new IllegalArgumentException("Field ID must not be null."); } if (size() == 0) { return new FieldList(fieldID); } else { ArrayList<Integer> list = new ArrayList<Integer>(size() + 1); list.addAll(this.collection);...
[ "@", "Override", "public", "FieldList", "addField", "(", "Integer", "fieldID", ")", "{", "if", "(", "fieldID", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Field ID must not be null.\"", ")", ";", "}", "if", "(", "size", "(", "...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/util/FieldList.java#L60-L74
train
Add a field to the list.
[ 30522, 1030, 2058, 15637, 2270, 2492, 9863, 5587, 3790, 1006, 16109, 2492, 3593, 1007, 1063, 2065, 1006, 2492, 3593, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 6206, 2906, 22850, 15781, 2595, 24422, 1006, 1000, 2492, 8909, 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...
apache/spark
core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java
TaskMemoryManager.encodePageNumberAndOffset
public long encodePageNumberAndOffset(MemoryBlock page, long offsetInPage) { if (tungstenMemoryMode == MemoryMode.OFF_HEAP) { // In off-heap mode, an offset is an absolute address that may require a full 64 bits to // encode. Due to our page size limitation, though, we can convert this into an offset th...
java
public long encodePageNumberAndOffset(MemoryBlock page, long offsetInPage) { if (tungstenMemoryMode == MemoryMode.OFF_HEAP) { // In off-heap mode, an offset is an absolute address that may require a full 64 bits to // encode. Due to our page size limitation, though, we can convert this into an offset th...
[ "public", "long", "encodePageNumberAndOffset", "(", "MemoryBlock", "page", ",", "long", "offsetInPage", ")", "{", "if", "(", "tungstenMemoryMode", "==", "MemoryMode", ".", "OFF_HEAP", ")", "{", "// In off-heap mode, an offset is an absolute address that may require a full 64 ...
Given a memory page and offset within that page, encode this address into a 64-bit long. This address will remain valid as long as the corresponding page has not been freed. @param page a data page allocated by {@link TaskMemoryManager#allocatePage}/ @param offsetInPage an offset in this page which incorporates the ba...
[ "Given", "a", "memory", "page", "and", "offset", "within", "that", "page", "encode", "this", "address", "into", "a", "64", "-", "bit", "long", ".", "This", "address", "will", "remain", "valid", "as", "long", "as", "the", "corresponding", "page", "has", "...
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java#L363-L371
train
Encode a page number and offset in the given memory block.
[ 30522, 2270, 2146, 4372, 16044, 13704, 19172, 5677, 28574, 21807, 3388, 1006, 3638, 23467, 3931, 1010, 2146, 16396, 2378, 13704, 1007, 1063, 2065, 1006, 27079, 16173, 4168, 5302, 2854, 5302, 3207, 1027, 1027, 3638, 5302, 3207, 1012, 2125, 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...
SeleniumHQ/selenium
java/server/src/org/openqa/grid/web/servlet/console/ConsoleServlet.java
ConsoleServlet.getVerboseConfig
private String getVerboseConfig() { StringBuilder builder = new StringBuilder(); GridHubConfiguration config = getRegistry().getHub().getConfiguration(); builder.append("<div id='verbose-config-container'>"); builder.append("<a id='verbose-config-view-toggle' href='#'>View Verbose</a>"); builder.a...
java
private String getVerboseConfig() { StringBuilder builder = new StringBuilder(); GridHubConfiguration config = getRegistry().getHub().getConfiguration(); builder.append("<div id='verbose-config-container'>"); builder.append("<a id='verbose-config-view-toggle' href='#'>View Verbose</a>"); builder.a...
[ "private", "String", "getVerboseConfig", "(", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "GridHubConfiguration", "config", "=", "getRegistry", "(", ")", ".", "getHub", "(", ")", ".", "getConfiguration", "(", ")", ";", "...
Displays more detailed configuration @return html representation of the verbose hub config
[ "Displays", "more", "detailed", "configuration" ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/server/src/org/openqa/grid/web/servlet/console/ConsoleServlet.java#L225-L255
train
Get the verbose configuration
[ 30522, 2797, 5164, 2131, 6299, 15853, 8586, 2239, 8873, 2290, 1006, 1007, 1063, 5164, 8569, 23891, 2099, 12508, 1027, 2047, 5164, 8569, 23891, 2099, 1006, 1007, 1025, 8370, 6979, 9818, 2239, 8873, 27390, 3370, 9530, 8873, 2290, 1027, 2131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/seg/WordBasedSegment.java
WordBasedSegment.checkDateElements
private static void checkDateElements(List<Vertex> linkedArray) { if (linkedArray.size() < 2) return; ListIterator<Vertex> listIterator = linkedArray.listIterator(); Vertex next = listIterator.next(); Vertex current = next; while (listIterator.hasNext()) {...
java
private static void checkDateElements(List<Vertex> linkedArray) { if (linkedArray.size() < 2) return; ListIterator<Vertex> listIterator = linkedArray.listIterator(); Vertex next = listIterator.next(); Vertex current = next; while (listIterator.hasNext()) {...
[ "private", "static", "void", "checkDateElements", "(", "List", "<", "Vertex", ">", "linkedArray", ")", "{", "if", "(", "linkedArray", ".", "size", "(", ")", "<", "2", ")", "return", ";", "ListIterator", "<", "Vertex", ">", "listIterator", "=", "linkedArray...
====================================================================
[ "====================================================================" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/WordBasedSegment.java#L149-L213
train
checkDateElements This method checks if the list of vertices contains a date element.
[ 30522, 2797, 10763, 11675, 4638, 13701, 12260, 8163, 1006, 2862, 1026, 19449, 1028, 5799, 2906, 9447, 1007, 1063, 2065, 1006, 5799, 2906, 9447, 1012, 2946, 1006, 1007, 1026, 1016, 1007, 2709, 1025, 2862, 21646, 8844, 1026, 19449, 1028, 2862...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Http2Client.java
Http2Client.populateHeader
public Result populateHeader(ClientRequest request, String authToken, String correlationId, String traceabilityId) { if(traceabilityId != null) { addAuthTokenTrace(request, authToken, traceabilityId); } else { addAuthToken(request, authToken); } Result<Jwt> result...
java
public Result populateHeader(ClientRequest request, String authToken, String correlationId, String traceabilityId) { if(traceabilityId != null) { addAuthTokenTrace(request, authToken, traceabilityId); } else { addAuthToken(request, authToken); } Result<Jwt> result...
[ "public", "Result", "populateHeader", "(", "ClientRequest", "request", ",", "String", "authToken", ",", "String", "correlationId", ",", "String", "traceabilityId", ")", "{", "if", "(", "traceabilityId", "!=", "null", ")", "{", "addAuthTokenTrace", "(", "request", ...
Support API to API calls with scope token. The token is the original token from consumer and the client credentials token of caller API is added from cache. authToken, correlationId and traceabilityId are passed in as strings. This method is used in API to API call @param request the http request @param authToken the...
[ "Support", "API", "to", "API", "calls", "with", "scope", "token", ".", "The", "token", "is", "the", "original", "token", "from", "consumer", "and", "the", "client", "credentials", "token", "of", "caller", "API", "is", "added", "from", "cache", ".", "authTo...
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/com/networknt/client/Http2Client.java#L370-L381
train
Populate the request header with the token.
[ 30522, 2270, 2765, 3769, 9869, 4974, 2121, 1006, 7396, 2890, 15500, 5227, 1010, 5164, 8740, 2705, 18715, 2368, 1010, 5164, 16902, 3593, 1010, 5164, 7637, 8010, 3593, 1007, 1063, 2065, 1006, 7637, 8010, 3593, 999, 1027, 19701, 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...
netty/netty
buffer/src/main/java/io/netty/buffer/PoolChunkList.java
PoolChunkList.move0
private boolean move0(PoolChunk<T> chunk) { if (prevList == null) { // There is no previous PoolChunkList so return false which result in having the PoolChunk destroyed and // all memory associated with the PoolChunk will be released. assert chunk.usage() == 0; re...
java
private boolean move0(PoolChunk<T> chunk) { if (prevList == null) { // There is no previous PoolChunkList so return false which result in having the PoolChunk destroyed and // all memory associated with the PoolChunk will be released. assert chunk.usage() == 0; re...
[ "private", "boolean", "move0", "(", "PoolChunk", "<", "T", ">", "chunk", ")", "{", "if", "(", "prevList", "==", "null", ")", "{", "// There is no previous PoolChunkList so return false which result in having the PoolChunk destroyed and", "// all memory associated with the PoolC...
Moves the {@link PoolChunk} down the {@link PoolChunkList} linked-list so it will end up in the right {@link PoolChunkList} that has the correct minUsage / maxUsage in respect to {@link PoolChunk#usage()}.
[ "Moves", "the", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/PoolChunkList.java#L125-L133
train
Move the PoolChunk to the beginning of the list.
[ 30522, 2797, 22017, 20898, 2693, 2692, 1006, 4770, 20760, 8950, 1026, 1056, 1028, 20000, 1007, 1063, 2065, 1006, 3653, 2615, 9863, 1027, 1027, 19701, 1007, 1063, 1013, 1013, 2045, 2003, 2053, 3025, 4770, 20760, 8950, 9863, 2061, 2709, 6270,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/RestTemplateBuilder.java
RestTemplateBuilder.interceptors
public RestTemplateBuilder interceptors( ClientHttpRequestInterceptor... interceptors) { Assert.notNull(interceptors, "interceptors must not be null"); return interceptors(Arrays.asList(interceptors)); }
java
public RestTemplateBuilder interceptors( ClientHttpRequestInterceptor... interceptors) { Assert.notNull(interceptors, "interceptors must not be null"); return interceptors(Arrays.asList(interceptors)); }
[ "public", "RestTemplateBuilder", "interceptors", "(", "ClientHttpRequestInterceptor", "...", "interceptors", ")", "{", "Assert", ".", "notNull", "(", "interceptors", ",", "\"interceptors must not be null\"", ")", ";", "return", "interceptors", "(", "Arrays", ".", "asLis...
Set the {@link ClientHttpRequestInterceptor ClientHttpRequestInterceptors} that should be used with the {@link RestTemplate}. Setting this value will replace any previously defined interceptors. @param interceptors the interceptors to set @return a new builder instance @since 1.4.1 @see #additionalInterceptors(ClientHt...
[ "Set", "the", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/RestTemplateBuilder.java#L246-L250
train
Add interceptors to the response.
[ 30522, 2270, 2717, 18532, 15725, 8569, 23891, 2099, 24727, 2015, 1006, 7396, 11039, 25856, 2890, 15500, 18447, 2121, 3401, 13876, 2953, 1012, 1012, 1012, 24727, 2015, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 24727, 2015, 1010, 1000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
example/src/main/java/io/netty/example/http/file/HttpStaticFileServerHandler.java
HttpStaticFileServerHandler.sendAndCleanupConnection
private void sendAndCleanupConnection(ChannelHandlerContext ctx, FullHttpResponse response) { final FullHttpRequest request = this.request; final boolean keepAlive = HttpUtil.isKeepAlive(request); HttpUtil.setContentLength(response, response.content().readableBytes()); if (!keepAlive) { ...
java
private void sendAndCleanupConnection(ChannelHandlerContext ctx, FullHttpResponse response) { final FullHttpRequest request = this.request; final boolean keepAlive = HttpUtil.isKeepAlive(request); HttpUtil.setContentLength(response, response.content().readableBytes()); if (!keepAlive) { ...
[ "private", "void", "sendAndCleanupConnection", "(", "ChannelHandlerContext", "ctx", ",", "FullHttpResponse", "response", ")", "{", "final", "FullHttpRequest", "request", "=", "this", ".", "request", ";", "final", "boolean", "keepAlive", "=", "HttpUtil", ".", "isKeep...
If Keep-Alive is disabled, attaches "Connection: close" header to the response and closes the connection after the response being sent.
[ "If", "Keep", "-", "Alive", "is", "disabled", "attaches", "Connection", ":", "close", "header", "to", "the", "response", "and", "closes", "the", "connection", "after", "the", "response", "being", "sent", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/example/src/main/java/io/netty/example/http/file/HttpStaticFileServerHandler.java#L349-L367
train
Send and cleanup connection.
[ 30522, 2797, 11675, 4604, 5685, 14321, 24076, 15042, 18256, 7542, 1006, 3149, 11774, 3917, 8663, 18209, 14931, 2595, 1010, 2440, 11039, 25856, 6072, 26029, 3366, 3433, 1007, 1063, 2345, 2440, 11039, 25856, 2890, 15500, 5227, 1027, 2023, 1012,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/spdy/SpdySessionStatus.java
SpdySessionStatus.valueOf
public static SpdySessionStatus valueOf(int code) { switch (code) { case 0: return OK; case 1: return PROTOCOL_ERROR; case 2: return INTERNAL_ERROR; } return new SpdySessionStatus(code, "UNKNOWN (" + code + ')'); }
java
public static SpdySessionStatus valueOf(int code) { switch (code) { case 0: return OK; case 1: return PROTOCOL_ERROR; case 2: return INTERNAL_ERROR; } return new SpdySessionStatus(code, "UNKNOWN (" + code + ')'); }
[ "public", "static", "SpdySessionStatus", "valueOf", "(", "int", "code", ")", "{", "switch", "(", "code", ")", "{", "case", "0", ":", "return", "OK", ";", "case", "1", ":", "return", "PROTOCOL_ERROR", ";", "case", "2", ":", "return", "INTERNAL_ERROR", ";"...
Returns the {@link SpdySessionStatus} represented by the specified code. If the specified code is a defined SPDY status code, a cached instance will be returned. Otherwise, a new instance will be returned.
[ "Returns", "the", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/spdy/SpdySessionStatus.java#L46-L57
train
Gets the status object for a specific session code.
[ 30522, 2270, 10763, 23772, 23274, 28231, 9153, 5809, 3643, 11253, 1006, 20014, 3642, 1007, 1063, 6942, 1006, 3642, 1007, 1063, 2553, 1014, 1024, 2709, 7929, 1025, 2553, 1015, 1024, 2709, 8778, 1035, 7561, 1025, 2553, 1016, 1024, 2709, 4722,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
common/src/main/java/io/netty/util/internal/StringUtil.java
StringUtil.escapeCsv
public static CharSequence escapeCsv(CharSequence value, boolean trimWhiteSpace) { int length = checkNotNull(value, "value").length(); int start; int last; if (trimWhiteSpace) { start = indexOfFirstNonOwsChar(value, length); last = indexOfLastNonOwsChar(value, sta...
java
public static CharSequence escapeCsv(CharSequence value, boolean trimWhiteSpace) { int length = checkNotNull(value, "value").length(); int start; int last; if (trimWhiteSpace) { start = indexOfFirstNonOwsChar(value, length); last = indexOfLastNonOwsChar(value, sta...
[ "public", "static", "CharSequence", "escapeCsv", "(", "CharSequence", "value", ",", "boolean", "trimWhiteSpace", ")", "{", "int", "length", "=", "checkNotNull", "(", "value", ",", "\"value\"", ")", ".", "length", "(", ")", ";", "int", "start", ";", "int", ...
Escapes the specified value, if necessary according to <a href="https://tools.ietf.org/html/rfc4180#section-2">RFC-4180</a>. @param value The value which will be escaped according to <a href="https://tools.ietf.org/html/rfc4180#section-2">RFC-4180</a> @param trimWhiteSpace The value will first be trimmed of i...
[ "Escapes", "the", "specified", "value", "if", "necessary", "according", "to", "<a", "href", "=", "https", ":", "//", "tools", ".", "ietf", ".", "org", "/", "html", "/", "rfc4180#section", "-", "2", ">", "RFC", "-", "4180<", "/", "a", ">", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/StringUtil.java#L314-L390
train
Escape CSV characters.
[ 30522, 2270, 10763, 25869, 3366, 4226, 5897, 4019, 6169, 2615, 1006, 25869, 3366, 4226, 5897, 3643, 1010, 22017, 20898, 12241, 2860, 16584, 2229, 15327, 1007, 1063, 20014, 3091, 1027, 4638, 17048, 11231, 3363, 1006, 3643, 1010, 1000, 3643, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
networknt/light-4j
http-url/src/main/java/com/networknt/url/URLNormalizer.java
URLNormalizer.removeDefaultPort
public URLNormalizer removeDefaultPort() { URL u = toURL(); if ("http".equalsIgnoreCase(u.getProtocol()) && u.getPort() == HttpURL.DEFAULT_HTTP_PORT) { url = url.replaceFirst(":" + HttpURL.DEFAULT_HTTP_PORT, ""); } else if ("https".equalsIgnoreCase(u.getProtocol()) ...
java
public URLNormalizer removeDefaultPort() { URL u = toURL(); if ("http".equalsIgnoreCase(u.getProtocol()) && u.getPort() == HttpURL.DEFAULT_HTTP_PORT) { url = url.replaceFirst(":" + HttpURL.DEFAULT_HTTP_PORT, ""); } else if ("https".equalsIgnoreCase(u.getProtocol()) ...
[ "public", "URLNormalizer", "removeDefaultPort", "(", ")", "{", "URL", "u", "=", "toURL", "(", ")", ";", "if", "(", "\"http\"", ".", "equalsIgnoreCase", "(", "u", ".", "getProtocol", "(", ")", ")", "&&", "u", ".", "getPort", "(", ")", "==", "HttpURL", ...
Removes the default port (80 for http, and 443 for https).<p> <code>http://www.example.com:80/bar.html &rarr; http://www.example.com/bar.html</code> @return this instance
[ "Removes", "the", "default", "port", "(", "80", "for", "http", "and", "443", "for", "https", ")", ".", "<p", ">", "<code", ">", "http", ":", "//", "www", ".", "example", ".", "com", ":", "80", "/", "bar", ".", "html", "&rarr", ";", "http", ":", ...
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/http-url/src/main/java/com/networknt/url/URLNormalizer.java#L295-L305
train
Remove the default port from the URL.
[ 30522, 2270, 24471, 19666, 2953, 9067, 17629, 3718, 12879, 23505, 6442, 1006, 1007, 1063, 24471, 2140, 1057, 1027, 2778, 2140, 1006, 1007, 1025, 2065, 1006, 1000, 8299, 1000, 1012, 19635, 23773, 5686, 18382, 1006, 1057, 1012, 2131, 21572, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java
BeanDefinitionLoader.setResourceLoader
public void setResourceLoader(ResourceLoader resourceLoader) { this.resourceLoader = resourceLoader; this.xmlReader.setResourceLoader(resourceLoader); this.scanner.setResourceLoader(resourceLoader); }
java
public void setResourceLoader(ResourceLoader resourceLoader) { this.resourceLoader = resourceLoader; this.xmlReader.setResourceLoader(resourceLoader); this.scanner.setResourceLoader(resourceLoader); }
[ "public", "void", "setResourceLoader", "(", "ResourceLoader", "resourceLoader", ")", "{", "this", ".", "resourceLoader", "=", "resourceLoader", ";", "this", ".", "xmlReader", ".", "setResourceLoader", "(", "resourceLoader", ")", ";", "this", ".", "scanner", ".", ...
Set the resource loader to be used by the underlying readers and scanner. @param resourceLoader the resource loader
[ "Set", "the", "resource", "loader", "to", "be", "used", "by", "the", "underlying", "readers", "and", "scanner", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java#L105-L109
train
Sets the resource loader.
[ 30522, 30524, 2023, 1012, 20950, 16416, 4063, 1012, 2275, 6072, 8162, 29109, 10441, 4063, 1006, 7692, 11066, 2121, 1007, 1025, 2023, 1012, 26221, 1012, 2275, 6072, 8162, 29109, 10441, 4063, 1006, 7692, 11066, 2121, 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-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractionUtils.java
TypeExtractionUtils.extractTypeFromLambda
public static Type extractTypeFromLambda( Class<?> baseClass, LambdaExecutable exec, int[] lambdaTypeArgumentIndices, int paramLen, int baseParametersLen) { Type output = exec.getParameterTypes()[paramLen - baseParametersLen + lambdaTypeArgumentIndices[0]]; for (int i = 1; i < lambdaTypeArgumentIndices.le...
java
public static Type extractTypeFromLambda( Class<?> baseClass, LambdaExecutable exec, int[] lambdaTypeArgumentIndices, int paramLen, int baseParametersLen) { Type output = exec.getParameterTypes()[paramLen - baseParametersLen + lambdaTypeArgumentIndices[0]]; for (int i = 1; i < lambdaTypeArgumentIndices.le...
[ "public", "static", "Type", "extractTypeFromLambda", "(", "Class", "<", "?", ">", "baseClass", ",", "LambdaExecutable", "exec", ",", "int", "[", "]", "lambdaTypeArgumentIndices", ",", "int", "paramLen", ",", "int", "baseParametersLen", ")", "{", "Type", "output"...
Extracts type from given index from lambda. It supports nested types. @param baseClass SAM function that the lambda implements @param exec lambda function to extract the type from @param lambdaTypeArgumentIndices position of type to extract in type hierarchy @param paramLen count of total parameters of the lambda (inc...
[ "Extracts", "type", "from", "given", "index", "from", "lambda", ".", "It", "supports", "nested", "types", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractionUtils.java#L168-L181
train
Extract type from lambda.
[ 30522, 2270, 10763, 2828, 14817, 13874, 19699, 5358, 10278, 2497, 2850, 1006, 2465, 1026, 1029, 1028, 2918, 26266, 1010, 23375, 10288, 8586, 23056, 4654, 8586, 1010, 20014, 1031, 1033, 23375, 13874, 2906, 22850, 4765, 22254, 23522, 1010, 2001...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-streaming-python/src/main/java/org/apache/flink/streaming/python/api/environment/PythonEnvironmentFactory.java
PythonEnvironmentFactory.create_local_execution_environment
public PythonStreamExecutionEnvironment create_local_execution_environment(int parallelism, Configuration config) { return new PythonStreamExecutionEnvironment( StreamExecutionEnvironment.createLocalEnvironment(parallelism, config), new Path(localTmpPath), scriptName); }
java
public PythonStreamExecutionEnvironment create_local_execution_environment(int parallelism, Configuration config) { return new PythonStreamExecutionEnvironment( StreamExecutionEnvironment.createLocalEnvironment(parallelism, config), new Path(localTmpPath), scriptName); }
[ "public", "PythonStreamExecutionEnvironment", "create_local_execution_environment", "(", "int", "parallelism", ",", "Configuration", "config", ")", "{", "return", "new", "PythonStreamExecutionEnvironment", "(", "StreamExecutionEnvironment", ".", "createLocalEnvironment", "(", "...
A thin wrapper layer over {@link StreamExecutionEnvironment#createLocalEnvironment(int, Configuration)}. @param parallelism The parallelism for the local environment. @param config Pass a custom configuration into the cluster @return A local python execution environment with the specified parallelism.
[ "A", "thin", "wrapper", "layer", "over", "{", "@link", "StreamExecutionEnvironment#createLocalEnvironment", "(", "int", "Configuration", ")", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/environment/PythonEnvironmentFactory.java#L74-L77
train
Create a local Python stream execution environment.
[ 30522, 2270, 18750, 30524, 1012, 3443, 4135, 9289, 2368, 21663, 2239, 3672, 1006, 5903, 2964, 1010, 9530, 8873, 2290, 1007, 1010, 2047, 4130, 1006, 2334, 21246, 13944, 2705, 1007, 1010, 5896, 18442, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/watch/WatchUtil.java
WatchUtil.createModify
public static WatchMonitor createModify(Path path, int maxDepth, Watcher watcher) { final WatchMonitor watchMonitor = create(path, maxDepth, WatchMonitor.ENTRY_MODIFY); watchMonitor.setWatcher(watcher); return watchMonitor; }
java
public static WatchMonitor createModify(Path path, int maxDepth, Watcher watcher) { final WatchMonitor watchMonitor = create(path, maxDepth, WatchMonitor.ENTRY_MODIFY); watchMonitor.setWatcher(watcher); return watchMonitor; }
[ "public", "static", "WatchMonitor", "createModify", "(", "Path", "path", ",", "int", "maxDepth", ",", "Watcher", "watcher", ")", "{", "final", "WatchMonitor", "watchMonitor", "=", "create", "(", "path", ",", "maxDepth", ",", "WatchMonitor", ".", "ENTRY_MODIFY", ...
创建并初始化监听,监听修改事件 @param path 路径 @param maxDepth 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录 @param watcher {@link Watcher} @return {@link WatchMonitor} @since 4.5.2
[ "创建并初始化监听,监听修改事件" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/watch/WatchUtil.java#L375-L379
train
Creates a new watch monitor that changes the state of the file system.
[ 30522, 2270, 10763, 3422, 8202, 15660, 3443, 5302, 4305, 12031, 1006, 4130, 4130, 1010, 20014, 4098, 3207, 13876, 2232, 1010, 3422, 2121, 3422, 2121, 1007, 1063, 2345, 3422, 8202, 15660, 3422, 8202, 15660, 1027, 3443, 1006, 4130, 1010, 4098...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.copy
public void copy(int srcIdx, char[] dst, int dstIdx, int length) { if (dst == null) { throw new NullPointerException("dst"); } if (isOutOfBounds(srcIdx, length, length())) { throw new IndexOutOfBoundsException("expected: " + "0 <= srcIdx(" + srcIdx + ") <= srcIdx + lengt...
java
public void copy(int srcIdx, char[] dst, int dstIdx, int length) { if (dst == null) { throw new NullPointerException("dst"); } if (isOutOfBounds(srcIdx, length, length())) { throw new IndexOutOfBoundsException("expected: " + "0 <= srcIdx(" + srcIdx + ") <= srcIdx + lengt...
[ "public", "void", "copy", "(", "int", "srcIdx", ",", "char", "[", "]", "dst", ",", "int", "dstIdx", ",", "int", "length", ")", "{", "if", "(", "dst", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"dst\"", ")", ";", "}", "if...
Copied the content of this string to a character array. @param srcIdx the starting offset of characters to copy. @param dst the destination character array. @param dstIdx the starting offset in the destination byte array. @param length the number of characters to copy.
[ "Copied", "the", "content", "of", "this", "string", "to", "a", "character", "array", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/AsciiString.java#L587-L601
train
Copy the contents of this instance to the specified destination array.
[ 30522, 2270, 11675, 6100, 1006, 20014, 5034, 6895, 2094, 2595, 1010, 25869, 1031, 1033, 16233, 2102, 1010, 20014, 16233, 3775, 2094, 2595, 1010, 20014, 3091, 1007, 1063, 2065, 1006, 16233, 2102, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/seg/common/WordNet.java
WordNet.insert
public void insert(int line, Vertex vertex, WordNet wordNetAll) { for (Vertex oldVertex : vertexes[line]) { // 保证唯一性 if (oldVertex.realWord.length() == vertex.realWord.length()) return; } vertexes[line].add(vertex); ++size; // 保证这个词语前面直连 ...
java
public void insert(int line, Vertex vertex, WordNet wordNetAll) { for (Vertex oldVertex : vertexes[line]) { // 保证唯一性 if (oldVertex.realWord.length() == vertex.realWord.length()) return; } vertexes[line].add(vertex); ++size; // 保证这个词语前面直连 ...
[ "public", "void", "insert", "(", "int", "line", ",", "Vertex", "vertex", ",", "WordNet", "wordNetAll", ")", "{", "for", "(", "Vertex", "oldVertex", ":", "vertexes", "[", "line", "]", ")", "{", "// 保证唯一性", "if", "(", "oldVertex", ".", "realWord", ".", "...
添加顶点,同时检查此顶点是否悬孤,如果悬孤则自动补全 @param line @param vertex @param wordNetAll 这是一个完全的词图
[ "添加顶点,同时检查此顶点是否悬孤,如果悬孤则自动补全" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/common/WordNet.java#L141-L174
train
Insert a single entry into the list.
[ 30522, 2270, 11675, 19274, 1006, 20014, 2240, 1010, 19449, 19449, 1010, 2773, 7159, 2773, 7159, 8095, 1007, 1063, 2005, 1006, 19449, 2214, 16874, 10288, 1024, 19449, 2229, 1031, 2240, 1033, 1007, 1063, 1013, 1013, 1766, 100, 100, 1740, 100,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java
AbstractFetcher.createPartitionStateHolders
private List<KafkaTopicPartitionState<KPH>> createPartitionStateHolders( List<KafkaTopicPartition> partitions, long initialOffset, int timestampWatermarkMode, SerializedValue<AssignerWithPeriodicWatermarks<T>> watermarksPeriodic, SerializedValue<AssignerWithPunctuatedWatermarks<T>> watermarksPunctuated, Cla...
java
private List<KafkaTopicPartitionState<KPH>> createPartitionStateHolders( List<KafkaTopicPartition> partitions, long initialOffset, int timestampWatermarkMode, SerializedValue<AssignerWithPeriodicWatermarks<T>> watermarksPeriodic, SerializedValue<AssignerWithPunctuatedWatermarks<T>> watermarksPunctuated, Cla...
[ "private", "List", "<", "KafkaTopicPartitionState", "<", "KPH", ">", ">", "createPartitionStateHolders", "(", "List", "<", "KafkaTopicPartition", ">", "partitions", ",", "long", "initialOffset", ",", "int", "timestampWatermarkMode", ",", "SerializedValue", "<", "Assig...
Shortcut variant of {@link #createPartitionStateHolders(Map, int, SerializedValue, SerializedValue, ClassLoader)} that uses the same offset for all partitions when creating their state holders.
[ "Shortcut", "variant", "of", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java#L583-L602
train
Creates the partition state holders for the given partitions.
[ 30522, 2797, 2862, 1026, 10556, 24316, 10610, 24330, 19362, 3775, 9285, 12259, 1026, 1047, 8458, 1028, 1028, 3443, 19362, 3775, 9285, 12259, 17794, 1006, 2862, 1026, 10556, 24316, 10610, 24330, 19362, 3775, 3508, 1028, 13571, 2015, 1010, 2146...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/plan/nodes/exec/NodeResourceConfig.java
NodeResourceConfig.calOperatorParallelism
public static int calOperatorParallelism(double rowCount, Configuration tableConf) { int maxParallelism = getOperatorMaxParallelism(tableConf); int minParallelism = getOperatorMinParallelism(tableConf); int resultParallelism = (int) (rowCount / getRowCountPerPartition(tableConf)); return Math.max(Math.min(resul...
java
public static int calOperatorParallelism(double rowCount, Configuration tableConf) { int maxParallelism = getOperatorMaxParallelism(tableConf); int minParallelism = getOperatorMinParallelism(tableConf); int resultParallelism = (int) (rowCount / getRowCountPerPartition(tableConf)); return Math.max(Math.min(resul...
[ "public", "static", "int", "calOperatorParallelism", "(", "double", "rowCount", ",", "Configuration", "tableConf", ")", "{", "int", "maxParallelism", "=", "getOperatorMaxParallelism", "(", "tableConf", ")", ";", "int", "minParallelism", "=", "getOperatorMinParallelism",...
Calculates operator parallelism based on rowcount of the operator. @param rowCount rowCount of the operator @param tableConf Configuration. @return the result of operator parallelism.
[ "Calculates", "operator", "parallelism", "based", "on", "rowcount", "of", "the", "operator", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/plan/nodes/exec/NodeResourceConfig.java#L74-L79
train
Cal operator parallelism.
[ 30522, 2270, 10763, 20014, 10250, 25918, 8844, 28689, 6216, 28235, 1006, 3313, 5216, 3597, 16671, 1010, 9563, 2795, 8663, 2546, 1007, 1063, 20014, 4098, 28689, 6216, 30524, 28689, 6216, 28235, 1006, 2795, 8663, 2546, 1007, 1025, 20014, 2765, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-json/src/main/java/cn/hutool/json/JSONUtil.java
JSONUtil.readJSONObject
public static JSONObject readJSONObject(File file, Charset charset) throws IORuntimeException { return parseObj(FileReader.create(file, charset).readString()); }
java
public static JSONObject readJSONObject(File file, Charset charset) throws IORuntimeException { return parseObj(FileReader.create(file, charset).readString()); }
[ "public", "static", "JSONObject", "readJSONObject", "(", "File", "file", ",", "Charset", "charset", ")", "throws", "IORuntimeException", "{", "return", "parseObj", "(", "FileReader", ".", "create", "(", "file", ",", "charset", ")", ".", "readString", "(", ")",...
读取JSONObject @param file JSON文件 @param charset 编码 @return JSONObject @throws IORuntimeException IO异常
[ "读取JSONObject" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/JSONUtil.java#L224-L226
train
Read a JSON object from a file.
[ 30522, 2270, 10763, 1046, 3385, 16429, 20614, 3191, 22578, 17175, 2497, 20614, 1006, 5371, 5371, 1010, 25869, 13462, 25869, 13462, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 2709, 11968, 3366, 16429, 3501, 1006, 5371, 16416, 4063, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
handler/src/main/java/io/netty/handler/ssl/SslContextBuilder.java
SslContextBuilder.trustManager
public SslContextBuilder trustManager(X509Certificate... trustCertCollection) { this.trustCertCollection = trustCertCollection != null ? trustCertCollection.clone() : null; trustManagerFactory = null; return this; }
java
public SslContextBuilder trustManager(X509Certificate... trustCertCollection) { this.trustCertCollection = trustCertCollection != null ? trustCertCollection.clone() : null; trustManagerFactory = null; return this; }
[ "public", "SslContextBuilder", "trustManager", "(", "X509Certificate", "...", "trustCertCollection", ")", "{", "this", ".", "trustCertCollection", "=", "trustCertCollection", "!=", "null", "?", "trustCertCollection", ".", "clone", "(", ")", ":", "null", ";", "trustM...
Trusted certificates for verifying the remote endpoint's certificate, {@code null} uses the system default.
[ "Trusted", "certificates", "for", "verifying", "the", "remote", "endpoint", "s", "certificate", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslContextBuilder.java#L202-L206
train
Set the trust manager certificate collection.
[ 30522, 2270, 7020, 22499, 10111, 18413, 8569, 23891, 2099, 3404, 24805, 4590, 1006, 1060, 12376, 2683, 17119, 3775, 8873, 16280, 1012, 1012, 1012, 3404, 17119, 13535, 14511, 18491, 1007, 1063, 2023, 1012, 3404, 17119, 13535, 14511, 18491, 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...