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
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dependency/nnparser/NeuralNetworkParser.java
NeuralNetworkParser.get_features
void get_features(final State s, final List<Integer> cluster4, final List<Integer> cluster6, final List<Integer> cluster, List<Integer> features) { Context ctx = new Context(); get_context(s, ctx); get_ba...
java
void get_features(final State s, final List<Integer> cluster4, final List<Integer> cluster6, final List<Integer> cluster, List<Integer> features) { Context ctx = new Context(); get_context(s, ctx); get_ba...
[ "void", "get_features", "(", "final", "State", "s", ",", "final", "List", "<", "Integer", ">", "cluster4", ",", "final", "List", "<", "Integer", ">", "cluster6", ",", "final", "List", "<", "Integer", ">", "cluster", ",", "List", "<", "Integer", ">", "f...
生成特征 @param s 当前状态 @param cluster4 @param cluster6 @param cluster @param features 输出特征
[ "生成特征" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dependency/nnparser/NeuralNetworkParser.java#L608-L620
train
Get the features from a state.
[ 30522, 11675, 2131, 1035, 2838, 1006, 2345, 2110, 1055, 1010, 2345, 2862, 1026, 16109, 1028, 9324, 2549, 1010, 2345, 2862, 1026, 16109, 1028, 9324, 2575, 1010, 2345, 2862, 1026, 16109, 1028, 9324, 1010, 2862, 1026, 16109, 1028, 2838, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/pattern/Pattern.java
Pattern.until
public Pattern<T, F> until(IterativeCondition<F> untilCondition) { Preconditions.checkNotNull(untilCondition, "The condition cannot be null"); if (this.untilCondition != null) { throw new MalformedPatternException("Only one until condition can be applied."); } if (!quantifier.hasProperty(Quantifier.Quantif...
java
public Pattern<T, F> until(IterativeCondition<F> untilCondition) { Preconditions.checkNotNull(untilCondition, "The condition cannot be null"); if (this.untilCondition != null) { throw new MalformedPatternException("Only one until condition can be applied."); } if (!quantifier.hasProperty(Quantifier.Quantif...
[ "public", "Pattern", "<", "T", ",", "F", ">", "until", "(", "IterativeCondition", "<", "F", ">", "untilCondition", ")", "{", "Preconditions", ".", "checkNotNull", "(", "untilCondition", ",", "\"The condition cannot be null\"", ")", ";", "if", "(", "this", ".",...
Applies a stop condition for a looping state. It allows cleaning the underlying state. @param untilCondition a condition an event has to satisfy to stop collecting events into looping state @return The same pattern with applied untilCondition
[ "Applies", "a", "stop", "condition", "for", "a", "looping", "state", ".", "It", "allows", "cleaning", "the", "underlying", "state", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/pattern/Pattern.java#L219-L234
train
Sets the until condition.
[ 30522, 2270, 5418, 1026, 1056, 1010, 1042, 1028, 2127, 1006, 2009, 25284, 8663, 20562, 1026, 1042, 1028, 2127, 8663, 20562, 1007, 1063, 3653, 8663, 20562, 2015, 30524, 2065, 1006, 2023, 1012, 2127, 8663, 20562, 999, 1027, 19701, 1007, 1063,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/util/InstantiationUtil.java
InstantiationUtil.resolveClassByName
public static <T> Class<T> resolveClassByName( DataInputView in, ClassLoader cl) throws IOException { return resolveClassByName(in, cl, Object.class); }
java
public static <T> Class<T> resolveClassByName( DataInputView in, ClassLoader cl) throws IOException { return resolveClassByName(in, cl, Object.class); }
[ "public", "static", "<", "T", ">", "Class", "<", "T", ">", "resolveClassByName", "(", "DataInputView", "in", ",", "ClassLoader", "cl", ")", "throws", "IOException", "{", "return", "resolveClassByName", "(", "in", ",", "cl", ",", "Object", ".", "class", ")"...
Loads a class by name from the given input stream and reflectively instantiates it. <p>This method will use {@link DataInputView#readUTF()} to read the class name, and then attempt to load the class from the given ClassLoader. @param in The stream to read the class name from. @param cl The class loader to resolve the...
[ "Loads", "a", "class", "by", "name", "from", "the", "given", "input", "stream", "and", "reflectively", "instantiates", "it", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/InstantiationUtil.java#L678-L682
train
Resolves a class by name using the specified class loader.
[ 30522, 2270, 10763, 1026, 1056, 1028, 2465, 1026, 1056, 1028, 10663, 26266, 3762, 18442, 1006, 2951, 2378, 18780, 8584, 1999, 1010, 2465, 11066, 2121, 18856, 1007, 11618, 22834, 10288, 24422, 1063, 2709, 10663, 26266, 3762, 18442, 1006, 1999,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/UserDefinedFunction.java
UserDefinedFunction.functionIdentifier
public final String functionIdentifier() { final String md5 = EncodingUtils.hex(EncodingUtils.md5(EncodingUtils.encodeObjectToString(this))); return getClass().getCanonicalName().replace('.', '$').concat("$").concat(md5); }
java
public final String functionIdentifier() { final String md5 = EncodingUtils.hex(EncodingUtils.md5(EncodingUtils.encodeObjectToString(this))); return getClass().getCanonicalName().replace('.', '$').concat("$").concat(md5); }
[ "public", "final", "String", "functionIdentifier", "(", ")", "{", "final", "String", "md5", "=", "EncodingUtils", ".", "hex", "(", "EncodingUtils", ".", "md5", "(", "EncodingUtils", ".", "encodeObjectToString", "(", "this", ")", ")", ")", ";", "return", "get...
Returns a unique, serialized representation for this function.
[ "Returns", "a", "unique", "serialized", "representation", "for", "this", "function", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/UserDefinedFunction.java#L36-L39
train
Returns the function identifier.
[ 30522, 2270, 2345, 5164, 3853, 5178, 16778, 8873, 2121, 1006, 1007, 1063, 2345, 5164, 9108, 2629, 1027, 17181, 21823, 4877, 1012, 2002, 2595, 1006, 17181, 21823, 4877, 1012, 9108, 2629, 1006, 17181, 21823, 4877, 1012, 4372, 16044, 16429, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlFunctionUtils.java
SqlFunctionUtils.splitIndex
public static String splitIndex(String str, int character, int index) { if (character > 255 || character < 1 || index < 0) { return null; } String[] values = StringUtils.splitPreserveAllTokens(str, (char) character); if (index >= values.length) { return null; } else { return values[index]; } }
java
public static String splitIndex(String str, int character, int index) { if (character > 255 || character < 1 || index < 0) { return null; } String[] values = StringUtils.splitPreserveAllTokens(str, (char) character); if (index >= values.length) { return null; } else { return values[index]; } }
[ "public", "static", "String", "splitIndex", "(", "String", "str", ",", "int", "character", ",", "int", "index", ")", "{", "if", "(", "character", ">", "255", "||", "character", "<", "1", "||", "index", "<", "0", ")", "{", "return", "null", ";", "}", ...
Split target string with custom separator and pick the index-th(start with 0) result. @param str target string. @param character int value of the separator character @param index index of the result which you want. @return the string at the index of split results.
[ "Split", "target", "string", "with", "custom", "separator", "and", "pick", "the", "index", "-", "th", "(", "start", "with", "0", ")", "result", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlFunctionUtils.java#L330-L340
train
Splits the string into the specified character and returns the index of the first occurrence of the character.
[ 30522, 2270, 10763, 5164, 3975, 22254, 10288, 1006, 5164, 2358, 2099, 1010, 20014, 2839, 1010, 20014, 5950, 1007, 1063, 2065, 1006, 2839, 1028, 20637, 1064, 1064, 2839, 1026, 1015, 1064, 1064, 5950, 1026, 1014, 1007, 1063, 2709, 19701, 1025...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/sinks/TableSinkBase.java
TableSinkBase.configure
public final TableSink<T> configure(String[] fieldNames, TypeInformation<?>[] fieldTypes) { final TableSinkBase<T> configuredSink = this.copy(); configuredSink.fieldNames = Optional.of(fieldNames); configuredSink.fieldTypes = Optional.of(fieldTypes); return configuredSink; }
java
public final TableSink<T> configure(String[] fieldNames, TypeInformation<?>[] fieldTypes) { final TableSinkBase<T> configuredSink = this.copy(); configuredSink.fieldNames = Optional.of(fieldNames); configuredSink.fieldTypes = Optional.of(fieldTypes); return configuredSink; }
[ "public", "final", "TableSink", "<", "T", ">", "configure", "(", "String", "[", "]", "fieldNames", ",", "TypeInformation", "<", "?", ">", "[", "]", "fieldTypes", ")", "{", "final", "TableSinkBase", "<", "T", ">", "configuredSink", "=", "this", ".", "copy...
Returns a copy of this {@link TableSink} configured with the field names and types of the table to emit. @param fieldNames The field names of the table to emit. @param fieldTypes The field types of the table to emit. @return A copy of this {@link TableSink} configured with the field names and types of the table to emi...
[ "Returns", "a", "copy", "of", "this", "{", "@link", "TableSink", "}", "configured", "with", "the", "field", "names", "and", "types", "of", "the", "table", "to", "emit", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/sinks/TableSinkBase.java#L75-L82
train
Configure the sink to use the given field names and field types.
[ 30522, 2270, 2345, 7251, 19839, 1026, 1056, 1028, 9530, 8873, 27390, 2063, 1006, 5164, 1031, 1033, 2492, 18442, 2015, 1010, 2828, 2378, 14192, 3370, 1026, 1029, 1028, 1031, 1033, 2492, 13874, 2015, 1007, 1063, 2345, 7251, 19839, 15058, 1026...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
common/src/main/java/io/netty/util/concurrent/AbstractScheduledEventExecutor.java
AbstractScheduledEventExecutor.nextScheduledTaskNano
protected final long nextScheduledTaskNano() { Queue<ScheduledFutureTask<?>> scheduledTaskQueue = this.scheduledTaskQueue; ScheduledFutureTask<?> scheduledTask = scheduledTaskQueue == null ? null : scheduledTaskQueue.peek(); if (scheduledTask == null) { return -1; } r...
java
protected final long nextScheduledTaskNano() { Queue<ScheduledFutureTask<?>> scheduledTaskQueue = this.scheduledTaskQueue; ScheduledFutureTask<?> scheduledTask = scheduledTaskQueue == null ? null : scheduledTaskQueue.peek(); if (scheduledTask == null) { return -1; } r...
[ "protected", "final", "long", "nextScheduledTaskNano", "(", ")", "{", "Queue", "<", "ScheduledFutureTask", "<", "?", ">", ">", "scheduledTaskQueue", "=", "this", ".", "scheduledTaskQueue", ";", "ScheduledFutureTask", "<", "?", ">", "scheduledTask", "=", "scheduled...
Return the nanoseconds when the next scheduled task is ready to be run or {@code -1} if no task is scheduled.
[ "Return", "the", "nanoseconds", "when", "the", "next", "scheduled", "task", "is", "ready", "to", "be", "run", "or", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/concurrent/AbstractScheduledEventExecutor.java#L120-L127
train
Gets the number of nanoseconds that the next scheduled task has.
[ 30522, 5123, 2345, 2146, 2279, 22842, 8566, 3709, 10230, 2243, 7229, 2080, 1006, 1007, 1063, 24240, 1026, 5115, 11263, 11244, 10230, 2243, 1026, 1029, 1028, 1028, 5115, 10230, 2243, 4226, 5657, 1027, 2023, 1012, 5115, 10230, 2243, 4226, 565...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/Kafka08Fetcher.java
Kafka08Fetcher.runFetchLoop
@Override public void runFetchLoop() throws Exception { // the map from broker to the thread that is connected to that broker final Map<Node, SimpleConsumerThread<T>> brokerToThread = new HashMap<>(); // this holds possible the exceptions from the concurrent broker connection threads final ExceptionProxy erro...
java
@Override public void runFetchLoop() throws Exception { // the map from broker to the thread that is connected to that broker final Map<Node, SimpleConsumerThread<T>> brokerToThread = new HashMap<>(); // this holds possible the exceptions from the concurrent broker connection threads final ExceptionProxy erro...
[ "@", "Override", "public", "void", "runFetchLoop", "(", ")", "throws", "Exception", "{", "// the map from broker to the thread that is connected to that broker", "final", "Map", "<", "Node", ",", "SimpleConsumerThread", "<", "T", ">", ">", "brokerToThread", "=", "new", ...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/Kafka08Fetcher.java#L124-L325
train
Run the fetch loop.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2448, 7959, 10649, 4135, 7361, 1006, 1007, 11618, 6453, 1063, 1013, 1013, 1996, 4949, 2013, 20138, 2000, 1996, 11689, 2008, 2003, 4198, 2000, 2008, 20138, 2345, 4949, 1026, 13045, 1010, 3722, 8663, 235...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java
SQLOperation.prepare
public void prepare(HiveConf sqlOperationConf) throws HiveSQLException { setState(OperationState.RUNNING); try { driver = new Driver(sqlOperationConf, getParentSession().getUserName()); // set the operation handle information in Driver, so that thrift API users // can use the operation handl...
java
public void prepare(HiveConf sqlOperationConf) throws HiveSQLException { setState(OperationState.RUNNING); try { driver = new Driver(sqlOperationConf, getParentSession().getUserName()); // set the operation handle information in Driver, so that thrift API users // can use the operation handl...
[ "public", "void", "prepare", "(", "HiveConf", "sqlOperationConf", ")", "throws", "HiveSQLException", "{", "setState", "(", "OperationState", ".", "RUNNING", ")", ";", "try", "{", "driver", "=", "new", "Driver", "(", "sqlOperationConf", ",", "getParentSession", "...
* Compile the query and extract metadata @param sqlOperationConf @throws HiveSQLException
[ "*", "Compile", "the", "query", "and", "extract", "metadata" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java#L90-L145
train
Prepare the query.
[ 30522, 2270, 11675, 7374, 1006, 26736, 8663, 2546, 29296, 25918, 3370, 8663, 2546, 1007, 11618, 26736, 2015, 4160, 2571, 2595, 24422, 1063, 4520, 12259, 1006, 3136, 12259, 1012, 2770, 1007, 1025, 3046, 1063, 4062, 1027, 2047, 4062, 1006, 29...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java
ExpectedConditions.visibilityOfAllElements
public static ExpectedCondition<List<WebElement>> visibilityOfAllElements( final WebElement... elements) { return visibilityOfAllElements(Arrays.asList(elements)); }
java
public static ExpectedCondition<List<WebElement>> visibilityOfAllElements( final WebElement... elements) { return visibilityOfAllElements(Arrays.asList(elements)); }
[ "public", "static", "ExpectedCondition", "<", "List", "<", "WebElement", ">", ">", "visibilityOfAllElements", "(", "final", "WebElement", "...", "elements", ")", "{", "return", "visibilityOfAllElements", "(", "Arrays", ".", "asList", "(", "elements", ")", ")", "...
An expectation for checking that all elements present on the web page that match the locator are visible. Visibility means that the elements are not only displayed but also have a height and width that is greater than 0. @param elements list of WebElements @return the list of WebElements once they are located
[ "An", "expectation", "for", "checking", "that", "all", "elements", "present", "on", "the", "web", "page", "that", "match", "the", "locator", "are", "visible", ".", "Visibility", "means", "that", "the", "elements", "are", "not", "only", "displayed", "but", "a...
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java#L255-L258
train
An expectation for checking that all elements in the array are visible.
[ 30522, 2270, 10763, 3517, 8663, 20562, 1026, 2862, 1026, 4773, 12260, 3672, 1028, 1028, 16476, 11253, 24164, 16930, 11187, 1006, 2345, 4773, 12260, 3672, 1012, 1012, 1012, 3787, 1007, 1063, 2709, 16476, 11253, 24164, 16930, 11187, 1006, 27448...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/LaunchableMesosWorker.java
LaunchableMesosWorker.configureArtifactServer
static void configureArtifactServer(MesosArtifactServer server, ContainerSpecification container) throws IOException { // serve the artifacts associated with the container environment for (ContainerSpecification.Artifact artifact : container.getArtifacts()) { server.addPath(artifact.source, artifact.dest); } ...
java
static void configureArtifactServer(MesosArtifactServer server, ContainerSpecification container) throws IOException { // serve the artifacts associated with the container environment for (ContainerSpecification.Artifact artifact : container.getArtifacts()) { server.addPath(artifact.source, artifact.dest); } ...
[ "static", "void", "configureArtifactServer", "(", "MesosArtifactServer", "server", ",", "ContainerSpecification", "container", ")", "throws", "IOException", "{", "// serve the artifacts associated with the container environment", "for", "(", "ContainerSpecification", ".", "Artifa...
Configures an artifact server to serve the artifacts associated with a container specification. @param server the server to configure. @param container the container with artifacts to serve. @throws IOException if the artifacts cannot be accessed.
[ "Configures", "an", "artifact", "server", "to", "serve", "the", "artifacts", "associated", "with", "a", "container", "specification", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/LaunchableMesosWorker.java#L379-L384
train
Configure the artifact server.
[ 30522, 10763, 11675, 9530, 8873, 27390, 14644, 3775, 7011, 16649, 2121, 6299, 1006, 2033, 17063, 8445, 10128, 18908, 8043, 6299, 8241, 1010, 16143, 5051, 6895, 10803, 11661, 1007, 11618, 22834, 10288, 24422, 1063, 1013, 1013, 3710, 1996, 1047...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-json/src/main/java/cn/hutool/json/JSONUtil.java
JSONUtil.escape
public static String escape(String str) { if (StrUtil.isEmpty(str)) { return str; } final int len = str.length(); final StringBuilder builder = new StringBuilder(len); char c; for (int i = 0; i < len; i++) { c = str.charAt(i); builder.append(escape(c)); } return builder.toString();...
java
public static String escape(String str) { if (StrUtil.isEmpty(str)) { return str; } final int len = str.length(); final StringBuilder builder = new StringBuilder(len); char c; for (int i = 0; i < len; i++) { c = str.charAt(i); builder.append(escape(c)); } return builder.toString();...
[ "public", "static", "String", "escape", "(", "String", "str", ")", "{", "if", "(", "StrUtil", ".", "isEmpty", "(", "str", ")", ")", "{", "return", "str", ";", "}", "final", "int", "len", "=", "str", ".", "length", "(", ")", ";", "final", "StringBui...
转义显示不可见字符 @param str 字符串 @return 转义后的字符串
[ "转义显示不可见字符" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/JSONUtil.java#L543-L556
train
Escape a string.
[ 30522, 2270, 10763, 5164, 4019, 1006, 5164, 2358, 2099, 1007, 1063, 2065, 1006, 2358, 22134, 4014, 1012, 2003, 6633, 13876, 2100, 1006, 2358, 2099, 1007, 1007, 1063, 2709, 2358, 2099, 1025, 1065, 2345, 20014, 18798, 1027, 2358, 2099, 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/collection/trie/datrie/IntArrayList.java
IntArrayList.loseWeight
public void loseWeight() { if (size == data.length) { return; } int[] newData = new int[size]; System.arraycopy(this.data, 0, newData, 0, size); this.data = newData; }
java
public void loseWeight() { if (size == data.length) { return; } int[] newData = new int[size]; System.arraycopy(this.data, 0, newData, 0, size); this.data = newData; }
[ "public", "void", "loseWeight", "(", ")", "{", "if", "(", "size", "==", "data", ".", "length", ")", "{", "return", ";", "}", "int", "[", "]", "newData", "=", "new", "int", "[", "size", "]", ";", "System", ".", "arraycopy", "(", "this", ".", "data...
去掉多余的buffer
[ "去掉多余的buffer" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/trie/datrie/IntArrayList.java#L108-L117
train
This method is called to lose the weight of the record.
[ 30522, 2270, 11675, 4558, 11179, 1006, 1007, 1063, 2065, 1006, 2946, 1027, 1027, 2951, 1012, 3091, 1007, 1063, 2709, 1025, 1065, 20014, 1031, 1033, 2047, 2850, 2696, 1027, 2047, 20014, 1031, 2946, 1033, 1025, 2291, 1012, 9140, 3597, 7685, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/HttpConnection.java
HttpConnection.header
public HttpConnection header(String header, String value, boolean isOverride) { if (null != this.conn) { if (isOverride) { this.conn.setRequestProperty(header, value); } else { this.conn.addRequestProperty(header, value); } } return this; }
java
public HttpConnection header(String header, String value, boolean isOverride) { if (null != this.conn) { if (isOverride) { this.conn.setRequestProperty(header, value); } else { this.conn.addRequestProperty(header, value); } } return this; }
[ "public", "HttpConnection", "header", "(", "String", "header", ",", "String", "value", ",", "boolean", "isOverride", ")", "{", "if", "(", "null", "!=", "this", ".", "conn", ")", "{", "if", "(", "isOverride", ")", "{", "this", ".", "conn", ".", "setRequ...
设置请求头<br> 当请求头存在时,覆盖之 @param header 头名 @param value 头值 @param isOverride 是否覆盖旧值 @return HttpConnection
[ "设置请求头<br", ">", "当请求头存在时,覆盖之" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpConnection.java#L175-L185
train
Sets or overrides a request property.
[ 30522, 2270, 8299, 8663, 2638, 7542, 20346, 1006, 5164, 20346, 1010, 5164, 3643, 1010, 22017, 20898, 11163, 6299, 15637, 1007, 1063, 2065, 1006, 19701, 999, 1027, 2023, 1012, 9530, 2078, 1007, 1063, 2065, 1006, 11163, 6299, 15637, 1007, 106...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/WrappingRuntimeException.java
WrappingRuntimeException.unwrap
public Throwable unwrap() { Throwable cause = getCause(); return (cause instanceof WrappingRuntimeException) ? ((WrappingRuntimeException) cause).unwrap() : cause; }
java
public Throwable unwrap() { Throwable cause = getCause(); return (cause instanceof WrappingRuntimeException) ? ((WrappingRuntimeException) cause).unwrap() : cause; }
[ "public", "Throwable", "unwrap", "(", ")", "{", "Throwable", "cause", "=", "getCause", "(", ")", ";", "return", "(", "cause", "instanceof", "WrappingRuntimeException", ")", "?", "(", "(", "WrappingRuntimeException", ")", "cause", ")", ".", "unwrap", "(", ")"...
Recursively unwraps this WrappingRuntimeException and its causes, getting the first non wrapping exception. @return The first cause that is not a wrapping exception.
[ "Recursively", "unwraps", "this", "WrappingRuntimeException", "and", "its", "causes", "getting", "the", "first", "non", "wrapping", "exception", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/WrappingRuntimeException.java#L50-L53
train
Unwraps the wrapped exception.
[ 30522, 2270, 5466, 3085, 4895, 13088, 9331, 1006, 1007, 1063, 5466, 3085, 3426, 1027, 2131, 3540, 8557, 1006, 1007, 1025, 2709, 1006, 3426, 6013, 11253, 12252, 15532, 7292, 10288, 24422, 1007, 1029, 1006, 1006, 12252, 15532, 7292, 10288, 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...
netty/netty
transport/src/main/java/io/netty/bootstrap/ServerBootstrap.java
ServerBootstrap.childOption
public <T> ServerBootstrap childOption(ChannelOption<T> childOption, T value) { if (childOption == null) { throw new NullPointerException("childOption"); } if (value == null) { synchronized (childOptions) { childOptions.remove(childOption); } ...
java
public <T> ServerBootstrap childOption(ChannelOption<T> childOption, T value) { if (childOption == null) { throw new NullPointerException("childOption"); } if (value == null) { synchronized (childOptions) { childOptions.remove(childOption); } ...
[ "public", "<", "T", ">", "ServerBootstrap", "childOption", "(", "ChannelOption", "<", "T", ">", "childOption", ",", "T", "value", ")", "{", "if", "(", "childOption", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"childOption\"", ")",...
Allow to specify a {@link ChannelOption} which is used for the {@link Channel} instances once they get created (after the acceptor accepted the {@link Channel}). Use a value of {@code null} to remove a previous set {@link ChannelOption}.
[ "Allow", "to", "specify", "a", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/bootstrap/ServerBootstrap.java#L97-L111
train
Sets the value of a childOption.
[ 30522, 2270, 1026, 1056, 1028, 8241, 27927, 20528, 2361, 2775, 7361, 3508, 1006, 3149, 7361, 3508, 1026, 1056, 1028, 2775, 7361, 3508, 1010, 1056, 3643, 1007, 1063, 2065, 1006, 2775, 7361, 3508, 1027, 1027, 19701, 1007, 1063, 5466, 2047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java
Configuration.addDeprecations
public static void addDeprecations(DeprecationDelta[] deltas) { DeprecationContext prev, next; do { prev = deprecationContext.get(); next = new DeprecationContext(prev, deltas); } while (!deprecationContext.compareAndSet(prev, next)); }
java
public static void addDeprecations(DeprecationDelta[] deltas) { DeprecationContext prev, next; do { prev = deprecationContext.get(); next = new DeprecationContext(prev, deltas); } while (!deprecationContext.compareAndSet(prev, next)); }
[ "public", "static", "void", "addDeprecations", "(", "DeprecationDelta", "[", "]", "deltas", ")", "{", "DeprecationContext", "prev", ",", "next", ";", "do", "{", "prev", "=", "deprecationContext", ".", "get", "(", ")", ";", "next", "=", "new", "DeprecationCon...
Adds a set of deprecated keys to the global deprecations. This method is lockless. It works by means of creating a new DeprecationContext based on the old one, and then atomically swapping in the new context. If someone else updated the context in between us reading the old context and swapping in the new one, we tr...
[ "Adds", "a", "set", "of", "deprecated", "keys", "to", "the", "global", "deprecations", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L456-L462
train
Add a list of deprecation deltas to the current deprecation context.
[ 30522, 2270, 10763, 11675, 5587, 3207, 28139, 10719, 2015, 1006, 2139, 28139, 10719, 9247, 2696, 1031, 1033, 7160, 2015, 1007, 1063, 2139, 28139, 10719, 8663, 18209, 3653, 2615, 1010, 2279, 1025, 2079, 1063, 3653, 2615, 1027, 2139, 28139, 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/multipart/HttpPostStandardRequestDecoder.java
HttpPostStandardRequestDecoder.parseBody
private void parseBody() { if (currentStatus == MultiPartStatus.PREEPILOGUE || currentStatus == MultiPartStatus.EPILOGUE) { if (isLastChunk) { currentStatus = MultiPartStatus.EPILOGUE; } return; } parseBodyAttributes(); }
java
private void parseBody() { if (currentStatus == MultiPartStatus.PREEPILOGUE || currentStatus == MultiPartStatus.EPILOGUE) { if (isLastChunk) { currentStatus = MultiPartStatus.EPILOGUE; } return; } parseBodyAttributes(); }
[ "private", "void", "parseBody", "(", ")", "{", "if", "(", "currentStatus", "==", "MultiPartStatus", ".", "PREEPILOGUE", "||", "currentStatus", "==", "MultiPartStatus", ".", "EPILOGUE", ")", "{", "if", "(", "isLastChunk", ")", "{", "currentStatus", "=", "MultiP...
This getMethod will parse as much as possible data and fill the list and map @throws ErrorDataDecoderException if there is a problem with the charset decoding or other errors
[ "This", "getMethod", "will", "parse", "as", "much", "as", "possible", "data", "and", "fill", "the", "list", "and", "map" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostStandardRequestDecoder.java#L353-L361
train
Parse the body of the message.
[ 30522, 2797, 11675, 11968, 3366, 23684, 1006, 1007, 1063, 2065, 1006, 14731, 29336, 2271, 1027, 1027, 4800, 26950, 29336, 2271, 1012, 3653, 13699, 22360, 9077, 1064, 1064, 14731, 29336, 2271, 1027, 1027, 4800, 30524, 1025, 1065, 11968, 3366, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/info/GitProperties.java
GitProperties.getShortCommitId
public String getShortCommitId() { String shortId = get("commit.id.abbrev"); if (shortId != null) { return shortId; } String id = getCommitId(); if (id == null) { return null; } return (id.length() > 7) ? id.substring(0, 7) : id; }
java
public String getShortCommitId() { String shortId = get("commit.id.abbrev"); if (shortId != null) { return shortId; } String id = getCommitId(); if (id == null) { return null; } return (id.length() > 7) ? id.substring(0, 7) : id; }
[ "public", "String", "getShortCommitId", "(", ")", "{", "String", "shortId", "=", "get", "(", "\"commit.id.abbrev\"", ")", ";", "if", "(", "shortId", "!=", "null", ")", "{", "return", "shortId", ";", "}", "String", "id", "=", "getCommitId", "(", ")", ";",...
Return the abbreviated id of the commit or {@code null}. @return the short commit id
[ "Return", "the", "abbreviated", "id", "of", "the", "commit", "or", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/info/GitProperties.java#L56-L66
train
Returns the commit id as a string.
[ 30522, 2270, 5164, 4152, 27794, 9006, 22930, 3593, 1006, 1007, 1063, 5164, 2460, 3593, 1027, 2131, 1006, 1000, 10797, 1012, 8909, 1012, 11113, 13578, 2615, 1000, 1007, 1025, 2065, 1006, 2460, 3593, 999, 1027, 19701, 1007, 1063, 2709, 2460, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-filesystem/src/main/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSink.java
BucketingSink.openNewPartFile
private void openNewPartFile(Path bucketPath, BucketState<T> bucketState) throws Exception { closeCurrentPartFile(bucketState); if (!fs.exists(bucketPath)) { try { if (fs.mkdirs(bucketPath)) { LOG.debug("Created new bucket directory: {}", bucketPath); } } catch (IOException e) { throw new Ru...
java
private void openNewPartFile(Path bucketPath, BucketState<T> bucketState) throws Exception { closeCurrentPartFile(bucketState); if (!fs.exists(bucketPath)) { try { if (fs.mkdirs(bucketPath)) { LOG.debug("Created new bucket directory: {}", bucketPath); } } catch (IOException e) { throw new Ru...
[ "private", "void", "openNewPartFile", "(", "Path", "bucketPath", ",", "BucketState", "<", "T", ">", "bucketState", ")", "throws", "Exception", "{", "closeCurrentPartFile", "(", "bucketState", ")", ";", "if", "(", "!", "fs", ".", "exists", "(", "bucketPath", ...
Closes the current part file and opens a new one with a new bucket path, as returned by the {@link Bucketer}. If the bucket is not new, then this will create a new file with the same path as its predecessor, but with an increased rolling counter (see {@link BucketingSink}.
[ "Closes", "the", "current", "part", "file", "and", "opens", "a", "new", "one", "with", "a", "new", "bucket", "path", "as", "returned", "by", "the", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-filesystem/src/main/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSink.java#L536-L585
train
Opens a new part file.
[ 30522, 2797, 11675, 2330, 2638, 2860, 19362, 24475, 9463, 1006, 4130, 13610, 15069, 1010, 13610, 9153, 2618, 1026, 1056, 1028, 13610, 9153, 2618, 1007, 11618, 6453, 1063, 2485, 10841, 14343, 3372, 19362, 24475, 9463, 1006, 13610, 9153, 2618, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/DeclarativeAggregateFunction.java
DeclarativeAggregateFunction.mergeOperand
public final UnresolvedReferenceExpression mergeOperand(UnresolvedReferenceExpression aggBuffer) { String name = String.valueOf(Arrays.asList(aggBufferAttributes()).indexOf(aggBuffer)); validateOperandName(name); return new UnresolvedReferenceExpression(name); }
java
public final UnresolvedReferenceExpression mergeOperand(UnresolvedReferenceExpression aggBuffer) { String name = String.valueOf(Arrays.asList(aggBufferAttributes()).indexOf(aggBuffer)); validateOperandName(name); return new UnresolvedReferenceExpression(name); }
[ "public", "final", "UnresolvedReferenceExpression", "mergeOperand", "(", "UnresolvedReferenceExpression", "aggBuffer", ")", "{", "String", "name", "=", "String", ".", "valueOf", "(", "Arrays", ".", "asList", "(", "aggBufferAttributes", "(", ")", ")", ".", "indexOf",...
Merge input of {@link #mergeExpressions()}, the input are AGG buffer generated by user definition.
[ "Merge", "input", "of", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/DeclarativeAggregateFunction.java#L146-L150
train
Merge an operand into this one.
[ 30522, 2270, 2345, 4895, 6072, 16116, 2890, 25523, 10288, 20110, 3258, 13590, 25918, 5685, 1006, 4895, 6072, 16116, 2890, 25523, 10288, 20110, 3258, 12943, 18259, 16093, 7512, 1007, 1063, 5164, 2171, 1027, 5164, 1012, 3643, 11253, 1006, 27448...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-kafka-0.9/src/main/java/org/apache/flink/streaming/connectors/kafka/internal/Kafka09Fetcher.java
Kafka09Fetcher.emitRecord
protected void emitRecord( T record, KafkaTopicPartitionState<TopicPartition> partition, long offset, @SuppressWarnings("UnusedParameters") ConsumerRecord<?, ?> consumerRecord) throws Exception { // the 0.9 Fetcher does not try to extract a timestamp emitRecord(record, partition, offset); }
java
protected void emitRecord( T record, KafkaTopicPartitionState<TopicPartition> partition, long offset, @SuppressWarnings("UnusedParameters") ConsumerRecord<?, ?> consumerRecord) throws Exception { // the 0.9 Fetcher does not try to extract a timestamp emitRecord(record, partition, offset); }
[ "protected", "void", "emitRecord", "(", "T", "record", ",", "KafkaTopicPartitionState", "<", "TopicPartition", ">", "partition", ",", "long", "offset", ",", "@", "SuppressWarnings", "(", "\"UnusedParameters\"", ")", "ConsumerRecord", "<", "?", ",", "?", ">", "co...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-0.9/src/main/java/org/apache/flink/streaming/connectors/kafka/internal/Kafka09Fetcher.java#L190-L198
train
Emits a single record to the Kafka topic partition.
[ 30522, 5123, 11675, 12495, 7913, 27108, 2094, 1006, 1056, 2501, 1010, 10556, 24316, 10610, 24330, 19362, 3775, 9285, 12259, 1026, 8476, 19362, 3775, 3508, 1028, 13571, 1010, 2146, 16396, 1010, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 15171,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
launcher/src/main/java/org/apache/spark/launcher/SparkLauncher.java
SparkLauncher.startApplication
@Override public SparkAppHandle startApplication(SparkAppHandle.Listener... listeners) throws IOException { LauncherServer server = LauncherServer.getOrCreateServer(); ChildProcAppHandle handle = new ChildProcAppHandle(server); for (SparkAppHandle.Listener l : listeners) { handle.addListener(l); ...
java
@Override public SparkAppHandle startApplication(SparkAppHandle.Listener... listeners) throws IOException { LauncherServer server = LauncherServer.getOrCreateServer(); ChildProcAppHandle handle = new ChildProcAppHandle(server); for (SparkAppHandle.Listener l : listeners) { handle.addListener(l); ...
[ "@", "Override", "public", "SparkAppHandle", "startApplication", "(", "SparkAppHandle", ".", "Listener", "...", "listeners", ")", "throws", "IOException", "{", "LauncherServer", "server", "=", "LauncherServer", ".", "getOrCreateServer", "(", ")", ";", "ChildProcAppHan...
Starts a Spark application. <p> Applications launched by this launcher run as child processes. The child's stdout and stderr are merged and written to a logger (see <code>java.util.logging</code>) only if redirection has not otherwise been configured on this <code>SparkLauncher</code>. The logger's name can be defined...
[ "Starts", "a", "Spark", "application", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/launcher/src/main/java/org/apache/spark/launcher/SparkLauncher.java#L350-L407
train
Start the application.
[ 30522, 1030, 2058, 15637, 2270, 12125, 29098, 11774, 2571, 2707, 29098, 19341, 3508, 1006, 12125, 29098, 11774, 2571, 1012, 19373, 1012, 1012, 1012, 13810, 1007, 11618, 22834, 10288, 24422, 1063, 22742, 8043, 6299, 8241, 1027, 22742, 8043, 62...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/task/TaskExecutorBuilder.java
TaskExecutorBuilder.configure
public <T extends ThreadPoolTaskExecutor> T configure(T taskExecutor) { PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull(); map.from(this.queueCapacity).to(taskExecutor::setQueueCapacity); map.from(this.corePoolSize).to(taskExecutor::setCorePoolSize); map.from(this.maxPoolSize).to(taskExecuto...
java
public <T extends ThreadPoolTaskExecutor> T configure(T taskExecutor) { PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull(); map.from(this.queueCapacity).to(taskExecutor::setQueueCapacity); map.from(this.corePoolSize).to(taskExecutor::setCorePoolSize); map.from(this.maxPoolSize).to(taskExecuto...
[ "public", "<", "T", "extends", "ThreadPoolTaskExecutor", ">", "T", "configure", "(", "T", "taskExecutor", ")", "{", "PropertyMapper", "map", "=", "PropertyMapper", ".", "get", "(", ")", ".", "alwaysApplyingWhenNonNull", "(", ")", ";", "map", ".", "from", "("...
Configure the provided {@link ThreadPoolTaskExecutor} instance using this builder. @param <T> the type of task executor @param taskExecutor the {@link ThreadPoolTaskExecutor} to configure @return the task executor instance @see #build() @see #build(Class)
[ "Configure", "the", "provided", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/task/TaskExecutorBuilder.java#L317-L336
train
Configure the given task executor.
[ 30522, 2270, 1026, 1056, 8908, 11689, 16869, 10230, 3489, 2595, 8586, 16161, 2099, 1028, 1056, 9530, 8873, 27390, 2063, 1006, 1056, 4708, 10288, 8586, 16161, 2099, 1007, 1063, 3200, 2863, 18620, 4949, 1027, 3200, 2863, 18620, 1012, 2131, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/collection/IterUtil.java
IterUtil.toMap
public static <K, V> Map<K, V> toMap(Iterator<K> keys, Iterator<V> values, boolean isOrder) { final Map<K, V> resultMap = MapUtil.newHashMap(isOrder); if (isNotEmpty(keys)) { while (keys.hasNext()) { resultMap.put(keys.next(), (null != values && values.hasNext()) ? values.next() : null); } } re...
java
public static <K, V> Map<K, V> toMap(Iterator<K> keys, Iterator<V> values, boolean isOrder) { final Map<K, V> resultMap = MapUtil.newHashMap(isOrder); if (isNotEmpty(keys)) { while (keys.hasNext()) { resultMap.put(keys.next(), (null != values && values.hasNext()) ? values.next() : null); } } re...
[ "public", "static", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "V", ">", "toMap", "(", "Iterator", "<", "K", ">", "keys", ",", "Iterator", "<", "V", ">", "values", ",", "boolean", "isOrder", ")", "{", "final", "Map", "<", "K", ",", "V", "...
将键列表和值列表转换为Map<br> 以键为准,值与键位置需对应。如果键元素数多于值元素,多余部分值用null代替。<br> 如果值多于键,忽略多余的值。 @param <K> 键类型 @param <V> 值类型 @param keys 键列表 @param values 值列表 @param isOrder 是否有序 @return 标题内容Map @since 4.1.12
[ "将键列表和值列表转换为Map<br", ">", "以键为准,值与键位置需对应。如果键元素数多于值元素,多余部分值用null代替。<br", ">", "如果值多于键,忽略多余的值。" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/IterUtil.java#L421-L429
train
Creates a map from the given iterator.
[ 30522, 2270, 10763, 1026, 1047, 1010, 1058, 1028, 4949, 1026, 1047, 1010, 1058, 1028, 3419, 9331, 1006, 2009, 6906, 4263, 1026, 1047, 1028, 6309, 1010, 2009, 6906, 4263, 1026, 1058, 1028, 5300, 1010, 22017, 20898, 11163, 26764, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java
DoubleArrayTrie.load
public boolean load(byte[] bytes, int offset, V[] value) { if (bytes == null) return false; size = ByteUtil.bytesHighFirstToInt(bytes, offset); offset += 4; base = new int[size + 65535]; // 多留一些,防止越界 check = new int[size + 65535]; for (int i = 0; i < size; i++) ...
java
public boolean load(byte[] bytes, int offset, V[] value) { if (bytes == null) return false; size = ByteUtil.bytesHighFirstToInt(bytes, offset); offset += 4; base = new int[size + 65535]; // 多留一些,防止越界 check = new int[size + 65535]; for (int i = 0; i < size; i++) ...
[ "public", "boolean", "load", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "V", "[", "]", "value", ")", "{", "if", "(", "bytes", "==", "null", ")", "return", "false", ";", "size", "=", "ByteUtil", ".", "bytesHighFirstToInt", "(", "bytes"...
从字节数组加载(发现在MacOS上,此方法比ByteArray更快) @param bytes @param offset @param value @return
[ "从字节数组加载(发现在MacOS上,此方法比ByteArray更快)" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java#L555-L571
train
Load a single class from the bytes.
[ 30522, 2270, 22017, 20898, 7170, 1006, 24880, 1031, 1033, 27507, 1010, 20014, 16396, 1010, 1058, 1031, 1033, 3643, 1007, 1063, 2065, 1006, 27507, 1027, 1027, 19701, 1007, 2709, 6270, 1025, 2946, 1027, 24880, 21823, 2140, 1012, 27507, 4048, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/NioUtils.java
NioUtils.deleteOldFiles
public static void deleteOldFiles(String dirPath, int olderThanMinute) { File folder = new File(dirPath); if (folder.exists()) { File[] listFiles = folder.listFiles(); long eligibleForDeletion = System.currentTimeMillis() - (olderThanMinute * 60 * 1000L); for (File ...
java
public static void deleteOldFiles(String dirPath, int olderThanMinute) { File folder = new File(dirPath); if (folder.exists()) { File[] listFiles = folder.listFiles(); long eligibleForDeletion = System.currentTimeMillis() - (olderThanMinute * 60 * 1000L); for (File ...
[ "public", "static", "void", "deleteOldFiles", "(", "String", "dirPath", ",", "int", "olderThanMinute", ")", "{", "File", "folder", "=", "new", "File", "(", "dirPath", ")", ";", "if", "(", "folder", ".", "exists", "(", ")", ")", "{", "File", "[", "]", ...
Delele old files @param dirPath path of the filesystem @param olderThanMinute the minutes that defines older files
[ "Delele", "old", "files" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/utility/src/main/java/com/networknt/utility/NioUtils.java#L230-L244
train
Delete old files.
[ 30522, 2270, 10763, 11675, 3972, 12870, 11614, 8873, 4244, 1006, 5164, 16101, 15069, 1010, 20014, 3080, 21604, 10020, 10421, 1007, 1063, 5371, 19622, 1027, 2047, 5371, 1006, 16101, 15069, 1007, 1025, 2065, 1006, 19622, 1012, 6526, 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-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
ExecutionEnvironment.registerTypeWithKryoSerializer
public void registerTypeWithKryoSerializer(Class<?> type, Class<? extends Serializer<?>> serializerClass) { config.registerTypeWithKryoSerializer(type, serializerClass); }
java
public void registerTypeWithKryoSerializer(Class<?> type, Class<? extends Serializer<?>> serializerClass) { config.registerTypeWithKryoSerializer(type, serializerClass); }
[ "public", "void", "registerTypeWithKryoSerializer", "(", "Class", "<", "?", ">", "type", ",", "Class", "<", "?", "extends", "Serializer", "<", "?", ">", ">", "serializerClass", ")", "{", "config", ".", "registerTypeWithKryoSerializer", "(", "type", ",", "seria...
Registers the given Serializer via its class as a serializer for the given type at the KryoSerializer. @param type The class of the types serialized with the given serializer. @param serializerClass The class of the serializer to use.
[ "Registers", "the", "given", "Serializer", "via", "its", "class", "as", "a", "serializer", "for", "the", "given", "type", "at", "the", "KryoSerializer", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java#L354-L356
train
Register a type with the Kryo serializer.
[ 30522, 2270, 11675, 4236, 13874, 24415, 21638, 7677, 8043, 4818, 17629, 1006, 2465, 1026, 1029, 1028, 2828, 1010, 2465, 1026, 1029, 8908, 7642, 17629, 1026, 1029, 1028, 1028, 7642, 17629, 26266, 1007, 1063, 9530, 8873, 2290, 1012, 4236, 138...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/util/StringUtils.java
StringUtils.writeNullableString
public static void writeNullableString(@Nullable String str, DataOutputView out) throws IOException { if (str != null) { out.writeBoolean(true); writeString(str, out); } else { out.writeBoolean(false); } }
java
public static void writeNullableString(@Nullable String str, DataOutputView out) throws IOException { if (str != null) { out.writeBoolean(true); writeString(str, out); } else { out.writeBoolean(false); } }
[ "public", "static", "void", "writeNullableString", "(", "@", "Nullable", "String", "str", ",", "DataOutputView", "out", ")", "throws", "IOException", "{", "if", "(", "str", "!=", "null", ")", "{", "out", ".", "writeBoolean", "(", "true", ")", ";", "writeSt...
Writes a String to the given output. The string may be null. The written string can be read with {@link #readNullableString(DataInputView)}- @param str The string to write, or null. @param out The output to write to. @throws IOException Thrown, if the writing or the serialization fails.
[ "Writes", "a", "String", "to", "the", "given", "output", ".", "The", "string", "may", "be", "null", ".", "The", "written", "string", "can", "be", "read", "with", "{", "@link", "#readNullableString", "(", "DataInputView", ")", "}", "-" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/StringUtils.java#L319-L326
train
Write a String to a DataOutputView.
[ 30522, 2270, 10763, 11675, 4339, 11231, 4571, 13510, 18886, 3070, 1006, 1030, 19701, 3085, 5164, 2358, 2099, 1010, 2951, 5833, 18780, 8584, 2041, 1007, 11618, 22834, 10288, 24422, 1063, 2065, 1006, 2358, 2099, 999, 1027, 19701, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
common/src/main/java/io/netty/util/internal/NativeLibraryLoader.java
NativeLibraryLoader.patchShadedLibraryId
static boolean patchShadedLibraryId(InputStream in, OutputStream out, String originalName, String name) throws IOException { byte[] buffer = new byte[8192]; int length; // We read the whole native lib into memory to make it easier to monkey-patch the id. ByteArrayOutputStream...
java
static boolean patchShadedLibraryId(InputStream in, OutputStream out, String originalName, String name) throws IOException { byte[] buffer = new byte[8192]; int length; // We read the whole native lib into memory to make it easier to monkey-patch the id. ByteArrayOutputStream...
[ "static", "boolean", "patchShadedLibraryId", "(", "InputStream", "in", ",", "OutputStream", "out", ",", "String", "originalName", ",", "String", "name", ")", "throws", "IOException", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "8192", "]", ";",...
Package-private for testing.
[ "Package", "-", "private", "for", "testing", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/NativeLibraryLoader.java#L241-L274
train
Patch the shaded library id.
[ 30522, 10763, 22017, 20898, 8983, 7377, 5732, 29521, 19848, 10139, 2094, 1006, 20407, 25379, 1999, 1010, 27852, 25379, 2041, 1010, 5164, 2434, 18442, 1010, 5164, 2171, 1007, 11618, 22834, 10288, 24422, 1063, 24880, 1031, 1033, 17698, 1027, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/IterativeStream.java
IterativeStream.withFeedbackType
public <F> ConnectedIterativeStreams<T, F> withFeedbackType(TypeInformation<F> feedbackType) { return new ConnectedIterativeStreams<>(originalInput, feedbackType, maxWaitTime); }
java
public <F> ConnectedIterativeStreams<T, F> withFeedbackType(TypeInformation<F> feedbackType) { return new ConnectedIterativeStreams<>(originalInput, feedbackType, maxWaitTime); }
[ "public", "<", "F", ">", "ConnectedIterativeStreams", "<", "T", ",", "F", ">", "withFeedbackType", "(", "TypeInformation", "<", "F", ">", "feedbackType", ")", "{", "return", "new", "ConnectedIterativeStreams", "<>", "(", "originalInput", ",", "feedbackType", ","...
Changes the feedback type of the iteration and allows the user to apply co-transformations on the input and feedback stream, as in a {@link ConnectedStreams}. <p>For type safety the user needs to define the feedback type @param feedbackType The type information of the feedback stream. @return A {@link ConnectedIterat...
[ "Changes", "the", "feedback", "type", "of", "the", "iteration", "and", "allows", "the", "user", "to", "apply", "co", "-", "transformations", "on", "the", "input", "and", "feedback", "stream", "as", "in", "a", "{", "@link", "ConnectedStreams", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/IterativeStream.java#L123-L125
train
Returns a new ConnectedIterativeStreams instance with the specified feedback type.
[ 30522, 2270, 1026, 1042, 1028, 4198, 21646, 8082, 21422, 2015, 1026, 1056, 1010, 1042, 1028, 2007, 7959, 2098, 5963, 13874, 1006, 2828, 2378, 14192, 3370, 1026, 1042, 1028, 12247, 13874, 1007, 1063, 2709, 2047, 4198, 21646, 8082, 21422, 201...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java
ZipUtil.copy
private static void copy(ZipFile zipFile, ZipEntry zipEntry, File outItemFile) throws IOException { InputStream in = null; OutputStream out = null; try { in = zipFile.getInputStream(zipEntry); out = FileUtil.getOutputStream(outItemFile); IoUtil.copy(in, out); } finally { IoUtil.close(out); ...
java
private static void copy(ZipFile zipFile, ZipEntry zipEntry, File outItemFile) throws IOException { InputStream in = null; OutputStream out = null; try { in = zipFile.getInputStream(zipEntry); out = FileUtil.getOutputStream(outItemFile); IoUtil.copy(in, out); } finally { IoUtil.close(out); ...
[ "private", "static", "void", "copy", "(", "ZipFile", "zipFile", ",", "ZipEntry", "zipEntry", ",", "File", "outItemFile", ")", "throws", "IOException", "{", "InputStream", "in", "=", "null", ";", "OutputStream", "out", "=", "null", ";", "try", "{", "in", "=...
从Zip文件流中拷贝文件出来 @param zipFile Zip文件 @param zipEntry zip文件中的子文件 @param outItemFile 输出到的文件 @throws IOException IO异常
[ "从Zip文件流中拷贝文件出来" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java#L905-L916
train
Copy the contents of the specified zip entry to the specified output item file.
[ 30522, 2797, 10763, 11675, 6100, 1006, 14101, 8873, 2571, 14101, 8873, 2571, 1010, 14101, 4765, 2854, 14101, 4765, 2854, 1010, 5371, 2041, 4221, 2213, 8873, 2571, 1007, 11618, 22834, 10288, 24422, 1063, 20407, 25379, 1999, 1027, 19701, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java
LogBuffer.forward
public final LogBuffer forward(final int len) { if (position + len > origin + limit) throw new IllegalArgumentException("limit excceed: " + (position + len - origin)); this.position += len; return this; }
java
public final LogBuffer forward(final int len) { if (position + len > origin + limit) throw new IllegalArgumentException("limit excceed: " + (position + len - origin)); this.position += len; return this; }
[ "public", "final", "LogBuffer", "forward", "(", "final", "int", "len", ")", "{", "if", "(", "position", "+", "len", ">", "origin", "+", "limit", ")", "throw", "new", "IllegalArgumentException", "(", "\"limit excceed: \"", "+", "(", "position", "+", "len", ...
Forwards this buffer's position. @param len The forward distance @return This buffer
[ "Forwards", "this", "buffer", "s", "position", "." ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java#L114-L120
train
Forward to the end of the buffer.
[ 30522, 2270, 2345, 8833, 8569, 12494, 2830, 1006, 2345, 20014, 18798, 1007, 1063, 2065, 1006, 2597, 1009, 18798, 1028, 4761, 1009, 5787, 1007, 5466, 2047, 6206, 2906, 22850, 15781, 2595, 24422, 1006, 1000, 5787, 4654, 9468, 13089, 1024, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dictionary/nr/TranslatedPersonDictionary.java
TranslatedPersonDictionary.containsKey
public static boolean containsKey(String key, int length) { if (!trie.containsKey(key)) return false; return key.length() >= length; }
java
public static boolean containsKey(String key, int length) { if (!trie.containsKey(key)) return false; return key.length() >= length; }
[ "public", "static", "boolean", "containsKey", "(", "String", "key", ",", "int", "length", ")", "{", "if", "(", "!", "trie", ".", "containsKey", "(", "key", ")", ")", "return", "false", ";", "return", "key", ".", "length", "(", ")", ">=", "length", ";...
时报包含key,且key至少长length @param key @param length @return
[ "时报包含key,且key至少长length" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dictionary/nr/TranslatedPersonDictionary.java#L123-L127
train
Check if a key is present in the trie.
[ 30522, 2270, 10763, 22017, 20898, 3397, 14839, 1006, 5164, 3145, 1010, 20014, 3091, 1007, 1063, 2065, 1006, 999, 13012, 2063, 1012, 3397, 14839, 1006, 3145, 1007, 1007, 2709, 6270, 1025, 2709, 3145, 1012, 3091, 1006, 1007, 1028, 1027, 3091,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
consul/src/main/java/com/networknt/consul/ConsulUtils.java
ConsulUtils.isSame
public static boolean isSame(List<URL> urls1, List<URL> urls2) { if (urls1 == null || urls2 == null) { return false; } if (urls1.size() != urls2.size()) { return false; } return urls1.containsAll(urls2); }
java
public static boolean isSame(List<URL> urls1, List<URL> urls2) { if (urls1 == null || urls2 == null) { return false; } if (urls1.size() != urls2.size()) { return false; } return urls1.containsAll(urls2); }
[ "public", "static", "boolean", "isSame", "(", "List", "<", "URL", ">", "urls1", ",", "List", "<", "URL", ">", "urls2", ")", "{", "if", "(", "urls1", "==", "null", "||", "urls2", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "url...
Check if two lists have the same urls. If any list is empty, return false @param urls1 first url list @param urls2 second url list @return boolean true when they are the same
[ "Check", "if", "two", "lists", "have", "the", "same", "urls", ".", "If", "any", "list", "is", "empty", "return", "false" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/consul/src/main/java/com/networknt/consul/ConsulUtils.java#L38-L46
train
Check if two lists are the same.
[ 30522, 2270, 10763, 22017, 20898, 26354, 14074, 1006, 2862, 1026, 24471, 2140, 1028, 24471, 4877, 2487, 1010, 2862, 1026, 24471, 2140, 1028, 24471, 4877, 2475, 1007, 1063, 2065, 1006, 24471, 4877, 2487, 1027, 1027, 19701, 1064, 1064, 24471, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/map/multi/ListValueMap.java
ListValueMap.get
@Override public List<V> get(Object key) { return (List<V>) super.get(key); }
java
@Override public List<V> get(Object key) { return (List<V>) super.get(key); }
[ "@", "Override", "public", "List", "<", "V", ">", "get", "(", "Object", "key", ")", "{", "return", "(", "List", "<", "V", ">", ")", "super", ".", "get", "(", "key", ")", ";", "}" ]
------------------------------------------------------------------------- Constructor end
[ "-------------------------------------------------------------------------", "Constructor", "end" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/multi/ListValueMap.java#L69-L72
train
Override to return a list of objects that contain a reference to a managed object.
[ 30522, 1030, 2058, 15637, 2270, 2862, 1026, 1058, 1028, 2131, 1006, 4874, 3145, 1007, 1063, 2709, 1006, 2862, 1026, 1058, 1028, 1007, 3565, 1012, 2131, 1006, 3145, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.isUnsupportedExpectation
static boolean isUnsupportedExpectation(HttpMessage message) { if (!isExpectHeaderValid(message)) { return false; } final String expectValue = message.headers().get(HttpHeaderNames.EXPECT); return expectValue != null && !HttpHeaderValues.CONTINUE.toString().equalsIgnoreCase(...
java
static boolean isUnsupportedExpectation(HttpMessage message) { if (!isExpectHeaderValid(message)) { return false; } final String expectValue = message.headers().get(HttpHeaderNames.EXPECT); return expectValue != null && !HttpHeaderValues.CONTINUE.toString().equalsIgnoreCase(...
[ "static", "boolean", "isUnsupportedExpectation", "(", "HttpMessage", "message", ")", "{", "if", "(", "!", "isExpectHeaderValid", "(", "message", ")", ")", "{", "return", "false", ";", "}", "final", "String", "expectValue", "=", "message", ".", "headers", "(", ...
Returns {@code true} if the specified message contains an expect header specifying an expectation that is not supported. Note that this method returns {@code false} if the expect header is not valid for the message (e.g., the message is a response, or the version on the message is HTTP/1.0). @param message the message...
[ "Returns", "{", "@code", "true", "}", "if", "the", "specified", "message", "contains", "an", "expect", "header", "specifying", "an", "expectation", "that", "is", "not", "supported", ".", "Note", "that", "this", "method", "returns", "{", "@code", "false", "}"...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java#L260-L267
train
Check if the given message contains unsupported expectations.
[ 30522, 10763, 22017, 20898, 2003, 4609, 6342, 9397, 15613, 10288, 5051, 25572, 3508, 1006, 8299, 7834, 3736, 3351, 4471, 1007, 1063, 2065, 1006, 999, 2003, 10288, 5051, 6593, 4974, 2121, 10175, 3593, 1006, 4471, 1007, 1007, 1063, 2709, 6270...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/yaml/engine/YamlEngine.java
YamlEngine.unmarshal
public static <T extends YamlConfiguration> T unmarshal(final File yamlFile, final Class<T> classType) throws IOException { try ( FileInputStream fileInputStream = new FileInputStream(yamlFile); InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "UTF-8")...
java
public static <T extends YamlConfiguration> T unmarshal(final File yamlFile, final Class<T> classType) throws IOException { try ( FileInputStream fileInputStream = new FileInputStream(yamlFile); InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "UTF-8")...
[ "public", "static", "<", "T", "extends", "YamlConfiguration", ">", "T", "unmarshal", "(", "final", "File", "yamlFile", ",", "final", "Class", "<", "T", ">", "classType", ")", "throws", "IOException", "{", "try", "(", "FileInputStream", "fileInputStream", "=", ...
Unmarshal YAML. @param yamlFile YAML file @param classType class type @param <T> type of class @return object from YAML @throws IOException IO Exception
[ "Unmarshal", "YAML", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/yaml/engine/YamlEngine.java#L54-L61
train
Unmarshals a YAML file to an object of the specified class type.
[ 30522, 2270, 10763, 1026, 1056, 8908, 8038, 19968, 8663, 8873, 27390, 3370, 1028, 1056, 4895, 7849, 7377, 2140, 1006, 2345, 5371, 8038, 19968, 8873, 2571, 1010, 2345, 2465, 1026, 1056, 1028, 2465, 13874, 1007, 11618, 22834, 10288, 24422, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/metrics/MetricStore.java
MetricStore.getTaskMetricStore
public synchronized TaskMetricStore getTaskMetricStore(String jobID, String taskID) { JobMetricStore job = jobID == null ? null : jobs.get(jobID); if (job == null || taskID == null) { return null; } return TaskMetricStore.unmodifiable(job.getTaskMetricStore(taskID)); }
java
public synchronized TaskMetricStore getTaskMetricStore(String jobID, String taskID) { JobMetricStore job = jobID == null ? null : jobs.get(jobID); if (job == null || taskID == null) { return null; } return TaskMetricStore.unmodifiable(job.getTaskMetricStore(taskID)); }
[ "public", "synchronized", "TaskMetricStore", "getTaskMetricStore", "(", "String", "jobID", ",", "String", "taskID", ")", "{", "JobMetricStore", "job", "=", "jobID", "==", "null", "?", "null", ":", "jobs", ".", "get", "(", "jobID", ")", ";", "if", "(", "job...
Returns the {@link ComponentMetricStore} for the given job/task ID. @param jobID job ID @param taskID task ID @return ComponentMetricStore for given IDs, or null if no store for the given arguments exists
[ "Returns", "the", "{", "@link", "ComponentMetricStore", "}", "for", "the", "given", "job", "/", "task", "ID", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/metrics/MetricStore.java#L129-L135
train
Get the TaskMetricStore for the given job ID.
[ 30522, 2270, 25549, 4708, 12589, 23809, 2063, 2131, 10230, 22287, 3388, 7277, 23809, 2063, 1006, 5164, 3105, 3593, 1010, 5164, 4708, 3593, 1007, 1063, 3105, 12589, 23809, 2063, 3105, 1027, 3105, 3593, 1027, 1027, 19701, 1029, 19701, 1024, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/rest/CommonRest.java
CommonRest.destinations
@GetMapping("/destinations") public List<Map<String, String>> destinations() { List<Map<String, String>> result = new ArrayList<>(); Set<String> destinations = adapterCanalConfig.DESTINATIONS; for (String destination : destinations) { Map<String, String> resMap = new LinkedHashMa...
java
@GetMapping("/destinations") public List<Map<String, String>> destinations() { List<Map<String, String>> result = new ArrayList<>(); Set<String> destinations = adapterCanalConfig.DESTINATIONS; for (String destination : destinations) { Map<String, String> resMap = new LinkedHashMa...
[ "@", "GetMapping", "(", "\"/destinations\"", ")", "public", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "destinations", "(", ")", "{", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "result", "=", "new", "ArrayList", "<>", ...
返回所有实例 curl http://127.0.0.1:8081/destinations
[ "返回所有实例", "curl", "http", ":", "//", "127", ".", "0", ".", "0", ".", "1", ":", "8081", "/", "destinations" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/rest/CommonRest.java#L155-L173
train
Get a list of destination mappings.
[ 30522, 1030, 2131, 2863, 14853, 1006, 1000, 1013, 14345, 1000, 1007, 2270, 2862, 1026, 4949, 1026, 5164, 1010, 5164, 1028, 1028, 14345, 1006, 1007, 1063, 2862, 1026, 4949, 1026, 5164, 1010, 5164, 1028, 1028, 2765, 1027, 2047, 9140, 9863, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/bipartite/BipartiteGraph.java
BipartiteGraph.projectionBottomSimple
public Graph<KB, VVB, Tuple2<EV, EV>> projectionBottomSimple() { DataSet<Edge<KB, Tuple2<EV, EV>>> newEdges = edges.join(edges) .where(0) .equalTo(0) .with(new ProjectionBottomSimple<>()) .name("Simple bottom projection"); return Graph.fromDataSet(bottomVertices, newEdges, context); }
java
public Graph<KB, VVB, Tuple2<EV, EV>> projectionBottomSimple() { DataSet<Edge<KB, Tuple2<EV, EV>>> newEdges = edges.join(edges) .where(0) .equalTo(0) .with(new ProjectionBottomSimple<>()) .name("Simple bottom projection"); return Graph.fromDataSet(bottomVertices, newEdges, context); }
[ "public", "Graph", "<", "KB", ",", "VVB", ",", "Tuple2", "<", "EV", ",", "EV", ">", ">", "projectionBottomSimple", "(", ")", "{", "DataSet", "<", "Edge", "<", "KB", ",", "Tuple2", "<", "EV", ",", "EV", ">", ">", ">", "newEdges", "=", "edges", "."...
Convert a bipartite graph into an undirected graph that contains only bottom vertices. An edge between two vertices in the new graph will exist only if the original bipartite graph contains a top vertex they are both connected to. <p>The simple projection performs a single join and returns edges containing the biparti...
[ "Convert", "a", "bipartite", "graph", "into", "an", "undirected", "graph", "that", "contains", "only", "bottom", "vertices", ".", "An", "edge", "between", "two", "vertices", "in", "the", "new", "graph", "will", "exist", "only", "if", "the", "original", "bipa...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/bipartite/BipartiteGraph.java#L171-L179
train
Projections the bottom vertices of this graph into a graph that is a simple bottom projection.
[ 30522, 2270, 10629, 1026, 21677, 1010, 1058, 26493, 1010, 10722, 10814, 2475, 1026, 23408, 1010, 23408, 1028, 1028, 13996, 18384, 20389, 5332, 23344, 1006, 1007, 1063, 2951, 13462, 1026, 3341, 1026, 21677, 1010, 10722, 10814, 2475, 1026, 2340...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/FileReader.java
FileReader.getInputStream
public BufferedInputStream getInputStream() throws IORuntimeException { try { return new BufferedInputStream(new FileInputStream(this.file)); } catch (IOException e) { throw new IORuntimeException(e); } }
java
public BufferedInputStream getInputStream() throws IORuntimeException { try { return new BufferedInputStream(new FileInputStream(this.file)); } catch (IOException e) { throw new IORuntimeException(e); } }
[ "public", "BufferedInputStream", "getInputStream", "(", ")", "throws", "IORuntimeException", "{", "try", "{", "return", "new", "BufferedInputStream", "(", "new", "FileInputStream", "(", "this", ".", "file", ")", ")", ";", "}", "catch", "(", "IOException", "e", ...
获得输入流 @return 输入流 @throws IORuntimeException IO异常
[ "获得输入流" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/file/FileReader.java#L239-L245
train
Returns an input stream for the file.
[ 30522, 2270, 17698, 2098, 2378, 18780, 21422, 2131, 2378, 18780, 21422, 1006, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 3046, 1063, 2709, 2047, 17698, 2098, 2378, 18780, 21422, 1006, 2047, 5371, 2378, 18780, 21422, 1006, 2023, 1012...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java
DataStream.writeAsText
@PublicEvolving public DataStreamSink<T> writeAsText(String path, WriteMode writeMode) { TextOutputFormat<T> tof = new TextOutputFormat<>(new Path(path)); tof.setWriteMode(writeMode); return writeUsingOutputFormat(tof); }
java
@PublicEvolving public DataStreamSink<T> writeAsText(String path, WriteMode writeMode) { TextOutputFormat<T> tof = new TextOutputFormat<>(new Path(path)); tof.setWriteMode(writeMode); return writeUsingOutputFormat(tof); }
[ "@", "PublicEvolving", "public", "DataStreamSink", "<", "T", ">", "writeAsText", "(", "String", "path", ",", "WriteMode", "writeMode", ")", "{", "TextOutputFormat", "<", "T", ">", "tof", "=", "new", "TextOutputFormat", "<>", "(", "new", "Path", "(", "path", ...
Writes a DataStream to the file specified by path in text format. <p>For every element of the DataStream the result of {@link Object#toString()} is written. @param path The path pointing to the location the text file is written to @param writeMode Controls the behavior for existing files. Options are NO_OVERWRITE and...
[ "Writes", "a", "DataStream", "to", "the", "file", "specified", "by", "path", "in", "text", "format", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L1041-L1046
train
Write the data stream to a text file.
[ 30522, 1030, 2270, 6777, 4747, 6455, 2270, 2951, 21422, 11493, 2243, 1026, 1056, 1028, 4339, 14083, 10288, 2102, 1006, 5164, 4130, 1010, 4339, 5302, 3207, 4339, 5302, 3207, 1007, 1063, 3793, 5833, 18780, 14192, 4017, 1026, 1056, 1028, 2000,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/digest/Digester.java
Digester.digestWithSalt
private byte[] digestWithSalt(InputStream data, int bufferLength) throws IOException { if (this.saltPosition <= 0) { // 加盐在开头 this.digest.update(this.salt); } final byte[] buffer = new byte[bufferLength]; int total = 0; int read; while ((read = data.read(buffer, 0, bufferLength)) > -1) { ...
java
private byte[] digestWithSalt(InputStream data, int bufferLength) throws IOException { if (this.saltPosition <= 0) { // 加盐在开头 this.digest.update(this.salt); } final byte[] buffer = new byte[bufferLength]; int total = 0; int read; while ((read = data.read(buffer, 0, bufferLength)) > -1) { ...
[ "private", "byte", "[", "]", "digestWithSalt", "(", "InputStream", "data", ",", "int", "bufferLength", ")", "throws", "IOException", "{", "if", "(", "this", ".", "saltPosition", "<=", "0", ")", "{", "// 加盐在开头\r", "this", ".", "digest", ".", "update", "(", ...
生成摘要 @param data {@link InputStream} 数据流 @param bufferLength 缓存长度,不足1使用 {@link IoUtil#DEFAULT_BUFFER_SIZE} 做为默认值 @return 摘要bytes @throws IOException 从流中读取数据引发的IO异常
[ "生成摘要" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/digest/Digester.java#L373-L402
train
Creates a byte array containing the digest of the data.
[ 30522, 2797, 24880, 1031, 1033, 17886, 24415, 12002, 2102, 1006, 20407, 25379, 2951, 1010, 20014, 17698, 7770, 13512, 2232, 1007, 11618, 22834, 10288, 24422, 1063, 2065, 1006, 2023, 1012, 5474, 26994, 1026, 1027, 1014, 1007, 1063, 1013, 1013,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/CheckpointProperties.java
CheckpointProperties.forCheckpoint
public static CheckpointProperties forCheckpoint(CheckpointRetentionPolicy policy) { switch (policy) { case NEVER_RETAIN_AFTER_TERMINATION: return CHECKPOINT_NEVER_RETAINED; case RETAIN_ON_FAILURE: return CHECKPOINT_RETAINED_ON_FAILURE; case RETAIN_ON_CANCELLATION: return CHECKPOINT_RETAINED_ON_C...
java
public static CheckpointProperties forCheckpoint(CheckpointRetentionPolicy policy) { switch (policy) { case NEVER_RETAIN_AFTER_TERMINATION: return CHECKPOINT_NEVER_RETAINED; case RETAIN_ON_FAILURE: return CHECKPOINT_RETAINED_ON_FAILURE; case RETAIN_ON_CANCELLATION: return CHECKPOINT_RETAINED_ON_C...
[ "public", "static", "CheckpointProperties", "forCheckpoint", "(", "CheckpointRetentionPolicy", "policy", ")", "{", "switch", "(", "policy", ")", "{", "case", "NEVER_RETAIN_AFTER_TERMINATION", ":", "return", "CHECKPOINT_NEVER_RETAINED", ";", "case", "RETAIN_ON_FAILURE", ":...
Creates the checkpoint properties for a checkpoint. <p>Checkpoints may be queued in case too many other checkpoints are currently happening. They are garbage collected automatically, except when the owning job terminates in state {@link JobStatus#FAILED}. The user is required to configure the clean up behaviour on job...
[ "Creates", "the", "checkpoint", "properties", "for", "a", "checkpoint", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointProperties.java#L314-L325
train
Returns a checkpoint properties object for the given checkpoint retention policy.
[ 30522, 2270, 10763, 26520, 21572, 4842, 7368, 2005, 5403, 3600, 8400, 1006, 26520, 13465, 4765, 3258, 18155, 2594, 2100, 3343, 1007, 1063, 6942, 1006, 3343, 1007, 1063, 2553, 2196, 1035, 9279, 1035, 2044, 1035, 18287, 1024, 2709, 26520, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java
ReflectUtil.getPublicMethod
public static Method getPublicMethod(Class<?> clazz, String methodName, Class<?>... paramTypes) throws SecurityException { try { return clazz.getMethod(methodName, paramTypes); } catch (NoSuchMethodException ex) { return null; } }
java
public static Method getPublicMethod(Class<?> clazz, String methodName, Class<?>... paramTypes) throws SecurityException { try { return clazz.getMethod(methodName, paramTypes); } catch (NoSuchMethodException ex) { return null; } }
[ "public", "static", "Method", "getPublicMethod", "(", "Class", "<", "?", ">", "clazz", ",", "String", "methodName", ",", "Class", "<", "?", ">", "...", "paramTypes", ")", "throws", "SecurityException", "{", "try", "{", "return", "clazz", ".", "getMethod", ...
查找指定Public方法 如果找不到对应的方法或方法不为public的则返回<code>null</code> @param clazz 类 @param methodName 方法名 @param paramTypes 参数类型 @return 方法 @throws SecurityException 无权访问抛出异常
[ "查找指定Public方法", "如果找不到对应的方法或方法不为public的则返回<code", ">", "null<", "/", "code", ">" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L372-L378
train
Gets the public method of the given class.
[ 30522, 2270, 10763, 4118, 2131, 14289, 16558, 2594, 11368, 6806, 2094, 1006, 2465, 1026, 1029, 1028, 18856, 10936, 2480, 1010, 5164, 4118, 18442, 1010, 2465, 1026, 1029, 1028, 1012, 1012, 1012, 11498, 20492, 18863, 2015, 1007, 11618, 3036, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/utility/LexiconUtility.java
LexiconUtility.getAttribute
public static CoreDictionary.Attribute getAttribute(String word) { CoreDictionary.Attribute attribute = CoreDictionary.get(word); if (attribute != null) return attribute; return CustomDictionary.get(word); }
java
public static CoreDictionary.Attribute getAttribute(String word) { CoreDictionary.Attribute attribute = CoreDictionary.get(word); if (attribute != null) return attribute; return CustomDictionary.get(word); }
[ "public", "static", "CoreDictionary", ".", "Attribute", "getAttribute", "(", "String", "word", ")", "{", "CoreDictionary", ".", "Attribute", "attribute", "=", "CoreDictionary", ".", "get", "(", "word", ")", ";", "if", "(", "attribute", "!=", "null", ")", "re...
从HanLP的词库中提取某个单词的属性(包括核心词典和用户词典) @param word 单词 @return 包含词性与频次的信息
[ "从HanLP的词库中提取某个单词的属性(包括核心词典和用户词典)" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/utility/LexiconUtility.java#L35-L40
train
Get the attribute for a word.
[ 30522, 2270, 10763, 4563, 29201, 3258, 5649, 1012, 17961, 2131, 19321, 3089, 8569, 2618, 1006, 5164, 2773, 1007, 1063, 4563, 29201, 3258, 5649, 1012, 17961, 17961, 1027, 4563, 29201, 3258, 5649, 1012, 2131, 1006, 2773, 1007, 1025, 2065, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/SortOperationFactory.java
SortOperationFactory.createLimitWithFetch
public TableOperation createLimitWithFetch(int fetch, TableOperation child) { SortTableOperation previousSort = validateAndGetChildSort(child); if (fetch < 0) { throw new ValidationException("Fetch should be greater or equal 0"); } int offset = Math.max(previousSort.getOffset(), 0); return new SortTable...
java
public TableOperation createLimitWithFetch(int fetch, TableOperation child) { SortTableOperation previousSort = validateAndGetChildSort(child); if (fetch < 0) { throw new ValidationException("Fetch should be greater or equal 0"); } int offset = Math.max(previousSort.getOffset(), 0); return new SortTable...
[ "public", "TableOperation", "createLimitWithFetch", "(", "int", "fetch", ",", "TableOperation", "child", ")", "{", "SortTableOperation", "previousSort", "=", "validateAndGetChildSort", "(", "child", ")", ";", "if", "(", "fetch", "<", "0", ")", "{", "throw", "new...
Adds fetch to the underlying {@link SortTableOperation} if it is a valid one. @param fetch fetch number to add @param child should be {@link SortTableOperation} @return valid sort operation with applied fetch
[ "Adds", "fetch", "to", "the", "underlying", "{", "@link", "SortTableOperation", "}", "if", "it", "is", "a", "valid", "one", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/SortOperationFactory.java#L94-L104
train
Create a limit operation with a fetch number.
[ 30522, 2270, 2795, 25918, 3370, 3443, 17960, 4183, 24415, 7959, 10649, 1006, 20014, 18584, 1010, 2795, 25918, 3370, 2775, 1007, 1063, 4066, 10880, 25918, 3370, 3025, 21748, 2102, 1027, 9398, 3686, 5685, 18150, 19339, 21748, 2102, 1006, 2775, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java
SpringBootCondition.anyMatches
protected final boolean anyMatches(ConditionContext context, AnnotatedTypeMetadata metadata, Condition... conditions) { for (Condition condition : conditions) { if (matches(context, metadata, condition)) { return true; } } return false; }
java
protected final boolean anyMatches(ConditionContext context, AnnotatedTypeMetadata metadata, Condition... conditions) { for (Condition condition : conditions) { if (matches(context, metadata, condition)) { return true; } } return false; }
[ "protected", "final", "boolean", "anyMatches", "(", "ConditionContext", "context", ",", "AnnotatedTypeMetadata", "metadata", ",", "Condition", "...", "conditions", ")", "{", "for", "(", "Condition", "condition", ":", "conditions", ")", "{", "if", "(", "matches", ...
Return true if any of the specified conditions match. @param context the context @param metadata the annotation meta-data @param conditions conditions to test @return {@code true} if any condition matches.
[ "Return", "true", "if", "any", "of", "the", "specified", "conditions", "match", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java#L135-L143
train
Checks if any of the given conditions match the given context.
[ 30522, 5123, 2345, 22017, 20898, 2151, 18900, 8376, 1006, 4650, 8663, 18209, 6123, 1010, 5754, 17287, 3064, 13874, 11368, 8447, 2696, 27425, 1010, 4650, 1012, 1012, 1012, 3785, 1007, 1063, 2005, 1006, 4650, 4650, 1024, 3785, 1007, 1063, 206...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
common/src/main/java/io/netty/util/AsciiString.java
AsciiString.regionMatches
public static boolean regionMatches(final CharSequence cs, final boolean ignoreCase, final int csStart, final CharSequence string, final int start, final int length) { if (cs == null || string == null) { return false; } if (cs instanceof Strin...
java
public static boolean regionMatches(final CharSequence cs, final boolean ignoreCase, final int csStart, final CharSequence string, final int start, final int length) { if (cs == null || string == null) { return false; } if (cs instanceof Strin...
[ "public", "static", "boolean", "regionMatches", "(", "final", "CharSequence", "cs", ",", "final", "boolean", "ignoreCase", ",", "final", "int", "csStart", ",", "final", "CharSequence", "string", ",", "final", "int", "start", ",", "final", "int", "length", ")",...
This methods make regionMatches operation correctly for any chars in strings @param cs the {@code CharSequence} to be processed @param ignoreCase specifies if case should be ignored. @param csStart the starting offset in the {@code cs} CharSequence @param string the {@code CharSequence} to compare. @param start the sta...
[ "This", "methods", "make", "regionMatches", "operation", "correctly", "for", "any", "chars", "in", "strings" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/AsciiString.java#L1632-L1649
train
regionMatches Method.
[ 30522, 2270, 10763, 22017, 20898, 2555, 18900, 8376, 1006, 2345, 25869, 3366, 4226, 5897, 20116, 1010, 2345, 22017, 20898, 8568, 18382, 1010, 2345, 20014, 20116, 14117, 2102, 1010, 2345, 25869, 3366, 4226, 5897, 5164, 1010, 2345, 20014, 2707,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/convert/impl/NumberConverter.java
NumberConverter.toBigInteger
private BigInteger toBigInteger(Object value) { if (value instanceof Long) { return BigInteger.valueOf((Long) value); } else if(value instanceof Boolean) { return BigInteger.valueOf((boolean)value ? 1 : 0); } final String valueStr = convertToStr(value); if (StrUtil.isBlank(valueStr)) { return...
java
private BigInteger toBigInteger(Object value) { if (value instanceof Long) { return BigInteger.valueOf((Long) value); } else if(value instanceof Boolean) { return BigInteger.valueOf((boolean)value ? 1 : 0); } final String valueStr = convertToStr(value); if (StrUtil.isBlank(valueStr)) { return...
[ "private", "BigInteger", "toBigInteger", "(", "Object", "value", ")", "{", "if", "(", "value", "instanceof", "Long", ")", "{", "return", "BigInteger", ".", "valueOf", "(", "(", "Long", ")", "value", ")", ";", "}", "else", "if", "(", "value", "instanceof"...
转换为BigInteger<br> 如果给定的值为空,或者转换失败,返回默认值<br> 转换失败不会报错 @param value 被转换的值 @return 结果
[ "转换为BigInteger<br", ">", "如果给定的值为空,或者转换失败,返回默认值<br", ">", "转换失败不会报错" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/convert/impl/NumberConverter.java#L185-L196
train
Converts the value to a BigInteger.
[ 30522, 2797, 2502, 18447, 26320, 2000, 5638, 11528, 2618, 4590, 1006, 4874, 3643, 1007, 1063, 2065, 1006, 3643, 6013, 11253, 2146, 1007, 1063, 2709, 2502, 18447, 26320, 1012, 3643, 11253, 1006, 1006, 2146, 1007, 3643, 1007, 1025, 1065, 2842...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONObject.java
JSONObject.optString
public String optString(String name, String fallback) { Object object = opt(name); String result = JSON.toString(object); return result != null ? result : fallback; }
java
public String optString(String name, String fallback) { Object object = opt(name); String result = JSON.toString(object); return result != null ? result : fallback; }
[ "public", "String", "optString", "(", "String", "name", ",", "String", "fallback", ")", "{", "Object", "object", "=", "opt", "(", "name", ")", ";", "String", "result", "=", "JSON", ".", "toString", "(", "object", ")", ";", "return", "result", "!=", "nu...
Returns the value mapped by {@code name} if it exists, coercing it if necessary. Returns {@code fallback} if no such mapping exists. @param name the name of the property @param fallback a fallback value @return the value or {@code fallback}
[ "Returns", "the", "value", "mapped", "by", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONObject.java#L586-L590
train
Get the property as a string or fallback if the property is not present or not a String.
[ 30522, 2270, 5164, 23569, 3367, 4892, 1006, 5164, 2171, 1010, 5164, 2991, 5963, 1007, 1063, 4874, 4874, 1027, 23569, 1006, 2171, 1007, 1025, 5164, 2765, 1027, 1046, 3385, 1012, 2000, 3367, 4892, 1006, 4874, 1007, 1025, 2709, 2765, 999, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/operators/Operator.java
Operator.setResources
@PublicEvolving public void setResources(ResourceSpec minResources, ResourceSpec preferredResources) { this.minResources = minResources; this.preferredResources = preferredResources; }
java
@PublicEvolving public void setResources(ResourceSpec minResources, ResourceSpec preferredResources) { this.minResources = minResources; this.preferredResources = preferredResources; }
[ "@", "PublicEvolving", "public", "void", "setResources", "(", "ResourceSpec", "minResources", ",", "ResourceSpec", "preferredResources", ")", "{", "this", ".", "minResources", "=", "minResources", ";", "this", ".", "preferredResources", "=", "preferredResources", ";",...
Sets the minimum and preferred resources for this contract instance. The resource denotes how many memories and cpu cores of the user function will be consumed during the execution. @param minResources The minimum resource of this operator. @param preferredResources The preferred resource of this operator.
[ "Sets", "the", "minimum", "and", "preferred", "resources", "for", "this", "contract", "instance", ".", "The", "resource", "denotes", "how", "many", "memories", "and", "cpu", "cores", "of", "the", "user", "function", "will", "be", "consumed", "during", "the", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/Operator.java#L221-L225
train
Sets the minimum and preferred resources for the resource provider.
[ 30522, 1030, 2270, 6777, 4747, 6455, 2270, 11675, 2275, 6072, 8162, 9623, 1006, 4219, 5051, 2278, 8117, 6072, 8162, 9623, 1010, 4219, 5051, 2278, 6871, 6072, 8162, 9623, 1007, 1063, 2023, 1012, 8117, 6072, 8162, 9623, 1027, 8117, 6072, 81...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/algorithm/ahocorasick/trie/Trie.java
Trie.parseText
@SuppressWarnings("unchecked") public Collection<Emit> parseText(String text) { checkForConstructedFailureStates(); int position = 0; State currentState = this.rootState; List<Emit> collectedEmits = new ArrayList<Emit>(); for (int i = 0; i < text.length(); ++i) {...
java
@SuppressWarnings("unchecked") public Collection<Emit> parseText(String text) { checkForConstructedFailureStates(); int position = 0; State currentState = this.rootState; List<Emit> collectedEmits = new ArrayList<Emit>(); for (int i = 0; i < text.length(); ++i) {...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Collection", "<", "Emit", ">", "parseText", "(", "String", "text", ")", "{", "checkForConstructedFailureStates", "(", ")", ";", "int", "position", "=", "0", ";", "State", "currentState", "=", "this...
模式匹配 @param text 待匹配的文本 @return 匹配到的模式串
[ "模式匹配" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/algorithm/ahocorasick/trie/Trie.java#L135-L162
train
Parses the text into a Collection of Emit objects.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 3074, 1026, 12495, 2102, 1028, 11968, 13462, 10288, 2102, 1006, 5164, 3793, 1007, 1063, 4638, 29278, 8663, 3367, 6820, 10985, 7011, 4014, 14900, 12259, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Exception.java
Http2Exception.streamError
public static Http2Exception streamError(int id, Http2Error error, Throwable cause, String fmt, Object... args) { return CONNECTION_STREAM_ID == id ? Http2Exception.connectionError(error, cause, fmt, args) : new StreamException(id, error, String.format(fmt, args),...
java
public static Http2Exception streamError(int id, Http2Error error, Throwable cause, String fmt, Object... args) { return CONNECTION_STREAM_ID == id ? Http2Exception.connectionError(error, cause, fmt, args) : new StreamException(id, error, String.format(fmt, args),...
[ "public", "static", "Http2Exception", "streamError", "(", "int", "id", ",", "Http2Error", "error", ",", "Throwable", "cause", ",", "String", "fmt", ",", "Object", "...", "args", ")", "{", "return", "CONNECTION_STREAM_ID", "==", "id", "?", "Http2Exception", "."...
Use if an error which can be isolated to a single stream has occurred. If the {@code id} is not {@link Http2CodecUtil#CONNECTION_STREAM_ID} then a {@link Http2Exception.StreamException} will be returned. Otherwise the error is considered a connection error and a {@link Http2Exception} is returned. @param id The stream...
[ "Use", "if", "an", "error", "which", "can", "be", "isolated", "to", "a", "single", "stream", "has", "occurred", ".", "If", "the", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Exception.java#L145-L150
train
Stream error.
[ 30522, 2270, 10763, 8299, 2475, 10288, 24422, 5460, 2121, 29165, 1006, 20014, 8909, 1010, 8299, 2475, 2121, 29165, 7561, 1010, 5466, 3085, 3426, 1010, 5164, 4718, 2102, 1010, 4874, 1012, 1012, 1012, 12098, 5620, 1007, 1063, 2709, 4434, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopRecoverableFsDataOutputStream.java
HadoopRecoverableFsDataOutputStream.waitUntilLeaseIsRevoked
private static boolean waitUntilLeaseIsRevoked(final FileSystem fs, final Path path) throws IOException { Preconditions.checkState(fs instanceof DistributedFileSystem); final DistributedFileSystem dfs = (DistributedFileSystem) fs; dfs.recoverLease(path); final Deadline deadline = Deadline.now().plus(Duration....
java
private static boolean waitUntilLeaseIsRevoked(final FileSystem fs, final Path path) throws IOException { Preconditions.checkState(fs instanceof DistributedFileSystem); final DistributedFileSystem dfs = (DistributedFileSystem) fs; dfs.recoverLease(path); final Deadline deadline = Deadline.now().plus(Duration....
[ "private", "static", "boolean", "waitUntilLeaseIsRevoked", "(", "final", "FileSystem", "fs", ",", "final", "Path", "path", ")", "throws", "IOException", "{", "Preconditions", ".", "checkState", "(", "fs", "instanceof", "DistributedFileSystem", ")", ";", "final", "...
Called when resuming execution after a failure and waits until the lease of the file we are resuming is free. <p>The lease of the file we are resuming writing/committing to may still belong to the process that failed previously and whose state we are recovering. @param path The path to the file we want to resume writ...
[ "Called", "when", "resuming", "execution", "after", "a", "failure", "and", "waits", "until", "the", "lease", "of", "the", "file", "we", "are", "resuming", "is", "free", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopRecoverableFsDataOutputStream.java#L321-L342
train
Wait until the lease is revoked.
[ 30522, 2797, 10763, 22017, 20898, 3524, 16671, 10484, 11022, 2483, 2890, 6767, 8126, 1006, 2345, 6764, 27268, 6633, 1042, 2015, 1010, 2345, 4130, 4130, 1007, 11618, 22834, 10288, 24422, 1063, 3653, 8663, 20562, 2015, 1012, 14148, 12259, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java
HiveCommandOperation.readResults
private List<String> readResults(int nLines) throws HiveSQLException { if (resultReader == null) { SessionState sessionState = getParentSession().getSessionState(); File tmp = sessionState.getTmpOutputFile(); try { resultReader = new BufferedReader(new FileReader(tmp)); } catch (File...
java
private List<String> readResults(int nLines) throws HiveSQLException { if (resultReader == null) { SessionState sessionState = getParentSession().getSessionState(); File tmp = sessionState.getTmpOutputFile(); try { resultReader = new BufferedReader(new FileReader(tmp)); } catch (File...
[ "private", "List", "<", "String", ">", "readResults", "(", "int", "nLines", ")", "throws", "HiveSQLException", "{", "if", "(", "resultReader", "==", "null", ")", "{", "SessionState", "sessionState", "=", "getParentSession", "(", ")", ".", "getSessionState", "(...
Reads the temporary results for non-Hive (non-Driver) commands to the resulting List of strings. @param nLines number of lines read at once. If it is <= 0, then read all lines.
[ "Reads", "the", "temporary", "results", "for", "non", "-", "Hive", "(", "non", "-", "Driver", ")", "commands", "to", "the", "resulting", "List", "of", "strings", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java#L170-L198
train
Read the results from the temp output file.
[ 30522, 2797, 2862, 1026, 5164, 1028, 3191, 6072, 11314, 2015, 1006, 20014, 17953, 10586, 1007, 11618, 26736, 2015, 4160, 2571, 2595, 24422, 1063, 2065, 1006, 2765, 16416, 4063, 1027, 1027, 19701, 1007, 1063, 6521, 12259, 6521, 12259, 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...
networknt/light-4j
body/src/main/java/com/networknt/body/BodyHandler.java
BodyHandler.handleRequest
@Override public void handleRequest(final HttpServerExchange exchange) throws Exception { // parse the body to map or list if content type is application/json String contentType = exchange.getRequestHeaders().getFirst(Headers.CONTENT_TYPE); if (contentType != null) { if (exchange...
java
@Override public void handleRequest(final HttpServerExchange exchange) throws Exception { // parse the body to map or list if content type is application/json String contentType = exchange.getRequestHeaders().getFirst(Headers.CONTENT_TYPE); if (contentType != null) { if (exchange...
[ "@", "Override", "public", "void", "handleRequest", "(", "final", "HttpServerExchange", "exchange", ")", "throws", "Exception", "{", "// parse the body to map or list if content type is application/json", "String", "contentType", "=", "exchange", ".", "getRequestHeaders", "("...
Check the header starts with application/json and parse it into map or list based on the first character "{" or "[". Otherwise, check the header starts with application/x-www-form-urlencoded or multipart/form-data and parse it into formdata @param exchange HttpServerExchange @throws Exception Exception
[ "Check", "the", "header", "starts", "with", "application", "/", "json", "and", "parse", "it", "into", "map", "or", "list", "based", "on", "the", "first", "character", "{", "or", "[", ".", "Otherwise", "check", "the", "header", "starts", "with", "applicatio...
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/body/src/main/java/com/networknt/body/BodyHandler.java#L86-L117
train
Handle the request.
[ 30522, 1030, 2058, 15637, 2270, 11675, 28213, 2063, 15500, 1006, 2345, 16770, 2121, 28943, 2595, 22305, 2063, 3863, 1007, 11618, 6453, 1063, 1013, 1013, 11968, 3366, 1996, 2303, 2000, 4949, 2030, 2862, 2065, 4180, 2828, 2003, 4646, 1013, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/util/IOUtils.java
IOUtils.copyBytes
public static void copyBytes(final InputStream in, final OutputStream out, final boolean close) throws IOException { copyBytes(in, out, BLOCKSIZE, close); }
java
public static void copyBytes(final InputStream in, final OutputStream out, final boolean close) throws IOException { copyBytes(in, out, BLOCKSIZE, close); }
[ "public", "static", "void", "copyBytes", "(", "final", "InputStream", "in", ",", "final", "OutputStream", "out", ",", "final", "boolean", "close", ")", "throws", "IOException", "{", "copyBytes", "(", "in", ",", "out", ",", "BLOCKSIZE", ",", "close", ")", "...
Copies from one stream to another. @param in InputStream to read from @param out OutputStream to write to @param close whether or not close the InputStream and OutputStream at the end. The streams are closed in the finally clause. @throws IOException thrown if an I/O error occurs while copying
[ "Copies", "from", "one", "stream", "to", "another", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/IOUtils.java#L107-L109
train
Copy bytes from the input stream to the output stream.
[ 30522, 2270, 10763, 11675, 6100, 3762, 4570, 1006, 2345, 20407, 25379, 1999, 1010, 2345, 27852, 25379, 2041, 1010, 2345, 22017, 20898, 2485, 1007, 11618, 22834, 10288, 24422, 1063, 6100, 3762, 4570, 1006, 1999, 1010, 2041, 1010, 5991, 4697, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.defaultMessageConverters
public RestTemplateBuilder defaultMessageConverters() { return new RestTemplateBuilder(this.detectRequestFactory, this.rootUri, Collections.unmodifiableSet( new LinkedHashSet<>(new RestTemplate().getMessageConverters())), this.requestFactorySupplier, this.uriTemplateHandler, this.errorHandler, this....
java
public RestTemplateBuilder defaultMessageConverters() { return new RestTemplateBuilder(this.detectRequestFactory, this.rootUri, Collections.unmodifiableSet( new LinkedHashSet<>(new RestTemplate().getMessageConverters())), this.requestFactorySupplier, this.uriTemplateHandler, this.errorHandler, this....
[ "public", "RestTemplateBuilder", "defaultMessageConverters", "(", ")", "{", "return", "new", "RestTemplateBuilder", "(", "this", ".", "detectRequestFactory", ",", "this", ".", "rootUri", ",", "Collections", ".", "unmodifiableSet", "(", "new", "LinkedHashSet", "<>", ...
Set the {@link HttpMessageConverter HttpMessageConverters} that should be used with the {@link RestTemplate} to the default set. Calling this method will replace any previously defined converters. @return a new builder instance @see #messageConverters(HttpMessageConverter...)
[ "Set", "the", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/RestTemplateBuilder.java#L228-L235
train
Default message converters.
[ 30522, 2270, 2717, 18532, 15725, 8569, 23891, 2099, 12398, 7834, 3736, 3351, 8663, 16874, 2545, 1006, 1007, 1063, 2709, 2047, 2717, 18532, 15725, 8569, 23891, 2099, 1006, 2023, 1012, 11487, 2890, 15500, 21450, 1010, 2023, 1012, 7117, 9496, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ResourceGuard.java
ResourceGuard.close
@Override public void close() { synchronized (lock) { closed = true; while (leaseCount > 0) { try { lock.wait(); } catch (InterruptedException ignore) { // Even on interruption, we cannot terminate the loop until all open leases are closed. } } } }
java
@Override public void close() { synchronized (lock) { closed = true; while (leaseCount > 0) { try { lock.wait(); } catch (InterruptedException ignore) { // Even on interruption, we cannot terminate the loop until all open leases are closed. } } } }
[ "@", "Override", "public", "void", "close", "(", ")", "{", "synchronized", "(", "lock", ")", "{", "closed", "=", "true", ";", "while", "(", "leaseCount", ">", "0", ")", "{", "try", "{", "lock", ".", "wait", "(", ")", ";", "}", "catch", "(", "Inte...
Closed the resource guard. This method will block until all calls to {@link #acquireResource()} have seen their matching call to {@link #releaseResource()}.
[ "Closed", "the", "resource", "guard", ".", "This", "method", "will", "block", "until", "all", "calls", "to", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/ResourceGuard.java#L101-L117
train
Close the connection.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2485, 1006, 1007, 1063, 25549, 1006, 5843, 1007, 1063, 2701, 1027, 2995, 1025, 2096, 1006, 10084, 3597, 16671, 1028, 1014, 1007, 1063, 3046, 1063, 5843, 1012, 3524, 1006, 1007, 1025, 1065, 4608, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java
IoUtil.getPushBackReader
public static PushbackReader getPushBackReader(Reader reader, int pushBackSize) { return (reader instanceof PushbackReader) ? (PushbackReader) reader : new PushbackReader(reader, pushBackSize); }
java
public static PushbackReader getPushBackReader(Reader reader, int pushBackSize) { return (reader instanceof PushbackReader) ? (PushbackReader) reader : new PushbackReader(reader, pushBackSize); }
[ "public", "static", "PushbackReader", "getPushBackReader", "(", "Reader", "reader", ",", "int", "pushBackSize", ")", "{", "return", "(", "reader", "instanceof", "PushbackReader", ")", "?", "(", "PushbackReader", ")", "reader", ":", "new", "PushbackReader", "(", ...
获得{@link PushbackReader}<br> 如果是{@link PushbackReader}强转返回,否则新建 @param reader 普通Reader @param pushBackSize 推后的byte数 @return {@link PushbackReader} @since 3.1.0
[ "获得", "{", "@link", "PushbackReader", "}", "<br", ">", "如果是", "{", "@link", "PushbackReader", "}", "强转返回,否则新建" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java#L352-L354
train
Get a PushbackReader instance.
[ 30522, 2270, 10763, 5245, 5963, 16416, 4063, 2131, 12207, 2232, 5963, 16416, 4063, 1006, 8068, 8068, 1010, 20014, 5245, 12221, 4697, 1007, 1063, 2709, 1006, 8068, 6013, 11253, 5245, 5963, 16416, 4063, 1007, 1029, 1006, 5245, 5963, 16416, 40...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/UnsafeInMemorySorter.java
UnsafeInMemorySorter.getSortedIterator
public UnsafeSorterIterator getSortedIterator() { int offset = 0; long start = System.nanoTime(); if (sortComparator != null) { if (this.radixSortSupport != null) { offset = RadixSort.sortKeyPrefixArray( array, nullBoundaryPos, (pos - nullBoundaryPos) / 2L, 0, 7, radixSortS...
java
public UnsafeSorterIterator getSortedIterator() { int offset = 0; long start = System.nanoTime(); if (sortComparator != null) { if (this.radixSortSupport != null) { offset = RadixSort.sortKeyPrefixArray( array, nullBoundaryPos, (pos - nullBoundaryPos) / 2L, 0, 7, radixSortS...
[ "public", "UnsafeSorterIterator", "getSortedIterator", "(", ")", "{", "int", "offset", "=", "0", ";", "long", "start", "=", "System", ".", "nanoTime", "(", ")", ";", "if", "(", "sortComparator", "!=", "null", ")", "{", "if", "(", "this", ".", "radixSortS...
Return an iterator over record pointers in sorted order. For efficiency, all calls to {@code next()} will return the same mutable object.
[ "Return", "an", "iterator", "over", "record", "pointers", "in", "sorted", "order", ".", "For", "efficiency", "all", "calls", "to", "{" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java#L344-L380
train
Get the sorted iterator.
[ 30522, 2270, 25135, 21748, 3334, 21646, 8844, 4152, 15613, 21646, 8844, 1006, 1007, 1063, 20014, 16396, 1027, 1014, 1025, 2146, 2707, 1027, 2291, 1012, 28991, 7292, 1006, 1007, 1025, 30524, 19701, 15494, 5649, 6873, 2015, 1010, 1006, 13433, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/pregel/VertexCentricIteration.java
VertexCentricIteration.setUpIteration
private void setUpIteration(DeltaIteration<?, ?> iteration) { // set up the iteration operator if (this.configuration != null) { iteration.name(this.configuration.getName("Vertex-centric iteration (" + computeFunction + ")")); iteration.parallelism(this.configuration.getParallelism()); iteration.setSolut...
java
private void setUpIteration(DeltaIteration<?, ?> iteration) { // set up the iteration operator if (this.configuration != null) { iteration.name(this.configuration.getName("Vertex-centric iteration (" + computeFunction + ")")); iteration.parallelism(this.configuration.getParallelism()); iteration.setSolut...
[ "private", "void", "setUpIteration", "(", "DeltaIteration", "<", "?", ",", "?", ">", "iteration", ")", "{", "// set up the iteration operator", "if", "(", "this", ".", "configuration", "!=", "null", ")", "{", "iteration", ".", "name", "(", "this", ".", "conf...
Helper method which sets up an iteration with the given vertex value. @param iteration
[ "Helper", "method", "which", "sets", "up", "an", "iteration", "with", "the", "given", "vertex", "value", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/pregel/VertexCentricIteration.java#L443-L461
train
Sets up the iteration operator.
[ 30522, 2797, 11675, 16437, 21646, 3370, 1006, 7160, 21646, 3370, 1026, 1029, 1010, 1029, 1028, 27758, 1007, 1063, 1013, 1013, 2275, 2039, 1996, 27758, 6872, 2065, 1006, 2023, 1012, 9563, 999, 1027, 19701, 1007, 1063, 27758, 1012, 2171, 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-extra/src/main/java/cn/hutool/extra/template/engine/TemplateFactory.java
TemplateFactory.doCreate
private static TemplateEngine doCreate(TemplateConfig config) { try { return new BeetlEngine(config); } catch (NoClassDefFoundError e) { // ignore } try { return new FreemarkerEngine(config); } catch (NoClassDefFoundError e) { // ignore } try { return new VelocityEngine(config);...
java
private static TemplateEngine doCreate(TemplateConfig config) { try { return new BeetlEngine(config); } catch (NoClassDefFoundError e) { // ignore } try { return new FreemarkerEngine(config); } catch (NoClassDefFoundError e) { // ignore } try { return new VelocityEngine(config);...
[ "private", "static", "TemplateEngine", "doCreate", "(", "TemplateConfig", "config", ")", "{", "try", "{", "return", "new", "BeetlEngine", "(", "config", ")", ";", "}", "catch", "(", "NoClassDefFoundError", "e", ")", "{", "// ignore\r", "}", "try", "{", "retu...
根据用户引入的模板引擎jar,自动创建对应的模板引擎对象 @param config 模板配置,包括编码、模板文件path等信息 @return {@link Engine}
[ "根据用户引入的模板引擎jar,自动创建对应的模板引擎对象" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/template/engine/TemplateFactory.java#L42-L74
train
Creates a TemplateEngine object from the given TemplateConfig.
[ 30522, 2797, 10763, 23561, 13159, 3170, 9986, 29313, 1006, 23561, 8663, 8873, 2290, 9530, 8873, 2290, 1007, 1063, 3046, 1063, 2709, 2047, 7813, 3070, 3170, 1006, 9530, 8873, 2290, 1007, 1025, 1065, 4608, 1006, 2053, 26266, 3207, 4246, 28819...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryRow.java
BinaryRow.isInFixedLengthPart
public static boolean isInFixedLengthPart(InternalType type) { if (type instanceof DecimalType) { return ((DecimalType) type).precision() <= DecimalType.MAX_COMPACT_PRECISION; } else { return MUTABLE_FIELD_TYPES.contains(type); } }
java
public static boolean isInFixedLengthPart(InternalType type) { if (type instanceof DecimalType) { return ((DecimalType) type).precision() <= DecimalType.MAX_COMPACT_PRECISION; } else { return MUTABLE_FIELD_TYPES.contains(type); } }
[ "public", "static", "boolean", "isInFixedLengthPart", "(", "InternalType", "type", ")", "{", "if", "(", "type", "instanceof", "DecimalType", ")", "{", "return", "(", "(", "DecimalType", ")", "type", ")", ".", "precision", "(", ")", "<=", "DecimalType", ".", ...
If it is a fixed-length field, we can call this BinaryRow's setXX method for in-place updates. If it is variable-length field, can't use this method, because the underlying data is stored continuously.
[ "If", "it", "is", "a", "fixed", "-", "length", "field", "we", "can", "call", "this", "BinaryRow", "s", "setXX", "method", "for", "in", "-", "place", "updates", ".", "If", "it", "is", "variable", "-", "length", "field", "can", "t", "use", "this", "met...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryRow.java#L98-L104
train
Returns true if the given type is a fixed length type.
[ 30522, 2270, 10763, 22017, 20898, 2003, 2378, 23901, 7770, 13512, 22269, 8445, 1006, 4722, 13874, 2828, 1007, 1063, 2065, 1006, 2828, 6013, 11253, 26066, 13874, 1007, 1063, 2709, 1006, 1006, 26066, 13874, 1007, 2828, 1007, 1012, 11718, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/mining/cluster/ClusterAnalyzer.java
ClusterAnalyzer.evaluate
public static double evaluate(String folderPath, String algorithm) { if (folderPath == null) throw new IllegalArgumentException("参数 folderPath == null"); File root = new File(folderPath); if (!root.exists()) throw new IllegalArgumentException(String.format("目录 %s 不存在", root.getAbsolutePath()...
java
public static double evaluate(String folderPath, String algorithm) { if (folderPath == null) throw new IllegalArgumentException("参数 folderPath == null"); File root = new File(folderPath); if (!root.exists()) throw new IllegalArgumentException(String.format("目录 %s 不存在", root.getAbsolutePath()...
[ "public", "static", "double", "evaluate", "(", "String", "folderPath", ",", "String", "algorithm", ")", "{", "if", "(", "folderPath", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"参数 folderPath == null\");", "", "", "File", "root", "=", ...
训练模型 @param folderPath 分类语料的根目录.目录必须满足如下结构:<br> 根目录<br> ├── 分类A<br> │ └── 1.txt<br> │ └── 2.txt<br> │ └── 3.txt<br> ├── 分类B<br> │ └── 1.txt<br> │ └── ...<br> └── ...<br> 文件不一定需要用数字命名,也不需要以txt作为后缀名,但一定需要是文本文件. @param algorithm kmeans 或 repeated bisection @throws IOException 任何可能的IO异常
[ "训练模型" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/mining/cluster/ClusterAnalyzer.java#L366-L436
train
Evaluate the n - grams of a folder.
[ 30522, 2270, 10763, 3313, 16157, 1006, 5164, 19622, 15069, 1010, 5164, 9896, 1007, 1063, 2065, 1006, 19622, 15069, 1027, 1027, 19701, 1007, 5466, 2047, 6206, 2906, 22850, 15781, 2595, 24422, 1006, 1000, 100, 100, 19622, 15069, 1027, 1027, 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
common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java
SingleThreadEventExecutor.runAllTasks
protected boolean runAllTasks() { assert inEventLoop(); boolean fetchedAll; boolean ranAtLeastOne = false; do { fetchedAll = fetchFromScheduledTaskQueue(); if (runAllTasksFrom(taskQueue)) { ranAtLeastOne = true; } } while (!fet...
java
protected boolean runAllTasks() { assert inEventLoop(); boolean fetchedAll; boolean ranAtLeastOne = false; do { fetchedAll = fetchFromScheduledTaskQueue(); if (runAllTasksFrom(taskQueue)) { ranAtLeastOne = true; } } while (!fet...
[ "protected", "boolean", "runAllTasks", "(", ")", "{", "assert", "inEventLoop", "(", ")", ";", "boolean", "fetchedAll", ";", "boolean", "ranAtLeastOne", "=", "false", ";", "do", "{", "fetchedAll", "=", "fetchFromScheduledTaskQueue", "(", ")", ";", "if", "(", ...
Poll all tasks from the task queue and run them via {@link Runnable#run()} method. @return {@code true} if and only if at least one task was run
[ "Poll", "all", "tasks", "from", "the", "task", "queue", "and", "run", "them", "via", "{", "@link", "Runnable#run", "()", "}", "method", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java#L349-L366
train
Run all scheduled tasks.
[ 30522, 5123, 22017, 20898, 2448, 8095, 10230, 5705, 1006, 1007, 1063, 20865, 1999, 18697, 3372, 4135, 7361, 1006, 1007, 1025, 22017, 20898, 18584, 11960, 3363, 1025, 22017, 20898, 22175, 9286, 14083, 5643, 1027, 6270, 1025, 2079, 1063, 18584,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec/src/main/java/io/netty/handler/codec/compression/Snappy.java
Snappy.validateChecksum
static void validateChecksum(int expectedChecksum, ByteBuf data, int offset, int length) { final int actualChecksum = calculateChecksum(data, offset, length); if (actualChecksum != expectedChecksum) { throw new DecompressionException( "mismatching checksum: " + Integer.to...
java
static void validateChecksum(int expectedChecksum, ByteBuf data, int offset, int length) { final int actualChecksum = calculateChecksum(data, offset, length); if (actualChecksum != expectedChecksum) { throw new DecompressionException( "mismatching checksum: " + Integer.to...
[ "static", "void", "validateChecksum", "(", "int", "expectedChecksum", ",", "ByteBuf", "data", ",", "int", "offset", ",", "int", "length", ")", "{", "final", "int", "actualChecksum", "=", "calculateChecksum", "(", "data", ",", "offset", ",", "length", ")", ";...
Computes the CRC32C checksum of the supplied data, performs the "mask" operation on the computed checksum, and then compares the resulting masked checksum to the supplied checksum. @param expectedChecksum The checksum decoded from the stream to compare against @param data The input data to calculate the CRC32C checksu...
[ "Computes", "the", "CRC32C", "checksum", "of", "the", "supplied", "data", "performs", "the", "mask", "operation", "on", "the", "computed", "checksum", "and", "then", "compares", "the", "resulting", "masked", "checksum", "to", "the", "supplied", "checksum", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/compression/Snappy.java#L638-L645
train
Validate the checksum.
[ 30522, 10763, 11675, 9398, 3686, 5403, 10603, 2819, 1006, 20014, 3517, 5403, 10603, 2819, 1010, 24880, 8569, 2546, 2951, 1010, 20014, 16396, 1010, 20014, 3091, 1007, 1063, 2345, 20014, 5025, 5403, 10603, 2819, 1027, 18422, 5403, 10603, 2819, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/model/perceptron/PerceptronLexicalAnalyzer.java
PerceptronLexicalAnalyzer.namedEntityRecognize
public String[] namedEntityRecognize(String[] wordArray, String[] posArray) { if (neRecognizer == null) { throw new IllegalStateException("未提供命名实体识别模型"); } return recognize(wordArray, posArray); }
java
public String[] namedEntityRecognize(String[] wordArray, String[] posArray) { if (neRecognizer == null) { throw new IllegalStateException("未提供命名实体识别模型"); } return recognize(wordArray, posArray); }
[ "public", "String", "[", "]", "namedEntityRecognize", "(", "String", "[", "]", "wordArray", ",", "String", "[", "]", "posArray", ")", "{", "if", "(", "neRecognizer", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"未提供命名实体识别模型\");", "...
命名实体识别 @param wordArray @param posArray @return
[ "命名实体识别" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/perceptron/PerceptronLexicalAnalyzer.java#L132-L139
train
recognize - returns a list of named entities
[ 30522, 2270, 5164, 1031, 1033, 2315, 4765, 3012, 2890, 3597, 29076, 4371, 1006, 5164, 1031, 1033, 2773, 2906, 9447, 1010, 5164, 1031, 1033, 13433, 10286, 9447, 1007, 1063, 2065, 1006, 11265, 2890, 3597, 29076, 6290, 1027, 1027, 19701, 1007,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/PatternStream.java
PatternStream.select
@Deprecated public <L, R> SingleOutputStreamOperator<Either<L, R>> select( final PatternTimeoutFunction<T, L> patternTimeoutFunction, final PatternSelectFunction<T, R> patternSelectFunction) { final TypeInformation<R> mainTypeInfo = TypeExtractor.getUnaryOperatorReturnType( patternSelectFunction, Patter...
java
@Deprecated public <L, R> SingleOutputStreamOperator<Either<L, R>> select( final PatternTimeoutFunction<T, L> patternTimeoutFunction, final PatternSelectFunction<T, R> patternSelectFunction) { final TypeInformation<R> mainTypeInfo = TypeExtractor.getUnaryOperatorReturnType( patternSelectFunction, Patter...
[ "@", "Deprecated", "public", "<", "L", ",", "R", ">", "SingleOutputStreamOperator", "<", "Either", "<", "L", ",", "R", ">", ">", "select", "(", "final", "PatternTimeoutFunction", "<", "T", ",", "L", ">", "patternTimeoutFunction", ",", "final", "PatternSelect...
Applies a select function to the detected pattern sequence. For each pattern sequence the provided {@link PatternSelectFunction} is called. The pattern select function can produce exactly one resulting element. <p>Applies a timeout function to a partial pattern sequence which has timed out. For each partial pattern se...
[ "Applies", "a", "select", "function", "to", "the", "detected", "pattern", "sequence", ".", "For", "each", "pattern", "sequence", "the", "provided", "{", "@link", "PatternSelectFunction", "}", "is", "called", ".", "The", "pattern", "select", "function", "can", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/PatternStream.java#L275-L316
train
Select a sequence of two data streams using a pattern timeout function.
[ 30522, 1030, 2139, 28139, 12921, 2270, 1026, 1048, 1010, 1054, 1028, 2309, 5833, 18780, 21422, 25918, 8844, 1026, 2593, 1026, 1048, 1010, 1054, 1028, 1028, 7276, 1006, 2345, 5418, 7292, 5833, 11263, 27989, 1026, 1056, 1010, 1048, 1028, 5418...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/CompositeByteBuf.java
CompositeByteBuf.removeComponents
public CompositeByteBuf removeComponents(int cIndex, int numComponents) { checkComponentIndex(cIndex, numComponents); if (numComponents == 0) { return this; } int endIndex = cIndex + numComponents; boolean needsUpdate = false; for (int i = cIndex; i < endInde...
java
public CompositeByteBuf removeComponents(int cIndex, int numComponents) { checkComponentIndex(cIndex, numComponents); if (numComponents == 0) { return this; } int endIndex = cIndex + numComponents; boolean needsUpdate = false; for (int i = cIndex; i < endInde...
[ "public", "CompositeByteBuf", "removeComponents", "(", "int", "cIndex", ",", "int", "numComponents", ")", "{", "checkComponentIndex", "(", "cIndex", ",", "numComponents", ")", ";", "if", "(", "numComponents", "==", "0", ")", "{", "return", "this", ";", "}", ...
Remove the number of {@link ByteBuf}s starting from the given index. @param cIndex the index on which the {@link ByteBuf}s will be started to removed @param numComponents the number of components to remove
[ "Remove", "the", "number", "of", "{", "@link", "ByteBuf", "}", "s", "starting", "from", "the", "given", "index", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java#L599-L624
train
Removes the specified number of components from this CompositeByteBuf.
[ 30522, 2270, 12490, 3762, 2618, 8569, 2546, 6366, 9006, 29513, 7666, 1006, 20014, 25022, 13629, 2595, 1010, 20014, 16371, 12458, 25377, 5643, 7666, 1007, 1063, 4638, 9006, 29513, 16778, 13629, 2595, 1006, 25022, 13629, 2595, 1010, 16371, 1245...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/Decimal.java
Decimal.sround
public static Decimal sround(Decimal b0, int r) { if (r >= b0.scale) { return b0; } BigDecimal b2 = b0.toBigDecimal().movePointRight(r) .setScale(0, RoundingMode.HALF_UP) .movePointLeft(r); int p = b0.precision; int s = b0.scale; if (r < 0) { return fromBigDecimal(b2, Math.min(38, 1 + p - s),...
java
public static Decimal sround(Decimal b0, int r) { if (r >= b0.scale) { return b0; } BigDecimal b2 = b0.toBigDecimal().movePointRight(r) .setScale(0, RoundingMode.HALF_UP) .movePointLeft(r); int p = b0.precision; int s = b0.scale; if (r < 0) { return fromBigDecimal(b2, Math.min(38, 1 + p - s),...
[ "public", "static", "Decimal", "sround", "(", "Decimal", "b0", ",", "int", "r", ")", "{", "if", "(", "r", ">=", "b0", ".", "scale", ")", "{", "return", "b0", ";", "}", "BigDecimal", "b2", "=", "b0", ".", "toBigDecimal", "(", ")", ".", "movePointRig...
SQL <code>ROUND</code> operator applied to BigDecimal values.
[ "SQL", "<code", ">", "ROUND<", "/", "code", ">", "operator", "applied", "to", "BigDecimal", "values", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/Decimal.java#L449-L464
train
Scales a decimal to a given number of decimals.
[ 30522, 2270, 10763, 26066, 5034, 28819, 1006, 26066, 1038, 2692, 1010, 20014, 1054, 1007, 1063, 2065, 1006, 1054, 1028, 1027, 1038, 2692, 1012, 4094, 1007, 1063, 2709, 1038, 2692, 1025, 1065, 2502, 3207, 6895, 9067, 1038, 2475, 1027, 1038, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/util/StringUtil.java
StringUtil.isLongValue
public static boolean isLongValue(final String value) { try { Long.parseLong(value); return true; } catch (final NumberFormatException ex) { return false; } }
java
public static boolean isLongValue(final String value) { try { Long.parseLong(value); return true; } catch (final NumberFormatException ex) { return false; } }
[ "public", "static", "boolean", "isLongValue", "(", "final", "String", "value", ")", "{", "try", "{", "Long", ".", "parseLong", "(", "value", ")", ";", "return", "true", ";", "}", "catch", "(", "final", "NumberFormatException", "ex", ")", "{", "return", "...
Judge is long value or not. @param value to be judged string value @return is long value or not
[ "Judge", "is", "long", "value", "or", "not", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/util/StringUtil.java#L62-L69
train
Check if a String is a Long value.
[ 30522, 2270, 10763, 22017, 20898, 2003, 10052, 10175, 5657, 1006, 2345, 5164, 3643, 1007, 1063, 3046, 1063, 2146, 1012, 11968, 11246, 5063, 1006, 3643, 1007, 1025, 2709, 2995, 1025, 30524, 14192, 3686, 2595, 24422, 4654, 1007, 1063, 2709, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
java/server/src/org/openqa/grid/web/servlet/console/DefaultProxyHtmlRenderer.java
DefaultProxyHtmlRenderer.getPlatform
public static String getPlatform(RemoteProxy proxy) { if (proxy.getTestSlots().size() == 0) { return "Unknown"; } Platform res = getPlatform(proxy.getTestSlots().get(0)); for (TestSlot slot : proxy.getTestSlots()) { Platform tmp = getPlatform(slot); if (tmp != res) { return "m...
java
public static String getPlatform(RemoteProxy proxy) { if (proxy.getTestSlots().size() == 0) { return "Unknown"; } Platform res = getPlatform(proxy.getTestSlots().get(0)); for (TestSlot slot : proxy.getTestSlots()) { Platform tmp = getPlatform(slot); if (tmp != res) { return "m...
[ "public", "static", "String", "getPlatform", "(", "RemoteProxy", "proxy", ")", "{", "if", "(", "proxy", ".", "getTestSlots", "(", ")", ".", "size", "(", ")", "==", "0", ")", "{", "return", "\"Unknown\"", ";", "}", "Platform", "res", "=", "getPlatform", ...
return the platform for the proxy. It should be the same for all slots of the proxy, so checking that. @param proxy remote proxy @return Either the platform name, "Unknown", "mixed OS", or "not specified".
[ "return", "the", "platform", "for", "the", "proxy", ".", "It", "should", "be", "the", "same", "for", "all", "slots", "of", "the", "proxy", "so", "checking", "that", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/server/src/org/openqa/grid/web/servlet/console/DefaultProxyHtmlRenderer.java#L191-L208
train
Get the platform of the remote proxy.
[ 30522, 2270, 10763, 5164, 2131, 24759, 4017, 14192, 1006, 6556, 21572, 18037, 24540, 1007, 1063, 2065, 1006, 24540, 1012, 2131, 22199, 14540, 12868, 1006, 1007, 1012, 2946, 1006, 1007, 1027, 1027, 1014, 1007, 1063, 2709, 1000, 4242, 1000, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-shardingsphere
sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/api/ShardingDataSourceFactory.java
ShardingDataSourceFactory.createDataSource
public static DataSource createDataSource( final Map<String, DataSource> dataSourceMap, final ShardingRuleConfiguration shardingRuleConfig, final Properties props) throws SQLException { return new ShardingDataSource(dataSourceMap, new ShardingRule(shardingRuleConfig, dataSourceMap.keySet()), props);...
java
public static DataSource createDataSource( final Map<String, DataSource> dataSourceMap, final ShardingRuleConfiguration shardingRuleConfig, final Properties props) throws SQLException { return new ShardingDataSource(dataSourceMap, new ShardingRule(shardingRuleConfig, dataSourceMap.keySet()), props);...
[ "public", "static", "DataSource", "createDataSource", "(", "final", "Map", "<", "String", ",", "DataSource", ">", "dataSourceMap", ",", "final", "ShardingRuleConfiguration", "shardingRuleConfig", ",", "final", "Properties", "props", ")", "throws", "SQLException", "{",...
Create sharding data source. @param dataSourceMap data source map @param shardingRuleConfig rule configuration for databases and tables sharding @param props properties for data source @return sharding data source @throws SQLException SQL exception
[ "Create", "sharding", "data", "source", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/api/ShardingDataSourceFactory.java#L48-L51
train
Create DataSource.
[ 30522, 2270, 10763, 2951, 6499, 3126, 3401, 2580, 6790, 6499, 3126, 3401, 1006, 2345, 4949, 1026, 5164, 1010, 2951, 6499, 3126, 3401, 1028, 2951, 6499, 3126, 3401, 2863, 2361, 1010, 2345, 21146, 17080, 3070, 6820, 2571, 8663, 8873, 27390, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.parseNumber
public static Number parseNumber(String numberStr) { numberStr = removeNumberFlag(numberStr); try { return NumberFormat.getInstance().parse(numberStr); } catch (ParseException e) { throw new UtilException(e); } }
java
public static Number parseNumber(String numberStr) { numberStr = removeNumberFlag(numberStr); try { return NumberFormat.getInstance().parse(numberStr); } catch (ParseException e) { throw new UtilException(e); } }
[ "public", "static", "Number", "parseNumber", "(", "String", "numberStr", ")", "{", "numberStr", "=", "removeNumberFlag", "(", "numberStr", ")", ";", "try", "{", "return", "NumberFormat", ".", "getInstance", "(", ")", ".", "parse", "(", "numberStr", ")", ";",...
将指定字符串转换为{@link Number} 对象 @param numberStr Number字符串 @return Number对象 @since 4.1.15
[ "将指定字符串转换为", "{", "@link", "Number", "}", "对象" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L2185-L2192
train
Parses a number string.
[ 30522, 2270, 10763, 2193, 11968, 5054, 29440, 1006, 5164, 3616, 16344, 1007, 1063, 3616, 16344, 1027, 6366, 19172, 5677, 10258, 8490, 1006, 3616, 16344, 1007, 1025, 3046, 1063, 2709, 2193, 14192, 4017, 1012, 2131, 7076, 26897, 1006, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java
DataStream.process
@Internal public <R> SingleOutputStreamOperator<R> process( ProcessFunction<T, R> processFunction, TypeInformation<R> outputType) { ProcessOperator<T, R> operator = new ProcessOperator<>(clean(processFunction)); return transform("Process", outputType, operator); }
java
@Internal public <R> SingleOutputStreamOperator<R> process( ProcessFunction<T, R> processFunction, TypeInformation<R> outputType) { ProcessOperator<T, R> operator = new ProcessOperator<>(clean(processFunction)); return transform("Process", outputType, operator); }
[ "@", "Internal", "public", "<", "R", ">", "SingleOutputStreamOperator", "<", "R", ">", "process", "(", "ProcessFunction", "<", "T", ",", "R", ">", "processFunction", ",", "TypeInformation", "<", "R", ">", "outputType", ")", "{", "ProcessOperator", "<", "T", ...
Applies the given {@link ProcessFunction} on the input stream, thereby creating a transformed output stream. <p>The function will be called for every element in the input streams and can produce zero or more output elements. @param processFunction The {@link ProcessFunction} that is called for each element in the str...
[ "Applies", "the", "given", "{", "@link", "ProcessFunction", "}", "on", "the", "input", "stream", "thereby", "creating", "a", "transformed", "output", "stream", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L663-L671
train
Process a single input stream.
[ 30522, 1030, 4722, 2270, 1026, 1054, 1028, 2309, 5833, 18780, 21422, 25918, 8844, 1026, 1054, 1028, 2832, 1006, 2832, 11263, 27989, 1026, 1056, 1010, 1054, 1028, 2832, 11263, 27989, 1010, 2828, 2378, 14192, 3370, 1026, 1054, 1028, 6434, 138...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/core/fs/Path.java
Path.depth
public int depth() { String path = uri.getPath(); int depth = 0; int slash = path.length() == 1 && path.charAt(0) == '/' ? -1 : 0; while (slash != -1) { depth++; slash = path.indexOf(SEPARATOR, slash + 1); } return depth; }
java
public int depth() { String path = uri.getPath(); int depth = 0; int slash = path.length() == 1 && path.charAt(0) == '/' ? -1 : 0; while (slash != -1) { depth++; slash = path.indexOf(SEPARATOR, slash + 1); } return depth; }
[ "public", "int", "depth", "(", ")", "{", "String", "path", "=", "uri", ".", "getPath", "(", ")", ";", "int", "depth", "=", "0", ";", "int", "slash", "=", "path", ".", "length", "(", ")", "==", "1", "&&", "path", ".", "charAt", "(", "0", ")", ...
Returns the number of elements in this path. @return the number of elements in this path
[ "Returns", "the", "number", "of", "elements", "in", "this", "path", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/fs/Path.java#L413-L422
train
Returns the depth of the path.
[ 30522, 2270, 20014, 5995, 1006, 1007, 1063, 5164, 4130, 1027, 24471, 2072, 1012, 2131, 15069, 1006, 1007, 1025, 20014, 5995, 1027, 1014, 1025, 20014, 18296, 1027, 4130, 1012, 3091, 1006, 1007, 1027, 1027, 1015, 1004, 1004, 4130, 1012, 25869...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/utils/RequiredParameters.java
RequiredParameters.applyTo
public ParameterTool applyTo(ParameterTool parameterTool) throws RequiredParametersException { List<String> missingArguments = new LinkedList<>(); HashMap<String, String> newParameters = new HashMap<>(parameterTool.toMap()); for (Option o : data.values()) { if (newParameters.containsKey(o.getName())) { i...
java
public ParameterTool applyTo(ParameterTool parameterTool) throws RequiredParametersException { List<String> missingArguments = new LinkedList<>(); HashMap<String, String> newParameters = new HashMap<>(parameterTool.toMap()); for (Option o : data.values()) { if (newParameters.containsKey(o.getName())) { i...
[ "public", "ParameterTool", "applyTo", "(", "ParameterTool", "parameterTool", ")", "throws", "RequiredParametersException", "{", "List", "<", "String", ">", "missingArguments", "=", "new", "LinkedList", "<>", "(", ")", ";", "HashMap", "<", "String", ",", "String", ...
Check for all required parameters defined: - has a value been passed - if not, does the parameter have an associated default value - does the type of the parameter match the one defined in RequiredParameters - does the value provided in the parameterTool adhere to the choices defined in the option. <p>If any check fai...
[ "Check", "for", "all", "required", "parameters", "defined", ":", "-", "has", "a", "value", "been", "passed", "-", "if", "not", "does", "the", "parameter", "have", "an", "associated", "default", "value", "-", "does", "the", "type", "of", "the", "parameter",...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/RequiredParameters.java#L89-L117
train
Apply this option to the given parameter tool.
[ 30522, 2270, 16381, 3406, 4747, 6611, 3406, 1006, 16381, 3406, 4747, 16381, 3406, 4747, 1007, 11618, 3223, 28689, 22828, 3366, 2595, 24422, 1063, 2862, 1026, 5164, 1028, 4394, 2906, 22850, 11187, 1027, 2047, 5799, 9863, 1026, 1028, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java
RabbitProperties.determineVirtualHost
public String determineVirtualHost() { if (CollectionUtils.isEmpty(this.parsedAddresses)) { return getVirtualHost(); } Address address = this.parsedAddresses.get(0); return (address.virtualHost != null) ? address.virtualHost : getVirtualHost(); }
java
public String determineVirtualHost() { if (CollectionUtils.isEmpty(this.parsedAddresses)) { return getVirtualHost(); } Address address = this.parsedAddresses.get(0); return (address.virtualHost != null) ? address.virtualHost : getVirtualHost(); }
[ "public", "String", "determineVirtualHost", "(", ")", "{", "if", "(", "CollectionUtils", ".", "isEmpty", "(", "this", ".", "parsedAddresses", ")", ")", "{", "return", "getVirtualHost", "(", ")", ";", "}", "Address", "address", "=", "this", ".", "parsedAddres...
If addresses have been set and the first address has a virtual host it is returned. Otherwise returns the result of calling {@code getVirtualHost()}. @return the virtual host or {@code null} @see #setAddresses(String) @see #getVirtualHost()
[ "If", "addresses", "have", "been", "set", "and", "the", "first", "address", "has", "a", "virtual", "host", "it", "is", "returned", ".", "Otherwise", "returns", "the", "result", "of", "calling", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java#L255-L261
train
Determine the virtual host.
[ 30522, 2270, 5164, 5646, 21663, 26302, 28061, 3367, 1006, 1007, 1063, 2065, 1006, 3074, 21823, 4877, 1012, 2003, 6633, 13876, 2100, 1006, 2023, 1012, 11968, 6924, 4215, 16200, 11393, 2015, 1007, 1007, 1063, 2709, 2131, 21663, 26302, 28061, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/TGetInfoReq.java
TGetInfoReq.isSet
public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SESSION_HANDLE: return isSetSessionHandle(); case INFO_TYPE: return isSetInfoType(); } throw new IllegalStateException(); }
java
public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SESSION_HANDLE: return isSetSessionHandle(); case INFO_TYPE: return isSetInfoType(); } throw new IllegalStateException(); }
[ "public", "boolean", "isSet", "(", "_Fields", "field", ")", "{", "if", "(", "field", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "switch", "(", "field", ")", "{", "case", "SESSION_HANDLE", ":", "return", "isSet...
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
[ "Returns", "true", "if", "field", "corresponding", "to", "fieldID", "is", "set", "(", "has", "been", "assigned", "a", "value", ")", "and", "false", "otherwise" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TGetInfoReq.java#L248-L260
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, 5219...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.div
public static BigDecimal div(String v1, String v2) { return div(v1, v2, DEFAUT_DIV_SCALE); }
java
public static BigDecimal div(String v1, String v2) { return div(v1, v2, DEFAUT_DIV_SCALE); }
[ "public", "static", "BigDecimal", "div", "(", "String", "v1", ",", "String", "v2", ")", "{", "return", "div", "(", "v1", ",", "v2", ",", "DEFAUT_DIV_SCALE", ")", ";", "}" ]
提供(相对)精确的除法运算,当发生除不尽的情况的时候,精确到小数点后10位,后面的四舍五入 @param v1 被除数 @param v2 除数 @return 两个参数的商
[ "提供", "(", "相对", ")", "精确的除法运算", "当发生除不尽的情况的时候", "精确到小数点后10位", "后面的四舍五入" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L550-L552
train
Divide two numbers.
[ 30522, 2270, 10763, 2502, 3207, 6895, 9067, 4487, 2615, 1006, 5164, 1058, 2487, 1010, 5164, 1058, 2475, 1007, 1063, 2709, 4487, 2615, 1006, 1058, 2487, 1010, 1058, 2475, 1010, 13366, 4887, 2102, 1035, 4487, 2615, 1035, 4094, 1007, 1025, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec/src/main/java/io/netty/handler/codec/DateFormatter.java
DateFormatter.parseHttpDate
public static Date parseHttpDate(CharSequence txt, int start, int end) { int length = end - start; if (length == 0) { return null; } else if (length < 0) { throw new IllegalArgumentException("Can't have end < start"); } else if (length > 64) { throw ne...
java
public static Date parseHttpDate(CharSequence txt, int start, int end) { int length = end - start; if (length == 0) { return null; } else if (length < 0) { throw new IllegalArgumentException("Can't have end < start"); } else if (length > 64) { throw ne...
[ "public", "static", "Date", "parseHttpDate", "(", "CharSequence", "txt", ",", "int", "start", ",", "int", "end", ")", "{", "int", "length", "=", "end", "-", "start", ";", "if", "(", "length", "==", "0", ")", "{", "return", "null", ";", "}", "else", ...
Parse some text into a {@link Date}, according to RFC6265 @param txt text to parse @param start the start index inside {@code txt} @param end the end index inside {@code txt} @return a {@link Date}, or null if text couldn't be parsed
[ "Parse", "some", "text", "into", "a", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/DateFormatter.java#L95-L106
train
Parse a date from a string of text.
[ 30522, 2270, 10763, 3058, 11968, 3366, 11039, 25856, 13701, 1006, 25869, 3366, 4226, 5897, 19067, 2102, 1010, 20014, 2707, 1010, 20014, 2203, 1007, 1063, 20014, 3091, 1027, 2203, 1011, 2707, 1025, 2065, 1006, 3091, 1027, 1027, 1014, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
transport/src/main/java/io/netty/channel/ChannelOutboundBuffer.java
ChannelOutboundBuffer.addMessage
public void addMessage(Object msg, int size, ChannelPromise promise) { Entry entry = Entry.newInstance(msg, size, total(msg), promise); if (tailEntry == null) { flushedEntry = null; } else { Entry tail = tailEntry; tail.next = entry; } tailEntr...
java
public void addMessage(Object msg, int size, ChannelPromise promise) { Entry entry = Entry.newInstance(msg, size, total(msg), promise); if (tailEntry == null) { flushedEntry = null; } else { Entry tail = tailEntry; tail.next = entry; } tailEntr...
[ "public", "void", "addMessage", "(", "Object", "msg", ",", "int", "size", ",", "ChannelPromise", "promise", ")", "{", "Entry", "entry", "=", "Entry", ".", "newInstance", "(", "msg", ",", "size", ",", "total", "(", "msg", ")", ",", "promise", ")", ";", ...
Add given message to this {@link ChannelOutboundBuffer}. The given {@link ChannelPromise} will be notified once the message was written.
[ "Add", "given", "message", "to", "this", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/channel/ChannelOutboundBuffer.java#L112-L128
train
Add a message to the cache.
[ 30522, 2270, 11675, 5587, 7834, 3736, 3351, 1006, 4874, 5796, 2290, 1010, 20014, 2946, 1010, 3149, 21572, 28732, 4872, 1007, 1063, 4443, 4443, 1027, 4443, 1012, 2047, 7076, 26897, 1006, 5796, 2290, 1010, 2946, 1010, 2561, 1006, 5796, 2290, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-socket/src/main/java/cn/hutool/socket/aio/AioSession.java
AioSession.closeIn
public AioSession closeIn() { if (null != this.channel) { try { this.channel.shutdownInput(); } catch (IOException e) { throw new IORuntimeException(e); } } return this; }
java
public AioSession closeIn() { if (null != this.channel) { try { this.channel.shutdownInput(); } catch (IOException e) { throw new IORuntimeException(e); } } return this; }
[ "public", "AioSession", "closeIn", "(", ")", "{", "if", "(", "null", "!=", "this", ".", "channel", ")", "{", "try", "{", "this", ".", "channel", ".", "shutdownInput", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "throw", "new", "...
关闭输出 @return this
[ "关闭输出" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-socket/src/main/java/cn/hutool/socket/aio/AioSession.java#L163-L172
train
Closes the input channel.
[ 30522, 2270, 9932, 27465, 10992, 2485, 2378, 1006, 1007, 1063, 2065, 1006, 19701, 999, 1027, 2023, 1012, 3149, 1007, 1063, 3046, 1063, 2023, 1012, 3149, 1012, 3844, 7698, 2378, 18780, 1006, 1007, 1025, 1065, 4608, 1006, 22834, 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...
networknt/light-4j
metrics/src/main/java/io/dropwizard/metrics/InstrumentedExecutors.java
InstrumentedExecutors.newScheduledThreadPool
public static InstrumentedScheduledExecutorService newScheduledThreadPool( int corePoolSize, MetricRegistry registry) { return new InstrumentedScheduledExecutorService( Executors.newScheduledThreadPool(corePoolSize), registry); }
java
public static InstrumentedScheduledExecutorService newScheduledThreadPool( int corePoolSize, MetricRegistry registry) { return new InstrumentedScheduledExecutorService( Executors.newScheduledThreadPool(corePoolSize), registry); }
[ "public", "static", "InstrumentedScheduledExecutorService", "newScheduledThreadPool", "(", "int", "corePoolSize", ",", "MetricRegistry", "registry", ")", "{", "return", "new", "InstrumentedScheduledExecutorService", "(", "Executors", ".", "newScheduledThreadPool", "(", "coreP...
Creates an instrumented thread pool that can schedule commands to run after a given delay, or to execute periodically. @param corePoolSize the number of threads to keep in the pool, even if they are idle @param registry the {@link MetricRegistry} that will contain the metrics. @return a newly created scheduled thr...
[ "Creates", "an", "instrumented", "thread", "pool", "that", "can", "schedule", "commands", "to", "run", "after", "a", "given", "delay", "or", "to", "execute", "periodically", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/metrics/src/main/java/io/dropwizard/metrics/InstrumentedExecutors.java#L418-L422
train
Create a new scheduled thread pool instrumented from the specified corePoolSize.
[ 30522, 2270, 10763, 6602, 2098, 22842, 8566, 3709, 10288, 8586, 16161, 22573, 2099, 7903, 2063, 2739, 7690, 18696, 2705, 16416, 18927, 13669, 1006, 20014, 4563, 16869, 5332, 4371, 1010, 12046, 2890, 24063, 2854, 15584, 1007, 1063, 2709, 2047,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java
SpringApplication.configurePropertySources
protected void configurePropertySources(ConfigurableEnvironment environment, String[] args) { MutablePropertySources sources = environment.getPropertySources(); if (this.defaultProperties != null && !this.defaultProperties.isEmpty()) { sources.addLast( new MapPropertySource("defaultProperties", this.defa...
java
protected void configurePropertySources(ConfigurableEnvironment environment, String[] args) { MutablePropertySources sources = environment.getPropertySources(); if (this.defaultProperties != null && !this.defaultProperties.isEmpty()) { sources.addLast( new MapPropertySource("defaultProperties", this.defa...
[ "protected", "void", "configurePropertySources", "(", "ConfigurableEnvironment", "environment", ",", "String", "[", "]", "args", ")", "{", "MutablePropertySources", "sources", "=", "environment", ".", "getPropertySources", "(", ")", ";", "if", "(", "this", ".", "d...
Add, remove or re-order any {@link PropertySource}s in this application's environment. @param environment this application's environment @param args arguments passed to the {@code run} method @see #configureEnvironment(ConfigurableEnvironment, String[])
[ "Add", "remove", "or", "re", "-", "order", "any", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java#L508-L529
train
Configure property sources.
[ 30522, 5123, 11675, 9530, 8873, 27390, 13699, 18981, 15010, 6499, 3126, 9623, 1006, 9530, 8873, 27390, 3085, 2368, 21663, 2239, 3672, 4044, 1010, 5164, 1031, 1033, 12098, 5620, 1007, 1063, 14163, 10880, 21572, 4842, 3723, 6499, 3126, 9623, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/PojoSerializer.java
PojoSerializer.getRegisteredSubclassesFromExecutionConfig
private static LinkedHashSet<Class<?>> getRegisteredSubclassesFromExecutionConfig( Class<?> basePojoClass, ExecutionConfig executionConfig) { LinkedHashSet<Class<?>> subclassesInRegistrationOrder = new LinkedHashSet<>(executionConfig.getRegisteredPojoTypes().size()); for (Class<?> registeredClass : execution...
java
private static LinkedHashSet<Class<?>> getRegisteredSubclassesFromExecutionConfig( Class<?> basePojoClass, ExecutionConfig executionConfig) { LinkedHashSet<Class<?>> subclassesInRegistrationOrder = new LinkedHashSet<>(executionConfig.getRegisteredPojoTypes().size()); for (Class<?> registeredClass : execution...
[ "private", "static", "LinkedHashSet", "<", "Class", "<", "?", ">", ">", "getRegisteredSubclassesFromExecutionConfig", "(", "Class", "<", "?", ">", "basePojoClass", ",", "ExecutionConfig", "executionConfig", ")", "{", "LinkedHashSet", "<", "Class", "<", "?", ">", ...
Extracts the subclasses of the base POJO class registered in the execution config.
[ "Extracts", "the", "subclasses", "of", "the", "base", "POJO", "class", "registered", "in", "the", "execution", "config", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/PojoSerializer.java#L1001-L1017
train
Get the registered subclasses from the given execution config.
[ 30522, 2797, 10763, 5799, 14949, 7898, 3388, 1026, 2465, 1026, 1029, 1028, 1028, 2131, 2890, 24063, 6850, 6342, 9818, 27102, 2229, 19699, 8462, 2595, 8586, 13700, 8663, 8873, 2290, 1006, 2465, 1026, 1029, 1028, 2918, 6873, 5558, 26266, 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-crypto/src/main/java/cn/hutool/crypto/symmetric/SymmetricCrypto.java
SymmetricCrypto.decrypt
public byte[] decrypt(byte[] bytes) { lock.lock(); try { if (null == this.params) { cipher.init(Cipher.DECRYPT_MODE, secretKey); } else { cipher.init(Cipher.DECRYPT_MODE, secretKey, params); } return cipher.doFinal(bytes); } catch (Exception e) { throw new CryptoException(e); }...
java
public byte[] decrypt(byte[] bytes) { lock.lock(); try { if (null == this.params) { cipher.init(Cipher.DECRYPT_MODE, secretKey); } else { cipher.init(Cipher.DECRYPT_MODE, secretKey, params); } return cipher.doFinal(bytes); } catch (Exception e) { throw new CryptoException(e); }...
[ "public", "byte", "[", "]", "decrypt", "(", "byte", "[", "]", "bytes", ")", "{", "lock", ".", "lock", "(", ")", ";", "try", "{", "if", "(", "null", "==", "this", ".", "params", ")", "{", "cipher", ".", "init", "(", "Cipher", ".", "DECRYPT_MODE", ...
解密 @param bytes 被解密的bytes @return 解密后的bytes
[ "解密" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/symmetric/SymmetricCrypto.java#L293-L307
train
Decrypt the bytes.
[ 30522, 2270, 24880, 1031, 1033, 11703, 2854, 13876, 1006, 24880, 1031, 1033, 27507, 1007, 1063, 5843, 1012, 5843, 1006, 1007, 1025, 3046, 1063, 2065, 1006, 19701, 1027, 1027, 2023, 1012, 11498, 5244, 1007, 1063, 27715, 1012, 1999, 4183, 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-clients/src/main/java/org/apache/flink/client/LocalExecutor.java
LocalExecutor.execute
public static JobExecutionResult execute(Program pa, String... args) throws Exception { return execute(pa.getPlan(args)); }
java
public static JobExecutionResult execute(Program pa, String... args) throws Exception { return execute(pa.getPlan(args)); }
[ "public", "static", "JobExecutionResult", "execute", "(", "Program", "pa", ",", "String", "...", "args", ")", "throws", "Exception", "{", "return", "execute", "(", "pa", ".", "getPlan", "(", "args", ")", ")", ";", "}" ]
Executes the given program. @param pa The program. @param args The parameters. @return The execution result of the program. @throws Exception Thrown, if either the startup of the local execution context, or the execution caused an exception.
[ "Executes", "the", "given", "program", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/LocalExecutor.java#L274-L276
train
Execute a program.
[ 30522, 2270, 10763, 3105, 10288, 8586, 13700, 6072, 11314, 15389, 1006, 2565, 6643, 1010, 5164, 1012, 1012, 1012, 12098, 5620, 1007, 11618, 6453, 1063, 2709, 15389, 1006, 6643, 1012, 2131, 24759, 2319, 1006, 12098, 5620, 1007, 1007, 1025, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
networknt/light-4j
metrics/src/main/java/io/dropwizard/metrics/MetricName.java
MetricName.resolve
public MetricName resolve(String p) { final String next; if (p != null && !p.isEmpty()) { if (key != null && !key.isEmpty()) { next = key + SEPARATOR + p; } else { next = p; } } else { next = this.key; } ...
java
public MetricName resolve(String p) { final String next; if (p != null && !p.isEmpty()) { if (key != null && !key.isEmpty()) { next = key + SEPARATOR + p; } else { next = p; } } else { next = this.key; } ...
[ "public", "MetricName", "resolve", "(", "String", "p", ")", "{", "final", "String", "next", ";", "if", "(", "p", "!=", "null", "&&", "!", "p", ".", "isEmpty", "(", ")", ")", "{", "if", "(", "key", "!=", "null", "&&", "!", "key", ".", "isEmpty", ...
Build the MetricName that is this with another path appended to it. The new MetricName inherits the tags of this one. @param p The extra path element to add to the new metric. @return A new metric name relative to the original by the path specified in p.
[ "Build", "the", "MetricName", "that", "is", "this", "with", "another", "path", "appended", "to", "it", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/metrics/src/main/java/io/dropwizard/metrics/MetricName.java#L82-L96
train
Resolves the metric name to a new metric name.
[ 30522, 2270, 12046, 18442, 10663, 1006, 5164, 1052, 1007, 1063, 2345, 5164, 2279, 1025, 2065, 1006, 1052, 999, 1027, 19701, 1004, 1004, 999, 1052, 1012, 2003, 6633, 13876, 2100, 1006, 1007, 1007, 1063, 2065, 1006, 3145, 999, 1027, 19701, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java
CollUtil.newHashSet
public static <T> HashSet<T> newHashSet(boolean isSorted, Enumeration<T> enumration) { if (null == enumration) { return newHashSet(isSorted, (T[]) null); } final HashSet<T> set = isSorted ? new LinkedHashSet<T>() : new HashSet<T>(); while (enumration.hasMoreElements()) { set.add(enumration.nextEleme...
java
public static <T> HashSet<T> newHashSet(boolean isSorted, Enumeration<T> enumration) { if (null == enumration) { return newHashSet(isSorted, (T[]) null); } final HashSet<T> set = isSorted ? new LinkedHashSet<T>() : new HashSet<T>(); while (enumration.hasMoreElements()) { set.add(enumration.nextEleme...
[ "public", "static", "<", "T", ">", "HashSet", "<", "T", ">", "newHashSet", "(", "boolean", "isSorted", ",", "Enumeration", "<", "T", ">", "enumration", ")", "{", "if", "(", "null", "==", "enumration", ")", "{", "return", "newHashSet", "(", "isSorted", ...
新建一个HashSet @param <T> 集合元素类型 @param isSorted 是否有序,有序返回 {@link LinkedHashSet},否则返回{@link HashSet} @param enumration {@link Enumeration} @return HashSet对象 @since 3.0.8
[ "新建一个HashSet" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java#L492-L501
train
Creates a new HashSet from an enumeration.
[ 30522, 2270, 10763, 1026, 1056, 1028, 23325, 13462, 1026, 1056, 1028, 2047, 14949, 7898, 3388, 1006, 22017, 20898, 26354, 15613, 1010, 4372, 17897, 8156, 1026, 1056, 1028, 4372, 2819, 8156, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 4372, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/webservices/client/HttpWebServiceMessageSenderBuilder.java
HttpWebServiceMessageSenderBuilder.requestFactory
public HttpWebServiceMessageSenderBuilder requestFactory( Supplier<ClientHttpRequestFactory> requestFactorySupplier) { Assert.notNull(requestFactorySupplier, "RequestFactory Supplier must not be null"); this.requestFactorySupplier = requestFactorySupplier; return this; }
java
public HttpWebServiceMessageSenderBuilder requestFactory( Supplier<ClientHttpRequestFactory> requestFactorySupplier) { Assert.notNull(requestFactorySupplier, "RequestFactory Supplier must not be null"); this.requestFactorySupplier = requestFactorySupplier; return this; }
[ "public", "HttpWebServiceMessageSenderBuilder", "requestFactory", "(", "Supplier", "<", "ClientHttpRequestFactory", ">", "requestFactorySupplier", ")", "{", "Assert", ".", "notNull", "(", "requestFactorySupplier", ",", "\"RequestFactory Supplier must not be null\"", ")", ";", ...
Set the {@code Supplier} of {@link ClientHttpRequestFactory} that should be called to create the HTTP-based {@link WebServiceMessageSender}. @param requestFactorySupplier the supplier for the request factory @return a new builder instance
[ "Set", "the", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/webservices/client/HttpWebServiceMessageSenderBuilder.java#L71-L77
train
Sets the request factory supplier.
[ 30522, 2270, 8299, 8545, 5910, 2121, 7903, 21382, 11488, 30524, 14355, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 5227, 21450, 6342, 9397, 14355, 1010, 1000, 5227, 21450, 17024, 2442, 2025, 2022, 19701, 1000, 1007, 1025, 2023, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/client/SemiAckCommandPacket.java
SemiAckCommandPacket.toBytes
public byte[] toBytes() throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); // 0 write semi mark out.write(0xef); // 1 write 8 bytes for position ByteHelper.write8ByteUnsignedIntLittleEndian(binlogPosition, out); // 2 write binlog filename ...
java
public byte[] toBytes() throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); // 0 write semi mark out.write(0xef); // 1 write 8 bytes for position ByteHelper.write8ByteUnsignedIntLittleEndian(binlogPosition, out); // 2 write binlog filename ...
[ "public", "byte", "[", "]", "toBytes", "(", ")", "throws", "IOException", "{", "ByteArrayOutputStream", "out", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "// 0 write semi mark", "out", ".", "write", "(", "0xef", ")", ";", "// 1 write 8 bytes for position"...
<pre> Bytes Name -------------------------------------------------------- Bytes Name ----- ---- 1 semi mark 8 binlog position to start at (little endian) n binlog file na...
[ "<pre", ">", "Bytes", "Name", "--------------------------------------------------------", "Bytes", "Name", "-----", "----", "1", "semi", "mark", "8", "binlog", "position", "to", "start", "at", "(", "little", "endian", ")", "n", "binlog", "file", "name" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/client/SemiAckCommandPacket.java#L41-L53
train
Serialize the record to bytes.
[ 30522, 2270, 24880, 1031, 1033, 11291, 4570, 1006, 1007, 11618, 22834, 10288, 24422, 1063, 24880, 2906, 9447, 5833, 18780, 21422, 2041, 1027, 2047, 24880, 2906, 9447, 5833, 18780, 21422, 1006, 1007, 1025, 1013, 1013, 1014, 4339, 4100, 2928, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java
Restarter.stop
protected void stop() throws Exception { this.logger.debug("Stopping application"); this.stopLock.lock(); try { for (ConfigurableApplicationContext context : this.rootContexts) { context.close(); this.rootContexts.remove(context); } cleanupCaches(); if (this.forceReferenceCleanup) { forceR...
java
protected void stop() throws Exception { this.logger.debug("Stopping application"); this.stopLock.lock(); try { for (ConfigurableApplicationContext context : this.rootContexts) { context.close(); this.rootContexts.remove(context); } cleanupCaches(); if (this.forceReferenceCleanup) { forceR...
[ "protected", "void", "stop", "(", ")", "throws", "Exception", "{", "this", ".", "logger", ".", "debug", "(", "\"Stopping application\"", ")", ";", "this", ".", "stopLock", ".", "lock", "(", ")", ";", "try", "{", "for", "(", "ConfigurableApplicationContext", ...
Stop the application. @throws Exception in case of errors
[ "Stop", "the", "application", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java#L307-L325
train
Stop the application.
[ 30522, 5123, 11675, 2644, 1006, 1007, 11618, 6453, 1063, 30524, 1006, 1007, 1025, 3046, 1063, 2005, 1006, 9530, 8873, 27390, 3085, 29098, 19341, 3508, 8663, 18209, 6123, 1024, 2023, 1012, 7117, 8663, 18209, 2015, 1007, 1063, 6123, 1012, 248...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/payload/HttpTunnelPayload.java
HttpTunnelPayload.get
public static HttpTunnelPayload get(HttpInputMessage message) throws IOException { long length = message.getHeaders().getContentLength(); if (length <= 0) { return null; } String seqHeader = message.getHeaders().getFirst(SEQ_HEADER); Assert.state(StringUtils.hasLength(seqHeader), "Missing sequence header")...
java
public static HttpTunnelPayload get(HttpInputMessage message) throws IOException { long length = message.getHeaders().getContentLength(); if (length <= 0) { return null; } String seqHeader = message.getHeaders().getFirst(SEQ_HEADER); Assert.state(StringUtils.hasLength(seqHeader), "Missing sequence header")...
[ "public", "static", "HttpTunnelPayload", "get", "(", "HttpInputMessage", "message", ")", "throws", "IOException", "{", "long", "length", "=", "message", ".", "getHeaders", "(", ")", ".", "getContentLength", "(", ")", ";", "if", "(", "length", "<=", "0", ")",...
Return the {@link HttpTunnelPayload} for the given message or {@code null} if there is no payload. @param message the HTTP message @return the payload or {@code null} @throws IOException in case of I/O errors
[ "Return", "the", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/payload/HttpTunnelPayload.java#L113-L128
train
Get tunnel payload from input message.
[ 30522, 2270, 10763, 8299, 8525, 10087, 14277, 4710, 11066, 2131, 1006, 8299, 2378, 18780, 7834, 3736, 3351, 4471, 1007, 11618, 22834, 10288, 24422, 1063, 2146, 3091, 1027, 4471, 1012, 2131, 4974, 2545, 1006, 1007, 1012, 2131, 8663, 6528, 92...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/GenericWriteAheadSink.java
GenericWriteAheadSink.saveHandleInState
private void saveHandleInState(final long checkpointId, final long timestamp) throws Exception { //only add handle if a new OperatorState was created since the last snapshot if (out != null) { int subtaskIdx = getRuntimeContext().getIndexOfThisSubtask(); StreamStateHandle handle = out.closeAndGetHandle(); ...
java
private void saveHandleInState(final long checkpointId, final long timestamp) throws Exception { //only add handle if a new OperatorState was created since the last snapshot if (out != null) { int subtaskIdx = getRuntimeContext().getIndexOfThisSubtask(); StreamStateHandle handle = out.closeAndGetHandle(); ...
[ "private", "void", "saveHandleInState", "(", "final", "long", "checkpointId", ",", "final", "long", "timestamp", ")", "throws", "Exception", "{", "//only add handle if a new OperatorState was created since the last snapshot", "if", "(", "out", "!=", "null", ")", "{", "i...
Called when a checkpoint barrier arrives. It closes any open streams to the backend and marks them as pending for committing to the external, third-party storage system. @param checkpointId the id of the latest received checkpoint. @throws IOException in case something went wrong when handling the stream to the backen...
[ "Called", "when", "a", "checkpoint", "barrier", "arrives", ".", "It", "closes", "any", "open", "streams", "to", "the", "backend", "and", "marks", "them", "as", "pending", "for", "committing", "to", "the", "external", "third", "-", "party", "storage", "system...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/GenericWriteAheadSink.java#L136-L155
train
Saves a handle in the state.
[ 30522, 2797, 11675, 3828, 11774, 19856, 9153, 2618, 1006, 2345, 2146, 26520, 3593, 1010, 2345, 2146, 2335, 15464, 2361, 1007, 11618, 6453, 1063, 1013, 1013, 2069, 5587, 5047, 2065, 1037, 2047, 9224, 12259, 2001, 2580, 2144, 1996, 2197, 2005...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/template/engine/velocity/VelocityUtil.java
VelocityUtil.toWriter
public static void toWriter(VelocityEngine ve, String templateFileName, VelocityContext context, Writer writer) { final Template template = ve.getTemplate(templateFileName); merge(template, context, writer); }
java
public static void toWriter(VelocityEngine ve, String templateFileName, VelocityContext context, Writer writer) { final Template template = ve.getTemplate(templateFileName); merge(template, context, writer); }
[ "public", "static", "void", "toWriter", "(", "VelocityEngine", "ve", ",", "String", "templateFileName", ",", "VelocityContext", "context", ",", "Writer", "writer", ")", "{", "final", "Template", "template", "=", "ve", ".", "getTemplate", "(", "templateFileName", ...
生成内容写入流<br> 会自动关闭Writer @param ve 引擎 @param templateFileName 模板文件名 @param context 上下文 @param writer 流
[ "生成内容写入流<br", ">", "会自动关闭Writer" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/template/engine/velocity/VelocityUtil.java#L186-L189
train
Write a Velocity template to a Writer.
[ 30522, 2270, 10763, 11675, 15805, 17625, 2099, 1006, 10146, 13159, 3170, 2310, 1010, 5164, 23561, 8873, 20844, 4168, 1010, 10146, 8663, 18209, 6123, 1010, 3213, 3213, 1007, 1063, 2345, 23561, 23561, 1027, 2310, 1012, 2131, 18532, 15725, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
common/network-common/src/main/java/org/apache/spark/network/sasl/SaslClientBootstrap.java
SaslClientBootstrap.doBootstrap
@Override public void doBootstrap(TransportClient client, Channel channel) { SparkSaslClient saslClient = new SparkSaslClient(appId, secretKeyHolder, conf.saslEncryption()); try { byte[] payload = saslClient.firstToken(); while (!saslClient.isComplete()) { SaslMessage msg = new SaslMessag...
java
@Override public void doBootstrap(TransportClient client, Channel channel) { SparkSaslClient saslClient = new SparkSaslClient(appId, secretKeyHolder, conf.saslEncryption()); try { byte[] payload = saslClient.firstToken(); while (!saslClient.isComplete()) { SaslMessage msg = new SaslMessag...
[ "@", "Override", "public", "void", "doBootstrap", "(", "TransportClient", "client", ",", "Channel", "channel", ")", "{", "SparkSaslClient", "saslClient", "=", "new", "SparkSaslClient", "(", "appId", ",", "secretKeyHolder", ",", "conf", ".", "saslEncryption", "(", ...
Performs SASL authentication by sending a token, and then proceeding with the SASL challenge-response tokens until we either successfully authenticate or throw an exception due to mismatch.
[ "Performs", "SASL", "authentication", "by", "sending", "a", "token", "and", "then", "proceeding", "with", "the", "SASL", "challenge", "-", "response", "tokens", "until", "we", "either", "successfully", "authenticate", "or", "throw", "an", "exception", "due", "to...
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-common/src/main/java/org/apache/spark/network/sasl/SaslClientBootstrap.java#L58-L98
train
Bootstrap the server.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2079, 27927, 20528, 2361, 1006, 3665, 20464, 11638, 7396, 1010, 3149, 3149, 1007, 1063, 12300, 3022, 15472, 8751, 3372, 21871, 15472, 8751, 3372, 1027, 2047, 12300, 3022, 15472, 8751, 3372, 1006, 10439, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...