repo
stringclasses
11 values
path
stringlengths
41
234
func_name
stringlengths
5
78
original_string
stringlengths
71
14.1k
language
stringclasses
1 value
code
stringlengths
71
14.1k
code_tokens
listlengths
22
2.65k
docstring
stringlengths
2
5.35k
docstring_tokens
listlengths
1
369
sha
stringclasses
11 values
url
stringlengths
129
339
partition
stringclasses
1 value
summary
stringlengths
7
175
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.read
public static BufferedImage read(InputStream imageStream) { try { return ImageIO.read(imageStream); } catch (IOException e) { throw new IORuntimeException(e); } }
java
public static BufferedImage read(InputStream imageStream) { try { return ImageIO.read(imageStream); } catch (IOException e) { throw new IORuntimeException(e); } }
[ "public", "static", "BufferedImage", "read", "(", "InputStream", "imageStream", ")", "{", "try", "{", "return", "ImageIO", ".", "read", "(", "imageStream", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "throw", "new", "IORuntimeException", "(", ...
从流中读取图片 @param imageStream 图片文件 @return 图片 @since 3.2.2
[ "从流中读取图片" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L1560-L1566
train
Reads a 16 - bit BufferedImage from an input stream.
[ 30522, 2270, 10763, 17698, 2098, 9581, 3351, 3191, 1006, 20407, 25379, 4871, 25379, 1007, 1063, 3046, 1063, 2709, 3746, 3695, 1012, 3191, 1006, 4871, 25379, 1007, 1025, 1065, 4608, 1006, 22834, 10288, 24422, 1041, 1007, 1063, 5466, 2047, 30...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
networknt/light-4j
utility/src/main/java/com/networknt/utility/DateUtil.java
DateUtil.parseIso8601Date
public static Instant parseIso8601Date(String dateString) { // For EC2 Spot Fleet. if (dateString.endsWith("+0000")) { dateString = dateString .substring(0, dateString.length() - 5) .concat("Z"); } try { return parseInstant...
java
public static Instant parseIso8601Date(String dateString) { // For EC2 Spot Fleet. if (dateString.endsWith("+0000")) { dateString = dateString .substring(0, dateString.length() - 5) .concat("Z"); } try { return parseInstant...
[ "public", "static", "Instant", "parseIso8601Date", "(", "String", "dateString", ")", "{", "// For EC2 Spot Fleet.", "if", "(", "dateString", ".", "endsWith", "(", "\"+0000\"", ")", ")", "{", "dateString", "=", "dateString", ".", "substring", "(", "0", ",", "da...
Parses the specified date string as an ISO 8601 date (yyyy-MM-dd'T'HH:mm:ss.SSSZZ) and returns the {@link Instant} object. @param dateString The date string to parse. @return The parsed Instant object.
[ "Parses", "the", "specified", "date", "string", "as", "an", "ISO", "8601", "date", "(", "yyyy", "-", "MM", "-", "dd", "T", "HH", ":", "mm", ":", "ss", ".", "SSSZZ", ")", "and", "returns", "the", "{", "@link", "Instant", "}", "object", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/utility/src/main/java/com/networknt/utility/DateUtil.java#L56-L69
train
Parse ISO 8601 date.
[ 30522, 2270, 10763, 7107, 11968, 20240, 6499, 20842, 24096, 13701, 1006, 5164, 5246, 18886, 3070, 1007, 1063, 1013, 1013, 2005, 14925, 2475, 3962, 4170, 1012, 2065, 1006, 5246, 18886, 3070, 1012, 4515, 24415, 1006, 1000, 1009, 2199, 2692, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Console.java
Console.log
public static void log(Object obj) { if (obj instanceof Throwable) { Throwable e = (Throwable) obj; log(e, e.getMessage()); } else { log("{}", obj); } }
java
public static void log(Object obj) { if (obj instanceof Throwable) { Throwable e = (Throwable) obj; log(e, e.getMessage()); } else { log("{}", obj); } }
[ "public", "static", "void", "log", "(", "Object", "obj", ")", "{", "if", "(", "obj", "instanceof", "Throwable", ")", "{", "Throwable", "e", "=", "(", "Throwable", ")", "obj", ";", "log", "(", "e", ",", "e", ".", "getMessage", "(", ")", ")", ";", ...
同 System.out.println()方法,打印控制台日志<br> 如果传入打印对象为{@link Throwable}对象,那么同时打印堆栈 @param obj 要打印的对象
[ "同", "System", ".", "out", ".", "println", "()", "方法,打印控制台日志<br", ">", "如果传入打印对象为", "{", "@link", "Throwable", "}", "对象,那么同时打印堆栈" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Console.java#L36-L43
train
Logs an object with an error message.
[ 30522, 2270, 10763, 11675, 8833, 1006, 4874, 27885, 3501, 1007, 1063, 2065, 1006, 27885, 3501, 6013, 11253, 5466, 3085, 1007, 1063, 5466, 3085, 1041, 1027, 1006, 5466, 3085, 1007, 27885, 3501, 1025, 8833, 1006, 1041, 1010, 1041, 1012, 2131,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
common/src/main/java/io/netty/util/internal/logging/CommonsLogger.java
CommonsLogger.warn
@Override public void warn(String format, Object arg) { if (logger.isWarnEnabled()) { FormattingTuple ft = MessageFormatter.format(format, arg); logger.warn(ft.getMessage(), ft.getThrowable()); } }
java
@Override public void warn(String format, Object arg) { if (logger.isWarnEnabled()) { FormattingTuple ft = MessageFormatter.format(format, arg); logger.warn(ft.getMessage(), ft.getThrowable()); } }
[ "@", "Override", "public", "void", "warn", "(", "String", "format", ",", "Object", "arg", ")", "{", "if", "(", "logger", ".", "isWarnEnabled", "(", ")", ")", "{", "FormattingTuple", "ft", "=", "MessageFormatter", ".", "format", "(", "format", ",", "arg",...
Delegates to the {@link Log#warn(Object)} method of the underlying {@link Log} instance. <p> However, this form avoids superfluous object creation when the logger is disabled for level WARN. </p> @param format the format string @param arg the argument
[ "Delegates", "to", "the", "{", "@link", "Log#warn", "(", "Object", ")", "}", "method", "of", "the", "underlying", "{", "@link", "Log", "}", "instance", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/logging/CommonsLogger.java#L402-L408
train
Log a warning message with a throwable.
[ 30522, 1030, 2058, 15637, 2270, 11675, 11582, 1006, 5164, 4289, 1010, 4874, 12098, 2290, 1007, 1063, 2065, 1006, 8833, 4590, 1012, 2003, 9028, 10224, 3085, 2094, 1006, 1007, 1007, 1063, 4289, 3436, 8525, 10814, 3027, 1027, 4471, 14192, 2009...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java
FileWriter.checkFile
private void checkFile() throws IORuntimeException { Assert.notNull(file, "File to write content is null !"); if(this.file.exists() && false == file.isFile()){ throw new IORuntimeException("File [{}] is not a file !", this.file.getAbsoluteFile()); } }
java
private void checkFile() throws IORuntimeException { Assert.notNull(file, "File to write content is null !"); if(this.file.exists() && false == file.isFile()){ throw new IORuntimeException("File [{}] is not a file !", this.file.getAbsoluteFile()); } }
[ "private", "void", "checkFile", "(", ")", "throws", "IORuntimeException", "{", "Assert", ".", "notNull", "(", "file", ",", "\"File to write content is null !\"", ")", ";", "if", "(", "this", ".", "file", ".", "exists", "(", ")", "&&", "false", "==", "file", ...
检查文件 @throws IORuntimeException IO异常
[ "检查文件" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java#L367-L372
train
Checks if the file to write is a file.
[ 30522, 2797, 11675, 4638, 8873, 2571, 1006, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 5371, 1010, 1000, 5371, 2000, 4339, 4180, 2003, 19701, 999, 1000, 1007, 1025, 2065, 1006, 2023, 1012, 537...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
buffer/src/main/java/io/netty/buffer/Unpooled.java
Unpooled.copyMedium
public static ByteBuf copyMedium(int value) { ByteBuf buf = buffer(3); buf.writeMedium(value); return buf; }
java
public static ByteBuf copyMedium(int value) { ByteBuf buf = buffer(3); buf.writeMedium(value); return buf; }
[ "public", "static", "ByteBuf", "copyMedium", "(", "int", "value", ")", "{", "ByteBuf", "buf", "=", "buffer", "(", "3", ")", ";", "buf", ".", "writeMedium", "(", "value", ")", ";", "return", "buf", ";", "}" ]
Creates a new 3-byte big-endian buffer that holds the specified 24-bit integer.
[ "Creates", "a", "new", "3", "-", "byte", "big", "-", "endian", "buffer", "that", "holds", "the", "specified", "24", "-", "bit", "integer", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/Unpooled.java#L736-L740
train
Create a new big - endian buffer that holds a single 16 - bit integer.
[ 30522, 2270, 10763, 24880, 8569, 2546, 6100, 7583, 5007, 1006, 20014, 3643, 1007, 1063, 24880, 8569, 2546, 20934, 2546, 1027, 17698, 1006, 1017, 1007, 1025, 20934, 2546, 1012, 4339, 7583, 5007, 1006, 3643, 1007, 1025, 2709, 20934, 2546, 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-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/JobLeaderIdService.java
JobLeaderIdService.removeJob
public void removeJob(JobID jobId) throws Exception { LOG.debug("Remove job {} from job leader id monitoring.", jobId); JobLeaderIdListener listener = jobLeaderIdListeners.remove(jobId); if (listener != null) { listener.stop(); } }
java
public void removeJob(JobID jobId) throws Exception { LOG.debug("Remove job {} from job leader id monitoring.", jobId); JobLeaderIdListener listener = jobLeaderIdListeners.remove(jobId); if (listener != null) { listener.stop(); } }
[ "public", "void", "removeJob", "(", "JobID", "jobId", ")", "throws", "Exception", "{", "LOG", ".", "debug", "(", "\"Remove job {} from job leader id monitoring.\"", ",", "jobId", ")", ";", "JobLeaderIdListener", "listener", "=", "jobLeaderIdListeners", ".", "remove", ...
Remove the given job from being monitored by the service. @param jobId identifying the job to remove from monitor @throws Exception if removing the job fails
[ "Remove", "the", "given", "job", "from", "being", "monitored", "by", "the", "service", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/JobLeaderIdService.java#L164-L172
train
Remove a job from the job leader id monitoring.
[ 30522, 2270, 11675, 6366, 5558, 2497, 1006, 3105, 3593, 3105, 3593, 1007, 11618, 6453, 1063, 8833, 1012, 2139, 8569, 2290, 1006, 1000, 6366, 3105, 1063, 1065, 2013, 3105, 3003, 8909, 8822, 1012, 1000, 1010, 3105, 3593, 1007, 1025, 3105, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java
KeyUtil.getAlgorithmAfterWith
public static String getAlgorithmAfterWith(String algorithm) { Assert.notNull(algorithm, "algorithm must be not null !"); int indexOfWith = StrUtil.lastIndexOfIgnoreCase(algorithm, "with"); if (indexOfWith > 0) { algorithm = StrUtil.subSuf(algorithm, indexOfWith + "with".length()); } if ("ECDSA".equa...
java
public static String getAlgorithmAfterWith(String algorithm) { Assert.notNull(algorithm, "algorithm must be not null !"); int indexOfWith = StrUtil.lastIndexOfIgnoreCase(algorithm, "with"); if (indexOfWith > 0) { algorithm = StrUtil.subSuf(algorithm, indexOfWith + "with".length()); } if ("ECDSA".equa...
[ "public", "static", "String", "getAlgorithmAfterWith", "(", "String", "algorithm", ")", "{", "Assert", ".", "notNull", "(", "algorithm", ",", "\"algorithm must be not null !\"", ")", ";", "int", "indexOfWith", "=", "StrUtil", ".", "lastIndexOfIgnoreCase", "(", "algo...
获取用于密钥生成的算法<br> 获取XXXwithXXX算法的后半部分算法,如果为ECDSA或SM2,返回算法为EC @param algorithm XXXwithXXX算法 @return 算法
[ "获取用于密钥生成的算法<br", ">", "获取XXXwithXXX算法的后半部分算法,如果为ECDSA或SM2,返回算法为EC" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java#L536-L546
train
Returns the algorithm after the given string.
[ 30522, 2270, 10763, 5164, 2131, 2389, 20255, 8939, 2863, 6199, 2121, 24415, 1006, 5164, 9896, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 9896, 1010, 1000, 9896, 2442, 2022, 2025, 19701, 999, 1000, 1007, 1025, 20014, 5950, 11253, 2441...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-common/src/main/java/org/apache/spark/network/client/TransportClient.java
TransportClient.stream
public void stream(String streamId, StreamCallback callback) { StdChannelListener listener = new StdChannelListener(streamId) { @Override void handleFailure(String errorMsg, Throwable cause) throws Exception { callback.onFailure(streamId, new IOException(errorMsg, cause)); } }; if ...
java
public void stream(String streamId, StreamCallback callback) { StdChannelListener listener = new StdChannelListener(streamId) { @Override void handleFailure(String errorMsg, Throwable cause) throws Exception { callback.onFailure(streamId, new IOException(errorMsg, cause)); } }; if ...
[ "public", "void", "stream", "(", "String", "streamId", ",", "StreamCallback", "callback", ")", "{", "StdChannelListener", "listener", "=", "new", "StdChannelListener", "(", "streamId", ")", "{", "@", "Override", "void", "handleFailure", "(", "String", "errorMsg", ...
Request to stream the data with the given stream ID from the remote end. @param streamId The stream to fetch. @param callback Object to call with the stream data.
[ "Request", "to", "stream", "the", "data", "with", "the", "given", "stream", "ID", "from", "the", "remote", "end", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-common/src/main/java/org/apache/spark/network/client/TransportClient.java#L159-L177
train
Stream the data from the specified streamId.
[ 30522, 2270, 11675, 5460, 1006, 5164, 5460, 3593, 1010, 5460, 9289, 20850, 8684, 2655, 5963, 1007, 1063, 2358, 16409, 4819, 9091, 27870, 3678, 19373, 1027, 2047, 2358, 16409, 4819, 9091, 27870, 3678, 1006, 5460, 3593, 1007, 1063, 1030, 2058...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Tuple2.java
Tuple2.of
public static <T0, T1> Tuple2<T0, T1> of(T0 value0, T1 value1) { return new Tuple2<>(value0, value1); }
java
public static <T0, T1> Tuple2<T0, T1> of(T0 value0, T1 value1) { return new Tuple2<>(value0, value1); }
[ "public", "static", "<", "T0", ",", "T1", ">", "Tuple2", "<", "T0", ",", "T1", ">", "of", "(", "T0", "value0", ",", "T1", "value1", ")", "{", "return", "new", "Tuple2", "<>", "(", "value0", ",", "value1", ")", ";", "}" ]
Creates a new tuple and assigns the given values to the tuple's fields. This is more convenient than using the constructor, because the compiler can infer the generic type arguments implicitly. For example: {@code Tuple3.of(n, x, s)} instead of {@code new Tuple3<Integer, Double, String>(n, x, s)}
[ "Creates", "a", "new", "tuple", "and", "assigns", "the", "given", "values", "to", "the", "tuple", "s", "fields", ".", "This", "is", "more", "convenient", "than", "using", "the", "constructor", "because", "the", "compiler", "can", "infer", "the", "generic", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/tuple/Tuple2.java#L191-L194
train
Construct a tuple of two values.
[ 30522, 2270, 10763, 1026, 1056, 2692, 1010, 1056, 2487, 1028, 10722, 10814, 2475, 1026, 1056, 2692, 1010, 1056, 2487, 1028, 1997, 1006, 1056, 2692, 3643, 2692, 1010, 1056, 2487, 3643, 2487, 1007, 1063, 2709, 2047, 10722, 10814, 2475, 1026, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/ErrorPageFilter.java
ErrorPageFilter.getDescription
protected String getDescription(HttpServletRequest request) { String pathInfo = (request.getPathInfo() != null) ? request.getPathInfo() : ""; return "[" + request.getServletPath() + pathInfo + "]"; }
java
protected String getDescription(HttpServletRequest request) { String pathInfo = (request.getPathInfo() != null) ? request.getPathInfo() : ""; return "[" + request.getServletPath() + pathInfo + "]"; }
[ "protected", "String", "getDescription", "(", "HttpServletRequest", "request", ")", "{", "String", "pathInfo", "=", "(", "request", ".", "getPathInfo", "(", ")", "!=", "null", ")", "?", "request", ".", "getPathInfo", "(", ")", ":", "\"\"", ";", "return", "...
Return the description for the given request. By default this method will return a description based on the request {@code servletPath} and {@code pathInfo}. @param request the source request @return the description @since 1.5.0
[ "Return", "the", "description", "for", "the", "given", "request", ".", "By", "default", "this", "method", "will", "return", "a", "description", "based", "on", "the", "request", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/ErrorPageFilter.java#L209-L212
train
Get the description of the request.
[ 30522, 5123, 5164, 2131, 6155, 23235, 3258, 1006, 16770, 2121, 2615, 7485, 2890, 15500, 5227, 1007, 1063, 5164, 4130, 2378, 14876, 1027, 1006, 5227, 1012, 2131, 15069, 2378, 14876, 1006, 1007, 999, 1027, 19701, 1007, 1029, 5227, 1012, 2131,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.readFile
public <OUT> DataStreamSource<OUT> readFile(FileInputFormat<OUT> inputFormat, String filePath) { return readFile(inputFormat, filePath, FileProcessingMode.PROCESS_ONCE, -1); }
java
public <OUT> DataStreamSource<OUT> readFile(FileInputFormat<OUT> inputFormat, String filePath) { return readFile(inputFormat, filePath, FileProcessingMode.PROCESS_ONCE, -1); }
[ "public", "<", "OUT", ">", "DataStreamSource", "<", "OUT", ">", "readFile", "(", "FileInputFormat", "<", "OUT", ">", "inputFormat", ",", "String", "filePath", ")", "{", "return", "readFile", "(", "inputFormat", ",", "filePath", ",", "FileProcessingMode", ".", ...
Reads the contents of the user-specified {@code filePath} based on the given {@link FileInputFormat}. <p>Since all data streams need specific information about their types, this method needs to determine the type of the data produced by the input format. It will attempt to determine the data type by reflection, unless...
[ "Reads", "the", "contents", "of", "the", "user", "-", "specified", "{", "@code", "filePath", "}", "based", "on", "the", "given", "{", "@link", "FileInputFormat", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L994-L997
train
Reads a file from the specified file path using the specified input format.
[ 30522, 2270, 1026, 2041, 1028, 2951, 21422, 6499, 3126, 3401, 1026, 2041, 1028, 3191, 8873, 2571, 1006, 5371, 2378, 18780, 14192, 4017, 1026, 2041, 1028, 7953, 14192, 4017, 1010, 5164, 5371, 15069, 1007, 1063, 2709, 3191, 8873, 2571, 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/configuration/DelegatingConfiguration.java
DelegatingConfiguration.getString
@Override public String getString(String key, String defaultValue) { return this.backingConfig.getString(this.prefix + key, defaultValue); }
java
@Override public String getString(String key, String defaultValue) { return this.backingConfig.getString(this.prefix + key, defaultValue); }
[ "@", "Override", "public", "String", "getString", "(", "String", "key", ",", "String", "defaultValue", ")", "{", "return", "this", ".", "backingConfig", ".", "getString", "(", "this", ".", "prefix", "+", "key", ",", "defaultValue", ")", ";", "}" ]
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/DelegatingConfiguration.java#L72-L75
train
Get a String value from the configuration.
[ 30522, 1030, 2058, 15637, 2270, 5164, 4152, 18886, 3070, 1006, 5164, 3145, 1010, 5164, 12398, 10175, 5657, 1007, 1063, 2709, 2023, 1012, 5150, 8663, 8873, 2290, 1012, 4152, 18886, 3070, 1006, 2023, 1012, 17576, 1009, 3145, 1010, 12398, 1017...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-db/src/main/java/cn/hutool/db/AbstractDb.java
AbstractDb.queryOne
public Entity queryOne(String sql, Object... params) throws SQLException { return query(sql, new EntityHandler(), params); }
java
public Entity queryOne(String sql, Object... params) throws SQLException { return query(sql, new EntityHandler(), params); }
[ "public", "Entity", "queryOne", "(", "String", "sql", ",", "Object", "...", "params", ")", "throws", "SQLException", "{", "return", "query", "(", "sql", ",", "new", "EntityHandler", "(", ")", ",", "params", ")", ";", "}" ]
查询单条记录 @param sql 查询语句 @param params 参数 @return 结果对象 @throws SQLException SQL执行异常
[ "查询单条记录" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/AbstractDb.java#L106-L108
train
Query one entity.
[ 30522, 2270, 9178, 23032, 5643, 1006, 5164, 29296, 1010, 4874, 1012, 1012, 1012, 11498, 5244, 1007, 11618, 29296, 10288, 24422, 1063, 2709, 23032, 1006, 29296, 1010, 2047, 9178, 11774, 3917, 1006, 1007, 1010, 11498, 5244, 1007, 1025, 1065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/S3RecoverableFsDataOutputStream.java
S3RecoverableFsDataOutputStream.openNewPartIfNecessary
private void openNewPartIfNecessary(long sizeThreshold) throws IOException { final long fileLength = fileStream.getPos(); if (fileLength >= sizeThreshold) { lock(); try { uploadCurrentAndOpenNewPart(fileLength); } finally { unlock(); } } }
java
private void openNewPartIfNecessary(long sizeThreshold) throws IOException { final long fileLength = fileStream.getPos(); if (fileLength >= sizeThreshold) { lock(); try { uploadCurrentAndOpenNewPart(fileLength); } finally { unlock(); } } }
[ "private", "void", "openNewPartIfNecessary", "(", "long", "sizeThreshold", ")", "throws", "IOException", "{", "final", "long", "fileLength", "=", "fileStream", ".", "getPos", "(", ")", ";", "if", "(", "fileLength", ">=", "sizeThreshold", ")", "{", "lock", "(",...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/S3RecoverableFsDataOutputStream.java#L178-L188
train
Open a new part if the file size is greater than the threshold.
[ 30522, 2797, 11675, 2330, 2638, 2860, 19362, 3775, 2546, 2638, 9623, 10286, 2100, 1006, 2146, 2946, 2705, 21898, 11614, 1007, 11618, 22834, 10288, 24422, 1063, 2345, 2146, 5371, 7770, 13512, 2232, 1027, 6764, 25379, 1012, 2131, 6873, 2015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/BroadcastConnectedStream.java
BroadcastConnectedStream.process
@PublicEvolving public <KS, OUT> SingleOutputStreamOperator<OUT> process(final KeyedBroadcastProcessFunction<KS, IN1, IN2, OUT> function) { TypeInformation<OUT> outTypeInfo = TypeExtractor.getBinaryOperatorReturnType( function, KeyedBroadcastProcessFunction.class, 1, 2, 3, TypeExtractor.NO_I...
java
@PublicEvolving public <KS, OUT> SingleOutputStreamOperator<OUT> process(final KeyedBroadcastProcessFunction<KS, IN1, IN2, OUT> function) { TypeInformation<OUT> outTypeInfo = TypeExtractor.getBinaryOperatorReturnType( function, KeyedBroadcastProcessFunction.class, 1, 2, 3, TypeExtractor.NO_I...
[ "@", "PublicEvolving", "public", "<", "KS", ",", "OUT", ">", "SingleOutputStreamOperator", "<", "OUT", ">", "process", "(", "final", "KeyedBroadcastProcessFunction", "<", "KS", ",", "IN1", ",", "IN2", ",", "OUT", ">", "function", ")", "{", "TypeInformation", ...
Assumes as inputs a {@link BroadcastStream} and a {@link KeyedStream} and applies the given {@link KeyedBroadcastProcessFunction} on them, thereby creating a transformed output stream. @param function The {@link KeyedBroadcastProcessFunction} that is called for each element in the stream. @param <KS> The type of the k...
[ "Assumes", "as", "inputs", "a", "{", "@link", "BroadcastStream", "}", "and", "a", "{", "@link", "KeyedStream", "}", "and", "applies", "the", "given", "{", "@link", "KeyedBroadcastProcessFunction", "}", "on", "them", "thereby", "creating", "a", "transformed", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/BroadcastConnectedStream.java#L124-L140
train
Process a single - output stream function.
[ 30522, 1030, 2270, 6777, 4747, 6455, 2270, 1026, 29535, 1010, 2041, 1028, 2309, 5833, 18780, 21422, 25918, 8844, 1026, 2041, 1028, 2832, 1006, 2345, 3145, 2098, 12618, 4215, 10526, 21572, 9623, 22747, 4609, 7542, 1026, 29535, 1010, 1999, 24...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-yarn/src/main/java/org/apache/flink/yarn/Utils.java
Utils.deleteApplicationFiles
public static void deleteApplicationFiles(final Map<String, String> env) { final String applicationFilesDir = env.get(YarnConfigKeys.FLINK_YARN_FILES); if (!StringUtils.isNullOrWhitespaceOnly(applicationFilesDir)) { final org.apache.flink.core.fs.Path path = new org.apache.flink.core.fs.Path(applicationFilesDir)...
java
public static void deleteApplicationFiles(final Map<String, String> env) { final String applicationFilesDir = env.get(YarnConfigKeys.FLINK_YARN_FILES); if (!StringUtils.isNullOrWhitespaceOnly(applicationFilesDir)) { final org.apache.flink.core.fs.Path path = new org.apache.flink.core.fs.Path(applicationFilesDir)...
[ "public", "static", "void", "deleteApplicationFiles", "(", "final", "Map", "<", "String", ",", "String", ">", "env", ")", "{", "final", "String", "applicationFilesDir", "=", "env", ".", "get", "(", "YarnConfigKeys", ".", "FLINK_YARN_FILES", ")", ";", "if", "...
Deletes the YARN application files, e.g., Flink binaries, libraries, etc., from the remote filesystem. @param env The environment variables.
[ "Deletes", "the", "YARN", "application", "files", "e", ".", "g", ".", "Flink", "binaries", "libraries", "etc", ".", "from", "the", "remote", "filesystem", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java#L182-L197
train
Delete the application files from the environment.
[ 30522, 2270, 10763, 11675, 3972, 12870, 29098, 19341, 3508, 8873, 4244, 1006, 2345, 4949, 1026, 5164, 1010, 5164, 1028, 4372, 2615, 1007, 1063, 2345, 5164, 4646, 8873, 4244, 4305, 2099, 1027, 4372, 2615, 1012, 2131, 1006, 27158, 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/collection/dartsclone/details/BitVector.java
BitVector.popCount
private static int popCount(int unit) { unit = ((unit & 0xAAAAAAAA) >>> 1) + (unit & 0x55555555); unit = ((unit & 0xCCCCCCCC) >>> 2) + (unit & 0x33333333); unit = ((unit >>> 4) + unit) & 0x0F0F0F0F; unit += unit >>> 8; unit += unit >>> 16; return unit & 0xFF; }
java
private static int popCount(int unit) { unit = ((unit & 0xAAAAAAAA) >>> 1) + (unit & 0x55555555); unit = ((unit & 0xCCCCCCCC) >>> 2) + (unit & 0x33333333); unit = ((unit >>> 4) + unit) & 0x0F0F0F0F; unit += unit >>> 8; unit += unit >>> 16; return unit & 0xFF; }
[ "private", "static", "int", "popCount", "(", "int", "unit", ")", "{", "unit", "=", "(", "(", "unit", "&", "0xAAAAAAAA", ")", ">>>", "1", ")", "+", "(", "unit", "&", "0x55555555", ")", ";", "unit", "=", "(", "(", "unit", "&", "0xCCCCCCCC", ")", ">...
1的数量 @param unit @return
[ "1的数量" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/dartsclone/details/BitVector.java#L122-L130
train
popCount returns the count of the unit in the sequence of bytes.
[ 30522, 2797, 10763, 20014, 3769, 3597, 16671, 1006, 20014, 3131, 1007, 1063, 3131, 1027, 1006, 1006, 3131, 1004, 1014, 18684, 11057, 11057, 11057, 2050, 1007, 1028, 1028, 1028, 1015, 1007, 1009, 1006, 3131, 1004, 1014, 2595, 24087, 24087, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ObjectUtil.java
ObjectUtil.defaultIfNull
public static <T> T defaultIfNull(final T object, final T defaultValue) { return (null != object) ? object : defaultValue; }
java
public static <T> T defaultIfNull(final T object, final T defaultValue) { return (null != object) ? object : defaultValue; }
[ "public", "static", "<", "T", ">", "T", "defaultIfNull", "(", "final", "T", "object", ",", "final", "T", "defaultValue", ")", "{", "return", "(", "null", "!=", "object", ")", "?", "object", ":", "defaultValue", ";", "}" ]
如果给定对象为{@code null}返回默认值 <pre> ObjectUtil.defaultIfNull(null, null) = null ObjectUtil.defaultIfNull(null, "") = "" ObjectUtil.defaultIfNull(null, "zz") = "zz" ObjectUtil.defaultIfNull("abc", *) = "abc" ObjectUtil.defaultIfNull(Boolean.TRUE, *) = Boolean.TRUE </pre> @param <T> 对象类型 @param objec...
[ "如果给定对象为", "{", "@code", "null", "}", "返回默认值" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ObjectUtil.java#L274-L276
train
Returns the default value if the object is null.
[ 30522, 2270, 10763, 1026, 1056, 1028, 1056, 12398, 10128, 11231, 3363, 1006, 2345, 1056, 4874, 1010, 2345, 1056, 12398, 10175, 5657, 1007, 1063, 2709, 1006, 19701, 999, 1027, 4874, 1007, 1029, 4874, 1024, 12398, 10175, 5657, 1025, 1065, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java
ReflectUtil.getPublicMethodNames
public static Set<String> getPublicMethodNames(Class<?> clazz) { final HashSet<String> methodSet = new HashSet<String>(); final Method[] methodArray = getPublicMethods(clazz); if(ArrayUtil.isNotEmpty(methodArray)) { for (Method method : methodArray) { methodSet.add(method.getName()); } } ret...
java
public static Set<String> getPublicMethodNames(Class<?> clazz) { final HashSet<String> methodSet = new HashSet<String>(); final Method[] methodArray = getPublicMethods(clazz); if(ArrayUtil.isNotEmpty(methodArray)) { for (Method method : methodArray) { methodSet.add(method.getName()); } } ret...
[ "public", "static", "Set", "<", "String", ">", "getPublicMethodNames", "(", "Class", "<", "?", ">", "clazz", ")", "{", "final", "HashSet", "<", "String", ">", "methodSet", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "final", "Method", "["...
获得指定类本类及其父类中的Public方法名<br> 去重重载的方法 @param clazz 类 @return 方法名Set
[ "获得指定类本类及其父类中的Public方法名<br", ">", "去重重载的方法" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L281-L290
train
Returns a set of public method names of the given class.
[ 30522, 2270, 10763, 2275, 1026, 5164, 1028, 2131, 14289, 16558, 2594, 11368, 6806, 28911, 7834, 1006, 2465, 1026, 1029, 1028, 18856, 10936, 2480, 1007, 1063, 2345, 23325, 13462, 1026, 5164, 1028, 4725, 3388, 1027, 2047, 23325, 13462, 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-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java
SqlDateTimeUtils.dateSub
public static String dateSub(String dateStr, int days, TimeZone tz) { long ts = parseToTimeMillis(dateStr, tz); if (ts == Long.MIN_VALUE) { return null; } return dateSub(ts, days, tz); }
java
public static String dateSub(String dateStr, int days, TimeZone tz) { long ts = parseToTimeMillis(dateStr, tz); if (ts == Long.MIN_VALUE) { return null; } return dateSub(ts, days, tz); }
[ "public", "static", "String", "dateSub", "(", "String", "dateStr", ",", "int", "days", ",", "TimeZone", "tz", ")", "{", "long", "ts", "=", "parseToTimeMillis", "(", "dateStr", ",", "tz", ")", ";", "if", "(", "ts", "==", "Long", ".", "MIN_VALUE", ")", ...
Do subtraction on date string. @param dateStr formatted date string. @param days days count you want to subtract. @param tz time zone of the date time string @return datetime string.
[ "Do", "subtraction", "on", "date", "string", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java#L755-L761
train
Returns the date string of the specified number of days from the specified date string.
[ 30522, 2270, 10763, 5164, 5246, 12083, 1006, 5164, 5246, 16344, 1010, 20014, 2420, 1010, 2051, 15975, 1056, 2480, 1007, 1063, 2146, 24529, 1027, 11968, 13462, 4140, 14428, 19912, 2483, 1006, 5246, 16344, 1010, 1056, 2480, 1007, 1025, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
handler/src/main/java/io/netty/handler/ssl/OpenSsl.java
OpenSsl.isCipherSuiteAvailable
public static boolean isCipherSuiteAvailable(String cipherSuite) { String converted = CipherSuiteConverter.toOpenSsl(cipherSuite, IS_BORINGSSL); if (converted != null) { cipherSuite = converted; } return AVAILABLE_OPENSSL_CIPHER_SUITES.contains(cipherSuite); }
java
public static boolean isCipherSuiteAvailable(String cipherSuite) { String converted = CipherSuiteConverter.toOpenSsl(cipherSuite, IS_BORINGSSL); if (converted != null) { cipherSuite = converted; } return AVAILABLE_OPENSSL_CIPHER_SUITES.contains(cipherSuite); }
[ "public", "static", "boolean", "isCipherSuiteAvailable", "(", "String", "cipherSuite", ")", "{", "String", "converted", "=", "CipherSuiteConverter", ".", "toOpenSsl", "(", "cipherSuite", ",", "IS_BORINGSSL", ")", ";", "if", "(", "converted", "!=", "null", ")", "...
Returns {@code true} if and only if the specified cipher suite is available in OpenSSL. Both Java-style cipher suite and OpenSSL-style cipher suite are accepted.
[ "Returns", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/OpenSsl.java#L500-L506
train
Check if the specified cipher suite is available in the OpenSSL library.
[ 30522, 2270, 10763, 22017, 20898, 2003, 6895, 27921, 28880, 5243, 3567, 11733, 3468, 1006, 5164, 27715, 28880, 2063, 1007, 1063, 5164, 4991, 1027, 27715, 28880, 8586, 2239, 16874, 2121, 1012, 2205, 11837, 4757, 2140, 1006, 27715, 28880, 2063,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java
UTF8String.toInt
public boolean toInt(IntWrapper intWrapper) { if (numBytes == 0) { return false; } byte b = getByte(0); final boolean negative = b == '-'; int offset = 0; if (negative || b == '+') { offset++; if (numBytes == 1) { return false; } } final byte separator =...
java
public boolean toInt(IntWrapper intWrapper) { if (numBytes == 0) { return false; } byte b = getByte(0); final boolean negative = b == '-'; int offset = 0; if (negative || b == '+') { offset++; if (numBytes == 1) { return false; } } final byte separator =...
[ "public", "boolean", "toInt", "(", "IntWrapper", "intWrapper", ")", "{", "if", "(", "numBytes", "==", "0", ")", "{", "return", "false", ";", "}", "byte", "b", "=", "getByte", "(", "0", ")", ";", "final", "boolean", "negative", "=", "b", "==", "'", ...
Parses this UTF8String to int. Note that, in this method we accumulate the result in negative format, and convert it to positive format at the end, if this string is not started with '-'. This is because min value is bigger than max value in digits, e.g. Integer.MAX_VALUE is '2147483647' and Integer.MIN_VALUE is '-214...
[ "Parses", "this", "UTF8String", "to", "int", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java#L1123-L1194
train
This method is used to check if the integer representation of the field is a valid integer.
[ 30522, 2270, 22017, 20898, 2000, 18447, 1006, 20014, 13088, 29098, 2121, 20014, 13088, 29098, 2121, 1007, 1063, 2065, 1006, 15903, 17250, 2015, 1027, 1027, 1014, 1007, 1063, 2709, 6270, 1025, 1065, 24880, 1038, 1027, 2131, 3762, 2618, 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-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java
DataStream.addSink
public DataStreamSink<T> addSink(SinkFunction<T> sinkFunction) { // read the output type of the input Transform to coax out errors about MissingTypeInfo transformation.getOutputType(); // configure the type if needed if (sinkFunction instanceof InputTypeConfigurable) { ((InputTypeConfigurable) sinkFunction...
java
public DataStreamSink<T> addSink(SinkFunction<T> sinkFunction) { // read the output type of the input Transform to coax out errors about MissingTypeInfo transformation.getOutputType(); // configure the type if needed if (sinkFunction instanceof InputTypeConfigurable) { ((InputTypeConfigurable) sinkFunction...
[ "public", "DataStreamSink", "<", "T", ">", "addSink", "(", "SinkFunction", "<", "T", ">", "sinkFunction", ")", "{", "// read the output type of the input Transform to coax out errors about MissingTypeInfo", "transformation", ".", "getOutputType", "(", ")", ";", "// configur...
Adds the given sink to this DataStream. Only streams with sinks added will be executed once the {@link StreamExecutionEnvironment#execute()} method is called. @param sinkFunction The object containing the sink's invoke function. @return The closed DataStream.
[ "Adds", "the", "given", "sink", "to", "this", "DataStream", ".", "Only", "streams", "with", "sinks", "added", "will", "be", "executed", "once", "the", "{", "@link", "StreamExecutionEnvironment#execute", "()", "}", "method", "is", "called", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L1217-L1233
train
Adds a sink to the DataStream.
[ 30522, 2270, 2951, 21422, 11493, 2243, 1026, 1056, 1028, 9909, 19839, 1006, 7752, 11263, 27989, 1026, 1056, 1028, 7752, 11263, 27989, 1007, 1063, 1013, 1013, 3191, 1996, 6434, 2828, 1997, 1996, 7953, 10938, 2000, 28155, 2595, 2041, 10697, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-db/src/main/java/cn/hutool/db/Entity.java
Entity.getRowId
public RowId getRowId(String field) { Object obj = this.get(field); if (null == obj) { return null; } if (obj instanceof RowId) { return (RowId) obj; } throw new DbRuntimeException("Value of field [{}] is not a rowid!", field); }
java
public RowId getRowId(String field) { Object obj = this.get(field); if (null == obj) { return null; } if (obj instanceof RowId) { return (RowId) obj; } throw new DbRuntimeException("Value of field [{}] is not a rowid!", field); }
[ "public", "RowId", "getRowId", "(", "String", "field", ")", "{", "Object", "obj", "=", "this", ".", "get", "(", "field", ")", ";", "if", "(", "null", "==", "obj", ")", "{", "return", "null", ";", "}", "if", "(", "obj", "instanceof", "RowId", ")", ...
获得rowid @param field rowid属性名 @return RowId
[ "获得rowid" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/Entity.java#L361-L370
train
Gets the value of the designated field in the entity. If the field does not exist in the entity it will be created.
[ 30522, 2270, 5216, 3593, 2131, 10524, 3593, 1006, 5164, 2492, 1007, 1063, 4874, 27885, 3501, 1027, 2023, 1012, 2131, 1006, 2492, 1007, 1025, 2065, 1006, 19701, 1027, 1027, 27885, 3501, 1007, 1063, 2709, 19701, 1025, 1065, 2065, 1006, 27885,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-setting/src/main/java/cn/hutool/setting/profile/Profile.java
Profile.fixNameForProfile
private String fixNameForProfile(String name) { Assert.notBlank(name, "Setting name must be not blank !"); final String actralProfile = StrUtil.nullToEmpty(this.profile); if (false == name.contains(StrUtil.DOT)) { return StrUtil.format("{}/{}.setting", actralProfile, name); } return StrUtil.format("{...
java
private String fixNameForProfile(String name) { Assert.notBlank(name, "Setting name must be not blank !"); final String actralProfile = StrUtil.nullToEmpty(this.profile); if (false == name.contains(StrUtil.DOT)) { return StrUtil.format("{}/{}.setting", actralProfile, name); } return StrUtil.format("{...
[ "private", "String", "fixNameForProfile", "(", "String", "name", ")", "{", "Assert", ".", "notBlank", "(", "name", ",", "\"Setting name must be not blank !\"", ")", ";", "final", "String", "actralProfile", "=", "StrUtil", ".", "nullToEmpty", "(", "this", ".", "p...
修正文件名 @param name 文件名 @return 修正后的文件名
[ "修正文件名" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/profile/Profile.java#L139-L146
train
Fix name for profile.
[ 30522, 2797, 5164, 8081, 18442, 29278, 21572, 8873, 2571, 1006, 5164, 2171, 1007, 1063, 20865, 1012, 2025, 28522, 8950, 1006, 2171, 1010, 1000, 4292, 2171, 2442, 2022, 2025, 8744, 999, 1000, 1007, 1025, 2345, 5164, 2552, 7941, 21572, 8873, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TUserDefinedTypeEntry.java
TUserDefinedTypeEntry.isSet
public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TYPE_CLASS_NAME: return isSetTypeClassName(); } throw new IllegalStateException(); }
java
public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TYPE_CLASS_NAME: return isSetTypeClassName(); } throw new IllegalStateException(); }
[ "public", "boolean", "isSet", "(", "_Fields", "field", ")", "{", "if", "(", "field", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "switch", "(", "field", ")", "{", "case", "TYPE_CLASS_NAME", ":", "return", "isSe...
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
[ "Returns", "true", "if", "field", "corresponding", "to", "fieldID", "is", "set", "(", "has", "been", "assigned", "a", "value", ")", "and", "false", "otherwise" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TUserDefinedTypeEntry.java#L189-L199
train
Checks if the specified field is set to a value of a CRAsCTYPE object.
[ 30522, 2270, 22017, 20898, 26354, 3388, 1006, 1035, 4249, 2492, 1007, 1063, 2065, 1006, 2492, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 6206, 2906, 22850, 15781, 2595, 24422, 1006, 1007, 1025, 1065, 6942, 1006, 2492, 1007, 1063, 2553, 2828...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java
CollUtil.intersection
@SafeVarargs public static <T> Collection<T> intersection(Collection<T> coll1, Collection<T> coll2, Collection<T>... otherColls) { Collection<T> intersection = intersection(coll1, coll2); if (isEmpty(intersection)) { return intersection; } for (Collection<T> coll : otherColls) { intersection = int...
java
@SafeVarargs public static <T> Collection<T> intersection(Collection<T> coll1, Collection<T> coll2, Collection<T>... otherColls) { Collection<T> intersection = intersection(coll1, coll2); if (isEmpty(intersection)) { return intersection; } for (Collection<T> coll : otherColls) { intersection = int...
[ "@", "SafeVarargs", "public", "static", "<", "T", ">", "Collection", "<", "T", ">", "intersection", "(", "Collection", "<", "T", ">", "coll1", ",", "Collection", "<", "T", ">", "coll2", ",", "Collection", "<", "T", ">", "...", "otherColls", ")", "{", ...
多个集合的交集<br> 针对一个集合中存在多个相同元素的情况,计算两个集合中此元素的个数,保留最少的个数<br> 例如:集合1:[a, b, c, c, c],集合2:[a, b, c, c]<br> 结果:[a, b, c, c],此结果中只保留了两个c @param <T> 集合元素类型 @param coll1 集合1 @param coll2 集合2 @param otherColls 其它集合 @return 并集的集合,返回 {@link ArrayList}
[ "多个集合的交集<br", ">", "针对一个集合中存在多个相同元素的情况,计算两个集合中此元素的个数,保留最少的个数<br", ">", "例如:集合1:", "[", "a", "b", "c", "c", "c", "]", ",集合2:", "[", "a", "b", "c", "c", "]", "<br", ">", "结果:", "[", "a", "b", "c", "c", "]", ",此结果中只保留了两个c" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java#L157-L170
train
Returns the intersection of the two collections.
[ 30522, 1030, 3647, 24516, 10623, 2015, 2270, 10763, 1026, 1056, 1028, 3074, 1026, 1056, 1028, 6840, 1006, 3074, 1026, 1056, 1028, 8902, 2140, 2487, 1010, 3074, 1026, 1056, 1028, 8902, 2140, 2475, 1010, 3074, 1026, 1056, 1028, 1012, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunner.java
TaskManagerRunner.startTaskManager
public static TaskExecutor startTaskManager( Configuration configuration, ResourceID resourceID, RpcService rpcService, HighAvailabilityServices highAvailabilityServices, HeartbeatServices heartbeatServices, MetricRegistry metricRegistry, BlobCacheService blobCacheService, boolean localCommunica...
java
public static TaskExecutor startTaskManager( Configuration configuration, ResourceID resourceID, RpcService rpcService, HighAvailabilityServices highAvailabilityServices, HeartbeatServices heartbeatServices, MetricRegistry metricRegistry, BlobCacheService blobCacheService, boolean localCommunica...
[ "public", "static", "TaskExecutor", "startTaskManager", "(", "Configuration", "configuration", ",", "ResourceID", "resourceID", ",", "RpcService", "rpcService", ",", "HighAvailabilityServices", "highAvailabilityServices", ",", "HeartbeatServices", "heartbeatServices", ",", "M...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunner.java#L334-L389
train
Start a TaskManager with the given configuration.
[ 30522, 2270, 10763, 4708, 10288, 8586, 16161, 2099, 2707, 10230, 22287, 5162, 4590, 1006, 9563, 9563, 1010, 7692, 3593, 7692, 3593, 1010, 1054, 15042, 8043, 7903, 2063, 1054, 15042, 8043, 7903, 2063, 1010, 2152, 12462, 11733, 8553, 8043, 79...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/BinaryHashBucketArea.java
BinaryHashBucketArea.startLookup
void startLookup(int hashCode) { final int posHashCode = findBucket(hashCode); // get the bucket for the given hash code final int bucketArrayPos = posHashCode >> table.bucketsPerSegmentBits; final int bucketInSegmentOffset = (posHashCode & table.bucketsPerSegmentMask) << BUCKET_SIZE_BITS; final MemorySegmen...
java
void startLookup(int hashCode) { final int posHashCode = findBucket(hashCode); // get the bucket for the given hash code final int bucketArrayPos = posHashCode >> table.bucketsPerSegmentBits; final int bucketInSegmentOffset = (posHashCode & table.bucketsPerSegmentMask) << BUCKET_SIZE_BITS; final MemorySegmen...
[ "void", "startLookup", "(", "int", "hashCode", ")", "{", "final", "int", "posHashCode", "=", "findBucket", "(", "hashCode", ")", ";", "// get the bucket for the given hash code", "final", "int", "bucketArrayPos", "=", "posHashCode", ">>", "table", ".", "bucketsPerSe...
Probe start lookup joined build rows.
[ "Probe", "start", "lookup", "joined", "build", "rows", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashBucketArea.java#L528-L536
train
Start lookup of the given hash code.
[ 30522, 11675, 2707, 4135, 21940, 2361, 1006, 20014, 23325, 16044, 1007, 1063, 2345, 20014, 13433, 7377, 4095, 16044, 1027, 2424, 24204, 3388, 1006, 23325, 16044, 1007, 1025, 1013, 1013, 2131, 1996, 13610, 2005, 1996, 2445, 23325, 3642, 2345, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
ExecutionEnvironment.registerCachedFilesWithPlan
protected void registerCachedFilesWithPlan(Plan p) throws IOException { for (Tuple2<String, DistributedCacheEntry> entry : cacheFile) { p.registerCachedFile(entry.f0, entry.f1); } }
java
protected void registerCachedFilesWithPlan(Plan p) throws IOException { for (Tuple2<String, DistributedCacheEntry> entry : cacheFile) { p.registerCachedFile(entry.f0, entry.f1); } }
[ "protected", "void", "registerCachedFilesWithPlan", "(", "Plan", "p", ")", "throws", "IOException", "{", "for", "(", "Tuple2", "<", "String", ",", "DistributedCacheEntry", ">", "entry", ":", "cacheFile", ")", "{", "p", ".", "registerCachedFile", "(", "entry", ...
Registers all files that were registered at this execution environment's cache registry of the given plan's cache registry. @param p The plan to register files at. @throws IOException Thrown if checks for existence and sanity fail.
[ "Registers", "all", "files", "that", "were", "registered", "at", "this", "execution", "environment", "s", "cache", "registry", "of", "the", "given", "plan", "s", "cache", "registry", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java#L889-L893
train
Registers all cached files with the given plan.
[ 30522, 5123, 11675, 4236, 3540, 7690, 8873, 4244, 24415, 24759, 2319, 1006, 2933, 1052, 1007, 11618, 22834, 10288, 24422, 1063, 2005, 1006, 10722, 10814, 2475, 1026, 5164, 1010, 5500, 3540, 25923, 3372, 2854, 1028, 4443, 1024, 17053, 8873, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
core/src/main/java/org/apache/spark/io/ReadAheadInputStream.java
ReadAheadInputStream.skipInternal
private long skipInternal(long n) throws IOException { assert (stateChangeLock.isLocked()); waitForAsyncReadComplete(); if (isEndOfStream()) { return 0; } if (available() >= n) { // we can skip from the internal buffers int toSkip = (int) n; // We need to skip from both activ...
java
private long skipInternal(long n) throws IOException { assert (stateChangeLock.isLocked()); waitForAsyncReadComplete(); if (isEndOfStream()) { return 0; } if (available() >= n) { // we can skip from the internal buffers int toSkip = (int) n; // We need to skip from both activ...
[ "private", "long", "skipInternal", "(", "long", "n", ")", "throws", "IOException", "{", "assert", "(", "stateChangeLock", ".", "isLocked", "(", ")", ")", ";", "waitForAsyncReadComplete", "(", ")", ";", "if", "(", "isEndOfStream", "(", ")", ")", "{", "retur...
Internal skip function which should be called only from skip() api. The assumption is that the stateChangeLock is already acquired in the caller before calling this function.
[ "Internal", "skip", "function", "which", "should", "be", "called", "only", "from", "skip", "()", "api", ".", "The", "assumption", "is", "that", "the", "stateChangeLock", "is", "already", "acquired", "in", "the", "caller", "before", "calling", "this", "function...
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/core/src/main/java/org/apache/spark/io/ReadAheadInputStream.java#L336-L366
train
Skip from the underlying input stream.
[ 30522, 2797, 2146, 13558, 18447, 11795, 2389, 1006, 2146, 1050, 1007, 11618, 22834, 10288, 24422, 1063, 20865, 1006, 2110, 22305, 18349, 3600, 1012, 2003, 7878, 2098, 1006, 1007, 1007, 1025, 3524, 29278, 3022, 6038, 16748, 4215, 9006, 10814, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/data/redis/RedisConnectionConfiguration.java
RedisConnectionConfiguration.getClusterConfiguration
protected final RedisClusterConfiguration getClusterConfiguration() { if (this.clusterConfiguration != null) { return this.clusterConfiguration; } if (this.properties.getCluster() == null) { return null; } RedisProperties.Cluster clusterProperties = this.properties.getCluster(); RedisClusterConfigurat...
java
protected final RedisClusterConfiguration getClusterConfiguration() { if (this.clusterConfiguration != null) { return this.clusterConfiguration; } if (this.properties.getCluster() == null) { return null; } RedisProperties.Cluster clusterProperties = this.properties.getCluster(); RedisClusterConfigurat...
[ "protected", "final", "RedisClusterConfiguration", "getClusterConfiguration", "(", ")", "{", "if", "(", "this", ".", "clusterConfiguration", "!=", "null", ")", "{", "return", "this", ".", "clusterConfiguration", ";", "}", "if", "(", "this", ".", "properties", "....
Create a {@link RedisClusterConfiguration} if necessary. @return {@literal null} if no cluster settings are set.
[ "Create", "a", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisConnectionConfiguration.java#L95-L112
train
Gets the cluster configuration.
[ 30522, 5123, 2345, 2417, 2483, 20464, 19966, 2121, 8663, 8873, 27390, 3370, 2131, 20464, 19966, 2121, 8663, 8873, 27390, 3370, 1006, 1007, 1063, 2065, 1006, 2023, 1012, 9324, 8663, 8873, 27390, 3370, 999, 1027, 19701, 1007, 1063, 2709, 2023...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/accumulators/AccumulatorHelper.java
AccumulatorHelper.deserializeAccumulators
public static Map<String, OptionalFailure<Object>> deserializeAccumulators( Map<String, SerializedValue<OptionalFailure<Object>>> serializedAccumulators, ClassLoader loader) throws IOException, ClassNotFoundException { if (serializedAccumulators == null || serializedAccumulators.isEmpty()) { return Collecti...
java
public static Map<String, OptionalFailure<Object>> deserializeAccumulators( Map<String, SerializedValue<OptionalFailure<Object>>> serializedAccumulators, ClassLoader loader) throws IOException, ClassNotFoundException { if (serializedAccumulators == null || serializedAccumulators.isEmpty()) { return Collecti...
[ "public", "static", "Map", "<", "String", ",", "OptionalFailure", "<", "Object", ">", ">", "deserializeAccumulators", "(", "Map", "<", "String", ",", "SerializedValue", "<", "OptionalFailure", "<", "Object", ">", ">", ">", "serializedAccumulators", ",", "ClassLo...
Takes the serialized accumulator results and tries to deserialize them using the provided class loader. @param serializedAccumulators The serialized accumulator results. @param loader The class loader to use. @return The deserialized accumulator results. @throws IOException @throws ClassNotFoundException
[ "Takes", "the", "serialized", "accumulator", "results", "and", "tries", "to", "deserialize", "them", "using", "the", "provided", "class", "loader", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/accumulators/AccumulatorHelper.java#L184-L205
train
Deserializes the given accumulators map.
[ 30522, 2270, 10763, 4949, 1026, 5164, 1010, 11887, 7011, 4014, 5397, 1026, 4874, 1028, 1028, 4078, 11610, 3669, 4371, 6305, 24894, 20350, 2015, 1006, 4949, 1026, 5164, 1010, 27289, 10175, 5657, 1026, 11887, 7011, 4014, 5397, 1026, 4874, 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-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/JobLeaderService.java
JobLeaderService.reconnect
public void reconnect(final JobID jobId) { Preconditions.checkNotNull(jobId, "JobID must not be null."); final Tuple2<LeaderRetrievalService, JobManagerLeaderListener> jobLeaderService = jobLeaderServices.get(jobId); if (jobLeaderService != null) { jobLeaderService.f1.reconnect(); } else { LOG.info("Can...
java
public void reconnect(final JobID jobId) { Preconditions.checkNotNull(jobId, "JobID must not be null."); final Tuple2<LeaderRetrievalService, JobManagerLeaderListener> jobLeaderService = jobLeaderServices.get(jobId); if (jobLeaderService != null) { jobLeaderService.f1.reconnect(); } else { LOG.info("Can...
[ "public", "void", "reconnect", "(", "final", "JobID", "jobId", ")", "{", "Preconditions", ".", "checkNotNull", "(", "jobId", ",", "\"JobID must not be null.\"", ")", ";", "final", "Tuple2", "<", "LeaderRetrievalService", ",", "JobManagerLeaderListener", ">", "jobLea...
Triggers reconnection to the last known leader of the given job. @param jobId specifying the job for which to trigger reconnection
[ "Triggers", "reconnection", "to", "the", "last", "known", "leader", "of", "the", "given", "job", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/JobLeaderService.java#L216-L226
train
Reconnect to the given job.
[ 30522, 2270, 11675, 28667, 18256, 6593, 1006, 2345, 3105, 3593, 3105, 3593, 1007, 1063, 3653, 8663, 20562, 2015, 1012, 4638, 17048, 11231, 3363, 1006, 3105, 3593, 1010, 1000, 3105, 3593, 2442, 2025, 2022, 19701, 1012, 1000, 1007, 1025, 2345...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/utils/ParquetRecordReader.java
ParquetRecordReader.getCurrentReadPosition
public Tuple2<Long, Long> getCurrentReadPosition() { // compute number of returned records long numRecordsReturned = numReadRecords; if (!readRecordReturned && numReadRecords > 0) { numRecordsReturned -= 1; } if (numRecordsReturned == numTotalRecords) { // all records of split returned. return Tupl...
java
public Tuple2<Long, Long> getCurrentReadPosition() { // compute number of returned records long numRecordsReturned = numReadRecords; if (!readRecordReturned && numReadRecords > 0) { numRecordsReturned -= 1; } if (numRecordsReturned == numTotalRecords) { // all records of split returned. return Tupl...
[ "public", "Tuple2", "<", "Long", ",", "Long", ">", "getCurrentReadPosition", "(", ")", "{", "// compute number of returned records", "long", "numRecordsReturned", "=", "numReadRecords", ";", "if", "(", "!", "readRecordReturned", "&&", "numReadRecords", ">", "0", ")"...
Returns the current read position in the split, i.e., the current block and the number of records that were returned from that block. @return The current read position in the split.
[ "Returns", "the", "current", "read", "position", "in", "the", "split", "i", ".", "e", ".", "the", "current", "block", "and", "the", "number", "of", "records", "that", "were", "returned", "from", "that", "block", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/utils/ParquetRecordReader.java#L168-L189
train
Returns the current read position of the split.
[ 30522, 2270, 10722, 10814, 2475, 1026, 2146, 1010, 2146, 1028, 2131, 10841, 14343, 3372, 16416, 18927, 19234, 1006, 1007, 1063, 1013, 1013, 24134, 2193, 1997, 2513, 2636, 2146, 16371, 2213, 2890, 27108, 5104, 13465, 21737, 2094, 1027, 16371, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.distinct
public DistinctOperator<T> distinct(int... fields) { return new DistinctOperator<>(this, new Keys.ExpressionKeys<>(fields, getType()), Utils.getCallLocationName()); }
java
public DistinctOperator<T> distinct(int... fields) { return new DistinctOperator<>(this, new Keys.ExpressionKeys<>(fields, getType()), Utils.getCallLocationName()); }
[ "public", "DistinctOperator", "<", "T", ">", "distinct", "(", "int", "...", "fields", ")", "{", "return", "new", "DistinctOperator", "<>", "(", "this", ",", "new", "Keys", ".", "ExpressionKeys", "<>", "(", "fields", ",", "getType", "(", ")", ")", ",", ...
Returns a distinct set of a {@link Tuple} {@link DataSet} using field position keys. <p>The field position keys specify the fields of Tuples on which the decision is made if two Tuples are distinct or not. <p>Note: Field position keys can only be specified for Tuple DataSets. @param fields One or more field position...
[ "Returns", "a", "distinct", "set", "of", "a", "{", "@link", "Tuple", "}", "{", "@link", "DataSet", "}", "using", "field", "position", "keys", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L612-L614
train
Create a distinct expression from this expression.
[ 30522, 2270, 5664, 25918, 8844, 1026, 1056, 1028, 5664, 1006, 20014, 1012, 1012, 1012, 4249, 1007, 1063, 2709, 2047, 5664, 25918, 8844, 1026, 1028, 1006, 2023, 1010, 2047, 6309, 1012, 3670, 14839, 2015, 1026, 1028, 1006, 4249, 1010, 2131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/model/perceptron/model/StructuredPerceptron.java
StructuredPerceptron.update
public void update(Instance instance) { int[] guessLabel = new int[instance.length()]; viterbiDecode(instance, guessLabel); TagSet tagSet = featureMap.tagSet; for (int i = 0; i < instance.length(); i++) { int[] featureVector = instance.getFeatureAt(i); ...
java
public void update(Instance instance) { int[] guessLabel = new int[instance.length()]; viterbiDecode(instance, guessLabel); TagSet tagSet = featureMap.tagSet; for (int i = 0; i < instance.length(); i++) { int[] featureVector = instance.getFeatureAt(i); ...
[ "public", "void", "update", "(", "Instance", "instance", ")", "{", "int", "[", "]", "guessLabel", "=", "new", "int", "[", "instance", ".", "length", "(", ")", "]", ";", "viterbiDecode", "(", "instance", ",", "guessLabel", ")", ";", "TagSet", "tagSet", ...
在线学习 @param instance 样本
[ "在线学习" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/perceptron/model/StructuredPerceptron.java#L65-L84
train
Update the n - grams of a single instance.
[ 30522, 2270, 11675, 10651, 1006, 6013, 6013, 1007, 1063, 20014, 1031, 1033, 3984, 20470, 2884, 1027, 2047, 20014, 1031, 6013, 1012, 3091, 1006, 1007, 1033, 1025, 6819, 3334, 17062, 8586, 10244, 1006, 6013, 1010, 3984, 20470, 2884, 1007, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Console.java
Console.printProgress
public static void printProgress(char showChar, int len) { print("{}{}", CharUtil.CR, StrUtil.repeat(showChar, len)); }
java
public static void printProgress(char showChar, int len) { print("{}{}", CharUtil.CR, StrUtil.repeat(showChar, len)); }
[ "public", "static", "void", "printProgress", "(", "char", "showChar", ",", "int", "len", ")", "{", "print", "(", "\"{}{}\"", ",", "CharUtil", ".", "CR", ",", "StrUtil", ".", "repeat", "(", "showChar", ",", "len", ")", ")", ";", "}" ]
打印进度条 @param showChar 进度条提示字符,例如“#” @param len 打印长度 @since 4.5.6
[ "打印进度条" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Console.java#L62-L64
train
Print progress.
[ 30522, 2270, 10763, 11675, 6140, 21572, 17603, 4757, 1006, 25869, 2265, 7507, 2099, 1010, 20014, 18798, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.loopFiles
public static List<File> loopFiles(String path, FileFilter fileFilter) { return loopFiles(file(path), fileFilter); }
java
public static List<File> loopFiles(String path, FileFilter fileFilter) { return loopFiles(file(path), fileFilter); }
[ "public", "static", "List", "<", "File", ">", "loopFiles", "(", "String", "path", ",", "FileFilter", "fileFilter", ")", "{", "return", "loopFiles", "(", "file", "(", "path", ")", ",", "fileFilter", ")", ";", "}" ]
递归遍历目录以及子目录中的所有文件<br> 如果提供file为文件,直接返回过滤结果 @param path 当前遍历文件或目录的路径 @param fileFilter 文件过滤规则对象,选择要保留的文件,只对文件有效,不过滤目录 @return 文件列表 @since 3.2.0
[ "递归遍历目录以及子目录中的所有文件<br", ">", "如果提供file为文件,直接返回过滤结果" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L187-L189
train
Loop through files in path.
[ 30522, 2270, 10763, 2862, 1026, 5371, 1028, 7077, 8873, 4244, 1006, 5164, 4130, 1010, 5371, 8873, 21928, 5371, 8873, 21928, 1007, 1063, 2709, 7077, 8873, 4244, 1006, 5371, 1006, 4130, 1007, 1010, 5371, 8873, 21928, 1007, 1025, 1065, 102, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ReUtil.java
ReUtil.findAll
public static <T extends Collection<String>> T findAll(Pattern pattern, CharSequence content, int group, T collection) { if (null == pattern || null == content) { return null; } if (null == collection) { throw new NullPointerException("Null collection param provided!"); } final Matcher matche...
java
public static <T extends Collection<String>> T findAll(Pattern pattern, CharSequence content, int group, T collection) { if (null == pattern || null == content) { return null; } if (null == collection) { throw new NullPointerException("Null collection param provided!"); } final Matcher matche...
[ "public", "static", "<", "T", "extends", "Collection", "<", "String", ">", ">", "T", "findAll", "(", "Pattern", "pattern", ",", "CharSequence", "content", ",", "int", "group", ",", "T", "collection", ")", "{", "if", "(", "null", "==", "pattern", "||", ...
取得内容中匹配的所有结果 @param <T> 集合类型 @param pattern 编译后的正则模式 @param content 被查找的内容 @param group 正则的分组 @param collection 返回的集合类型 @return 结果集
[ "取得内容中匹配的所有结果" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReUtil.java#L457-L471
train
Finds all the groups in the specified string in the specified pattern in the specified CharSequence.
[ 30522, 2270, 10763, 1026, 1056, 8908, 3074, 1026, 5164, 1028, 1028, 1056, 2424, 8095, 1006, 5418, 5418, 1010, 25869, 3366, 4226, 5897, 4180, 1010, 20014, 2177, 1010, 1056, 3074, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 5418, 1064, 1064, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java
SegmentsUtil.setChar
public static void setChar(MemorySegment[] segments, int offset, char value) { if (inFirstSegment(segments, offset, 2)) { segments[0].putChar(offset, value); } else { setCharMultiSegments(segments, offset, value); } }
java
public static void setChar(MemorySegment[] segments, int offset, char value) { if (inFirstSegment(segments, offset, 2)) { segments[0].putChar(offset, value); } else { setCharMultiSegments(segments, offset, value); } }
[ "public", "static", "void", "setChar", "(", "MemorySegment", "[", "]", "segments", ",", "int", "offset", ",", "char", "value", ")", "{", "if", "(", "inFirstSegment", "(", "segments", ",", "offset", ",", "2", ")", ")", "{", "segments", "[", "0", "]", ...
set char from segments. @param segments target segments. @param offset value offset.
[ "set", "char", "from", "segments", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java#L1002-L1008
train
set char from segments.
[ 30522, 2270, 10763, 11675, 2275, 7507, 2099, 1006, 3638, 3366, 21693, 4765, 1031, 1033, 9214, 1010, 20014, 16396, 1010, 25869, 3643, 1007, 1063, 2065, 1006, 1999, 8873, 12096, 3366, 21693, 4765, 1006, 9214, 1010, 16396, 1010, 1016, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeExternalSorter.java
UnsafeExternalSorter.merge
public void merge(UnsafeExternalSorter other) throws IOException { other.spill(); spillWriters.addAll(other.spillWriters); // remove them from `spillWriters`, or the files will be deleted in `cleanupResources`. other.spillWriters.clear(); other.cleanupResources(); }
java
public void merge(UnsafeExternalSorter other) throws IOException { other.spill(); spillWriters.addAll(other.spillWriters); // remove them from `spillWriters`, or the files will be deleted in `cleanupResources`. other.spillWriters.clear(); other.cleanupResources(); }
[ "public", "void", "merge", "(", "UnsafeExternalSorter", "other", ")", "throws", "IOException", "{", "other", ".", "spill", "(", ")", ";", "spillWriters", ".", "addAll", "(", "other", ".", "spillWriters", ")", ";", "// remove them from `spillWriters`, or the files wi...
Merges another UnsafeExternalSorters into this one, the other one will be emptied. @throws IOException
[ "Merges", "another", "UnsafeExternalSorters", "into", "this", "one", "the", "other", "one", "will", "be", "emptied", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeExternalSorter.java#L453-L459
train
Merge the two Sorters.
[ 30522, 2270, 11675, 13590, 1006, 25135, 10288, 16451, 9777, 11589, 2121, 2060, 1007, 11618, 22834, 10288, 24422, 1063, 2060, 1012, 14437, 1006, 1007, 1025, 14437, 15994, 2015, 1012, 5587, 8095, 1006, 2060, 1012, 14437, 15994, 2015, 1007, 1025...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-setting/src/main/java/cn/hutool/setting/Setting.java
Setting.getAndRemove
public Object getAndRemove(String... keys) { Object value = null; for (String key : keys) { value = remove(key); if (null != value) { break; } } return value; }
java
public Object getAndRemove(String... keys) { Object value = null; for (String key : keys) { value = remove(key); if (null != value) { break; } } return value; }
[ "public", "Object", "getAndRemove", "(", "String", "...", "keys", ")", "{", "Object", "value", "=", "null", ";", "for", "(", "String", "key", ":", "keys", ")", "{", "value", "=", "remove", "(", "key", ")", ";", "if", "(", "null", "!=", "value", ")"...
获取并删除键值对,当指定键对应值非空时,返回并删除这个值,后边的键对应的值不再查找 @param keys 键列表,常用于别名 @return 值 @since 3.1.2
[ "获取并删除键值对,当指定键对应值非空时,返回并删除这个值,后边的键对应的值不再查找" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/Setting.java#L229-L238
train
Gets the value of the specified keys from the map and returns the corresponding value.
[ 30522, 2270, 4874, 2131, 5685, 28578, 21818, 1006, 5164, 1012, 1012, 1012, 6309, 1007, 1063, 4874, 3643, 1027, 19701, 1025, 2005, 1006, 5164, 3145, 1024, 6309, 1007, 1063, 3643, 1027, 6366, 1006, 3145, 1007, 1025, 2065, 1006, 19701, 999, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/Zodiac.java
Zodiac.getChineseZodiac
public static String getChineseZodiac(Calendar calendar) { if (null == calendar) { return null; } return getChineseZodiac(calendar.get(Calendar.YEAR)); }
java
public static String getChineseZodiac(Calendar calendar) { if (null == calendar) { return null; } return getChineseZodiac(calendar.get(Calendar.YEAR)); }
[ "public", "static", "String", "getChineseZodiac", "(", "Calendar", "calendar", ")", "{", "if", "(", "null", "==", "calendar", ")", "{", "return", "null", ";", "}", "return", "getChineseZodiac", "(", "calendar", ".", "get", "(", "Calendar", ".", "YEAR", ")"...
通过生日计算生肖,只计算1900年后出生的人 @param calendar 出生日期(年需农历) @return 星座名
[ "通过生日计算生肖,只计算1900年后出生的人" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/Zodiac.java#L84-L89
train
Returns the date part of the date in the format YMMDD.
[ 30522, 2270, 10763, 5164, 2131, 17231, 6810, 6844, 9032, 2278, 1006, 8094, 8094, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 8094, 1007, 1063, 2709, 19701, 1025, 1065, 2709, 2131, 17231, 6810, 6844, 9032, 2278, 1006, 8094, 1012, 2131, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-dfa/src/main/java/cn/hutool/dfa/SensitiveUtil.java
SensitiveUtil.init
public static void init(String sensitiveWords, char separator, boolean isAsync){ if(StrUtil.isNotBlank(sensitiveWords)){ init(StrUtil.split(sensitiveWords, separator), isAsync); } }
java
public static void init(String sensitiveWords, char separator, boolean isAsync){ if(StrUtil.isNotBlank(sensitiveWords)){ init(StrUtil.split(sensitiveWords, separator), isAsync); } }
[ "public", "static", "void", "init", "(", "String", "sensitiveWords", ",", "char", "separator", ",", "boolean", "isAsync", ")", "{", "if", "(", "StrUtil", ".", "isNotBlank", "(", "sensitiveWords", ")", ")", "{", "init", "(", "StrUtil", ".", "split", "(", ...
初始化敏感词树 @param sensitiveWords 敏感词列表组成的字符串 @param isAsync 是否异步初始化 @param separator 分隔符
[ "初始化敏感词树" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-dfa/src/main/java/cn/hutool/dfa/SensitiveUtil.java#L65-L69
train
Initializes the instance with the specified sensitive words.
[ 30522, 2270, 10763, 11675, 1999, 4183, 1006, 5164, 7591, 22104, 1010, 25869, 19802, 25879, 2953, 1010, 22017, 20898, 18061, 6508, 12273, 1007, 1063, 2065, 1006, 2358, 22134, 4014, 1012, 3475, 4140, 28522, 8950, 1006, 7591, 22104, 1007, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ClassUtil.java
ClassUtil.getDeclaredField
public static Field getDeclaredField(Class<?> clazz, String fieldName) throws SecurityException { if (null == clazz || StrUtil.isBlank(fieldName)) { return null; } try { return clazz.getDeclaredField(fieldName); } catch (NoSuchFieldException e) { // e.printStackTrace(); } return null; }
java
public static Field getDeclaredField(Class<?> clazz, String fieldName) throws SecurityException { if (null == clazz || StrUtil.isBlank(fieldName)) { return null; } try { return clazz.getDeclaredField(fieldName); } catch (NoSuchFieldException e) { // e.printStackTrace(); } return null; }
[ "public", "static", "Field", "getDeclaredField", "(", "Class", "<", "?", ">", "clazz", ",", "String", "fieldName", ")", "throws", "SecurityException", "{", "if", "(", "null", "==", "clazz", "||", "StrUtil", ".", "isBlank", "(", "fieldName", ")", ")", "{", ...
查找指定类中的所有字段(包括非public字段), 字段不存在则返回<code>null</code> @param clazz 被查找字段的类 @param fieldName 字段名 @return 字段 @throws SecurityException 安全异常
[ "查找指定类中的所有字段(包括非public字段),", "字段不存在则返回<code", ">", "null<", "/", "code", ">" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ClassUtil.java#L354-L364
train
Gets the field with the specified name from the specified class.
[ 30522, 2270, 10763, 2492, 2131, 3207, 20464, 12069, 20952, 12891, 1006, 2465, 1026, 1029, 1028, 18856, 10936, 2480, 1010, 5164, 2492, 18442, 1007, 11618, 3036, 10288, 24422, 1063, 2065, 1006, 19701, 1027, 1027, 18856, 10936, 2480, 1064, 1064,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
networknt/light-4j
registry/src/main/java/com/networknt/registry/support/command/CommandServiceManager.java
CommandServiceManager.buildWeightsMap
private void buildWeightsMap(Map<String, Integer> weights, RpcCommand.ClientCommand command) { for (String rule : command.getMergeGroups()) { String[] gw = rule.split(":"); int weight = 1; if (gw.length > 1) { try { weight = Integer.parseIn...
java
private void buildWeightsMap(Map<String, Integer> weights, RpcCommand.ClientCommand command) { for (String rule : command.getMergeGroups()) { String[] gw = rule.split(":"); int weight = 1; if (gw.length > 1) { try { weight = Integer.parseIn...
[ "private", "void", "buildWeightsMap", "(", "Map", "<", "String", ",", "Integer", ">", "weights", ",", "RpcCommand", ".", "ClientCommand", "command", ")", "{", "for", "(", "String", "rule", ":", "command", ".", "getMergeGroups", "(", ")", ")", "{", "String"...
/* @Override public void notifyCommand(URL serviceUrl, String commandString) { if(logger.isInfoEnabled()) logger.info("CommandServiceManager notify command. service:" + serviceUrl.toSimpleString() + ", command:" + commandString); if (!SwitcherUtil.isOpen(LIGHT_COMMAND_SWITCHER) || commandString == null) { if(logger.is...
[ "/", "*", "@Override", "public", "void", "notifyCommand", "(", "URL", "serviceUrl", "String", "commandString", ")", "{", "if", "(", "logger", ".", "isInfoEnabled", "()", ")", "logger", ".", "info", "(", "CommandServiceManager", "notify", "command", ".", "servi...
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/registry/src/main/java/com/networknt/registry/support/command/CommandServiceManager.java#L261-L277
train
Build weights map.
[ 30522, 2797, 11675, 3857, 11179, 26212, 2361, 1006, 4949, 1026, 5164, 1010, 16109, 1028, 15871, 1010, 1054, 15042, 9006, 2386, 2094, 1012, 7396, 9006, 2386, 2094, 3094, 1007, 1063, 2005, 1006, 5164, 3627, 1024, 3094, 1012, 2131, 5017, 3351,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/HttpRequest.java
HttpRequest.appendPart
private void appendPart(String formFieldName, Resource resource, OutputStream out) { if (resource instanceof MultiResource) { // 多资源 for (Resource subResource : (MultiResource) resource) { appendPart(formFieldName, subResource, out); } } else { // 普通资源 final StringBuilder builder = StrUti...
java
private void appendPart(String formFieldName, Resource resource, OutputStream out) { if (resource instanceof MultiResource) { // 多资源 for (Resource subResource : (MultiResource) resource) { appendPart(formFieldName, subResource, out); } } else { // 普通资源 final StringBuilder builder = StrUti...
[ "private", "void", "appendPart", "(", "String", "formFieldName", ",", "Resource", "resource", ",", "OutputStream", "out", ")", "{", "if", "(", "resource", "instanceof", "MultiResource", ")", "{", "// 多资源\r", "for", "(", "Resource", "subResource", ":", "(", "Mu...
添加Multipart表单的数据项 @param formFieldName 表单名 @param resource 资源,可以是文件等 @param out Http流 @since 4.1.0
[ "添加Multipart表单的数据项" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpRequest.java#L1075-L1098
train
Append part.
[ 30522, 2797, 11675, 10439, 10497, 19362, 2102, 1006, 5164, 2433, 3790, 18442, 1010, 7692, 7692, 1010, 27852, 25379, 2041, 1007, 1063, 2065, 1006, 7692, 6013, 11253, 4800, 6072, 8162, 3401, 1007, 1063, 1013, 1013, 100, 100, 100, 2005, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-metrics/flink-metrics-jmx/src/main/java/org/apache/flink/metrics/jmx/JMXReporter.java
JMXReporter.notifyOfAddedMetric
@Override public void notifyOfAddedMetric(Metric metric, String metricName, MetricGroup group) { final String domain = generateJmxDomain(metricName, group); final Hashtable<String, String> table = generateJmxTable(group.getAllVariables()); AbstractBean jmxMetric; ObjectName jmxName; try { jmxName = new O...
java
@Override public void notifyOfAddedMetric(Metric metric, String metricName, MetricGroup group) { final String domain = generateJmxDomain(metricName, group); final Hashtable<String, String> table = generateJmxTable(group.getAllVariables()); AbstractBean jmxMetric; ObjectName jmxName; try { jmxName = new O...
[ "@", "Override", "public", "void", "notifyOfAddedMetric", "(", "Metric", "metric", ",", "String", "metricName", ",", "MetricGroup", "group", ")", "{", "final", "String", "domain", "=", "generateJmxDomain", "(", "metricName", ",", "group", ")", ";", "final", "H...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-metrics/flink-metrics-jmx/src/main/java/org/apache/flink/metrics/jmx/JMXReporter.java#L154-L199
train
Notifies the reporter that a metric has been added to the registry.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2025, 8757, 11253, 4215, 5732, 12589, 1006, 12046, 12046, 1010, 5164, 12046, 18442, 1010, 12046, 17058, 2177, 1007, 1063, 2345, 5164, 5884, 1027, 9699, 24703, 2595, 9527, 8113, 1006, 12046, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Assert.java
Assert.notEmpty
public static <K, V> Map<K, V> notEmpty(Map<K, V> map, String errorMsgTemplate, Object... params) throws IllegalArgumentException { if (CollectionUtil.isEmpty(map)) { throw new IllegalArgumentException(StrUtil.format(errorMsgTemplate, params)); } return map; }
java
public static <K, V> Map<K, V> notEmpty(Map<K, V> map, String errorMsgTemplate, Object... params) throws IllegalArgumentException { if (CollectionUtil.isEmpty(map)) { throw new IllegalArgumentException(StrUtil.format(errorMsgTemplate, params)); } return map; }
[ "public", "static", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "V", ">", "notEmpty", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "String", "errorMsgTemplate", ",", "Object", "...", "params", ")", "throws", "IllegalArgumentException", "{", "i...
断言给定Map非空 <pre class="code"> Assert.notEmpty(map, "Map must have entries"); </pre> @param <K> Key类型 @param <V> Value类型 @param map 被检查的Map @param errorMsgTemplate 异常时的消息模板 @param params 参数列表 @return 被检查的Map @throws IllegalArgumentException if the map is {@code null} or has no entries
[ "断言给定Map非空" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Assert.java#L390-L395
train
Returns a map whose keys are not null and values are not null.
[ 30522, 2270, 10763, 1026, 1047, 1010, 1058, 1028, 4949, 1026, 1047, 1010, 1058, 1028, 3602, 27718, 2100, 1006, 4949, 1026, 1047, 1010, 1058, 1028, 4949, 1010, 5164, 7561, 5244, 13512, 6633, 15725, 1010, 4874, 1012, 1012, 1012, 11498, 5244, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/json/JsonObjectDecoder.java
JsonObjectDecoder.extractObject
@SuppressWarnings("UnusedParameters") protected ByteBuf extractObject(ChannelHandlerContext ctx, ByteBuf buffer, int index, int length) { return buffer.retainedSlice(index, length); }
java
@SuppressWarnings("UnusedParameters") protected ByteBuf extractObject(ChannelHandlerContext ctx, ByteBuf buffer, int index, int length) { return buffer.retainedSlice(index, length); }
[ "@", "SuppressWarnings", "(", "\"UnusedParameters\"", ")", "protected", "ByteBuf", "extractObject", "(", "ChannelHandlerContext", "ctx", ",", "ByteBuf", "buffer", ",", "int", "index", ",", "int", "length", ")", "{", "return", "buffer", ".", "retainedSlice", "(", ...
Override this method if you want to filter the json objects/arrays that get passed through the pipeline.
[ "Override", "this", "method", "if", "you", "want", "to", "filter", "the", "json", "objects", "/", "arrays", "that", "get", "passed", "through", "the", "pipeline", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/json/JsonObjectDecoder.java#L190-L193
train
Extract the object from the buffer.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 15171, 28689, 22828, 2015, 1000, 1007, 5123, 24880, 8569, 2546, 14817, 16429, 20614, 1006, 3149, 11774, 3917, 8663, 18209, 14931, 2595, 1010, 24880, 8569, 2546, 17698, 1010, 20014, 5950, 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-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBFullRestoreOperation.java
RocksDBFullRestoreOperation.restoreKVStateData
private void restoreKVStateData() throws IOException, RocksDBException { //for all key-groups in the current state handle... try (RocksDBWriteBatchWrapper writeBatchWrapper = new RocksDBWriteBatchWrapper(db)) { for (Tuple2<Integer, Long> keyGroupOffset : currentKeyGroupsStateHandle.getGroupRangeOffsets()) { ...
java
private void restoreKVStateData() throws IOException, RocksDBException { //for all key-groups in the current state handle... try (RocksDBWriteBatchWrapper writeBatchWrapper = new RocksDBWriteBatchWrapper(db)) { for (Tuple2<Integer, Long> keyGroupOffset : currentKeyGroupsStateHandle.getGroupRangeOffsets()) { ...
[ "private", "void", "restoreKVStateData", "(", ")", "throws", "IOException", ",", "RocksDBException", "{", "//for all key-groups in the current state handle...", "try", "(", "RocksDBWriteBatchWrapper", "writeBatchWrapper", "=", "new", "RocksDBWriteBatchWrapper", "(", "db", ")"...
Restore the KV-state / ColumnFamily data for all key-groups referenced by the current state handle.
[ "Restore", "the", "KV", "-", "state", "/", "ColumnFamily", "data", "for", "all", "key", "-", "groups", "referenced", "by", "the", "current", "state", "handle", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBFullRestoreOperation.java#L189-L233
train
Restore the data from the current state handle to the DB.
[ 30522, 2797, 11675, 9239, 2243, 15088, 16238, 6790, 1006, 1007, 11618, 22834, 10288, 24422, 1010, 5749, 18939, 10288, 24422, 1063, 1013, 1013, 2005, 2035, 3145, 1011, 2967, 1999, 1996, 2783, 2110, 5047, 1012, 1012, 1012, 3046, 1006, 5749, 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/HttpUtil.java
HttpUtil.isKeepAlive
public static boolean isKeepAlive(HttpMessage message) { return !message.headers().containsValue(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE, true) && (message.protocolVersion().isKeepAliveDefault() || message.headers().containsValue(HttpHeaderNames.CONNECTION, HttpHeaderVa...
java
public static boolean isKeepAlive(HttpMessage message) { return !message.headers().containsValue(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE, true) && (message.protocolVersion().isKeepAliveDefault() || message.headers().containsValue(HttpHeaderNames.CONNECTION, HttpHeaderVa...
[ "public", "static", "boolean", "isKeepAlive", "(", "HttpMessage", "message", ")", "{", "return", "!", "message", ".", "headers", "(", ")", ".", "containsValue", "(", "HttpHeaderNames", ".", "CONNECTION", ",", "HttpHeaderValues", ".", "CLOSE", ",", "true", ")",...
Returns {@code true} if and only if the connection can remain open and thus 'kept alive'. This methods respects the value of the. {@code "Connection"} header first and then the return value of {@link HttpVersion#isKeepAliveDefault()}.
[ "Returns", "{", "@code", "true", "}", "if", "and", "only", "if", "the", "connection", "can", "remain", "open", "and", "thus", "kept", "alive", ".", "This", "methods", "respects", "the", "value", "of", "the", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java#L67-L71
train
Check if the given message is a keepalive request.
[ 30522, 2270, 10763, 22017, 30524, 2015, 1012, 4434, 1010, 8299, 4974, 2121, 10175, 15808, 1012, 2485, 1010, 2995, 1007, 1004, 1004, 1006, 4471, 1012, 8778, 27774, 1006, 1007, 1012, 2003, 20553, 12952, 3512, 3207, 7011, 11314, 1006, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java
SpringApplication.run
public ConfigurableApplicationContext run(String... args) { StopWatch stopWatch = new StopWatch(); stopWatch.start(); ConfigurableApplicationContext context = null; Collection<SpringBootExceptionReporter> exceptionReporters = new ArrayList<>(); configureHeadlessProperty(); SpringApplicationRunListeners list...
java
public ConfigurableApplicationContext run(String... args) { StopWatch stopWatch = new StopWatch(); stopWatch.start(); ConfigurableApplicationContext context = null; Collection<SpringBootExceptionReporter> exceptionReporters = new ArrayList<>(); configureHeadlessProperty(); SpringApplicationRunListeners list...
[ "public", "ConfigurableApplicationContext", "run", "(", "String", "...", "args", ")", "{", "StopWatch", "stopWatch", "=", "new", "StopWatch", "(", ")", ";", "stopWatch", ".", "start", "(", ")", ";", "ConfigurableApplicationContext", "context", "=", "null", ";", ...
Run the Spring application, creating and refreshing a new {@link ApplicationContext}. @param args the application arguments (usually passed from a Java main method) @return a running {@link ApplicationContext}
[ "Run", "the", "Spring", "application", "creating", "and", "refreshing", "a", "new", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java#L298-L342
train
Run the application.
[ 30522, 2270, 9530, 8873, 27390, 3085, 29098, 19341, 3508, 8663, 18209, 2448, 1006, 5164, 1012, 1012, 1012, 12098, 5620, 1007, 1063, 2644, 18866, 2644, 18866, 1027, 2047, 2644, 18866, 1006, 1007, 1025, 2644, 18866, 1012, 2707, 1006, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
common/network-common/src/main/java/org/apache/spark/network/util/TransportConf.java
TransportConf.chunkFetchHandlerThreads
public int chunkFetchHandlerThreads() { if (!this.getModuleName().equalsIgnoreCase("shuffle")) { return 0; } int chunkFetchHandlerThreadsPercent = conf.getInt("spark.shuffle.server.chunkFetchHandlerThreadsPercent", 100); int threads = this.serverThreads() > 0 ? this.serverThreads() : 2...
java
public int chunkFetchHandlerThreads() { if (!this.getModuleName().equalsIgnoreCase("shuffle")) { return 0; } int chunkFetchHandlerThreadsPercent = conf.getInt("spark.shuffle.server.chunkFetchHandlerThreadsPercent", 100); int threads = this.serverThreads() > 0 ? this.serverThreads() : 2...
[ "public", "int", "chunkFetchHandlerThreads", "(", ")", "{", "if", "(", "!", "this", ".", "getModuleName", "(", ")", ".", "equalsIgnoreCase", "(", "\"shuffle\"", ")", ")", "{", "return", "0", ";", "}", "int", "chunkFetchHandlerThreadsPercent", "=", "conf", "....
Percentage of io.serverThreads used by netty to process ChunkFetchRequest. Shuffle server will use a separate EventLoopGroup to process ChunkFetchRequest messages. Although when calling the async writeAndFlush on the underlying channel to send response back to client, the I/O on the channel is still being handled by {@...
[ "Percentage", "of", "io", ".", "serverThreads", "used", "by", "netty", "to", "process", "ChunkFetchRequest", ".", "Shuffle", "server", "will", "use", "a", "separate", "EventLoopGroup", "to", "process", "ChunkFetchRequest", "messages", ".", "Although", "when", "cal...
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-common/src/main/java/org/apache/spark/network/util/TransportConf.java#L333-L342
train
Get the number of threads that will be used to handle the chunk fetching of the server.
[ 30522, 2270, 20014, 20000, 7959, 10649, 11774, 3917, 2705, 16416, 5104, 1006, 1007, 1063, 2065, 1006, 999, 2023, 1012, 2131, 5302, 8566, 20844, 4168, 1006, 1007, 1012, 19635, 23773, 5686, 18382, 1006, 1000, 23046, 1000, 1007, 1007, 1063, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java
YarnResourceManager.getYarnStatus
private FinalApplicationStatus getYarnStatus(ApplicationStatus status) { if (status == null) { return FinalApplicationStatus.UNDEFINED; } else { switch (status) { case SUCCEEDED: return FinalApplicationStatus.SUCCEEDED; case FAILED: return FinalApplicationStatus.FAILED; case CANCELED: ...
java
private FinalApplicationStatus getYarnStatus(ApplicationStatus status) { if (status == null) { return FinalApplicationStatus.UNDEFINED; } else { switch (status) { case SUCCEEDED: return FinalApplicationStatus.SUCCEEDED; case FAILED: return FinalApplicationStatus.FAILED; case CANCELED: ...
[ "private", "FinalApplicationStatus", "getYarnStatus", "(", "ApplicationStatus", "status", ")", "{", "if", "(", "status", "==", "null", ")", "{", "return", "FinalApplicationStatus", ".", "UNDEFINED", ";", "}", "else", "{", "switch", "(", "status", ")", "{", "ca...
Converts a Flink application status enum to a YARN application status enum. @param status The Flink application status. @return The corresponding YARN application status.
[ "Converts", "a", "Flink", "application", "status", "enum", "to", "a", "YARN", "application", "status", "enum", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java#L474-L490
train
Get the YARN status.
[ 30522, 2797, 2345, 29098, 19341, 9285, 29336, 2271, 2131, 13380, 23808, 15590, 1006, 5097, 29336, 2271, 3570, 1007, 1063, 2065, 1006, 3570, 1027, 1027, 19701, 1007, 1063, 2709, 2345, 29098, 19341, 9285, 29336, 2271, 1012, 6151, 28344, 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/rest/handler/util/HandlerUtils.java
HandlerUtils.sendErrorResponse
public static CompletableFuture<Void> sendErrorResponse( ChannelHandlerContext channelHandlerContext, boolean keepAlive, ErrorResponseBody errorMessage, HttpResponseStatus statusCode, Map<String, String> headers) { StringWriter sw = new StringWriter(); try { mapper.writeValue(sw, errorMessage); ...
java
public static CompletableFuture<Void> sendErrorResponse( ChannelHandlerContext channelHandlerContext, boolean keepAlive, ErrorResponseBody errorMessage, HttpResponseStatus statusCode, Map<String, String> headers) { StringWriter sw = new StringWriter(); try { mapper.writeValue(sw, errorMessage); ...
[ "public", "static", "CompletableFuture", "<", "Void", ">", "sendErrorResponse", "(", "ChannelHandlerContext", "channelHandlerContext", ",", "boolean", "keepAlive", ",", "ErrorResponseBody", "errorMessage", ",", "HttpResponseStatus", "statusCode", ",", "Map", "<", "String"...
Sends the given error response and status code to the given channel. @param channelHandlerContext identifying the open channel @param keepAlive If the connection should be kept alive. @param errorMessage which should be sent @param statusCode of the message to send @param headers additional header values
[ "Sends", "the", "given", "error", "response", "and", "status", "code", "to", "the", "given", "channel", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/util/HandlerUtils.java#L132-L158
train
Sends an error response to the server.
[ 30522, 2270, 10763, 4012, 10814, 10880, 11263, 11244, 1026, 11675, 1028, 4604, 2121, 29165, 6072, 26029, 3366, 1006, 3149, 11774, 3917, 8663, 18209, 3149, 11774, 3917, 8663, 18209, 1010, 22017, 20898, 2562, 11475, 3726, 1010, 7561, 6072, 2602...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.groupBy
public UnsortedGrouping<T> groupBy(String... fields) { return new UnsortedGrouping<>(this, new Keys.ExpressionKeys<>(fields, getType())); }
java
public UnsortedGrouping<T> groupBy(String... fields) { return new UnsortedGrouping<>(this, new Keys.ExpressionKeys<>(fields, getType())); }
[ "public", "UnsortedGrouping", "<", "T", ">", "groupBy", "(", "String", "...", "fields", ")", "{", "return", "new", "UnsortedGrouping", "<>", "(", "this", ",", "new", "Keys", ".", "ExpressionKeys", "<>", "(", "fields", ",", "getType", "(", ")", ")", ")", ...
Groups a {@link DataSet} using field expressions. A field expression is either the name of a public field or a getter method with parentheses of the {@link DataSet}S underlying type. A dot can be used to drill down into objects, as in {@code "field1.getInnerField2()" }. This method returns an {@link UnsortedGrouping} o...
[ "Groups", "a", "{", "@link", "DataSet", "}", "using", "field", "expressions", ".", "A", "field", "expression", "is", "either", "the", "name", "of", "a", "public", "field", "or", "a", "getter", "method", "with", "parentheses", "of", "the", "{", "@link", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L727-L729
train
Create a grouping by expression.
[ 30522, 2270, 4895, 21748, 3064, 17058, 2075, 1026, 1056, 1028, 2177, 3762, 1006, 5164, 1012, 1012, 1012, 4249, 1007, 1063, 2709, 2047, 4895, 21748, 3064, 17058, 2075, 1026, 1028, 1006, 2023, 1010, 2047, 6309, 1012, 3670, 14839, 2015, 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-core/src/main/java/org/apache/flink/api/java/tuple/Tuple12.java
Tuple12.of
public static <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tuple12<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> of(T0 value0, T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11) { return new Tuple12<>(value0, value1, value2, ...
java
public static <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tuple12<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> of(T0 value0, T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11) { return new Tuple12<>(value0, value1, value2, ...
[ "public", "static", "<", "T0", ",", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ",", "T7", ",", "T8", ",", "T9", ",", "T10", ",", "T11", ">", "Tuple12", "<", "T0", ",", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ...
Creates a new tuple and assigns the given values to the tuple's fields. This is more convenient than using the constructor, because the compiler can infer the generic type arguments implicitly. For example: {@code Tuple3.of(n, x, s)} instead of {@code new Tuple3<Integer, Double, String>(n, x, s)}
[ "Creates", "a", "new", "tuple", "and", "assigns", "the", "given", "values", "to", "the", "tuple", "s", "fields", ".", "This", "is", "more", "convenient", "than", "using", "the", "constructor", "because", "the", "compiler", "can", "infer", "the", "generic", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/tuple/Tuple12.java#L353-L366
train
Construct a tuple of length 12.
[ 30522, 2270, 10763, 1026, 1056, 2692, 1010, 1056, 2487, 1010, 1056, 2475, 1010, 1056, 2509, 1010, 1056, 2549, 1010, 1056, 2629, 1010, 1056, 2575, 1010, 1056, 2581, 1010, 1056, 2620, 1010, 1056, 2683, 1010, 1056, 10790, 1010, 1056, 14526, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/client/RestTemplateExchangeTags.java
RestTemplateExchangeTags.clientName
public static Tag clientName(HttpRequest request) { String host = request.getURI().getHost(); if (host == null) { host = "none"; } return Tag.of("clientName", host); }
java
public static Tag clientName(HttpRequest request) { String host = request.getURI().getHost(); if (host == null) { host = "none"; } return Tag.of("clientName", host); }
[ "public", "static", "Tag", "clientName", "(", "HttpRequest", "request", ")", "{", "String", "host", "=", "request", ".", "getURI", "(", ")", ".", "getHost", "(", ")", ";", "if", "(", "host", "==", "null", ")", "{", "host", "=", "\"none\"", ";", "}", ...
Create a {@code clientName} {@code Tag} derived from the {@link URI#getHost host} of the {@link HttpRequest#getURI() URI} of the given {@code request}. @param request the request @return the clientName tag
[ "Create", "a", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/client/RestTemplateExchangeTags.java#L125-L131
train
Gets the client name from the request.
[ 30522, 2270, 10763, 6415, 7396, 18442, 1006, 8299, 2890, 15500, 5227, 1007, 1063, 5164, 3677, 1027, 5227, 1012, 2131, 9496, 1006, 1007, 1012, 2131, 15006, 2102, 1006, 1007, 1025, 2065, 1006, 3677, 1027, 1027, 19701, 1007, 1063, 3677, 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-log/src/main/java/cn/hutool/log/StaticLog.java
StaticLog.warn
public static void warn(Log log, String format, Object... arguments) { warn(log, null, format, arguments); }
java
public static void warn(Log log, String format, Object... arguments) { warn(log, null, format, arguments); }
[ "public", "static", "void", "warn", "(", "Log", "log", ",", "String", "format", ",", "Object", "...", "arguments", ")", "{", "warn", "(", "log", ",", "null", ",", "format", ",", "arguments", ")", ";", "}" ]
Warn等级日志,小于Error @param log 日志对象 @param format 格式文本,{} 代表变量 @param arguments 变量对应的参数
[ "Warn等级日志,小于Error" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-log/src/main/java/cn/hutool/log/StaticLog.java#L126-L128
train
Logs a message at level WARN according to the specified format and arguments.
[ 30522, 2270, 10763, 11675, 11582, 1006, 8833, 8833, 1010, 5164, 4289, 1010, 4874, 1012, 1012, 1012, 9918, 1007, 1063, 11582, 1006, 8833, 1010, 19701, 1010, 4289, 1010, 9918, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/MethodlessRouter.java
MethodlessRouter.removePathPattern
public void removePathPattern(String pathPattern) { PathPattern p = new PathPattern(pathPattern); T target = routes.remove(p); if (target == null) { return; } }
java
public void removePathPattern(String pathPattern) { PathPattern p = new PathPattern(pathPattern); T target = routes.remove(p); if (target == null) { return; } }
[ "public", "void", "removePathPattern", "(", "String", "pathPattern", ")", "{", "PathPattern", "p", "=", "new", "PathPattern", "(", "pathPattern", ")", ";", "T", "target", "=", "routes", ".", "remove", "(", "p", ")", ";", "if", "(", "target", "==", "null"...
Removes the route specified by the path pattern.
[ "Removes", "the", "route", "specified", "by", "the", "path", "pattern", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/router/MethodlessRouter.java#L75-L81
train
Removes a path pattern from the router.
[ 30522, 2270, 11675, 6366, 15069, 4502, 12079, 2078, 1006, 5164, 4130, 4502, 12079, 2078, 1007, 1063, 4130, 4502, 12079, 2078, 1052, 1027, 2047, 4130, 4502, 12079, 2078, 1006, 4130, 4502, 12079, 2078, 1007, 1025, 1056, 4539, 1027, 5847, 1012...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java
StateAssignmentOperation.checkStateMappingCompleteness
private static void checkStateMappingCompleteness( boolean allowNonRestoredState, Map<OperatorID, OperatorState> operatorStates, Map<JobVertexID, ExecutionJobVertex> tasks) { Set<OperatorID> allOperatorIDs = new HashSet<>(); for (ExecutionJobVertex executionJobVertex : tasks.values()) { allOperatorIDs....
java
private static void checkStateMappingCompleteness( boolean allowNonRestoredState, Map<OperatorID, OperatorState> operatorStates, Map<JobVertexID, ExecutionJobVertex> tasks) { Set<OperatorID> allOperatorIDs = new HashSet<>(); for (ExecutionJobVertex executionJobVertex : tasks.values()) { allOperatorIDs....
[ "private", "static", "void", "checkStateMappingCompleteness", "(", "boolean", "allowNonRestoredState", ",", "Map", "<", "OperatorID", ",", "OperatorState", ">", "operatorStates", ",", "Map", "<", "JobVertexID", ",", "ExecutionJobVertex", ">", "tasks", ")", "{", "Set...
Verifies that all operator states can be mapped to an execution job vertex. @param allowNonRestoredState if false an exception will be thrown if a state could not be mapped @param operatorStates operator states to map @param tasks task to map to
[ "Verifies", "that", "all", "operator", "states", "can", "be", "mapped", "to", "an", "execution", "job", "vertex", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java#L550-L571
train
Checks if the mapping complete.
[ 30522, 2797, 10763, 11675, 14148, 12259, 2863, 14853, 9006, 10814, 6528, 7971, 1006, 22017, 20898, 3499, 8540, 28533, 19574, 9153, 2618, 1010, 4949, 1026, 6872, 3593, 1010, 9224, 12259, 1028, 9224, 12259, 2015, 1010, 4949, 1026, 3105, 16874, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java
CollUtil.newArrayList
@SafeVarargs public static <T> ArrayList<T> newArrayList(T... values) { return (ArrayList<T>) list(false, values); }
java
@SafeVarargs public static <T> ArrayList<T> newArrayList(T... values) { return (ArrayList<T>) list(false, values); }
[ "@", "SafeVarargs", "public", "static", "<", "T", ">", "ArrayList", "<", "T", ">", "newArrayList", "(", "T", "...", "values", ")", "{", "return", "(", "ArrayList", "<", "T", ">", ")", "list", "(", "false", ",", "values", ")", ";", "}" ]
新建一个ArrayList @param <T> 集合元素类型 @param values 数组 @return ArrayList对象
[ "新建一个ArrayList" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java#L617-L620
train
Creates an ArrayList that contains all of the items in the array that are not null.
[ 30522, 1030, 3647, 24516, 10623, 2015, 2270, 10763, 1026, 1056, 1028, 9140, 9863, 1026, 1056, 1028, 2047, 2906, 9447, 9863, 1006, 1056, 1012, 1012, 1012, 5300, 1007, 1063, 2709, 1006, 9140, 9863, 1026, 1056, 1028, 1007, 2862, 1006, 6270, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java
MDAG.addString
public void addString(String str) { if (sourceNode != null) { addStringInternal(str); replaceOrRegister(sourceNode, str); } else { unSimplify(); addString(str); } }
java
public void addString(String str) { if (sourceNode != null) { addStringInternal(str); replaceOrRegister(sourceNode, str); } else { unSimplify(); addString(str); } }
[ "public", "void", "addString", "(", "String", "str", ")", "{", "if", "(", "sourceNode", "!=", "null", ")", "{", "addStringInternal", "(", "str", ")", ";", "replaceOrRegister", "(", "sourceNode", ",", "str", ")", ";", "}", "else", "{", "unSimplify", "(", ...
Adds a string to the MDAG. @param str the String to be added to the MDAG
[ "Adds", "a", "string", "to", "the", "MDAG", "." ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java#L291-L303
train
Add a string to the sequence of tokens.
[ 30522, 2270, 11675, 9909, 18886, 3070, 1006, 5164, 2358, 2099, 1007, 1063, 2065, 1006, 3120, 3630, 3207, 999, 1027, 19701, 1007, 1063, 9909, 18886, 3070, 18447, 11795, 2389, 1006, 2358, 2099, 1007, 1025, 5672, 2953, 2890, 24063, 2121, 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-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/StreamingRuntimeContext.java
StreamingRuntimeContext.getState
@Override public <T> ValueState<T> getState(ValueStateDescriptor<T> stateProperties) { KeyedStateStore keyedStateStore = checkPreconditionsAndGetKeyedStateStore(stateProperties); stateProperties.initializeSerializerUnlessSet(getExecutionConfig()); return keyedStateStore.getState(stateProperties); }
java
@Override public <T> ValueState<T> getState(ValueStateDescriptor<T> stateProperties) { KeyedStateStore keyedStateStore = checkPreconditionsAndGetKeyedStateStore(stateProperties); stateProperties.initializeSerializerUnlessSet(getExecutionConfig()); return keyedStateStore.getState(stateProperties); }
[ "@", "Override", "public", "<", "T", ">", "ValueState", "<", "T", ">", "getState", "(", "ValueStateDescriptor", "<", "T", ">", "stateProperties", ")", "{", "KeyedStateStore", "keyedStateStore", "=", "checkPreconditionsAndGetKeyedStateStore", "(", "stateProperties", ...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/StreamingRuntimeContext.java#L140-L145
train
Get the value state for the given state descriptor.
[ 30522, 1030, 2058, 15637, 2270, 1026, 1056, 1028, 5300, 12259, 1026, 1056, 1028, 4152, 12259, 1006, 5300, 16238, 2229, 23235, 2953, 1026, 1056, 1028, 2110, 21572, 4842, 7368, 1007, 1063, 3145, 2098, 9153, 22199, 5686, 3145, 2098, 9153, 2219...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-db/src/main/java/cn/hutool/db/DaoTemplate.java
DaoTemplate.del
public <T> int del(String field, T value) throws SQLException { if (StrUtil.isBlank(field)) { return 0; } return this.del(Entity.create(tableName).set(field, value)); }
java
public <T> int del(String field, T value) throws SQLException { if (StrUtil.isBlank(field)) { return 0; } return this.del(Entity.create(tableName).set(field, value)); }
[ "public", "<", "T", ">", "int", "del", "(", "String", "field", ",", "T", "value", ")", "throws", "SQLException", "{", "if", "(", "StrUtil", ".", "isBlank", "(", "field", ")", ")", "{", "return", "0", ";", "}", "return", "this", ".", "del", "(", "...
删除 @param <T> 主键类型 @param field 字段名 @param value 字段值 @return 删除行数 @throws SQLException SQL执行异常
[ "删除" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/DaoTemplate.java#L136-L142
train
Delete a single entity from the database.
[ 30522, 2270, 1026, 1056, 1028, 20014, 3972, 1006, 5164, 2492, 1010, 1056, 3643, 1007, 11618, 29296, 10288, 24422, 1063, 2065, 1006, 2358, 22134, 4014, 1012, 2003, 28522, 8950, 1006, 2492, 1007, 1007, 1063, 2709, 1014, 1025, 1065, 2709, 2023...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/RestTemplateBuilder.java
RestTemplateBuilder.additionalMessageConverters
public RestTemplateBuilder additionalMessageConverters( Collection<? extends HttpMessageConverter<?>> messageConverters) { Assert.notNull(messageConverters, "MessageConverters must not be null"); return new RestTemplateBuilder(this.detectRequestFactory, this.rootUri, append(this.messageConverters, messageCon...
java
public RestTemplateBuilder additionalMessageConverters( Collection<? extends HttpMessageConverter<?>> messageConverters) { Assert.notNull(messageConverters, "MessageConverters must not be null"); return new RestTemplateBuilder(this.detectRequestFactory, this.rootUri, append(this.messageConverters, messageCon...
[ "public", "RestTemplateBuilder", "additionalMessageConverters", "(", "Collection", "<", "?", "extends", "HttpMessageConverter", "<", "?", ">", ">", "messageConverters", ")", "{", "Assert", ".", "notNull", "(", "messageConverters", ",", "\"MessageConverters must not be nul...
Add additional {@link HttpMessageConverter HttpMessageConverters} that should be used with the {@link RestTemplate}. Any converters configured on the builder will replace RestTemplate's default converters. @param messageConverters the converters to add @return a new builder instance @see #messageConverters(HttpMessageC...
[ "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#L211-L219
train
Add additional message converters to the builder.
[ 30522, 2270, 2717, 18532, 15725, 8569, 23891, 2099, 3176, 7834, 3736, 3351, 8663, 16874, 2545, 1006, 3074, 1026, 1029, 8908, 8299, 7834, 3736, 3351, 8663, 16874, 2121, 1026, 1029, 1028, 1028, 4471, 8663, 16874, 2545, 1007, 1063, 20865, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/corpus/io/ByteArray.java
ByteArray.nextUTF
public String nextUTF() { int utflen = nextUnsignedShort(); byte[] bytearr = null; char[] chararr = null; bytearr = new byte[utflen]; chararr = new char[utflen]; int c, char2, char3; int count = 0; int chararr_count = 0; for (int i = 0; i < u...
java
public String nextUTF() { int utflen = nextUnsignedShort(); byte[] bytearr = null; char[] chararr = null; bytearr = new byte[utflen]; chararr = new char[utflen]; int c, char2, char3; int count = 0; int chararr_count = 0; for (int i = 0; i < u...
[ "public", "String", "nextUTF", "(", ")", "{", "int", "utflen", "=", "nextUnsignedShort", "(", ")", ";", "byte", "[", "]", "bytearr", "=", "null", ";", "char", "[", "]", "chararr", "=", "null", ";", "bytearr", "=", "new", "byte", "[", "utflen", "]", ...
读取一个UTF字符串 @return
[ "读取一个UTF字符串" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/corpus/io/ByteArray.java#L153-L232
train
Method nextUTF.
[ 30522, 2270, 5164, 2279, 4904, 2546, 1006, 1007, 1063, 20014, 21183, 21031, 2078, 1027, 2279, 4609, 5332, 19225, 22231, 5339, 1006, 1007, 1025, 24880, 1031, 1033, 24880, 2906, 2099, 1027, 19701, 1025, 25869, 1031, 1033, 25869, 2906, 2099, 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-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosTaskManagerParameters.java
MesosTaskManagerParameters.buildVolumes
public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications.length); fo...
java
public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications.length); fo...
[ "public", "static", "List", "<", "Protos", ".", "Volume", ">", "buildVolumes", "(", "Option", "<", "String", ">", "containerVolumes", ")", "{", "if", "(", "containerVolumes", ".", "isEmpty", "(", ")", ")", "{", "return", "Collections", ".", "emptyList", "(...
Used to build volume specs for mesos. This allows for mounting additional volumes into a container @param containerVolumes a comma delimited optional string of [host_path:]container_path[:RO|RW] that defines mount points for a container volume. If None or empty string, returns an empty iterator
[ "Used", "to", "build", "volume", "specs", "for", "mesos", ".", "This", "allows", "for", "mounting", "additional", "volumes", "into", "a", "container" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosTaskManagerParameters.java#L452-L496
train
Build volumes list from containerVolumes option.
[ 30522, 2270, 10763, 2862, 1026, 15053, 2015, 1012, 3872, 1028, 3857, 6767, 12942, 2229, 1006, 5724, 1026, 5164, 1028, 11661, 6767, 12942, 2229, 1007, 1063, 2065, 1006, 11661, 6767, 12942, 2229, 1012, 2003, 6633, 13876, 2100, 1006, 1007, 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-core/src/main/java/org/apache/flink/util/MathUtils.java
MathUtils.log2strict
public static int log2strict(int value) throws ArithmeticException, IllegalArgumentException { if (value == 0) { throw new ArithmeticException("Logarithm of zero is undefined."); } if ((value & (value - 1)) != 0) { throw new IllegalArgumentException("The given value " + value + " is not a power of two."); ...
java
public static int log2strict(int value) throws ArithmeticException, IllegalArgumentException { if (value == 0) { throw new ArithmeticException("Logarithm of zero is undefined."); } if ((value & (value - 1)) != 0) { throw new IllegalArgumentException("The given value " + value + " is not a power of two."); ...
[ "public", "static", "int", "log2strict", "(", "int", "value", ")", "throws", "ArithmeticException", ",", "IllegalArgumentException", "{", "if", "(", "value", "==", "0", ")", "{", "throw", "new", "ArithmeticException", "(", "\"Logarithm of zero is undefined.\"", ")",...
Computes the logarithm of the given value to the base of 2. This method throws an error, if the given argument is not a power of 2. @param value The value to compute the logarithm for. @return The logarithm to the base of 2. @throws ArithmeticException Thrown, if the given value is zero. @throws IllegalArgumentExcepti...
[ "Computes", "the", "logarithm", "of", "the", "given", "value", "to", "the", "base", "of", "2", ".", "This", "method", "throws", "an", "error", "if", "the", "given", "argument", "is", "not", "a", "power", "of", "2", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/MathUtils.java#L53-L61
train
Returns the log2 of the given value.
[ 30522, 2270, 10763, 20014, 8833, 2475, 3367, 7277, 2102, 1006, 20014, 3643, 1007, 11618, 20204, 10288, 24422, 1010, 6206, 2906, 22850, 15781, 2595, 24422, 1063, 2065, 1006, 3643, 1027, 1027, 1014, 1007, 1063, 5466, 2047, 20204, 10288, 24422, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/accumulators/AccumulatorSnapshot.java
AccumulatorSnapshot.deserializeUserAccumulators
public Map<String, Accumulator<?, ?>> deserializeUserAccumulators(ClassLoader classLoader) throws IOException, ClassNotFoundException { return userAccumulators.deserializeValue(classLoader); }
java
public Map<String, Accumulator<?, ?>> deserializeUserAccumulators(ClassLoader classLoader) throws IOException, ClassNotFoundException { return userAccumulators.deserializeValue(classLoader); }
[ "public", "Map", "<", "String", ",", "Accumulator", "<", "?", ",", "?", ">", ">", "deserializeUserAccumulators", "(", "ClassLoader", "classLoader", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "return", "userAccumulators", ".", "deserializeValue...
Gets the user-defined accumulators values. @return the serialized map
[ "Gets", "the", "user", "-", "defined", "accumulators", "values", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/accumulators/AccumulatorSnapshot.java#L66-L68
train
Deserializes the user accumulators.
[ 30522, 2270, 4949, 1026, 5164, 1010, 16222, 2819, 20350, 1026, 1029, 1010, 1029, 1028, 1028, 4078, 11610, 3669, 4371, 20330, 6305, 24894, 20350, 2015, 1006, 2465, 11066, 2121, 2465, 11066, 2121, 1007, 11618, 22834, 10288, 24422, 1010, 2465, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/state/ArrayListSerializer.java
ArrayListSerializer.resolveSchemaCompatibilityViaRedirectingToNewSnapshotClass
@Override public TypeSerializerSchemaCompatibility<ArrayList<T>> resolveSchemaCompatibilityViaRedirectingToNewSnapshotClass( TypeSerializerConfigSnapshot<ArrayList<T>> deprecatedConfigSnapshot) { if (deprecatedConfigSnapshot instanceof CollectionSerializerConfigSnapshot) { CollectionSerializerConfigSnapshot<A...
java
@Override public TypeSerializerSchemaCompatibility<ArrayList<T>> resolveSchemaCompatibilityViaRedirectingToNewSnapshotClass( TypeSerializerConfigSnapshot<ArrayList<T>> deprecatedConfigSnapshot) { if (deprecatedConfigSnapshot instanceof CollectionSerializerConfigSnapshot) { CollectionSerializerConfigSnapshot<A...
[ "@", "Override", "public", "TypeSerializerSchemaCompatibility", "<", "ArrayList", "<", "T", ">", ">", "resolveSchemaCompatibilityViaRedirectingToNewSnapshotClass", "(", "TypeSerializerConfigSnapshot", "<", "ArrayList", "<", "T", ">", ">", "deprecatedConfigSnapshot", ")", "{...
We need to implement this method as a {@link TypeSerializerConfigSnapshot.SelfResolvingTypeSerializer} because this serializer was previously returning a shared {@link CollectionSerializerConfigSnapshot} as its snapshot. <p>When the {@link CollectionSerializerConfigSnapshot} is restored, it is incapable of redirecting...
[ "We", "need", "to", "implement", "this", "method", "as", "a", "{", "@link", "TypeSerializerConfigSnapshot", ".", "SelfResolvingTypeSerializer", "}", "because", "this", "serializer", "was", "previously", "returning", "a", "shared", "{", "@link", "CollectionSerializerCo...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/ArrayListSerializer.java#L154-L170
train
Override this method to allow the user to override the default behavior of the type serializer.
[ 30522, 1030, 2058, 15637, 2270, 4127, 11610, 28863, 22842, 22911, 25377, 10450, 8553, 1026, 9140, 9863, 1026, 1056, 1028, 1028, 10663, 22842, 22911, 25377, 10450, 8553, 9035, 5596, 7442, 11873, 5524, 9333, 2532, 4523, 12326, 26266, 1006, 4127...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/config/SqlParser.java
SqlParser.visitOnCondition
private static void visitOnCondition(SQLExpr expr, TableItem tableItem) { if (!(expr instanceof SQLBinaryOpExpr)) { throw new UnsupportedOperationException(); } SQLBinaryOpExpr sqlBinaryOpExpr = (SQLBinaryOpExpr) expr; if (sqlBinaryOpExpr.getOperator() == BooleanAnd) { ...
java
private static void visitOnCondition(SQLExpr expr, TableItem tableItem) { if (!(expr instanceof SQLBinaryOpExpr)) { throw new UnsupportedOperationException(); } SQLBinaryOpExpr sqlBinaryOpExpr = (SQLBinaryOpExpr) expr; if (sqlBinaryOpExpr.getOperator() == BooleanAnd) { ...
[ "private", "static", "void", "visitOnCondition", "(", "SQLExpr", "expr", ",", "TableItem", "tableItem", ")", "{", "if", "(", "!", "(", "expr", "instanceof", "SQLBinaryOpExpr", ")", ")", "{", "throw", "new", "UnsupportedOperationException", "(", ")", ";", "}", ...
解析on条件 @param expr sql expr @param tableItem 表对象
[ "解析on条件" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/elasticsearch/src/main/java/com/alibaba/otter/canal/client/adapter/es/config/SqlParser.java#L197-L221
train
Visit a ON condition.
[ 30522, 2797, 10763, 11675, 3942, 2239, 8663, 20562, 1006, 29296, 10288, 18098, 4654, 18098, 1010, 2795, 4221, 2213, 2795, 4221, 2213, 1007, 1063, 2065, 1006, 999, 1006, 4654, 18098, 6013, 11253, 29296, 21114, 2854, 17635, 2595, 18098, 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
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java
ThriftCLIServiceClient.getResultSetMetadata
@Override public TableSchema getResultSetMetadata(OperationHandle opHandle) throws HiveSQLException { try { TGetResultSetMetadataReq req = new TGetResultSetMetadataReq(opHandle.toTOperationHandle()); TGetResultSetMetadataResp resp = cliService.GetResultSetMetadata(req); checkStatus(resp.ge...
java
@Override public TableSchema getResultSetMetadata(OperationHandle opHandle) throws HiveSQLException { try { TGetResultSetMetadataReq req = new TGetResultSetMetadataReq(opHandle.toTOperationHandle()); TGetResultSetMetadataResp resp = cliService.GetResultSetMetadata(req); checkStatus(resp.ge...
[ "@", "Override", "public", "TableSchema", "getResultSetMetadata", "(", "OperationHandle", "opHandle", ")", "throws", "HiveSQLException", "{", "try", "{", "TGetResultSetMetadataReq", "req", "=", "new", "TGetResultSetMetadataReq", "(", "opHandle", ".", "toTOperationHandle",...
/* (non-Javadoc) @see org.apache.hive.service.cli.ICLIService#getResultSetMetadata(org.apache.hive.service.cli.OperationHandle)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java#L354-L367
train
Get the result set metadata.
[ 30522, 1030, 2058, 15637, 2270, 7251, 5403, 2863, 2131, 6072, 11314, 13462, 11368, 8447, 2696, 1006, 3169, 11774, 2571, 6728, 11774, 2571, 1007, 11618, 26736, 2015, 4160, 2571, 2595, 24422, 1063, 3046, 1063, 1056, 18150, 6072, 11314, 13462, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-optimize/src/main/java/org/apache/shardingsphere/core/optimize/GeneratedKey.java
GeneratedKey.getGenerateKey
public static Optional<GeneratedKey> getGenerateKey(final ShardingRule shardingRule, final List<Object> parameters, final InsertStatement insertStatement) { Optional<String> generateKeyColumnName = shardingRule.findGenerateKeyColumnName(insertStatement.getTables().getSingleTableName()); if (!generateKey...
java
public static Optional<GeneratedKey> getGenerateKey(final ShardingRule shardingRule, final List<Object> parameters, final InsertStatement insertStatement) { Optional<String> generateKeyColumnName = shardingRule.findGenerateKeyColumnName(insertStatement.getTables().getSingleTableName()); if (!generateKey...
[ "public", "static", "Optional", "<", "GeneratedKey", ">", "getGenerateKey", "(", "final", "ShardingRule", "shardingRule", ",", "final", "List", "<", "Object", ">", "parameters", ",", "final", "InsertStatement", "insertStatement", ")", "{", "Optional", "<", "String...
Get generate key. @param shardingRule sharding rule @param parameters SQL parameters @param insertStatement insert statement @return generate key
[ "Get", "generate", "key", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-optimize/src/main/java/org/apache/shardingsphere/core/optimize/GeneratedKey.java#L60-L67
train
Gets generate key.
[ 30522, 2270, 10763, 11887, 1026, 7013, 14839, 1028, 2131, 6914, 22139, 14839, 1006, 2345, 21146, 17080, 3070, 6820, 2571, 21146, 17080, 3070, 6820, 2571, 1010, 2345, 2862, 1026, 4874, 1028, 11709, 1010, 2345, 19274, 9153, 18532, 4765, 19274, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java
HttpUtil.setTransferEncodingChunked
public static void setTransferEncodingChunked(HttpMessage m, boolean chunked) { if (chunked) { m.headers().set(HttpHeaderNames.TRANSFER_ENCODING, HttpHeaderValues.CHUNKED); m.headers().remove(HttpHeaderNames.CONTENT_LENGTH); } else { List<String> encodings = m.headers...
java
public static void setTransferEncodingChunked(HttpMessage m, boolean chunked) { if (chunked) { m.headers().set(HttpHeaderNames.TRANSFER_ENCODING, HttpHeaderValues.CHUNKED); m.headers().remove(HttpHeaderNames.CONTENT_LENGTH); } else { List<String> encodings = m.headers...
[ "public", "static", "void", "setTransferEncodingChunked", "(", "HttpMessage", "m", ",", "boolean", "chunked", ")", "{", "if", "(", "chunked", ")", "{", "m", ".", "headers", "(", ")", ".", "set", "(", "HttpHeaderNames", ".", "TRANSFER_ENCODING", ",", "HttpHea...
Set the {@link HttpHeaderNames#TRANSFER_ENCODING} to either include {@link HttpHeaderValues#CHUNKED} if {@code chunked} is {@code true}, or remove {@link HttpHeaderValues#CHUNKED} if {@code chunked} is {@code false}. @param m The message which contains the headers to modify. @param chunked if {@code true} then include...
[ "Set", "the", "{", "@link", "HttpHeaderNames#TRANSFER_ENCODING", "}", "to", "either", "include", "{", "@link", "HttpHeaderValues#CHUNKED", "}", "if", "{", "@code", "chunked", "}", "is", "{", "@code", "true", "}", "or", "remove", "{", "@link", "HttpHeaderValues#C...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java#L312-L335
train
Sets the transfer encoding of the message.
[ 30522, 2270, 10763, 11675, 2275, 6494, 3619, 7512, 2368, 3597, 4667, 20760, 8950, 2098, 1006, 8299, 7834, 3736, 3351, 1049, 1010, 22017, 20898, 20000, 2098, 1007, 1063, 2065, 1006, 20000, 2098, 1007, 1063, 1049, 1012, 20346, 2015, 1006, 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-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getLong
@PublicEvolving public long getLong(ConfigOption<Long> configOption, long overrideDefault) { Object o = getRawValueFromOption(configOption); if (o == null) { return overrideDefault; } return convertToLong(o, configOption.defaultValue()); }
java
@PublicEvolving public long getLong(ConfigOption<Long> configOption, long overrideDefault) { Object o = getRawValueFromOption(configOption); if (o == null) { return overrideDefault; } return convertToLong(o, configOption.defaultValue()); }
[ "@", "PublicEvolving", "public", "long", "getLong", "(", "ConfigOption", "<", "Long", ">", "configOption", ",", "long", "overrideDefault", ")", "{", "Object", "o", "=", "getRawValueFromOption", "(", "configOption", ")", ";", "if", "(", "o", "==", "null", ")"...
Returns the value associated with the given config option as a long integer. 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 any ...
[ "Returns", "the", "value", "associated", "with", "the", "given", "config", "option", "as", "a", "long", "integer", ".", "If", "no", "value", "is", "mapped", "under", "any", "key", "of", "the", "option", "it", "returns", "the", "specified", "default", "inst...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L308-L315
train
Returns the value associated with the given config option as a long.
[ 30522, 1030, 2270, 6777, 4747, 6455, 2270, 2146, 2131, 10052, 1006, 9530, 8873, 3995, 16790, 1026, 2146, 1028, 9530, 8873, 3995, 16790, 1010, 2146, 2058, 15637, 3207, 7011, 11314, 1007, 1063, 4874, 1051, 1027, 2131, 2527, 2860, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.contentEqualsIgnoreEOL
public static boolean contentEqualsIgnoreEOL(File file1, File file2, Charset charset) throws IORuntimeException { boolean file1Exists = file1.exists(); if (file1Exists != file2.exists()) { return false; } if (!file1Exists) { // 两个文件都不存在,返回true return true; } if (file1.isDirectory() || ...
java
public static boolean contentEqualsIgnoreEOL(File file1, File file2, Charset charset) throws IORuntimeException { boolean file1Exists = file1.exists(); if (file1Exists != file2.exists()) { return false; } if (!file1Exists) { // 两个文件都不存在,返回true return true; } if (file1.isDirectory() || ...
[ "public", "static", "boolean", "contentEqualsIgnoreEOL", "(", "File", "file1", ",", "File", "file2", ",", "Charset", "charset", ")", "throws", "IORuntimeException", "{", "boolean", "file1Exists", "=", "file1", ".", "exists", "(", ")", ";", "if", "(", "file1Exi...
比较两个文件内容是否相同<br> 首先比较长度,长度一致再比较内容,比较内容采用按行读取,每行比较<br> 此方法来自Apache Commons io @param file1 文件1 @param file2 文件2 @param charset 编码,null表示使用平台默认编码 两个文件内容一致返回true,否则false @throws IORuntimeException IO异常 @since 4.0.6
[ "比较两个文件内容是否相同<br", ">", "首先比较长度,长度一致再比较内容,比较内容采用按行读取,每行比较<br", ">", "此方法来自Apache", "Commons", "io" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L1390-L1421
train
Checks if two files are equal ignoring the EOL character set.
[ 30522, 2270, 10763, 22017, 20898, 4180, 2063, 26426, 5332, 26745, 9910, 4747, 1006, 5371, 5371, 2487, 1010, 5371, 5371, 2475, 1010, 25869, 13462, 25869, 13462, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 22017, 20898, 5371, 2487, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/tokenizer/lexical/AbstractLexicalAnalyzer.java
AbstractLexicalAnalyzer.combineWithCustomDictionary
protected static List<CoreDictionary.Attribute> combineWithCustomDictionary(List<String> vertexList) { String[] wordNet = new String[vertexList.size()]; vertexList.toArray(wordNet); CoreDictionary.Attribute[] attributeArray = new CoreDictionary.Attribute[wordNet.length]; // DAT合并 ...
java
protected static List<CoreDictionary.Attribute> combineWithCustomDictionary(List<String> vertexList) { String[] wordNet = new String[vertexList.size()]; vertexList.toArray(wordNet); CoreDictionary.Attribute[] attributeArray = new CoreDictionary.Attribute[wordNet.length]; // DAT合并 ...
[ "protected", "static", "List", "<", "CoreDictionary", ".", "Attribute", ">", "combineWithCustomDictionary", "(", "List", "<", "String", ">", "vertexList", ")", "{", "String", "[", "]", "wordNet", "=", "new", "String", "[", "vertexList", ".", "size", "(", ")"...
使用用户词典合并粗分结果 @param vertexList 粗分结果 @return 合并后的结果
[ "使用用户词典合并粗分结果" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/tokenizer/lexical/AbstractLexicalAnalyzer.java#L623-L700
train
Combine with custom dictionary.
[ 30522, 5123, 10763, 2862, 1026, 4563, 29201, 3258, 5649, 1012, 17961, 1028, 11506, 24415, 7874, 20389, 29201, 3258, 5649, 1006, 2862, 1026, 5164, 1028, 19449, 9863, 1007, 1063, 5164, 1031, 1033, 2773, 7159, 1027, 2047, 5164, 1031, 19449, 98...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java
FutureUtils.retryWithDelay
public static <T> CompletableFuture<T> retryWithDelay( final Supplier<CompletableFuture<T>> operation, final int retries, final Time retryDelay, final Predicate<Throwable> retryPredicate, final ScheduledExecutor scheduledExecutor) { final CompletableFuture<T> resultFuture = new CompletableFuture<>(); ...
java
public static <T> CompletableFuture<T> retryWithDelay( final Supplier<CompletableFuture<T>> operation, final int retries, final Time retryDelay, final Predicate<Throwable> retryPredicate, final ScheduledExecutor scheduledExecutor) { final CompletableFuture<T> resultFuture = new CompletableFuture<>(); ...
[ "public", "static", "<", "T", ">", "CompletableFuture", "<", "T", ">", "retryWithDelay", "(", "final", "Supplier", "<", "CompletableFuture", "<", "T", ">", ">", "operation", ",", "final", "int", "retries", ",", "final", "Time", "retryDelay", ",", "final", ...
Retry the given operation with the given delay in between failures. @param operation to retry @param retries number of retries @param retryDelay delay between retries @param retryPredicate Predicate to test whether an exception is retryable @param scheduledExecutor executor to be used for the retry operation @param <T...
[ "Retry", "the", "given", "operation", "with", "the", "given", "delay", "in", "between", "failures", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java#L145-L163
train
Retry with delay.
[ 30522, 2270, 10763, 1026, 1056, 1028, 4012, 10814, 10880, 11263, 11244, 1026, 1056, 1028, 2128, 11129, 24415, 9247, 4710, 1006, 2345, 17024, 1026, 4012, 10814, 10880, 11263, 11244, 1026, 1056, 1028, 1028, 3169, 1010, 2345, 20014, 2128, 21011,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/interactions/touch/TouchActions.java
TouchActions.flick
public TouchActions flick(WebElement onElement, int xOffset, int yOffset, int speed) { if (touchScreen != null) { action.addAction(new FlickAction(touchScreen, (Locatable) onElement, xOffset, yOffset, speed)); } return this; }
java
public TouchActions flick(WebElement onElement, int xOffset, int yOffset, int speed) { if (touchScreen != null) { action.addAction(new FlickAction(touchScreen, (Locatable) onElement, xOffset, yOffset, speed)); } return this; }
[ "public", "TouchActions", "flick", "(", "WebElement", "onElement", ",", "int", "xOffset", ",", "int", "yOffset", ",", "int", "speed", ")", "{", "if", "(", "touchScreen", "!=", "null", ")", "{", "action", ".", "addAction", "(", "new", "FlickAction", "(", ...
Allows the execution of flick gestures starting in a location's element. @param onElement The {@link WebElement} to flick on @param xOffset The x offset relative to the viewport @param yOffset The y offset relative to the viewport @param speed speed to flick, 0 = normal, 1 = fast, 2 = slow @return self
[ "Allows", "the", "execution", "of", "flick", "gestures", "starting", "in", "a", "location", "s", "element", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/interactions/touch/TouchActions.java#L190-L195
train
Adds a flick action to the list of touch screen elements.
[ 30522, 2270, 3543, 18908, 8496, 17312, 1006, 4773, 12260, 3672, 2028, 16930, 4765, 1010, 20014, 1060, 27475, 3388, 1010, 20014, 10930, 21807, 3388, 1010, 20014, 3177, 1007, 1063, 2065, 1006, 3543, 18182, 999, 1027, 19701, 1007, 1063, 2895, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobGraph.java
JobGraph.isCheckpointingEnabled
public boolean isCheckpointingEnabled() { if (snapshotSettings == null) { return false; } long checkpointInterval = snapshotSettings.getCheckpointCoordinatorConfiguration().getCheckpointInterval(); return checkpointInterval > 0 && checkpointInterval < Long.MAX_VALUE; }
java
public boolean isCheckpointingEnabled() { if (snapshotSettings == null) { return false; } long checkpointInterval = snapshotSettings.getCheckpointCoordinatorConfiguration().getCheckpointInterval(); return checkpointInterval > 0 && checkpointInterval < Long.MAX_VALUE; }
[ "public", "boolean", "isCheckpointingEnabled", "(", ")", "{", "if", "(", "snapshotSettings", "==", "null", ")", "{", "return", "false", ";", "}", "long", "checkpointInterval", "=", "snapshotSettings", ".", "getCheckpointCoordinatorConfiguration", "(", ")", ".", "g...
Checks if the checkpointing was enabled for this job graph @return true if checkpointing enabled
[ "Checks", "if", "the", "checkpointing", "was", "enabled", "for", "this", "job", "graph" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobGraph.java#L353-L362
train
Checks if checkpointing is enabled.
[ 30522, 2270, 22017, 20898, 2003, 5403, 3600, 8400, 15542, 3085, 2094, 1006, 1007, 1063, 2065, 1006, 20057, 12326, 21678, 8613, 1027, 1027, 19701, 1007, 1063, 2709, 6270, 1025, 1065, 2146, 26520, 18447, 2121, 10175, 1027, 20057, 12326, 21678, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/firefox/FirefoxProfile.java
FirefoxProfile.layoutOnDisk
public File layoutOnDisk() { try { File profileDir = TemporaryFilesystem.getDefaultTmpFS() .createTempDir("anonymous", "webdriver-profile"); File userPrefs = new File(profileDir, "user.js"); copyModel(model, profileDir); installExtensions(profileDir); deleteLockFiles(profile...
java
public File layoutOnDisk() { try { File profileDir = TemporaryFilesystem.getDefaultTmpFS() .createTempDir("anonymous", "webdriver-profile"); File userPrefs = new File(profileDir, "user.js"); copyModel(model, profileDir); installExtensions(profileDir); deleteLockFiles(profile...
[ "public", "File", "layoutOnDisk", "(", ")", "{", "try", "{", "File", "profileDir", "=", "TemporaryFilesystem", ".", "getDefaultTmpFS", "(", ")", ".", "createTempDir", "(", "\"anonymous\"", ",", "\"webdriver-profile\"", ")", ";", "File", "userPrefs", "=", "new", ...
Call this to cause the current profile to be written to disk. The profile directory is returned. Note that this profile directory is a temporary one and will be deleted when the JVM exists (at the latest) This method should be called immediately before starting to use the profile and should only be called once per ins...
[ "Call", "this", "to", "cause", "the", "current", "profile", "to", "be", "written", "to", "disk", ".", "The", "profile", "directory", "is", "returned", ".", "Note", "that", "this", "profile", "directory", "is", "a", "temporary", "one", "and", "will", "be", ...
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/firefox/FirefoxProfile.java#L393-L408
train
Create a temporary file for the profile.
[ 30522, 2270, 5371, 9621, 15422, 20573, 1006, 1007, 1063, 3046, 1063, 5371, 6337, 4305, 2099, 1027, 5741, 8873, 4244, 27268, 6633, 1012, 2131, 3207, 7011, 11314, 21246, 14376, 2015, 1006, 1007, 1012, 3443, 18532, 17299, 4313, 1006, 1000, 108...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/word/NewWordDiscover.java
NewWordDiscover.discover
public List<WordInfo> discover(BufferedReader reader, int size) throws IOException { String doc; Map<String, WordInfo> word_cands = new TreeMap<String, WordInfo>(); int totalLength = 0; Pattern delimiter = Pattern.compile("[\\s\\d,.<>/?:;'\"\\[\\]{}()\\|~!@#$%^&*\\-_=+,。《》、?:;“”‘’{}【...
java
public List<WordInfo> discover(BufferedReader reader, int size) throws IOException { String doc; Map<String, WordInfo> word_cands = new TreeMap<String, WordInfo>(); int totalLength = 0; Pattern delimiter = Pattern.compile("[\\s\\d,.<>/?:;'\"\\[\\]{}()\\|~!@#$%^&*\\-_=+,。《》、?:;“”‘’{}【...
[ "public", "List", "<", "WordInfo", ">", "discover", "(", "BufferedReader", "reader", ",", "int", "size", ")", "throws", "IOException", "{", "String", "doc", ";", "Map", "<", "String", ",", "WordInfo", ">", "word_cands", "=", "new", "TreeMap", "<", "String"...
提取词语 @param reader 大文本 @param size 需要提取词语的数量 @return 一个词语列表
[ "提取词语" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/mining/word/NewWordDiscover.java#L56-L118
train
Discover the words from the specified reader.
[ 30522, 2270, 2862, 1026, 2773, 2378, 14876, 1028, 7523, 1006, 17698, 2098, 16416, 4063, 8068, 1010, 20014, 2946, 1007, 11618, 22834, 10288, 24422, 1063, 5164, 9986, 1025, 4949, 1026, 5164, 1010, 2773, 2378, 14876, 1028, 2773, 1035, 2064, 51...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-db/src/main/java/cn/hutool/db/AbstractDb.java
AbstractDb.page
public PageResult<Entity> page(Entity where, Page page) throws SQLException { return this.page(where.getFieldNames(), where, page); }
java
public PageResult<Entity> page(Entity where, Page page) throws SQLException { return this.page(where.getFieldNames(), where, page); }
[ "public", "PageResult", "<", "Entity", ">", "page", "(", "Entity", "where", ",", "Page", "page", ")", "throws", "SQLException", "{", "return", "this", ".", "page", "(", "where", ".", "getFieldNames", "(", ")", ",", "where", ",", "page", ")", ";", "}" ]
分页查询<br> 查询条件为多个key value对表示,默认key = value,如果使用其它条件可以使用:where.put("key", " &gt; 1"),value也可以传Condition对象,key被忽略 @param where 条件实体类(包含表名) @param page 分页对象 @return 分页结果集 @throws SQLException SQL执行异常
[ "分页查询<br", ">", "查询条件为多个key", "value对表示,默认key", "=", "value,如果使用其它条件可以使用:where", ".", "put", "(", "key", "&gt", ";", "1", ")", ",value也可以传Condition对象,key被忽略" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/AbstractDb.java#L786-L788
train
Retrieves a page of entities matching the criteria specified in the WHERE clause.
[ 30522, 2270, 3931, 6072, 11314, 1026, 9178, 1028, 3931, 1006, 9178, 2073, 1010, 3931, 3931, 1007, 11618, 29296, 10288, 24422, 1063, 2709, 2023, 1012, 3931, 1006, 2073, 1012, 2131, 3790, 18442, 2015, 1006, 1007, 1010, 2073, 1010, 3931, 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/kvstore/src/main/java/org/apache/spark/util/kvstore/LevelDB.java
LevelDB.closeIterator
void closeIterator(LevelDBIterator<?> it) throws IOException { synchronized (this._db) { DB _db = this._db.get(); if (_db != null) { it.close(); } } }
java
void closeIterator(LevelDBIterator<?> it) throws IOException { synchronized (this._db) { DB _db = this._db.get(); if (_db != null) { it.close(); } } }
[ "void", "closeIterator", "(", "LevelDBIterator", "<", "?", ">", "it", ")", "throws", "IOException", "{", "synchronized", "(", "this", ".", "_db", ")", "{", "DB", "_db", "=", "this", ".", "_db", ".", "get", "(", ")", ";", "if", "(", "_db", "!=", "nu...
Closes the given iterator if the DB is still open. Trying to close a JNI LevelDB handle with a closed DB can cause JVM crashes, so this ensures that situation does not happen.
[ "Closes", "the", "given", "iterator", "if", "the", "DB", "is", "still", "open", ".", "Trying", "to", "close", "a", "JNI", "LevelDB", "handle", "with", "a", "closed", "DB", "can", "cause", "JVM", "crashes", "so", "this", "ensures", "that", "situation", "d...
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/kvstore/src/main/java/org/apache/spark/util/kvstore/LevelDB.java#L237-L244
train
Close the iterator.
[ 30522, 11675, 2485, 21646, 8844, 1006, 2504, 18939, 21646, 8844, 1026, 1029, 1028, 2009, 1007, 11618, 22834, 10288, 24422, 1063, 25549, 1006, 2023, 1012, 1035, 16962, 1007, 1063, 16962, 1035, 16962, 1027, 2023, 1012, 1035, 16962, 1012, 2131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostStandardRequestDecoder.java
HttpPostStandardRequestDecoder.decodeAttribute
private static String decodeAttribute(String s, Charset charset) { try { return QueryStringDecoder.decodeComponent(s, charset); } catch (IllegalArgumentException e) { throw new ErrorDataDecoderException("Bad string: '" + s + '\'', e); } }
java
private static String decodeAttribute(String s, Charset charset) { try { return QueryStringDecoder.decodeComponent(s, charset); } catch (IllegalArgumentException e) { throw new ErrorDataDecoderException("Bad string: '" + s + '\'', e); } }
[ "private", "static", "String", "decodeAttribute", "(", "String", "s", ",", "Charset", "charset", ")", "{", "try", "{", "return", "QueryStringDecoder", ".", "decodeComponent", "(", "s", ",", "charset", ")", ";", "}", "catch", "(", "IllegalArgumentException", "e...
Decode component @return the decoded component
[ "Decode", "component" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostStandardRequestDecoder.java#L626-L632
train
Decode an attribute from a string.
[ 30522, 2797, 10763, 5164, 21933, 3207, 19321, 3089, 8569, 2618, 1006, 5164, 1055, 1010, 25869, 13462, 25869, 13462, 1007, 1063, 3046, 1063, 2709, 23032, 3367, 4892, 3207, 16044, 2099, 1012, 21933, 3207, 9006, 29513, 3372, 1006, 1055, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.read
public static BufferedImage read(File imageFile) { try { return ImageIO.read(imageFile); } catch (IOException e) { throw new IORuntimeException(e); } }
java
public static BufferedImage read(File imageFile) { try { return ImageIO.read(imageFile); } catch (IOException e) { throw new IORuntimeException(e); } }
[ "public", "static", "BufferedImage", "read", "(", "File", "imageFile", ")", "{", "try", "{", "return", "ImageIO", ".", "read", "(", "imageFile", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "throw", "new", "IORuntimeException", "(", "e", ")...
从文件中读取图片 @param imageFile 图片文件 @return 图片 @since 3.2.2
[ "从文件中读取图片" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L1534-L1540
train
Reads a 16 - bit image from a file.
[ 30522, 2270, 10763, 17698, 2098, 9581, 3351, 3191, 1006, 5371, 3746, 8873, 2571, 1007, 1063, 3046, 1063, 2709, 3746, 3695, 1012, 3191, 1006, 3746, 8873, 2571, 1007, 1025, 1065, 4608, 1006, 22834, 10288, 24422, 1041, 1007, 1063, 5466, 2047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
networknt/light-4j
security/src/main/java/com/networknt/security/JwtHelper.java
JwtHelper.verifyJwt
public static JwtClaims verifyJwt(String jwt, boolean ignoreExpiry, boolean isToken) throws InvalidJwtException, ExpiredTokenException { JwtClaims claims; if(Boolean.TRUE.equals(enableJwtCache)) { claims = cache.getIfPresent(jwt); if(claims != null) { if(!ignoreE...
java
public static JwtClaims verifyJwt(String jwt, boolean ignoreExpiry, boolean isToken) throws InvalidJwtException, ExpiredTokenException { JwtClaims claims; if(Boolean.TRUE.equals(enableJwtCache)) { claims = cache.getIfPresent(jwt); if(claims != null) { if(!ignoreE...
[ "public", "static", "JwtClaims", "verifyJwt", "(", "String", "jwt", ",", "boolean", "ignoreExpiry", ",", "boolean", "isToken", ")", "throws", "InvalidJwtException", ",", "ExpiredTokenException", "{", "JwtClaims", "claims", ";", "if", "(", "Boolean", ".", "TRUE", ...
Verify JWT token format and signature. If ignoreExpiry is true, skip expiry verification, otherwise verify the expiry before signature verification. In most cases, we need to verify the expiry of the jwt token. The only time we need to ignore expiry verification is in SPA middleware handlers which need to verify csrf ...
[ "Verify", "JWT", "token", "format", "and", "signature", ".", "If", "ignoreExpiry", "is", "true", "skip", "expiry", "verification", "otherwise", "verify", "the", "expiry", "before", "signature", "verification", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/security/src/main/java/com/networknt/security/JwtHelper.java#L196-L273
train
Verify the JWT.
[ 30522, 2270, 10763, 1046, 26677, 25154, 2015, 20410, 3501, 26677, 1006, 5164, 1046, 26677, 1010, 22017, 20898, 8568, 10288, 8197, 2854, 1010, 22017, 20898, 21541, 11045, 2078, 1007, 11618, 19528, 3501, 26677, 10288, 24422, 1010, 13735, 18715, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.decryptFromBcd
public byte[] decryptFromBcd(String data, KeyType keyType, Charset charset) { final byte[] dataBytes = BCD.ascToBcd(StrUtil.bytes(data, charset)); return decrypt(dataBytes, keyType); }
java
public byte[] decryptFromBcd(String data, KeyType keyType, Charset charset) { final byte[] dataBytes = BCD.ascToBcd(StrUtil.bytes(data, charset)); return decrypt(dataBytes, keyType); }
[ "public", "byte", "[", "]", "decryptFromBcd", "(", "String", "data", ",", "KeyType", "keyType", ",", "Charset", "charset", ")", "{", "final", "byte", "[", "]", "dataBytes", "=", "BCD", ".", "ascToBcd", "(", "StrUtil", ".", "bytes", "(", "data", ",", "c...
分组解密 @param data 数据 @param keyType 密钥类型 @param charset 加密前编码 @return 解密后的密文 @since 4.1.0
[ "分组解密" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java#L296-L299
train
Decrypt from BCD encoded data.
[ 30522, 2270, 24880, 1031, 1033, 11703, 2854, 13876, 19699, 5358, 9818, 2094, 1006, 5164, 2951, 1010, 3145, 13874, 3145, 13874, 1010, 25869, 13462, 25869, 13462, 1007, 1063, 2345, 24880, 1031, 1033, 2951, 3762, 4570, 1027, 4647, 2094, 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...
spring-projects/spring-boot
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/amqp/RabbitConnectionFactoryMetricsPostProcessor.java
RabbitConnectionFactoryMetricsPostProcessor.getConnectionFactoryName
private String getConnectionFactoryName(String beanName) { if (beanName.length() > CONNECTION_FACTORY_SUFFIX.length() && StringUtils.endsWithIgnoreCase(beanName, CONNECTION_FACTORY_SUFFIX)) { return beanName.substring(0, beanName.length() - CONNECTION_FACTORY_SUFFIX.length()); } return beanName; }
java
private String getConnectionFactoryName(String beanName) { if (beanName.length() > CONNECTION_FACTORY_SUFFIX.length() && StringUtils.endsWithIgnoreCase(beanName, CONNECTION_FACTORY_SUFFIX)) { return beanName.substring(0, beanName.length() - CONNECTION_FACTORY_SUFFIX.length()); } return beanName; }
[ "private", "String", "getConnectionFactoryName", "(", "String", "beanName", ")", "{", "if", "(", "beanName", ".", "length", "(", ")", ">", "CONNECTION_FACTORY_SUFFIX", ".", "length", "(", ")", "&&", "StringUtils", ".", "endsWithIgnoreCase", "(", "beanName", ",",...
Get the name of a ConnectionFactory based on its {@code beanName}. @param beanName the name of the connection factory bean @return a name for the given connection factory
[ "Get", "the", "name", "of", "a", "ConnectionFactory", "based", "on", "its", "{" ]
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/metrics/amqp/RabbitConnectionFactoryMetricsPostProcessor.java#L73-L80
train
Get the connection factory name.
[ 30522, 2797, 5164, 2131, 8663, 2638, 7542, 21450, 18442, 1006, 5164, 14068, 18442, 1007, 1063, 2065, 1006, 14068, 18442, 1012, 3091, 1006, 1007, 1028, 4434, 1035, 4713, 1035, 16809, 1012, 3091, 1006, 1007, 1004, 1004, 5164, 21823, 4877, 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...
networknt/light-4j
service/src/main/java/com/networknt/service/SingletonServiceFactory.java
SingletonServiceFactory.getBean
public static <T> T getBean(Class<T> interfaceClass, Class typeClass) { Object object = serviceMap.get(interfaceClass.getName() + "<" + typeClass.getName() + ">"); if(object == null) return null; if(object instanceof Object[]) { return (T)Array.get(object, 0); } else { ...
java
public static <T> T getBean(Class<T> interfaceClass, Class typeClass) { Object object = serviceMap.get(interfaceClass.getName() + "<" + typeClass.getName() + ">"); if(object == null) return null; if(object instanceof Object[]) { return (T)Array.get(object, 0); } else { ...
[ "public", "static", "<", "T", ">", "T", "getBean", "(", "Class", "<", "T", ">", "interfaceClass", ",", "Class", "typeClass", ")", "{", "Object", "object", "=", "serviceMap", ".", "get", "(", "interfaceClass", ".", "getName", "(", ")", "+", "\"<\"", "+"...
Get a cached singleton object from service map by interface class and generic type class. The serviceMap is constructed from service.yml which defines interface and generic type to implementation mapping. @param interfaceClass Interface class @param <T> class type @param typeClass Generic type class @return The implem...
[ "Get", "a", "cached", "singleton", "object", "from", "service", "map", "by", "interface", "class", "and", "generic", "type", "class", ".", "The", "serviceMap", "is", "constructed", "from", "service", ".", "yml", "which", "defines", "interface", "and", "generic...
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/service/src/main/java/com/networknt/service/SingletonServiceFactory.java#L282-L290
train
Gets the bean.
[ 30522, 2270, 10763, 1026, 1056, 1028, 1056, 2131, 4783, 2319, 1006, 2465, 1026, 1056, 1028, 8278, 26266, 1010, 2465, 2828, 26266, 1007, 1063, 4874, 4874, 1027, 2326, 2863, 2361, 1012, 2131, 1006, 8278, 26266, 1012, 2131, 18442, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/typeutils/base/BigDecSerializer.java
BigDecSerializer.readBigDecimal
public static BigDecimal readBigDecimal(DataInputView source) throws IOException { final BigInteger unscaledValue = BigIntSerializer.readBigInteger(source); if (unscaledValue == null) { return null; } final int scale = source.readInt(); // fast-path for 0, 1, 10 if (scale == 0) { if (unscaledValue == ...
java
public static BigDecimal readBigDecimal(DataInputView source) throws IOException { final BigInteger unscaledValue = BigIntSerializer.readBigInteger(source); if (unscaledValue == null) { return null; } final int scale = source.readInt(); // fast-path for 0, 1, 10 if (scale == 0) { if (unscaledValue == ...
[ "public", "static", "BigDecimal", "readBigDecimal", "(", "DataInputView", "source", ")", "throws", "IOException", "{", "final", "BigInteger", "unscaledValue", "=", "BigIntSerializer", ".", "readBigInteger", "(", "source", ")", ";", "if", "(", "unscaledValue", "==", ...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/typeutils/base/BigDecSerializer.java#L117-L137
train
Reads a BigDecimal from the given DataInputView.
[ 30522, 2270, 10763, 2502, 3207, 6895, 9067, 3191, 5638, 2290, 3207, 6895, 9067, 1006, 2951, 2378, 18780, 8584, 3120, 1007, 11618, 22834, 10288, 24422, 1063, 2345, 2502, 18447, 26320, 4895, 15782, 3709, 10175, 5657, 1027, 2502, 18447, 8043, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/builder/CompareToBuilder.java
CompareToBuilder.reflectionCompare
public static int reflectionCompare(final Object lhs, final Object rhs) { return reflectionCompare(lhs, rhs, false, null); }
java
public static int reflectionCompare(final Object lhs, final Object rhs) { return reflectionCompare(lhs, rhs, false, null); }
[ "public", "static", "int", "reflectionCompare", "(", "final", "Object", "lhs", ",", "final", "Object", "rhs", ")", "{", "return", "reflectionCompare", "(", "lhs", ",", "rhs", ",", "false", ",", "null", ")", ";", "}" ]
通过反射比较两个Bean对象,对象字段可以为private。比较规则如下: <ul> <li>static字段不比较</li> <li>Transient字段不参与比较</li> <li>父类字段参与比较</li> </ul> <p> 如果被比较的两个对象都为<code>null</code>,被认为相同。 @param lhs 第一个对象 @param rhs 第二个对象 @return a negative integer, zero, or a positive integer as <code>lhs</code> is less than, equal to, or greater than <code>rhs<...
[ "通过反射比较两个Bean对象,对象字段可以为private。比较规则如下:" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/builder/CompareToBuilder.java#L88-L90
train
Compare two class objects.
[ 30522, 2270, 10763, 20014, 9185, 9006, 19362, 2063, 1006, 2345, 4874, 1048, 7898, 1010, 2345, 4874, 1054, 7898, 1007, 1063, 2709, 9185, 9006, 19362, 2063, 1006, 1048, 7898, 1010, 1054, 7898, 1010, 6270, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java
MDAG.getAllStrings
public HashSet<String> getAllStrings() { HashSet<String> strHashSet = new LinkedHashSet<String>(); if (sourceNode != null) getStrings(strHashSet, SearchCondition.NO_SEARCH_CONDITION, null, "", sourceNode.getOutgoingTransitions()); else getStrings(strHashSet, SearchCo...
java
public HashSet<String> getAllStrings() { HashSet<String> strHashSet = new LinkedHashSet<String>(); if (sourceNode != null) getStrings(strHashSet, SearchCondition.NO_SEARCH_CONDITION, null, "", sourceNode.getOutgoingTransitions()); else getStrings(strHashSet, SearchCo...
[ "public", "HashSet", "<", "String", ">", "getAllStrings", "(", ")", "{", "HashSet", "<", "String", ">", "strHashSet", "=", "new", "LinkedHashSet", "<", "String", ">", "(", ")", ";", "if", "(", "sourceNode", "!=", "null", ")", "getStrings", "(", "strHashS...
取出所有key<br> Retrieves all the valid Strings that have been inserted in to the MDAG. @return a HashSet containing all the Strings that have been inserted into the MDAG
[ "取出所有key<br", ">", "Retrieves", "all", "the", "valid", "Strings", "that", "have", "been", "inserted", "in", "to", "the", "MDAG", "." ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java#L920-L930
train
Get all strings in the source node.
[ 30522, 2270, 23325, 13462, 1026, 5164, 1028, 2131, 8095, 3367, 4892, 2015, 1006, 1007, 1063, 23325, 13462, 1026, 5164, 1028, 2358, 25032, 11823, 13462, 1027, 2047, 5799, 14949, 7898, 3388, 1026, 5164, 1028, 1006, 1007, 1025, 2065, 1006, 312...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/convert/NumberChineseFormater.java
NumberChineseFormater.format
public static String format(double amount, boolean isUseTraditional, boolean isMoneyMode) { final String[] numArray = isUseTraditional ? traditionalDigits : simpleDigits; if (amount > 99999999999999.99 || amount < -99999999999999.99) { throw new IllegalArgumentException("Number support only: (-99999999999999.99...
java
public static String format(double amount, boolean isUseTraditional, boolean isMoneyMode) { final String[] numArray = isUseTraditional ? traditionalDigits : simpleDigits; if (amount > 99999999999999.99 || amount < -99999999999999.99) { throw new IllegalArgumentException("Number support only: (-99999999999999.99...
[ "public", "static", "String", "format", "(", "double", "amount", ",", "boolean", "isUseTraditional", ",", "boolean", "isMoneyMode", ")", "{", "final", "String", "[", "]", "numArray", "=", "isUseTraditional", "?", "traditionalDigits", ":", "simpleDigits", ";", "i...
阿拉伯数字转换成中文,小数点后四舍五入保留两位. 使用于整数、小数的转换. @param amount 数字 @param isUseTraditional 是否使用繁体 @param isMoneyMode 是否为金额模式 @return 中文
[ "阿拉伯数字转换成中文", "小数点后四舍五入保留两位", ".", "使用于整数、小数的转换", "." ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/convert/NumberChineseFormater.java#L47-L131
train
Format a number to be used in a currency.
[ 30522, 2270, 10763, 5164, 4289, 1006, 3313, 3815, 1010, 22017, 20898, 2003, 8557, 6494, 27064, 1010, 22017, 20898, 2003, 8202, 3240, 5302, 3207, 1007, 1063, 2345, 5164, 1031, 1033, 16371, 7849, 9447, 1027, 2003, 8557, 6494, 27064, 1029, 315...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
transport-udt/src/main/java/io/netty/channel/udt/nio/NioUdtProvider.java
NioUdtProvider.channelUDT
public static ChannelUDT channelUDT(final Channel channel) { // bytes if (channel instanceof NioUdtByteAcceptorChannel) { return ((NioUdtByteAcceptorChannel) channel).javaChannel(); } if (channel instanceof NioUdtByteRendezvousChannel) { return ((NioUdtByteRendezv...
java
public static ChannelUDT channelUDT(final Channel channel) { // bytes if (channel instanceof NioUdtByteAcceptorChannel) { return ((NioUdtByteAcceptorChannel) channel).javaChannel(); } if (channel instanceof NioUdtByteRendezvousChannel) { return ((NioUdtByteRendezv...
[ "public", "static", "ChannelUDT", "channelUDT", "(", "final", "Channel", "channel", ")", "{", "// bytes", "if", "(", "channel", "instanceof", "NioUdtByteAcceptorChannel", ")", "{", "return", "(", "(", "NioUdtByteAcceptorChannel", ")", "channel", ")", ".", "javaCha...
Expose underlying {@link ChannelUDT} for debugging and monitoring. <p> @return underlying {@link ChannelUDT} or null, if parameter is not {@link UdtChannel}
[ "Expose", "underlying", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport-udt/src/main/java/io/netty/channel/udt/nio/NioUdtProvider.java#L107-L131
train
Get the ChannelUDT object for a given Channel.
[ 30522, 2270, 10763, 3149, 6784, 2102, 3149, 6784, 2102, 1006, 2345, 3149, 3149, 1007, 1063, 1013, 1013, 27507, 2065, 1006, 3149, 6013, 11253, 9152, 19224, 2102, 3762, 27058, 9468, 23606, 2953, 26058, 1007, 1063, 2709, 1006, 1006, 9152, 1922...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
ZooKeeperUtils.createCompletedCheckpoints
public static CompletedCheckpointStore createCompletedCheckpoints( CuratorFramework client, Configuration configuration, JobID jobId, int maxNumberOfCheckpointsToRetain, Executor executor) throws Exception { checkNotNull(configuration, "Configuration"); String checkpointsPath = configuration.getStr...
java
public static CompletedCheckpointStore createCompletedCheckpoints( CuratorFramework client, Configuration configuration, JobID jobId, int maxNumberOfCheckpointsToRetain, Executor executor) throws Exception { checkNotNull(configuration, "Configuration"); String checkpointsPath = configuration.getStr...
[ "public", "static", "CompletedCheckpointStore", "createCompletedCheckpoints", "(", "CuratorFramework", "client", ",", "Configuration", "configuration", ",", "JobID", "jobId", ",", "int", "maxNumberOfCheckpointsToRetain", ",", "Executor", "executor", ")", "throws", "Exceptio...
Creates a {@link ZooKeeperCompletedCheckpointStore} instance. @param client The {@link CuratorFramework} ZooKeeper client to use @param configuration {@link Configuration} object @param jobId ID of job to create the instance for @param maxNumberOfCheckp...
[ "Creates", "a", "{", "@link", "ZooKeeperCompletedCheckpointStore", "}", "instance", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java#L278-L303
train
Create a completed checkpoint store.
[ 30522, 2270, 10763, 2949, 5403, 3600, 26521, 19277, 3443, 9006, 10814, 3064, 5403, 3600, 26521, 1006, 13023, 15643, 6198, 7396, 1010, 9563, 9563, 1010, 3105, 3593, 3105, 3593, 1010, 20014, 4098, 19172, 5677, 11253, 5403, 3600, 26521, 19277, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...