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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SeleniumHQ/selenium | java/server/src/org/openqa/grid/web/servlet/console/DefaultProxyHtmlRenderer.java | DefaultProxyHtmlRenderer.tabBrowsers | private String tabBrowsers() {
StringBuilder builder = new StringBuilder();
builder.append("<div type='browsers' class='content_detail'>");
SlotsLines rcLines = new SlotsLines();
SlotsLines wdLines = new SlotsLines();
for (TestSlot slot : proxy.getTestSlots()) {
if (slot.getProtocol() == Sel... | java | private String tabBrowsers() {
StringBuilder builder = new StringBuilder();
builder.append("<div type='browsers' class='content_detail'>");
SlotsLines rcLines = new SlotsLines();
SlotsLines wdLines = new SlotsLines();
for (TestSlot slot : proxy.getTestSlots()) {
if (slot.getProtocol() == Sel... | [
"private",
"String",
"tabBrowsers",
"(",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"builder",
".",
"append",
"(",
"\"<div type='browsers' class='content_detail'>\"",
")",
";",
"SlotsLines",
"rcLines",
"=",
"new",
"SlotsLines",... | content of the browsers tab | [
"content",
"of",
"the",
"browsers",
"tab"
] | 7af172729f17b20269c8ca4ea6f788db48616535 | https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/server/src/org/openqa/grid/web/servlet/console/DefaultProxyHtmlRenderer.java#L98-L123 | train | tabBrowsers - returns the browsers tab | [
30522,
2797,
5164,
21628,
12618,
9333,
2545,
1006,
1007,
1063,
5164,
8569,
23891,
2099,
12508,
1027,
2047,
5164,
8569,
23891,
2099,
1006,
1007,
1025,
12508,
1012,
10439,
10497,
1006,
1000,
1026,
4487,
2615,
2828,
1027,
1005,
16602,
2015,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java | JobMaster.suspendExecution | private Acknowledge suspendExecution(final Exception cause) {
validateRunsInMainThread();
if (getFencingToken() == null) {
log.debug("Job has already been suspended or shutdown.");
return Acknowledge.get();
}
// not leader anymore --> set the JobMasterId to null
setFencingToken(null);
try {
reso... | java | private Acknowledge suspendExecution(final Exception cause) {
validateRunsInMainThread();
if (getFencingToken() == null) {
log.debug("Job has already been suspended or shutdown.");
return Acknowledge.get();
}
// not leader anymore --> set the JobMasterId to null
setFencingToken(null);
try {
reso... | [
"private",
"Acknowledge",
"suspendExecution",
"(",
"final",
"Exception",
"cause",
")",
"{",
"validateRunsInMainThread",
"(",
")",
";",
"if",
"(",
"getFencingToken",
"(",
")",
"==",
"null",
")",
"{",
"log",
".",
"debug",
"(",
"\"Job has already been suspended or sh... | Suspending job, all the running tasks will be cancelled, and communication with other components
will be disposed.
<p>Mostly job is suspended because of the leadership has been revoked, one can be restart this job by
calling the {@link #start(JobMasterId)} method once we take the leadership back again.
@param cause T... | [
"Suspending",
"job",
"all",
"the",
"running",
"tasks",
"will",
"be",
"cancelled",
"and",
"communication",
"with",
"other",
"components",
"will",
"be",
"disposed",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java#L980-L1007 | train | Suspend the execution of a job. | [
30522,
2797,
13399,
28324,
10288,
8586,
13700,
1006,
2345,
6453,
3426,
1007,
1063,
9398,
24932,
4609,
11493,
24238,
2705,
16416,
2094,
1006,
1007,
1025,
2065,
1006,
2131,
18940,
6129,
18715,
2368,
1006,
1007,
1027,
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... |
spring-projects/spring-boot | spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java | ReactiveCloudFoundrySecurityService.getUaaUrl | public Mono<String> getUaaUrl() {
this.uaaUrl = this.webClient.get().uri(this.cloudControllerUrl + "/info")
.retrieve().bodyToMono(Map.class)
.map((response) -> (String) response.get("token_endpoint")).cache()
.onErrorMap((ex) -> new CloudFoundryAuthorizationException(
Reason.SERVICE_UNAVAILABLE,
... | java | public Mono<String> getUaaUrl() {
this.uaaUrl = this.webClient.get().uri(this.cloudControllerUrl + "/info")
.retrieve().bodyToMono(Map.class)
.map((response) -> (String) response.get("token_endpoint")).cache()
.onErrorMap((ex) -> new CloudFoundryAuthorizationException(
Reason.SERVICE_UNAVAILABLE,
... | [
"public",
"Mono",
"<",
"String",
">",
"getUaaUrl",
"(",
")",
"{",
"this",
".",
"uaaUrl",
"=",
"this",
".",
"webClient",
".",
"get",
"(",
")",
".",
"uri",
"(",
"this",
".",
"cloudControllerUrl",
"+",
"\"/info\"",
")",
".",
"retrieve",
"(",
")",
".",
... | Return a Mono of URL of the UAA.
@return the UAA url Mono | [
"Return",
"a",
"Mono",
"of",
"URL",
"of",
"the",
"UAA",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java#L150-L158 | train | Get the UAA URL | [
30522,
2270,
18847,
1026,
5164,
1028,
2131,
6692,
21159,
2140,
1006,
1007,
1063,
2023,
1012,
25423,
21159,
2140,
1027,
2023,
1012,
4773,
20464,
11638,
1012,
2131,
1006,
1007,
1012,
24471,
2072,
1006,
2023,
1012,
6112,
8663,
13181,
10820,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.zip | public static File zip(File srcFile, Charset charset) throws UtilException {
final File zipFile = FileUtil.file(srcFile.getParentFile(), FileUtil.mainName(srcFile) + ".zip");
zip(zipFile, charset, false, srcFile);
return zipFile;
} | java | public static File zip(File srcFile, Charset charset) throws UtilException {
final File zipFile = FileUtil.file(srcFile.getParentFile(), FileUtil.mainName(srcFile) + ".zip");
zip(zipFile, charset, false, srcFile);
return zipFile;
} | [
"public",
"static",
"File",
"zip",
"(",
"File",
"srcFile",
",",
"Charset",
"charset",
")",
"throws",
"UtilException",
"{",
"final",
"File",
"zipFile",
"=",
"FileUtil",
".",
"file",
"(",
"srcFile",
".",
"getParentFile",
"(",
")",
",",
"FileUtil",
".",
"main... | 打包到当前目录
@param srcFile 源文件或目录
@param charset 编码
@return 打包好的压缩文件
@throws UtilException IO异常 | [
"打包到当前目录"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java#L83-L87 | train | Creates a zip file from a source file. | [
30522,
2270,
10763,
5371,
14101,
1006,
5371,
5034,
2278,
8873,
2571,
1010,
25869,
13462,
25869,
13462,
1007,
11618,
21183,
9463,
2595,
24422,
1063,
2345,
5371,
14101,
8873,
2571,
1027,
5371,
21823,
2140,
1012,
5371,
1006,
5034,
2278,
8873,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/util/LeaderRetrievalUtils.java | LeaderRetrievalUtils.retrieveLeaderConnectionInfo | public static LeaderConnectionInfo retrieveLeaderConnectionInfo(
LeaderRetrievalService leaderRetrievalService,
FiniteDuration timeout
) throws LeaderRetrievalException {
LeaderConnectionInfoListener listener = new LeaderConnectionInfoListener();
try {
leaderRetrievalService.start(listener);
Future<L... | java | public static LeaderConnectionInfo retrieveLeaderConnectionInfo(
LeaderRetrievalService leaderRetrievalService,
FiniteDuration timeout
) throws LeaderRetrievalException {
LeaderConnectionInfoListener listener = new LeaderConnectionInfoListener();
try {
leaderRetrievalService.start(listener);
Future<L... | [
"public",
"static",
"LeaderConnectionInfo",
"retrieveLeaderConnectionInfo",
"(",
"LeaderRetrievalService",
"leaderRetrievalService",
",",
"FiniteDuration",
"timeout",
")",
"throws",
"LeaderRetrievalException",
"{",
"LeaderConnectionInfoListener",
"listener",
"=",
"new",
"LeaderCo... | Retrieves the leader akka url and the current leader session ID. The values are stored in a
{@link LeaderConnectionInfo} instance.
@param leaderRetrievalService Leader retrieval service to retrieve the leader connection
information
@param timeout Timeout when to give up looking for the leader
@return LeaderConnectionI... | [
"Retrieves",
"the",
"leader",
"akka",
"url",
"and",
"the",
"current",
"leader",
"session",
"ID",
".",
"The",
"values",
"are",
"stored",
"in",
"a",
"{",
"@link",
"LeaderConnectionInfo",
"}",
"instance",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/LeaderRetrievalUtils.java#L75-L97 | train | Retrieve the leader connection info. | [
30522,
2270,
10763,
3003,
8663,
2638,
7542,
2378,
14876,
12850,
19000,
8663,
2638,
7542,
2378,
14876,
1006,
3003,
13465,
7373,
10175,
8043,
7903,
2063,
3003,
13465,
7373,
10175,
8043,
7903,
2063,
1010,
10713,
24979,
3370,
2051,
5833,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/PartitionInfo.java | PartitionInfo.fromEdge | static PartitionInfo fromEdge(ExecutionEdge executionEdge) {
final InputChannelDeploymentDescriptor inputChannelDeploymentDescriptor = InputChannelDeploymentDescriptor.fromEdge(executionEdge);
Preconditions.checkState(
!inputChannelDeploymentDescriptor.getConsumedPartitionLocation().isUnknown(),
"PartitionIn... | java | static PartitionInfo fromEdge(ExecutionEdge executionEdge) {
final InputChannelDeploymentDescriptor inputChannelDeploymentDescriptor = InputChannelDeploymentDescriptor.fromEdge(executionEdge);
Preconditions.checkState(
!inputChannelDeploymentDescriptor.getConsumedPartitionLocation().isUnknown(),
"PartitionIn... | [
"static",
"PartitionInfo",
"fromEdge",
"(",
"ExecutionEdge",
"executionEdge",
")",
"{",
"final",
"InputChannelDeploymentDescriptor",
"inputChannelDeploymentDescriptor",
"=",
"InputChannelDeploymentDescriptor",
".",
"fromEdge",
"(",
"executionEdge",
")",
";",
"Preconditions",
... | ------------------------------------------------------------------------ | [
"------------------------------------------------------------------------"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/PartitionInfo.java#L54-L64 | train | Creates a new partition info from an execution edge. | [
30522,
10763,
13571,
2378,
14876,
2013,
24225,
1006,
7781,
24225,
7781,
24225,
1007,
1063,
2345,
7953,
26058,
3207,
24759,
6977,
3672,
6155,
23235,
2953,
7953,
26058,
3207,
24759,
6977,
3672,
6155,
23235,
2953,
1027,
7953,
26058,
3207,
24759,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/StreamProjection.java | StreamProjection.projectTuple2 | public <T0, T1> SingleOutputStreamOperator<Tuple2<T0, T1>> projectTuple2() {
TypeInformation<?>[] fTypes = extractFieldTypes(fieldIndexes, dataStream.getType());
TupleTypeInfo<Tuple2<T0, T1>> tType = new TupleTypeInfo<Tuple2<T0, T1>>(fTypes);
return dataStream.transform("Projection", tType, new StreamProject<IN,... | java | public <T0, T1> SingleOutputStreamOperator<Tuple2<T0, T1>> projectTuple2() {
TypeInformation<?>[] fTypes = extractFieldTypes(fieldIndexes, dataStream.getType());
TupleTypeInfo<Tuple2<T0, T1>> tType = new TupleTypeInfo<Tuple2<T0, T1>>(fTypes);
return dataStream.transform("Projection", tType, new StreamProject<IN,... | [
"public",
"<",
"T0",
",",
"T1",
">",
"SingleOutputStreamOperator",
"<",
"Tuple2",
"<",
"T0",
",",
"T1",
">",
">",
"projectTuple2",
"(",
")",
"{",
"TypeInformation",
"<",
"?",
">",
"[",
"]",
"fTypes",
"=",
"extractFieldTypes",
"(",
"fieldIndexes",
",",
"d... | Projects a {@link Tuple} {@link DataStream} to the previously selected fields.
@return The projected DataStream.
@see Tuple
@see DataStream | [
"Projects",
"a",
"{",
"@link",
"Tuple",
"}",
"{",
"@link",
"DataStream",
"}",
"to",
"the",
"previously",
"selected",
"fields",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/StreamProjection.java#L148-L153 | train | Project a tuple of data stream to a single output stream. | [
30522,
2270,
1026,
1056,
2692,
1010,
1056,
2487,
1028,
2309,
5833,
18780,
21422,
25918,
8844,
1026,
10722,
10814,
2475,
1026,
1056,
2692,
1010,
1056,
2487,
1028,
1028,
2622,
8525,
10814,
2475,
1006,
1007,
1063,
2828,
2378,
14192,
3370,
1026... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.getStorageSize | public double getStorageSize(String name, String defaultValue,
StorageUnit targetUnit) {
Preconditions.checkState(isNotBlank(name), "Key cannot be blank.");
String vString = get(name);
if (isBlank(vString)) {
vString = defaultValue;
}
// Please note: There is a bit of subtlet... | java | public double getStorageSize(String name, String defaultValue,
StorageUnit targetUnit) {
Preconditions.checkState(isNotBlank(name), "Key cannot be blank.");
String vString = get(name);
if (isBlank(vString)) {
vString = defaultValue;
}
// Please note: There is a bit of subtlet... | [
"public",
"double",
"getStorageSize",
"(",
"String",
"name",
",",
"String",
"defaultValue",
",",
"StorageUnit",
"targetUnit",
")",
"{",
"Preconditions",
".",
"checkState",
"(",
"isNotBlank",
"(",
"name",
")",
",",
"\"Key cannot be blank.\"",
")",
";",
"String",
... | Gets the Storage Size from the config, or returns the defaultValue. The
unit of return value is specified in target unit.
@param name - Key Name
@param defaultValue - Default Value -- e.g. 100MB
@param targetUnit - The units that we want result to be in.
@return double -- formatted in target Units | [
"Gets",
"the",
"Storage",
"Size",
"from",
"the",
"config",
"or",
"returns",
"the",
"defaultValue",
".",
"The",
"unit",
"of",
"return",
"value",
"is",
"specified",
"in",
"target",
"unit",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L1725-L1742 | train | Gets the value of the specified key in the specified target unit. | [
30522,
2270,
3313,
4152,
4263,
13923,
4697,
1006,
5164,
2171,
1010,
5164,
12398,
10175,
5657,
1010,
5527,
19496,
2102,
4539,
19496,
2102,
1007,
1063,
3653,
8663,
20562,
2015,
1012,
14148,
12259,
1006,
3475,
4140,
28522,
8950,
1006,
2171,
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... |
alibaba/canal | client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/common/MutablePropertySources.java | MutablePropertySources.remove | public PropertySource<?> remove(String name) {
if (logger.isDebugEnabled()) {
logger.debug("Removing PropertySource '" + name + "'");
}
int index = this.propertySourceList.indexOf(PropertySource.named(name));
return (index != -1 ? this.propertySourceList.remove(index) : null)... | java | public PropertySource<?> remove(String name) {
if (logger.isDebugEnabled()) {
logger.debug("Removing PropertySource '" + name + "'");
}
int index = this.propertySourceList.indexOf(PropertySource.named(name));
return (index != -1 ? this.propertySourceList.remove(index) : null)... | [
"public",
"PropertySource",
"<",
"?",
">",
"remove",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"logger",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Removing PropertySource '\"",
"+",
"name",
"+",
"\"'\"",
")",
";",
"}",
... | Remove and return the property source with the given name, {@code null} if
not found.
@param name the name of the property source to find and remove | [
"Remove",
"and",
"return",
"the",
"property",
"source",
"with",
"the",
"given",
"name",
"{",
"@code",
"null",
"}",
"if",
"not",
"found",
"."
] | 8f088cddc0755f4350c5aaae95c6e4002d90a40f | https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/common/MutablePropertySources.java#L143-L149 | train | Removes a property source from the list. | [
30522,
2270,
3200,
6499,
3126,
3401,
1026,
1029,
1028,
6366,
1006,
5164,
2171,
1007,
1063,
2065,
1006,
8833,
4590,
1012,
2003,
3207,
8569,
6914,
3085,
2094,
1006,
1007,
1007,
1063,
8833,
4590,
1012,
2139,
8569,
2290,
1006,
1000,
9268,
320... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-java/src/main/java/org/apache/flink/api/java/operators/TwoInputUdfOperator.java | TwoInputUdfOperator.returns | public O returns(Class<OUT> typeClass) {
requireNonNull(typeClass, "type class must not be null");
try {
return returns(TypeInformation.of(typeClass));
}
catch (InvalidTypesException e) {
throw new InvalidTypesException("Cannot infer the type information from the class alone." +
"This is most likely... | java | public O returns(Class<OUT> typeClass) {
requireNonNull(typeClass, "type class must not be null");
try {
return returns(TypeInformation.of(typeClass));
}
catch (InvalidTypesException e) {
throw new InvalidTypesException("Cannot infer the type information from the class alone." +
"This is most likely... | [
"public",
"O",
"returns",
"(",
"Class",
"<",
"OUT",
">",
"typeClass",
")",
"{",
"requireNonNull",
"(",
"typeClass",
",",
"\"type class must not be null\"",
")",
";",
"try",
"{",
"return",
"returns",
"(",
"TypeInformation",
".",
"of",
"(",
"typeClass",
")",
"... | Adds a type information hint about the return type of this operator. This method
can be used in cases where Flink cannot determine automatically what the produced
type of a function is. That can be the case if the function uses generic type variables
in the return type that cannot be inferred from the input type.
<p>C... | [
"Adds",
"a",
"type",
"information",
"hint",
"about",
"the",
"return",
"type",
"of",
"this",
"operator",
".",
"This",
"method",
"can",
"be",
"used",
"in",
"cases",
"where",
"Flink",
"cannot",
"determine",
"automatically",
"what",
"the",
"produced",
"type",
"o... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/TwoInputUdfOperator.java#L267-L278 | train | Returns the object of the given type class. | [
30522,
2270,
1051,
5651,
1006,
2465,
1026,
2041,
1028,
2828,
26266,
1007,
1063,
5478,
8540,
11231,
3363,
1006,
2828,
26266,
1010,
1000,
2828,
2465,
2442,
2025,
2022,
19701,
1000,
1007,
1025,
3046,
1063,
2709,
5651,
1006,
2828,
2378,
14192,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-core/src/main/java/org/apache/flink/configuration/Configuration.java | Configuration.getBoolean | @PublicEvolving
public boolean getBoolean(ConfigOption<Boolean> configOption) {
Object o = getValueOrDefaultFromOption(configOption);
return convertToBoolean(o);
} | java | @PublicEvolving
public boolean getBoolean(ConfigOption<Boolean> configOption) {
Object o = getValueOrDefaultFromOption(configOption);
return convertToBoolean(o);
} | [
"@",
"PublicEvolving",
"public",
"boolean",
"getBoolean",
"(",
"ConfigOption",
"<",
"Boolean",
">",
"configOption",
")",
"{",
"Object",
"o",
"=",
"getValueOrDefaultFromOption",
"(",
"configOption",
")",
";",
"return",
"convertToBoolean",
"(",
"o",
")",
";",
"}"
... | Returns the value associated with the given config option as a boolean.
@param configOption The configuration option
@return the (default) value associated with the given config option | [
"Returns",
"the",
"value",
"associated",
"with",
"the",
"given",
"config",
"option",
"as",
"a",
"boolean",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L367-L371 | train | Returns the value mapped by the given config option as a boolean. | [
30522,
1030,
2270,
6777,
4747,
6455,
2270,
22017,
20898,
2131,
5092,
9890,
2319,
1006,
9530,
8873,
3995,
16790,
1026,
22017,
20898,
1028,
9530,
8873,
3995,
16790,
1007,
1063,
4874,
1051,
1027,
2131,
10175,
5657,
8551,
12879,
23505,
19699,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-db/src/main/java/cn/hutool/db/Entity.java | Entity.parse | public static <T> Entity parse(T bean, boolean isToUnderlineCase, boolean ignoreNullValue) {
return create(null).parseBean(bean, isToUnderlineCase, ignoreNullValue);
} | java | public static <T> Entity parse(T bean, boolean isToUnderlineCase, boolean ignoreNullValue) {
return create(null).parseBean(bean, isToUnderlineCase, ignoreNullValue);
} | [
"public",
"static",
"<",
"T",
">",
"Entity",
"parse",
"(",
"T",
"bean",
",",
"boolean",
"isToUnderlineCase",
",",
"boolean",
"ignoreNullValue",
")",
"{",
"return",
"create",
"(",
"null",
")",
".",
"parseBean",
"(",
"bean",
",",
"isToUnderlineCase",
",",
"i... | 将PO对象转为Entity
@param <T> Bean对象类型
@param bean Bean对象
@param isToUnderlineCase 是否转换为下划线模式
@param ignoreNullValue 是否忽略值为空的字段
@return Entity | [
"将PO对象转为Entity"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/Entity.java#L74-L76 | train | Parse a bean into an Entity object. | [
30522,
2270,
10763,
1026,
1056,
1028,
9178,
11968,
3366,
1006,
1056,
14068,
1010,
22017,
20898,
21541,
28819,
2121,
4179,
18382,
1010,
22017,
20898,
8568,
11231,
3363,
10175,
5657,
1007,
1063,
2709,
3443,
1006,
19701,
1007,
1012,
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... |
netty/netty | transport-native-unix-common/src/main/java/io/netty/channel/unix/FileDescriptor.java | FileDescriptor.close | public void close() throws IOException {
for (;;) {
int state = this.state;
if (isClosed(state)) {
return;
}
// Once a close operation happens, the channel is considered shutdown.
if (casState(state, state | STATE_ALL_MASK)) {
... | java | public void close() throws IOException {
for (;;) {
int state = this.state;
if (isClosed(state)) {
return;
}
// Once a close operation happens, the channel is considered shutdown.
if (casState(state, state | STATE_ALL_MASK)) {
... | [
"public",
"void",
"close",
"(",
")",
"throws",
"IOException",
"{",
"for",
"(",
";",
";",
")",
"{",
"int",
"state",
"=",
"this",
".",
"state",
";",
"if",
"(",
"isClosed",
"(",
"state",
")",
")",
"{",
"return",
";",
"}",
"// Once a close operation happen... | Close the file descriptor. | [
"Close",
"the",
"file",
"descriptor",
"."
] | ba06eafa1c1824bd154f1a380019e7ea2edf3c4c | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport-native-unix-common/src/main/java/io/netty/channel/unix/FileDescriptor.java#L100-L115 | train | Close the underlying file descriptor. | [
30522,
2270,
11675,
2485,
1006,
1007,
11618,
22834,
10288,
24422,
1063,
2005,
1006,
1025,
1025,
1007,
1063,
20014,
2110,
1027,
2023,
1012,
2110,
1025,
2065,
1006,
2003,
20464,
24768,
1006,
2110,
1007,
1007,
1063,
2709,
1025,
1065,
1013,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-cron/src/main/java/cn/hutool/cron/TaskTable.java | TaskTable.executeTaskIfMatch | public void executeTaskIfMatch(long millis) {
final Lock readLock = lock.readLock();
try {
readLock.lock();
executeTaskIfMatchInternal(millis);
} finally {
readLock.unlock();
}
} | java | public void executeTaskIfMatch(long millis) {
final Lock readLock = lock.readLock();
try {
readLock.lock();
executeTaskIfMatchInternal(millis);
} finally {
readLock.unlock();
}
} | [
"public",
"void",
"executeTaskIfMatch",
"(",
"long",
"millis",
")",
"{",
"final",
"Lock",
"readLock",
"=",
"lock",
".",
"readLock",
"(",
")",
";",
"try",
"{",
"readLock",
".",
"lock",
"(",
")",
";",
"executeTaskIfMatchInternal",
"(",
"millis",
")",
";",
... | 如果时间匹配则执行相应的Task,带读锁
@param millis 时间毫秒 | [
"如果时间匹配则执行相应的Task,带读锁"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-cron/src/main/java/cn/hutool/cron/TaskTable.java#L200-L208 | train | Executes a task if the specified time has passed. | [
30522,
2270,
11675,
15389,
10230,
3211,
16715,
4017,
2818,
1006,
2146,
4971,
2483,
1007,
1063,
2345,
5843,
3191,
7878,
1027,
5843,
1012,
3191,
7878,
1006,
1007,
1025,
3046,
1063,
3191,
7878,
1012,
5843,
1006,
1007,
1025,
15389,
10230,
3211,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-db/src/main/java/cn/hutool/db/StatementUtil.java | StatementUtil.fillParams | public static PreparedStatement fillParams(PreparedStatement ps, Collection<Object> params) throws SQLException {
return fillParams(ps, params.toArray(new Object[params.size()]));
} | java | public static PreparedStatement fillParams(PreparedStatement ps, Collection<Object> params) throws SQLException {
return fillParams(ps, params.toArray(new Object[params.size()]));
} | [
"public",
"static",
"PreparedStatement",
"fillParams",
"(",
"PreparedStatement",
"ps",
",",
"Collection",
"<",
"Object",
">",
"params",
")",
"throws",
"SQLException",
"{",
"return",
"fillParams",
"(",
"ps",
",",
"params",
".",
"toArray",
"(",
"new",
"Object",
... | 填充SQL的参数。
@param ps PreparedStatement
@param params SQL参数
@return {@link PreparedStatement}
@throws SQLException SQL执行异常 | [
"填充SQL的参数。"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/StatementUtil.java#L40-L42 | train | Fill the given PreparedStatement with the values of the given Collection of objects. | [
30522,
2270,
10763,
4810,
9153,
18532,
4765,
6039,
28689,
5244,
1006,
4810,
9153,
18532,
4765,
8827,
1010,
3074,
1026,
4874,
1028,
11498,
5244,
1007,
11618,
29296,
10288,
24422,
1063,
2709,
6039,
28689,
5244,
1006,
8827,
1010,
11498,
5244,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java | AbstractAsymmetricCrypto.decrypt | public byte[] decrypt(String data, KeyType keyType) {
return decrypt(SecureUtil.decode(data), keyType);
} | java | public byte[] decrypt(String data, KeyType keyType) {
return decrypt(SecureUtil.decode(data), keyType);
} | [
"public",
"byte",
"[",
"]",
"decrypt",
"(",
"String",
"data",
",",
"KeyType",
"keyType",
")",
"{",
"return",
"decrypt",
"(",
"SecureUtil",
".",
"decode",
"(",
"data",
")",
",",
"keyType",
")",
";",
"}"
] | 从Hex或Base64字符串解密,编码为UTF-8格式
@param data Hex(16进制)或Base64字符串
@param keyType 私钥或公钥 {@link KeyType}
@return 解密后的bytes
@since 4.5.2 | [
"从Hex或Base64字符串解密,编码为UTF",
"-",
"8格式"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java#L246-L248 | train | Decrypt a string of bytes. | [
30522,
2270,
24880,
1031,
1033,
11703,
2854,
13876,
1006,
5164,
2951,
1010,
3145,
13874,
3145,
13874,
1007,
1063,
2709,
11703,
2854,
13876,
1006,
5851,
21823,
2140,
1012,
21933,
3207,
1006,
2951,
1007,
1010,
3145,
13874,
1007,
1025,
1065,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SeleniumHQ/selenium | java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java | ExpectedConditions.attributeContains | public static ExpectedCondition<Boolean> attributeContains(final WebElement element,
final String attribute,
final String value) {
return new ExpectedCondition<Boolean>() {
private String ... | java | public static ExpectedCondition<Boolean> attributeContains(final WebElement element,
final String attribute,
final String value) {
return new ExpectedCondition<Boolean>() {
private String ... | [
"public",
"static",
"ExpectedCondition",
"<",
"Boolean",
">",
"attributeContains",
"(",
"final",
"WebElement",
"element",
",",
"final",
"String",
"attribute",
",",
"final",
"String",
"value",
")",
"{",
"return",
"new",
"ExpectedCondition",
"<",
"Boolean",
">",
"... | An expectation for checking WebElement with given locator has attribute which contains specific
value
@param element used to check its parameters
@param attribute used to define css or html attribute
@param value used as expected attribute value
@return Boolean true when element has css or html attribute which c... | [
"An",
"expectation",
"for",
"checking",
"WebElement",
"with",
"given",
"locator",
"has",
"attribute",
"which",
"contains",
"specific",
"value"
] | 7af172729f17b20269c8ca4ea6f788db48616535 | https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java#L1076-L1094 | train | An expectation for checking WebElement that has attribute contains value | [
30522,
2270,
10763,
3517,
8663,
20562,
1026,
22017,
20898,
1028,
17961,
8663,
18249,
2015,
1006,
2345,
4773,
12260,
3672,
5783,
1010,
2345,
5164,
17961,
1010,
2345,
5164,
3643,
1007,
1063,
2709,
2047,
3517,
8663,
20562,
1026,
22017,
20898,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/HpackEncoder.java | HpackEncoder.encodeHeaders | public void encodeHeaders(int streamId, ByteBuf out, Http2Headers headers, SensitivityDetector sensitivityDetector)
throws Http2Exception {
if (ignoreMaxHeaderListSize) {
encodeHeadersIgnoreMaxHeaderListSize(out, headers, sensitivityDetector);
} else {
encodeHeadersEn... | java | public void encodeHeaders(int streamId, ByteBuf out, Http2Headers headers, SensitivityDetector sensitivityDetector)
throws Http2Exception {
if (ignoreMaxHeaderListSize) {
encodeHeadersIgnoreMaxHeaderListSize(out, headers, sensitivityDetector);
} else {
encodeHeadersEn... | [
"public",
"void",
"encodeHeaders",
"(",
"int",
"streamId",
",",
"ByteBuf",
"out",
",",
"Http2Headers",
"headers",
",",
"SensitivityDetector",
"sensitivityDetector",
")",
"throws",
"Http2Exception",
"{",
"if",
"(",
"ignoreMaxHeaderListSize",
")",
"{",
"encodeHeadersIgn... | Encode the header field into the header block.
<strong>The given {@link CharSequence}s must be immutable!</strong> | [
"Encode",
"the",
"header",
"field",
"into",
"the",
"header",
"block",
"."
] | ba06eafa1c1824bd154f1a380019e7ea2edf3c4c | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/HpackEncoder.java#L101-L108 | train | Encode headers. | [
30522,
2270,
11675,
4372,
16044,
4974,
2545,
1006,
20014,
5460,
3593,
1010,
24880,
8569,
2546,
2041,
1010,
8299,
2475,
4974,
2545,
20346,
2015,
1010,
14639,
3207,
26557,
4263,
14639,
3207,
26557,
4263,
1007,
11618,
8299,
2475,
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... |
netty/netty | handler/src/main/java/io/netty/handler/ssl/SslHandler.java | SslHandler.wrapNonAppData | private boolean wrapNonAppData(ChannelHandlerContext ctx, boolean inUnwrap) throws SSLException {
ByteBuf out = null;
ByteBufAllocator alloc = ctx.alloc();
try {
// Only continue to loop if the handler was not removed in the meantime.
// See https://github.com/netty/netty... | java | private boolean wrapNonAppData(ChannelHandlerContext ctx, boolean inUnwrap) throws SSLException {
ByteBuf out = null;
ByteBufAllocator alloc = ctx.alloc();
try {
// Only continue to loop if the handler was not removed in the meantime.
// See https://github.com/netty/netty... | [
"private",
"boolean",
"wrapNonAppData",
"(",
"ChannelHandlerContext",
"ctx",
",",
"boolean",
"inUnwrap",
")",
"throws",
"SSLException",
"{",
"ByteBuf",
"out",
"=",
"null",
";",
"ByteBufAllocator",
"alloc",
"=",
"ctx",
".",
"alloc",
"(",
")",
";",
"try",
"{",
... | This method will not call
{@link #setHandshakeFailure(ChannelHandlerContext, Throwable, boolean, boolean, boolean)} or
{@link #setHandshakeFailure(ChannelHandlerContext, Throwable)}.
@return {@code true} if this method ends on {@link SSLEngineResult.HandshakeStatus#NOT_HANDSHAKING}. | [
"This",
"method",
"will",
"not",
"call",
"{"
] | ba06eafa1c1824bd154f1a380019e7ea2edf3c4c | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslHandler.java#L933-L1010 | train | Wrap non - application data. | [
30522,
2797,
22017,
20898,
10236,
8540,
29098,
2850,
2696,
1006,
3149,
11774,
3917,
8663,
18209,
14931,
2595,
1010,
22017,
20898,
1999,
4609,
13088,
9331,
1007,
11618,
7020,
2571,
2595,
24422,
1063,
24880,
8569,
2546,
2041,
1027,
19701,
1025,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/SinkContextUtil.java | SinkContextUtil.forTimestamp | public static <T> SinkFunction.Context<T> forTimestamp(long timestamp) {
return new SinkFunction.Context<T>() {
@Override
public long currentProcessingTime() {
throw new RuntimeException("Not implemented");
}
@Override
public long currentWatermark() {
throw new RuntimeException("Not implemente... | java | public static <T> SinkFunction.Context<T> forTimestamp(long timestamp) {
return new SinkFunction.Context<T>() {
@Override
public long currentProcessingTime() {
throw new RuntimeException("Not implemented");
}
@Override
public long currentWatermark() {
throw new RuntimeException("Not implemente... | [
"public",
"static",
"<",
"T",
">",
"SinkFunction",
".",
"Context",
"<",
"T",
">",
"forTimestamp",
"(",
"long",
"timestamp",
")",
"{",
"return",
"new",
"SinkFunction",
".",
"Context",
"<",
"T",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"long",
"cur... | Creates a {@link SinkFunction.Context} that
throws an exception when trying to access the current watermark or processing time. | [
"Creates",
"a",
"{"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/SinkContextUtil.java#L33-L50 | train | Returns a SinkFunction. Context that is a copy of the given timestamp. | [
30522,
2270,
10763,
1026,
1056,
1028,
7752,
11263,
27989,
1012,
6123,
1026,
1056,
1028,
3481,
14428,
9153,
8737,
1006,
2146,
2335,
15464,
2361,
1007,
1063,
2709,
2047,
7752,
11263,
27989,
1012,
6123,
1026,
1056,
1028,
1006,
1007,
1063,
1030... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-java/src/main/java/org/apache/flink/api/java/DataSet.java | DataSet.joinWithHuge | public <R> JoinOperatorSets<T, R> joinWithHuge(DataSet<R> other) {
return new JoinOperatorSets<>(this, other, JoinHint.BROADCAST_HASH_FIRST);
} | java | public <R> JoinOperatorSets<T, R> joinWithHuge(DataSet<R> other) {
return new JoinOperatorSets<>(this, other, JoinHint.BROADCAST_HASH_FIRST);
} | [
"public",
"<",
"R",
">",
"JoinOperatorSets",
"<",
"T",
",",
"R",
">",
"joinWithHuge",
"(",
"DataSet",
"<",
"R",
">",
"other",
")",
"{",
"return",
"new",
"JoinOperatorSets",
"<>",
"(",
"this",
",",
"other",
",",
"JoinHint",
".",
"BROADCAST_HASH_FIRST",
")... | Initiates a Join transformation.
<p>A Join transformation joins the elements of two
{@link DataSet DataSets} on key equality and provides multiple ways to combine
joining elements into one DataSet.
<p>This method also gives the hint to the optimizer that the second DataSet to join is much
larger than the first one.
... | [
"Initiates",
"a",
"Join",
"transformation",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L820-L822 | train | Joins this DataSet with the given DataSet. | [
30522,
2270,
1026,
1054,
1028,
3693,
25918,
18926,
8454,
1026,
1056,
1010,
1054,
1028,
3693,
24415,
6979,
3351,
1006,
2951,
13462,
1026,
1054,
1028,
2060,
1007,
1063,
2709,
2047,
3693,
25918,
18926,
8454,
1026,
1028,
1006,
2023,
1010,
2060,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-core/src/main/java/org/apache/flink/core/memory/MemorySegment.java | MemorySegment.compare | public final int compare(MemorySegment seg2, int offset1, int offset2, int len) {
while (len >= 8) {
long l1 = this.getLongBigEndian(offset1);
long l2 = seg2.getLongBigEndian(offset2);
if (l1 != l2) {
return (l1 < l2) ^ (l1 < 0) ^ (l2 < 0) ? -1 : 1;
}
offset1 += 8;
offset2 += 8;
len -= 8;
... | java | public final int compare(MemorySegment seg2, int offset1, int offset2, int len) {
while (len >= 8) {
long l1 = this.getLongBigEndian(offset1);
long l2 = seg2.getLongBigEndian(offset2);
if (l1 != l2) {
return (l1 < l2) ^ (l1 < 0) ^ (l2 < 0) ? -1 : 1;
}
offset1 += 8;
offset2 += 8;
len -= 8;
... | [
"public",
"final",
"int",
"compare",
"(",
"MemorySegment",
"seg2",
",",
"int",
"offset1",
",",
"int",
"offset2",
",",
"int",
"len",
")",
"{",
"while",
"(",
"len",
">=",
"8",
")",
"{",
"long",
"l1",
"=",
"this",
".",
"getLongBigEndian",
"(",
"offset1",
... | Compares two memory segment regions.
@param seg2 Segment to compare this segment with
@param offset1 Offset of this segment to start comparing
@param offset2 Offset of seg2 to start comparing
@param len Length of the compared memory region
@return 0 if equal, -1 if seg1 < seg2, 1 otherwise | [
"Compares",
"two",
"memory",
"segment",
"regions",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/memory/MemorySegment.java#L1331-L1356 | train | Compare two memory segments. | [
30522,
2270,
2345,
20014,
12826,
1006,
3638,
3366,
21693,
4765,
7367,
2290,
2475,
1010,
20014,
16396,
2487,
1010,
20014,
16396,
2475,
30524,
2475,
1012,
2131,
10052,
5638,
6914,
11692,
1006,
16396,
2475,
1007,
1025,
2065,
1006,
1048,
2487,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/zookeeper/ZooKeeperStateHandleStore.java | ZooKeeperStateHandleStore.release | public void release(String pathInZooKeeper) throws Exception {
final String path = normalizePath(pathInZooKeeper);
try {
client.delete().forPath(getLockPath(path));
} catch (KeeperException.NoNodeException ignored) {
// we have never locked this node
} catch (Exception e) {
throw new Exception("Could ... | java | public void release(String pathInZooKeeper) throws Exception {
final String path = normalizePath(pathInZooKeeper);
try {
client.delete().forPath(getLockPath(path));
} catch (KeeperException.NoNodeException ignored) {
// we have never locked this node
} catch (Exception e) {
throw new Exception("Could ... | [
"public",
"void",
"release",
"(",
"String",
"pathInZooKeeper",
")",
"throws",
"Exception",
"{",
"final",
"String",
"path",
"=",
"normalizePath",
"(",
"pathInZooKeeper",
")",
";",
"try",
"{",
"client",
".",
"delete",
"(",
")",
".",
"forPath",
"(",
"getLockPat... | Releases the lock from the node under the given ZooKeeper path. If no lock exists, then nothing happens.
@param pathInZooKeeper Path describing the ZooKeeper node
@throws Exception if the delete operation of the lock node fails | [
"Releases",
"the",
"lock",
"from",
"the",
"node",
"under",
"the",
"given",
"ZooKeeper",
"path",
".",
"If",
"no",
"lock",
"exists",
"then",
"nothing",
"happens",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperStateHandleStore.java#L393-L403 | train | Release the lock on the given path in ZooKeeper. | [
30522,
2270,
11675,
2713,
1006,
5164,
4130,
2378,
23221,
13106,
1007,
11618,
6453,
1063,
2345,
5164,
4130,
1027,
3671,
4697,
15069,
1006,
4130,
2378,
23221,
13106,
1007,
1025,
3046,
1063,
7396,
1012,
3972,
12870,
1006,
1007,
1012,
2005,
150... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-db/src/main/java/cn/hutool/db/SqlConnRunner.java | SqlConnRunner.page | public PageResult<Entity> page(Connection conn, Entity where, Page page) throws SQLException {
return this.page(conn, null, where, page);
} | java | public PageResult<Entity> page(Connection conn, Entity where, Page page) throws SQLException {
return this.page(conn, null, where, page);
} | [
"public",
"PageResult",
"<",
"Entity",
">",
"page",
"(",
"Connection",
"conn",
",",
"Entity",
"where",
",",
"Page",
"page",
")",
"throws",
"SQLException",
"{",
"return",
"this",
".",
"page",
"(",
"conn",
",",
"null",
",",
"where",
",",
"page",
")",
";"... | 分页全字段查询<br>
此方法不会关闭Connection
@param conn 数据库连接对象
@param where 条件实体类(包含表名)
@param page 分页对象
@return 结果对象
@throws SQLException SQL执行异常 | [
"分页全字段查询<br",
">",
"此方法不会关闭Connection"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/SqlConnRunner.java#L554-L556 | train | Retrieves a page of entities from a database connection. | [
30522,
2270,
3931,
6072,
11314,
1026,
9178,
1028,
3931,
1006,
4434,
9530,
2078,
1010,
9178,
2073,
1010,
3931,
3931,
1007,
11618,
29296,
10288,
24422,
1063,
2709,
2023,
1012,
3931,
1006,
9530,
2078,
1010,
19701,
1010,
2073,
1010,
3931,
1007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
redisson/redisson | redisson/src/main/java/org/redisson/api/CronSchedule.java | CronSchedule.monthlyOnDayAndHourAndMinute | public static CronSchedule monthlyOnDayAndHourAndMinute(int dayOfMonth, int hour, int minute) {
String expression = String.format("0 %d %d %d * ?", minute, hour, dayOfMonth);
return of(expression);
} | java | public static CronSchedule monthlyOnDayAndHourAndMinute(int dayOfMonth, int hour, int minute) {
String expression = String.format("0 %d %d %d * ?", minute, hour, dayOfMonth);
return of(expression);
} | [
"public",
"static",
"CronSchedule",
"monthlyOnDayAndHourAndMinute",
"(",
"int",
"dayOfMonth",
",",
"int",
"hour",
",",
"int",
"minute",
")",
"{",
"String",
"expression",
"=",
"String",
".",
"format",
"(",
"\"0 %d %d %d * ?\"",
",",
"minute",
",",
"hour",
",",
... | Creates cron expression which schedule task execution
every given day of the month at the given time
@param hour of schedule
@param minute of schedule
@param dayOfMonth of schedule
@return object | [
"Creates",
"cron",
"expression",
"which",
"schedule",
"task",
"execution",
"every",
"given",
"day",
"of",
"the",
"month",
"at",
"the",
"given",
"time"
] | d3acc0249b2d5d658d36d99e2c808ce49332ea44 | https://github.com/redisson/redisson/blob/d3acc0249b2d5d658d36d99e2c808ce49332ea44/redisson/src/main/java/org/redisson/api/CronSchedule.java#L97-L100 | train | Gets the CronSchedule for a monthly on day. | [
30522,
2270,
10763,
13675,
5644,
7690,
9307,
7058,
29067,
7054,
16425,
8162,
5685,
10020,
10421,
1006,
20014,
2154,
11253,
9629,
2232,
1010,
20014,
3178,
1010,
20014,
3371,
1007,
1063,
5164,
3670,
1027,
5164,
1012,
4289,
1006,
1000,
1014,
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/DefaultChannelConfig.java | DefaultChannelConfig.setMaxMessagesPerRead | @Override
@Deprecated
public ChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead) {
try {
MaxMessagesRecvByteBufAllocator allocator = getRecvByteBufAllocator();
allocator.maxMessagesPerRead(maxMessagesPerRead);
return this;
} catch (ClassCastException e... | java | @Override
@Deprecated
public ChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead) {
try {
MaxMessagesRecvByteBufAllocator allocator = getRecvByteBufAllocator();
allocator.maxMessagesPerRead(maxMessagesPerRead);
return this;
} catch (ClassCastException e... | [
"@",
"Override",
"@",
"Deprecated",
"public",
"ChannelConfig",
"setMaxMessagesPerRead",
"(",
"int",
"maxMessagesPerRead",
")",
"{",
"try",
"{",
"MaxMessagesRecvByteBufAllocator",
"allocator",
"=",
"getRecvByteBufAllocator",
"(",
")",
";",
"allocator",
".",
"maxMessagesP... | {@inheritDoc}
<p>
@throws IllegalStateException if {@link #getRecvByteBufAllocator()} does not return an object of type
{@link MaxMessagesRecvByteBufAllocator}. | [
"{"
] | ba06eafa1c1824bd154f1a380019e7ea2edf3c4c | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/channel/DefaultChannelConfig.java#L243-L254 | train | Sets the maxMessagesPerRead property. | [
30522,
1030,
2058,
15637,
1030,
2139,
28139,
12921,
2270,
3149,
8663,
8873,
2290,
2275,
17848,
7834,
3736,
8449,
4842,
16416,
2094,
1006,
20014,
4098,
7834,
3736,
8449,
4842,
16416,
2094,
1007,
1063,
3046,
1063,
4098,
7834,
3736,
8449,
2890... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java | AbstractAsymmetricCrypto.decryptStrFromBcd | public String decryptStrFromBcd(String data, KeyType keyType, Charset charset) {
return StrUtil.str(decryptFromBcd(data, keyType, charset), charset);
} | java | public String decryptStrFromBcd(String data, KeyType keyType, Charset charset) {
return StrUtil.str(decryptFromBcd(data, keyType, charset), charset);
} | [
"public",
"String",
"decryptStrFromBcd",
"(",
"String",
"data",
",",
"KeyType",
"keyType",
",",
"Charset",
"charset",
")",
"{",
"return",
"StrUtil",
".",
"str",
"(",
"decryptFromBcd",
"(",
"data",
",",
"keyType",
",",
"charset",
")",
",",
"charset",
")",
"... | 解密为字符串,密文需为BCD格式
@param data 数据,BCD格式
@param keyType 密钥类型
@param charset 加密前编码
@return 解密后的密文
@since 4.5.2 | [
"解密为字符串,密文需为BCD格式"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java#L310-L312 | train | Decrypt a String using BCD. | [
30522,
2270,
5164,
11703,
2854,
22798,
16344,
19699,
5358,
9818,
2094,
1006,
5164,
2951,
1010,
3145,
13874,
3145,
13874,
1010,
25869,
13462,
25869,
13462,
1007,
1063,
2709,
2358,
22134,
4014,
1012,
2358,
2099,
1006,
11703,
2854,
13876,
19699,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.getMethodsDirectly | public static Method[] getMethodsDirectly(Class<?> beanClass, boolean withSuperClassMethods) throws SecurityException {
Assert.notNull(beanClass);
Method[] allMethods = null;
Class<?> searchType = beanClass;
Method[] declaredMethods;
while (searchType != null) {
declaredMethods = searchType.getDecl... | java | public static Method[] getMethodsDirectly(Class<?> beanClass, boolean withSuperClassMethods) throws SecurityException {
Assert.notNull(beanClass);
Method[] allMethods = null;
Class<?> searchType = beanClass;
Method[] declaredMethods;
while (searchType != null) {
declaredMethods = searchType.getDecl... | [
"public",
"static",
"Method",
"[",
"]",
"getMethodsDirectly",
"(",
"Class",
"<",
"?",
">",
"beanClass",
",",
"boolean",
"withSuperClassMethods",
")",
"throws",
"SecurityException",
"{",
"Assert",
".",
"notNull",
"(",
"beanClass",
")",
";",
"Method",
"[",
"]",
... | 获得一个类中所有方法列表,直接反射获取,无缓存
@param beanClass 类
@param withSuperClassMethods 是否包括父类的方法列表
@return 方法列表
@throws SecurityException 安全检查异常 | [
"获得一个类中所有方法列表,直接反射获取,无缓存"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L589-L606 | train | Gets the methods directly from the specified class. | [
30522,
2270,
10763,
4118,
1031,
1033,
2131,
11368,
6806,
5104,
4305,
2890,
6593,
2135,
1006,
2465,
1026,
1029,
1028,
14068,
26266,
1010,
22017,
20898,
2007,
6342,
4842,
26266,
11368,
6806,
5104,
1007,
11618,
3036,
10288,
24422,
1063,
20865,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/tokenizer/engine/TokenizerFactory.java | TokenizerFactory.doCreate | private static TokenizerEngine doCreate() {
try {
return new AnsjEngine();
} catch (NoClassDefFoundError e) {
// ignore
}
try {
return new HanLPEngine();
} catch (NoClassDefFoundError e) {
// ignore
}
try {
return new IKAnalyzerEngine();
} catch (NoClassDefFoundError e) {
... | java | private static TokenizerEngine doCreate() {
try {
return new AnsjEngine();
} catch (NoClassDefFoundError e) {
// ignore
}
try {
return new HanLPEngine();
} catch (NoClassDefFoundError e) {
// ignore
}
try {
return new IKAnalyzerEngine();
} catch (NoClassDefFoundError e) {
... | [
"private",
"static",
"TokenizerEngine",
"doCreate",
"(",
")",
"{",
"try",
"{",
"return",
"new",
"AnsjEngine",
"(",
")",
";",
"}",
"catch",
"(",
"NoClassDefFoundError",
"e",
")",
"{",
"// ignore\r",
"}",
"try",
"{",
"return",
"new",
"HanLPEngine",
"(",
")",... | 根据用户引入的分词引擎jar,自动创建对应的分词引擎对象
@return {@link TokenizerEngine} | [
"根据用户引入的分词引擎jar,自动创建对应的分词引擎对象"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/tokenizer/engine/TokenizerFactory.java#L39-L81 | train | Creates a new instance of the TokenizerEngine class. | [
30522,
2797,
10763,
19204,
17629,
13159,
3170,
9986,
29313,
1006,
1007,
1063,
3046,
1063,
2709,
2047,
2019,
2015,
6460,
3070,
3170,
1006,
1007,
1025,
1065,
4608,
1006,
2053,
30524,
2709,
2047,
7658,
14277,
13159,
3170,
1006,
1007,
1025,
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... |
SeleniumHQ/selenium | java/client/src/org/openqa/selenium/logging/SessionLogHandler.java | SessionLogHandler.getSessionLogs | public static Map<String, SessionLogs> getSessionLogs(Map<String, Object> rawSessionMap) {
Map<String, SessionLogs> sessionLogsMap = new HashMap<>();
for (Map.Entry<String, Object> entry : rawSessionMap.entrySet()) {
String sessionId = entry.getKey();
if (!(entry.getValue() instanceof Map)) {
... | java | public static Map<String, SessionLogs> getSessionLogs(Map<String, Object> rawSessionMap) {
Map<String, SessionLogs> sessionLogsMap = new HashMap<>();
for (Map.Entry<String, Object> entry : rawSessionMap.entrySet()) {
String sessionId = entry.getKey();
if (!(entry.getValue() instanceof Map)) {
... | [
"public",
"static",
"Map",
"<",
"String",
",",
"SessionLogs",
">",
"getSessionLogs",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"rawSessionMap",
")",
"{",
"Map",
"<",
"String",
",",
"SessionLogs",
">",
"sessionLogsMap",
"=",
"new",
"HashMap",
"<>",
"("... | Creates a session logs map, with session logs mapped to session IDs, given
a raw session log map as a JSON object.
@param rawSessionMap The raw session map.
@return The session logs mapped to session IDs. | [
"Creates",
"a",
"session",
"logs",
"map",
"with",
"session",
"logs",
"mapped",
"to",
"session",
"IDs",
"given",
"a",
"raw",
"session",
"log",
"map",
"as",
"a",
"JSON",
"object",
"."
] | 7af172729f17b20269c8ca4ea6f788db48616535 | https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/logging/SessionLogHandler.java#L34-L47 | train | Get SessionLogs from rawSessionMap | [
30522,
2270,
10763,
4949,
1026,
5164,
1010,
5219,
21197,
2015,
1028,
4152,
7971,
3258,
21197,
2015,
1006,
4949,
1026,
5164,
1010,
4874,
1028,
6315,
8583,
10992,
2863,
2361,
1007,
1063,
4949,
1026,
5164,
1010,
5219,
21197,
2015,
1028,
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... |
hankcs/HanLP | src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java | DoubleArrayTrie.insert | private int insert(List<Node> siblings, BitSet used)
{
if (error_ < 0)
return 0;
int begin = 0;
int pos = Math.max(siblings.get(0).code + 1, nextCheckPos) - 1;
int nonzero_num = 0;
int first = 0;
if (allocSize <= pos)
resize(pos + 1);
... | java | private int insert(List<Node> siblings, BitSet used)
{
if (error_ < 0)
return 0;
int begin = 0;
int pos = Math.max(siblings.get(0).code + 1, nextCheckPos) - 1;
int nonzero_num = 0;
int first = 0;
if (allocSize <= pos)
resize(pos + 1);
... | [
"private",
"int",
"insert",
"(",
"List",
"<",
"Node",
">",
"siblings",
",",
"BitSet",
"used",
")",
"{",
"if",
"(",
"error_",
"<",
"0",
")",
"return",
"0",
";",
"int",
"begin",
"=",
"0",
";",
"int",
"pos",
"=",
"Math",
".",
"max",
"(",
"siblings",... | 插入节点
@param siblings 等待插入的兄弟节点
@return 插入位置 | [
"插入节点"
] | a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce | https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java#L161-L262 | train | inserts a new entry in the log. | [
30522,
2797,
20014,
19274,
1006,
2862,
1026,
13045,
1028,
9504,
1010,
9017,
3388,
2109,
1007,
1063,
2065,
1006,
7561,
1035,
1026,
1014,
1007,
2709,
1014,
1025,
20014,
4088,
1027,
1014,
1025,
20014,
13433,
2015,
1027,
8785,
1012,
4098,
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-http/src/main/java/cn/hutool/http/HttpResponse.java | HttpResponse.writeBody | public long writeBody(File destFile, StreamProgress streamProgress) {
if (null == destFile) {
throw new NullPointerException("[destFile] is null!");
}
if (destFile.isDirectory()) {
// 从头信息中获取文件名
String fileName = getFileNameFromDisposition();
if (StrUtil.isBlank(fileName)) {
final String p... | java | public long writeBody(File destFile, StreamProgress streamProgress) {
if (null == destFile) {
throw new NullPointerException("[destFile] is null!");
}
if (destFile.isDirectory()) {
// 从头信息中获取文件名
String fileName = getFileNameFromDisposition();
if (StrUtil.isBlank(fileName)) {
final String p... | [
"public",
"long",
"writeBody",
"(",
"File",
"destFile",
",",
"StreamProgress",
"streamProgress",
")",
"{",
"if",
"(",
"null",
"==",
"destFile",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"[destFile] is null!\"",
")",
";",
"}",
"if",
"(",
"destFil... | 将响应内容写出到文件<br>
异步模式下直接读取Http流写出,同步模式下将存储在内存中的响应内容写出<br>
写出后会关闭Http流(异步模式)
@param destFile 写出到的文件
@param streamProgress 进度显示接口,通过实现此接口显示下载进度
@return 写出bytes数
@since 3.3.2 | [
"将响应内容写出到文件<br",
">",
"异步模式下直接读取Http流写出,同步模式下将存储在内存中的响应内容写出<br",
">",
"写出后会关闭Http流(异步模式)"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpResponse.java#L259-L279 | train | Write the body of the request to the specified destination file. | [
30522,
2270,
2146,
4339,
23684,
1006,
30524,
19701,
999,
1000,
1007,
1025,
1065,
2065,
1006,
4078,
24475,
9463,
1012,
2003,
4305,
2890,
16761,
2100,
1006,
1007,
1007,
1063,
1013,
1013,
100,
100,
1767,
100,
1746,
100,
100,
1861,
100,
1795,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.newCachedThreadPool | public static InstrumentedExecutorService newCachedThreadPool(
ThreadFactory threadFactory, MetricRegistry registry, String name) {
return new InstrumentedExecutorService(
Executors.newCachedThreadPool(threadFactory), registry, name);
} | java | public static InstrumentedExecutorService newCachedThreadPool(
ThreadFactory threadFactory, MetricRegistry registry, String name) {
return new InstrumentedExecutorService(
Executors.newCachedThreadPool(threadFactory), registry, name);
} | [
"public",
"static",
"InstrumentedExecutorService",
"newCachedThreadPool",
"(",
"ThreadFactory",
"threadFactory",
",",
"MetricRegistry",
"registry",
",",
"String",
"name",
")",
"{",
"return",
"new",
"InstrumentedExecutorService",
"(",
"Executors",
".",
"newCachedThreadPool",... | Creates an instrumented thread pool that creates new threads as needed, but
will reuse previously constructed threads when they are
available, and uses the provided
ThreadFactory to create new threads when needed.
@param threadFactory the factory to use when creating new threads
@param registry the {@link MetricR... | [
"Creates",
"an",
"instrumented",
"thread",
"pool",
"that",
"creates",
"new",
"threads",
"as",
"needed",
"but",
"will",
"reuse",
"previously",
"constructed",
"threads",
"when",
"they",
"are",
"available",
"and",
"uses",
"the",
"provided",
"ThreadFactory",
"to",
"... | 2a60257c60663684c8f6dc8b5ea3cf184e534db6 | https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/metrics/src/main/java/io/dropwizard/metrics/InstrumentedExecutors.java#L274-L278 | train | Create a new cached thread pool executor service. | [
30522,
2270,
10763,
6602,
14728,
2595,
8586,
16161,
22573,
2099,
7903,
2063,
2047,
3540,
7690,
2705,
16416,
18927,
13669,
1006,
11689,
21450,
11689,
21450,
1010,
12046,
2890,
24063,
2854,
15584,
1010,
5164,
2171,
1007,
1063,
2709,
2047,
6602,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java | ZooKeeperUtils.createLeaderRetrievalService | public static ZooKeeperLeaderRetrievalService createLeaderRetrievalService(
final CuratorFramework client,
final Configuration configuration,
final String pathSuffix) {
String leaderPath = configuration.getString(
HighAvailabilityOptions.HA_ZOOKEEPER_LEADER_PATH) + pathSuffix;
return new ZooKeeperLeaderRe... | java | public static ZooKeeperLeaderRetrievalService createLeaderRetrievalService(
final CuratorFramework client,
final Configuration configuration,
final String pathSuffix) {
String leaderPath = configuration.getString(
HighAvailabilityOptions.HA_ZOOKEEPER_LEADER_PATH) + pathSuffix;
return new ZooKeeperLeaderRe... | [
"public",
"static",
"ZooKeeperLeaderRetrievalService",
"createLeaderRetrievalService",
"(",
"final",
"CuratorFramework",
"client",
",",
"final",
"Configuration",
"configuration",
",",
"final",
"String",
"pathSuffix",
")",
"{",
"String",
"leaderPath",
"=",
"configuration",
... | Creates a {@link ZooKeeperLeaderRetrievalService} instance.
@param client The {@link CuratorFramework} ZooKeeper client to use
@param configuration {@link Configuration} object containing the configuration values
@param pathSuffix The path suffix which we want to append
@return {@link ZooKeeperLeaderRetrieva... | [
"Creates",
"a",
"{",
"@link",
"ZooKeeperLeaderRetrievalService",
"}",
"instance",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java#L185-L193 | train | Create a ZooKeeperLeaderRetrievalService. | [
30522,
2270,
10763,
9201,
13106,
19000,
13465,
7373,
10175,
8043,
7903,
2063,
3443,
19000,
13465,
7373,
10175,
8043,
7903,
2063,
1006,
2345,
13023,
15643,
6198,
7396,
1010,
2345,
9563,
9563,
1010,
2345,
5164,
10425,
16093,
8873,
2595,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java | NumberUtil.isGreater | public static boolean isGreater(BigDecimal bigNum1, BigDecimal bigNum2) {
Assert.notNull(bigNum1);
Assert.notNull(bigNum2);
return bigNum1.compareTo(bigNum2) > 0;
} | java | public static boolean isGreater(BigDecimal bigNum1, BigDecimal bigNum2) {
Assert.notNull(bigNum1);
Assert.notNull(bigNum2);
return bigNum1.compareTo(bigNum2) > 0;
} | [
"public",
"static",
"boolean",
"isGreater",
"(",
"BigDecimal",
"bigNum1",
",",
"BigDecimal",
"bigNum2",
")",
"{",
"Assert",
".",
"notNull",
"(",
"bigNum1",
")",
";",
"Assert",
".",
"notNull",
"(",
"bigNum2",
")",
";",
"return",
"bigNum1",
".",
"compareTo",
... | 比较大小,参数1 > 参数2 返回true
@param bigNum1 数字1
@param bigNum2 数字2
@return 是否大于
@since 3,0.9 | [
"比较大小,参数1",
">",
";",
"参数2",
"返回true"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L1622-L1626 | train | Checks if the first argument is greater than the second argument. | [
30522,
2270,
10763,
22017,
20898,
30524,
19172,
2487,
1010,
2502,
3207,
6895,
9067,
2502,
19172,
2475,
1007,
1063,
20865,
1012,
2025,
11231,
3363,
1006,
2502,
19172,
2487,
1007,
1025,
20865,
1012,
2025,
11231,
3363,
1006,
2502,
19172,
2475,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/util/HandlerUtils.java | HandlerUtils.sendResponse | public static <P extends ResponseBody> CompletableFuture<Void> sendResponse(
ChannelHandlerContext channelHandlerContext,
HttpRequest httpRequest,
P response,
HttpResponseStatus statusCode,
Map<String, String> headers) {
StringWriter sw = new StringWriter();
try {
mapper.writeValue(sw, response);
... | java | public static <P extends ResponseBody> CompletableFuture<Void> sendResponse(
ChannelHandlerContext channelHandlerContext,
HttpRequest httpRequest,
P response,
HttpResponseStatus statusCode,
Map<String, String> headers) {
StringWriter sw = new StringWriter();
try {
mapper.writeValue(sw, response);
... | [
"public",
"static",
"<",
"P",
"extends",
"ResponseBody",
">",
"CompletableFuture",
"<",
"Void",
">",
"sendResponse",
"(",
"ChannelHandlerContext",
"channelHandlerContext",
",",
"HttpRequest",
"httpRequest",
",",
"P",
"response",
",",
"HttpResponseStatus",
"statusCode",
... | Sends the given response and status code to the given channel.
@param channelHandlerContext identifying the open channel
@param httpRequest originating http request
@param response which should be sent
@param statusCode of the message to send
@param headers additional header values
@param <P> type of the response | [
"Sends",
"the",
"given",
"response",
"and",
"status",
"code",
"to",
"the",
"given",
"channel",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/util/HandlerUtils.java#L73-L97 | train | Sends a response to the server. | [
30522,
2270,
10763,
1026,
1052,
8908,
3433,
23684,
1028,
4012,
10814,
10880,
11263,
11244,
1026,
11675,
1028,
4604,
6072,
26029,
3366,
1006,
3149,
11774,
3917,
8663,
18209,
3149,
11774,
3917,
8663,
18209,
1010,
8299,
2890,
15500,
8299,
2890,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
networknt/light-4j | handler/src/main/java/com/networknt/handler/Handler.java | Handler.registerMiddlewareHandler | private static void registerMiddlewareHandler(Object handler) {
if(handler instanceof MiddlewareHandler) {
// register the middleware handler if it is enabled.
if(((MiddlewareHandler) handler).isEnabled()) {
((MiddlewareHandler) handler).register();
}
}
} | java | private static void registerMiddlewareHandler(Object handler) {
if(handler instanceof MiddlewareHandler) {
// register the middleware handler if it is enabled.
if(((MiddlewareHandler) handler).isEnabled()) {
((MiddlewareHandler) handler).register();
}
}
} | [
"private",
"static",
"void",
"registerMiddlewareHandler",
"(",
"Object",
"handler",
")",
"{",
"if",
"(",
"handler",
"instanceof",
"MiddlewareHandler",
")",
"{",
"// register the middleware handler if it is enabled.",
"if",
"(",
"(",
"(",
"MiddlewareHandler",
")",
"handl... | Detect if the handler is a MiddlewareHandler instance. If yes, then register it.
@param handler | [
"Detect",
"if",
"the",
"handler",
"is",
"a",
"MiddlewareHandler",
"instance",
".",
"If",
"yes",
"then",
"register",
"it",
"."
] | 2a60257c60663684c8f6dc8b5ea3cf184e534db6 | https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/handler/src/main/java/com/networknt/handler/Handler.java#L394-L401 | train | Register the middleware handler if it is a MiddlewareHandler. | [
30522,
2797,
10763,
11675,
4236,
4328,
20338,
8059,
11774,
3917,
1006,
4874,
28213,
1007,
1063,
2065,
1006,
28213,
6013,
11253,
2690,
8059,
11774,
3917,
1007,
1063,
1013,
1013,
4236,
1996,
2690,
8059,
28213,
2065,
2009,
2003,
9124,
1012,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java | DateTimeUtils.subtractMonths | public static int subtractMonths(int date0, int date1) {
if (date0 < date1) {
return -subtractMonths(date1, date0);
}
// Start with an estimate.
// Since no month has more than 31 days, the estimate is <= the true value.
int m = (date0 - date1) / 31;
for (;;) {
int date2 = addMonths(date1, m);
if (... | java | public static int subtractMonths(int date0, int date1) {
if (date0 < date1) {
return -subtractMonths(date1, date0);
}
// Start with an estimate.
// Since no month has more than 31 days, the estimate is <= the true value.
int m = (date0 - date1) / 31;
for (;;) {
int date2 = addMonths(date1, m);
if (... | [
"public",
"static",
"int",
"subtractMonths",
"(",
"int",
"date0",
",",
"int",
"date1",
")",
"{",
"if",
"(",
"date0",
"<",
"date1",
")",
"{",
"return",
"-",
"subtractMonths",
"(",
"date1",
",",
"date0",
")",
";",
"}",
"// Start with an estimate.",
"// Since... | Finds the number of months between two dates, each represented as the
number of days since the epoch. | [
"Finds",
"the",
"number",
"of",
"months",
"between",
"two",
"dates",
"each",
"represented",
"as",
"the",
"number",
"of",
"days",
"since",
"the",
"epoch",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java#L1107-L1125 | train | Subtracts the months from the given date. | [
30522,
2270,
10763,
20014,
4942,
6494,
6593,
9629,
7898,
1006,
20014,
3058,
2692,
1010,
20014,
3058,
2487,
1007,
1063,
2065,
1006,
3058,
2692,
1026,
3058,
2487,
1007,
1063,
2709,
1011,
4942,
6494,
6593,
9629,
7898,
1006,
3058,
2487,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java | RoundRobinOperatorStateRepartitioner.initMergeMapList | private List<Map<StreamStateHandle, OperatorStateHandle>> initMergeMapList(List<List<OperatorStateHandle>> parallelSubtaskStates) {
int parallelism = parallelSubtaskStates.size();
final List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList = new ArrayList<>(parallelism);
for (List<OperatorStateHandle>... | java | private List<Map<StreamStateHandle, OperatorStateHandle>> initMergeMapList(List<List<OperatorStateHandle>> parallelSubtaskStates) {
int parallelism = parallelSubtaskStates.size();
final List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList = new ArrayList<>(parallelism);
for (List<OperatorStateHandle>... | [
"private",
"List",
"<",
"Map",
"<",
"StreamStateHandle",
",",
"OperatorStateHandle",
">",
">",
"initMergeMapList",
"(",
"List",
"<",
"List",
"<",
"OperatorStateHandle",
">",
">",
"parallelSubtaskStates",
")",
"{",
"int",
"parallelism",
"=",
"parallelSubtaskStates",
... | Init the the list of StreamStateHandle -> OperatorStateHandle map with given parallelSubtaskStates when parallelism not changed. | [
"Init",
"the",
"the",
"list",
"of",
"StreamStateHandle",
"-",
">",
"OperatorStateHandle",
"map",
"with",
"given",
"parallelSubtaskStates",
"when",
"parallelism",
"not",
"changed",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java#L99-L111 | train | Initializes the merge map list. | [
30522,
2797,
2862,
1026,
4949,
1026,
9199,
12259,
11774,
2571,
1010,
9224,
12259,
11774,
2571,
1028,
1028,
1999,
4183,
5017,
3351,
2863,
24759,
2923,
1006,
2862,
1026,
2862,
1026,
9224,
12259,
11774,
2571,
1028,
1028,
18588,
12083,
10230,
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... |
hankcs/HanLP | src/main/java/com/hankcs/hanlp/utility/TextUtility.java | TextUtility.cint | public static int cint(String str)
{
if (str != null)
try
{
int i = new Integer(str).intValue();
return i;
}
catch (NumberFormatException e)
{
}
return -1;
} | java | public static int cint(String str)
{
if (str != null)
try
{
int i = new Integer(str).intValue();
return i;
}
catch (NumberFormatException e)
{
}
return -1;
} | [
"public",
"static",
"int",
"cint",
"(",
"String",
"str",
")",
"{",
"if",
"(",
"str",
"!=",
"null",
")",
"try",
"{",
"int",
"i",
"=",
"new",
"Integer",
"(",
"str",
")",
".",
"intValue",
"(",
")",
";",
"return",
"i",
";",
"}",
"catch",
"(",
"Numb... | 把表示数字含义的字符串转成整形
@param str 要转换的字符串
@return 如果是有意义的整数,则返回此整数值。否则,返回-1。 | [
"把表示数字含义的字符串转成整形"
] | a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce | https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/utility/TextUtility.java#L133-L147 | train | Get the cint value of a String. | [
30522,
2270,
10763,
20014,
25022,
3372,
1006,
5164,
2358,
2099,
1007,
1063,
2065,
1006,
2358,
2099,
999,
1027,
19701,
1007,
3046,
1063,
20014,
1045,
1027,
2047,
16109,
1006,
2358,
2099,
1007,
1012,
20014,
10175,
5657,
1006,
1007,
1025,
2709... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java | ReflectUtil.newInstance | @SuppressWarnings("unchecked")
public static <T> T newInstance(String clazz) throws UtilException {
try {
return (T) Class.forName(clazz).newInstance();
} catch (Exception e) {
throw new UtilException(e, "Instance class [{}] error!", clazz);
}
} | java | @SuppressWarnings("unchecked")
public static <T> T newInstance(String clazz) throws UtilException {
try {
return (T) Class.forName(clazz).newInstance();
} catch (Exception e) {
throw new UtilException(e, "Instance class [{}] error!", clazz);
}
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"T",
"newInstance",
"(",
"String",
"clazz",
")",
"throws",
"UtilException",
"{",
"try",
"{",
"return",
"(",
"T",
")",
"Class",
".",
"forName",
"(",
"clazz",
")",
".",
... | 实例化对象
@param <T> 对象类型
@param clazz 类名
@return 对象
@throws UtilException 包装各类异常 | [
"实例化对象"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L651-L658 | train | Creates an instance of the specified class. | [
30522,
1030,
16081,
9028,
5582,
2015,
1006,
1000,
4895,
5403,
18141,
1000,
1007,
2270,
10763,
1026,
1056,
1028,
1056,
2047,
7076,
26897,
1006,
5164,
18856,
10936,
2480,
1007,
11618,
21183,
9463,
2595,
24422,
1063,
3046,
1063,
2709,
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... |
networknt/light-4j | client/src/main/java/org/apache/hc/core5/util/copied/ByteArrayBuffer.java | ByteArrayBuffer.ensureCapacity | public void ensureCapacity(final int required) {
if (required <= 0) {
return;
}
final int available = this.array.length - this.len;
if (required > available) {
expand(this.len + required);
}
} | java | public void ensureCapacity(final int required) {
if (required <= 0) {
return;
}
final int available = this.array.length - this.len;
if (required > available) {
expand(this.len + required);
}
} | [
"public",
"void",
"ensureCapacity",
"(",
"final",
"int",
"required",
")",
"{",
"if",
"(",
"required",
"<=",
"0",
")",
"{",
"return",
";",
"}",
"final",
"int",
"available",
"=",
"this",
".",
"array",
".",
"length",
"-",
"this",
".",
"len",
";",
"if",
... | Ensures that the capacity is at least equal to the specified minimum.
If the current capacity is less than the argument, then a new internal
array is allocated with greater capacity. If the {@code required}
argument is non-positive, this method takes no action.
@param required the minimum required capacity.
@sinc... | [
"Ensures",
"that",
"the",
"capacity",
"is",
"at",
"least",
"equal",
"to",
"the",
"specified",
"minimum",
".",
"If",
"the",
"current",
"capacity",
"is",
"less",
"than",
"the",
"argument",
"then",
"a",
"new",
"internal",
"array",
"is",
"allocated",
"with",
"... | 2a60257c60663684c8f6dc8b5ea3cf184e534db6 | https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/org/apache/hc/core5/util/copied/ByteArrayBuffer.java#L230-L238 | train | Ensure that the array is at least the specified capacity. | [
30522,
2270,
11675,
5676,
17695,
6305,
3012,
1006,
2345,
20014,
3223,
1007,
1063,
2065,
1006,
3223,
1026,
1027,
1014,
1007,
1063,
2709,
1025,
1065,
2345,
20014,
2800,
1027,
2023,
1012,
9140,
1012,
3091,
1011,
2023,
1012,
18798,
1025,
2065,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/util/BooleanUtil.java | BooleanUtil.or | public static boolean or(boolean... array) {
if (ArrayUtil.isEmpty(array)) {
throw new IllegalArgumentException("The Array must not be empty !");
}
for (final boolean element : array) {
if (element) {
return true;
}
}
return false;
} | java | public static boolean or(boolean... array) {
if (ArrayUtil.isEmpty(array)) {
throw new IllegalArgumentException("The Array must not be empty !");
}
for (final boolean element : array) {
if (element) {
return true;
}
}
return false;
} | [
"public",
"static",
"boolean",
"or",
"(",
"boolean",
"...",
"array",
")",
"{",
"if",
"(",
"ArrayUtil",
".",
"isEmpty",
"(",
"array",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The Array must not be empty !\"",
")",
";",
"}",
"for",
"(... | 对Boolean数组取或
<pre>
BooleanUtil.or(true, true) = true
BooleanUtil.or(false, false) = false
BooleanUtil.or(true, false) = true
BooleanUtil.or(true, true, false) = true
BooleanUtil.or(true, true, true) = true
BooleanUtil.or(false, false, false) = false
</pre>
@param array {@code Boolean}数组
@... | [
"对Boolean数组取或"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/BooleanUtil.java#L353-L363 | train | Returns true if all elements in the array are true. | [
30522,
2270,
10763,
22017,
20898,
2030,
1006,
22017,
20898,
1012,
1012,
1012,
9140,
1007,
1063,
2065,
1006,
9140,
21823,
2140,
1012,
2003,
6633,
13876,
2100,
1006,
9140,
1007,
1007,
1063,
5466,
2047,
6206,
2906,
22850,
15781,
2595,
24422,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/datastream/PythonDataStream.java | PythonDataStream.write_to_socket | @PublicEvolving
public void write_to_socket(String host, Integer port, SerializationSchema<PyObject> schema) throws IOException {
stream.writeToSocket(host, port, new PythonSerializationSchema(schema));
} | java | @PublicEvolving
public void write_to_socket(String host, Integer port, SerializationSchema<PyObject> schema) throws IOException {
stream.writeToSocket(host, port, new PythonSerializationSchema(schema));
} | [
"@",
"PublicEvolving",
"public",
"void",
"write_to_socket",
"(",
"String",
"host",
",",
"Integer",
"port",
",",
"SerializationSchema",
"<",
"PyObject",
">",
"schema",
")",
"throws",
"IOException",
"{",
"stream",
".",
"writeToSocket",
"(",
"host",
",",
"port",
... | A thin wrapper layer over {@link DataStream#writeToSocket(String, int, org.apache.flink.api.common.serialization.SerializationSchema)}.
@param host host of the socket
@param port port of the socket
@param schema schema for serialization | [
"A",
"thin",
"wrapper",
"layer",
"over",
"{",
"@link",
"DataStream#writeToSocket",
"(",
"String",
"int",
"org",
".",
"apache",
".",
"flink",
".",
"api",
".",
"common",
".",
"serialization",
".",
"SerializationSchema",
")",
"}",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/datastream/PythonDataStream.java#L176-L179 | train | Write to socket. | [
30522,
1030,
2270,
6777,
4747,
6455,
2270,
11675,
4339,
1035,
2000,
1035,
22278,
1006,
5164,
3677,
1010,
16109,
3417,
1010,
7642,
22318,
5403,
2863,
1026,
1052,
7677,
2497,
20614,
1028,
8040,
28433,
1007,
11618,
22834,
10288,
24422,
1063,
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/hbase/src/main/java/com/alibaba/otter/canal/client/adapter/hbase/service/HbaseEtlService.java | HbaseEtlService.createTable | private void createTable() {
try {
// 判断hbase表是否存在,不存在则建表
MappingConfig.HbaseMapping hbaseMapping = config.getHbaseMapping();
if (!hbaseTemplate.tableExists(hbaseMapping.getHbaseTable())) {
hbaseTemplate.createTable(hbaseMapping.getHbaseTable(), hbaseMapping.g... | java | private void createTable() {
try {
// 判断hbase表是否存在,不存在则建表
MappingConfig.HbaseMapping hbaseMapping = config.getHbaseMapping();
if (!hbaseTemplate.tableExists(hbaseMapping.getHbaseTable())) {
hbaseTemplate.createTable(hbaseMapping.getHbaseTable(), hbaseMapping.g... | [
"private",
"void",
"createTable",
"(",
")",
"{",
"try",
"{",
"// 判断hbase表是否存在,不存在则建表",
"MappingConfig",
".",
"HbaseMapping",
"hbaseMapping",
"=",
"config",
".",
"getHbaseMapping",
"(",
")",
";",
"if",
"(",
"!",
"hbaseTemplate",
".",
"tableExists",
"(",
"hbaseMap... | 建表 | [
"建表"
] | 8f088cddc0755f4350c5aaae95c6e4002d90a40f | https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/hbase/src/main/java/com/alibaba/otter/canal/client/adapter/hbase/service/HbaseEtlService.java#L43-L54 | train | create a table if it does not exist | [
30522,
2797,
11675,
3443,
10880,
1006,
1007,
1063,
3046,
1063,
1013,
1013,
100,
100,
1044,
15058,
100,
100,
100,
100,
100,
1989,
1744,
100,
100,
100,
100,
100,
12375,
8663,
8873,
2290,
1012,
1044,
15058,
2863,
14853,
1044,
15058,
2863,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/swing/RobotUtil.java | RobotUtil.keyClick | public static void keyClick(int... keyCodes) {
for (int keyCode : keyCodes) {
robot.keyPress(keyCode);
robot.keyRelease(keyCode);
}
delay();
} | java | public static void keyClick(int... keyCodes) {
for (int keyCode : keyCodes) {
robot.keyPress(keyCode);
robot.keyRelease(keyCode);
}
delay();
} | [
"public",
"static",
"void",
"keyClick",
"(",
"int",
"...",
"keyCodes",
")",
"{",
"for",
"(",
"int",
"keyCode",
":",
"keyCodes",
")",
"{",
"robot",
".",
"keyPress",
"(",
"keyCode",
")",
";",
"robot",
".",
"keyRelease",
"(",
"keyCode",
")",
";",
"}",
"... | 模拟键盘点击<br>
包括键盘的按下和释放
@param keyCodes 按键码列表,见{@link java.awt.event.KeyEvent}
@since 4.5.7 | [
"模拟键盘点击<br",
">",
"包括键盘的按下和释放"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/swing/RobotUtil.java#L98-L104 | train | Handles the key clicks on all the user s input. | [
30522,
2270,
10763,
11675,
3145,
20464,
6799,
1006,
20014,
1012,
1012,
1012,
3145,
23237,
1007,
1063,
2005,
1006,
20014,
3145,
16044,
1024,
3145,
23237,
1007,
1063,
8957,
1012,
3145,
20110,
1006,
3145,
16044,
1007,
1025,
8957,
1012,
3145,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java | AbstractAsymmetricCrypto.decryptStr | public String decryptStr(String data, KeyType keyType) {
return decryptStr(data, keyType, CharsetUtil.CHARSET_UTF_8);
} | java | public String decryptStr(String data, KeyType keyType) {
return decryptStr(data, keyType, CharsetUtil.CHARSET_UTF_8);
} | [
"public",
"String",
"decryptStr",
"(",
"String",
"data",
",",
"KeyType",
"keyType",
")",
"{",
"return",
"decryptStr",
"(",
"data",
",",
"keyType",
",",
"CharsetUtil",
".",
"CHARSET_UTF_8",
")",
";",
"}"
] | 解密为字符串,密文需为Hex(16进制)或Base64字符串
@param data 数据,Hex(16进制)或Base64字符串
@param keyType 密钥类型
@return 解密后的密文
@since 4.5.2 | [
"解密为字符串,密文需为Hex(16进制)或Base64字符串"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java#L271-L273 | train | Decrypt a String using the specified key type. | [
30522,
2270,
5164,
11703,
2854,
22798,
16344,
1006,
5164,
2951,
1010,
3145,
13874,
3145,
13874,
1007,
1063,
2709,
11703,
2854,
22798,
16344,
1006,
2951,
1010,
3145,
13874,
1010,
25869,
13462,
21823,
2140,
1012,
25869,
13462,
1035,
21183,
2546... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.tagged | public MetricName tagged(String... pairs) {
if (pairs == null) {
return this;
}
if (pairs.length % 2 != 0) {
throw new IllegalArgumentException("Argument count must be even");
}
final Map<String, String> add = new HashMap<>();
for (int i = 0; i ... | java | public MetricName tagged(String... pairs) {
if (pairs == null) {
return this;
}
if (pairs.length % 2 != 0) {
throw new IllegalArgumentException("Argument count must be even");
}
final Map<String, String> add = new HashMap<>();
for (int i = 0; i ... | [
"public",
"MetricName",
"tagged",
"(",
"String",
"...",
"pairs",
")",
"{",
"if",
"(",
"pairs",
"==",
"null",
")",
"{",
"return",
"this",
";",
"}",
"if",
"(",
"pairs",
".",
"length",
"%",
"2",
"!=",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentExcep... | Same as {@link #tagged(Map)}, but takes a variadic list
of arguments.
@see #tagged(Map)
@param pairs An even list of strings acting as key-value pairs.
@return A newly created metric name with the specified tags associated
with it. | [
"Same",
"as",
"{",
"@link",
"#tagged",
"(",
"Map",
")",
"}",
"but",
"takes",
"a",
"variadic",
"list",
"of",
"arguments",
"."
] | 2a60257c60663684c8f6dc8b5ea3cf184e534db6 | https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/metrics/src/main/java/io/dropwizard/metrics/MetricName.java#L119-L135 | train | Get a tagged name with the specified tag pairs. | [
30522,
2270,
12046,
18442,
26610,
1006,
5164,
1012,
1012,
1012,
7689,
1007,
1063,
2065,
1006,
7689,
1027,
1027,
19701,
1007,
1063,
2709,
2023,
1025,
1065,
2065,
1006,
7689,
1012,
3091,
1003,
1016,
999,
1027,
1014,
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... |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/text/Simhash.java | Simhash.store | public void store(Long simhash) {
final int fracCount = this.fracCount;
final List<Map<String, List<Long>>> storage = this.storage;
final List<String> lFrac = splitSimhash(simhash);
String frac;
Map<String, List<Long>> fracMap;
final WriteLock writeLock = this.lock.writeLock();
writeLock.lock()... | java | public void store(Long simhash) {
final int fracCount = this.fracCount;
final List<Map<String, List<Long>>> storage = this.storage;
final List<String> lFrac = splitSimhash(simhash);
String frac;
Map<String, List<Long>> fracMap;
final WriteLock writeLock = this.lock.writeLock();
writeLock.lock()... | [
"public",
"void",
"store",
"(",
"Long",
"simhash",
")",
"{",
"final",
"int",
"fracCount",
"=",
"this",
".",
"fracCount",
";",
"final",
"List",
"<",
"Map",
"<",
"String",
",",
"List",
"<",
"Long",
">",
">",
">",
"storage",
"=",
"this",
".",
"storage",... | 按照(frac, <simhash, content>)索引进行存储
@param simhash Simhash值 | [
"按照",
"(",
"frac",
"<simhash",
"content",
">",
")",
"索引进行存储"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/text/Simhash.java#L133-L157 | train | Stores the given simhash in this object. | [
30522,
2270,
11675,
3573,
1006,
2146,
21934,
14949,
2232,
1007,
1063,
2345,
20014,
25312,
21408,
16671,
1027,
2023,
1012,
25312,
21408,
16671,
1025,
2345,
2862,
1026,
4949,
1026,
5164,
1010,
2862,
1026,
2146,
1028,
1028,
1028,
5527,
1027,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java | SegmentsUtil.setFloat | public static void setFloat(MemorySegment[] segments, int offset, float value) {
if (inFirstSegment(segments, offset, 4)) {
segments[0].putFloat(offset, value);
} else {
setFloatMultiSegments(segments, offset, value);
}
} | java | public static void setFloat(MemorySegment[] segments, int offset, float value) {
if (inFirstSegment(segments, offset, 4)) {
segments[0].putFloat(offset, value);
} else {
setFloatMultiSegments(segments, offset, value);
}
} | [
"public",
"static",
"void",
"setFloat",
"(",
"MemorySegment",
"[",
"]",
"segments",
",",
"int",
"offset",
",",
"float",
"value",
")",
"{",
"if",
"(",
"inFirstSegment",
"(",
"segments",
",",
"offset",
",",
"4",
")",
")",
"{",
"segments",
"[",
"0",
"]",
... | set float from segments.
@param segments target segments.
@param offset value offset. | [
"set",
"float",
"from",
"segments",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java#L878-L884 | train | set float from segments. | [
30522,
2270,
10763,
11675,
2275,
10258,
16503,
1006,
3638,
3366,
21693,
4765,
1031,
1033,
9214,
1010,
20014,
16396,
1010,
14257,
3643,
1007,
1063,
2065,
1006,
1999,
8873,
12096,
3366,
21693,
4765,
1006,
9214,
1010,
16396,
1010,
1018,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
netty/netty | transport-native-epoll/src/main/java/io/netty/channel/epoll/AbstractEpollStreamChannel.java | AbstractEpollStreamChannel.spliceTo | public final ChannelFuture spliceTo(final FileDescriptor ch, final int offset, final int len,
final ChannelPromise promise) {
checkPositiveOrZero(len, "len");
checkPositiveOrZero(offset, "offser");
if (config().getEpollMode() != EpollMode.LEVEL_TRIGGERED) ... | java | public final ChannelFuture spliceTo(final FileDescriptor ch, final int offset, final int len,
final ChannelPromise promise) {
checkPositiveOrZero(len, "len");
checkPositiveOrZero(offset, "offser");
if (config().getEpollMode() != EpollMode.LEVEL_TRIGGERED) ... | [
"public",
"final",
"ChannelFuture",
"spliceTo",
"(",
"final",
"FileDescriptor",
"ch",
",",
"final",
"int",
"offset",
",",
"final",
"int",
"len",
",",
"final",
"ChannelPromise",
"promise",
")",
"{",
"checkPositiveOrZero",
"(",
"len",
",",
"\"len\"",
")",
";",
... | Splice from this {@link AbstractEpollStreamChannel} to another {@link FileDescriptor}.
The {@code offset} is the offset for the {@link FileDescriptor} and {@code len} is the
number of bytes to splice. If using {@link Integer#MAX_VALUE} it will splice until the
{@link ChannelFuture} was canceled or it was failed.
Pleas... | [
"Splice",
"from",
"this",
"{",
"@link",
"AbstractEpollStreamChannel",
"}",
"to",
"another",
"{",
"@link",
"FileDescriptor",
"}",
".",
"The",
"{",
"@code",
"offset",
"}",
"is",
"the",
"offset",
"for",
"the",
"{",
"@link",
"FileDescriptor",
"}",
"and",
"{",
... | ba06eafa1c1824bd154f1a380019e7ea2edf3c4c | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport-native-epoll/src/main/java/io/netty/channel/epoll/AbstractEpollStreamChannel.java#L214-L229 | train | Splice to a file. | [
30522,
2270,
2345,
3149,
11263,
11244,
11867,
13231,
3406,
1006,
2345,
6406,
2229,
23235,
2953,
10381,
1010,
2345,
20014,
16396,
1010,
2345,
20014,
18798,
1010,
2345,
3149,
21572,
28732,
4872,
1007,
1063,
4638,
6873,
28032,
3512,
2953,
6290,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
alibaba/canal | parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/local/BinLogFileQueue.java | BinLogFileQueue.waitForNextFile | public File waitForNextFile(File pre) throws InterruptedException {
try {
lock.lockInterruptibly();
if (binlogs.size() == 0) {
nextCondition.await();// 等待新文件
}
if (exception != null) {
throw exception;
}
if ... | java | public File waitForNextFile(File pre) throws InterruptedException {
try {
lock.lockInterruptibly();
if (binlogs.size() == 0) {
nextCondition.await();// 等待新文件
}
if (exception != null) {
throw exception;
}
if ... | [
"public",
"File",
"waitForNextFile",
"(",
"File",
"pre",
")",
"throws",
"InterruptedException",
"{",
"try",
"{",
"lock",
".",
"lockInterruptibly",
"(",
")",
";",
"if",
"(",
"binlogs",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"nextCondition",
".",
"awa... | 根据前一个文件,获取符合条件的下一个binlog文件
@param pre
@return
@throws InterruptedException | [
"根据前一个文件,获取符合条件的下一个binlog文件"
] | 8f088cddc0755f4350c5aaae95c6e4002d90a40f | https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/local/BinLogFileQueue.java#L150-L174 | train | Wait for next file. | [
30522,
2270,
5371,
3524,
29278,
2638,
18413,
8873,
2571,
1006,
5371,
3653,
1007,
11618,
7153,
10288,
24422,
1063,
3046,
1063,
5843,
1012,
5843,
18447,
2121,
21531,
3775,
6321,
1006,
1007,
1025,
2065,
1006,
8026,
21197,
2015,
1012,
2946,
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-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java | SharedBufferAccessor.registerEvent | public EventId registerEvent(V value, long timestamp) throws Exception {
return sharedBuffer.registerEvent(value, timestamp);
} | java | public EventId registerEvent(V value, long timestamp) throws Exception {
return sharedBuffer.registerEvent(value, timestamp);
} | [
"public",
"EventId",
"registerEvent",
"(",
"V",
"value",
",",
"long",
"timestamp",
")",
"throws",
"Exception",
"{",
"return",
"sharedBuffer",
".",
"registerEvent",
"(",
"value",
",",
"timestamp",
")",
";",
"}"
] | Adds another unique event to the shared buffer and assigns a unique id for it. It automatically creates a
lock on this event, so it won't be removed during processing of that event. Therefore the lock should be removed
after processing all {@link org.apache.flink.cep.nfa.ComputationState}s
<p><b>NOTE:</b>Should be cal... | [
"Adds",
"another",
"unique",
"event",
"to",
"the",
"shared",
"buffer",
"and",
"assigns",
"a",
"unique",
"id",
"for",
"it",
".",
"It",
"automatically",
"creates",
"a",
"lock",
"on",
"this",
"event",
"so",
"it",
"won",
"t",
"be",
"removed",
"during",
"proc... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java#L73-L75 | train | Registers an event with the event store. | [
30522,
2270,
2724,
3593,
4236,
18697,
3372,
1006,
1058,
3643,
1010,
2146,
2335,
15464,
2361,
1007,
11618,
6453,
1063,
2709,
4207,
8569,
12494,
1012,
4236,
18697,
3372,
1006,
3643,
1010,
2335,
15464,
2361,
1007,
1025,
1065,
102,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
netty/netty | codec-http2/src/main/java/io/netty/handler/codec/http2/HpackDynamicTable.java | HpackDynamicTable.length | public int length() {
int length;
if (head < tail) {
length = hpackHeaderFields.length - tail + head;
} else {
length = head - tail;
}
return length;
} | java | public int length() {
int length;
if (head < tail) {
length = hpackHeaderFields.length - tail + head;
} else {
length = head - tail;
}
return length;
} | [
"public",
"int",
"length",
"(",
")",
"{",
"int",
"length",
";",
"if",
"(",
"head",
"<",
"tail",
")",
"{",
"length",
"=",
"hpackHeaderFields",
".",
"length",
"-",
"tail",
"+",
"head",
";",
"}",
"else",
"{",
"length",
"=",
"head",
"-",
"tail",
";",
... | Return the number of header fields in the dynamic table. | [
"Return",
"the",
"number",
"of",
"header",
"fields",
"in",
"the",
"dynamic",
"table",
"."
] | ba06eafa1c1824bd154f1a380019e7ea2edf3c4c | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/HpackDynamicTable.java#L56-L64 | train | Returns the length of the record. | [
30522,
2270,
20014,
3091,
1006,
1007,
1063,
20014,
3091,
1025,
2065,
1006,
2132,
1026,
5725,
1007,
1063,
3091,
1027,
6522,
8684,
4974,
2121,
15155,
1012,
3091,
1011,
5725,
1009,
2132,
1025,
1065,
2842,
1063,
3091,
1027,
2132,
1011,
5725,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/NullableSerializer.java | NullableSerializer.wrap | public static <T> TypeSerializer<T> wrap(
@Nonnull TypeSerializer<T> originalSerializer, boolean padNullValueIfFixedLen) {
return originalSerializer instanceof NullableSerializer ?
originalSerializer : new NullableSerializer<>(originalSerializer, padNullValueIfFixedLen);
} | java | public static <T> TypeSerializer<T> wrap(
@Nonnull TypeSerializer<T> originalSerializer, boolean padNullValueIfFixedLen) {
return originalSerializer instanceof NullableSerializer ?
originalSerializer : new NullableSerializer<>(originalSerializer, padNullValueIfFixedLen);
} | [
"public",
"static",
"<",
"T",
">",
"TypeSerializer",
"<",
"T",
">",
"wrap",
"(",
"@",
"Nonnull",
"TypeSerializer",
"<",
"T",
">",
"originalSerializer",
",",
"boolean",
"padNullValueIfFixedLen",
")",
"{",
"return",
"originalSerializer",
"instanceof",
"NullableSeria... | This method wraps the {@code originalSerializer} with the {@code NullableSerializer} if not already wrapped.
@param originalSerializer serializer to wrap and add {@code null} support
@param padNullValueIfFixedLen pad null value to preserve the fixed length of original serializer
@return wrapped serializer which su... | [
"This",
"method",
"wraps",
"the",
"{",
"@code",
"originalSerializer",
"}",
"with",
"the",
"{",
"@code",
"NullableSerializer",
"}",
"if",
"not",
"already",
"wrapped",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/NullableSerializer.java#L147-L151 | train | Wrap a non - null type serializer. | [
30522,
2270,
10763,
1026,
1056,
1028,
4127,
11610,
28863,
1026,
1056,
1028,
10236,
1006,
1030,
2512,
11231,
3363,
4127,
11610,
28863,
1026,
1056,
1028,
23728,
11610,
28863,
1010,
30524,
5657,
13355,
7646,
2098,
7770,
1007,
1025,
1065,
102,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hankcs/HanLP | src/main/java/com/hankcs/hanlp/mining/word2vec/Corpus.java | Corpus.createBinaryTree | void createBinaryTree()
{
int[] point = new int[VocabWord.MAX_CODE_LENGTH];
char[] code = new char[VocabWord.MAX_CODE_LENGTH];
int[] count = new int[vocabSize * 2 + 1];
char[] binary = new char[vocabSize * 2 + 1];
int[] parentNode = new int[vocabSize * 2 + 1];
for (i... | java | void createBinaryTree()
{
int[] point = new int[VocabWord.MAX_CODE_LENGTH];
char[] code = new char[VocabWord.MAX_CODE_LENGTH];
int[] count = new int[vocabSize * 2 + 1];
char[] binary = new char[vocabSize * 2 + 1];
int[] parentNode = new int[vocabSize * 2 + 1];
for (i... | [
"void",
"createBinaryTree",
"(",
")",
"{",
"int",
"[",
"]",
"point",
"=",
"new",
"int",
"[",
"VocabWord",
".",
"MAX_CODE_LENGTH",
"]",
";",
"char",
"[",
"]",
"code",
"=",
"new",
"char",
"[",
"VocabWord",
".",
"MAX_CODE_LENGTH",
"]",
";",
"int",
"[",
... | Create binary Huffman tree using the word counts.
Frequent words will have short uniqe binary codes | [
"Create",
"binary",
"Huffman",
"tree",
"using",
"the",
"word",
"counts",
".",
"Frequent",
"words",
"will",
"have",
"short",
"uniqe",
"binary",
"codes"
] | a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce | https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/mining/word2vec/Corpus.java#L189-L270 | train | Create binary tree. | [
30522,
11675,
3443,
21114,
2854,
13334,
1006,
1007,
1063,
20014,
1031,
1033,
2391,
1027,
2047,
20014,
1031,
29536,
3540,
2497,
18351,
1012,
4098,
1035,
3642,
1035,
3091,
1033,
1025,
25869,
1031,
1033,
3642,
1027,
2047,
25869,
1031,
29536,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java | KeyUtil.generateDESKey | public static SecretKey generateDESKey(String algorithm, byte[] key) {
if (StrUtil.isBlank(algorithm) || false == algorithm.startsWith("DES")) {
throw new CryptoException("Algorithm [{}] is not a DES algorithm!");
}
SecretKey secretKey = null;
if (null == key) {
secretKey = generateKey(algorithm);... | java | public static SecretKey generateDESKey(String algorithm, byte[] key) {
if (StrUtil.isBlank(algorithm) || false == algorithm.startsWith("DES")) {
throw new CryptoException("Algorithm [{}] is not a DES algorithm!");
}
SecretKey secretKey = null;
if (null == key) {
secretKey = generateKey(algorithm);... | [
"public",
"static",
"SecretKey",
"generateDESKey",
"(",
"String",
"algorithm",
",",
"byte",
"[",
"]",
"key",
")",
"{",
"if",
"(",
"StrUtil",
".",
"isBlank",
"(",
"algorithm",
")",
"||",
"false",
"==",
"algorithm",
".",
"startsWith",
"(",
"\"DES\"",
")",
... | 生成 {@link SecretKey}
@param algorithm DES算法,包括DES、DESede等
@param key 密钥
@return {@link SecretKey} | [
"生成",
"{",
"@link",
"SecretKey",
"}"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java#L137-L160 | train | Generates a DES key from the given key. | [
30522,
2270,
10763,
3595,
14839,
7013,
2229,
14839,
1006,
5164,
9896,
1010,
24880,
1031,
1033,
3145,
1007,
1063,
2065,
1006,
2358,
22134,
4014,
1012,
2003,
28522,
8950,
1006,
9896,
1007,
1064,
1064,
6270,
1027,
1027,
9896,
1012,
4627,
24415... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java | ExcelUtil.read07BySax | public static Excel07SaxReader read07BySax(InputStream in, int sheetIndex, RowHandler rowHandler) {
try {
return new Excel07SaxReader(rowHandler).read(in, sheetIndex);
} catch (NoClassDefFoundError e) {
throw new DependencyException(ObjectUtil.defaultIfNull(e.getCause(), e), PoiChecker.NO_POI_ERROR_MSG);
... | java | public static Excel07SaxReader read07BySax(InputStream in, int sheetIndex, RowHandler rowHandler) {
try {
return new Excel07SaxReader(rowHandler).read(in, sheetIndex);
} catch (NoClassDefFoundError e) {
throw new DependencyException(ObjectUtil.defaultIfNull(e.getCause(), e), PoiChecker.NO_POI_ERROR_MSG);
... | [
"public",
"static",
"Excel07SaxReader",
"read07BySax",
"(",
"InputStream",
"in",
",",
"int",
"sheetIndex",
",",
"RowHandler",
"rowHandler",
")",
"{",
"try",
"{",
"return",
"new",
"Excel07SaxReader",
"(",
"rowHandler",
")",
".",
"read",
"(",
"in",
",",
"sheetIn... | Sax方式读取Excel07
@param in 输入流
@param sheetIndex Sheet索引,-1表示全部Sheet, 0表示第一个Sheet
@param rowHandler 行处理器
@return {@link Excel07SaxReader}
@since 3.2.0 | [
"Sax方式读取Excel07"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java#L89-L95 | train | Reads an Excel07 file from an input stream using the specified row handler. | [
30522,
2270,
10763,
24970,
2692,
2581,
3736,
2595,
16416,
4063,
3191,
2692,
2581,
3762,
3736,
2595,
1006,
20407,
25379,
1999,
1010,
20014,
7123,
22254,
10288,
1010,
5216,
11774,
3917,
5216,
11774,
3917,
1007,
1063,
3046,
1063,
2709,
2047,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-http/src/main/java/cn/hutool/http/HttpUtil.java | HttpUtil.encodeParams | public static String encodeParams(String paramsStr, Charset charset) {
if (StrUtil.isBlank(paramsStr)) {
return StrUtil.EMPTY;
}
String urlPart = null; // url部分,不包括问号
String paramPart; // 参数部分
int pathEndPos = paramsStr.indexOf('?');
if (pathEndPos > -1) {
// url + 参数
urlPart = StrUtil.s... | java | public static String encodeParams(String paramsStr, Charset charset) {
if (StrUtil.isBlank(paramsStr)) {
return StrUtil.EMPTY;
}
String urlPart = null; // url部分,不包括问号
String paramPart; // 参数部分
int pathEndPos = paramsStr.indexOf('?');
if (pathEndPos > -1) {
// url + 参数
urlPart = StrUtil.s... | [
"public",
"static",
"String",
"encodeParams",
"(",
"String",
"paramsStr",
",",
"Charset",
"charset",
")",
"{",
"if",
"(",
"StrUtil",
".",
"isBlank",
"(",
"paramsStr",
")",
")",
"{",
"return",
"StrUtil",
".",
"EMPTY",
";",
"}",
"String",
"urlPart",
"=",
"... | 对URL参数做编码,只编码键和值<br>
提供的值可以是url附带参数,但是不能只是url
@param paramsStr url参数,可以包含url本身
@param charset 编码
@return 编码后的url和参数
@since 4.0.1 | [
"对URL参数做编码,只编码键和值<br",
">",
"提供的值可以是url附带参数,但是不能只是url"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpUtil.java#L436-L460 | train | Encodes the specified parameters string using the specified charset. | [
30522,
2270,
10763,
5164,
4372,
16044,
28689,
5244,
1006,
5164,
11498,
5244,
3367,
2099,
1010,
25869,
13462,
25869,
13462,
1007,
1063,
2065,
1006,
2358,
22134,
4014,
1012,
2003,
28522,
8950,
1006,
11498,
5244,
3367,
2099,
1007,
1007,
1063,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/util/ClassLoaderUtil.java | ClassLoaderUtil.getClassLoader | public static ClassLoader getClassLoader() {
ClassLoader classLoader = getContextClassLoader();
if (classLoader == null) {
classLoader = ClassLoaderUtil.class.getClassLoader();
if (null == classLoader) {
classLoader = ClassLoader.getSystemClassLoader();
}
}
return classLoader;
} | java | public static ClassLoader getClassLoader() {
ClassLoader classLoader = getContextClassLoader();
if (classLoader == null) {
classLoader = ClassLoaderUtil.class.getClassLoader();
if (null == classLoader) {
classLoader = ClassLoader.getSystemClassLoader();
}
}
return classLoader;
} | [
"public",
"static",
"ClassLoader",
"getClassLoader",
"(",
")",
"{",
"ClassLoader",
"classLoader",
"=",
"getContextClassLoader",
"(",
")",
";",
"if",
"(",
"classLoader",
"==",
"null",
")",
"{",
"classLoader",
"=",
"ClassLoaderUtil",
".",
"class",
".",
"getClassLo... | 获取{@link ClassLoader}<br>
获取顺序如下:<br>
<pre>
1、获取当前线程的ContextClassLoader
2、获取{@link ClassLoaderUtil}类对应的ClassLoader
3、获取系统ClassLoader({@link ClassLoader#getSystemClassLoader()})
</pre>
@return 类加载器 | [
"获取",
"{",
"@link",
"ClassLoader",
"}",
"<br",
">",
"获取顺序如下:<br",
">"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ClassLoaderUtil.java#L80-L89 | train | Returns the ClassLoader that is used to load the application. | [
30522,
2270,
10763,
2465,
11066,
2121,
2131,
26266,
11066,
2121,
1006,
1007,
1063,
2465,
11066,
2121,
2465,
11066,
2121,
1027,
2131,
8663,
18209,
26266,
11066,
2121,
1006,
1007,
1025,
2065,
1006,
2465,
11066,
2121,
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-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/DescriptorProperties.java | DescriptorProperties.putInt | public void putInt(String key, int i) {
checkNotNull(key);
put(key, Integer.toString(i));
} | java | public void putInt(String key, int i) {
checkNotNull(key);
put(key, Integer.toString(i));
} | [
"public",
"void",
"putInt",
"(",
"String",
"key",
",",
"int",
"i",
")",
"{",
"checkNotNull",
"(",
"key",
")",
";",
"put",
"(",
"key",
",",
"Integer",
".",
"toString",
"(",
"i",
")",
")",
";",
"}"
] | Adds an integer under the given key. | [
"Adds",
"an",
"integer",
"under",
"the",
"given",
"key",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/DescriptorProperties.java#L147-L150 | train | Put an Integer value into the mapping. | [
30522,
2270,
11675,
22072,
2102,
1006,
5164,
3145,
1010,
20014,
1045,
1007,
1063,
4638,
17048,
11231,
3363,
1006,
3145,
1007,
1025,
2404,
1006,
3145,
1010,
16109,
1012,
2000,
3367,
4892,
1006,
1045,
1007,
1007,
1025,
1065,
102,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-docs/src/main/java/org/apache/flink/docs/configuration/ConfigOptionsDocGenerator.java | ConfigOptionsDocGenerator.toHtmlTable | private static String toHtmlTable(final List<OptionWithMetaInfo> options) {
StringBuilder htmlTable = new StringBuilder();
htmlTable.append("<table class=\"table table-bordered\">\n");
htmlTable.append(" <thead>\n");
htmlTable.append(" <tr>\n");
htmlTable.append(" <th class=\"text-left\" ... | java | private static String toHtmlTable(final List<OptionWithMetaInfo> options) {
StringBuilder htmlTable = new StringBuilder();
htmlTable.append("<table class=\"table table-bordered\">\n");
htmlTable.append(" <thead>\n");
htmlTable.append(" <tr>\n");
htmlTable.append(" <th class=\"text-left\" ... | [
"private",
"static",
"String",
"toHtmlTable",
"(",
"final",
"List",
"<",
"OptionWithMetaInfo",
">",
"options",
")",
"{",
"StringBuilder",
"htmlTable",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"htmlTable",
".",
"append",
"(",
"\"<table class=\\\"table table-border... | Transforms this configuration group into HTML formatted table.
Options are sorted alphabetically by key.
@param options list of options to include in this group
@return string containing HTML formatted table | [
"Transforms",
"this",
"configuration",
"group",
"into",
"HTML",
"formatted",
"table",
".",
"Options",
"are",
"sorted",
"alphabetically",
"by",
"key",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-docs/src/main/java/org/apache/flink/docs/configuration/ConfigOptionsDocGenerator.java#L232-L252 | train | To html table. | [
30522,
2797,
10763,
5164,
2000,
11039,
19968,
10880,
1006,
2345,
2862,
1026,
5724,
24415,
11368,
8113,
14876,
1028,
7047,
1007,
1063,
5164,
8569,
23891,
2099,
16129,
10880,
1027,
2047,
5164,
8569,
23891,
2099,
1006,
1007,
1025,
16129,
10880,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hankcs/HanLP | src/main/java/com/hankcs/hanlp/corpus/dictionary/SuffixDictionary.java | SuffixDictionary.add | public void add(String word)
{
word = reverse(word);
trie.put(word, word.length());
} | java | public void add(String word)
{
word = reverse(word);
trie.put(word, word.length());
} | [
"public",
"void",
"add",
"(",
"String",
"word",
")",
"{",
"word",
"=",
"reverse",
"(",
"word",
")",
";",
"trie",
".",
"put",
"(",
"word",
",",
"word",
".",
"length",
"(",
")",
")",
";",
"}"
] | 添加一个词语
@param word | [
"添加一个词语"
] | a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce | https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/corpus/dictionary/SuffixDictionary.java#L35-L39 | train | Add a new entry to the trie. | [
30522,
2270,
11675,
5587,
1006,
5164,
2773,
1007,
1063,
2773,
1027,
7901,
1006,
2773,
1007,
1025,
13012,
2063,
1012,
2404,
1006,
2773,
1010,
2773,
1012,
3091,
1006,
1007,
1007,
1025,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-java/src/main/java/org/apache/flink/api/java/operators/SingleInputUdfOperator.java | SingleInputUdfOperator.withForwardedFields | public O withForwardedFields(String... forwardedFields) {
if (this.udfSemantics == null) {
// extract semantic properties from function annotations
setSemanticProperties(extractSemanticAnnotations(getFunction().getClass()));
}
if (this.udfSemantics == null
|| this.analyzedUdfSemantics) { // discard an... | java | public O withForwardedFields(String... forwardedFields) {
if (this.udfSemantics == null) {
// extract semantic properties from function annotations
setSemanticProperties(extractSemanticAnnotations(getFunction().getClass()));
}
if (this.udfSemantics == null
|| this.analyzedUdfSemantics) { // discard an... | [
"public",
"O",
"withForwardedFields",
"(",
"String",
"...",
"forwardedFields",
")",
"{",
"if",
"(",
"this",
".",
"udfSemantics",
"==",
"null",
")",
"{",
"// extract semantic properties from function annotations",
"setSemanticProperties",
"(",
"extractSemanticAnnotations",
... | Adds semantic information about forwarded fields of the user-defined function.
The forwarded fields information declares fields which are never modified by the function and
which are forwarded at the same position to the output or unchanged copied to another position in the output.
<p>Fields that are forwarded at the ... | [
"Adds",
"semantic",
"information",
"about",
"forwarded",
"fields",
"of",
"the",
"user",
"-",
"defined",
"function",
".",
"The",
"forwarded",
"fields",
"information",
"declares",
"fields",
"which",
"are",
"never",
"modified",
"by",
"the",
"function",
"and",
"whic... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/SingleInputUdfOperator.java#L149-L174 | train | Adds forwarded fields information to the result type. | [
30522,
2270,
1051,
2007,
29278,
7652,
2098,
15155,
1006,
5164,
1012,
1012,
1012,
2830,
2098,
15155,
1007,
1063,
2065,
1006,
2023,
1012,
20904,
10343,
16704,
14606,
1027,
1027,
19701,
1007,
30524,
1007,
1007,
1007,
1025,
1065,
2065,
1006,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-poi/src/main/java/cn/hutool/poi/excel/StyleSet.java | StyleSet.setBackgroundColor | public StyleSet setBackgroundColor(IndexedColors backgroundColor, boolean withHeadCell) {
if (withHeadCell) {
StyleUtil.setColor(this.headCellStyle, backgroundColor, FillPatternType.SOLID_FOREGROUND);
}
StyleUtil.setColor(this.cellStyle, backgroundColor, FillPatternType.SOLID_FOREGROUND);
StyleUtil.setC... | java | public StyleSet setBackgroundColor(IndexedColors backgroundColor, boolean withHeadCell) {
if (withHeadCell) {
StyleUtil.setColor(this.headCellStyle, backgroundColor, FillPatternType.SOLID_FOREGROUND);
}
StyleUtil.setColor(this.cellStyle, backgroundColor, FillPatternType.SOLID_FOREGROUND);
StyleUtil.setC... | [
"public",
"StyleSet",
"setBackgroundColor",
"(",
"IndexedColors",
"backgroundColor",
",",
"boolean",
"withHeadCell",
")",
"{",
"if",
"(",
"withHeadCell",
")",
"{",
"StyleUtil",
".",
"setColor",
"(",
"this",
".",
"headCellStyle",
",",
"backgroundColor",
",",
"FillP... | 设置单元格背景样式
@param backgroundColor 背景色
@param withHeadCell 是否也定义头部样式
@return this
@since 4.0.0 | [
"设置单元格背景样式"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/StyleSet.java#L130-L138 | train | Sets the background color of the style set. | [
30522,
2270,
6782,
3388,
2275,
5963,
16365,
18717,
1006,
25331,
18717,
2015,
4281,
18717,
1010,
22017,
20898,
2007,
4974,
29109,
2140,
1007,
1063,
2065,
1006,
2007,
4974,
29109,
2140,
1007,
1063,
2806,
21823,
2140,
1012,
2275,
18717,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
netty/netty | handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java | ReferenceCountedOpenSslEngine.readPlaintextData | private int readPlaintextData(final ByteBuffer dst) {
final int sslRead;
final int pos = dst.position();
if (dst.isDirect()) {
sslRead = SSL.readFromSSL(ssl, bufferAddress(dst) + pos, dst.limit() - pos);
if (sslRead > 0) {
dst.position(pos + sslRead);
... | java | private int readPlaintextData(final ByteBuffer dst) {
final int sslRead;
final int pos = dst.position();
if (dst.isDirect()) {
sslRead = SSL.readFromSSL(ssl, bufferAddress(dst) + pos, dst.limit() - pos);
if (sslRead > 0) {
dst.position(pos + sslRead);
... | [
"private",
"int",
"readPlaintextData",
"(",
"final",
"ByteBuffer",
"dst",
")",
"{",
"final",
"int",
"sslRead",
";",
"final",
"int",
"pos",
"=",
"dst",
".",
"position",
"(",
")",
";",
"if",
"(",
"dst",
".",
"isDirect",
"(",
")",
")",
"{",
"sslRead",
"... | Read plaintext data from the OpenSSL internal BIO | [
"Read",
"plaintext",
"data",
"from",
"the",
"OpenSSL",
"internal",
"BIO"
] | ba06eafa1c1824bd154f1a380019e7ea2edf3c4c | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java#L566-L591 | train | Read plaintext data from the SSL buffer. | [
30522,
2797,
20014,
3191,
24759,
22325,
10288,
2102,
2850,
2696,
1006,
2345,
24880,
8569,
12494,
16233,
2102,
1007,
1063,
2345,
20014,
7020,
20974,
13775,
1025,
2345,
20014,
13433,
2015,
1027,
16233,
2102,
1012,
2597,
1006,
1007,
1025,
2065,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-java/src/main/java/org/apache/flink/api/java/operators/DeltaIteration.java | DeltaIteration.parallelism | public DeltaIteration<ST, WT> parallelism(int parallelism) {
Preconditions.checkArgument(parallelism > 0 || parallelism == ExecutionConfig.PARALLELISM_DEFAULT,
"The parallelism must be positive, or ExecutionConfig.PARALLELISM_DEFAULT (use default).");
this.parallelism = parallelism;
return this;
} | java | public DeltaIteration<ST, WT> parallelism(int parallelism) {
Preconditions.checkArgument(parallelism > 0 || parallelism == ExecutionConfig.PARALLELISM_DEFAULT,
"The parallelism must be positive, or ExecutionConfig.PARALLELISM_DEFAULT (use default).");
this.parallelism = parallelism;
return this;
} | [
"public",
"DeltaIteration",
"<",
"ST",
",",
"WT",
">",
"parallelism",
"(",
"int",
"parallelism",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"parallelism",
">",
"0",
"||",
"parallelism",
"==",
"ExecutionConfig",
".",
"PARALLELISM_DEFAULT",
",",
"\"The ... | Sets the parallelism for the iteration.
@param parallelism The parallelism.
@return The iteration object, for function call chaining. | [
"Sets",
"the",
"parallelism",
"for",
"the",
"iteration",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/DeltaIteration.java#L184-L189 | train | Sets the parallelism for the iteration. | [
30522,
2270,
7160,
21646,
3370,
1026,
2358,
1010,
1059,
2102,
1028,
5903,
2964,
1006,
20014,
5903,
2964,
1007,
1063,
3653,
8663,
20562,
2015,
1012,
4638,
2906,
22850,
4765,
1006,
5903,
2964,
1028,
1014,
1064,
1064,
5903,
2964,
1027,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java | ZooKeeperUtils.createLeaderRetrievalService | public static ZooKeeperLeaderRetrievalService createLeaderRetrievalService(
final CuratorFramework client,
final Configuration configuration) throws Exception {
return createLeaderRetrievalService(client, configuration, "");
} | java | public static ZooKeeperLeaderRetrievalService createLeaderRetrievalService(
final CuratorFramework client,
final Configuration configuration) throws Exception {
return createLeaderRetrievalService(client, configuration, "");
} | [
"public",
"static",
"ZooKeeperLeaderRetrievalService",
"createLeaderRetrievalService",
"(",
"final",
"CuratorFramework",
"client",
",",
"final",
"Configuration",
"configuration",
")",
"throws",
"Exception",
"{",
"return",
"createLeaderRetrievalService",
"(",
"client",
",",
... | Creates a {@link ZooKeeperLeaderRetrievalService} instance.
@param client The {@link CuratorFramework} ZooKeeper client to use
@param configuration {@link Configuration} object containing the configuration values
@return {@link ZooKeeperLeaderRetrievalService} instance.
@throws Exception | [
"Creates",
"a",
"{",
"@link",
"ZooKeeperLeaderRetrievalService",
"}",
"instance",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java#L170-L174 | train | Create a LeaderRetrievalService with the given configuration. | [
30522,
2270,
10763,
9201,
13106,
19000,
13465,
7373,
10175,
8043,
7903,
2063,
3443,
19000,
13465,
7373,
10175,
8043,
7903,
2063,
1006,
2345,
13023,
15643,
6198,
7396,
1010,
2345,
9563,
9563,
1007,
11618,
6453,
1063,
2709,
3443,
19000,
13465,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java | ImgUtil.convert | public static void convert(File srcImageFile, File destImageFile) {
Assert.notNull(srcImageFile);
Assert.notNull(destImageFile);
Assert.isFalse(srcImageFile.equals(destImageFile), "Src file is equals to dest file!");
final String srcExtName = FileUtil.extName(srcImageFile);
final String destExtName = F... | java | public static void convert(File srcImageFile, File destImageFile) {
Assert.notNull(srcImageFile);
Assert.notNull(destImageFile);
Assert.isFalse(srcImageFile.equals(destImageFile), "Src file is equals to dest file!");
final String srcExtName = FileUtil.extName(srcImageFile);
final String destExtName = F... | [
"public",
"static",
"void",
"convert",
"(",
"File",
"srcImageFile",
",",
"File",
"destImageFile",
")",
"{",
"Assert",
".",
"notNull",
"(",
"srcImageFile",
")",
";",
"Assert",
".",
"notNull",
"(",
"destImageFile",
")",
";",
"Assert",
".",
"isFalse",
"(",
"s... | 图像类型转换:GIF=》JPG、GIF=》PNG、PNG=》JPG、PNG=》GIF(X)、BMP=》PNG
@param srcImageFile 源图像文件
@param destImageFile 目标图像文件 | [
"图像类型转换:GIF",
"=",
"》JPG、GIF",
"=",
"》PNG、PNG",
"=",
"》JPG、PNG",
"=",
"》GIF",
"(",
"X",
")",
"、BMP",
"=",
"》PNG"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L491-L510 | train | Converts the src image file to the dest image file. | [
30522,
2270,
10763,
11675,
10463,
1006,
5371,
5034,
6895,
26860,
8873,
2571,
1010,
5371,
4078,
3775,
26860,
8873,
2571,
1007,
1063,
20865,
1012,
2025,
11231,
3363,
1006,
5034,
6895,
26860,
8873,
2571,
1007,
1025,
20865,
1012,
2025,
11231,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/utils/RefCountedTmpFileCreator.java | RefCountedTmpFileCreator.apply | @Override
public RefCountedFile apply(File file) throws IOException {
final File directory = tempDirectories[nextIndex()];
while (true) {
try {
if (file == null) {
final File newFile = new File(directory, ".tmp_" + UUID.randomUUID());
final OutputStream out = Files.newOutputStream(newFile.toPath(... | java | @Override
public RefCountedFile apply(File file) throws IOException {
final File directory = tempDirectories[nextIndex()];
while (true) {
try {
if (file == null) {
final File newFile = new File(directory, ".tmp_" + UUID.randomUUID());
final OutputStream out = Files.newOutputStream(newFile.toPath(... | [
"@",
"Override",
"public",
"RefCountedFile",
"apply",
"(",
"File",
"file",
")",
"throws",
"IOException",
"{",
"final",
"File",
"directory",
"=",
"tempDirectories",
"[",
"nextIndex",
"(",
")",
"]",
";",
"while",
"(",
"true",
")",
"{",
"try",
"{",
"if",
"(... | Gets the next temp file and stream to temp file.
This creates the temp file atomically, making sure no previous file is overwritten.
<p>This method is safe against concurrent use.
@return A pair of temp file and output stream to that temp file.
@throws IOException Thrown, if the stream to the temp file could not be o... | [
"Gets",
"the",
"next",
"temp",
"file",
"and",
"stream",
"to",
"temp",
"file",
".",
"This",
"creates",
"the",
"temp",
"file",
"atomically",
"making",
"sure",
"no",
"previous",
"file",
"is",
"overwritten",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/utils/RefCountedTmpFileCreator.java#L72-L90 | train | Apply the operation to a file. | [
30522,
1030,
2058,
15637,
2270,
25416,
3597,
16671,
2098,
8873,
2571,
6611,
1006,
5371,
5371,
1007,
11618,
22834,
10288,
24422,
1063,
2345,
5371,
14176,
1027,
8915,
8737,
4305,
2890,
16761,
3111,
1031,
2279,
22254,
10288,
1006,
1007,
1033,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java | SlotManager.reportSlotStatus | public boolean reportSlotStatus(InstanceID instanceId, SlotReport slotReport) {
checkInit();
LOG.debug("Received slot report from instance {}: {}.", instanceId, slotReport);
TaskManagerRegistration taskManagerRegistration = taskManagerRegistrations.get(instanceId);
if (null != taskManagerRegistration) {
... | java | public boolean reportSlotStatus(InstanceID instanceId, SlotReport slotReport) {
checkInit();
LOG.debug("Received slot report from instance {}: {}.", instanceId, slotReport);
TaskManagerRegistration taskManagerRegistration = taskManagerRegistrations.get(instanceId);
if (null != taskManagerRegistration) {
... | [
"public",
"boolean",
"reportSlotStatus",
"(",
"InstanceID",
"instanceId",
",",
"SlotReport",
"slotReport",
")",
"{",
"checkInit",
"(",
")",
";",
"LOG",
".",
"debug",
"(",
"\"Received slot report from instance {}: {}.\"",
",",
"instanceId",
",",
"slotReport",
")",
";... | Reports the current slot allocations for a task manager identified by the given instance id.
@param instanceId identifying the task manager for which to report the slot status
@param slotReport containing the status for all of its slots
@return true if the slot status has been updated successfully, otherwise false | [
"Reports",
"the",
"current",
"slot",
"allocations",
"for",
"a",
"task",
"manager",
"identified",
"by",
"the",
"given",
"instance",
"id",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L408-L427 | train | This method is called when a slot status is received from a task manager. | [
30522,
2270,
22017,
20898,
4311,
10994,
9153,
5809,
1006,
6013,
3593,
6013,
3593,
1010,
10453,
2890,
6442,
10453,
2890,
6442,
1007,
1063,
4638,
5498,
2102,
1006,
1007,
1025,
8833,
1012,
2139,
8569,
2290,
1006,
1000,
2363,
10453,
3189,
2013,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/TimSort.java | TimSort.reverseRange | private void reverseRange(Buffer a, int lo, int hi) {
hi--;
while (lo < hi) {
s.swap(a, lo, hi);
lo++;
hi--;
}
} | java | private void reverseRange(Buffer a, int lo, int hi) {
hi--;
while (lo < hi) {
s.swap(a, lo, hi);
lo++;
hi--;
}
} | [
"private",
"void",
"reverseRange",
"(",
"Buffer",
"a",
",",
"int",
"lo",
",",
"int",
"hi",
")",
"{",
"hi",
"--",
";",
"while",
"(",
"lo",
"<",
"hi",
")",
"{",
"s",
".",
"swap",
"(",
"a",
",",
"lo",
",",
"hi",
")",
";",
"lo",
"++",
";",
"hi"... | Reverse the specified range of the specified array.
@param a the array in which a range is to be reversed
@param lo the index of the first element in the range to be reversed
@param hi the index after the last element in the range to be reversed | [
"Reverse",
"the",
"specified",
"range",
"of",
"the",
"specified",
"array",
"."
] | 25ee0474f47d9c30d6f553a7892d9549f91071cf | https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/core/src/main/java/org/apache/spark/util/collection/TimSort.java#L289-L296 | train | Reverse range of the specified range of the specified buffer. | [
30522,
2797,
11675,
7901,
24388,
2063,
1006,
17698,
1037,
1010,
20014,
8840,
1010,
20014,
7632,
1007,
1063,
7632,
1011,
1011,
1025,
2096,
1006,
8840,
1026,
7632,
1007,
1063,
1055,
1012,
19948,
1006,
1037,
1010,
8840,
1010,
7632,
1007,
1025,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-java/src/main/java/org/apache/flink/api/java/summarize/aggregation/SummaryAggregatorFactory.java | SummaryAggregatorFactory.create | @SuppressWarnings("unchecked")
public static <T, R> Aggregator<T, R> create(Class<T> type) {
if (type == Long.class) {
return (Aggregator<T, R>) new LongSummaryAggregator();
}
else if (type == LongValue.class) {
return (Aggregator<T, R>) new ValueSummaryAggregator.LongValueSummaryAggregator();
}
else i... | java | @SuppressWarnings("unchecked")
public static <T, R> Aggregator<T, R> create(Class<T> type) {
if (type == Long.class) {
return (Aggregator<T, R>) new LongSummaryAggregator();
}
else if (type == LongValue.class) {
return (Aggregator<T, R>) new ValueSummaryAggregator.LongValueSummaryAggregator();
}
else i... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
",",
"R",
">",
"Aggregator",
"<",
"T",
",",
"R",
">",
"create",
"(",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"if",
"(",
"type",
"==",
"Long",
".",
"class",
")",
"... | Create a SummaryAggregator for the supplied type.
@param <T> the type to aggregate
@param <R> the result type of the aggregation | [
"Create",
"a",
"SummaryAggregator",
"for",
"the",
"supplied",
"type",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/summarize/aggregation/SummaryAggregatorFactory.java#L53-L101 | train | Creates an instance of the specified type. | [
30522,
1030,
16081,
9028,
5582,
2015,
1006,
1000,
4895,
5403,
18141,
1000,
1007,
2270,
10763,
1026,
1056,
1010,
1054,
1028,
24089,
1026,
1056,
1010,
1054,
1028,
3443,
1006,
2465,
1026,
1056,
1028,
2828,
1007,
1063,
2065,
1006,
2828,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
netty/netty | handler/src/main/java/io/netty/handler/ssl/SslContext.java | SslContext.buildTrustManagerFactory | @Deprecated
protected static TrustManagerFactory buildTrustManagerFactory(
File certChainFile, TrustManagerFactory trustManagerFactory)
throws NoSuchAlgorithmException, CertificateException, KeyStoreException, IOException {
X509Certificate[] x509Certs = toX509Certificates(certChainFi... | java | @Deprecated
protected static TrustManagerFactory buildTrustManagerFactory(
File certChainFile, TrustManagerFactory trustManagerFactory)
throws NoSuchAlgorithmException, CertificateException, KeyStoreException, IOException {
X509Certificate[] x509Certs = toX509Certificates(certChainFi... | [
"@",
"Deprecated",
"protected",
"static",
"TrustManagerFactory",
"buildTrustManagerFactory",
"(",
"File",
"certChainFile",
",",
"TrustManagerFactory",
"trustManagerFactory",
")",
"throws",
"NoSuchAlgorithmException",
",",
"CertificateException",
",",
"KeyStoreException",
",",
... | Build a {@link TrustManagerFactory} from a certificate chain file.
@param certChainFile The certificate file to build from.
@param trustManagerFactory The existing {@link TrustManagerFactory} that will be used if not {@code null}.
@return A {@link TrustManagerFactory} which contains the certificates in {@code certChain... | [
"Build",
"a",
"{"
] | ba06eafa1c1824bd154f1a380019e7ea2edf3c4c | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslContext.java#L1094-L1101 | train | Build a trust manager factory from a file. | [
30522,
1030,
2139,
28139,
12921,
5123,
10763,
3404,
24805,
4590,
21450,
3857,
24669,
24805,
4590,
21450,
1006,
5371,
8292,
5339,
24925,
2078,
8873,
2571,
1010,
3404,
24805,
4590,
21450,
3404,
24805,
4590,
21450,
1007,
11618,
16839,
10875,
238... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/PatternProcessFunctionBuilder.java | PatternProcessFunctionBuilder.fromSelect | static <IN, OUT> SelectBuilder<IN, OUT> fromSelect(final PatternSelectFunction<IN, OUT> function) {
return new SelectBuilder<>(function);
} | java | static <IN, OUT> SelectBuilder<IN, OUT> fromSelect(final PatternSelectFunction<IN, OUT> function) {
return new SelectBuilder<>(function);
} | [
"static",
"<",
"IN",
",",
"OUT",
">",
"SelectBuilder",
"<",
"IN",
",",
"OUT",
">",
"fromSelect",
"(",
"final",
"PatternSelectFunction",
"<",
"IN",
",",
"OUT",
">",
"function",
")",
"{",
"return",
"new",
"SelectBuilder",
"<>",
"(",
"function",
")",
";",
... | Starts constructing a {@link PatternProcessFunction} from a {@link PatternSelectFunction} that
emitted elements through return value. | [
"Starts",
"constructing",
"a",
"{"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/PatternProcessFunctionBuilder.java#L50-L52 | train | Create a SelectBuilder from a pattern select function. | [
30522,
10763,
1026,
1999,
1010,
2041,
1028,
7276,
8569,
23891,
2099,
1026,
1999,
1010,
2041,
1028,
2013,
11246,
22471,
1006,
2345,
7060,
12260,
6593,
11263,
27989,
1026,
1999,
1010,
2041,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/yaml/YamlShardingDataSourceFactory.java | YamlShardingDataSourceFactory.createDataSource | public static DataSource createDataSource(final byte[] yamlBytes) throws SQLException, IOException {
YamlRootShardingConfiguration config = YamlEngine.unmarshal(yamlBytes, YamlRootShardingConfiguration.class);
return ShardingDataSourceFactory.createDataSource(config.getDataSources(), new ShardingRuleCon... | java | public static DataSource createDataSource(final byte[] yamlBytes) throws SQLException, IOException {
YamlRootShardingConfiguration config = YamlEngine.unmarshal(yamlBytes, YamlRootShardingConfiguration.class);
return ShardingDataSourceFactory.createDataSource(config.getDataSources(), new ShardingRuleCon... | [
"public",
"static",
"DataSource",
"createDataSource",
"(",
"final",
"byte",
"[",
"]",
"yamlBytes",
")",
"throws",
"SQLException",
",",
"IOException",
"{",
"YamlRootShardingConfiguration",
"config",
"=",
"YamlEngine",
".",
"unmarshal",
"(",
"yamlBytes",
",",
"YamlRoo... | Create sharding data source.
@param yamlBytes YAML bytes for rule configuration of databases and tables sharding with data sources
@return sharding data source
@throws SQLException SQL exception
@throws IOException IO 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/yaml/YamlShardingDataSourceFactory.java#L62-L65 | train | Create DataSource from yaml bytes. | [
30522,
2270,
10763,
2951,
6499,
3126,
3401,
2580,
6790,
6499,
3126,
3401,
1006,
2345,
24880,
1031,
1033,
8038,
19968,
3762,
4570,
1007,
11618,
29296,
10288,
24422,
1010,
22834,
10288,
24422,
1063,
8038,
19968,
3217,
12868,
11783,
2075,
8663,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/MutableDoubleArrayTrieInteger.java | MutableDoubleArrayTrieInteger.findLongest | public int[] findLongest(CharSequence query, int start)
{
if ((query == null) || (start >= query.length()))
{
return new int[]{0, -1};
}
int state = 1;
int maxLength = 0;
int lastVal = -1;
for (int i = start; i < query.length(); i++)
{
... | java | public int[] findLongest(CharSequence query, int start)
{
if ((query == null) || (start >= query.length()))
{
return new int[]{0, -1};
}
int state = 1;
int maxLength = 0;
int lastVal = -1;
for (int i = start; i < query.length(); i++)
{
... | [
"public",
"int",
"[",
"]",
"findLongest",
"(",
"CharSequence",
"query",
",",
"int",
"start",
")",
"{",
"if",
"(",
"(",
"query",
"==",
"null",
")",
"||",
"(",
"start",
">=",
"query",
".",
"length",
"(",
")",
")",
")",
"{",
"return",
"new",
"int",
... | 最长查询
@param query
@param start
@return (最长长度,对应的值) | [
"最长查询"
] | a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce | https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/trie/datrie/MutableDoubleArrayTrieInteger.java#L536-L560 | train | Find the longest value of the sequence in the sequence. | [
30522,
2270,
20014,
1031,
1033,
2424,
10052,
4355,
1006,
25869,
3366,
4226,
5897,
23032,
1010,
20014,
2707,
1007,
1063,
2065,
1006,
1006,
23032,
1027,
1027,
19701,
1007,
1064,
1064,
1006,
2707,
1028,
1027,
23032,
1012,
3091,
1006,
1007,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java | NumberUtil.toBigDecimal | public static BigDecimal toBigDecimal(String number) {
return (null == number) ? BigDecimal.ZERO : new BigDecimal(number);
} | java | public static BigDecimal toBigDecimal(String number) {
return (null == number) ? BigDecimal.ZERO : new BigDecimal(number);
} | [
"public",
"static",
"BigDecimal",
"toBigDecimal",
"(",
"String",
"number",
")",
"{",
"return",
"(",
"null",
"==",
"number",
")",
"?",
"BigDecimal",
".",
"ZERO",
":",
"new",
"BigDecimal",
"(",
"number",
")",
";",
"}"
] | 数字转{@link BigDecimal}
@param number 数字
@return {@link BigDecimal}
@since 4.0.9 | [
"数字转",
"{",
"@link",
"BigDecimal",
"}"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L1910-L1912 | train | Converts a String to a BigDecimal. | [
30522,
2270,
10763,
2502,
3207,
6895,
9067,
2000,
5638,
2290,
3207,
6895,
9067,
1006,
5164,
2193,
1007,
1063,
2709,
1006,
19701,
1027,
1027,
2193,
1007,
1029,
2502,
3207,
6895,
9067,
1012,
5717,
1024,
2047,
2502,
3207,
6895,
9067,
1006,
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 | handler/src/main/java/io/netty/handler/ssl/SslContext.java | SslContext.newClientContext | @Deprecated
public static SslContext newClientContext(
SslProvider provider, TrustManagerFactory trustManagerFactory) throws SSLException {
return newClientContext(provider, null, trustManagerFactory);
} | java | @Deprecated
public static SslContext newClientContext(
SslProvider provider, TrustManagerFactory trustManagerFactory) throws SSLException {
return newClientContext(provider, null, trustManagerFactory);
} | [
"@",
"Deprecated",
"public",
"static",
"SslContext",
"newClientContext",
"(",
"SslProvider",
"provider",
",",
"TrustManagerFactory",
"trustManagerFactory",
")",
"throws",
"SSLException",
"{",
"return",
"newClientContext",
"(",
"provider",
",",
"null",
",",
"trustManager... | Creates a new client-side {@link SslContext}.
@param provider the {@link SslContext} implementation to use.
{@code null} to use the current default one.
@param trustManagerFactory the {@link TrustManagerFactory} that provides the {@link TrustManager}s
that verifies the certificates sent from servers.
{@code null} to u... | [
"Creates",
"a",
"new",
"client",
"-",
"side",
"{",
"@link",
"SslContext",
"}",
"."
] | ba06eafa1c1824bd154f1a380019e7ea2edf3c4c | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslContext.java#L603-L607 | train | Create a new SslContext using the specified provider and trust manager factory. | [
30522,
1030,
2139,
28139,
12921,
2270,
10763,
7020,
22499,
10111,
18413,
2047,
20464,
11638,
8663,
18209,
1006,
7020,
14277,
12298,
18688,
10802,
1010,
3404,
24805,
4590,
21450,
3404,
24805,
4590,
21450,
1007,
11618,
7020,
2571,
2595,
24422,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/JobManagerMetricGroup.java | JobManagerMetricGroup.addJob | public JobManagerJobMetricGroup addJob(JobGraph job) {
JobID jobId = job.getJobID();
String jobName = job.getName();
// get or create a jobs metric group
JobManagerJobMetricGroup currentJobGroup;
synchronized (this) {
if (!isClosed()) {
currentJobGroup = jobs.get(jobId);
if (currentJobGroup == nul... | java | public JobManagerJobMetricGroup addJob(JobGraph job) {
JobID jobId = job.getJobID();
String jobName = job.getName();
// get or create a jobs metric group
JobManagerJobMetricGroup currentJobGroup;
synchronized (this) {
if (!isClosed()) {
currentJobGroup = jobs.get(jobId);
if (currentJobGroup == nul... | [
"public",
"JobManagerJobMetricGroup",
"addJob",
"(",
"JobGraph",
"job",
")",
"{",
"JobID",
"jobId",
"=",
"job",
".",
"getJobID",
"(",
")",
";",
"String",
"jobName",
"=",
"job",
".",
"getName",
"(",
")",
";",
"// get or create a jobs metric group",
"JobManagerJob... | ------------------------------------------------------------------------ | [
"------------------------------------------------------------------------"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/JobManagerMetricGroup.java#L61-L79 | train | Add a job to the job manager. | [
30522,
2270,
3105,
24805,
4590,
5558,
25526,
3388,
7277,
17058,
5587,
5558,
2497,
1006,
3105,
14413,
3105,
1007,
1063,
3105,
3593,
3105,
3593,
1027,
3105,
1012,
2131,
5558,
17062,
1006,
1007,
1025,
5164,
3105,
18442,
1027,
3105,
1012,
2131,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java | SecureUtil.readCertificate | public static Certificate readCertificate(String type, InputStream in, char[] password, String alias) {
return KeyUtil.readCertificate(type, in, password, alias);
} | java | public static Certificate readCertificate(String type, InputStream in, char[] password, String alias) {
return KeyUtil.readCertificate(type, in, password, alias);
} | [
"public",
"static",
"Certificate",
"readCertificate",
"(",
"String",
"type",
",",
"InputStream",
"in",
",",
"char",
"[",
"]",
"password",
",",
"String",
"alias",
")",
"{",
"return",
"KeyUtil",
".",
"readCertificate",
"(",
"type",
",",
"in",
",",
"password",
... | 读取Certification文件<br>
Certification为证书文件<br>
see: http://snowolf.iteye.com/blog/391931
@param type 类型,例如X.509
@param in {@link InputStream} 如果想从文件读取.cer文件,使用 {@link FileUtil#getInputStream(java.io.File)} 读取
@param password 密码
@param alias 别名
@return {@link KeyStore}
@since 4.4.1 | [
"读取Certification文件<br",
">",
"Certification为证书文件<br",
">",
"see",
":",
"http",
":",
"//",
"snowolf",
".",
"iteye",
".",
"com",
"/",
"blog",
"/",
"391931"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java#L364-L366 | train | Reads a certificate from an input stream. | [
30522,
2270,
10763,
8196,
3191,
17119,
3775,
8873,
16280,
1006,
5164,
2828,
1010,
20407,
25379,
1999,
1010,
25869,
1031,
1033,
20786,
1010,
5164,
14593,
1007,
1063,
2709,
3145,
21823,
2140,
1012,
3191,
17119,
3775,
8873,
16280,
1006,
2828,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/spark | sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java | ThriftHttpServlet.toCookieStr | private String toCookieStr(Cookie[] cookies) {
String cookieStr = "";
for (Cookie c : cookies) {
cookieStr += c.getName() + "=" + c.getValue() + " ;\n";
}
return cookieStr;
} | java | private String toCookieStr(Cookie[] cookies) {
String cookieStr = "";
for (Cookie c : cookies) {
cookieStr += c.getName() + "=" + c.getValue() + " ;\n";
}
return cookieStr;
} | [
"private",
"String",
"toCookieStr",
"(",
"Cookie",
"[",
"]",
"cookies",
")",
"{",
"String",
"cookieStr",
"=",
"\"\"",
";",
"for",
"(",
"Cookie",
"c",
":",
"cookies",
")",
"{",
"cookieStr",
"+=",
"c",
".",
"getName",
"(",
")",
"+",
"\"=\"",
"+",
"c",
... | Convert cookie array to human readable cookie string
@param cookies Cookie Array
@return String containing all the cookies separated by a newline character.
Each cookie is of the format [key]=[value] | [
"Convert",
"cookie",
"array",
"to",
"human",
"readable",
"cookie",
"string"
] | 25ee0474f47d9c30d6f553a7892d9549f91071cf | https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java#L242-L249 | train | toCookieStr This method converts a cookie array to a string. | [
30522,
2797,
5164,
2000,
3597,
23212,
4355,
2099,
1006,
17387,
1031,
1033,
16324,
1007,
1063,
5164,
16324,
16344,
1027,
1000,
1000,
1025,
2005,
1006,
17387,
1039,
1024,
16324,
1007,
1063,
16324,
16344,
1009,
1027,
1039,
1012,
2131,
18442,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-system/src/main/java/cn/hutool/system/SystemUtil.java | SystemUtil.append | protected static void append(StringBuilder builder, String caption, Object value) {
builder.append(caption).append(StrUtil.nullToDefault(Convert.toStr(value), "[n/a]")).append("\n");
} | java | protected static void append(StringBuilder builder, String caption, Object value) {
builder.append(caption).append(StrUtil.nullToDefault(Convert.toStr(value), "[n/a]")).append("\n");
} | [
"protected",
"static",
"void",
"append",
"(",
"StringBuilder",
"builder",
",",
"String",
"caption",
",",
"Object",
"value",
")",
"{",
"builder",
".",
"append",
"(",
"caption",
")",
".",
"append",
"(",
"StrUtil",
".",
"nullToDefault",
"(",
"Convert",
".",
"... | 输出到<code>StringBuilder</code>。
@param builder <code>StringBuilder</code>对象
@param caption 标题
@param value 值 | [
"输出到<code",
">",
"StringBuilder<",
"/",
"code",
">",
"。"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-system/src/main/java/cn/hutool/system/SystemUtil.java#L469-L471 | train | Append a caption and value to a StringBuilder. | [
30522,
5123,
10763,
11675,
10439,
10497,
1006,
5164,
8569,
23891,
2099,
12508,
1010,
5164,
14408,
3258,
1010,
4874,
3643,
1007,
1063,
12508,
1012,
10439,
10497,
1006,
14408,
3258,
1007,
1012,
10439,
10497,
1006,
2358,
22134,
4014,
1012,
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... |
netty/netty | codec-http2/src/main/java/io/netty/handler/codec/http2/HpackEncoder.java | HpackEncoder.setMaxHeaderTableSize | public void setMaxHeaderTableSize(ByteBuf out, long maxHeaderTableSize) throws Http2Exception {
if (maxHeaderTableSize < MIN_HEADER_TABLE_SIZE || maxHeaderTableSize > MAX_HEADER_TABLE_SIZE) {
throw connectionError(PROTOCOL_ERROR, "Header Table Size must be >= %d and <= %d but was %d",
... | java | public void setMaxHeaderTableSize(ByteBuf out, long maxHeaderTableSize) throws Http2Exception {
if (maxHeaderTableSize < MIN_HEADER_TABLE_SIZE || maxHeaderTableSize > MAX_HEADER_TABLE_SIZE) {
throw connectionError(PROTOCOL_ERROR, "Header Table Size must be >= %d and <= %d but was %d",
... | [
"public",
"void",
"setMaxHeaderTableSize",
"(",
"ByteBuf",
"out",
",",
"long",
"maxHeaderTableSize",
")",
"throws",
"Http2Exception",
"{",
"if",
"(",
"maxHeaderTableSize",
"<",
"MIN_HEADER_TABLE_SIZE",
"||",
"maxHeaderTableSize",
">",
"MAX_HEADER_TABLE_SIZE",
")",
"{",
... | Set the maximum table size. | [
"Set",
"the",
"maximum",
"table",
"size",
"."
] | ba06eafa1c1824bd154f1a380019e7ea2edf3c4c | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/HpackEncoder.java#L191-L203 | train | Sets the maximum allowed size of the HTTP2 headers. | [
30522,
2270,
11675,
2275,
17848,
30524,
2795,
1035,
2946,
1064,
1064,
4098,
4974,
8743,
3085,
5332,
4371,
1028,
4098,
1035,
20346,
1035,
2795,
1035,
2946,
1007,
1063,
5466,
4434,
2121,
29165,
1006,
8778,
1035,
7561,
1010,
1000,
20346,
2795,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/MutableDoubleArrayTrieInteger.java | MutableDoubleArrayTrieInteger.decreaseValues | public void decreaseValues(int from)
{
for (int state = 1; state < getBaseArraySize(); ++state)
{
int leaf = getBase(state) + UNUSED_CHAR_VALUE;
if (1 < leaf && leaf < getCheckArraySize() && getCheck(leaf) == state)
{
int value = getLeafValue(getBa... | java | public void decreaseValues(int from)
{
for (int state = 1; state < getBaseArraySize(); ++state)
{
int leaf = getBase(state) + UNUSED_CHAR_VALUE;
if (1 < leaf && leaf < getCheckArraySize() && getCheck(leaf) == state)
{
int value = getLeafValue(getBa... | [
"public",
"void",
"decreaseValues",
"(",
"int",
"from",
")",
"{",
"for",
"(",
"int",
"state",
"=",
"1",
";",
"state",
"<",
"getBaseArraySize",
"(",
")",
";",
"++",
"state",
")",
"{",
"int",
"leaf",
"=",
"getBase",
"(",
"state",
")",
"+",
"UNUSED_CHAR... | 将值大于等于from的统一递减1<br>
@param from | [
"将值大于等于from的统一递减1<br",
">"
] | a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce | https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/trie/datrie/MutableDoubleArrayTrieInteger.java#L767-L781 | train | Decrease the values of all the unclosed chars in the sequence. | [
30522,
2270,
11675,
9885,
10175,
15808,
1006,
20014,
2013,
1007,
1063,
2005,
1006,
20014,
2110,
1027,
1015,
1025,
2110,
1026,
2131,
15058,
2906,
9447,
5332,
4371,
1006,
1007,
1025,
1009,
1009,
2110,
1007,
1063,
20014,
7053,
1027,
2131,
1505... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-optimizer/src/main/java/org/apache/flink/optimizer/dag/OptimizerNode.java | OptimizerNode.getPredecessors | @Override
public Iterable<OptimizerNode> getPredecessors() {
List<OptimizerNode> allPredecessors = new ArrayList<OptimizerNode>();
for (DagConnection dagConnection : getIncomingConnections()) {
allPredecessors.add(dagConnection.getSource());
}
for (DagConnection conn : getBroadcastConnections()) {
al... | java | @Override
public Iterable<OptimizerNode> getPredecessors() {
List<OptimizerNode> allPredecessors = new ArrayList<OptimizerNode>();
for (DagConnection dagConnection : getIncomingConnections()) {
allPredecessors.add(dagConnection.getSource());
}
for (DagConnection conn : getBroadcastConnections()) {
al... | [
"@",
"Override",
"public",
"Iterable",
"<",
"OptimizerNode",
">",
"getPredecessors",
"(",
")",
"{",
"List",
"<",
"OptimizerNode",
">",
"allPredecessors",
"=",
"new",
"ArrayList",
"<",
"OptimizerNode",
">",
"(",
")",
";",
"for",
"(",
"DagConnection",
"dagConnec... | ------------------------------------------------------------------------ | [
"------------------------------------------------------------------------"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/dag/OptimizerNode.java#L271-L284 | train | Returns an iterable of all predecessor nodes. | [
30522,
1030,
2058,
15637,
2270,
2009,
6906,
3468,
1026,
23569,
27605,
6290,
3630,
3207,
1028,
2131,
28139,
3207,
9623,
21748,
2015,
1006,
1007,
1063,
2862,
1026,
23569,
27605,
6290,
3630,
3207,
1028,
2035,
28139,
3207,
9623,
21748,
2015,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/TemplateLocation.java | TemplateLocation.exists | public boolean exists(ResourcePatternResolver resolver) {
Assert.notNull(resolver, "Resolver must not be null");
if (resolver.getResource(this.path).exists()) {
return true;
}
try {
return anyExists(resolver);
}
catch (IOException ex) {
return false;
}
} | java | public boolean exists(ResourcePatternResolver resolver) {
Assert.notNull(resolver, "Resolver must not be null");
if (resolver.getResource(this.path).exists()) {
return true;
}
try {
return anyExists(resolver);
}
catch (IOException ex) {
return false;
}
} | [
"public",
"boolean",
"exists",
"(",
"ResourcePatternResolver",
"resolver",
")",
"{",
"Assert",
".",
"notNull",
"(",
"resolver",
",",
"\"Resolver must not be null\"",
")",
";",
"if",
"(",
"resolver",
".",
"getResource",
"(",
"this",
".",
"path",
")",
".",
"exis... | Determine if this template location exists using the specified
{@link ResourcePatternResolver}.
@param resolver the resolver used to test if the location exists
@return {@code true} if the location exists. | [
"Determine",
"if",
"this",
"template",
"location",
"exists",
"using",
"the",
"specified",
"{"
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/TemplateLocation.java#L47-L58 | train | Checks if the resource exists in the given resolver. | [
30522,
2270,
22017,
20898,
6526,
1006,
7692,
4502,
12079,
16118,
2229,
4747,
6299,
10663,
2099,
1007,
1063,
20865,
1012,
2025,
11231,
3363,
1006,
10663,
2099,
1010,
1000,
10663,
2099,
2442,
2025,
2022,
19701,
1000,
1007,
1025,
2065,
1006,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java | IoUtil.readLines | public static <T extends Collection<String>> T readLines(InputStream in, Charset charset, T collection) throws IORuntimeException {
return readLines(getReader(in, charset), collection);
} | java | public static <T extends Collection<String>> T readLines(InputStream in, Charset charset, T collection) throws IORuntimeException {
return readLines(getReader(in, charset), collection);
} | [
"public",
"static",
"<",
"T",
"extends",
"Collection",
"<",
"String",
">",
">",
"T",
"readLines",
"(",
"InputStream",
"in",
",",
"Charset",
"charset",
",",
"T",
"collection",
")",
"throws",
"IORuntimeException",
"{",
"return",
"readLines",
"(",
"getReader",
... | 从流中读取内容
@param <T> 集合类型
@param in 输入流
@param charset 字符集
@param collection 返回集合
@return 内容
@throws IORuntimeException IO异常 | [
"从流中读取内容"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java#L658-L660 | train | Reads the contents of the given input stream into the given collection. | [
30522,
2270,
10763,
1026,
1056,
8908,
3074,
1026,
5164,
1028,
1028,
1056,
3191,
12735,
1006,
20407,
25379,
1999,
1010,
25869,
13462,
25869,
13462,
1010,
1056,
3074,
1007,
11618,
22834,
15532,
7292,
10288,
24422,
1063,
2709,
3191,
12735,
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... |
SeleniumHQ/selenium | java/client/src/org/openqa/selenium/interactions/Actions.java | Actions.release | public Actions release(WebElement target) {
if (isBuildingActions()) {
action.addAction(new ButtonReleaseAction(jsonMouse, (Locatable) target));
}
return moveInTicks(target, 0, 0).tick(defaultMouse.createPointerUp(LEFT.asArg()));
} | java | public Actions release(WebElement target) {
if (isBuildingActions()) {
action.addAction(new ButtonReleaseAction(jsonMouse, (Locatable) target));
}
return moveInTicks(target, 0, 0).tick(defaultMouse.createPointerUp(LEFT.asArg()));
} | [
"public",
"Actions",
"release",
"(",
"WebElement",
"target",
")",
"{",
"if",
"(",
"isBuildingActions",
"(",
")",
")",
"{",
"action",
".",
"addAction",
"(",
"new",
"ButtonReleaseAction",
"(",
"jsonMouse",
",",
"(",
"Locatable",
")",
"target",
")",
")",
";",... | Releases the depressed left mouse button, in the middle of the given element.
This is equivalent to:
<i>Actions.moveToElement(onElement).release()</i>
Invoking this action without invoking {@link #clickAndHold()} first will result in
undefined behaviour.
@param target Element to release the mouse button above.
@retur... | [
"Releases",
"the",
"depressed",
"left",
"mouse",
"button",
"in",
"the",
"middle",
"of",
"the",
"given",
"element",
".",
"This",
"is",
"equivalent",
"to",
":",
"<i",
">",
"Actions",
".",
"moveToElement",
"(",
"onElement",
")",
".",
"release",
"()",
"<",
"... | 7af172729f17b20269c8ca4ea6f788db48616535 | https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/interactions/Actions.java#L263-L269 | train | Release the mouse to the given element. | [
30522,
2270,
4506,
2713,
1006,
4773,
12260,
3672,
4539,
1007,
1063,
2065,
1006,
2003,
25820,
18908,
8496,
1006,
1007,
1007,
1063,
2895,
1012,
5587,
18908,
3258,
1006,
2047,
6462,
16570,
19500,
18908,
3258,
1006,
1046,
3385,
27711,
2063,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hankcs/HanLP | src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java | DoubleArrayTrie.commonPrefixSearchWithValue | public LinkedList<Map.Entry<String, V>> commonPrefixSearchWithValue(char[] keyChars, int begin)
{
int len = keyChars.length;
LinkedList<Map.Entry<String, V>> result = new LinkedList<Map.Entry<String, V>>();
int b = base[0];
int n;
int p;
for (int i = begin; i < len; ... | java | public LinkedList<Map.Entry<String, V>> commonPrefixSearchWithValue(char[] keyChars, int begin)
{
int len = keyChars.length;
LinkedList<Map.Entry<String, V>> result = new LinkedList<Map.Entry<String, V>>();
int b = base[0];
int n;
int p;
for (int i = begin; i < len; ... | [
"public",
"LinkedList",
"<",
"Map",
".",
"Entry",
"<",
"String",
",",
"V",
">",
">",
"commonPrefixSearchWithValue",
"(",
"char",
"[",
"]",
"keyChars",
",",
"int",
"begin",
")",
"{",
"int",
"len",
"=",
"keyChars",
".",
"length",
";",
"LinkedList",
"<",
... | 优化的前缀查询,可以复用字符数组
@param keyChars
@param begin
@return | [
"优化的前缀查询,可以复用字符数组"
] | a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce | https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/trie/DoubleArrayTrie.java#L869-L903 | train | Common prefix search with value. | [
30522,
2270,
5799,
9863,
1026,
4949,
1012,
4443,
1026,
5164,
1010,
1058,
1028,
1028,
2691,
28139,
8873,
2595,
17310,
11140,
24415,
10175,
5657,
1006,
25869,
1031,
1033,
3145,
7507,
2869,
1010,
20014,
4088,
1007,
1063,
20014,
18798,
1027,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/QueryableStateClient.java | QueryableStateClient.getKvState | @PublicEvolving
public <K, S extends State, V> CompletableFuture<S> getKvState(
final JobID jobId,
final String queryableStateName,
final K key,
final TypeInformation<K> keyTypeInfo,
final StateDescriptor<S, V> stateDescriptor) {
return getKvState(jobId, queryableStateName, key, VoidNamespace.INSTANC... | java | @PublicEvolving
public <K, S extends State, V> CompletableFuture<S> getKvState(
final JobID jobId,
final String queryableStateName,
final K key,
final TypeInformation<K> keyTypeInfo,
final StateDescriptor<S, V> stateDescriptor) {
return getKvState(jobId, queryableStateName, key, VoidNamespace.INSTANC... | [
"@",
"PublicEvolving",
"public",
"<",
"K",
",",
"S",
"extends",
"State",
",",
"V",
">",
"CompletableFuture",
"<",
"S",
">",
"getKvState",
"(",
"final",
"JobID",
"jobId",
",",
"final",
"String",
"queryableStateName",
",",
"final",
"K",
"key",
",",
"final",
... | Returns a future holding the request result.
@param jobId JobID of the job the queryable state belongs to.
@param queryableStateName Name under which the state is queryable.
@param key The key we are interested in.
@param keyTypeInfo The {@link TypeInformation} of the key.
@p... | [
"Returns",
"a",
"future",
"holding",
"the",
"request",
"result",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/QueryableStateClient.java#L219-L229 | train | Gets the state of a Cluster identified by the given parameters. | [
30522,
1030,
2270,
6777,
4747,
6455,
2270,
1026,
1047,
1010,
1055,
8908,
2110,
1010,
1058,
1028,
4012,
10814,
10880,
11263,
11244,
1026,
1055,
1028,
2131,
2243,
15088,
12259,
1006,
2345,
3105,
3593,
3105,
3593,
1010,
2345,
5164,
23032,
3085... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
looly/hutool | hutool-log/src/main/java/cn/hutool/log/StaticLog.java | StaticLog.warn | public static void warn(Log log, Throwable e, String format, Object... arguments) {
if (false == log(log, Level.WARN, e, format, arguments)) {
log.warn(e, format, arguments);
}
} | java | public static void warn(Log log, Throwable e, String format, Object... arguments) {
if (false == log(log, Level.WARN, e, format, arguments)) {
log.warn(e, format, arguments);
}
} | [
"public",
"static",
"void",
"warn",
"(",
"Log",
"log",
",",
"Throwable",
"e",
",",
"String",
"format",
",",
"Object",
"...",
"arguments",
")",
"{",
"if",
"(",
"false",
"==",
"log",
"(",
"log",
",",
"Level",
".",
"WARN",
",",
"e",
",",
"format",
","... | Warn等级日志,小于Error
@param log 日志对象
@param e 需在日志中堆栈打印的异常
@param format 格式文本,{} 代表变量
@param arguments 变量对应的参数 | [
"Warn等级日志,小于Error"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-log/src/main/java/cn/hutool/log/StaticLog.java#L138-L142 | train | Logs a message at the WARN level. | [
30522,
2270,
10763,
11675,
11582,
1006,
8833,
8833,
1010,
5466,
3085,
1041,
1010,
5164,
4289,
1010,
4874,
1012,
1012,
1012,
9918,
1007,
1063,
2065,
1006,
6270,
1027,
1027,
8833,
1006,
8833,
1010,
2504,
1012,
11582,
1010,
1041,
1010,
4289,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java | TaskSlotTable.markSlotActive | public boolean markSlotActive(AllocationID allocationId) throws SlotNotFoundException {
checkInit();
TaskSlot taskSlot = getTaskSlot(allocationId);
if (taskSlot != null) {
if (taskSlot.markActive()) {
// unregister a potential timeout
LOG.info("Activate slot {}.", allocationId);
timerService.unr... | java | public boolean markSlotActive(AllocationID allocationId) throws SlotNotFoundException {
checkInit();
TaskSlot taskSlot = getTaskSlot(allocationId);
if (taskSlot != null) {
if (taskSlot.markActive()) {
// unregister a potential timeout
LOG.info("Activate slot {}.", allocationId);
timerService.unr... | [
"public",
"boolean",
"markSlotActive",
"(",
"AllocationID",
"allocationId",
")",
"throws",
"SlotNotFoundException",
"{",
"checkInit",
"(",
")",
";",
"TaskSlot",
"taskSlot",
"=",
"getTaskSlot",
"(",
"allocationId",
")",
";",
"if",
"(",
"taskSlot",
"!=",
"null",
"... | Marks the slot under the given allocation id as active. If the slot could not be found, then
a {@link SlotNotFoundException} is thrown.
@param allocationId to identify the task slot to mark as active
@throws SlotNotFoundException if the slot could not be found for the given allocation id
@return True if the slot could... | [
"Marks",
"the",
"slot",
"under",
"the",
"given",
"allocation",
"id",
"as",
"active",
".",
"If",
"the",
"slot",
"could",
"not",
"be",
"found",
"then",
"a",
"{",
"@link",
"SlotNotFoundException",
"}",
"is",
"thrown",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java#L229-L248 | train | Mark the slot active. | [
30522,
2270,
22017,
20898,
6017,
10994,
19620,
1006,
16169,
3593,
16169,
3593,
1007,
11618,
10453,
17048,
14876,
8630,
10288,
24422,
1063,
4638,
5498,
2102,
1006,
1007,
1025,
8518,
10994,
8518,
10994,
1027,
2131,
10230,
5705,
10994,
1006,
161... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java | Execution.triggerCheckpoint | public void triggerCheckpoint(long checkpointId, long timestamp, CheckpointOptions checkpointOptions) {
triggerCheckpointHelper(checkpointId, timestamp, checkpointOptions, false);
} | java | public void triggerCheckpoint(long checkpointId, long timestamp, CheckpointOptions checkpointOptions) {
triggerCheckpointHelper(checkpointId, timestamp, checkpointOptions, false);
} | [
"public",
"void",
"triggerCheckpoint",
"(",
"long",
"checkpointId",
",",
"long",
"timestamp",
",",
"CheckpointOptions",
"checkpointOptions",
")",
"{",
"triggerCheckpointHelper",
"(",
"checkpointId",
",",
"timestamp",
",",
"checkpointOptions",
",",
"false",
")",
";",
... | Trigger a new checkpoint on the task of this execution.
@param checkpointId of th checkpoint to trigger
@param timestamp of the checkpoint to trigger
@param checkpointOptions of the checkpoint to trigger | [
"Trigger",
"a",
"new",
"checkpoint",
"on",
"the",
"task",
"of",
"this",
"execution",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java#L868-L870 | train | Trigger a checkpoint. | [
30522,
2270,
11675,
9495,
5403,
3600,
8400,
1006,
2146,
26520,
3593,
1010,
2146,
2335,
15464,
2361,
1010,
26520,
7361,
9285,
26520,
7361,
9285,
1007,
1063,
9495,
5403,
3600,
8400,
16001,
4842,
1006,
26520,
3593,
1010,
2335,
15464,
2361,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-core/src/main/java/org/apache/flink/api/common/operators/GenericDataSinkBase.java | GenericDataSinkBase.accept | @Override
public void accept(Visitor<Operator<?>> visitor) {
boolean descend = visitor.preVisit(this);
if (descend) {
this.input.accept(visitor);
visitor.postVisit(this);
}
} | java | @Override
public void accept(Visitor<Operator<?>> visitor) {
boolean descend = visitor.preVisit(this);
if (descend) {
this.input.accept(visitor);
visitor.postVisit(this);
}
} | [
"@",
"Override",
"public",
"void",
"accept",
"(",
"Visitor",
"<",
"Operator",
"<",
"?",
">",
">",
"visitor",
")",
"{",
"boolean",
"descend",
"=",
"visitor",
".",
"preVisit",
"(",
"this",
")",
";",
"if",
"(",
"descend",
")",
"{",
"this",
".",
"input",... | Accepts the visitor and applies it this instance. This method applies the visitor in a depth-first traversal.
The visitors pre-visit method is called and, if returning
<tt>true</tt>, the visitor is recursively applied on the single input. After the recursion returned,
the post-visit method is called.
@param visitor Th... | [
"Accepts",
"the",
"visitor",
"and",
"applies",
"it",
"this",
"instance",
".",
"This",
"method",
"applies",
"the",
"visitor",
"in",
"a",
"depth",
"-",
"first",
"traversal",
".",
"The",
"visitors",
"pre",
"-",
"visit",
"method",
"is",
"called",
"and",
"if",
... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/GenericDataSinkBase.java#L216-L223 | train | Visit this node the input node and the result node. | [
30522,
1030,
2058,
15637,
2270,
11675,
5138,
1006,
10367,
1026,
6872,
1026,
1029,
1028,
1028,
10367,
1007,
1063,
22017,
20898,
18855,
1027,
10367,
1012,
3653,
11365,
4183,
1006,
2023,
1007,
1025,
2065,
1006,
18855,
1007,
1063,
2023,
1012,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
netty/netty | codec-http/src/main/java/io/netty/handler/codec/http/cookie/ServerCookieEncoder.java | ServerCookieEncoder.encode | public String encode(Cookie cookie) {
final String name = checkNotNull(cookie, "cookie").name();
final String value = cookie.value() != null ? cookie.value() : "";
validateCookie(name, value);
StringBuilder buf = stringBuilder();
if (cookie.wrap()) {
addQuoted(buf,... | java | public String encode(Cookie cookie) {
final String name = checkNotNull(cookie, "cookie").name();
final String value = cookie.value() != null ? cookie.value() : "";
validateCookie(name, value);
StringBuilder buf = stringBuilder();
if (cookie.wrap()) {
addQuoted(buf,... | [
"public",
"String",
"encode",
"(",
"Cookie",
"cookie",
")",
"{",
"final",
"String",
"name",
"=",
"checkNotNull",
"(",
"cookie",
",",
"\"cookie\"",
")",
".",
"name",
"(",
")",
";",
"final",
"String",
"value",
"=",
"cookie",
".",
"value",
"(",
")",
"!=",... | Encodes the specified cookie into a Set-Cookie header value.
@param cookie the cookie
@return a single Set-Cookie header value | [
"Encodes",
"the",
"specified",
"cookie",
"into",
"a",
"Set",
"-",
"Cookie",
"header",
"value",
"."
] | ba06eafa1c1824bd154f1a380019e7ea2edf3c4c | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/cookie/ServerCookieEncoder.java#L90-L129 | train | Encode a Cookie object into a String. | [
30522,
2270,
5164,
4372,
16044,
1006,
17387,
17387,
1007,
1063,
2345,
5164,
2171,
1027,
4638,
17048,
11231,
3363,
1006,
17387,
1010,
1000,
17387,
1000,
1007,
1012,
2171,
1006,
1007,
1025,
2345,
5164,
3643,
1027,
17387,
1012,
3643,
1006,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobEdge.java | JobEdge.connecDataSet | public void connecDataSet(IntermediateDataSet dataSet) {
if (dataSet == null) {
throw new NullPointerException();
}
if (this.source != null) {
throw new IllegalStateException("The edge is already connected.");
}
if (!dataSet.getId().equals(sourceId)) {
throw new IllegalArgumentException("The data set... | java | public void connecDataSet(IntermediateDataSet dataSet) {
if (dataSet == null) {
throw new NullPointerException();
}
if (this.source != null) {
throw new IllegalStateException("The edge is already connected.");
}
if (!dataSet.getId().equals(sourceId)) {
throw new IllegalArgumentException("The data set... | [
"public",
"void",
"connecDataSet",
"(",
"IntermediateDataSet",
"dataSet",
")",
"{",
"if",
"(",
"dataSet",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"source",
"!=",
"null",
")",
"{",
"throw... | -------------------------------------------------------------------------------------------- | [
"--------------------------------------------------------------------------------------------"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobEdge.java#L132-L144 | train | Connects the given intermediate data set to this edge. | [
30522,
2270,
11675,
9530,
2638,
19797,
6790,
13462,
1006,
7783,
2850,
18260,
2102,
2951,
13462,
1007,
1063,
2065,
1006,
2951,
13462,
1027,
1027,
19701,
1007,
1063,
5466,
2047,
19701,
8400,
7869,
2595,
24422,
1006,
1007,
1025,
1065,
2065,
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/map/MapUtil.java | MapUtil.wrap | public static <K, V> MapWrapper<K, V> wrap(Map<K, V> map) {
return new MapWrapper<K, V>(map);
} | java | public static <K, V> MapWrapper<K, V> wrap(Map<K, V> map) {
return new MapWrapper<K, V>(map);
} | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"MapWrapper",
"<",
"K",
",",
"V",
">",
"wrap",
"(",
"Map",
"<",
"K",
",",
"V",
">",
"map",
")",
"{",
"return",
"new",
"MapWrapper",
"<",
"K",
",",
"V",
">",
"(",
"map",
")",
";",
"}"
] | 创建Map包装类MapWrapper<br>
{@link MapWrapper}对Map做一次包装
@param map 被代理的Map
@return {@link MapWrapper}
@since 4.5.4 | [
"创建Map包装类MapWrapper<br",
">",
"{",
"@link",
"MapWrapper",
"}",
"对Map做一次包装"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java#L686-L688 | train | Creates a wrapper around the given map. | [
30522,
2270,
10763,
1026,
1047,
1010,
1058,
1028,
4949,
13088,
29098,
2121,
1026,
1047,
1010,
1058,
1028,
10236,
1006,
4949,
1026,
1047,
1010,
1058,
1028,
4949,
1007,
1063,
2709,
2047,
4949,
13088,
29098,
2121,
1026,
1047,
1010,
1058,
1028,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
netty/netty | codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java | WebSocketClientHandshaker.processHandshake | public final ChannelFuture processHandshake(final Channel channel, HttpResponse response,
final ChannelPromise promise) {
if (response instanceof FullHttpResponse) {
try {
finishHandshake(channel, (FullHttpResponse) response);
... | java | public final ChannelFuture processHandshake(final Channel channel, HttpResponse response,
final ChannelPromise promise) {
if (response instanceof FullHttpResponse) {
try {
finishHandshake(channel, (FullHttpResponse) response);
... | [
"public",
"final",
"ChannelFuture",
"processHandshake",
"(",
"final",
"Channel",
"channel",
",",
"HttpResponse",
"response",
",",
"final",
"ChannelPromise",
"promise",
")",
"{",
"if",
"(",
"response",
"instanceof",
"FullHttpResponse",
")",
"{",
"try",
"{",
"finish... | Process the opening handshake initiated by {@link #handshake}}.
@param channel
Channel
@param response
HTTP response containing the closing handshake details
@param promise
the {@link ChannelPromise} to notify once the handshake completes.
@return future
the {@link ChannelFuture} which is notified once the handshake c... | [
"Process",
"the",
"opening",
"handshake",
"initiated",
"by",
"{",
"@link",
"#handshake",
"}}",
"."
] | ba06eafa1c1824bd154f1a380019e7ea2edf3c4c | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java#L389-L448 | train | Process the handshake. | [
30522,
2270,
2345,
3149,
11263,
11244,
2832,
11774,
7377,
3489,
1006,
2345,
3149,
3149,
1010,
8299,
6072,
26029,
3366,
3433,
1010,
2345,
3149,
21572,
28732,
4872,
1007,
1063,
2065,
1006,
3433,
6013,
11253,
2440,
11039,
25856,
6072,
26029,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/flink | flink-core/src/main/java/org/apache/flink/util/LambdaUtil.java | LambdaUtil.applyToAllWhileSuppressingExceptions | public static <T> void applyToAllWhileSuppressingExceptions(
Iterable<T> inputs,
ThrowingConsumer<T, ? extends Exception> throwingConsumer) throws Exception {
if (inputs != null && throwingConsumer != null) {
Exception exception = null;
for (T input : inputs) {
if (input != null) {
try {
t... | java | public static <T> void applyToAllWhileSuppressingExceptions(
Iterable<T> inputs,
ThrowingConsumer<T, ? extends Exception> throwingConsumer) throws Exception {
if (inputs != null && throwingConsumer != null) {
Exception exception = null;
for (T input : inputs) {
if (input != null) {
try {
t... | [
"public",
"static",
"<",
"T",
">",
"void",
"applyToAllWhileSuppressingExceptions",
"(",
"Iterable",
"<",
"T",
">",
"inputs",
",",
"ThrowingConsumer",
"<",
"T",
",",
"?",
"extends",
"Exception",
">",
"throwingConsumer",
")",
"throws",
"Exception",
"{",
"if",
"(... | This method supplies all elements from the input to the consumer. Exceptions that happen on elements are
suppressed until all elements are processed. If exceptions happened for one or more of the inputs, they are
reported in a combining suppressed exception.
@param inputs iterator for all inputs to the throwingConsume... | [
"This",
"method",
"supplies",
"all",
"elements",
"from",
"the",
"input",
"to",
"the",
"consumer",
".",
"Exceptions",
"that",
"happen",
"on",
"elements",
"are",
"suppressed",
"until",
"all",
"elements",
"are",
"processed",
".",
"If",
"exceptions",
"happened",
"... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/LambdaUtil.java#L45-L67 | train | Apply to all elements of the input sequence while suppressing exceptions. | [
30522,
2270,
10763,
1026,
1056,
1028,
11675,
6611,
3406,
8095,
19927,
6342,
9397,
8303,
23496,
2595,
24422,
2015,
1006,
2009,
6906,
3468,
1026,
1056,
1028,
20407,
1010,
6886,
8663,
23545,
2099,
1026,
1056,
1010,
1029,
8908,
6453,
1028,
6886... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.