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
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java
IoUtil.toStream
public static ByteArrayInputStream toStream(String content, Charset charset) { if (content == null) { return null; } return toStream(StrUtil.bytes(content, charset)); }
java
public static ByteArrayInputStream toStream(String content, Charset charset) { if (content == null) { return null; } return toStream(StrUtil.bytes(content, charset)); }
[ "public", "static", "ByteArrayInputStream", "toStream", "(", "String", "content", ",", "Charset", "charset", ")", "{", "if", "(", "content", "==", "null", ")", "{", "return", "null", ";", "}", "return", "toStream", "(", "StrUtil", ".", "bytes", "(", "conte...
String 转为流 @param content 内容 @param charset 编码 @return 字节流
[ "String", "转为流" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java#L750-L755
train
Converts a String to an InputStream.
[ 30522, 2270, 10763, 24880, 2906, 9447, 2378, 18780, 21422, 2000, 21422, 1006, 5164, 4180, 1010, 25869, 13462, 25869, 13462, 1007, 1063, 2065, 1006, 4180, 1027, 1027, 19701, 1007, 1063, 2709, 19701, 1025, 1065, 2709, 2000, 21422, 1006, 2358, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java
ReactiveCloudFoundrySecurityService.getAccessLevel
public Mono<AccessLevel> getAccessLevel(String token, String applicationId) throws CloudFoundryAuthorizationException { String uri = getPermissionsUri(applicationId); return this.webClient.get().uri(uri).header("Authorization", "bearer " + token) .retrieve().bodyToMono(Map.class).map(this::getAccessLevel) ...
java
public Mono<AccessLevel> getAccessLevel(String token, String applicationId) throws CloudFoundryAuthorizationException { String uri = getPermissionsUri(applicationId); return this.webClient.get().uri(uri).header("Authorization", "bearer " + token) .retrieve().bodyToMono(Map.class).map(this::getAccessLevel) ...
[ "public", "Mono", "<", "AccessLevel", ">", "getAccessLevel", "(", "String", "token", ",", "String", "applicationId", ")", "throws", "CloudFoundryAuthorizationException", "{", "String", "uri", "=", "getPermissionsUri", "(", "applicationId", ")", ";", "return", "this"...
Return a Mono of the access level that should be granted to the given token. @param token the token @param applicationId the cloud foundry application ID @return a Mono of the access level that should be granted @throws CloudFoundryAuthorizationException if the token is not authorized
[ "Return", "a", "Mono", "of", "the", "access", "level", "that", "should", "be", "granted", "to", "the", "given", "token", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java#L86-L92
train
Get the access level for the given token.
[ 30522, 2270, 18847, 1026, 3229, 20414, 2884, 1028, 2131, 6305, 9623, 25016, 15985, 1006, 5164, 19204, 1010, 5164, 4646, 3593, 1007, 11618, 6112, 14876, 8630, 20444, 14317, 10050, 9276, 10288, 24422, 1063, 5164, 24471, 2072, 1027, 2131, 4842, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/api/window/TimeWindow.java
TimeWindow.modInverse
private int modInverse(int x) { // Cube gives inverse mod 2^4, as x^4 == 1 (mod 2^4) for all odd x. int inverse = x * x * x; // Newton iteration doubles correct bits at each step. inverse *= 2 - x * inverse; inverse *= 2 - x * inverse; inverse *= 2 - x * inverse; return inverse; }
java
private int modInverse(int x) { // Cube gives inverse mod 2^4, as x^4 == 1 (mod 2^4) for all odd x. int inverse = x * x * x; // Newton iteration doubles correct bits at each step. inverse *= 2 - x * inverse; inverse *= 2 - x * inverse; inverse *= 2 - x * inverse; return inverse; }
[ "private", "int", "modInverse", "(", "int", "x", ")", "{", "// Cube gives inverse mod 2^4, as x^4 == 1 (mod 2^4) for all odd x.", "int", "inverse", "=", "x", "*", "x", "*", "x", ";", "// Newton iteration doubles correct bits at each step.", "inverse", "*=", "2", "-", "x...
Compute the inverse of (odd) x mod 2^32.
[ "Compute", "the", "inverse", "of", "(", "odd", ")", "x", "mod", "2^32", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/api/window/TimeWindow.java#L102-L110
train
Returns the inverse of x mod 2^4.
[ 30522, 2797, 20014, 16913, 2378, 16070, 1006, 20014, 1060, 1007, 1063, 1013, 1013, 14291, 3957, 19262, 16913, 1016, 1034, 1018, 1010, 2004, 1060, 1034, 1018, 1027, 1027, 1015, 1006, 16913, 1016, 1034, 1018, 1007, 2005, 2035, 5976, 1060, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/algorithm/ahocorasick/trie/Trie.java
Trie.remainLongest
private static void remainLongest(Collection<Emit> collectedEmits) { if (collectedEmits.size() < 2) return; Map<Integer, Emit> emitMapStart = new TreeMap<Integer, Emit>(); for (Emit emit : collectedEmits) { Emit pre = emitMapStart.get(emit.getStart()); if (pre...
java
private static void remainLongest(Collection<Emit> collectedEmits) { if (collectedEmits.size() < 2) return; Map<Integer, Emit> emitMapStart = new TreeMap<Integer, Emit>(); for (Emit emit : collectedEmits) { Emit pre = emitMapStart.get(emit.getStart()); if (pre...
[ "private", "static", "void", "remainLongest", "(", "Collection", "<", "Emit", ">", "collectedEmits", ")", "{", "if", "(", "collectedEmits", ".", "size", "(", ")", "<", "2", ")", "return", ";", "Map", "<", "Integer", ",", "Emit", ">", "emitMapStart", "=",...
只保留最长词 @param collectedEmits
[ "只保留最长词" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/algorithm/ahocorasick/trie/Trie.java#L168-L198
train
remainLongest method.
[ 30522, 2797, 10763, 11675, 3961, 10052, 4355, 1006, 3074, 1026, 12495, 2102, 1028, 5067, 23238, 3215, 1007, 1063, 2065, 1006, 5067, 23238, 3215, 1012, 2946, 1006, 1007, 1026, 1016, 1007, 2709, 1025, 4949, 1026, 16109, 1010, 12495, 2102, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/core/memory/DataOutputSerializer.java
DataOutputSerializer.write
@Override public void write(int b) throws IOException { if (this.position >= this.buffer.length) { resize(1); } this.buffer[this.position++] = (byte) (b & 0xff); }
java
@Override public void write(int b) throws IOException { if (this.position >= this.buffer.length) { resize(1); } this.buffer[this.position++] = (byte) (b & 0xff); }
[ "@", "Override", "public", "void", "write", "(", "int", "b", ")", "throws", "IOException", "{", "if", "(", "this", ".", "position", ">=", "this", ".", "buffer", ".", "length", ")", "{", "resize", "(", "1", ")", ";", "}", "this", ".", "buffer", "[",...
----------------------------------------------------------------------------------------
[ "----------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/memory/DataOutputSerializer.java#L133-L139
train
Writes a single byte to the output stream.
[ 30522, 1030, 2058, 15637, 2270, 11675, 4339, 1006, 20014, 1038, 1007, 11618, 22834, 10288, 24422, 1063, 2065, 1006, 2023, 1012, 2597, 1028, 1027, 2023, 1012, 17698, 1012, 3091, 1007, 1063, 24501, 4697, 1006, 1015, 1007, 1025, 1065, 2023, 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-runtime/src/main/java/org/apache/flink/runtime/operators/AllGroupReduceDriver.java
AllGroupReduceDriver.prepare
@Override public void prepare() throws Exception { final TaskConfig config = this.taskContext.getTaskConfig(); this.strategy = config.getDriverStrategy(); switch (this.strategy) { case ALL_GROUP_REDUCE_COMBINE: if (!(this.taskContext.getStub() instanceof GroupCombineFunction)) { throw new Exception(...
java
@Override public void prepare() throws Exception { final TaskConfig config = this.taskContext.getTaskConfig(); this.strategy = config.getDriverStrategy(); switch (this.strategy) { case ALL_GROUP_REDUCE_COMBINE: if (!(this.taskContext.getStub() instanceof GroupCombineFunction)) { throw new Exception(...
[ "@", "Override", "public", "void", "prepare", "(", ")", "throws", "Exception", "{", "final", "TaskConfig", "config", "=", "this", ".", "taskContext", ".", "getTaskConfig", "(", ")", ";", "this", ".", "strategy", "=", "config", ".", "getDriverStrategy", "(", ...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/AllGroupReduceDriver.java#L88-L114
train
Prepare the Driver.
[ 30522, 1030, 2058, 15637, 2270, 11675, 7374, 1006, 1007, 11618, 6453, 1063, 2345, 4708, 8663, 8873, 2290, 9530, 8873, 2290, 1027, 2023, 1012, 4708, 8663, 18209, 1012, 2131, 10230, 2243, 8663, 8873, 2290, 1006, 1007, 1025, 2023, 1012, 5656, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java
HttpHeaders.set
public HttpHeaders set(HttpHeaders headers) { checkNotNull(headers, "headers"); clear(); if (headers.isEmpty()) { return this; } for (Entry<String, String> entry : headers) { add(entry.getKey(), entry.getValue()); } return this; }
java
public HttpHeaders set(HttpHeaders headers) { checkNotNull(headers, "headers"); clear(); if (headers.isEmpty()) { return this; } for (Entry<String, String> entry : headers) { add(entry.getKey(), entry.getValue()); } return this; }
[ "public", "HttpHeaders", "set", "(", "HttpHeaders", "headers", ")", "{", "checkNotNull", "(", "headers", ",", "\"headers\"", ")", ";", "clear", "(", ")", ";", "if", "(", "headers", ".", "isEmpty", "(", ")", ")", "{", "return", "this", ";", "}", "for", ...
Cleans the current header entries and copies all header entries of the specified {@code headers}. @return {@code this}
[ "Cleans", "the", "current", "header", "entries", "and", "copies", "all", "header", "entries", "of", "the", "specified", "{", "@code", "headers", "}", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java#L1495-L1508
train
Sets the HTTP headers.
[ 30522, 2270, 8299, 4974, 2545, 2275, 1006, 8299, 4974, 2545, 20346, 2015, 1007, 1063, 4638, 17048, 11231, 3363, 1006, 20346, 2015, 1010, 1000, 20346, 2015, 1000, 1007, 1025, 3154, 1006, 1007, 1025, 2065, 1006, 20346, 2015, 1012, 2003, 6633,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/common/MutablePropertySources.java
MutablePropertySources.assertPresentAndGetIndex
private int assertPresentAndGetIndex(String name) { int index = this.propertySourceList.indexOf(PropertySource.named(name)); if (index == -1) { throw new IllegalArgumentException("PropertySource named '" + name + "' does not exist"); } return index; }
java
private int assertPresentAndGetIndex(String name) { int index = this.propertySourceList.indexOf(PropertySource.named(name)); if (index == -1) { throw new IllegalArgumentException("PropertySource named '" + name + "' does not exist"); } return index; }
[ "private", "int", "assertPresentAndGetIndex", "(", "String", "name", ")", "{", "int", "index", "=", "this", ".", "propertySourceList", ".", "indexOf", "(", "PropertySource", ".", "named", "(", "name", ")", ")", ";", "if", "(", "index", "==", "-", "1", ")...
Assert that the named property source is present and return its index. @param name {@linkplain PropertySource#getName() name of the property source} to find @throws IllegalArgumentException if the named property source is not present
[ "Assert", "that", "the", "named", "property", "source", "is", "present", "and", "return", "its", "index", "." ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/common/MutablePropertySources.java#L214-L220
train
Assert that a property source is present and has an index.
[ 30522, 2797, 20014, 20865, 28994, 4765, 5685, 18150, 22254, 10288, 1006, 5164, 2171, 1007, 1063, 20014, 5950, 1027, 2023, 1012, 3200, 6499, 3126, 29109, 2923, 1012, 5950, 11253, 1006, 3200, 6499, 3126, 3401, 1012, 2315, 1006, 2171, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/AhoCorasick/AhoCorasickDoubleArrayTrie.java
AhoCorasickDoubleArrayTrie.load
public boolean load(ByteArray byteArray, V[] value) { if (byteArray == null) return false; size = byteArray.nextInt(); base = new int[size + 65535]; // 多留一些,防止越界 check = new int[size + 65535]; fail = new int[size + 65535]; output = new int[size + 65535][]; i...
java
public boolean load(ByteArray byteArray, V[] value) { if (byteArray == null) return false; size = byteArray.nextInt(); base = new int[size + 65535]; // 多留一些,防止越界 check = new int[size + 65535]; fail = new int[size + 65535]; output = new int[size + 65535][]; i...
[ "public", "boolean", "load", "(", "ByteArray", "byteArray", ",", "V", "[", "]", "value", ")", "{", "if", "(", "byteArray", "==", "null", ")", "return", "false", ";", "size", "=", "byteArray", ".", "nextInt", "(", ")", ";", "base", "=", "new", "int", ...
载入 @param byteArray 一个字节数组 @param value 值数组 @return 成功与否
[ "载入" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/AhoCorasick/AhoCorasickDoubleArrayTrie.java#L247-L277
train
Load a single class from a ByteArray.
[ 30522, 2270, 22017, 20898, 7170, 1006, 24880, 2906, 9447, 24880, 2906, 9447, 1010, 1058, 1031, 1033, 3643, 1007, 1063, 2065, 1006, 24880, 2906, 9447, 1027, 1027, 19701, 1007, 2709, 6270, 1025, 2946, 1027, 24880, 2906, 9447, 1012, 2279, 1844...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/FixedLengthRecordSorter.java
FixedLengthRecordSorter.write
@Override public boolean write(T record) throws IOException { // check whether we need a new memory segment for the sort index if (this.currentSortBufferOffset > this.lastEntryOffset) { if (memoryAvailable()) { this.currentSortBufferSegment = nextMemorySegment(); this.sortBuffer.add(this.currentSortBuff...
java
@Override public boolean write(T record) throws IOException { // check whether we need a new memory segment for the sort index if (this.currentSortBufferOffset > this.lastEntryOffset) { if (memoryAvailable()) { this.currentSortBufferSegment = nextMemorySegment(); this.sortBuffer.add(this.currentSortBuff...
[ "@", "Override", "public", "boolean", "write", "(", "T", "record", ")", "throws", "IOException", "{", "// check whether we need a new memory segment for the sort index", "if", "(", "this", ".", "currentSortBufferOffset", ">", "this", ".", "lastEntryOffset", ")", "{", ...
Writes a given record to this sort buffer. The written record will be appended and take the last logical position. @param record The record to be written. @return True, if the record was successfully written, false, if the sort buffer was full. @throws IOException Thrown, if an error occurred while serializing the rec...
[ "Writes", "a", "given", "record", "to", "this", "sort", "buffer", ".", "The", "written", "record", "will", "be", "appended", "and", "take", "the", "last", "logical", "position", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/sort/FixedLengthRecordSorter.java#L223-L248
train
Write the record into the output stream.
[ 30522, 1030, 2058, 15637, 2270, 22017, 20898, 4339, 1006, 1056, 2501, 1007, 11618, 22834, 10288, 24422, 1063, 1013, 1013, 4638, 3251, 2057, 2342, 1037, 2047, 3638, 6903, 2005, 1996, 4066, 5950, 2065, 1006, 2023, 1012, 14731, 11589, 8569, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.writeJpg
public static void writeJpg(Image image, ImageOutputStream destImageStream) throws IORuntimeException { write(image, IMAGE_TYPE_JPG, destImageStream); }
java
public static void writeJpg(Image image, ImageOutputStream destImageStream) throws IORuntimeException { write(image, IMAGE_TYPE_JPG, destImageStream); }
[ "public", "static", "void", "writeJpg", "(", "Image", "image", ",", "ImageOutputStream", "destImageStream", ")", "throws", "IORuntimeException", "{", "write", "(", "image", ",", "IMAGE_TYPE_JPG", ",", "destImageStream", ")", ";", "}" ]
写出图像为JPG格式 @param image {@link Image} @param destImageStream 写出到的目标流 @throws IORuntimeException IO异常
[ "写出图像为JPG格式" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L1354-L1356
train
Write the JPG image to an image output stream.
[ 30522, 2270, 10763, 11675, 4339, 3501, 26952, 1006, 3746, 3746, 1010, 3746, 5833, 18780, 21422, 4078, 3775, 26860, 21422, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 4339, 1006, 3746, 1010, 3746, 1035, 2828, 1035, 16545, 2290, 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...
netty/netty
common/src/main/java/io/netty/util/internal/logging/Log4JLogger.java
Log4JLogger.warn
@Override public void warn(String msg) { logger.log(FQCN, Level.WARN, msg, null); }
java
@Override public void warn(String msg) { logger.log(FQCN, Level.WARN, msg, null); }
[ "@", "Override", "public", "void", "warn", "(", "String", "msg", ")", "{", "logger", ".", "log", "(", "FQCN", ",", "Level", ".", "WARN", ",", "msg", ",", "null", ")", ";", "}" ]
Log a message object at the WARN level. @param msg - the message object to be logged
[ "Log", "a", "message", "object", "at", "the", "WARN", "level", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/logging/Log4JLogger.java#L408-L411
train
Log a warning message.
[ 30522, 1030, 2058, 15637, 2270, 11675, 11582, 1006, 5164, 5796, 2290, 1007, 1063, 8833, 4590, 1012, 8833, 1006, 1042, 4160, 2278, 2078, 1010, 2504, 1012, 11582, 1010, 5796, 2290, 1010, 19701, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/tuple/Tuple5.java
Tuple5.copy
@Override @SuppressWarnings("unchecked") public Tuple5<T0, T1, T2, T3, T4> copy() { return new Tuple5<>(this.f0, this.f1, this.f2, this.f3, this.f4); }
java
@Override @SuppressWarnings("unchecked") public Tuple5<T0, T1, T2, T3, T4> copy() { return new Tuple5<>(this.f0, this.f1, this.f2, this.f3, this.f4); }
[ "@", "Override", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Tuple5", "<", "T0", ",", "T1", ",", "T2", ",", "T3", ",", "T4", ">", "copy", "(", ")", "{", "return", "new", "Tuple5", "<>", "(", "this", ".", "f0", ",", "this", ".", ...
Shallow tuple copy. @return A new Tuple with the same fields as this.
[ "Shallow", "tuple", "copy", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/tuple/Tuple5.java#L216-L224
train
Returns a copy of this tuple.
[ 30522, 1030, 2058, 15637, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 10722, 10814, 2629, 1026, 1056, 2692, 1010, 1056, 2487, 1010, 1056, 2475, 1010, 1056, 2509, 1010, 1056, 2549, 1028, 6100, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/datastream/PythonDataStream.java
PythonDataStream.key_by
public PythonKeyedStream key_by(KeySelector<PyObject, PyKey> selector) throws IOException { return new PythonKeyedStream(stream.keyBy(new PythonKeySelector(selector))); }
java
public PythonKeyedStream key_by(KeySelector<PyObject, PyKey> selector) throws IOException { return new PythonKeyedStream(stream.keyBy(new PythonKeySelector(selector))); }
[ "public", "PythonKeyedStream", "key_by", "(", "KeySelector", "<", "PyObject", ",", "PyKey", ">", "selector", ")", "throws", "IOException", "{", "return", "new", "PythonKeyedStream", "(", "stream", ".", "keyBy", "(", "new", "PythonKeySelector", "(", "selector", "...
A thin wrapper layer over {@link DataStream#keyBy(KeySelector)}. @param selector The KeySelector to be used for extracting the key for partitioning @return The {@link PythonDataStream} with partitioned state (i.e. {@link PythonKeyedStream})
[ "A", "thin", "wrapper", "layer", "over", "{", "@link", "DataStream#keyBy", "(", "KeySelector", ")", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/datastream/PythonDataStream.java#L135-L137
train
Key by.
[ 30522, 2270, 18750, 14839, 2098, 21422, 3145, 1035, 2011, 1006, 6309, 12260, 16761, 1026, 1052, 7677, 2497, 20614, 1010, 1052, 15922, 3240, 1028, 27000, 1007, 11618, 22834, 10288, 24422, 1063, 2709, 2047, 18750, 14839, 2098, 21422, 1006, 5460...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/operators/TwoInputUdfOperator.java
TwoInputUdfOperator.returns
public O returns(TypeHint<OUT> typeHint) { requireNonNull(typeHint, "TypeHint must not be null"); try { return returns(TypeInformation.of(typeHint)); } catch (InvalidTypesException e) { throw new InvalidTypesException("Cannot infer the type information from the type hint. " + "Make sure that the Typ...
java
public O returns(TypeHint<OUT> typeHint) { requireNonNull(typeHint, "TypeHint must not be null"); try { return returns(TypeInformation.of(typeHint)); } catch (InvalidTypesException e) { throw new InvalidTypesException("Cannot infer the type information from the type hint. " + "Make sure that the Typ...
[ "public", "O", "returns", "(", "TypeHint", "<", "OUT", ">", "typeHint", ")", "{", "requireNonNull", "(", "typeHint", ",", "\"TypeHint must not be null\"", ")", ";", "try", "{", "return", "returns", "(", "TypeInformation", ".", "of", "(", "typeHint", ")", ")"...
Adds a type information hint about the return type of this operator. This method can be used in cases where Flink cannot determine automatically what the produced type of a function is. That can be the case if the function uses generic type variables in the return type that cannot be inferred from the input type. <p>U...
[ "Adds", "a", "type", "information", "hint", "about", "the", "return", "type", "of", "this", "operator", ".", "This", "method", "can", "be", "used", "in", "cases", "where", "Flink", "cannot", "determine", "automatically", "what", "the", "produced", "type", "o...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/TwoInputUdfOperator.java#L297-L307
train
Returns the value of the method that is the type of the given type hint.
[ 30522, 2270, 1051, 5651, 1006, 2828, 10606, 2102, 1026, 2041, 1028, 2828, 10606, 2102, 1007, 1063, 5478, 8540, 11231, 3363, 1006, 2828, 10606, 2102, 1010, 1000, 2828, 10606, 2102, 2442, 2025, 2022, 19701, 1000, 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...
SeleniumHQ/selenium
java/server/src/org/openqa/grid/web/servlet/handler/RequestHandler.java
RequestHandler.waitForSessionBound
public void waitForSessionBound() throws InterruptedException, TimeoutException { // Maintain compatibility with Grid 1.x, which had the ability to // specify how long to wait before canceling a request. GridHubConfiguration configuration = getRegistry().getHub().getConfiguration(); Integer newSessionWa...
java
public void waitForSessionBound() throws InterruptedException, TimeoutException { // Maintain compatibility with Grid 1.x, which had the ability to // specify how long to wait before canceling a request. GridHubConfiguration configuration = getRegistry().getHub().getConfiguration(); Integer newSessionWa...
[ "public", "void", "waitForSessionBound", "(", ")", "throws", "InterruptedException", ",", "TimeoutException", "{", "// Maintain compatibility with Grid 1.x, which had the ability to", "// specify how long to wait before canceling a request.", "GridHubConfiguration", "configuration", "=",...
wait for the registry to match the request with a TestSlot. @throws InterruptedException Interrupted exception @throws TimeoutException if the request reaches the new session wait timeout before being assigned.
[ "wait", "for", "the", "registry", "to", "match", "the", "request", "with", "a", "TestSlot", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/server/src/org/openqa/grid/web/servlet/handler/RequestHandler.java#L189-L203
train
Wait until a session is bound.
[ 30522, 2270, 11675, 3524, 29278, 8583, 10992, 15494, 1006, 1007, 11618, 7153, 10288, 24422, 1010, 2051, 5833, 10288, 24422, 1063, 1013, 1013, 5441, 21778, 2007, 8370, 1015, 1012, 1060, 1010, 2029, 2018, 1996, 3754, 2000, 1013, 1013, 20648, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/SinkContextUtil.java
SinkContextUtil.forTimestamp
public static <T> SinkFunction.Context<T> forTimestamp(long timestamp) { return new SinkFunction.Context<T>() { @Override public long currentProcessingTime() { throw new RuntimeException("Not implemented"); } @Override public long currentWatermark() { throw new RuntimeException("Not implemente...
java
public static <T> SinkFunction.Context<T> forTimestamp(long timestamp) { return new SinkFunction.Context<T>() { @Override public long currentProcessingTime() { throw new RuntimeException("Not implemented"); } @Override public long currentWatermark() { throw new RuntimeException("Not implemente...
[ "public", "static", "<", "T", ">", "SinkFunction", ".", "Context", "<", "T", ">", "forTimestamp", "(", "long", "timestamp", ")", "{", "return", "new", "SinkFunction", ".", "Context", "<", "T", ">", "(", ")", "{", "@", "Override", "public", "long", "cur...
Creates a {@link SinkFunction.Context} that throws an exception when trying to access the current watermark or processing time.
[ "Creates", "a", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/SinkContextUtil.java#L33-L50
train
Returns a SinkFunction. Context that is a copy of the given timestamp.
[ 30522, 2270, 10763, 1026, 1056, 1028, 7752, 11263, 27989, 1012, 6123, 1026, 1056, 1028, 3481, 14428, 9153, 8737, 1006, 2146, 2335, 15464, 2361, 1007, 1063, 2709, 2047, 7752, 11263, 27989, 1012, 6123, 1026, 1056, 1028, 1006, 1007, 1063, 1030...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.stop
protected void stop(String[] args) throws Exception { LOG.info("Running 'stop-with-savepoint' command."); final Options commandOptions = CliFrontendParser.getStopCommandOptions(); final Options commandLineOptions = CliFrontendParser.mergeOptions(commandOptions, customCommandLineOptions); final CommandLine comm...
java
protected void stop(String[] args) throws Exception { LOG.info("Running 'stop-with-savepoint' command."); final Options commandOptions = CliFrontendParser.getStopCommandOptions(); final Options commandLineOptions = CliFrontendParser.mergeOptions(commandOptions, customCommandLineOptions); final CommandLine comm...
[ "protected", "void", "stop", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "LOG", ".", "info", "(", "\"Running 'stop-with-savepoint' command.\"", ")", ";", "final", "Options", "commandOptions", "=", "CliFrontendParser", ".", "getStopCommandOption...
Executes the STOP action. @param args Command line arguments for the stop action.
[ "Executes", "the", "STOP", "action", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L501-L541
train
Stop the cluster with savepoint.
[ 30522, 5123, 11675, 2644, 1006, 5164, 1031, 1033, 12098, 5620, 1007, 11618, 6453, 1063, 8833, 1012, 18558, 1006, 1000, 2770, 1005, 2644, 1011, 2007, 1011, 3828, 8400, 1005, 3094, 1012, 1000, 1007, 1025, 2345, 7047, 15054, 16790, 2015, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java
AbstractAsymmetricCrypto.decrypt
public byte[] decrypt(InputStream data, KeyType keyType) throws IORuntimeException { return decrypt(IoUtil.readBytes(data), keyType); }
java
public byte[] decrypt(InputStream data, KeyType keyType) throws IORuntimeException { return decrypt(IoUtil.readBytes(data), keyType); }
[ "public", "byte", "[", "]", "decrypt", "(", "InputStream", "data", ",", "KeyType", "keyType", ")", "throws", "IORuntimeException", "{", "return", "decrypt", "(", "IoUtil", ".", "readBytes", "(", "data", ")", ",", "keyType", ")", ";", "}" ]
解密 @param data 被解密的bytes @param keyType 私钥或公钥 {@link KeyType} @return 解密后的bytes @throws IORuntimeException IO异常
[ "解密" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java#L234-L236
train
Decrypt the input stream.
[ 30522, 2270, 24880, 1031, 1033, 11703, 2854, 13876, 1006, 20407, 25379, 2951, 1010, 3145, 13874, 3145, 13874, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 2709, 11703, 2854, 13876, 1006, 22834, 21823, 2140, 1012, 3191, 3762, 4570, 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-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashTable.java
BinaryHashTable.clearPartitions
@Override public void clearPartitions() { // clear the iterators, so the next call to next() will notice this.bucketIterator = null; this.probeIterator = null; for (int i = this.partitionsBeingBuilt.size() - 1; i >= 0; --i) { final BinaryHashPartition p = this.partitionsBeingBuilt.get(i); try { p.cl...
java
@Override public void clearPartitions() { // clear the iterators, so the next call to next() will notice this.bucketIterator = null; this.probeIterator = null; for (int i = this.partitionsBeingBuilt.size() - 1; i >= 0; --i) { final BinaryHashPartition p = this.partitionsBeingBuilt.get(i); try { p.cl...
[ "@", "Override", "public", "void", "clearPartitions", "(", ")", "{", "// clear the iterators, so the next call to next() will notice", "this", ".", "bucketIterator", "=", "null", ";", "this", ".", "probeIterator", "=", "null", ";", "for", "(", "int", "i", "=", "th...
This method clears all partitions currently residing (partially) in memory. It releases all memory and deletes all spilled partitions. <p>This method is intended for a hard cleanup in the case that the join is aborted.
[ "This", "method", "clears", "all", "partitions", "currently", "residing", "(", "partially", ")", "in", "memory", ".", "It", "releases", "all", "memory", "and", "deletes", "all", "spilled", "partitions", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashTable.java#L588-L608
train
Clear the partitions.
[ 30522, 1030, 2058, 15637, 2270, 11675, 3154, 19362, 3775, 9285, 1006, 1007, 1063, 1013, 1013, 3154, 1996, 2009, 6906, 6591, 1010, 2061, 1996, 2279, 2655, 2000, 2279, 1006, 1007, 2097, 5060, 2023, 1012, 13610, 21646, 8844, 1027, 19701, 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-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java
BootstrapTools.parseDynamicProperties
public static Configuration parseDynamicProperties(CommandLine cmd) { final Configuration config = new Configuration(); String[] values = cmd.getOptionValues(DYNAMIC_PROPERTIES_OPT); if (values != null) { for (String value : values) { String[] pair = value.split("=", 2); if (pair.length == 1) { c...
java
public static Configuration parseDynamicProperties(CommandLine cmd) { final Configuration config = new Configuration(); String[] values = cmd.getOptionValues(DYNAMIC_PROPERTIES_OPT); if (values != null) { for (String value : values) { String[] pair = value.split("=", 2); if (pair.length == 1) { c...
[ "public", "static", "Configuration", "parseDynamicProperties", "(", "CommandLine", "cmd", ")", "{", "final", "Configuration", "config", "=", "new", "Configuration", "(", ")", ";", "String", "[", "]", "values", "=", "cmd", ".", "getOptionValues", "(", "DYNAMIC_PR...
Parse the dynamic properties (passed on the command line).
[ "Parse", "the", "dynamic", "properties", "(", "passed", "on", "the", "command", "line", ")", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java#L383-L400
train
Parses the dynamic properties from the command line.
[ 30522, 2270, 10763, 9563, 11968, 6924, 18279, 7712, 21572, 4842, 7368, 1006, 3094, 4179, 4642, 2094, 1007, 1063, 2345, 9563, 9530, 8873, 2290, 1027, 2047, 9563, 1006, 1007, 1025, 5164, 1031, 1033, 5300, 1027, 4642, 2094, 1012, 2131, 7361, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/sinks/TableSinkBase.java
TableSinkBase.configure
public final TableSink<T> configure(String[] fieldNames, TypeInformation<?>[] fieldTypes) { final TableSinkBase<T> configuredSink = this.copy(); configuredSink.fieldNames = Optional.of(fieldNames); configuredSink.fieldTypes = Optional.of(fieldTypes); return configuredSink; }
java
public final TableSink<T> configure(String[] fieldNames, TypeInformation<?>[] fieldTypes) { final TableSinkBase<T> configuredSink = this.copy(); configuredSink.fieldNames = Optional.of(fieldNames); configuredSink.fieldTypes = Optional.of(fieldTypes); return configuredSink; }
[ "public", "final", "TableSink", "<", "T", ">", "configure", "(", "String", "[", "]", "fieldNames", ",", "TypeInformation", "<", "?", ">", "[", "]", "fieldTypes", ")", "{", "final", "TableSinkBase", "<", "T", ">", "configuredSink", "=", "this", ".", "copy...
Returns a copy of this {@link TableSink} configured with the field names and types of the table to emit. @param fieldNames The field names of the table to emit. @param fieldTypes The field types of the table to emit. @return A copy of this {@link TableSink} configured with the field names and types of the table to emi...
[ "Returns", "a", "copy", "of", "this", "{", "@link", "TableSink", "}", "configured", "with", "the", "field", "names", "and", "types", "of", "the", "table", "to", "emit", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/sinks/TableSinkBase.java#L75-L82
train
Configure the sink to use the given field names and field types.
[ 30522, 2270, 2345, 7251, 19839, 1026, 1056, 1028, 9530, 8873, 27390, 2063, 1006, 5164, 1031, 1033, 2492, 18442, 2015, 1010, 2828, 2378, 14192, 3370, 1026, 1029, 1028, 1031, 1033, 2492, 13874, 2015, 1007, 1063, 2345, 7251, 19839, 15058, 1026...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java
SSLUtils.createInternalServerSSLEngineFactory
public static SSLHandlerFactory createInternalServerSSLEngineFactory(final Configuration config) throws Exception { SSLContext sslContext = createInternalSSLContext(config); if (sslContext == null) { throw new IllegalConfigurationException("SSL is not enabled for internal communication."); } return new SSLH...
java
public static SSLHandlerFactory createInternalServerSSLEngineFactory(final Configuration config) throws Exception { SSLContext sslContext = createInternalSSLContext(config); if (sslContext == null) { throw new IllegalConfigurationException("SSL is not enabled for internal communication."); } return new SSLH...
[ "public", "static", "SSLHandlerFactory", "createInternalServerSSLEngineFactory", "(", "final", "Configuration", "config", ")", "throws", "Exception", "{", "SSLContext", "sslContext", "=", "createInternalSSLContext", "(", "config", ")", ";", "if", "(", "sslContext", "=="...
Creates a SSLEngineFactory to be used by internal communication server endpoints.
[ "Creates", "a", "SSLEngineFactory", "to", "be", "used", "by", "internal", "communication", "server", "endpoints", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java#L113-L127
train
Creates an SSLHandlerFactory for internal communication with the server.
[ 30522, 2270, 10763, 7020, 2140, 11774, 3917, 21450, 3443, 18447, 11795, 9777, 2121, 14028, 25016, 3070, 3170, 21450, 1006, 2345, 9563, 9530, 8873, 2290, 1007, 11618, 6453, 1063, 7020, 22499, 10111, 18413, 7020, 22499, 10111, 18413, 1027, 3443...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.rotate
public static void rotate(Image image, int degree, ImageOutputStream out) throws IORuntimeException { writeJpg(rotate(image, degree), out); }
java
public static void rotate(Image image, int degree, ImageOutputStream out) throws IORuntimeException { writeJpg(rotate(image, degree), out); }
[ "public", "static", "void", "rotate", "(", "Image", "image", ",", "int", "degree", ",", "ImageOutputStream", "out", ")", "throws", "IORuntimeException", "{", "writeJpg", "(", "rotate", "(", "image", ",", "degree", ")", ",", "out", ")", ";", "}" ]
旋转图片为指定角度<br> 此方法不会关闭输出流,输出格式为JPG @param image 目标图像 @param degree 旋转角度 @param out 输出图像流 @since 3.2.2 @throws IORuntimeException IO异常
[ "旋转图片为指定角度<br", ">", "此方法不会关闭输出流,输出格式为JPG" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L1044-L1046
train
Write a rotate image to an output stream.
[ 30522, 2270, 10763, 11675, 24357, 1006, 3746, 3746, 1010, 20014, 3014, 1010, 3746, 5833, 18780, 21422, 2041, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 4339, 3501, 26952, 1006, 24357, 1006, 3746, 1010, 3014, 1007, 1010, 2041, 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/spark
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RetryingBlockFetcher.java
RetryingBlockFetcher.fetchAllOutstanding
private void fetchAllOutstanding() { // Start by retrieving our shared state within a synchronized block. String[] blockIdsToFetch; int numRetries; RetryingBlockFetchListener myListener; synchronized (this) { blockIdsToFetch = outstandingBlocksIds.toArray(new String[outstandingBlocksIds.size()...
java
private void fetchAllOutstanding() { // Start by retrieving our shared state within a synchronized block. String[] blockIdsToFetch; int numRetries; RetryingBlockFetchListener myListener; synchronized (this) { blockIdsToFetch = outstandingBlocksIds.toArray(new String[outstandingBlocksIds.size()...
[ "private", "void", "fetchAllOutstanding", "(", ")", "{", "// Start by retrieving our shared state within a synchronized block.", "String", "[", "]", "blockIdsToFetch", ";", "int", "numRetries", ";", "RetryingBlockFetchListener", "myListener", ";", "synchronized", "(", "this",...
Fires off a request to fetch all blocks that have not been fetched successfully or permanently failed (i.e., by a non-IOException).
[ "Fires", "off", "a", "request", "to", "fetch", "all", "blocks", "that", "have", "not", "been", "fetched", "successfully", "or", "permanently", "failed", "(", "i", ".", "e", ".", "by", "a", "non", "-", "IOException", ")", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RetryingBlockFetcher.java#L128-L154
train
Fetch all outstanding blocks.
[ 30522, 2797, 11675, 18584, 8095, 12166, 5794, 4667, 1006, 1007, 1063, 1013, 1013, 2707, 2011, 2128, 18886, 23559, 2256, 4207, 2110, 2306, 1037, 25549, 3796, 1012, 5164, 1031, 1033, 3796, 9821, 3406, 7959, 10649, 1025, 20014, 16371, 2213, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java
ThriftCLIServiceClient.getCatalogs
@Override public OperationHandle getCatalogs(SessionHandle sessionHandle) throws HiveSQLException { try { TGetCatalogsReq req = new TGetCatalogsReq(sessionHandle.toTSessionHandle()); TGetCatalogsResp resp = cliService.GetCatalogs(req); checkStatus(resp.getStatus()); TProtocolVersion protoc...
java
@Override public OperationHandle getCatalogs(SessionHandle sessionHandle) throws HiveSQLException { try { TGetCatalogsReq req = new TGetCatalogsReq(sessionHandle.toTSessionHandle()); TGetCatalogsResp resp = cliService.GetCatalogs(req); checkStatus(resp.getStatus()); TProtocolVersion protoc...
[ "@", "Override", "public", "OperationHandle", "getCatalogs", "(", "SessionHandle", "sessionHandle", ")", "throws", "HiveSQLException", "{", "try", "{", "TGetCatalogsReq", "req", "=", "new", "TGetCatalogsReq", "(", "sessionHandle", ".", "toTSessionHandle", "(", ")", ...
/* (non-Javadoc) @see org.apache.hive.service.cli.ICLIService#getCatalogs(org.apache.hive.service.cli.SessionHandle)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java#L171-L184
train
Get the catalog list for the given session handle.
[ 30522, 1030, 2058, 15637, 2270, 3169, 11774, 2571, 2131, 11266, 23067, 5620, 1006, 5219, 11774, 2571, 5219, 11774, 2571, 1007, 11618, 26736, 2015, 4160, 2571, 2595, 24422, 1063, 3046, 1063, 1056, 18150, 11266, 23067, 5620, 2890, 4160, 2128, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQLExample.java
JavaSparkSQLExample.main
public static void main(String[] args) throws AnalysisException { // $example on:init_session$ SparkSession spark = SparkSession .builder() .appName("Java Spark SQL basic example") .config("spark.some.config.option", "some-value") .getOrCreate(); // $example off:init_session$ ru...
java
public static void main(String[] args) throws AnalysisException { // $example on:init_session$ SparkSession spark = SparkSession .builder() .appName("Java Spark SQL basic example") .config("spark.some.config.option", "some-value") .getOrCreate(); // $example off:init_session$ ru...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "AnalysisException", "{", "// $example on:init_session$", "SparkSession", "spark", "=", "SparkSession", ".", "builder", "(", ")", ".", "appName", "(", "\"Java Spark SQL basic example...
$example off:create_ds$
[ "$example", "off", ":", "create_ds$" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQLExample.java#L88-L103
train
Demonstrates how to run the example on a Spark Session.
[ 30522, 2270, 10763, 11675, 2364, 1006, 5164, 1031, 1033, 12098, 5620, 1007, 11618, 4106, 10288, 24422, 1063, 1013, 1013, 1002, 2742, 2006, 1024, 1999, 4183, 1035, 5219, 1002, 12300, 7971, 3258, 12125, 1027, 12300, 7971, 3258, 1012, 12508, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
SqlValidatorImpl.checkConstraint
private void checkConstraint( SqlValidatorTable validatorTable, SqlUpdate update, RelDataType targetRowType) { final ModifiableViewTable modifiableViewTable = validatorTable.unwrap(ModifiableViewTable.class); if (modifiableViewTable != null) { final Table table = modifiableViewTable.unwrap(Table.class);...
java
private void checkConstraint( SqlValidatorTable validatorTable, SqlUpdate update, RelDataType targetRowType) { final ModifiableViewTable modifiableViewTable = validatorTable.unwrap(ModifiableViewTable.class); if (modifiableViewTable != null) { final Table table = modifiableViewTable.unwrap(Table.class);...
[ "private", "void", "checkConstraint", "(", "SqlValidatorTable", "validatorTable", ",", "SqlUpdate", "update", ",", "RelDataType", "targetRowType", ")", "{", "final", "ModifiableViewTable", "modifiableViewTable", "=", "validatorTable", ".", "unwrap", "(", "ModifiableViewTa...
Validates updates against the constraint of a modifiable view. @param validatorTable A {@link SqlValidatorTable} that may wrap a ModifiableViewTable @param update The UPDATE parse tree node @param targetRowType The target type
[ "Validates", "updates", "against", "the", "constraint", "of", "a", "modifiable", "view", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L4323-L4356
train
Check the constraint.
[ 30522, 2797, 11675, 4638, 8663, 20528, 18447, 1006, 29296, 10175, 8524, 25485, 3085, 9398, 8844, 10880, 1010, 29296, 6279, 13701, 10651, 1010, 2128, 15150, 29336, 18863, 4539, 10524, 13874, 1007, 1063, 2345, 16913, 10128, 19210, 8584, 10880, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.getUnconditionalClasses
public Set<String> getUnconditionalClasses() { Set<String> filtered = new HashSet<>(this.unconditionalClasses); filtered.removeAll(this.exclusions); return Collections.unmodifiableSet(filtered); }
java
public Set<String> getUnconditionalClasses() { Set<String> filtered = new HashSet<>(this.unconditionalClasses); filtered.removeAll(this.exclusions); return Collections.unmodifiableSet(filtered); }
[ "public", "Set", "<", "String", ">", "getUnconditionalClasses", "(", ")", "{", "Set", "<", "String", ">", "filtered", "=", "new", "HashSet", "<>", "(", "this", ".", "unconditionalClasses", ")", ";", "filtered", ".", "removeAll", "(", "this", ".", "exclusio...
Returns the names of the classes that were evaluated but were not conditional. @return the names of the unconditional classes
[ "Returns", "the", "names", "of", "the", "classes", "that", "were", "evaluated", "but", "were", "not", "conditional", "." ]
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#L149-L153
train
Returns a set of unconditional classes.
[ 30522, 2270, 2275, 1026, 5164, 1028, 2131, 4609, 8663, 27064, 26266, 2229, 1006, 1007, 1063, 2275, 1026, 5164, 1028, 21839, 1027, 2047, 23325, 13462, 1026, 1028, 1006, 2023, 1012, 4895, 8663, 27064, 26266, 2229, 1007, 1025, 21839, 1012, 636...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-optimizer/src/main/java/org/apache/flink/optimizer/plantranslate/JobGraphGenerator.java
JobGraphGenerator.postVisit
@Override public void postVisit(PlanNode node) { try { // --------- check special cases for which we handle post visit differently ---------- // skip data source node (they have no inputs) // also, do nothing for union nodes, we connect them later when gathering the inputs for a task // solution sets...
java
@Override public void postVisit(PlanNode node) { try { // --------- check special cases for which we handle post visit differently ---------- // skip data source node (they have no inputs) // also, do nothing for union nodes, we connect them later when gathering the inputs for a task // solution sets...
[ "@", "Override", "public", "void", "postVisit", "(", "PlanNode", "node", ")", "{", "try", "{", "// --------- check special cases for which we handle post visit differently ----------", "// skip data source node (they have no inputs)", "// also, do nothing for union nodes, we connect them...
This method implements the post-visit during the depth-first traversal. When the post visit happens, all of the descendants have been processed, so this method connects all of the current node's predecessors to the current node. @param node The node currently processed during the post-visit. @see org.apache.flink.util...
[ "This", "method", "implements", "the", "post", "-", "visit", "during", "the", "depth", "-", "first", "traversal", ".", "When", "the", "post", "visit", "happens", "all", "of", "the", "descendants", "have", "been", "processed", "so", "this", "method", "connect...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/plantranslate/JobGraphGenerator.java#L472-L657
train
This method is called after the node is visited.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2695, 11365, 4183, 1006, 2933, 3630, 3207, 13045, 1007, 1063, 3046, 1063, 1013, 1013, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 4638, 2569, 3572, 2005, 2029, 2057, 5047, 2695, 3942, 11543, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/PojoSerializerSnapshot.java
PojoSerializerSnapshot.newPojoSerializerIsCompatibleAfterMigration
private static <T> boolean newPojoSerializerIsCompatibleAfterMigration( PojoSerializer<T> newPojoSerializer, IntermediateCompatibilityResult<T> fieldSerializerCompatibility, IntermediateCompatibilityResult<T> preExistingRegistrationsCompatibility, LinkedOptionalMap<Field, TypeSerializerSnapshot<?>> fieldSer...
java
private static <T> boolean newPojoSerializerIsCompatibleAfterMigration( PojoSerializer<T> newPojoSerializer, IntermediateCompatibilityResult<T> fieldSerializerCompatibility, IntermediateCompatibilityResult<T> preExistingRegistrationsCompatibility, LinkedOptionalMap<Field, TypeSerializerSnapshot<?>> fieldSer...
[ "private", "static", "<", "T", ">", "boolean", "newPojoSerializerIsCompatibleAfterMigration", "(", "PojoSerializer", "<", "T", ">", "newPojoSerializer", ",", "IntermediateCompatibilityResult", "<", "T", ">", "fieldSerializerCompatibility", ",", "IntermediateCompatibilityResul...
Checks if the new {@link PojoSerializer} is compatible after migration.
[ "Checks", "if", "the", "new", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/PojoSerializerSnapshot.java#L345-L353
train
Checks if the new pojo serializer is compatible after migration.
[ 30522, 2797, 10763, 1026, 1056, 1028, 22017, 20898, 2047, 6873, 19929, 11610, 28863, 2483, 9006, 24952, 3468, 10354, 3334, 4328, 29397, 1006, 13433, 19929, 11610, 28863, 1026, 1056, 1028, 2047, 6873, 19929, 11610, 28863, 1010, 7783, 9006, 249...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker00.java
WebSocketClientHandshaker00.newHandshakeRequest
@Override protected FullHttpRequest newHandshakeRequest() { // Make keys int spaces1 = WebSocketUtil.randomNumber(1, 12); int spaces2 = WebSocketUtil.randomNumber(1, 12); int max1 = Integer.MAX_VALUE / spaces1; int max2 = Integer.MAX_VALUE / spaces2; int number1 = W...
java
@Override protected FullHttpRequest newHandshakeRequest() { // Make keys int spaces1 = WebSocketUtil.randomNumber(1, 12); int spaces2 = WebSocketUtil.randomNumber(1, 12); int max1 = Integer.MAX_VALUE / spaces1; int max2 = Integer.MAX_VALUE / spaces2; int number1 = W...
[ "@", "Override", "protected", "FullHttpRequest", "newHandshakeRequest", "(", ")", "{", "// Make keys", "int", "spaces1", "=", "WebSocketUtil", ".", "randomNumber", "(", "1", ",", "12", ")", ";", "int", "spaces2", "=", "WebSocketUtil", ".", "randomNumber", "(", ...
<p> Sends the opening request to the server: </p> <pre> GET /demo HTTP/1.1 Upgrade: WebSocket Connection: Upgrade Host: example.com Origin: http://example.com Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5 Sec-WebSocket-Key2: 12998 5 Y3 1 .P00 ^n:ds[4U </pre>
[ "<p", ">", "Sends", "the", "opening", "request", "to", "the", "server", ":", "<", "/", "p", ">" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker00.java#L112-L180
train
Creates a new HTTP handshake request.
[ 30522, 1030, 2058, 15637, 5123, 2440, 11039, 25856, 2890, 15500, 2047, 11774, 7377, 5484, 2063, 15500, 1006, 1007, 1063, 1013, 1013, 2191, 6309, 20014, 7258, 2487, 1027, 4773, 6499, 19869, 8525, 3775, 2140, 1012, 6721, 19172, 5677, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/util/StringUtils.java
StringUtils.arrayAwareToString
public static String arrayAwareToString(Object o) { if (o == null) { return "null"; } if (o.getClass().isArray()) { return arrayToString(o); } return o.toString(); }
java
public static String arrayAwareToString(Object o) { if (o == null) { return "null"; } if (o.getClass().isArray()) { return arrayToString(o); } return o.toString(); }
[ "public", "static", "String", "arrayAwareToString", "(", "Object", "o", ")", "{", "if", "(", "o", "==", "null", ")", "{", "return", "\"null\"", ";", "}", "if", "(", "o", ".", "getClass", "(", ")", ".", "isArray", "(", ")", ")", "{", "return", "arra...
This method calls {@link Object#toString()} on the given object, unless the object is an array. In that case, it will use the {@link #arrayToString(Object)} method to create a string representation of the array that includes all contained elements. @param o The object for which to create the string representation. @re...
[ "This", "method", "calls", "{", "@link", "Object#toString", "()", "}", "on", "the", "given", "object", "unless", "the", "object", "is", "an", "array", ".", "In", "that", "case", "it", "will", "use", "the", "{", "@link", "#arrayToString", "(", "Object", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/StringUtils.java#L112-L121
train
Returns a string representation of an object.
[ 30522, 2270, 10763, 5164, 9140, 10830, 13465, 14122, 4892, 1006, 4874, 1051, 1007, 1063, 2065, 1006, 1051, 1027, 1027, 19701, 1007, 1063, 2709, 1000, 19701, 1000, 1025, 1065, 2065, 1006, 1051, 1012, 2131, 26266, 1006, 1007, 1012, 18061, 113...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec/src/main/java/io/netty/handler/codec/compression/Bzip2BlockDecompressor.java
Bzip2BlockDecompressor.decodeHuffmanData
boolean decodeHuffmanData(final Bzip2HuffmanStageDecoder huffmanDecoder) { final Bzip2BitReader reader = this.reader; final byte[] bwtBlock = this.bwtBlock; final byte[] huffmanSymbolMap = this.huffmanSymbolMap; final int streamBlockSize = this.bwtBlock.length; final int huffmanE...
java
boolean decodeHuffmanData(final Bzip2HuffmanStageDecoder huffmanDecoder) { final Bzip2BitReader reader = this.reader; final byte[] bwtBlock = this.bwtBlock; final byte[] huffmanSymbolMap = this.huffmanSymbolMap; final int streamBlockSize = this.bwtBlock.length; final int huffmanE...
[ "boolean", "decodeHuffmanData", "(", "final", "Bzip2HuffmanStageDecoder", "huffmanDecoder", ")", "{", "final", "Bzip2BitReader", "reader", "=", "this", ".", "reader", ";", "final", "byte", "[", "]", "bwtBlock", "=", "this", ".", "bwtBlock", ";", "final", "byte",...
Reads the Huffman encoded data from the input stream, performs Run-Length Decoding and applies the Move To Front transform to reconstruct the Burrows-Wheeler Transform array.
[ "Reads", "the", "Huffman", "encoded", "data", "from", "the", "input", "stream", "performs", "Run", "-", "Length", "Decoding", "and", "applies", "the", "Move", "To", "Front", "transform", "to", "reconstruct", "the", "Burrows", "-", "Wheeler", "Transform", "arra...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/compression/Bzip2BlockDecompressor.java#L171-L234
train
Decode the Huffman data.
[ 30522, 22017, 20898, 21933, 25383, 16093, 16715, 13832, 2696, 1006, 2345, 1038, 5831, 2361, 2475, 6979, 4246, 15154, 26702, 3207, 16044, 2099, 21301, 2386, 3207, 16044, 2099, 1007, 1063, 2345, 1038, 5831, 2361, 2475, 16313, 16416, 4063, 8068,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/types/Record.java
Record.updateBinaryRepresenation
public void updateBinaryRepresenation() { // check whether the binary state is in sync final int firstModified = this.firstModifiedPos; if (firstModified == Integer.MAX_VALUE) { return; } final InternalDeSerializer serializer = this.serializer; final int[] offsets = this.offsets; final int numFields...
java
public void updateBinaryRepresenation() { // check whether the binary state is in sync final int firstModified = this.firstModifiedPos; if (firstModified == Integer.MAX_VALUE) { return; } final InternalDeSerializer serializer = this.serializer; final int[] offsets = this.offsets; final int numFields...
[ "public", "void", "updateBinaryRepresenation", "(", ")", "{", "// check whether the binary state is in sync", "final", "int", "firstModified", "=", "this", ".", "firstModifiedPos", ";", "if", "(", "firstModified", "==", "Integer", ".", "MAX_VALUE", ")", "{", "return",...
Updates the binary representation of the data, such that it reflects the state of the currently stored fields. If the binary representation is already up to date, nothing happens. Otherwise, this function triggers the modified fields to serialize themselves into the records buffer and afterwards updates the offset tabl...
[ "Updates", "the", "binary", "representation", "of", "the", "data", "such", "that", "it", "reflects", "the", "state", "of", "the", "currently", "stored", "fields", ".", "If", "the", "binary", "representation", "is", "already", "up", "to", "date", "nothing", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/Record.java#L928-L1009
train
Update the binary represenation.
[ 30522, 2270, 11675, 10651, 21114, 2854, 2890, 28994, 8189, 3508, 1006, 1007, 1063, 1013, 1013, 4638, 3251, 1996, 12441, 2110, 2003, 1999, 26351, 2345, 20014, 2034, 5302, 4305, 10451, 1027, 2023, 1012, 2034, 5302, 4305, 10451, 6873, 2015, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-shardingsphere
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/state/node/StateNode.java
StateNode.getDataSourcesNodeFullPath
public String getDataSourcesNodeFullPath(final String schemaDataSourceName) { return Joiner.on("/").join("", name, ROOT, DATA_SOURCES_NODE_PATH, schemaDataSourceName); }
java
public String getDataSourcesNodeFullPath(final String schemaDataSourceName) { return Joiner.on("/").join("", name, ROOT, DATA_SOURCES_NODE_PATH, schemaDataSourceName); }
[ "public", "String", "getDataSourcesNodeFullPath", "(", "final", "String", "schemaDataSourceName", ")", "{", "return", "Joiner", ".", "on", "(", "\"/\"", ")", ".", "join", "(", "\"\"", ",", "name", ",", "ROOT", ",", "DATA_SOURCES_NODE_PATH", ",", "schemaDataSourc...
Get data source node full path. @param schemaDataSourceName schema name and data source name @return data source node full path
[ "Get", "data", "source", "node", "full", "path", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/state/node/StateNode.java#L65-L67
train
Get the full path of the data source node.
[ 30522, 2270, 5164, 2131, 2850, 10230, 8162, 9623, 3630, 3207, 3993, 14277, 8988, 1006, 2345, 5164, 8040, 28433, 2850, 10230, 8162, 27524, 14074, 1007, 1063, 2709, 3693, 2121, 1012, 2006, 1006, 1000, 1013, 1000, 1007, 1012, 3693, 1006, 1000,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
client-adapter/elasticsearch/src/main/java/com/alibaba/otter/canal/client/adapter/es/support/ESTemplate.java
ESTemplate.commit
public void commit() { if (getBulk().numberOfActions() > 0) { BulkResponse response = getBulk().execute().actionGet(); if (response.hasFailures()) { for (BulkItemResponse itemResponse : response.getItems()) { if (!itemResponse.isFailed()) { ...
java
public void commit() { if (getBulk().numberOfActions() > 0) { BulkResponse response = getBulk().execute().actionGet(); if (response.hasFailures()) { for (BulkItemResponse itemResponse : response.getItems()) { if (!itemResponse.isFailed()) { ...
[ "public", "void", "commit", "(", ")", "{", "if", "(", "getBulk", "(", ")", ".", "numberOfActions", "(", ")", ">", "0", ")", "{", "BulkResponse", "response", "=", "getBulk", "(", ")", ".", "execute", "(", ")", ".", "actionGet", "(", ")", ";", "if", ...
提交批次
[ "提交批次" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/elasticsearch/src/main/java/com/alibaba/otter/canal/client/adapter/es/support/ESTemplate.java#L197-L214
train
Commit the bulk operation.
[ 30522, 2270, 11675, 10797, 1006, 1007, 1063, 2065, 1006, 2131, 8569, 13687, 1006, 1007, 1012, 2193, 11253, 18908, 8496, 1006, 1007, 1028, 1014, 1007, 1063, 9625, 6072, 26029, 3366, 3433, 1027, 2131, 8569, 13687, 1006, 1007, 1012, 15389, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/shipping/OutputCollector.java
OutputCollector.getWriters
@SuppressWarnings("unchecked") public List<RecordWriter<SerializationDelegate<T>>> getWriters() { return Collections.unmodifiableList(Arrays.asList(this.writers)); }
java
@SuppressWarnings("unchecked") public List<RecordWriter<SerializationDelegate<T>>> getWriters() { return Collections.unmodifiableList(Arrays.asList(this.writers)); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "List", "<", "RecordWriter", "<", "SerializationDelegate", "<", "T", ">", ">", ">", "getWriters", "(", ")", "{", "return", "Collections", ".", "unmodifiableList", "(", "Arrays", ".", "asList", "(", ...
List of writers that are associated with this output collector @return list of writers
[ "List", "of", "writers", "that", "are", "associated", "with", "this", "output", "collector" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/shipping/OutputCollector.java#L93-L96
train
Returns a list of record writers.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 2862, 1026, 2501, 15994, 1026, 7642, 3989, 9247, 29107, 2618, 1026, 1056, 1028, 1028, 1028, 2131, 15994, 2015, 1006, 1007, 1063, 2709, 6407, 1012, 4895, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.setMaxParallelism
public StreamExecutionEnvironment setMaxParallelism(int maxParallelism) { Preconditions.checkArgument(maxParallelism > 0 && maxParallelism <= KeyGroupRangeAssignment.UPPER_BOUND_MAX_PARALLELISM, "maxParallelism is out of bounds 0 < maxParallelism <= " + KeyGroupRangeAssignment.UPPER_BOUND_MAX_PARALLEL...
java
public StreamExecutionEnvironment setMaxParallelism(int maxParallelism) { Preconditions.checkArgument(maxParallelism > 0 && maxParallelism <= KeyGroupRangeAssignment.UPPER_BOUND_MAX_PARALLELISM, "maxParallelism is out of bounds 0 < maxParallelism <= " + KeyGroupRangeAssignment.UPPER_BOUND_MAX_PARALLEL...
[ "public", "StreamExecutionEnvironment", "setMaxParallelism", "(", "int", "maxParallelism", ")", "{", "Preconditions", ".", "checkArgument", "(", "maxParallelism", ">", "0", "&&", "maxParallelism", "<=", "KeyGroupRangeAssignment", ".", "UPPER_BOUND_MAX_PARALLELISM", ",", "...
Sets the maximum degree of parallelism defined for the program. The upper limit (inclusive) is Short.MAX_VALUE. <p>The maximum degree of parallelism specifies the upper limit for dynamic scaling. It also defines the number of key groups used for partitioned state. @param maxParallelism Maximum degree of parallelism t...
[ "Sets", "the", "maximum", "degree", "of", "parallelism", "defined", "for", "the", "program", ".", "The", "upper", "limit", "(", "inclusive", ")", "is", "Short", ".", "MAX_VALUE", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L191-L199
train
Sets the maximum parallelism for this environment.
[ 30522, 2270, 5460, 10288, 8586, 13700, 2368, 21663, 2239, 3672, 2275, 17848, 28689, 6216, 28235, 1006, 20014, 4098, 28689, 6216, 28235, 1007, 1063, 3653, 8663, 20562, 2015, 1012, 4638, 2906, 22850, 4765, 1006, 4098, 28689, 6216, 28235, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getDouble
@PublicEvolving public double getDouble(ConfigOption<Double> configOption, double overrideDefault) { Object o = getRawValueFromOption(configOption); if (o == null) { return overrideDefault; } return convertToDouble(o, configOption.defaultValue()); }
java
@PublicEvolving public double getDouble(ConfigOption<Double> configOption, double overrideDefault) { Object o = getRawValueFromOption(configOption); if (o == null) { return overrideDefault; } return convertToDouble(o, configOption.defaultValue()); }
[ "@", "PublicEvolving", "public", "double", "getDouble", "(", "ConfigOption", "<", "Double", ">", "configOption", ",", "double", "overrideDefault", ")", "{", "Object", "o", "=", "getRawValueFromOption", "(", "configOption", ")", ";", "if", "(", "o", "==", "null...
Returns the value associated with the given config option as a {@code double}. If no value is mapped under any key of the option, it returns the specified default instead of the option's default value. @param configOption The configuration option @param overrideDefault The value to return if no value was mapper for an...
[ "Returns", "the", "value", "associated", "with", "the", "given", "config", "option", "as", "a", "{", "@code", "double", "}", ".", "If", "no", "value", "is", "mapped", "under", "any", "key", "of", "the", "option", "it", "returns", "the", "specified", "def...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L530-L537
train
Returns the value associated with the given config option as a double.
[ 30522, 1030, 2270, 6777, 4747, 6455, 2270, 3313, 2131, 26797, 3468, 1006, 9530, 8873, 3995, 16790, 1026, 3313, 1028, 9530, 8873, 3995, 16790, 1010, 3313, 2058, 15637, 3207, 7011, 11314, 1007, 1063, 4874, 1051, 1027, 2131, 2527, 2860, 10175,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java
RestClusterClient.getWebInterfaceURL
@Override public String getWebInterfaceURL() { try { return getWebMonitorBaseUrl().get().toString(); } catch (InterruptedException | ExecutionException e) { ExceptionUtils.checkInterrupted(e); log.warn("Could not retrieve the web interface URL for the cluster.", e); return "Unknown address."; } }
java
@Override public String getWebInterfaceURL() { try { return getWebMonitorBaseUrl().get().toString(); } catch (InterruptedException | ExecutionException e) { ExceptionUtils.checkInterrupted(e); log.warn("Could not retrieve the web interface URL for the cluster.", e); return "Unknown address."; } }
[ "@", "Override", "public", "String", "getWebInterfaceURL", "(", ")", "{", "try", "{", "return", "getWebMonitorBaseUrl", "(", ")", ".", "get", "(", ")", ".", "toString", "(", ")", ";", "}", "catch", "(", "InterruptedException", "|", "ExecutionException", "e",...
======================================
[ "======================================" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java#L615-L625
train
Returns the URL of the web interface that is used to connect to the cluster.
[ 30522, 1030, 2058, 15637, 2270, 5164, 2131, 8545, 8428, 3334, 12172, 3126, 2140, 1006, 1007, 1063, 3046, 1063, 2709, 2131, 8545, 25526, 10698, 4263, 15058, 3126, 2140, 1006, 1007, 1012, 2131, 1006, 1007, 1012, 2000, 3367, 4892, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/router/Router.java
Router.route
public RouteResult<T> route(HttpMethod method, String path) { return route(method, path, Collections.emptyMap()); }
java
public RouteResult<T> route(HttpMethod method, String path) { return route(method, path, Collections.emptyMap()); }
[ "public", "RouteResult", "<", "T", ">", "route", "(", "HttpMethod", "method", ",", "String", "path", ")", "{", "return", "route", "(", "method", ",", "path", ",", "Collections", ".", "emptyMap", "(", ")", ")", ";", "}" ]
If there's no match, returns the result with {@link #notFound(Object) notFound} as the target if it is set, otherwise returns {@code null}.
[ "If", "there", "s", "no", "match", "returns", "the", "result", "with", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/router/Router.java#L218-L220
train
Route the request to the given path.
[ 30522, 2270, 2799, 6072, 11314, 1026, 1056, 1028, 2799, 1006, 8299, 11368, 6806, 2094, 4118, 1010, 5164, 4130, 1007, 1063, 2709, 2799, 1006, 4118, 1010, 4130, 1010, 6407, 1012, 4064, 2863, 2361, 1006, 1007, 1007, 1025, 1065, 102, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec/src/main/java/io/netty/handler/codec/serialization/ClassResolvers.java
ClassResolvers.softCachingResolver
public static ClassResolver softCachingResolver(ClassLoader classLoader) { return new CachingClassResolver( new ClassLoaderClassResolver(defaultClassLoader(classLoader)), new SoftReferenceMap<String, Class<?>>(new HashMap<String, Reference<Class<?>>>())); }
java
public static ClassResolver softCachingResolver(ClassLoader classLoader) { return new CachingClassResolver( new ClassLoaderClassResolver(defaultClassLoader(classLoader)), new SoftReferenceMap<String, Class<?>>(new HashMap<String, Reference<Class<?>>>())); }
[ "public", "static", "ClassResolver", "softCachingResolver", "(", "ClassLoader", "classLoader", ")", "{", "return", "new", "CachingClassResolver", "(", "new", "ClassLoaderClassResolver", "(", "defaultClassLoader", "(", "classLoader", ")", ")", ",", "new", "SoftReferenceM...
aggressive non-concurrent cache good for non-shared cache, when we're not worried about class unloading @param classLoader - specific classLoader to use, or null if you want to revert to default @return new instance of class resolver
[ "aggressive", "non", "-", "concurrent", "cache", "good", "for", "non", "-", "shared", "cache", "when", "we", "re", "not", "worried", "about", "class", "unloading" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/serialization/ClassResolvers.java#L54-L58
train
Creates a class resolver that uses the default classloader.
[ 30522, 2270, 10763, 2465, 6072, 4747, 6299, 3730, 3540, 8450, 6072, 4747, 6299, 1006, 2465, 11066, 2121, 2465, 11066, 2121, 1007, 1063, 2709, 2047, 6187, 8450, 26266, 6072, 4747, 6299, 1006, 2047, 2465, 11066, 2121, 26266, 6072, 4747, 6299,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java
AbstractTrafficShapingHandler.setReadLimit
public void setReadLimit(long readLimit) { this.readLimit = readLimit; if (trafficCounter != null) { trafficCounter.resetAccounting(TrafficCounter.milliSecondFromNano()); } }
java
public void setReadLimit(long readLimit) { this.readLimit = readLimit; if (trafficCounter != null) { trafficCounter.resetAccounting(TrafficCounter.milliSecondFromNano()); } }
[ "public", "void", "setReadLimit", "(", "long", "readLimit", ")", "{", "this", ".", "readLimit", "=", "readLimit", ";", "if", "(", "trafficCounter", "!=", "null", ")", "{", "trafficCounter", ".", "resetAccounting", "(", "TrafficCounter", ".", "milliSecondFromNano...
<p>Note the change will be taken as best effort, meaning that all already scheduled traffics will not be changed, but only applied to new traffics.</p> <p>So the expected usage of this method is to be used not too often, accordingly to the traffic shaping configuration.</p> @param readLimit the readLimit to set
[ "<p", ">", "Note", "the", "change", "will", "be", "taken", "as", "best", "effort", "meaning", "that", "all", "already", "scheduled", "traffics", "will", "not", "be", "changed", "but", "only", "applied", "to", "new", "traffics", ".", "<", "/", "p", ">", ...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java#L312-L317
train
Sets the readLimit value.
[ 30522, 2270, 11675, 2275, 16416, 19422, 27605, 2102, 1006, 2146, 3191, 17960, 4183, 1007, 1063, 2023, 1012, 3191, 17960, 4183, 1027, 3191, 17960, 4183, 1025, 2065, 1006, 4026, 3597, 16671, 2121, 999, 1027, 19701, 1007, 1063, 4026, 3597, 166...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/URLUtil.java
URLUtil.encodeQuery
public static String encodeQuery(String url, String charset) throws UtilException { return encodeQuery(url, StrUtil.isBlank(charset) ? CharsetUtil.defaultCharset() : CharsetUtil.charset(charset)); }
java
public static String encodeQuery(String url, String charset) throws UtilException { return encodeQuery(url, StrUtil.isBlank(charset) ? CharsetUtil.defaultCharset() : CharsetUtil.charset(charset)); }
[ "public", "static", "String", "encodeQuery", "(", "String", "url", ",", "String", "charset", ")", "throws", "UtilException", "{", "return", "encodeQuery", "(", "url", ",", "StrUtil", ".", "isBlank", "(", "charset", ")", "?", "CharsetUtil", ".", "defaultCharset...
编码URL<br> 将需要转换的内容(ASCII码形式之外的内容),用十六进制表示法转换出来,并在之前加上%开头。<br> 此方法用于POST请求中的请求体自动编码,转义大部分特殊字符 @param url URL @param charset 编码 @return 编码后的URL @exception UtilException UnsupportedEncodingException
[ "编码URL<br", ">", "将需要转换的内容(ASCII码形式之外的内容),用十六进制表示法转换出来,并在之前加上%开头。<br", ">", "此方法用于POST请求中的请求体自动编码,转义大部分特殊字符" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/URLUtil.java#L332-L334
train
Encodes the given URL with the given charset.
[ 30522, 2270, 10763, 5164, 4372, 16044, 4226, 2854, 1006, 5164, 24471, 2140, 1010, 5164, 25869, 13462, 1007, 11618, 21183, 9463, 2595, 24422, 1063, 2709, 4372, 16044, 4226, 2854, 1006, 24471, 2140, 1010, 2358, 22134, 4014, 1012, 2003, 28522, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ObjectUtil.java
ObjectUtil.isEmpty
@SuppressWarnings("rawtypes") public static boolean isEmpty(Object obj) { if(null == obj) { return true; } if(obj instanceof CharSequence) { return StrUtil.isEmpty((CharSequence)obj); }else if(obj instanceof Map) { return MapUtil.isEmpty((Map)obj); }else if(obj instanceof Iterable) { ...
java
@SuppressWarnings("rawtypes") public static boolean isEmpty(Object obj) { if(null == obj) { return true; } if(obj instanceof CharSequence) { return StrUtil.isEmpty((CharSequence)obj); }else if(obj instanceof Map) { return MapUtil.isEmpty((Map)obj); }else if(obj instanceof Iterable) { ...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "static", "boolean", "isEmpty", "(", "Object", "obj", ")", "{", "if", "(", "null", "==", "obj", ")", "{", "return", "true", ";", "}", "if", "(", "obj", "instanceof", "CharSequence", ")", "{", ...
判断指定对象是否为空,支持: <pre> 1. CharSequence 2. Map 3. Iterable 4. Iterator 5. Array </pre> @param obj 被判断的对象 @return 是否为空,如果类型不支持,返回false @since 4.5.7
[ "判断指定对象是否为空,支持:" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ObjectUtil.java#L217-L236
train
Returns true if the specified object is empty.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 6315, 13874, 2015, 1000, 1007, 2270, 10763, 22017, 20898, 2003, 6633, 13876, 2100, 1006, 4874, 27885, 3501, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 27885, 3501, 1007, 1063, 2709, 2995, 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...
redisson/redisson
redisson/src/main/java/org/redisson/api/LocalCachedMapOptions.java
LocalCachedMapOptions.evictionPolicy
public LocalCachedMapOptions<K, V> evictionPolicy(EvictionPolicy evictionPolicy) { if (evictionPolicy == null) { throw new NullPointerException("evictionPolicy can't be null"); } this.evictionPolicy = evictionPolicy; return this; }
java
public LocalCachedMapOptions<K, V> evictionPolicy(EvictionPolicy evictionPolicy) { if (evictionPolicy == null) { throw new NullPointerException("evictionPolicy can't be null"); } this.evictionPolicy = evictionPolicy; return this; }
[ "public", "LocalCachedMapOptions", "<", "K", ",", "V", ">", "evictionPolicy", "(", "EvictionPolicy", "evictionPolicy", ")", "{", "if", "(", "evictionPolicy", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"evictionPolicy can't be null\"", ")"...
Sets eviction policy. @param evictionPolicy <p><code>LRU</code> - uses local cache with LRU (least recently used) eviction policy. <p><code>LFU</code> - uses local cache with LFU (least frequently used) eviction policy. <p><code>SOFT</code> - uses local cache with soft references. The garbage collector will evict item...
[ "Sets", "eviction", "policy", "." ]
d3acc0249b2d5d658d36d99e2c808ce49332ea44
https://github.com/redisson/redisson/blob/d3acc0249b2d5d658d36d99e2c808ce49332ea44/redisson/src/main/java/org/redisson/api/LocalCachedMapOptions.java#L216-L222
train
Sets the eviction policy.
[ 30522, 2270, 2334, 3540, 7690, 2863, 16340, 9285, 1026, 1047, 1010, 1058, 1028, 23408, 28097, 18155, 2594, 2100, 1006, 23408, 28097, 18155, 2594, 2100, 23408, 28097, 18155, 2594, 2100, 1007, 1063, 2065, 1006, 23408, 28097, 18155, 2594, 2100, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java
MysqlEventParser.doSwitch
public void doSwitch() { AuthenticationInfo newRunningInfo = (runningInfo.equals(masterInfo) ? standbyInfo : masterInfo); this.doSwitch(newRunningInfo); }
java
public void doSwitch() { AuthenticationInfo newRunningInfo = (runningInfo.equals(masterInfo) ? standbyInfo : masterInfo); this.doSwitch(newRunningInfo); }
[ "public", "void", "doSwitch", "(", ")", "{", "AuthenticationInfo", "newRunningInfo", "=", "(", "runningInfo", ".", "equals", "(", "masterInfo", ")", "?", "standbyInfo", ":", "masterInfo", ")", ";", "this", ".", "doSwitch", "(", "newRunningInfo", ")", ";", "}...
处理主备切换的逻辑
[ "处理主备切换的逻辑" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java#L276-L279
train
Switch to another session.
[ 30522, 2270, 11675, 9998, 9148, 10649, 1006, 1007, 1063, 27280, 2378, 14876, 2047, 15532, 5582, 2378, 14876, 1027, 1006, 2770, 2378, 14876, 1012, 19635, 1006, 3040, 2378, 14876, 1007, 1029, 3233, 3762, 2378, 14876, 1024, 3040, 2378, 14876, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/InstrumentedScheduledExecutorService.java
InstrumentedScheduledExecutorService.schedule
@Nonnull @Override public ScheduledFuture<?> schedule(@Nonnull Runnable command, long delay, @Nonnull TimeUnit unit) { scheduledOnce.mark(); return delegate.schedule(new InstrumentedRunnable(command), delay, unit); }
java
@Nonnull @Override public ScheduledFuture<?> schedule(@Nonnull Runnable command, long delay, @Nonnull TimeUnit unit) { scheduledOnce.mark(); return delegate.schedule(new InstrumentedRunnable(command), delay, unit); }
[ "@", "Nonnull", "@", "Override", "public", "ScheduledFuture", "<", "?", ">", "schedule", "(", "@", "Nonnull", "Runnable", "command", ",", "long", "delay", ",", "@", "Nonnull", "TimeUnit", "unit", ")", "{", "scheduledOnce", ".", "mark", "(", ")", ";", "re...
{@inheritDoc}
[ "{" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/metrics/src/main/java/io/dropwizard/metrics/InstrumentedScheduledExecutorService.java#L83-L88
train
Schedules a Runnable to be executed on the system.
[ 30522, 1030, 2512, 11231, 3363, 1030, 2058, 15637, 2270, 5115, 11263, 11244, 1026, 1029, 1028, 6134, 1006, 1030, 2512, 11231, 3363, 2448, 22966, 3094, 1010, 2146, 8536, 1010, 1030, 2512, 11231, 3363, 2051, 19496, 2102, 3131, 1007, 1063, 511...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBIncrementalRestoreOperation.java
RocksDBIncrementalRestoreOperation.restoreInstanceDirectoryFromPath
private void restoreInstanceDirectoryFromPath(Path source, String instanceRocksDBPath) throws IOException { FileSystem fileSystem = source.getFileSystem(); final FileStatus[] fileStatuses = fileSystem.listStatus(source); if (fileStatuses == null) { throw new IOException("Cannot list file statues. Directory ...
java
private void restoreInstanceDirectoryFromPath(Path source, String instanceRocksDBPath) throws IOException { FileSystem fileSystem = source.getFileSystem(); final FileStatus[] fileStatuses = fileSystem.listStatus(source); if (fileStatuses == null) { throw new IOException("Cannot list file statues. Directory ...
[ "private", "void", "restoreInstanceDirectoryFromPath", "(", "Path", "source", ",", "String", "instanceRocksDBPath", ")", "throws", "IOException", "{", "FileSystem", "fileSystem", "=", "source", ".", "getFileSystem", "(", ")", ";", "final", "FileStatus", "[", "]", ...
This recreates the new working directory of the recovered RocksDB instance and links/copies the contents from a local state.
[ "This", "recreates", "the", "new", "working", "directory", "of", "the", "recovered", "RocksDB", "instance", "and", "links", "/", "copies", "the", "contents", "from", "a", "local", "state", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBIncrementalRestoreOperation.java#L456-L479
train
Restore the instance directory from the source directory.
[ 30522, 2797, 11675, 9239, 7076, 26897, 4305, 2890, 16761, 2100, 19699, 25377, 8988, 1006, 4130, 3120, 1010, 5164, 6013, 16901, 16150, 2497, 15069, 1007, 11618, 22834, 10288, 24422, 1063, 6764, 27268, 6633, 6764, 27268, 6633, 1027, 3120, 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...
networknt/light-4j
utility/src/main/java/com/networknt/utility/Util.java
Util.getInetAddress
public static InetAddress getInetAddress() { InetAddress inetAddress = null; try { inetAddress = InetAddress.getLocalHost(); } catch (IOException ioe) { logger.error("Error in getting InetAddress", ioe); } return inetAddress; }
java
public static InetAddress getInetAddress() { InetAddress inetAddress = null; try { inetAddress = InetAddress.getLocalHost(); } catch (IOException ioe) { logger.error("Error in getting InetAddress", ioe); } return inetAddress; }
[ "public", "static", "InetAddress", "getInetAddress", "(", ")", "{", "InetAddress", "inetAddress", "=", "null", ";", "try", "{", "inetAddress", "=", "InetAddress", ".", "getLocalHost", "(", ")", ";", "}", "catch", "(", "IOException", "ioe", ")", "{", "logger"...
Get InetAddress @return The InetAddress object
[ "Get", "InetAddress" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/utility/src/main/java/com/networknt/utility/Util.java#L84-L92
train
Get the InetAddress of the current thread.
[ 30522, 2270, 10763, 1999, 12928, 14141, 8303, 2131, 3170, 17713, 16200, 4757, 1006, 1007, 1063, 1999, 12928, 14141, 8303, 1999, 12928, 14141, 8303, 1027, 19701, 1025, 3046, 1063, 1999, 12928, 14141, 8303, 1027, 1999, 12928, 14141, 8303, 1012,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ClassUtil.java
ClassUtil.invoke
public static <T> T invoke(String className, String methodName, boolean isSingleton, Object... args) { Class<Object> clazz = loadClass(className); try { final Method method = getDeclaredMethod(clazz, methodName, getClasses(args)); if (null == method) { throw new NoSuchMethodException(StrUtil.format("...
java
public static <T> T invoke(String className, String methodName, boolean isSingleton, Object... args) { Class<Object> clazz = loadClass(className); try { final Method method = getDeclaredMethod(clazz, methodName, getClasses(args)); if (null == method) { throw new NoSuchMethodException(StrUtil.format("...
[ "public", "static", "<", "T", ">", "T", "invoke", "(", "String", "className", ",", "String", "methodName", ",", "boolean", "isSingleton", ",", "Object", "...", "args", ")", "{", "Class", "<", "Object", ">", "clazz", "=", "loadClass", "(", "className", ")...
执行方法<br> 可执行Private方法,也可执行static方法<br> 执行非static方法时,必须满足对象有默认构造方法<br> @param <T> 对象类型 @param className 类名,完整类路径 @param methodName 方法名 @param isSingleton 是否为单例对象,如果此参数为false,每次执行方法时创建一个新对象 @param args 参数,必须严格对应指定方法的参数类型和数量 @return 返回结果
[ "执行方法<br", ">", "可执行Private方法,也可执行static方法<br", ">", "执行非static方法时,必须满足对象有默认构造方法<br", ">" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ClassUtil.java#L681-L696
train
Invoke a method on a class.
[ 30522, 2270, 10763, 1026, 30524, 1063, 2345, 4118, 4118, 1027, 2131, 3207, 20464, 12069, 22117, 11031, 7716, 1006, 18856, 10936, 2480, 1010, 4118, 18442, 1010, 2131, 26266, 2229, 1006, 12098, 5620, 1007, 1007, 1025, 2065, 1006, 19701, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/iterative/task/IterationSynchronizationSinkTask.java
IterationSynchronizationSinkTask.invoke
@Override public void invoke() throws Exception { this.headEventReader = new MutableRecordReader<>( getEnvironment().getInputGate(0), getEnvironment().getTaskManagerInfo().getTmpDirectories()); TaskConfig taskConfig = new TaskConfig(getTaskConfiguration()); // store all aggregators this.aggregators =...
java
@Override public void invoke() throws Exception { this.headEventReader = new MutableRecordReader<>( getEnvironment().getInputGate(0), getEnvironment().getTaskManagerInfo().getTmpDirectories()); TaskConfig taskConfig = new TaskConfig(getTaskConfiguration()); // store all aggregators this.aggregators =...
[ "@", "Override", "public", "void", "invoke", "(", ")", "throws", "Exception", "{", "this", ".", "headEventReader", "=", "new", "MutableRecordReader", "<>", "(", "getEnvironment", "(", ")", ".", "getInputGate", "(", "0", ")", ",", "getEnvironment", "(", ")", ...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/iterative/task/IterationSynchronizationSinkTask.java#L88-L163
train
This method is invoked by the TaskManagerImpl to initialize the object.
[ 30522, 1030, 2058, 15637, 2270, 11675, 1999, 6767, 3489, 1006, 1007, 11618, 6453, 1063, 2023, 1012, 2132, 18697, 3372, 16416, 4063, 1027, 2047, 14163, 10880, 2890, 27108, 16200, 9648, 2099, 1026, 1028, 1006, 2131, 2368, 21663, 2239, 3672, 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...
redisson/redisson
redisson/src/main/java/org/redisson/api/LocalCachedMapOptions.java
LocalCachedMapOptions.defaults
public static <K, V> LocalCachedMapOptions<K, V> defaults() { return new LocalCachedMapOptions<K, V>() .cacheSize(0).timeToLive(0).maxIdle(0) .evictionPolicy(EvictionPolicy.NONE) .reconnectionStrategy(ReconnectionStrategy.NONE) .syn...
java
public static <K, V> LocalCachedMapOptions<K, V> defaults() { return new LocalCachedMapOptions<K, V>() .cacheSize(0).timeToLive(0).maxIdle(0) .evictionPolicy(EvictionPolicy.NONE) .reconnectionStrategy(ReconnectionStrategy.NONE) .syn...
[ "public", "static", "<", "K", ",", "V", ">", "LocalCachedMapOptions", "<", "K", ",", "V", ">", "defaults", "(", ")", "{", "return", "new", "LocalCachedMapOptions", "<", "K", ",", "V", ">", "(", ")", ".", "cacheSize", "(", "0", ")", ".", "timeToLive",...
Creates a new instance of LocalCachedMapOptions with default options. <p> This is equivalent to: <pre> new LocalCachedMapOptions() .cacheSize(0).timeToLive(0).maxIdle(0) .evictionPolicy(EvictionPolicy.NONE) .invalidateEntryOnChange(true); </pre> @param <K> key type @param <V> value type @return LocalCachedMapOptions ...
[ "Creates", "a", "new", "instance", "of", "LocalCachedMapOptions", "with", "default", "options", ".", "<p", ">", "This", "is", "equivalent", "to", ":", "<pre", ">", "new", "LocalCachedMapOptions", "()", ".", "cacheSize", "(", "0", ")", ".", "timeToLive", "(",...
d3acc0249b2d5d658d36d99e2c808ce49332ea44
https://github.com/redisson/redisson/blob/d3acc0249b2d5d658d36d99e2c808ce49332ea44/redisson/src/main/java/org/redisson/api/LocalCachedMapOptions.java#L145-L151
train
Returns a new instance of the cache options.
[ 30522, 2270, 10763, 1026, 1047, 1010, 1058, 1028, 2334, 3540, 7690, 2863, 16340, 9285, 1026, 1047, 1010, 1058, 1028, 12398, 2015, 1006, 1007, 1063, 2709, 2047, 2334, 3540, 7690, 2863, 16340, 9285, 1026, 1047, 1010, 1058, 1028, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
ResourceManager.deregisterApplication
@Override public CompletableFuture<Acknowledge> deregisterApplication( final ApplicationStatus finalStatus, @Nullable final String diagnostics) { log.info("Shut down cluster because application is in {}, diagnostics {}.", finalStatus, diagnostics); try { internalDeregisterApplication(finalStatus, diagnos...
java
@Override public CompletableFuture<Acknowledge> deregisterApplication( final ApplicationStatus finalStatus, @Nullable final String diagnostics) { log.info("Shut down cluster because application is in {}, diagnostics {}.", finalStatus, diagnostics); try { internalDeregisterApplication(finalStatus, diagnos...
[ "@", "Override", "public", "CompletableFuture", "<", "Acknowledge", ">", "deregisterApplication", "(", "final", "ApplicationStatus", "finalStatus", ",", "@", "Nullable", "final", "String", "diagnostics", ")", "{", "log", ".", "info", "(", "\"Shut down cluster because ...
Cleanup application and shut down cluster. @param finalStatus of the Flink application @param diagnostics diagnostics message for the Flink application or {@code null}
[ "Cleanup", "application", "and", "shut", "down", "cluster", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java#L492-L505
train
Deregister an application from the cluster.
[ 30522, 1030, 2058, 15637, 2270, 4012, 10814, 10880, 11263, 11244, 1026, 13399, 1028, 4315, 13910, 12911, 29098, 19341, 3508, 1006, 2345, 5097, 29336, 2271, 4399, 29336, 2271, 1010, 1030, 19701, 3085, 2345, 5164, 16474, 2015, 1007, 1063, 8833,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/NFA.java
NFA.open
public void open(RuntimeContext cepRuntimeContext, Configuration conf) throws Exception { for (State<T> state : getStates()) { for (StateTransition<T> transition : state.getStateTransitions()) { IterativeCondition condition = transition.getCondition(); FunctionUtils.setFunctionRuntimeContext(condition, cep...
java
public void open(RuntimeContext cepRuntimeContext, Configuration conf) throws Exception { for (State<T> state : getStates()) { for (StateTransition<T> transition : state.getStateTransitions()) { IterativeCondition condition = transition.getCondition(); FunctionUtils.setFunctionRuntimeContext(condition, cep...
[ "public", "void", "open", "(", "RuntimeContext", "cepRuntimeContext", ",", "Configuration", "conf", ")", "throws", "Exception", "{", "for", "(", "State", "<", "T", ">", "state", ":", "getStates", "(", ")", ")", "{", "for", "(", "StateTransition", "<", "T",...
Initialization method for the NFA. It is called before any element is passed and thus suitable for one time setup work. @param cepRuntimeContext runtime context of the enclosing operator @param conf The configuration containing the parameters attached to the contract.
[ "Initialization", "method", "for", "the", "NFA", ".", "It", "is", "called", "before", "any", "element", "is", "passed", "and", "thus", "suitable", "for", "one", "time", "setup", "work", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java#L179-L187
train
Open the CEP function.
[ 30522, 2270, 11675, 2330, 1006, 2448, 7292, 8663, 18209, 8292, 18098, 16671, 14428, 8663, 18209, 1010, 9563, 9530, 2546, 1007, 11618, 6453, 1063, 2005, 1006, 2110, 1026, 1056, 1028, 2110, 1024, 4152, 12259, 2015, 1006, 1007, 1007, 1063, 200...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.convert
@Deprecated public static void convert(Image srcImage, String formatName, ImageOutputStream destImageStream) { convert(srcImage, formatName, destImageStream, false); }
java
@Deprecated public static void convert(Image srcImage, String formatName, ImageOutputStream destImageStream) { convert(srcImage, formatName, destImageStream, false); }
[ "@", "Deprecated", "public", "static", "void", "convert", "(", "Image", "srcImage", ",", "String", "formatName", ",", "ImageOutputStream", "destImageStream", ")", "{", "convert", "(", "srcImage", ",", "formatName", ",", "destImageStream", ",", "false", ")", ";",...
图像类型转换:GIF=》JPG、GIF=》PNG、PNG=》JPG、PNG=》GIF(X)、BMP=》PNG<br> 此方法并不关闭流 @param srcImage 源图像流 @param formatName 包含格式非正式名称的 String:如JPG、JPEG、GIF等 @param destImageStream 目标图像输出流 @since 3.0.9 @deprecated 请使用{@link #write(Image, String, ImageOutputStream)}
[ "图像类型转换:GIF", "=", "》JPG、GIF", "=", "》PNG、PNG", "=", "》JPG、PNG", "=", "》GIF", "(", "X", ")", "、BMP", "=", "》PNG<br", ">", "此方法并不关闭流" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L550-L553
train
Convert an image to an image output stream.
[ 30522, 1030, 2139, 28139, 12921, 2270, 10763, 11675, 10463, 1006, 3746, 5034, 6895, 26860, 1010, 5164, 4289, 18442, 1010, 3746, 5833, 18780, 21422, 4078, 3775, 26860, 21422, 1007, 1063, 10463, 1006, 5034, 6895, 26860, 1010, 4289, 18442, 1010,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/RestTemplateBuilder.java
RestTemplateBuilder.additionalInterceptors
public RestTemplateBuilder additionalInterceptors( ClientHttpRequestInterceptor... interceptors) { Assert.notNull(interceptors, "interceptors must not be null"); return additionalInterceptors(Arrays.asList(interceptors)); }
java
public RestTemplateBuilder additionalInterceptors( ClientHttpRequestInterceptor... interceptors) { Assert.notNull(interceptors, "interceptors must not be null"); return additionalInterceptors(Arrays.asList(interceptors)); }
[ "public", "RestTemplateBuilder", "additionalInterceptors", "(", "ClientHttpRequestInterceptor", "...", "interceptors", ")", "{", "Assert", ".", "notNull", "(", "interceptors", ",", "\"interceptors must not be null\"", ")", ";", "return", "additionalInterceptors", "(", "Arra...
Add additional {@link ClientHttpRequestInterceptor ClientHttpRequestInterceptors} that should be used with the {@link RestTemplate}. @param interceptors the interceptors to add @return a new builder instance @since 1.4.1 @see #interceptors(ClientHttpRequestInterceptor...)
[ "Add", "additional", "{" ]
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#L279-L283
train
Add additional interceptors to the rest template.
[ 30522, 2270, 2717, 18532, 15725, 8569, 23891, 2099, 3176, 18447, 2121, 3401, 13876, 5668, 1006, 7396, 11039, 25856, 2890, 15500, 18447, 2121, 3401, 13876, 2953, 1012, 1012, 1012, 24727, 2015, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/operators/base/PartitionOperatorBase.java
PartitionOperatorBase.executeOnCollections
@Override protected List<IN> executeOnCollections(List<IN> inputData, RuntimeContext runtimeContext, ExecutionConfig executionConfig) { return inputData; }
java
@Override protected List<IN> executeOnCollections(List<IN> inputData, RuntimeContext runtimeContext, ExecutionConfig executionConfig) { return inputData; }
[ "@", "Override", "protected", "List", "<", "IN", ">", "executeOnCollections", "(", "List", "<", "IN", ">", "inputData", ",", "RuntimeContext", "runtimeContext", ",", "ExecutionConfig", "executionConfig", ")", "{", "return", "inputData", ";", "}" ]
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/base/PartitionOperatorBase.java#L115-L118
train
Override this method to execute on collections.
[ 30522, 1030, 2058, 15637, 5123, 2862, 1026, 1999, 1028, 15389, 2239, 26895, 18491, 2015, 1006, 2862, 1026, 1999, 1028, 7953, 2850, 2696, 1010, 2448, 7292, 8663, 18209, 2448, 7292, 8663, 18209, 1010, 7781, 8663, 8873, 2290, 7781, 8663, 8873,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/classification/utilities/CollectionUtility.java
CollectionUtility.spiltArray
public static String[][] spiltArray(String[] src, double rate) { assert 0 <= rate && rate <= 1; String[][] output = new String[2][]; output[0] = new String[(int) (src.length * rate)]; output[1] = new String[src.length - output[0].length]; System.arraycopy(src, 0, output[0], 0...
java
public static String[][] spiltArray(String[] src, double rate) { assert 0 <= rate && rate <= 1; String[][] output = new String[2][]; output[0] = new String[(int) (src.length * rate)]; output[1] = new String[src.length - output[0].length]; System.arraycopy(src, 0, output[0], 0...
[ "public", "static", "String", "[", "]", "[", "]", "spiltArray", "(", "String", "[", "]", "src", ",", "double", "rate", ")", "{", "assert", "0", "<=", "rate", "&&", "rate", "<=", "1", ";", "String", "[", "]", "[", "]", "output", "=", "new", "Strin...
分割数组为两个数组 @param src 原数组 @param rate 第一个数组所占的比例 @return 两个数组
[ "分割数组为两个数组" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/classification/utilities/CollectionUtility.java#L69-L78
train
Spilt array.
[ 30522, 2270, 10763, 5164, 1031, 1033, 1031, 1033, 11867, 4014, 7559, 9447, 1006, 5164, 1031, 1033, 5034, 2278, 1010, 3313, 3446, 1007, 1063, 20865, 1014, 1026, 1027, 3446, 1004, 1004, 3446, 1026, 1027, 1015, 1025, 5164, 1031, 1033, 1031, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/mining/word2vec/TextFileCorpus.java
TextFileCorpus.reduceVocab
void reduceVocab() { table = new int[vocabSize]; int j = 0; for (int i = 0; i < vocabSize; i++) { if (vocab[i].cn > minReduce) { vocab[j].cn = vocab[i].cn; vocab[j].word = vocab[i].word; table[vocabIndexMap.get(v...
java
void reduceVocab() { table = new int[vocabSize]; int j = 0; for (int i = 0; i < vocabSize; i++) { if (vocab[i].cn > minReduce) { vocab[j].cn = vocab[i].cn; vocab[j].word = vocab[i].word; table[vocabIndexMap.get(v...
[ "void", "reduceVocab", "(", ")", "{", "table", "=", "new", "int", "[", "vocabSize", "]", ";", "int", "j", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "vocabSize", ";", "i", "++", ")", "{", "if", "(", "vocab", "[", "i", "...
Reduces the vocabulary by removing infrequent tokens
[ "Reduces", "the", "vocabulary", "by", "removing", "infrequent", "tokens" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/mining/word2vec/TextFileCorpus.java#L42-L99
train
Reduce the vocabulary by removing the most likely negative number of words from the cache file.
[ 30522, 11675, 5547, 6767, 3540, 2497, 1006, 1007, 1063, 2795, 1027, 2047, 20014, 1031, 29536, 3540, 5910, 4697, 1033, 1025, 20014, 1046, 1027, 1014, 1025, 2005, 1006, 20014, 1045, 1027, 1014, 1025, 1045, 1026, 29536, 3540, 5910, 4697, 1025,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/DescriptorProperties.java
DescriptorProperties.putProperties
public void putProperties(DescriptorProperties otherProperties) { for (Map.Entry<String, String> otherProperty : otherProperties.properties.entrySet()) { put(otherProperty.getKey(), otherProperty.getValue()); } }
java
public void putProperties(DescriptorProperties otherProperties) { for (Map.Entry<String, String> otherProperty : otherProperties.properties.entrySet()) { put(otherProperty.getKey(), otherProperty.getValue()); } }
[ "public", "void", "putProperties", "(", "DescriptorProperties", "otherProperties", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "otherProperty", ":", "otherProperties", ".", "properties", ".", "entrySet", "(", ")", ")", "{", ...
Adds a set of descriptor properties.
[ "Adds", "a", "set", "of", "descriptor", "properties", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/DescriptorProperties.java#L100-L104
train
Put properties from another descriptor properties.
[ 30522, 2270, 11675, 2404, 21572, 4842, 7368, 1006, 4078, 23235, 2953, 21572, 4842, 7368, 2060, 21572, 4842, 7368, 1007, 1063, 2005, 1006, 4949, 1012, 4443, 1026, 5164, 1010, 5164, 1028, 2060, 21572, 4842, 3723, 1024, 2060, 21572, 4842, 7368...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/core/fs/FileSystem.java
FileSystem.create
@Deprecated public FSDataOutputStream create(Path f, boolean overwrite) throws IOException { return create(f, overwrite ? WriteMode.OVERWRITE : WriteMode.NO_OVERWRITE); }
java
@Deprecated public FSDataOutputStream create(Path f, boolean overwrite) throws IOException { return create(f, overwrite ? WriteMode.OVERWRITE : WriteMode.NO_OVERWRITE); }
[ "@", "Deprecated", "public", "FSDataOutputStream", "create", "(", "Path", "f", ",", "boolean", "overwrite", ")", "throws", "IOException", "{", "return", "create", "(", "f", ",", "overwrite", "?", "WriteMode", ".", "OVERWRITE", ":", "WriteMode", ".", "NO_OVERWR...
Opens an FSDataOutputStream at the indicated Path. @param f the file name to open @param overwrite if a file with this name already exists, then if true, the file will be overwritten, and if false an error will be thrown. @throws IOException Thrown, if the stream could not be opened because of an I/O, or because a fi...
[ "Opens", "an", "FSDataOutputStream", "at", "the", "indicated", "Path", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/fs/FileSystem.java#L669-L672
train
Create a file with the specified path.
[ 30522, 1030, 2139, 28139, 12921, 2270, 1042, 16150, 6790, 5833, 18780, 21422, 30524, 1007, 11618, 22834, 10288, 24422, 1063, 2709, 3443, 1006, 1042, 1010, 2058, 26373, 1029, 4339, 5302, 3207, 1012, 2058, 26373, 1024, 4339, 5302, 3207, 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
common/src/main/java/io/netty/util/AsciiString.java
AsciiString.endsWith
public boolean endsWith(CharSequence suffix) { int suffixLen = suffix.length(); return regionMatches(length() - suffixLen, suffix, 0, suffixLen); }
java
public boolean endsWith(CharSequence suffix) { int suffixLen = suffix.length(); return regionMatches(length() - suffixLen, suffix, 0, suffixLen); }
[ "public", "boolean", "endsWith", "(", "CharSequence", "suffix", ")", "{", "int", "suffixLen", "=", "suffix", ".", "length", "(", ")", ";", "return", "regionMatches", "(", "length", "(", ")", "-", "suffixLen", ",", "suffix", ",", "0", ",", "suffixLen", ")...
Compares the specified string to this string to determine if the specified string is a suffix. @param suffix the suffix to look for. @return {@code true} if the specified string is a suffix of this string, {@code false} otherwise. @throws NullPointerException if {@code suffix} is {@code null}.
[ "Compares", "the", "specified", "string", "to", "this", "string", "to", "determine", "if", "the", "specified", "string", "is", "a", "suffix", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/AsciiString.java#L512-L515
train
Returns true if this sequence ends with the specified sequence.
[ 30522, 2270, 22017, 20898, 4515, 24415, 1006, 25869, 3366, 4226, 5897, 16809, 1007, 1063, 20014, 16809, 7770, 1027, 16809, 1012, 3091, 1006, 1007, 1025, 2709, 2555, 18900, 8376, 1006, 3091, 1006, 1007, 1011, 16809, 7770, 1010, 16809, 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-core/src/main/java/org/apache/flink/core/memory/DataInputDeserializer.java
DataInputDeserializer.setBuffer
public void setBuffer(@Nonnull ByteBuffer buffer) { if (buffer.hasArray()) { this.buffer = buffer.array(); this.position = buffer.arrayOffset() + buffer.position(); this.end = this.position + buffer.remaining(); } else if (buffer.isDirect() || buffer.isReadOnly()) { // TODO: FLINK-8585 handle readonly a...
java
public void setBuffer(@Nonnull ByteBuffer buffer) { if (buffer.hasArray()) { this.buffer = buffer.array(); this.position = buffer.arrayOffset() + buffer.position(); this.end = this.position + buffer.remaining(); } else if (buffer.isDirect() || buffer.isReadOnly()) { // TODO: FLINK-8585 handle readonly a...
[ "public", "void", "setBuffer", "(", "@", "Nonnull", "ByteBuffer", "buffer", ")", "{", "if", "(", "buffer", ".", "hasArray", "(", ")", ")", "{", "this", ".", "buffer", "=", "buffer", ".", "array", "(", ")", ";", "this", ".", "position", "=", "buffer",...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/memory/DataInputDeserializer.java#L68-L83
train
Sets the buffer.
[ 30522, 2270, 11675, 2275, 8569, 12494, 1006, 1030, 2512, 11231, 3363, 24880, 8569, 12494, 17698, 1007, 1063, 2065, 1006, 17698, 1012, 2038, 2906, 9447, 1006, 1007, 1007, 1063, 2023, 1012, 17698, 1027, 17698, 1012, 9140, 1006, 1007, 1025, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-cron/src/main/java/cn/hutool/cron/listener/TaskListenerManager.java
TaskListenerManager.notifyTaskFailed
public void notifyTaskFailed(TaskExecutor executor, Throwable exception) { synchronized (listeners) { int size = listeners.size(); if(size > 0){ for (int i = 0; i < size; i++) { TaskListener listenerl = listeners.get(i); listenerl.onFailed(executor, exception); } }else{ StaticL...
java
public void notifyTaskFailed(TaskExecutor executor, Throwable exception) { synchronized (listeners) { int size = listeners.size(); if(size > 0){ for (int i = 0; i < size; i++) { TaskListener listenerl = listeners.get(i); listenerl.onFailed(executor, exception); } }else{ StaticL...
[ "public", "void", "notifyTaskFailed", "(", "TaskExecutor", "executor", ",", "Throwable", "exception", ")", "{", "synchronized", "(", "listeners", ")", "{", "int", "size", "=", "listeners", ".", "size", "(", ")", ";", "if", "(", "size", ">", "0", ")", "{"...
通知所有监听任务启动器结束并失败<br> 无监听将打印堆栈到命令行 @param executor {@link TaskExecutor} @param exception 失败原因
[ "通知所有监听任务启动器结束并失败<br", ">", "无监听将打印堆栈到命令行" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-cron/src/main/java/cn/hutool/cron/listener/TaskListenerManager.java#L75-L87
train
Notifies all listeners that a task has failed.
[ 30522, 2270, 11675, 2025, 8757, 10230, 2243, 7011, 18450, 1006, 4708, 10288, 8586, 16161, 2099, 4654, 8586, 16161, 2099, 1010, 5466, 3085, 6453, 1007, 1063, 25549, 1006, 13810, 1007, 1063, 20014, 2946, 1027, 13810, 1012, 2946, 1006, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.createRemoteEnvironment
public static StreamExecutionEnvironment createRemoteEnvironment( String host, int port, Configuration clientConfig, String... jarFiles) { return new RemoteStreamEnvironment(host, port, clientConfig, jarFiles); }
java
public static StreamExecutionEnvironment createRemoteEnvironment( String host, int port, Configuration clientConfig, String... jarFiles) { return new RemoteStreamEnvironment(host, port, clientConfig, jarFiles); }
[ "public", "static", "StreamExecutionEnvironment", "createRemoteEnvironment", "(", "String", "host", ",", "int", "port", ",", "Configuration", "clientConfig", ",", "String", "...", "jarFiles", ")", "{", "return", "new", "RemoteStreamEnvironment", "(", "host", ",", "p...
Creates a {@link RemoteStreamEnvironment}. The remote environment sends (parts of) the program to a cluster for execution. Note that all file paths used in the program must be accessible from the cluster. The execution will use the specified parallelism. @param host The host name or address of the master (JobManager),...
[ "Creates", "a", "{", "@link", "RemoteStreamEnvironment", "}", ".", "The", "remote", "environment", "sends", "(", "parts", "of", ")", "the", "program", "to", "a", "cluster", "for", "execution", ".", "Note", "that", "all", "file", "paths", "used", "in", "the...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L1736-L1739
train
Create a remote environment.
[ 30522, 2270, 10763, 5460, 10288, 8586, 13700, 2368, 21663, 2239, 3672, 3443, 28578, 12184, 2368, 21663, 2239, 3672, 1006, 5164, 30524, 8663, 8873, 2290, 1010, 5164, 1012, 1012, 1012, 15723, 8873, 4244, 1007, 1063, 2709, 2047, 6556, 21422, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/model/perceptron/PerceptronLexicalAnalyzer.java
PerceptronLexicalAnalyzer.partOfSpeechTag
public String[] partOfSpeechTag(List<String> wordList) { if (posTagger == null) { throw new IllegalStateException("未提供词性标注模型"); } return tag(wordList); }
java
public String[] partOfSpeechTag(List<String> wordList) { if (posTagger == null) { throw new IllegalStateException("未提供词性标注模型"); } return tag(wordList); }
[ "public", "String", "[", "]", "partOfSpeechTag", "(", "List", "<", "String", ">", "wordList", ")", "{", "if", "(", "posTagger", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"未提供词性标注模型\");", "", "", "}", "return", "tag", "(", "w...
词性标注 @param wordList @return
[ "词性标注" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/perceptron/PerceptronLexicalAnalyzer.java#L116-L123
train
Part of speech tag.
[ 30522, 2270, 5164, 1031, 1033, 2112, 11253, 13102, 4402, 10143, 8490, 1006, 2862, 1026, 5164, 1028, 2773, 9863, 1007, 1063, 2065, 1006, 2695, 27609, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 6206, 9153, 17389, 2595, 24422, 1006, 1000, 100,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/heartbeat/HeartbeatServices.java
HeartbeatServices.fromConfiguration
public static HeartbeatServices fromConfiguration(Configuration configuration) { long heartbeatInterval = configuration.getLong(HeartbeatManagerOptions.HEARTBEAT_INTERVAL); long heartbeatTimeout = configuration.getLong(HeartbeatManagerOptions.HEARTBEAT_TIMEOUT); return new HeartbeatServices(heartbeatInterval, h...
java
public static HeartbeatServices fromConfiguration(Configuration configuration) { long heartbeatInterval = configuration.getLong(HeartbeatManagerOptions.HEARTBEAT_INTERVAL); long heartbeatTimeout = configuration.getLong(HeartbeatManagerOptions.HEARTBEAT_TIMEOUT); return new HeartbeatServices(heartbeatInterval, h...
[ "public", "static", "HeartbeatServices", "fromConfiguration", "(", "Configuration", "configuration", ")", "{", "long", "heartbeatInterval", "=", "configuration", ".", "getLong", "(", "HeartbeatManagerOptions", ".", "HEARTBEAT_INTERVAL", ")", ";", "long", "heartbeatTimeout...
Creates an HeartbeatServices instance from a {@link Configuration}. @param configuration Configuration to be used for the HeartbeatServices creation @return An HeartbeatServices instance created from the given configuration
[ "Creates", "an", "HeartbeatServices", "instance", "from", "a", "{", "@link", "Configuration", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/heartbeat/HeartbeatServices.java#L110-L116
train
Creates a heartbeat services instance from the given configuration.
[ 30522, 2270, 10763, 12251, 8043, 7903, 2229, 2013, 8663, 8873, 27390, 3370, 1006, 9563, 9563, 1007, 1063, 2146, 12251, 18447, 2121, 10175, 1027, 9563, 1012, 2131, 10052, 1006, 12251, 24805, 4590, 7361, 9285, 1012, 12251, 1035, 13483, 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-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.writeUtf8Map
public static File writeUtf8Map(Map<?, ?> map, File file, String kvSeparator, boolean isAppend) throws IORuntimeException { return FileWriter.create(file, CharsetUtil.CHARSET_UTF_8).writeMap(map, kvSeparator, isAppend); }
java
public static File writeUtf8Map(Map<?, ?> map, File file, String kvSeparator, boolean isAppend) throws IORuntimeException { return FileWriter.create(file, CharsetUtil.CHARSET_UTF_8).writeMap(map, kvSeparator, isAppend); }
[ "public", "static", "File", "writeUtf8Map", "(", "Map", "<", "?", ",", "?", ">", "map", ",", "File", "file", ",", "String", "kvSeparator", ",", "boolean", "isAppend", ")", "throws", "IORuntimeException", "{", "return", "FileWriter", ".", "create", "(", "fi...
将Map写入文件,每个键值对为一行,一行中键与值之间使用kvSeparator分隔 @param map Map @param file 文件 @param kvSeparator 键和值之间的分隔符,如果传入null使用默认分隔符" = " @param isAppend 是否追加 @return 目标文件 @throws IORuntimeException IO异常 @since 4.0.5
[ "将Map写入文件,每个键值对为一行,一行中键与值之间使用kvSeparator分隔" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L3086-L3088
train
Write UTF - 8 map to file.
[ 30522, 2270, 10763, 5371, 4339, 4904, 2546, 2620, 2863, 2361, 1006, 4949, 1026, 1029, 1010, 1029, 1028, 4949, 1010, 5371, 5371, 1010, 5164, 24888, 3366, 28689, 4263, 1010, 22017, 20898, 18061, 21512, 4859, 1007, 11618, 22834, 15532, 7292, 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-http/src/main/java/cn/hutool/http/HttpUtil.java
HttpUtil.get
public static String get(String urlString, Map<String, Object> paramMap) { return HttpRequest.get(urlString).form(paramMap).execute().body(); }
java
public static String get(String urlString, Map<String, Object> paramMap) { return HttpRequest.get(urlString).form(paramMap).execute().body(); }
[ "public", "static", "String", "get", "(", "String", "urlString", ",", "Map", "<", "String", ",", "Object", ">", "paramMap", ")", "{", "return", "HttpRequest", ".", "get", "(", "urlString", ")", ".", "form", "(", "paramMap", ")", ".", "execute", "(", ")...
发送get请求 @param urlString 网址 @param paramMap post表单数据 @return 返回数据
[ "发送get请求" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpUtil.java#L129-L131
train
Perform a GET request with the given parameters
[ 30522, 2270, 10763, 5164, 2131, 1006, 5164, 24471, 4877, 18886, 3070, 1010, 4949, 1026, 5164, 1010, 4874, 1028, 11498, 14760, 2361, 1007, 1063, 2709, 8299, 2890, 15500, 1012, 2131, 1006, 24471, 4877, 18886, 3070, 1007, 1012, 2433, 1006, 114...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.isFile
public static boolean isFile(Path path, boolean isFollowLinks) { if (null == path) { return false; } final LinkOption[] options = isFollowLinks ? new LinkOption[0] : new LinkOption[] { LinkOption.NOFOLLOW_LINKS }; return Files.isRegularFile(path, options); }
java
public static boolean isFile(Path path, boolean isFollowLinks) { if (null == path) { return false; } final LinkOption[] options = isFollowLinks ? new LinkOption[0] : new LinkOption[] { LinkOption.NOFOLLOW_LINKS }; return Files.isRegularFile(path, options); }
[ "public", "static", "boolean", "isFile", "(", "Path", "path", ",", "boolean", "isFollowLinks", ")", "{", "if", "(", "null", "==", "path", ")", "{", "return", "false", ";", "}", "final", "LinkOption", "[", "]", "options", "=", "isFollowLinks", "?", "new",...
判断是否为文件,如果file为null,则返回false @param path 文件 @param isFollowLinks 是否跟踪软链(快捷方式) @return 如果为文件true
[ "判断是否为文件,如果file为null,则返回false" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L1292-L1298
train
Checks if the given path points to a file or directory.
[ 30522, 2270, 10763, 22017, 20898, 2003, 8873, 2571, 1006, 4130, 4130, 1010, 22017, 20898, 2003, 14876, 7174, 13668, 19839, 2015, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 4130, 1007, 1063, 2709, 6270, 1025, 1065, 2345, 4957, 7361, 3508, 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-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
Task.run
@Override public void run() { // ---------------------------- // Initial State transition // ---------------------------- while (true) { ExecutionState current = this.executionState; if (current == ExecutionState.CREATED) { if (transitionState(ExecutionState.CREATED, ExecutionState.DEPLOYING)) { ...
java
@Override public void run() { // ---------------------------- // Initial State transition // ---------------------------- while (true) { ExecutionState current = this.executionState; if (current == ExecutionState.CREATED) { if (transitionState(ExecutionState.CREATED, ExecutionState.DEPLOYING)) { ...
[ "@", "Override", "public", "void", "run", "(", ")", "{", "// ----------------------------", "// Initial State transition", "// ----------------------------", "while", "(", "true", ")", "{", "ExecutionState", "current", "=", "this", ".", "executionState", ";", "if", "...
The core work method that bootstraps the task and executes its code.
[ "The", "core", "work", "method", "that", "bootstraps", "the", "task", "and", "executes", "its", "code", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java#L539-L875
train
This method is called by the TaskManager to run the task.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2448, 1006, 1007, 1063, 1013, 1013, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java
WebSocketClientHandshaker.rawPath
static String rawPath(URI wsURL) { String path = wsURL.getRawPath(); String query = wsURL.getRawQuery(); if (query != null && !query.isEmpty()) { path = path + '?' + query; } return path == null || path.isEmpty() ? "/" : path; }
java
static String rawPath(URI wsURL) { String path = wsURL.getRawPath(); String query = wsURL.getRawQuery(); if (query != null && !query.isEmpty()) { path = path + '?' + query; } return path == null || path.isEmpty() ? "/" : path; }
[ "static", "String", "rawPath", "(", "URI", "wsURL", ")", "{", "String", "path", "=", "wsURL", ".", "getRawPath", "(", ")", ";", "String", "query", "=", "wsURL", ".", "getRawQuery", "(", ")", ";", "if", "(", "query", "!=", "null", "&&", "!", "query", ...
Return the constructed raw path for the give {@link URI}.
[ "Return", "the", "constructed", "raw", "path", "for", "the", "give", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java#L539-L547
train
Get the raw path of the URL.
[ 30522, 10763, 5164, 6315, 15069, 1006, 24471, 2072, 1059, 26210, 2140, 1007, 1063, 5164, 4130, 1027, 1059, 26210, 2140, 1012, 2131, 2527, 2860, 15069, 1006, 1007, 1025, 5164, 23032, 1027, 1059, 26210, 2140, 1012, 2131, 2527, 2860, 4226, 285...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/operation/MetadataOperation.java
MetadataOperation.convertPattern
private String convertPattern(final String pattern, boolean datanucleusFormat) { String wStr; if (datanucleusFormat) { wStr = "*"; } else { wStr = ".*"; } return pattern .replaceAll("([^\\\\])%", "$1" + wStr).replaceAll("\\\\%", "%").replaceAll("^%", wStr) .replaceAll("([...
java
private String convertPattern(final String pattern, boolean datanucleusFormat) { String wStr; if (datanucleusFormat) { wStr = "*"; } else { wStr = ".*"; } return pattern .replaceAll("([^\\\\])%", "$1" + wStr).replaceAll("\\\\%", "%").replaceAll("^%", wStr) .replaceAll("([...
[ "private", "String", "convertPattern", "(", "final", "String", "pattern", ",", "boolean", "datanucleusFormat", ")", "{", "String", "wStr", ";", "if", "(", "datanucleusFormat", ")", "{", "wStr", "=", "\"*\"", ";", "}", "else", "{", "wStr", "=", "\".*\"", ";...
Convert a pattern containing JDBC catalog search wildcards into Java regex patterns. @param pattern input which may contain '%' or '_' wildcard characters, or these characters escaped using {@link #getSearchStringEscape()}. @return replace %/_ with regex search characters, also handle escaped characters. The datanucl...
[ "Convert", "a", "pattern", "containing", "JDBC", "catalog", "search", "wildcards", "into", "Java", "regex", "patterns", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/MetadataOperation.java#L97-L107
train
Convert a pattern to a CIS pattern.
[ 30522, 2797, 5164, 10463, 4502, 12079, 2078, 1006, 2345, 5164, 5418, 1010, 22017, 20898, 2951, 11231, 14321, 2271, 14192, 4017, 1007, 1063, 5164, 1059, 3367, 2099, 1025, 2065, 1006, 2951, 11231, 14321, 2271, 14192, 4017, 1007, 1063, 1059, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/IdcardUtil.java
IdcardUtil.getAgeByIdCard
public static int getAgeByIdCard(String idCard, Date dateToCompare) { String birth = getBirthByIdCard(idCard); return DateUtil.age(DateUtil.parse(birth, "yyyyMMdd"), dateToCompare); }
java
public static int getAgeByIdCard(String idCard, Date dateToCompare) { String birth = getBirthByIdCard(idCard); return DateUtil.age(DateUtil.parse(birth, "yyyyMMdd"), dateToCompare); }
[ "public", "static", "int", "getAgeByIdCard", "(", "String", "idCard", ",", "Date", "dateToCompare", ")", "{", "String", "birth", "=", "getBirthByIdCard", "(", "idCard", ")", ";", "return", "DateUtil", ".", "age", "(", "DateUtil", ".", "parse", "(", "birth", ...
根据身份编号获取指定日期当时的年龄年龄,只支持15或18位身份证号码 @param idCard 身份编号 @param dateToCompare 以此日期为界,计算年龄。 @return 年龄
[ "根据身份编号获取指定日期当时的年龄年龄,只支持15或18位身份证号码" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/IdcardUtil.java#L421-L424
train
Get the age of a user by ID card
[ 30522, 2270, 10763, 20014, 2131, 4270, 3762, 3593, 11522, 1006, 5164, 8909, 11522, 1010, 3058, 3058, 3406, 9006, 19362, 2063, 1007, 1063, 5164, 4182, 1027, 2131, 17706, 2705, 3762, 3593, 11522, 1006, 8909, 11522, 1007, 1025, 2709, 3058, 218...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/HttpResponse.java
HttpResponse.getCookieValue
public String getCookieValue(String name) { HttpCookie cookie = getCookie(name); return (null == cookie) ? null : cookie.getValue(); }
java
public String getCookieValue(String name) { HttpCookie cookie = getCookie(name); return (null == cookie) ? null : cookie.getValue(); }
[ "public", "String", "getCookieValue", "(", "String", "name", ")", "{", "HttpCookie", "cookie", "=", "getCookie", "(", "name", ")", ";", "return", "(", "null", "==", "cookie", ")", "?", "null", ":", "cookie", ".", "getValue", "(", ")", ";", "}" ]
获取Cookie值 @param name Cookie名 @return Cookie值 @since 4.1.4
[ "获取Cookie值" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpResponse.java#L177-L180
train
Returns the value of the cookie with the given name.
[ 30522, 2270, 5164, 2131, 3597, 23212, 13331, 7630, 2063, 1006, 5164, 2171, 1007, 1063, 8299, 3597, 23212, 2063, 17387, 1027, 2131, 3597, 23212, 2063, 1006, 2171, 1007, 1025, 2709, 1006, 19701, 1027, 1027, 17387, 1007, 1029, 19701, 1024, 173...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
java/server/src/org/openqa/grid/internal/NewSessionRequestQueue.java
NewSessionRequestQueue.processQueue
public void processQueue( Predicate<RequestHandler> handlerConsumer, Prioritizer prioritizer) { Comparator<RequestHandler> comparator = prioritizer == null ? Ordering.allEqual()::compare : (a, b) -> prioritizer.compareTo( a.getRequest().getDesiredCapabilities(), b.ge...
java
public void processQueue( Predicate<RequestHandler> handlerConsumer, Prioritizer prioritizer) { Comparator<RequestHandler> comparator = prioritizer == null ? Ordering.allEqual()::compare : (a, b) -> prioritizer.compareTo( a.getRequest().getDesiredCapabilities(), b.ge...
[ "public", "void", "processQueue", "(", "Predicate", "<", "RequestHandler", ">", "handlerConsumer", ",", "Prioritizer", "prioritizer", ")", "{", "Comparator", "<", "RequestHandler", ">", "comparator", "=", "prioritizer", "==", "null", "?", "Ordering", ".", "allEqua...
Processes all the entries in this queue. @param handlerConsumer The consumer that returns true if it has taken the item from the queue @param prioritizer The prioritizer to use
[ "Processes", "all", "the", "entries", "in", "this", "queue", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/server/src/org/openqa/grid/internal/NewSessionRequestQueue.java#L71-L95
train
Process the queue of new session requests.
[ 30522, 2270, 11675, 2832, 4226, 5657, 1006, 3653, 30524, 1007, 1024, 1024, 12826, 1024, 1006, 1037, 1010, 1038, 1007, 1011, 1028, 3188, 25090, 6290, 1012, 12826, 3406, 1006, 1037, 1012, 2131, 2890, 15500, 1006, 1007, 1012, 2131, 6155, 27559...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dictionary/nt/OrganizationDictionary.java
OrganizationDictionary.parsePattern
public static void parsePattern(List<NT> ntList, List<Vertex> vertexList, final WordNet wordNetOptimum, final WordNet wordNetAll) { // ListIterator<Vertex> listIterator = vertexList.listIterator(); StringBuilder sbPattern = new StringBuilder(ntList.size()); for (NT nt : ntList) { ...
java
public static void parsePattern(List<NT> ntList, List<Vertex> vertexList, final WordNet wordNetOptimum, final WordNet wordNetAll) { // ListIterator<Vertex> listIterator = vertexList.listIterator(); StringBuilder sbPattern = new StringBuilder(ntList.size()); for (NT nt : ntList) { ...
[ "public", "static", "void", "parsePattern", "(", "List", "<", "NT", ">", "ntList", ",", "List", "<", "Vertex", ">", "vertexList", ",", "final", "WordNet", "wordNetOptimum", ",", "final", "WordNet", "wordNetAll", ")", "{", "// ListIterator<Vertex> listIterat...
模式匹配 @param ntList 确定的标注序列 @param vertexList 原始的未加角色标注的序列 @param wordNetOptimum 待优化的图 @param wordNetAll
[ "模式匹配" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dictionary/nt/OrganizationDictionary.java#L3745-L3782
train
Parse pattern.
[ 30522, 2270, 10763, 11675, 30524, 27147, 1010, 2345, 2773, 7159, 2773, 7159, 8095, 1007, 1063, 1013, 1013, 2862, 21646, 8844, 1026, 19449, 1028, 2862, 21646, 8844, 1027, 19449, 9863, 1012, 2862, 21646, 8844, 1006, 1007, 1025, 5164, 8569, 23...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java
ThreadUtil.newThread
public static Thread newThread(Runnable runnable, String name) { final Thread t = newThread(runnable, name, false); if (t.getPriority() != Thread.NORM_PRIORITY) { t.setPriority(Thread.NORM_PRIORITY); } return t; }
java
public static Thread newThread(Runnable runnable, String name) { final Thread t = newThread(runnable, name, false); if (t.getPriority() != Thread.NORM_PRIORITY) { t.setPriority(Thread.NORM_PRIORITY); } return t; }
[ "public", "static", "Thread", "newThread", "(", "Runnable", "runnable", ",", "String", "name", ")", "{", "final", "Thread", "t", "=", "newThread", "(", "runnable", ",", "name", ",", "false", ")", ";", "if", "(", "t", ".", "getPriority", "(", ")", "!=",...
创建新线程,非守护线程,正常优先级,线程组与当前线程的线程组一致 @param runnable {@link Runnable} @param name 线程名 @return {@link Thread} @since 3.1.2
[ "创建新线程,非守护线程,正常优先级,线程组与当前线程的线程组一致" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java#L179-L185
train
Creates a new thread with the specified name and priority.
[ 30522, 2270, 10763, 11689, 25597, 28362, 4215, 1006, 2448, 22966, 2448, 22966, 1010, 5164, 2171, 1007, 1063, 2345, 11689, 1056, 1027, 25597, 28362, 4215, 1006, 2448, 22966, 1010, 2171, 1010, 6270, 1007, 1025, 2065, 1006, 1056, 1012, 2131, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.pathEndsWith
public static boolean pathEndsWith(File file, String suffix) { return file.getPath().toLowerCase().endsWith(suffix); }
java
public static boolean pathEndsWith(File file, String suffix) { return file.getPath().toLowerCase().endsWith(suffix); }
[ "public", "static", "boolean", "pathEndsWith", "(", "File", "file", ",", "String", "suffix", ")", "{", "return", "file", ".", "getPath", "(", ")", ".", "toLowerCase", "(", ")", ".", "endsWith", "(", "suffix", ")", ";", "}" ]
判断文件路径是否有指定后缀,忽略大小写<br> 常用语判断扩展名 @param file 文件或目录 @param suffix 后缀 @return 是否有指定后缀
[ "判断文件路径是否有指定后缀,忽略大小写<br", ">", "常用语判断扩展名" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L1845-L1847
train
Checks if the path ends with the given suffix.
[ 30522, 2270, 10763, 22017, 20898, 4130, 10497, 26760, 8939, 1006, 5371, 5371, 1010, 5164, 16809, 1007, 1063, 2709, 5371, 1012, 2131, 15069, 1006, 1007, 1012, 2000, 27663, 18992, 3366, 1006, 1007, 1012, 4515, 24415, 1006, 16809, 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-clients/src/main/java/org/apache/flink/client/program/OptimizerPlanEnvironment.java
OptimizerPlanEnvironment.execute
@Override public JobExecutionResult execute(String jobName) throws Exception { Plan plan = createProgramPlan(jobName); this.optimizerPlan = compiler.compile(plan); // do not go on with anything now! throw new ProgramAbortException(); }
java
@Override public JobExecutionResult execute(String jobName) throws Exception { Plan plan = createProgramPlan(jobName); this.optimizerPlan = compiler.compile(plan); // do not go on with anything now! throw new ProgramAbortException(); }
[ "@", "Override", "public", "JobExecutionResult", "execute", "(", "String", "jobName", ")", "throws", "Exception", "{", "Plan", "plan", "=", "createProgramPlan", "(", "jobName", ")", ";", "this", ".", "optimizerPlan", "=", "compiler", ".", "compile", "(", "plan...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/program/OptimizerPlanEnvironment.java#L48-L55
train
Execute the job.
[ 30522, 1030, 2058, 15637, 2270, 3105, 10288, 8586, 13700, 6072, 11314, 15389, 1006, 5164, 3105, 18442, 1007, 11618, 6453, 1063, 2933, 2933, 1027, 3443, 21572, 13113, 24759, 2319, 1006, 3105, 18442, 1007, 1025, 2023, 1012, 23569, 27605, 6290, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/DataSet.java
DataSet.leftOuterJoin
public <R> JoinOperatorSetsBase<T, R> leftOuterJoin(DataSet<R> other) { return new JoinOperatorSetsBase<>(this, other, JoinHint.OPTIMIZER_CHOOSES, JoinType.LEFT_OUTER); }
java
public <R> JoinOperatorSetsBase<T, R> leftOuterJoin(DataSet<R> other) { return new JoinOperatorSetsBase<>(this, other, JoinHint.OPTIMIZER_CHOOSES, JoinType.LEFT_OUTER); }
[ "public", "<", "R", ">", "JoinOperatorSetsBase", "<", "T", ",", "R", ">", "leftOuterJoin", "(", "DataSet", "<", "R", ">", "other", ")", "{", "return", "new", "JoinOperatorSetsBase", "<>", "(", "this", ",", "other", ",", "JoinHint", ".", "OPTIMIZER_CHOOSES"...
Initiates a Left Outer Join transformation. <p>An Outer Join transformation joins two elements of two {@link DataSet DataSets} on key equality and provides multiple ways to combine joining elements into one DataSet. <p>Elements of the <b>left</b> DataSet (i.e. {@code this}) that do not have a matching element on the ...
[ "Initiates", "a", "Left", "Outer", "Join", "transformation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L841-L843
train
Create a left outer join of this DataSet with the other DataSet.
[ 30522, 2270, 1026, 1054, 1028, 3693, 25918, 18926, 8454, 15058, 1026, 1056, 1010, 1054, 1028, 2187, 5833, 2121, 5558, 2378, 1006, 2951, 13462, 1026, 1054, 1028, 2060, 1007, 1063, 2709, 2047, 3693, 25918, 18926, 8454, 15058, 1026, 1028, 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/spark
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleClient.java
ExternalShuffleClient.registerWithShuffleServer
public void registerWithShuffleServer( String host, int port, String execId, ExecutorShuffleInfo executorInfo) throws IOException, InterruptedException { checkInit(); try (TransportClient client = clientFactory.createUnmanagedClient(host, port)) { ByteBuffer registerMessage = new R...
java
public void registerWithShuffleServer( String host, int port, String execId, ExecutorShuffleInfo executorInfo) throws IOException, InterruptedException { checkInit(); try (TransportClient client = clientFactory.createUnmanagedClient(host, port)) { ByteBuffer registerMessage = new R...
[ "public", "void", "registerWithShuffleServer", "(", "String", "host", ",", "int", "port", ",", "String", "execId", ",", "ExecutorShuffleInfo", "executorInfo", ")", "throws", "IOException", ",", "InterruptedException", "{", "checkInit", "(", ")", ";", "try", "(", ...
Registers this executor with an external shuffle server. This registration is required to inform the shuffle server about where and how we store our shuffle files. @param host Host of shuffle server. @param port Port of shuffle server. @param execId This Executor's id. @param executorInfo Contains all info necessary f...
[ "Registers", "this", "executor", "with", "an", "external", "shuffle", "server", ".", "This", "registration", "is", "required", "to", "inform", "the", "shuffle", "server", "about", "where", "and", "how", "we", "store", "our", "shuffle", "files", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleClient.java#L136-L146
train
Register with shuffle server.
[ 30522, 2270, 11675, 4236, 24415, 14235, 18142, 8043, 6299, 1006, 5164, 3677, 1010, 20014, 3417, 1010, 5164, 4654, 8586, 3593, 1010, 4654, 8586, 16161, 2869, 6979, 18142, 2378, 14876, 4654, 8586, 16161, 6657, 14876, 1007, 11618, 22834, 10288, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Validator.java
Validator.validateBetween
public static void validateBetween(Number value, Number min, Number max, String errorMsg) throws ValidateException { if (false == isBetween(value, min, max)) { throw new ValidateException(errorMsg); } }
java
public static void validateBetween(Number value, Number min, Number max, String errorMsg) throws ValidateException { if (false == isBetween(value, min, max)) { throw new ValidateException(errorMsg); } }
[ "public", "static", "void", "validateBetween", "(", "Number", "value", ",", "Number", "min", ",", "Number", "max", ",", "String", "errorMsg", ")", "throws", "ValidateException", "{", "if", "(", "false", "==", "isBetween", "(", "value", ",", "min", ",", "ma...
检查给定的数字是否在指定范围内 @param value 值 @param min 最小值(包含) @param max 最大值(包含) @param errorMsg 验证错误的信息 @throws ValidateException 验证异常 @since 4.1.10
[ "检查给定的数字是否在指定范围内" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Validator.java#L1064-L1068
train
Validate between method.
[ 30522, 2270, 10763, 11675, 9398, 3686, 20915, 28394, 2078, 1006, 2193, 3643, 1010, 2193, 8117, 1010, 2193, 4098, 1010, 5164, 7561, 5244, 2290, 30524, 4098, 1007, 1007, 1063, 5466, 2047, 9398, 3686, 10288, 24422, 1006, 7561, 5244, 2290, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/trie/bintrie/util/ArrayTool.java
ArrayTool.binarySearch
public static int binarySearch(BaseNode[] branches, BaseNode node) { int high = branches.length - 1; if (branches.length < 1) { return high; } int low = 0; while (low <= high) { int mid = (low + high) >>> 1; int cmp = branch...
java
public static int binarySearch(BaseNode[] branches, BaseNode node) { int high = branches.length - 1; if (branches.length < 1) { return high; } int low = 0; while (low <= high) { int mid = (low + high) >>> 1; int cmp = branch...
[ "public", "static", "int", "binarySearch", "(", "BaseNode", "[", "]", "branches", ",", "BaseNode", "node", ")", "{", "int", "high", "=", "branches", ".", "length", "-", "1", ";", "if", "(", "branches", ".", "length", "<", "1", ")", "{", "return", "hi...
二分查找 @param branches 数组 @param node 要查找的node @return 数组下标,小于0表示没找到
[ "二分查找" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/trie/bintrie/util/ArrayTool.java#L28-L49
train
Gets the index of the BaseNode in the BaseNode array that is greater than or equal to the given BaseNode.
[ 30522, 2270, 10763, 20014, 12441, 17310, 11140, 1006, 2918, 3630, 3207, 1031, 1033, 5628, 1010, 2918, 3630, 3207, 13045, 1007, 1063, 20014, 2152, 1027, 5628, 1012, 3091, 1011, 1015, 1025, 2065, 1006, 5628, 1012, 3091, 1026, 1015, 1007, 1063...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/seg/Other/CommonAhoCorasickSegmentUtil.java
CommonAhoCorasickSegmentUtil.segmentReverseOrder
public static <V> LinkedList<ResultTerm<V>> segmentReverseOrder(final char[] charArray, AhoCorasickDoubleArrayTrie<V> trie) { LinkedList<ResultTerm<V>> termList = new LinkedList<ResultTerm<V>>(); final ResultTerm<V>[] wordNet = new ResultTerm[charArray.length + 1]; trie.parseText(charArray, ...
java
public static <V> LinkedList<ResultTerm<V>> segmentReverseOrder(final char[] charArray, AhoCorasickDoubleArrayTrie<V> trie) { LinkedList<ResultTerm<V>> termList = new LinkedList<ResultTerm<V>>(); final ResultTerm<V>[] wordNet = new ResultTerm[charArray.length + 1]; trie.parseText(charArray, ...
[ "public", "static", "<", "V", ">", "LinkedList", "<", "ResultTerm", "<", "V", ">", ">", "segmentReverseOrder", "(", "final", "char", "[", "]", "charArray", ",", "AhoCorasickDoubleArrayTrie", "<", "V", ">", "trie", ")", "{", "LinkedList", "<", "ResultTerm", ...
逆向最长分词,合并未知语素 @param charArray 文本 @param trie 自动机 @param <V> 类型 @return 结果链表
[ "逆向最长分词,合并未知语素" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/Other/CommonAhoCorasickSegmentUtil.java#L102-L139
train
segmentReverseOrder This method is used to segment the text in the char array in reverse order.
[ 30522, 2270, 10763, 1026, 1058, 1028, 5799, 9863, 1026, 2765, 3334, 2213, 1026, 1058, 1028, 1028, 6903, 2890, 16070, 8551, 2121, 1006, 2345, 25869, 1031, 1033, 25869, 2906, 9447, 1010, 6289, 24163, 8180, 6799, 26797, 3468, 2906, 9447, 18886...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-metrics/flink-metrics-core/src/main/java/org/apache/flink/metrics/MetricConfig.java
MetricConfig.getInteger
public int getInteger(String key, int defaultValue) { String argument = getProperty(key, null); return argument == null ? defaultValue : Integer.parseInt(argument); }
java
public int getInteger(String key, int defaultValue) { String argument = getProperty(key, null); return argument == null ? defaultValue : Integer.parseInt(argument); }
[ "public", "int", "getInteger", "(", "String", "key", ",", "int", "defaultValue", ")", "{", "String", "argument", "=", "getProperty", "(", "key", ",", "null", ")", ";", "return", "argument", "==", "null", "?", "defaultValue", ":", "Integer", ".", "parseInt"...
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found. @param key the hashtable key. @param de...
[ "Searches", "for", "the", "property", "with", "the", "specified", "key", "in", "this", "property", "list", ".", "If", "the", "key", "is", "not", "found", "in", "this", "property", "list", "the", "default", "property", "list", "and", "its", "defaults", "rec...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-metrics/flink-metrics-core/src/main/java/org/apache/flink/metrics/MetricConfig.java#L42-L47
train
Get the integer value for the given key.
[ 30522, 2270, 20014, 2131, 18447, 26320, 1006, 5164, 3145, 1010, 20014, 12398, 10175, 5657, 1007, 1063, 5164, 6685, 1027, 2131, 21572, 4842, 3723, 1006, 3145, 1010, 19701, 1007, 1025, 2709, 6685, 1027, 1027, 19701, 1029, 12398, 10175, 5657, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java
DnsNameResolver.resolveAll
public final Future<List<DnsRecord>> resolveAll(DnsQuestion question, Iterable<DnsRecord> additionals, Promise<List<DnsRecord>> promise) { final DnsRecord[] additionalsArray = toArray(additionals, true); return resolveAll(question, additionalsArray, pr...
java
public final Future<List<DnsRecord>> resolveAll(DnsQuestion question, Iterable<DnsRecord> additionals, Promise<List<DnsRecord>> promise) { final DnsRecord[] additionalsArray = toArray(additionals, true); return resolveAll(question, additionalsArray, pr...
[ "public", "final", "Future", "<", "List", "<", "DnsRecord", ">", ">", "resolveAll", "(", "DnsQuestion", "question", ",", "Iterable", "<", "DnsRecord", ">", "additionals", ",", "Promise", "<", "List", "<", "DnsRecord", ">", ">", "promise", ")", "{", "final"...
Resolves the {@link DnsRecord}s that are matched by the specified {@link DnsQuestion}. Unlike {@link #query(DnsQuestion)}, this method handles redirection, CNAMEs and multiple name servers. If the specified {@link DnsQuestion} is {@code A} or {@code AAAA}, this method looks up the configured {@link HostsFileEntries} be...
[ "Resolves", "the", "{", "@link", "DnsRecord", "}", "s", "that", "are", "matched", "by", "the", "specified", "{", "@link", "DnsQuestion", "}", ".", "Unlike", "{", "@link", "#query", "(", "DnsQuestion", ")", "}", "this", "method", "handles", "redirection", "...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java#L744-L748
train
Resolve all the records in the question with the specified additionals.
[ 30522, 2270, 2345, 2925, 1026, 2862, 1026, 1040, 3619, 2890, 27108, 2094, 1028, 1028, 10663, 8095, 1006, 1040, 3619, 15500, 3258, 3160, 1010, 2009, 6906, 3468, 1026, 1040, 3619, 2890, 27108, 2094, 1028, 3176, 2015, 1010, 4872, 1026, 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...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java
FileInputFormat.getFilePaths
public Path[] getFilePaths() { if (supportsMultiPaths()) { if (this.filePaths == null) { return new Path[0]; } return this.filePaths; } else { if (this.filePath == null) { return new Path[0]; } return new Path[] {filePath}; } }
java
public Path[] getFilePaths() { if (supportsMultiPaths()) { if (this.filePaths == null) { return new Path[0]; } return this.filePaths; } else { if (this.filePath == null) { return new Path[0]; } return new Path[] {filePath}; } }
[ "public", "Path", "[", "]", "getFilePaths", "(", ")", "{", "if", "(", "supportsMultiPaths", "(", ")", ")", "{", "if", "(", "this", ".", "filePaths", "==", "null", ")", "{", "return", "new", "Path", "[", "0", "]", ";", "}", "return", "this", ".", ...
Returns the paths of all files to be read by the FileInputFormat. @return The list of all paths to read.
[ "Returns", "the", "paths", "of", "all", "files", "to", "be", "read", "by", "the", "FileInputFormat", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java#L285-L298
train
Gets the file paths.
[ 30522, 2270, 4130, 1031, 1033, 2131, 8873, 2571, 15069, 2015, 1006, 1007, 1063, 2065, 1006, 6753, 12274, 7096, 11514, 8988, 2015, 1006, 1007, 1007, 1063, 2065, 1006, 2023, 1012, 5371, 15069, 2015, 1027, 1027, 19701, 1007, 1063, 2709, 2047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java
AbstractAsymmetricCrypto.encryptBase64
public String encryptBase64(String data, KeyType keyType) { return Base64.encode(encrypt(data, keyType)); }
java
public String encryptBase64(String data, KeyType keyType) { return Base64.encode(encrypt(data, keyType)); }
[ "public", "String", "encryptBase64", "(", "String", "data", ",", "KeyType", "keyType", ")", "{", "return", "Base64", ".", "encode", "(", "encrypt", "(", "data", ",", "keyType", ")", ")", ";", "}" ]
编码为Base64字符串,使用UTF-8编码 @param data 被加密的字符串 @param keyType 私钥或公钥 {@link KeyType} @return Base64字符串 @since 4.0.1
[ "编码为Base64字符串,使用UTF", "-", "8编码" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java#L137-L139
train
Encrypts the given data using the specified key type.
[ 30522, 2270, 5164, 4372, 26775, 22571, 2102, 15058, 21084, 1006, 5164, 2951, 1010, 3145, 13874, 3145, 13874, 1007, 1063, 2709, 2918, 21084, 1012, 4372, 16044, 1006, 4372, 26775, 22571, 2102, 1006, 2951, 1010, 3145, 13874, 1007, 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...
alibaba/canal
client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/loader/AbstractCanalAdapterWorker.java
AbstractCanalAdapterWorker.batchSync
private void batchSync(List<Dml> dmls, OuterAdapter adapter) { // 分批同步 if (dmls.size() <= canalClientConfig.getSyncBatchSize()) { adapter.sync(dmls); } else { int len = 0; List<Dml> dmlsBatch = new ArrayList<>(); for (Dml dml : dmls) { ...
java
private void batchSync(List<Dml> dmls, OuterAdapter adapter) { // 分批同步 if (dmls.size() <= canalClientConfig.getSyncBatchSize()) { adapter.sync(dmls); } else { int len = 0; List<Dml> dmlsBatch = new ArrayList<>(); for (Dml dml : dmls) { ...
[ "private", "void", "batchSync", "(", "List", "<", "Dml", ">", "dmls", ",", "OuterAdapter", "adapter", ")", "{", "// 分批同步", "if", "(", "dmls", ".", "size", "(", ")", "<=", "canalClientConfig", ".", "getSyncBatchSize", "(", ")", ")", "{", "adapter", ".", ...
分批同步 @param dmls @param adapter
[ "分批同步" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/loader/AbstractCanalAdapterWorker.java#L195-L219
train
Batch sync.
[ 30522, 2797, 11675, 14108, 6508, 12273, 1006, 2862, 1026, 1040, 19968, 1028, 1040, 19968, 2015, 1010, 6058, 8447, 13876, 2121, 15581, 2121, 1007, 1063, 1013, 1013, 1775, 100, 1794, 100, 2065, 1006, 1040, 19968, 2015, 1012, 2946, 1006, 1007,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/WordCountSQL.java
WordCountSQL.main
public static void main(String[] args) throws Exception { // set up execution environment ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); BatchTableEnvironment tEnv = BatchTableEnvironment.create(env); DataSet<WC> input = env.fromElements( new WC("Hello", 1), new WC("Ciao", 1)...
java
public static void main(String[] args) throws Exception { // set up execution environment ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); BatchTableEnvironment tEnv = BatchTableEnvironment.create(env); DataSet<WC> input = env.fromElements( new WC("Hello", 1), new WC("Ciao", 1)...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "// set up execution environment", "ExecutionEnvironment", "env", "=", "ExecutionEnvironment", ".", "getExecutionEnvironment", "(", ")", ";", "BatchTableEnvironment", ...
*************************************************************************
[ "*************************************************************************" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/WordCountSQL.java#L40-L61
train
Main method to run the CRUD test.
[ 30522, 2270, 10763, 11675, 2364, 1006, 5164, 1031, 1033, 12098, 5620, 1007, 11618, 6453, 1063, 1013, 1013, 2275, 2039, 7781, 4044, 7781, 2368, 21663, 2239, 3672, 4372, 2615, 1027, 7781, 2368, 21663, 2239, 3672, 1012, 2131, 10288, 8586, 1370...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/context/condition/Condition.java
Condition.getConditionValues
public List<Comparable<?>> getConditionValues(final List<?> parameters) { List<Comparable<?>> result = new LinkedList<>(positionValueMap.values()); for (Entry<Integer, Integer> entry : positionIndexMap.entrySet()) { Object parameter = parameters.get(entry.getValue()); if (!(param...
java
public List<Comparable<?>> getConditionValues(final List<?> parameters) { List<Comparable<?>> result = new LinkedList<>(positionValueMap.values()); for (Entry<Integer, Integer> entry : positionIndexMap.entrySet()) { Object parameter = parameters.get(entry.getValue()); if (!(param...
[ "public", "List", "<", "Comparable", "<", "?", ">", ">", "getConditionValues", "(", "final", "List", "<", "?", ">", "parameters", ")", "{", "List", "<", "Comparable", "<", "?", ">", ">", "result", "=", "new", "LinkedList", "<>", "(", "positionValueMap", ...
Get condition values. @param parameters parameters @return condition values
[ "Get", "condition", "values", "." ]
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/context/condition/Condition.java#L115-L129
train
Gets condition values.
[ 30522, 2270, 2862, 1026, 12435, 1026, 1029, 1028, 1028, 2131, 8663, 20562, 10175, 15808, 1006, 2345, 2862, 1026, 1029, 1028, 11709, 1007, 1063, 2862, 1026, 12435, 1026, 1029, 1028, 1028, 2765, 1027, 2047, 5799, 9863, 1026, 1028, 1006, 2597,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/AbstractUdfStreamOperator.java
AbstractUdfStreamOperator.setOutputType
@Override public void setOutputType(TypeInformation<OUT> outTypeInfo, ExecutionConfig executionConfig) { StreamingFunctionUtils.setOutputType(userFunction, outTypeInfo, executionConfig); }
java
@Override public void setOutputType(TypeInformation<OUT> outTypeInfo, ExecutionConfig executionConfig) { StreamingFunctionUtils.setOutputType(userFunction, outTypeInfo, executionConfig); }
[ "@", "Override", "public", "void", "setOutputType", "(", "TypeInformation", "<", "OUT", ">", "outTypeInfo", ",", "ExecutionConfig", "executionConfig", ")", "{", "StreamingFunctionUtils", ".", "setOutputType", "(", "userFunction", ",", "outTypeInfo", ",", "executionCon...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/AbstractUdfStreamOperator.java#L138-L141
train
Sets the output type of the user function.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2275, 5833, 18780, 13874, 1006, 2828, 2378, 14192, 3370, 1026, 2041, 1028, 2041, 13874, 2378, 14876, 1010, 7781, 8663, 8873, 2290, 7781, 8663, 8873, 2290, 1007, 1063, 11058, 11263, 27989, 21823, 4877, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/window/assigners/SlidingWindowAssigner.java
SlidingWindowAssigner.of
public static SlidingWindowAssigner of(Duration size, Duration slide) { return new SlidingWindowAssigner(size.toMillis(), slide.toMillis(), 0, true); }
java
public static SlidingWindowAssigner of(Duration size, Duration slide) { return new SlidingWindowAssigner(size.toMillis(), slide.toMillis(), 0, true); }
[ "public", "static", "SlidingWindowAssigner", "of", "(", "Duration", "size", ",", "Duration", "slide", ")", "{", "return", "new", "SlidingWindowAssigner", "(", "size", ".", "toMillis", "(", ")", ",", "slide", ".", "toMillis", "(", ")", ",", "0", ",", "true"...
Creates a new {@code SlidingEventTimeWindows} {@link org.apache.flink.streaming.api.windowing.assigners.WindowAssigner} that assigns elements to sliding time windows based on the element timestamp. @param size The size of the generated windows. @param slide The slide interval of the generated windows. @return The tim...
[ "Creates", "a", "new", "{", "@code", "SlidingEventTimeWindows", "}", "{", "@link", "org", ".", "apache", ".", "flink", ".", "streaming", ".", "api", ".", "windowing", ".", "assigners", ".", "WindowAssigner", "}", "that", "assigns", "elements", "to", "sliding...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/window/assigners/SlidingWindowAssigner.java#L155-L157
train
Creates a sliding window assigner.
[ 30522, 2270, 10763, 8058, 11101, 21293, 18719, 10177, 2099, 1997, 1006, 9367, 2946, 1010, 9367, 7358, 1007, 1063, 2709, 2047, 8058, 11101, 21293, 18719, 10177, 2099, 1006, 2946, 1012, 3419, 8591, 2483, 1006, 1007, 1010, 7358, 1012, 3419, 85...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-cron/src/main/java/cn/hutool/cron/pattern/matcher/ValueMatcherBuilder.java
ValueMatcherBuilder.parseArray
private static List<Integer> parseArray(String value, ValueParser parser){ final List<Integer> values = new ArrayList<>(); final List<String> parts = StrUtil.split(value, StrUtil.C_COMMA); for (String part : parts) { CollectionUtil.addAllIfNotContains(values, parseStep(part, parser)); } return val...
java
private static List<Integer> parseArray(String value, ValueParser parser){ final List<Integer> values = new ArrayList<>(); final List<String> parts = StrUtil.split(value, StrUtil.C_COMMA); for (String part : parts) { CollectionUtil.addAllIfNotContains(values, parseStep(part, parser)); } return val...
[ "private", "static", "List", "<", "Integer", ">", "parseArray", "(", "String", "value", ",", "ValueParser", "parser", ")", "{", "final", "List", "<", "Integer", ">", "values", "=", "new", "ArrayList", "<>", "(", ")", ";", "final", "List", "<", "String", ...
处理数组形式表达式<br> 处理的形式包括: <ul> <li><strong>a</strong> 或 <strong>*</strong></li> <li><strong>a,b,c,d</strong></li> </ul> @param value 子表达式值 @param parser 针对这个字段的解析器 @return 值列表
[ "处理数组形式表达式<br", ">", "处理的形式包括:", "<ul", ">", "<li", ">", "<strong", ">", "a<", "/", "strong", ">", "或", "<strong", ">", "*", "<", "/", "strong", ">", "<", "/", "li", ">", "<li", ">", "<strong", ">", "a", "b", "c", "d<", "/", "strong", ">", "<",...
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-cron/src/main/java/cn/hutool/cron/pattern/matcher/ValueMatcherBuilder.java#L62-L70
train
Parses an array of integers.
[ 30522, 2797, 10763, 2862, 1026, 16109, 1028, 11968, 17310, 11335, 2100, 1006, 5164, 3643, 1010, 3643, 19362, 8043, 11968, 8043, 1007, 1063, 2345, 2862, 1026, 16109, 1028, 5300, 1027, 2047, 9140, 9863, 1026, 1028, 1006, 1007, 1025, 2345, 286...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.start
public static boolean start(HttpServerExchange httpServerExchange) { // Get the matcher corresponding to the current request type. PathTemplateMatcher<String> pathTemplateMatcher = methodToMatcherMap.get(httpServerExchange.getRequestMethod()); if (pathTemplateMatcher != null) { // Match the current request pat...
java
public static boolean start(HttpServerExchange httpServerExchange) { // Get the matcher corresponding to the current request type. PathTemplateMatcher<String> pathTemplateMatcher = methodToMatcherMap.get(httpServerExchange.getRequestMethod()); if (pathTemplateMatcher != null) { // Match the current request pat...
[ "public", "static", "boolean", "start", "(", "HttpServerExchange", "httpServerExchange", ")", "{", "// Get the matcher corresponding to the current request type.", "PathTemplateMatcher", "<", "String", ">", "pathTemplateMatcher", "=", "methodToMatcherMap", ".", "get", "(", "h...
On the first step of the request, match the request against the configured paths. If the match is successful, store the chain id within the exchange. Otherwise return false. @param httpServerExchange The current requests server exchange. @return true if a handler has been defined for the given path.
[ "On", "the", "first", "step", "of", "the", "request", "match", "the", "request", "against", "the", "configured", "paths", ".", "If", "the", "match", "is", "successful", "store", "the", "chain", "id", "within", "the", "exchange", ".", "Otherwise", "return", ...
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/handler/src/main/java/com/networknt/handler/Handler.java#L311-L337
train
Start the servlet.
[ 30522, 2270, 10763, 22017, 20898, 2707, 1006, 16770, 2121, 28943, 2595, 22305, 2063, 16770, 2121, 28943, 2595, 22305, 2063, 1007, 1063, 1013, 1013, 2131, 1996, 2674, 2121, 7978, 2000, 1996, 2783, 5227, 2828, 1012, 4130, 18532, 15725, 18900, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/trie/bintrie/BinTrie.java
BinTrie.parseLongestText
public void parseLongestText(String text, AhoCorasickDoubleArrayTrie.IHit<V> processor) { int length = text.length(); for (int i = 0; i < length; ++i) { BaseNode<V> state = transition(text.charAt(i)); if (state != null) { int to = i + 1; ...
java
public void parseLongestText(String text, AhoCorasickDoubleArrayTrie.IHit<V> processor) { int length = text.length(); for (int i = 0; i < length; ++i) { BaseNode<V> state = transition(text.charAt(i)); if (state != null) { int to = i + 1; ...
[ "public", "void", "parseLongestText", "(", "String", "text", ",", "AhoCorasickDoubleArrayTrie", ".", "IHit", "<", "V", ">", "processor", ")", "{", "int", "length", "=", "text", ".", "length", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", ...
最长匹配 @param text 文本 @param processor 处理器
[ "最长匹配" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/trie/bintrie/BinTrie.java#L523-L551
train
Parses the text of the Aho Corasick Double Array trie.
[ 30522, 2270, 11675, 11968, 11246, 5063, 4355, 18209, 1006, 5164, 3793, 1010, 6289, 24163, 8180, 6799, 26797, 3468, 2906, 9447, 18886, 2063, 1012, 1045, 16584, 1026, 1058, 1028, 13151, 1007, 1063, 20014, 3091, 1027, 3793, 1012, 3091, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.savepoint
protected void savepoint(String[] args) throws Exception { LOG.info("Running 'savepoint' command."); final Options commandOptions = CliFrontendParser.getSavepointCommandOptions(); final Options commandLineOptions = CliFrontendParser.mergeOptions(commandOptions, customCommandLineOptions); final CommandLine co...
java
protected void savepoint(String[] args) throws Exception { LOG.info("Running 'savepoint' command."); final Options commandOptions = CliFrontendParser.getSavepointCommandOptions(); final Options commandLineOptions = CliFrontendParser.mergeOptions(commandOptions, customCommandLineOptions); final CommandLine co...
[ "protected", "void", "savepoint", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "LOG", ".", "info", "(", "\"Running 'savepoint' command.\"", ")", ";", "final", "Options", "commandOptions", "=", "CliFrontendParser", ".", "getSavepointCommandOption...
Executes the SAVEPOINT action. @param args Command line arguments for the savepoint action.
[ "Executes", "the", "SAVEPOINT", "action", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L630-L686
train
Execute a savepoint command.
[ 30522, 5123, 11675, 3828, 8400, 1006, 5164, 1031, 1033, 12098, 5620, 1007, 11618, 6453, 1063, 8833, 1012, 18558, 1006, 1000, 2770, 1005, 3828, 8400, 1005, 3094, 1012, 1000, 1007, 1025, 2345, 7047, 15054, 16790, 2015, 1027, 18856, 10128, 494...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...