repo stringlengths 7 59 | path stringlengths 17 234 | func_name stringlengths 3 117 | original_string stringlengths 63 281k | language stringclasses 1
value | code stringlengths 63 281k | code_tokens listlengths 20 16.3k | docstring stringlengths 1 34k | docstring_tokens listlengths 1 3.44k | sha stringlengths 40 40 | url stringlengths 106 339 | partition stringclasses 3
values | summary stringlengths 3 248 | output stringlengths 142 281k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
JOML-CI/JOML | src/org/joml/Matrix4x3d.java | Matrix4x3d.rotation | public Matrix4x3d rotation(double angle, Vector3fc axis) {
return rotation(angle, axis.x(), axis.y(), axis.z());
} | java | public Matrix4x3d rotation(double angle, Vector3fc axis) {
return rotation(angle, axis.x(), axis.y(), axis.z());
} | [
"public",
"Matrix4x3d",
"rotation",
"(",
"double",
"angle",
",",
"Vector3fc",
"axis",
")",
"{",
"return",
"rotation",
"(",
"angle",
",",
"axis",
".",
"x",
"(",
")",
",",
"axis",
".",
"y",
"(",
")",
",",
"axis",
".",
"z",
"(",
")",
")",
";",
"}"
] | Set this matrix to a rotation matrix which rotates the given radians about a given axis.
<p>
The axis described by the <code>axis</code> vector needs to be a unit vector.
<p>
When used with a right-handed coordinate system, the produced rotation will rotate a vector
counter-clockwise around the rotation axis, when view... | [
"Set",
"this",
"matrix",
"to",
"a",
"rotation",
"matrix",
"which",
"rotates",
"the",
"given",
"radians",
"about",
"a",
"given",
"axis",
".",
"<p",
">",
"The",
"axis",
"described",
"by",
"the",
"<code",
">",
"axis<",
"/",
"code",
">",
"vector",
"needs",
... | ce2652fc236b42bda3875c591f8e6645048a678f | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3d.java#L2886-L2888 | train | Create a rotation matrix that rotates the given axis. | Of course, here is the Java code you requested:
```java
public Matrix4x3d rotation(double angle, Vector3fc axis) {
return rotation(angle, axis.x(), axis.y(), axis.z());
}
```
Hope this helps! |
GenesysPureEngage/workspace-client-java | src/main/java/com/genesys/internal/workspace/api/TargetsApi.java | TargetsApi.getTargetWithHttpInfo | public ApiResponse<TargetsResponse> getTargetWithHttpInfo(BigDecimal id, String type) throws ApiException {
com.squareup.okhttp.Call call = getTargetValidateBeforeCall(id, type, null, null);
Type localVarReturnType = new TypeToken<TargetsResponse>(){}.getType();
return apiClient.execute(call, lo... | java | public ApiResponse<TargetsResponse> getTargetWithHttpInfo(BigDecimal id, String type) throws ApiException {
com.squareup.okhttp.Call call = getTargetValidateBeforeCall(id, type, null, null);
Type localVarReturnType = new TypeToken<TargetsResponse>(){}.getType();
return apiClient.execute(call, lo... | [
"public",
"ApiResponse",
"<",
"TargetsResponse",
">",
"getTargetWithHttpInfo",
"(",
"BigDecimal",
"id",
",",
"String",
"type",
")",
"throws",
"ApiException",
"{",
"com",
".",
"squareup",
".",
"okhttp",
".",
"Call",
"call",
"=",
"getTargetValidateBeforeCall",
"(",
... | Get a target
Get a specific target by type and ID. Targets can be agents, agent groups, queues, route points, skills, and custom contacts.
@param id The ID of the target. (required)
@param type The type of target to retrieve. (required)
@return ApiResponse<TargetsResponse>
@throws ApiException If fail to call the... | [
"Get",
"a",
"target",
"Get",
"a",
"specific",
"target",
"by",
"type",
"and",
"ID",
".",
"Targets",
"can",
"be",
"agents",
"agent",
"groups",
"queues",
"route",
"points",
"skills",
"and",
"custom",
"contacts",
"."
] | 509fdd9e89b9359d012f9a72be95037a3cef53e6 | https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/TargetsApi.java#L760-L764 | train | Get target Get target information. Returns target information. | Of course, here is the Java code you requested:
```java
public ApiResponse<TargetsResponse> getTargetWithHttpInfo(BigDecimal id, String type) throws ApiException {
com.squareup.okhttp.Call call = getTargetValidateBeforeCall(id, type, null, null);
Type localVarReturnType = new TypeToken<TargetsResponse>... |
Azure/azure-sdk-for-java | mediaservices/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_06_01_preview/implementation/MediaservicesInner.java | MediaservicesInner.getBySubscriptionAsync | public Observable<SubscriptionMediaServiceInner> getBySubscriptionAsync(String accountName) {
return getBySubscriptionWithServiceResponseAsync(accountName).map(new Func1<ServiceResponse<SubscriptionMediaServiceInner>, SubscriptionMediaServiceInner>() {
@Override
public SubscriptionMediaS... | java | public Observable<SubscriptionMediaServiceInner> getBySubscriptionAsync(String accountName) {
return getBySubscriptionWithServiceResponseAsync(accountName).map(new Func1<ServiceResponse<SubscriptionMediaServiceInner>, SubscriptionMediaServiceInner>() {
@Override
public SubscriptionMediaS... | [
"public",
"Observable",
"<",
"SubscriptionMediaServiceInner",
">",
"getBySubscriptionAsync",
"(",
"String",
"accountName",
")",
"{",
"return",
"getBySubscriptionWithServiceResponseAsync",
"(",
"accountName",
")",
".",
"map",
"(",
"new",
"Func1",
"<",
"ServiceResponse",
... | Get a Media Services account.
Get the details of a Media Services account.
@param accountName The Media Services account name.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the SubscriptionMediaServiceInner object | [
"Get",
"a",
"Media",
"Services",
"account",
".",
"Get",
"the",
"details",
"of",
"a",
"Media",
"Services",
"account",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_06_01_preview/implementation/MediaservicesInner.java#L934-L941 | train | Gets a list of media services in an account. | Of course, here is the Java code you requested:
```java
public Observable<SubscriptionMediaServiceInner> getBySubscriptionAsync(String accountName) {
return getBySubscriptionWithServiceResponseAsync(accountName).map(new Func1<ServiceResponse<SubscriptionMediaServiceInner>, SubscriptionMediaServiceInner>() {
... |
sargue/mailgun | src/main/java/net/sargue/mailgun/Configuration.java | Configuration.registerConverter | public <T> Configuration registerConverter(ContentConverter<? super T> converter,
Class<T> classToConvert)
{
converters.add(new Converter<>(classToConvert, converter));
return this;
} | java | public <T> Configuration registerConverter(ContentConverter<? super T> converter,
Class<T> classToConvert)
{
converters.add(new Converter<>(classToConvert, converter));
return this;
} | [
"public",
"<",
"T",
">",
"Configuration",
"registerConverter",
"(",
"ContentConverter",
"<",
"?",
"super",
"T",
">",
"converter",
",",
"Class",
"<",
"T",
">",
"classToConvert",
")",
"{",
"converters",
".",
"add",
"(",
"new",
"Converter",
"<>",
"(",
"classT... | Registers a converter.
<p>
Converters are used mainly by the
{@link net.sargue.mailgun.content.Builder#text(Object)} method.
<p>
They are matched in declaration order checking for assignability
(inheritance). So you can have a a {@link java.util.Date} converter
which will be applied to a {@link java.sql.Timestamp} obje... | [
"Registers",
"a",
"converter",
".",
"<p",
">",
"Converters",
"are",
"used",
"mainly",
"by",
"the",
"{",
"@link",
"net",
".",
"sargue",
".",
"mailgun",
".",
"content",
".",
"Builder#text",
"(",
"Object",
")",
"}",
"method",
".",
"<p",
">",
"They",
"are"... | 2ffb0a156f3f3666eb1bb2db661451b9377c3d11 | https://github.com/sargue/mailgun/blob/2ffb0a156f3f3666eb1bb2db661451b9377c3d11/src/main/java/net/sargue/mailgun/Configuration.java#L369-L374 | train | Register a content converter for a specific class. | Of course, here is the Java code you requested:
```java
public <T> Configuration registerConverter(ContentConverter<? super T> converter,
Class<T> classToConvert)
{
converters.add(new Converter<>(classToConvert, converter));
return this;
}
```
Hop... |
couchbase/couchbase-java-client | src/main/java/com/couchbase/client/java/CouchbaseCluster.java | CouchbaseCluster.getCachedBucket | private Bucket getCachedBucket(final String name) {
Bucket cachedBucket = bucketCache.get(name);
if(cachedBucket != null) {
if (cachedBucket.isClosed()) {
LOGGER.debug("Not returning cached bucket \"{}\", because it is closed.", name);
bucketCache.remove(name... | java | private Bucket getCachedBucket(final String name) {
Bucket cachedBucket = bucketCache.get(name);
if(cachedBucket != null) {
if (cachedBucket.isClosed()) {
LOGGER.debug("Not returning cached bucket \"{}\", because it is closed.", name);
bucketCache.remove(name... | [
"private",
"Bucket",
"getCachedBucket",
"(",
"final",
"String",
"name",
")",
"{",
"Bucket",
"cachedBucket",
"=",
"bucketCache",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"cachedBucket",
"!=",
"null",
")",
"{",
"if",
"(",
"cachedBucket",
".",
"isClosed"... | Helper method to get a bucket instead of opening it if it is cached already.
@param name the name of the bucket
@return the cached bucket if found, null if not. | [
"Helper",
"method",
"to",
"get",
"a",
"bucket",
"instead",
"of",
"opening",
"it",
"if",
"it",
"is",
"cached",
"already",
"."
] | f36a0ee0c66923bdde47838ca543e50cbaa99e14 | https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/CouchbaseCluster.java#L368-L382 | train | Gets the cached bucket. | Of course, here is the Java code you requested:
```java
private Bucket getCachedBucket(final String name) {
Bucket cachedBucket = bucketCache.get(name);
if(cachedBucket != null) {
if (cachedBucket.isClosed()) {
LOGGER.debug("Not returning cached bucket \"{}\", because it is... |
spring-projects/spring-security | config/src/main/java/org/springframework/security/config/annotation/web/configurers/LogoutConfigurer.java | LogoutConfigurer.createLogoutFilter | private LogoutFilter createLogoutFilter(H http) throws Exception {
logoutHandlers.add(contextLogoutHandler);
LogoutHandler[] handlers = logoutHandlers
.toArray(new LogoutHandler[logoutHandlers.size()]);
LogoutFilter result = new LogoutFilter(getLogoutSuccessHandler(), handlers);
result.setLogoutRequestMatch... | java | private LogoutFilter createLogoutFilter(H http) throws Exception {
logoutHandlers.add(contextLogoutHandler);
LogoutHandler[] handlers = logoutHandlers
.toArray(new LogoutHandler[logoutHandlers.size()]);
LogoutFilter result = new LogoutFilter(getLogoutSuccessHandler(), handlers);
result.setLogoutRequestMatch... | [
"private",
"LogoutFilter",
"createLogoutFilter",
"(",
"H",
"http",
")",
"throws",
"Exception",
"{",
"logoutHandlers",
".",
"add",
"(",
"contextLogoutHandler",
")",
";",
"LogoutHandler",
"[",
"]",
"handlers",
"=",
"logoutHandlers",
".",
"toArray",
"(",
"new",
"Lo... | Creates the {@link LogoutFilter} using the {@link LogoutHandler} instances, the
{@link #logoutSuccessHandler(LogoutSuccessHandler)} and the
{@link #logoutUrl(String)}.
@param http the builder to use
@return the {@link LogoutFilter} to use.
@throws Exception | [
"Creates",
"the",
"{",
"@link",
"LogoutFilter",
"}",
"using",
"the",
"{",
"@link",
"LogoutHandler",
"}",
"instances",
"the",
"{",
"@link",
"#logoutSuccessHandler",
"(",
"LogoutSuccessHandler",
")",
"}",
"and",
"the",
"{",
"@link",
"#logoutUrl",
"(",
"String",
... | 98a8467e4c2ae05b3e09c67ece856944fa48ed23 | https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/config/src/main/java/org/springframework/security/config/annotation/web/configurers/LogoutConfigurer.java#L330-L338 | test | Create a LogoutFilter. | Of course, here is the Java code you requested:
```java
private LogoutFilter createLogoutFilter(H http) throws Exception {
logoutHandlers.add(contextLogoutHandler);
LogoutHandler[] handlers = logoutHandlers
.toArray(new LogoutHandler[logoutHandlers.size()]);
LogoutFilter result = new LogoutFilter(getLogoutSu... |
aws/aws-sdk-java | aws-java-sdk-datapipeline/src/main/java/com/amazonaws/services/datapipeline/model/transform/ReportTaskProgressRequestMarshaller.java | ReportTaskProgressRequestMarshaller.marshall | public void marshall(ReportTaskProgressRequest reportTaskProgressRequest, ProtocolMarshaller protocolMarshaller) {
if (reportTaskProgressRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(repo... | java | public void marshall(ReportTaskProgressRequest reportTaskProgressRequest, ProtocolMarshaller protocolMarshaller) {
if (reportTaskProgressRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(repo... | [
"public",
"void",
"marshall",
"(",
"ReportTaskProgressRequest",
"reportTaskProgressRequest",
",",
"ProtocolMarshaller",
"protocolMarshaller",
")",
"{",
"if",
"(",
"reportTaskProgressRequest",
"==",
"null",
")",
"{",
"throw",
"new",
"SdkClientException",
"(",
"\"Invalid ar... | Marshall the given parameter object. | [
"Marshall",
"the",
"given",
"parameter",
"object",
"."
] | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-datapipeline/src/main/java/com/amazonaws/services/datapipeline/model/transform/ReportTaskProgressRequestMarshaller.java#L45-L57 | train | marshalls the given ReportTaskProgressRequest to the given protocolMarshaller. | Of course, here is the Java code you requested:
```java
public void marshall(ReportTaskProgressRequest reportTaskProgressRequest, ProtocolMarshaller protocolMarshaller) {
if (reportTaskProgressRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
... |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/db/thrift/DBConn.java | DBConn.connect | public void connect(String dbhost) throws DBNotAvailableException, RuntimeException {
assert !m_bDBOpen;
int bufferSize = m_thrift_buffer_size_mb * 1024 * 1024;
// Attempt to open the requested dbhost.
try {
TSocket socket = null;
if (m_dbtls) {
... | java | public void connect(String dbhost) throws DBNotAvailableException, RuntimeException {
assert !m_bDBOpen;
int bufferSize = m_thrift_buffer_size_mb * 1024 * 1024;
// Attempt to open the requested dbhost.
try {
TSocket socket = null;
if (m_dbtls) {
... | [
"public",
"void",
"connect",
"(",
"String",
"dbhost",
")",
"throws",
"DBNotAvailableException",
",",
"RuntimeException",
"{",
"assert",
"!",
"m_bDBOpen",
";",
"int",
"bufferSize",
"=",
"m_thrift_buffer_size_mb",
"*",
"1024",
"*",
"1024",
";",
"// Attempt to open the... | Attempt to connect to the given Cassandra host name or IP address. If a connection
cannot be made, a {@link DBNotAvailableException} is thrown that wraps the
Cassandra exception. If a connection is made and a keyspace was configured, the
session is set to the configured keyspace. However, if the keyspace cannot be used... | [
"Attempt",
"to",
"connect",
"to",
"the",
"given",
"Cassandra",
"host",
"name",
"or",
"IP",
"address",
".",
"If",
"a",
"connection",
"cannot",
"be",
"made",
"a",
"{",
"@link",
"DBNotAvailableException",
"}",
"is",
"thrown",
"that",
"wraps",
"the",
"Cassandra"... | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/thrift/DBConn.java#L145-L195 | train | Connect to the specified database. | Of course, here is the Java code you requested:
```java
public void connect(String dbhost) throws DBNotAvailableException, RuntimeException {
assert !m_bDBOpen;
int bufferSize = m_thrift_buffer_size_mb * 1024 * 1024;
// Attempt to open the requested dbhost.
try {
... |
aws/aws-sdk-java | aws-java-sdk-pi/src/main/java/com/amazonaws/services/pi/model/GetResourceMetricsRequest.java | GetResourceMetricsRequest.withMetricQueries | public GetResourceMetricsRequest withMetricQueries(MetricQuery... metricQueries) {
if (this.metricQueries == null) {
setMetricQueries(new java.util.ArrayList<MetricQuery>(metricQueries.length));
}
for (MetricQuery ele : metricQueries) {
this.metricQueries.add(ele);
... | java | public GetResourceMetricsRequest withMetricQueries(MetricQuery... metricQueries) {
if (this.metricQueries == null) {
setMetricQueries(new java.util.ArrayList<MetricQuery>(metricQueries.length));
}
for (MetricQuery ele : metricQueries) {
this.metricQueries.add(ele);
... | [
"public",
"GetResourceMetricsRequest",
"withMetricQueries",
"(",
"MetricQuery",
"...",
"metricQueries",
")",
"{",
"if",
"(",
"this",
".",
"metricQueries",
"==",
"null",
")",
"{",
"setMetricQueries",
"(",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"Metric... | <p>
An array of one or more queries to perform. Each query must specify a Performance Insights metric, and can
optionally specify aggregation and filtering criteria.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setMetricQueries(java.util.Collection)} or {@link #withMet... | [
"<p",
">",
"An",
"array",
"of",
"one",
"or",
"more",
"queries",
"to",
"perform",
".",
"Each",
"query",
"must",
"specify",
"a",
"Performance",
"Insights",
"metric",
"and",
"can",
"optionally",
"specify",
"aggregation",
"and",
"filtering",
"criteria",
".",
"<"... | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pi/src/main/java/com/amazonaws/services/pi/model/GetResourceMetricsRequest.java#L313-L321 | train | A list of metric queries to be included in the resource. | Of course, here is the Java code you requested:
```java
public GetResourceMetricsRequest withMetricQueries(MetricQuery... metricQueries) {
if (this.metricQueries == null) {
setMetricQueries(new java.util.ArrayList<MetricQuery>(metricQueries.length));
}
for (MetricQuery ele : metricQ... |
eclipse/xtext-extras | org.eclipse.xtext.generator/src-gen/org/eclipse/xtext/generator/parser/antlr/debug/simpleAntlr/impl/ParameterImpl.java | ParameterImpl.eSet | @Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case SimpleAntlrPackage.PARAMETER__TYPE:
setType((String)newValue);
return;
case SimpleAntlrPackage.PARAMETER__NAME:
setName((String)newValue);
return;
}
super.eSet(featureID... | java | @Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case SimpleAntlrPackage.PARAMETER__TYPE:
setType((String)newValue);
return;
case SimpleAntlrPackage.PARAMETER__NAME:
setName((String)newValue);
return;
}
super.eSet(featureID... | [
"@",
"Override",
"public",
"void",
"eSet",
"(",
"int",
"featureID",
",",
"Object",
"newValue",
")",
"{",
"switch",
"(",
"featureID",
")",
"{",
"case",
"SimpleAntlrPackage",
".",
"PARAMETER__TYPE",
":",
"setType",
"(",
"(",
"String",
")",
"newValue",
")",
"... | <!-- begin-user-doc -->
<!-- end-user-doc -->
@generated | [
"<!",
"--",
"begin",
"-",
"user",
"-",
"doc",
"--",
">",
"<!",
"--",
"end",
"-",
"user",
"-",
"doc",
"--",
">"
] | 451359541295323a29f5855e633f770cec02069a | https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/src-gen/org/eclipse/xtext/generator/parser/antlr/debug/simpleAntlr/impl/ParameterImpl.java#L161-L174 | train | Override the eSet method for the CRA - 262 specification. | Of course, here is the Java code you requested:
```java
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case SimpleAntlrPackage.PARAMETER__TYPE:
setType((String)newValue);
return;
case SimpleAntlrPackage.PARAMETER__NAME:
setName((String)... |
SonarOpenCommunity/sonar-cxx | cxx-squid/src/main/java/org/sonar/cxx/preprocessor/MapChain.java | MapChain.enable | public void enable(K key) {
move(key, lowPrioDisabled, lowPrioMap);
move(key, highPrioDisabled, highPrioMap);
} | java | public void enable(K key) {
move(key, lowPrioDisabled, lowPrioMap);
move(key, highPrioDisabled, highPrioMap);
} | [
"public",
"void",
"enable",
"(",
"K",
"key",
")",
"{",
"move",
"(",
"key",
",",
"lowPrioDisabled",
",",
"lowPrioMap",
")",
";",
"move",
"(",
"key",
",",
"highPrioDisabled",
",",
"highPrioMap",
")",
";",
"}"
] | enable
@param key | [
"enable"
] | 7e7a3a44d6d86382a0434652a798f8235503c9b8 | https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-squid/src/main/java/org/sonar/cxx/preprocessor/MapChain.java#L112-L115 | train | Enable the given key. | Of course, here is the Java code you requested:
```java
public void enable(K key) {
move(key, lowPrioDisabled, lowPrioMap);
move(key, highPrioDisabled, highPrioMap);
}
```
Hope this helps! |
fge/grappa | src/main/java/com/github/fge/grappa/parsers/BaseParser.java | BaseParser.anyOf | @DontLabel
public Rule anyOf(final char[] characters)
{
Objects.requireNonNull(characters);
switch (characters.length) {
case 0:
throw new IllegalArgumentException("empty character array");
case 1:
return ch(characters[0]);
defa... | java | @DontLabel
public Rule anyOf(final char[] characters)
{
Objects.requireNonNull(characters);
switch (characters.length) {
case 0:
throw new IllegalArgumentException("empty character array");
case 1:
return ch(characters[0]);
defa... | [
"@",
"DontLabel",
"public",
"Rule",
"anyOf",
"(",
"final",
"char",
"[",
"]",
"characters",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"characters",
")",
";",
"switch",
"(",
"characters",
".",
"length",
")",
"{",
"case",
"0",
":",
"throw",
"new",
... | Match any character in the given {@code char} array
<p>This method delegates to {@link #anyOf(Characters)}.</p>
@param characters the characters
@return a rule
@see #anyOf(Characters) | [
"Match",
"any",
"character",
"in",
"the",
"given",
"{",
"@code",
"char",
"}",
"array"
] | 7ade86b8371aec4e2b9a6815a85cf88a12eba6e4 | https://github.com/fge/grappa/blob/7ade86b8371aec4e2b9a6815a85cf88a12eba6e4/src/main/java/com/github/fge/grappa/parsers/BaseParser.java#L236-L248 | valid | Gets the rule that evaluates to a sequence of characters that is contained in the sequence of characters. | Of course, here is the Java code you requested:
```java
@DontLabel
public Rule anyOf(final char[] characters)
{
Objects.requireNonNull(characters);
switch (characters.length) {
case 0:
throw new IllegalArgumentException("empty character array");
case 1:
... |
GerdHolz/TOVAL | src/de/invation/code/toval/validate/Validate.java | Validate.notPositiveDouble | public static Double notPositiveDouble(String value) {
Double doubleValue = Validate.isDouble(value);
notPositive(doubleValue);
return doubleValue;
} | java | public static Double notPositiveDouble(String value) {
Double doubleValue = Validate.isDouble(value);
notPositive(doubleValue);
return doubleValue;
} | [
"public",
"static",
"Double",
"notPositiveDouble",
"(",
"String",
"value",
")",
"{",
"Double",
"doubleValue",
"=",
"Validate",
".",
"isDouble",
"(",
"value",
")",
";",
"notPositive",
"(",
"doubleValue",
")",
";",
"return",
"doubleValue",
";",
"}"
] | Checks if the given String is NOT a positive double value.<br>
This method tries to parse a double value and then checks if it is smaller or equal to 0.
@param value The String value to validate.
@return The parsed double value
@throws ParameterException if the given String value cannot be parsed as double or its value... | [
"Checks",
"if",
"the",
"given",
"String",
"is",
"NOT",
"a",
"positive",
"double",
"value",
".",
"<br",
">",
"This",
"method",
"tries",
"to",
"parse",
"a",
"double",
"value",
"and",
"then",
"checks",
"if",
"it",
"is",
"smaller",
"or",
"equal",
"to",
"0"... | 036922cdfd710fa53b18e5dbe1e07f226f731fde | https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/validate/Validate.java#L815-L819 | train | Method to check if a String is a positive Double. | Of course, here is the Java code you requested:
```java
public static Double notPositiveDouble(String value) {
Double doubleValue = Validate.isDouble(value);
notPositive(doubleValue);
return doubleValue;
}
```
Hope this helps! |
webfirmframework/wff | wffweb/src/main/java/com/webfirmframework/wffweb/tag/html/attribute/core/AbstractValueSetAttribute.java | AbstractValueSetAttribute.replaceAllInAttributeValueSet | protected void replaceAllInAttributeValueSet(final boolean updateClient,
final String... attrValues) {
if (attrValues != null) {
final Collection<String> allValues = new ArrayDeque<>();
for (final String attrValue : attrValues) {
if (attrValue != null) {
... | java | protected void replaceAllInAttributeValueSet(final boolean updateClient,
final String... attrValues) {
if (attrValues != null) {
final Collection<String> allValues = new ArrayDeque<>();
for (final String attrValue : attrValues) {
if (attrValue != null) {
... | [
"protected",
"void",
"replaceAllInAttributeValueSet",
"(",
"final",
"boolean",
"updateClient",
",",
"final",
"String",
"...",
"attrValues",
")",
"{",
"if",
"(",
"attrValues",
"!=",
"null",
")",
"{",
"final",
"Collection",
"<",
"String",
">",
"allValues",
"=",
... | Removes all values from the attributeValueSet and adds the given
attribute values.
@param updateClient
@param attrValues
@since 3.0.1 | [
"Removes",
"all",
"values",
"from",
"the",
"attributeValueSet",
"and",
"adds",
"the",
"given",
"attribute",
"values",
"."
] | e59def3a20d44f91e112b113448d951d7514af2e | https://github.com/webfirmframework/wff/blob/e59def3a20d44f91e112b113448d951d7514af2e/wffweb/src/main/java/com/webfirmframework/wffweb/tag/html/attribute/core/AbstractValueSetAttribute.java#L160-L173 | valid | Replace all in attribute value set. | Of course, here is the Java code you requested:
```java
protected void replaceAllInAttributeValueSet(final boolean updateClient,
final String... attrValues) {
if (attrValues != null) {
final Collection<String> allValues = new ArrayDeque<>();
for (final String attrValue : at... |
phax/ph-oton | ph-oton-core/src/main/java/com/helger/photon/core/userdata/UserDataObject.java | UserDataObject.createConditional | @Nullable
public static UserDataObject createConditional (@Nullable final String sPath)
{
if (StringHelper.hasNoText (sPath))
return null;
return new UserDataObject (sPath);
} | java | @Nullable
public static UserDataObject createConditional (@Nullable final String sPath)
{
if (StringHelper.hasNoText (sPath))
return null;
return new UserDataObject (sPath);
} | [
"@",
"Nullable",
"public",
"static",
"UserDataObject",
"createConditional",
"(",
"@",
"Nullable",
"final",
"String",
"sPath",
")",
"{",
"if",
"(",
"StringHelper",
".",
"hasNoText",
"(",
"sPath",
")",
")",
"return",
"null",
";",
"return",
"new",
"UserDataObject... | Create the {@link UserDataObject} only if the provided path is neither
<code>null</code> nor empty.
@param sPath
The path to be used. May be <code>null</code>.
@return <code>null</code> if an empty path was provided, a
non-<code>null</code> object otherwise. | [
"Create",
"the",
"{",
"@link",
"UserDataObject",
"}",
"only",
"if",
"the",
"provided",
"path",
"is",
"neither",
"<code",
">",
"null<",
"/",
"code",
">",
"nor",
"empty",
"."
] | f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef | https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-core/src/main/java/com/helger/photon/core/userdata/UserDataObject.java#L58-L64 | train | Create a conditional user data object. | Of course, here is the Java code you requested:
```java
@Nullable
public static UserDataObject createConditional (@Nullable final String sPath)
{
if (StringHelper.hasNoText (sPath))
return null;
return new UserDataObject (sPath);
}
```
Hope this helps! |
aws/aws-sdk-java | aws-java-sdk-route53/src/main/java/com/amazonaws/services/route53/model/ListTrafficPolicyVersionsResult.java | ListTrafficPolicyVersionsResult.getTrafficPolicies | public java.util.List<TrafficPolicy> getTrafficPolicies() {
if (trafficPolicies == null) {
trafficPolicies = new com.amazonaws.internal.SdkInternalList<TrafficPolicy>();
}
return trafficPolicies;
} | java | public java.util.List<TrafficPolicy> getTrafficPolicies() {
if (trafficPolicies == null) {
trafficPolicies = new com.amazonaws.internal.SdkInternalList<TrafficPolicy>();
}
return trafficPolicies;
} | [
"public",
"java",
".",
"util",
".",
"List",
"<",
"TrafficPolicy",
">",
"getTrafficPolicies",
"(",
")",
"{",
"if",
"(",
"trafficPolicies",
"==",
"null",
")",
"{",
"trafficPolicies",
"=",
"new",
"com",
".",
"amazonaws",
".",
"internal",
".",
"SdkInternalList",... | <p>
A list that contains one <code>TrafficPolicy</code> element for each traffic policy version that is associated
with the specified traffic policy.
</p>
@return A list that contains one <code>TrafficPolicy</code> element for each traffic policy version that is
associated with the specified traffic policy. | [
"<p",
">",
"A",
"list",
"that",
"contains",
"one",
"<code",
">",
"TrafficPolicy<",
"/",
"code",
">",
"element",
"for",
"each",
"traffic",
"policy",
"version",
"that",
"is",
"associated",
"with",
"the",
"specified",
"traffic",
"policy",
".",
"<",
"/",
"p",
... | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-route53/src/main/java/com/amazonaws/services/route53/model/ListTrafficPolicyVersionsResult.java#L74-L79 | train | Gets the value of the trafficPolicies property. | Of course, here is the Java code you requested:
```java
public java.util.List<TrafficPolicy> getTrafficPolicies() {
if (trafficPolicies == null) {
trafficPolicies = new com.amazonaws.internal.SdkInternalList<TrafficPolicy>();
}
return trafficPolicies;
}
```
Hope this helps! |
aws/aws-sdk-java | aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/Subnet.java | Subnet.withIpv6CidrBlockAssociationSet | public Subnet withIpv6CidrBlockAssociationSet(SubnetIpv6CidrBlockAssociation... ipv6CidrBlockAssociationSet) {
if (this.ipv6CidrBlockAssociationSet == null) {
setIpv6CidrBlockAssociationSet(new com.amazonaws.internal.SdkInternalList<SubnetIpv6CidrBlockAssociation>(ipv6CidrBlockAssociationSet.length)... | java | public Subnet withIpv6CidrBlockAssociationSet(SubnetIpv6CidrBlockAssociation... ipv6CidrBlockAssociationSet) {
if (this.ipv6CidrBlockAssociationSet == null) {
setIpv6CidrBlockAssociationSet(new com.amazonaws.internal.SdkInternalList<SubnetIpv6CidrBlockAssociation>(ipv6CidrBlockAssociationSet.length)... | [
"public",
"Subnet",
"withIpv6CidrBlockAssociationSet",
"(",
"SubnetIpv6CidrBlockAssociation",
"...",
"ipv6CidrBlockAssociationSet",
")",
"{",
"if",
"(",
"this",
".",
"ipv6CidrBlockAssociationSet",
"==",
"null",
")",
"{",
"setIpv6CidrBlockAssociationSet",
"(",
"new",
"com",
... | <p>
Information about the IPv6 CIDR blocks associated with the subnet.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setIpv6CidrBlockAssociationSet(java.util.Collection)} or
{@link #withIpv6CidrBlockAssociationSet(java.util.Collection)} if you want to override the exist... | [
"<p",
">",
"Information",
"about",
"the",
"IPv6",
"CIDR",
"blocks",
"associated",
"with",
"the",
"subnet",
".",
"<",
"/",
"p",
">",
"<p",
">",
"<b",
">",
"NOTE",
":",
"<",
"/",
"b",
">",
"This",
"method",
"appends",
"the",
"values",
"to",
"the",
"e... | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/Subnet.java#L686-L694 | train | Sets the value of the ipv6CidrBlockAssociationSet property. | Of course, here is the Java code you requested:
```java
public Subnet withIpv6CidrBlockAssociationSet(SubnetIpv6CidrBlockAssociation... ipv6CidrBlockAssociationSet) {
if (this.ipv6CidrBlockAssociationSet == null) {
setIpv6CidrBlockAssociationSet(new com.amazonaws.internal.SdkInternalList<SubnetIpv6... |
OpenLiberty/open-liberty | dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcStatement.java | WSJdbcStatement.createResultSetWrapper | protected WSJdbcResultSet createResultSetWrapper(ResultSet rsetImplObject)
{
return rsetImplObject == null ? null : mcf.jdbcRuntime.newResultSet(rsetImplObject, this);
} | java | protected WSJdbcResultSet createResultSetWrapper(ResultSet rsetImplObject)
{
return rsetImplObject == null ? null : mcf.jdbcRuntime.newResultSet(rsetImplObject, this);
} | [
"protected",
"WSJdbcResultSet",
"createResultSetWrapper",
"(",
"ResultSet",
"rsetImplObject",
")",
"{",
"return",
"rsetImplObject",
"==",
"null",
"?",
"null",
":",
"mcf",
".",
"jdbcRuntime",
".",
"newResultSet",
"(",
"rsetImplObject",
",",
"this",
")",
";",
"}"
] | Creates a wrapper for the supplied ResultSet object.
@param rsetImplObject a ResultSet that needs a wrapper.
@return the ResultSet wrapper if a valid ResultSet. Null if the ResultSet is null. | [
"Creates",
"a",
"wrapper",
"for",
"the",
"supplied",
"ResultSet",
"object",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcStatement.java#L346-L349 | train | Create a new ResultSet wrapper. | Of course, here is the Java code you requested:
```java
protected WSJdbcResultSet createResultSetWrapper(ResultSet rsetImplObject)
{
return rsetImplObject == null ? null : mcf.jdbcRuntime.newResultSet(rsetImplObject, this);
}
```
Hope this helps! |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.utils/src/com/ibm/ws/sib/utils/ThreadLocalStack.java | ThreadLocalStack.pop | public E pop() throws EmptyStackException
{
E answer = peek(); // Throws EmptyStackException if there's nothing there
_elements.get().remove(_elements.get().size()-1);
return answer;
} | java | public E pop() throws EmptyStackException
{
E answer = peek(); // Throws EmptyStackException if there's nothing there
_elements.get().remove(_elements.get().size()-1);
return answer;
} | [
"public",
"E",
"pop",
"(",
")",
"throws",
"EmptyStackException",
"{",
"E",
"answer",
"=",
"peek",
"(",
")",
";",
"// Throws EmptyStackException if there's nothing there",
"_elements",
".",
"get",
"(",
")",
".",
"remove",
"(",
"_elements",
".",
"get",
"(",
")",... | Pop and return the top element of the stack for this thread
@return The previously top element of the stack for this thread
@throws EmptyStackException is thrown if the stack for this thread is empty | [
"Pop",
"and",
"return",
"the",
"top",
"element",
"of",
"the",
"stack",
"for",
"this",
"thread"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.utils/src/com/ibm/ws/sib/utils/ThreadLocalStack.java#L88-L93 | train | Pop an element from the stack. | Of course, here is the Java code you requested:
```java
public E pop() throws EmptyStackException
{
E answer = peek(); // Throws EmptyStackException if there's nothing there
_elements.get().remove(_elements.get().size()-1);
return answer;
}
```
Hope this helps! |
camunda/camunda-bpm-platform | engine-cdi/src/main/java/org/camunda/bpm/engine/cdi/BusinessProcess.java | BusinessProcess.startTask | public Task startTask(String taskId, boolean beginConversation) {
if(beginConversation) {
Conversation conversation = conversationInstance.get();
if(conversation.isTransient()) {
conversation.begin();
}
}
return startTask(taskId);
} | java | public Task startTask(String taskId, boolean beginConversation) {
if(beginConversation) {
Conversation conversation = conversationInstance.get();
if(conversation.isTransient()) {
conversation.begin();
}
}
return startTask(taskId);
} | [
"public",
"Task",
"startTask",
"(",
"String",
"taskId",
",",
"boolean",
"beginConversation",
")",
"{",
"if",
"(",
"beginConversation",
")",
"{",
"Conversation",
"conversation",
"=",
"conversationInstance",
".",
"get",
"(",
")",
";",
"if",
"(",
"conversation",
... | @see #startTask(String)
this method allows to start a conversation if no conversation is active | [
"@see",
"#startTask",
"(",
"String",
")"
] | 1a464fc887ef3760e53d6f91b9e5b871a0d77cc0 | https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine-cdi/src/main/java/org/camunda/bpm/engine/cdi/BusinessProcess.java#L312-L320 | train | Start a task. | Of course, here is the Java code you requested:
```java
public Task startTask(String taskId, boolean beginConversation) {
if(beginConversation) {
Conversation conversation = conversationInstance.get();
if(conversation.isTransient()) {
conversation.begin();
}
}
return startTask(task... |
ombre42/jrobotremoteserver | examples/AnnotationLibrary/src/main/java/com/example/MyRemoteLibrary.java | MyRemoteLibrary.main | public static void main(String[] args) throws Exception {
RemoteServer.configureLogging();
RemoteServer server = new RemoteServer();
server.addLibrary(MyRemoteLibrary.class, 8270);
server.start();
} | java | public static void main(String[] args) throws Exception {
RemoteServer.configureLogging();
RemoteServer server = new RemoteServer();
server.addLibrary(MyRemoteLibrary.class, 8270);
server.start();
} | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"Exception",
"{",
"RemoteServer",
".",
"configureLogging",
"(",
")",
";",
"RemoteServer",
"server",
"=",
"new",
"RemoteServer",
"(",
")",
";",
"server",
".",
"addLibrary",
... | /* Starts jrobotremoteserver with an example library and returns. The application will shutdown when all of the
web server's threads exit. | [
"/",
"*",
"Starts",
"jrobotremoteserver",
"with",
"an",
"example",
"library",
"and",
"returns",
".",
"The",
"application",
"will",
"shutdown",
"when",
"all",
"of",
"the",
"web",
"server",
"s",
"threads",
"exit",
"."
] | 688ab33a6bd04951d9dee7f5ec23c6f1cc709c10 | https://github.com/ombre42/jrobotremoteserver/blob/688ab33a6bd04951d9dee7f5ec23c6f1cc709c10/examples/AnnotationLibrary/src/main/java/com/example/MyRemoteLibrary.java#L27-L32 | test | Main method for the application. | Of course, here is the Java code you requested:
```java
public static void main(String[] args) throws Exception {
RemoteServer.configureLogging();
RemoteServer server = new RemoteServer();
server.addLibrary(MyRemoteLibrary.class, 8270);
server.start();
}
```
Hope this helps! |
aws/aws-sdk-java | aws-java-sdk-batch/src/main/java/com/amazonaws/services/batch/model/ContainerOverrides.java | ContainerOverrides.setCommand | public void setCommand(java.util.Collection<String> command) {
if (command == null) {
this.command = null;
return;
}
this.command = new java.util.ArrayList<String>(command);
} | java | public void setCommand(java.util.Collection<String> command) {
if (command == null) {
this.command = null;
return;
}
this.command = new java.util.ArrayList<String>(command);
} | [
"public",
"void",
"setCommand",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"String",
">",
"command",
")",
"{",
"if",
"(",
"command",
"==",
"null",
")",
"{",
"this",
".",
"command",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"command",
... | <p>
The command to send to the container that overrides the default command from the Docker image or the job
definition.
</p>
@param command
The command to send to the container that overrides the default command from the Docker image or the job
definition. | [
"<p",
">",
"The",
"command",
"to",
"send",
"to",
"the",
"container",
"that",
"overrides",
"the",
"default",
"command",
"from",
"the",
"Docker",
"image",
"or",
"the",
"job",
"definition",
".",
"<",
"/",
"p",
">"
] | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-batch/src/main/java/com/amazonaws/services/batch/model/ContainerOverrides.java#L190-L197 | train | Sets the command. | Of course, here is the Java code you requested:
```java
public void setCommand(java.util.Collection<String> command) {
if (command == null) {
this.command = null;
return;
}
this.command = new java.util.ArrayList<String>(command);
}
```
Hope this helps! |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.updateCertificateOperationAsync | public ServiceFuture<CertificateOperation> updateCertificateOperationAsync(String vaultBaseUrl, String certificateName, boolean cancellationRequested, final ServiceCallback<CertificateOperation> serviceCallback) {
return ServiceFuture.fromResponse(updateCertificateOperationWithServiceResponseAsync(vaultBaseUrl,... | java | public ServiceFuture<CertificateOperation> updateCertificateOperationAsync(String vaultBaseUrl, String certificateName, boolean cancellationRequested, final ServiceCallback<CertificateOperation> serviceCallback) {
return ServiceFuture.fromResponse(updateCertificateOperationWithServiceResponseAsync(vaultBaseUrl,... | [
"public",
"ServiceFuture",
"<",
"CertificateOperation",
">",
"updateCertificateOperationAsync",
"(",
"String",
"vaultBaseUrl",
",",
"String",
"certificateName",
",",
"boolean",
"cancellationRequested",
",",
"final",
"ServiceCallback",
"<",
"CertificateOperation",
">",
"serv... | Updates a certificate operation.
Updates a certificate creation operation that is already in progress. This operation requires the certificates/update permission.
@param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
@param certificateName The name of the certificate.
@param cancellationRequ... | [
"Updates",
"a",
"certificate",
"operation",
".",
"Updates",
"a",
"certificate",
"creation",
"operation",
"that",
"is",
"already",
"in",
"progress",
".",
"This",
"operation",
"requires",
"the",
"certificates",
"/",
"update",
"permission",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L7656-L7658 | train | Updates an existing certificate operation. | Of course, here is the Java code you requested:
```java
public ServiceFuture<CertificateOperation> updateCertificateOperationAsync(String vaultBaseUrl, String certificateName, boolean cancellationRequested, final ServiceCallback<CertificateOperation> serviceCallback) {
return ServiceFuture.fromResponse(updateC... |
codeprimate-software/cp-elements | src/main/java/org/cp/elements/lang/support/ConfigurableVisitor.java | ConfigurableVisitor.visit | @Override
@SuppressWarnings("unchecked")
public void visit(Visitable visitable) {
if (visitable instanceof Configurable) {
((Configurable<T>) visitable).configure(configuration);
}
} | java | @Override
@SuppressWarnings("unchecked")
public void visit(Visitable visitable) {
if (visitable instanceof Configurable) {
((Configurable<T>) visitable).configure(configuration);
}
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"visit",
"(",
"Visitable",
"visitable",
")",
"{",
"if",
"(",
"visitable",
"instanceof",
"Configurable",
")",
"{",
"(",
"(",
"Configurable",
"<",
"T",
">",
")",
"visitable"... | Visits Configurable objects in an object graph/hierarchy in order to apply configuration.
@param visitable the Visitable object visited by this Visitor.
@see org.cp.elements.lang.Configurable#configure(Object)
@see org.cp.elements.lang.Visitable | [
"Visits",
"Configurable",
"objects",
"in",
"an",
"object",
"graph",
"/",
"hierarchy",
"in",
"order",
"to",
"apply",
"configuration",
"."
] | f2163c149fbbef05015e688132064ebcac7c49ab | https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/support/ConfigurableVisitor.java#L57-L63 | train | Override the visit method to configure the node. | Of course, here is the Java code you requested:
```java
@Override
@SuppressWarnings("unchecked")
public void visit(Visitable visitable) {
if (visitable instanceof Configurable) {
((Configurable<T>) visitable).configure(configuration);
}
}
```
Hope this helps! |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleUtility.java | LocaleUtility.getLocaleFromName | public static Locale getLocaleFromName(String name) {
String language = "";
String country = "";
String variant = "";
int i1 = name.indexOf('_');
if (i1 < 0) {
language = name;
} else {
language = name.substring(0, i1);
++i1;
... | java | public static Locale getLocaleFromName(String name) {
String language = "";
String country = "";
String variant = "";
int i1 = name.indexOf('_');
if (i1 < 0) {
language = name;
} else {
language = name.substring(0, i1);
++i1;
... | [
"public",
"static",
"Locale",
"getLocaleFromName",
"(",
"String",
"name",
")",
"{",
"String",
"language",
"=",
"\"\"",
";",
"String",
"country",
"=",
"\"\"",
";",
"String",
"variant",
"=",
"\"\"",
";",
"int",
"i1",
"=",
"name",
".",
"indexOf",
"(",
"'",
... | A helper function to convert a string of the form
aa_BB_CC to a locale object. Why isn't this in Locale? | [
"A",
"helper",
"function",
"to",
"convert",
"a",
"string",
"of",
"the",
"form",
"aa_BB_CC",
"to",
"a",
"locale",
"object",
".",
"Why",
"isn",
"t",
"this",
"in",
"Locale?"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleUtility.java#L27-L48 | train | Gets the Locale from a name. | Of course, here is the Java code you requested:
```java
public static Locale getLocaleFromName(String name) {
String language = "";
String country = "";
String variant = "";
int i1 = name.indexOf('_');
if (i1 < 0) {
language = name;
} else {
lang... |
aicer/hibiscus-http-client | src/main/java/org/aicer/hibiscus/http/workers/HttpWorkerAbstract.java | HttpWorkerAbstract.execute | public void execute() throws HibiscusException {
prepare();
httpRequest.addHeader("User-Agent", getClass().getName().toUpperCase());
httpRequest.addHeader("X-Conversation-Id", HashGenerator.getMD5Hash(System.currentTimeMillis() + "." + new Thread().getId()));
// Creates a registry for... | java | public void execute() throws HibiscusException {
prepare();
httpRequest.addHeader("User-Agent", getClass().getName().toUpperCase());
httpRequest.addHeader("X-Conversation-Id", HashGenerator.getMD5Hash(System.currentTimeMillis() + "." + new Thread().getId()));
// Creates a registry for... | [
"public",
"void",
"execute",
"(",
")",
"throws",
"HibiscusException",
"{",
"prepare",
"(",
")",
";",
"httpRequest",
".",
"addHeader",
"(",
"\"User-Agent\"",
",",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
".",
"toUpperCase",
"(",
")",
")",
";",
"htt... | Transmits the HTTP request from the client to the server
@throws HibiscusException | [
"Transmits",
"the",
"HTTP",
"request",
"from",
"the",
"client",
"to",
"the",
"server"
] | a037e3cf8d4bb862d38a55a090778736a48d67cc | https://github.com/aicer/hibiscus-http-client/blob/a037e3cf8d4bb862d38a55a090778736a48d67cc/src/main/java/org/aicer/hibiscus/http/workers/HttpWorkerAbstract.java#L112-L158 | train | Execute the request. | Of course, here is the Java code you requested:
```java
public void execute() throws HibiscusException {
prepare();
httpRequest.addHeader("User-Agent", getClass().getName().toUpperCase());
httpRequest.addHeader("X-Conversation-Id", HashGenerator.getMD5Hash(System.currentTimeMillis() + "." + n... |
moleculer-java/moleculer-java | src/main/java/services/moleculer/strategy/RoundRobinStrategyFactory.java | RoundRobinStrategyFactory.create | @Override
public <T extends Endpoint> Strategy<T> create() {
return new RoundRobinStrategy<T>(broker, preferLocal);
} | java | @Override
public <T extends Endpoint> Strategy<T> create() {
return new RoundRobinStrategy<T>(broker, preferLocal);
} | [
"@",
"Override",
"public",
"<",
"T",
"extends",
"Endpoint",
">",
"Strategy",
"<",
"T",
">",
"create",
"(",
")",
"{",
"return",
"new",
"RoundRobinStrategy",
"<",
"T",
">",
"(",
"broker",
",",
"preferLocal",
")",
";",
"}"
] | --- FACTORY METHOD --- | [
"---",
"FACTORY",
"METHOD",
"---"
] | 27575c44b9ecacc17c4456ceacf5d1851abf1cc4 | https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/strategy/RoundRobinStrategyFactory.java#L55-L58 | train | Create a strategy that will use the specified broker and preferLocal | Of course, here is the Java code you requested:
```java
@Override
public <T extends Endpoint> Strategy<T> create() {
return new RoundRobinStrategy<T>(broker, preferLocal);
}
```
Hope this helps! |
reactor/reactor-netty | src/main/java/reactor/netty/http/server/HttpServer.java | HttpServer.cookieCodec | public final HttpServer cookieCodec(ServerCookieEncoder encoder) {
ServerCookieDecoder decoder = encoder == ServerCookieEncoder.LAX ?
ServerCookieDecoder.LAX : ServerCookieDecoder.STRICT;
return tcpConfiguration(tcp -> tcp.bootstrap(
b -> HttpServerConfiguration.cookieCodec(b, encoder, decoder)));
} | java | public final HttpServer cookieCodec(ServerCookieEncoder encoder) {
ServerCookieDecoder decoder = encoder == ServerCookieEncoder.LAX ?
ServerCookieDecoder.LAX : ServerCookieDecoder.STRICT;
return tcpConfiguration(tcp -> tcp.bootstrap(
b -> HttpServerConfiguration.cookieCodec(b, encoder, decoder)));
} | [
"public",
"final",
"HttpServer",
"cookieCodec",
"(",
"ServerCookieEncoder",
"encoder",
")",
"{",
"ServerCookieDecoder",
"decoder",
"=",
"encoder",
"==",
"ServerCookieEncoder",
".",
"LAX",
"?",
"ServerCookieDecoder",
".",
"LAX",
":",
"ServerCookieDecoder",
".",
"STRICT... | Configure the
{@link ServerCookieEncoder}; {@link ServerCookieDecoder} will be
chosen based on the encoder
@param encoder the preferred ServerCookieEncoder
@return a new {@link HttpServer} | [
"Configure",
"the",
"{",
"@link",
"ServerCookieEncoder",
"}",
";",
"{",
"@link",
"ServerCookieDecoder",
"}",
"will",
"be",
"chosen",
"based",
"on",
"the",
"encoder"
] | 4ed14316e1d7fca3cecd18d6caa5f2251e159e49 | https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/http/server/HttpServer.java#L324-L329 | train | Cookie codec. | Of course, here is the Java code you requested:
```java
public final HttpServer cookieCodec(ServerCookieEncoder encoder) {
ServerCookieDecoder decoder = encoder == ServerCookieEncoder.LAX ?
ServerCookieDecoder.LAX : ServerCookieDecoder.STRICT;
return tcpConfiguration(tcp -> tcp.bootstrap(
b -> HttpServerCo... |
alkacon/opencms-core | src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java | CmsContainerpageController.getCachedElement | public CmsContainerElementData getCachedElement(String clientId) {
if (m_elements.containsKey(clientId)) {
return m_elements.get(clientId);
}
return null;
} | java | public CmsContainerElementData getCachedElement(String clientId) {
if (m_elements.containsKey(clientId)) {
return m_elements.get(clientId);
}
return null;
} | [
"public",
"CmsContainerElementData",
"getCachedElement",
"(",
"String",
"clientId",
")",
"{",
"if",
"(",
"m_elements",
".",
"containsKey",
"(",
"clientId",
")",
")",
"{",
"return",
"m_elements",
".",
"get",
"(",
"clientId",
")",
";",
"}",
"return",
"null",
"... | Returns the data for the requested element, or <code>null</code> if the element has not been cached yet.<p>
@param clientId the element id
@return the element data | [
"Returns",
"the",
"data",
"for",
"the",
"requested",
"element",
"or",
"<code",
">",
"null<",
"/",
"code",
">",
"if",
"the",
"element",
"has",
"not",
"been",
"cached",
"yet",
".",
"<p",
">"
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java#L1242-L1248 | train | Gets the cached element. | Of course, here is the Java code you requested:
```java
public CmsContainerElementData getCachedElement(String clientId) {
if (m_elements.containsKey(clientId)) {
return m_elements.get(clientId);
}
return null;
}
```
Hope this helps! |
haifengl/smile | data/src/main/java/smile/data/parser/BinarySparseDatasetParser.java | BinarySparseDatasetParser.parse | public BinarySparseDataset parse(File file) throws IOException, ParseException {
String name = file.getPath();
return parse(name, new FileInputStream(file));
} | java | public BinarySparseDataset parse(File file) throws IOException, ParseException {
String name = file.getPath();
return parse(name, new FileInputStream(file));
} | [
"public",
"BinarySparseDataset",
"parse",
"(",
"File",
"file",
")",
"throws",
"IOException",
",",
"ParseException",
"{",
"String",
"name",
"=",
"file",
".",
"getPath",
"(",
")",
";",
"return",
"parse",
"(",
"name",
",",
"new",
"FileInputStream",
"(",
"file",... | Parse a binary sparse dataset from given file.
@throws java.io.IOException | [
"Parse",
"a",
"binary",
"sparse",
"dataset",
"from",
"given",
"file",
"."
] | e27e43e90fbaacce3f99d30120cf9dd6a764c33d | https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/data/src/main/java/smile/data/parser/BinarySparseDatasetParser.java#L86-L89 | train | Parse a binary sparse dataset from a file. | Of course, here is the Java code you requested:
```java
public BinarySparseDataset parse(File file) throws IOException, ParseException {
String name = file.getPath();
return parse(name, new FileInputStream(file));
}
```
Hope this helps! |
google/j2objc | jre_emul/apache_harmony/classlib/modules/beans/src/main/java/java/beans/BeanDescriptor.java | BeanDescriptor.getShortClassName | private String getShortClassName(Class<?> leguminaClass) {
if(leguminaClass == null) {
return null;
}
String beanClassName = leguminaClass.getName();
int lastIndex = beanClassName.lastIndexOf("."); //$NON-NLS-1$
return (lastIndex == -1) ? beanClassName : beanClassName... | java | private String getShortClassName(Class<?> leguminaClass) {
if(leguminaClass == null) {
return null;
}
String beanClassName = leguminaClass.getName();
int lastIndex = beanClassName.lastIndexOf("."); //$NON-NLS-1$
return (lastIndex == -1) ? beanClassName : beanClassName... | [
"private",
"String",
"getShortClassName",
"(",
"Class",
"<",
"?",
">",
"leguminaClass",
")",
"{",
"if",
"(",
"leguminaClass",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"String",
"beanClassName",
"=",
"leguminaClass",
".",
"getName",
"(",
")",
";"... | <p>
Utility method for getting the unqualified name of a {@link Class}.
</p>
@param leguminaClass
The Class to get the name from.
@return A String instance or <code>null</code>. | [
"<p",
">",
"Utility",
"method",
"for",
"getting",
"the",
"unqualified",
"name",
"of",
"a",
"{",
"@link",
"Class",
"}",
".",
"<",
"/",
"p",
">"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/apache_harmony/classlib/modules/beans/src/main/java/java/beans/BeanDescriptor.java#L95-L102 | train | Get the short class name from the class name. | Of course, here is the Java code you requested:
```java
private String getShortClassName(Class<?> leguminaClass) {
if(leguminaClass == null) {
return null;
}
String beanClassName = leguminaClass.getName();
int lastIndex = beanClassName.lastIndexOf("."); //$NON-NLS-1$
... |
codelibs/fess | src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java | FessMessages.addErrorsResultSizeExceeded | public FessMessages addErrorsResultSizeExceeded(String property) {
assertPropertyNotNull(property);
add(property, new UserMessage(ERRORS_result_size_exceeded));
return this;
} | java | public FessMessages addErrorsResultSizeExceeded(String property) {
assertPropertyNotNull(property);
add(property, new UserMessage(ERRORS_result_size_exceeded));
return this;
} | [
"public",
"FessMessages",
"addErrorsResultSizeExceeded",
"(",
"String",
"property",
")",
"{",
"assertPropertyNotNull",
"(",
"property",
")",
";",
"add",
"(",
"property",
",",
"new",
"UserMessage",
"(",
"ERRORS_result_size_exceeded",
")",
")",
";",
"return",
"this",
... | Add the created action message for the key 'errors.result_size_exceeded' with parameters.
<pre>
message: No more results could be displayed.
</pre>
@param property The property name for the message. (NotNull)
@return this. (NotNull) | [
"Add",
"the",
"created",
"action",
"message",
"for",
"the",
"key",
"errors",
".",
"result_size_exceeded",
"with",
"parameters",
".",
"<pre",
">",
"message",
":",
"No",
"more",
"results",
"could",
"be",
"displayed",
".",
"<",
"/",
"pre",
">"
] | e5e4b722549d32a4958dfd94965b21937bfe64cf | https://github.com/codelibs/fess/blob/e5e4b722549d32a4958dfd94965b21937bfe64cf/src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java#L1432-L1436 | train | Add the errors result size exceeded. | Of course, here is the Java code you requested:
```java
public FessMessages addErrorsResultSizeExceeded(String property) {
assertPropertyNotNull(property);
add(property, new UserMessage(ERRORS_result_size_exceeded));
return this;
}
```
Hope this helps! |
google/guava | guava/src/com/google/common/base/Splitter.java | Splitter.on | public static Splitter on(final CharMatcher separatorMatcher) {
checkNotNull(separatorMatcher);
return new Splitter(
new Strategy() {
@Override
public SplittingIterator iterator(Splitter splitter, final CharSequence toSplit) {
return new SplittingIterator(splitter, toSpl... | java | public static Splitter on(final CharMatcher separatorMatcher) {
checkNotNull(separatorMatcher);
return new Splitter(
new Strategy() {
@Override
public SplittingIterator iterator(Splitter splitter, final CharSequence toSplit) {
return new SplittingIterator(splitter, toSpl... | [
"public",
"static",
"Splitter",
"on",
"(",
"final",
"CharMatcher",
"separatorMatcher",
")",
"{",
"checkNotNull",
"(",
"separatorMatcher",
")",
";",
"return",
"new",
"Splitter",
"(",
"new",
"Strategy",
"(",
")",
"{",
"@",
"Override",
"public",
"SplittingIterator"... | Returns a splitter that considers any single character matched by the given {@code CharMatcher}
to be a separator. For example, {@code
Splitter.on(CharMatcher.anyOf(";,")).split("foo,;bar,quux")} returns an iterable containing
{@code ["foo", "", "bar", "quux"]}.
@param separatorMatcher a {@link CharMatcher} that deter... | [
"Returns",
"a",
"splitter",
"that",
"considers",
"any",
"single",
"character",
"matched",
"by",
"the",
"given",
"{",
"@code",
"CharMatcher",
"}",
"to",
"be",
"a",
"separator",
".",
"For",
"example",
"{",
"@code",
"Splitter",
".",
"on",
"(",
"CharMatcher",
... | 7155d12b70a2406fa84d94d4b8b3bc108e89abfd | https://github.com/google/guava/blob/7155d12b70a2406fa84d94d4b8b3bc108e89abfd/guava/src/com/google/common/base/Splitter.java#L138-L158 | valid | Creates a splitter that splits a sequence of characters on the specified separator matcher. | Of course, here is the Java code you requested:
```java
public static Splitter on(final CharMatcher separatorMatcher) {
checkNotNull(separatorMatcher);
return new Splitter(
new Strategy() {
@Override
public SplittingIterator iterator(Splitter splitter, final CharSequence toSplit) {... |
chrisjenx/Calligraphy | calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyLayoutInflater.java | CalligraphyLayoutInflater.onActivityCreateView | @Override
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public View onActivityCreateView(View parent, View view, String name, Context context, AttributeSet attrs) {
return mCalligraphyFactory.onViewCreated(createCustomViewInternal(parent, view, name, context, attrs), context, attrs);
} | java | @Override
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public View onActivityCreateView(View parent, View view, String name, Context context, AttributeSet attrs) {
return mCalligraphyFactory.onViewCreated(createCustomViewInternal(parent, view, name, context, attrs), context, attrs);
} | [
"@",
"Override",
"@",
"TargetApi",
"(",
"Build",
".",
"VERSION_CODES",
".",
"HONEYCOMB",
")",
"public",
"View",
"onActivityCreateView",
"(",
"View",
"parent",
",",
"View",
"view",
",",
"String",
"name",
",",
"Context",
"context",
",",
"AttributeSet",
"attrs",
... | The Activity onCreateView (PrivateFactory) is the third port of call for LayoutInflation.
We opted to manual injection over aggressive reflection, this should be less fragile. | [
"The",
"Activity",
"onCreateView",
"(",
"PrivateFactory",
")",
"is",
"the",
"third",
"port",
"of",
"call",
"for",
"LayoutInflation",
".",
"We",
"opted",
"to",
"manual",
"injection",
"over",
"aggressive",
"reflection",
"this",
"should",
"be",
"less",
"fragile",
... | 085e441954d787bd4ef31f245afe5f2f2a311ea5 | https://github.com/chrisjenx/Calligraphy/blob/085e441954d787bd4ef31f245afe5f2f2a311ea5/calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyLayoutInflater.java#L135-L139 | train | Override this method to create a custom view. | Of course, here is the Java code you requested:
```java
@Override
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public View onActivityCreateView(View parent, View view, String name, Context context, AttributeSet attrs) {
return mCalligraphyFactory.onViewCreated(createCustomViewInternal(parent, view, name, ... |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java | StatisticsJDBCStorageConnection.update | public void update(NodeData data) throws RepositoryException, UnsupportedOperationException,
InvalidItemStateException, IllegalStateException
{
Statistics s = ALL_STATISTICS.get(UPDATE_NODE_DATA_DESCR);
try
{
s.begin();
wcs.update(data);
}
finally
{
... | java | public void update(NodeData data) throws RepositoryException, UnsupportedOperationException,
InvalidItemStateException, IllegalStateException
{
Statistics s = ALL_STATISTICS.get(UPDATE_NODE_DATA_DESCR);
try
{
s.begin();
wcs.update(data);
}
finally
{
... | [
"public",
"void",
"update",
"(",
"NodeData",
"data",
")",
"throws",
"RepositoryException",
",",
"UnsupportedOperationException",
",",
"InvalidItemStateException",
",",
"IllegalStateException",
"{",
"Statistics",
"s",
"=",
"ALL_STATISTICS",
".",
"get",
"(",
"UPDATE_NODE_... | {@inheritDoc} | [
"{"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java#L675-L688 | train | Update the node data. | Of course, here is the Java code you requested:
```java
public void update(NodeData data) throws RepositoryException, UnsupportedOperationException,
InvalidItemStateException, IllegalStateException
{
Statistics s = ALL_STATISTICS.get(UPDATE_NODE_DATA_DESCR);
try
{
s.begin();
... |
geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/spatial/geometry/GeometryFactory.java | GeometryFactory.createGeometry | public Geometry createGeometry(Geometry geometry) {
if (geometry instanceof Point) {
return createPoint(geometry.getCoordinate());
} else if (geometry instanceof LinearRing) {
return createLinearRing(geometry.getCoordinates());
} else if (geometry instanceof LineString) {
return createLineString(geometry... | java | public Geometry createGeometry(Geometry geometry) {
if (geometry instanceof Point) {
return createPoint(geometry.getCoordinate());
} else if (geometry instanceof LinearRing) {
return createLinearRing(geometry.getCoordinates());
} else if (geometry instanceof LineString) {
return createLineString(geometry... | [
"public",
"Geometry",
"createGeometry",
"(",
"Geometry",
"geometry",
")",
"{",
"if",
"(",
"geometry",
"instanceof",
"Point",
")",
"{",
"return",
"createPoint",
"(",
"geometry",
".",
"getCoordinate",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"geometry",
"... | Create a new geometry from an existing geometry. This will basically create a clone.
@param geometry
The original geometry.
@return Returns a clone. | [
"Create",
"a",
"new",
"geometry",
"from",
"an",
"existing",
"geometry",
".",
"This",
"will",
"basically",
"create",
"a",
"clone",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/geometry/GeometryFactory.java#L248-L283 | train | Create a new geometry from a geometry. | Of course, here is the Java code you requested:
```java
public Geometry createGeometry(Geometry geometry) {
if (geometry instanceof Point) {
return createPoint(geometry.getCoordinate());
} else if (geometry instanceof LinearRing) {
return createLinearRing(geometry.getCoordinates());
} else if (geometry ins... |
spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionEvaluationReport.java | ConditionEvaluationReport.get | public static ConditionEvaluationReport get(
ConfigurableListableBeanFactory beanFactory) {
synchronized (beanFactory) {
ConditionEvaluationReport report;
if (beanFactory.containsSingleton(BEAN_NAME)) {
report = beanFactory.getBean(BEAN_NAME, ConditionEvaluationReport.class);
}
else {
report = ... | java | public static ConditionEvaluationReport get(
ConfigurableListableBeanFactory beanFactory) {
synchronized (beanFactory) {
ConditionEvaluationReport report;
if (beanFactory.containsSingleton(BEAN_NAME)) {
report = beanFactory.getBean(BEAN_NAME, ConditionEvaluationReport.class);
}
else {
report = ... | [
"public",
"static",
"ConditionEvaluationReport",
"get",
"(",
"ConfigurableListableBeanFactory",
"beanFactory",
")",
"{",
"synchronized",
"(",
"beanFactory",
")",
"{",
"ConditionEvaluationReport",
"report",
";",
"if",
"(",
"beanFactory",
".",
"containsSingleton",
"(",
"B... | Obtain a {@link ConditionEvaluationReport} for the specified bean factory.
@param beanFactory the bean factory
@return an existing or new {@link ConditionEvaluationReport} | [
"Obtain",
"a",
"{"
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionEvaluationReport.java#L182-L196 | train | Gets the condition evaluation report. | Of course, here is the Java code you requested:
```java
public static ConditionEvaluationReport get(
ConfigurableListableBeanFactory beanFactory) {
synchronized (beanFactory) {
ConditionEvaluationReport report;
if (beanFactory.containsSingleton(BEAN_NAME)) {
report = beanFactory.getBean(BEAN_NAME, Condi... |
sawano/java-commons | src/main/java/se/sawano/java/commons/lang/validate/Validate.java | Validate.notEmpty | public static <T extends CharSequence> T notEmpty(final T chars, final String message) {
return INSTANCE.notEmpty(chars, message);
} | java | public static <T extends CharSequence> T notEmpty(final T chars, final String message) {
return INSTANCE.notEmpty(chars, message);
} | [
"public",
"static",
"<",
"T",
"extends",
"CharSequence",
">",
"T",
"notEmpty",
"(",
"final",
"T",
"chars",
",",
"final",
"String",
"message",
")",
"{",
"return",
"INSTANCE",
".",
"notEmpty",
"(",
"chars",
",",
"message",
")",
";",
"}"
] | Method without varargs to increase performance | [
"Method",
"without",
"varargs",
"to",
"increase",
"performance"
] | 6f219c9e8dec4401dbe528d17ae6ec1ef9c0d284 | https://github.com/sawano/java-commons/blob/6f219c9e8dec4401dbe528d17ae6ec1ef9c0d284/src/main/java/se/sawano/java/commons/lang/validate/Validate.java#L325-L327 | train | Check that a CharSequence is not empty. | Of course, here is the Java code you requested:
```java
public static <T extends CharSequence> T notEmpty(final T chars, final String message) {
return INSTANCE.notEmpty(chars, message);
}
```
Hope this helps! |
lettuce-io/lettuce-core | src/main/java/io/lettuce/core/protocol/ConnectionWatchdog.java | ConnectionWatchdog.run | public void run(int attempt) throws Exception {
reconnectSchedulerSync.set(false);
reconnectScheduleTimeout = null;
if (!isEventLoopGroupActive()) {
logger.debug("isEventLoopGroupActive() == false");
return;
}
if (!isListenOnChannelInactive()) {
... | java | public void run(int attempt) throws Exception {
reconnectSchedulerSync.set(false);
reconnectScheduleTimeout = null;
if (!isEventLoopGroupActive()) {
logger.debug("isEventLoopGroupActive() == false");
return;
}
if (!isListenOnChannelInactive()) {
... | [
"public",
"void",
"run",
"(",
"int",
"attempt",
")",
"throws",
"Exception",
"{",
"reconnectSchedulerSync",
".",
"set",
"(",
"false",
")",
";",
"reconnectScheduleTimeout",
"=",
"null",
";",
"if",
"(",
"!",
"isEventLoopGroupActive",
"(",
")",
")",
"{",
"logger... | Reconnect to the remote address that the closed channel was connected to. This creates a new {@link ChannelPipeline} with
the same handler instances contained in the old channel's pipeline.
@param attempt attempt counter
@throws Exception when reconnection fails. | [
"Reconnect",
"to",
"the",
"remote",
"address",
"that",
"the",
"closed",
"channel",
"was",
"connected",
"to",
".",
"This",
"creates",
"a",
"new",
"{",
"@link",
"ChannelPipeline",
"}",
"with",
"the",
"same",
"handler",
"instances",
"contained",
"in",
"the",
"o... | b6de74e384dea112e3656684ca3f50cdfd6c8e0d | https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/protocol/ConnectionWatchdog.java#L256-L326 | train | Run the reconnect process. | Of course, here is the Java code you requested:
```java
public void run(int attempt) throws Exception {
reconnectSchedulerSync.set(false);
reconnectScheduleTimeout = null;
if (!isEventLoopGroupActive()) {
logger.debug("isEventLoopGroupActive() == false");
return;
... |
linkedin/dexmaker | dexmaker/src/main/java/com/android/dx/Code.java | Code.invokeStatic | public <R> void invokeStatic(MethodId<?, R> method, Local<? super R> target, Local<?>... args) {
invoke(Rops.opInvokeStatic(method.prototype(true)), method, target, null, args);
} | java | public <R> void invokeStatic(MethodId<?, R> method, Local<? super R> target, Local<?>... args) {
invoke(Rops.opInvokeStatic(method.prototype(true)), method, target, null, args);
} | [
"public",
"<",
"R",
">",
"void",
"invokeStatic",
"(",
"MethodId",
"<",
"?",
",",
"R",
">",
"method",
",",
"Local",
"<",
"?",
"super",
"R",
">",
"target",
",",
"Local",
"<",
"?",
">",
"...",
"args",
")",
"{",
"invoke",
"(",
"Rops",
".",
"opInvokeS... | Calls the static method {@code method} using {@code args} and assigns the
result to {@code target}.
@param target the local to receive the method's return value, or {@code
null} if the return type is {@code void} or if its value not needed. | [
"Calls",
"the",
"static",
"method",
"{",
"@code",
"method",
"}",
"using",
"{",
"@code",
"args",
"}",
"and",
"assigns",
"the",
"result",
"to",
"{",
"@code",
"target",
"}",
"."
] | c58ffebcbb2564c7d1fa6fb58b48f351c330296d | https://github.com/linkedin/dexmaker/blob/c58ffebcbb2564c7d1fa6fb58b48f351c330296d/dexmaker/src/main/java/com/android/dx/Code.java#L645-L647 | train | Invoke a static method on the class. | Of course, here is the Java code you requested:
```java
public <R> void invokeStatic(MethodId<?, R> method, Local<? super R> target, Local<?>... args) {
invoke(Rops.opInvokeStatic(method.prototype(true)), method, target, null, args);
}
```
Hope this helps! |
cogroo/cogroo4 | cogroo-eval/UIMAWrappers/UIMAPosTagger/src/main/java/opennlp/uima/postag/POSTaggerWithAdditionalContext.java | POSTaggerWithAdditionalContext.process | @Override
public void process(CAS tcas) {
final AnnotationComboIterator comboIterator = new AnnotationComboIterator(tcas,
this.sentenceType, this.tokenType);
for (AnnotationIteratorPair annotationIteratorPair : comboIterator) {
final List<AnnotationFS> sentenceTokenAnnotationList = new ... | java | @Override
public void process(CAS tcas) {
final AnnotationComboIterator comboIterator = new AnnotationComboIterator(tcas,
this.sentenceType, this.tokenType);
for (AnnotationIteratorPair annotationIteratorPair : comboIterator) {
final List<AnnotationFS> sentenceTokenAnnotationList = new ... | [
"@",
"Override",
"public",
"void",
"process",
"(",
"CAS",
"tcas",
")",
"{",
"final",
"AnnotationComboIterator",
"comboIterator",
"=",
"new",
"AnnotationComboIterator",
"(",
"tcas",
",",
"this",
".",
"sentenceType",
",",
"this",
".",
"tokenType",
")",
";",
"for... | Performs pos-tagging on the given tcas object. | [
"Performs",
"pos",
"-",
"tagging",
"on",
"the",
"given",
"tcas",
"object",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/UIMAWrappers/UIMAPosTagger/src/main/java/opennlp/uima/postag/POSTaggerWithAdditionalContext.java#L167-L253 | train | Process the tcas. | Of course, here is the Java code you requested:
```java
@Override
public void process(CAS tcas) {
final AnnotationComboIterator comboIterator = new AnnotationComboIterator(tcas,
this.sentenceType, this.tokenType);
for (AnnotationIteratorPair annotationIteratorPair : comboIterator) {
fi... |
moparisthebest/beehive | beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/SharedFlowController.java | SharedFlowController.getPreviousPageInfoLegacy | public PreviousPageInfo getPreviousPageInfoLegacy( PageFlowController curJpf, HttpServletRequest request )
{
assert curJpf != null;
return curJpf.getCurrentPageInfo();
} | java | public PreviousPageInfo getPreviousPageInfoLegacy( PageFlowController curJpf, HttpServletRequest request )
{
assert curJpf != null;
return curJpf.getCurrentPageInfo();
} | [
"public",
"PreviousPageInfo",
"getPreviousPageInfoLegacy",
"(",
"PageFlowController",
"curJpf",
",",
"HttpServletRequest",
"request",
")",
"{",
"assert",
"curJpf",
"!=",
"null",
";",
"return",
"curJpf",
".",
"getCurrentPageInfo",
"(",
")",
";",
"}"
] | Get a legacy PreviousPageInfo.
@deprecated This method will be removed without replacement in a future release. | [
"Get",
"a",
"legacy",
"PreviousPageInfo",
"."
] | 4246a0cc40ce3c05f1a02c2da2653ac622703d77 | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/SharedFlowController.java#L172-L176 | train | Get the PreviousPageInfo for the current page. | Of course, here is the Java code you requested:
```java
public PreviousPageInfo getPreviousPageInfoLegacy( PageFlowController curJpf, HttpServletRequest request )
{
assert curJpf != null;
return curJpf.getCurrentPageInfo();
}
```
Hope this helps! |
EdwardRaff/JSAT | JSAT/src/jsat/classifiers/trees/DecisionStump.java | DecisionStump.getSplittingAttribute | public int getSplittingAttribute()
{
//TODO refactor the splittingAttribute to just be in this order already
if(splittingAttribute < catAttributes.length)//categorical feature
return numNumericFeatures+splittingAttribute;
//else, is Numerical attribute
int numerAttribute ... | java | public int getSplittingAttribute()
{
//TODO refactor the splittingAttribute to just be in this order already
if(splittingAttribute < catAttributes.length)//categorical feature
return numNumericFeatures+splittingAttribute;
//else, is Numerical attribute
int numerAttribute ... | [
"public",
"int",
"getSplittingAttribute",
"(",
")",
"{",
"//TODO refactor the splittingAttribute to just be in this order already",
"if",
"(",
"splittingAttribute",
"<",
"catAttributes",
".",
"length",
")",
"//categorical feature",
"return",
"numNumericFeatures",
"+",
"splittin... | Returns the attribute that this stump has decided to use to compute
results. Numeric features start from 0, and categorical features start
from the number of numeric features.
@return the attribute that this stump has decided to use to compute results. | [
"Returns",
"the",
"attribute",
"that",
"this",
"stump",
"has",
"decided",
"to",
"use",
"to",
"compute",
"results",
".",
"Numeric",
"features",
"start",
"from",
"0",
"and",
"categorical",
"features",
"start",
"from",
"the",
"number",
"of",
"numeric",
"features"... | 0ff53b7b39684b2379cc1da522f5b3a954b15cfb | https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/trees/DecisionStump.java#L176-L184 | train | Get the splittingAttribute of the Categorical feature | Of course, here is the Java code you requested:
```java
public int getSplittingAttribute()
{
//TODO refactor the splittingAttribute to just be in this order already
if(splittingAttribute < catAttributes.length)//categorical feature
return numNumericFeatures+splittingAttribute;
/... |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java | FileUtil.writeUtf8String | public static File writeUtf8String(String content, File file) throws IORuntimeException {
return writeString(content, file, CharsetUtil.CHARSET_UTF_8);
} | java | public static File writeUtf8String(String content, File file) throws IORuntimeException {
return writeString(content, file, CharsetUtil.CHARSET_UTF_8);
} | [
"public",
"static",
"File",
"writeUtf8String",
"(",
"String",
"content",
",",
"File",
"file",
")",
"throws",
"IORuntimeException",
"{",
"return",
"writeString",
"(",
"content",
",",
"file",
",",
"CharsetUtil",
".",
"CHARSET_UTF_8",
")",
";",
"}"
] | 将String写入文件,覆盖模式,字符集为UTF-8
@param content 写入的内容
@param file 文件
@return 写入的文件
@throws IORuntimeException IO异常 | [
"将String写入文件,覆盖模式,字符集为UTF",
"-",
"8"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L2707-L2709 | train | Write a UTF - 8 string to a File. | Of course, here is the Java code you requested:
```java
public static File writeUtf8String(String content, File file) throws IORuntimeException {
return writeString(content, file, CharsetUtil.CHARSET_UTF_8);
}
```
Hope this helps! |
zackpollard/JavaTelegramBot-API | core/src/main/java/pro/zackpollard/telegrambot/api/TelegramBot.java | TelegramBot.editInlineMessageText | public boolean editInlineMessageText(String inlineMessageId, String text, ParseMode parseMode, boolean disableWebPagePreview, InlineReplyMarkup inlineReplyMarkup) {
if(inlineMessageId != null && text != null) {
JSONObject jsonResponse = this.editMessageText(null, null, inlineMessageId, text, parse... | java | public boolean editInlineMessageText(String inlineMessageId, String text, ParseMode parseMode, boolean disableWebPagePreview, InlineReplyMarkup inlineReplyMarkup) {
if(inlineMessageId != null && text != null) {
JSONObject jsonResponse = this.editMessageText(null, null, inlineMessageId, text, parse... | [
"public",
"boolean",
"editInlineMessageText",
"(",
"String",
"inlineMessageId",
",",
"String",
"text",
",",
"ParseMode",
"parseMode",
",",
"boolean",
"disableWebPagePreview",
",",
"InlineReplyMarkup",
"inlineReplyMarkup",
")",
"{",
"if",
"(",
"inlineMessageId",
"!=",
... | This allows you to edit the text of an inline message you have sent previously. (The inline message must have an
InlineReplyMarkup object attached in order to be editable)
@param inlineMessageId The ID of the inline message you want to edit
@param text The new text you want to display
@p... | [
"This",
"allows",
"you",
"to",
"edit",
"the",
"text",
"of",
"an",
"inline",
"message",
"you",
"have",
"sent",
"previously",
".",
"(",
"The",
"inline",
"message",
"must",
"have",
"an",
"InlineReplyMarkup",
"object",
"attached",
"in",
"order",
"to",
"be",
"e... | 9d100f351824042ca5fc0ea735d1fa376a13e81d | https://github.com/zackpollard/JavaTelegramBot-API/blob/9d100f351824042ca5fc0ea735d1fa376a13e81d/core/src/main/java/pro/zackpollard/telegrambot/api/TelegramBot.java#L712-L725 | train | Edit inline message text. | Of course, here is the Java code you requested:
```java
public boolean editInlineMessageText(String inlineMessageId, String text, ParseMode parseMode, boolean disableWebPagePreview, InlineReplyMarkup inlineReplyMarkup) {
if(inlineMessageId != null && text != null) {
JSONObject jsonResponse = this... |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.set | public UnicodeSet set(UnicodeSet other) {
checkFrozen();
list = other.list.clone();
len = other.len;
pat = other.pat;
strings = new TreeSet<String>(other.strings);
return this;
} | java | public UnicodeSet set(UnicodeSet other) {
checkFrozen();
list = other.list.clone();
len = other.len;
pat = other.pat;
strings = new TreeSet<String>(other.strings);
return this;
} | [
"public",
"UnicodeSet",
"set",
"(",
"UnicodeSet",
"other",
")",
"{",
"checkFrozen",
"(",
")",
";",
"list",
"=",
"other",
".",
"list",
".",
"clone",
"(",
")",
";",
"len",
"=",
"other",
".",
"len",
";",
"pat",
"=",
"other",
".",
"pat",
";",
"strings"... | Make this object represent the same set as <code>other</code>.
@param other a <code>UnicodeSet</code> whose value will be
copied to this object | [
"Make",
"this",
"object",
"represent",
"the",
"same",
"set",
"as",
"<code",
">",
"other<",
"/",
"code",
">",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L527-L534 | train | Sets this set to be the same as other. | Of course, here is the Java code you requested:
```java
public UnicodeSet set(UnicodeSet other) {
checkFrozen();
list = other.list.clone();
len = other.len;
pat = other.pat;
strings = new TreeSet<String>(other.strings);
return this;
}
```
Hope this helps! |
mongodb/mongo-java-driver | driver-core/src/main/com/mongodb/client/model/Aggregates.java | Aggregates.lookup | public static <TExpression> Bson lookup(final String from, @Nullable final List<Variable<TExpression>> let,
final List<? extends Bson> pipeline, final String as) {
return new LookupStage<TExpression>(from, let, pipeline, as);
} | java | public static <TExpression> Bson lookup(final String from, @Nullable final List<Variable<TExpression>> let,
final List<? extends Bson> pipeline, final String as) {
return new LookupStage<TExpression>(from, let, pipeline, as);
} | [
"public",
"static",
"<",
"TExpression",
">",
"Bson",
"lookup",
"(",
"final",
"String",
"from",
",",
"@",
"Nullable",
"final",
"List",
"<",
"Variable",
"<",
"TExpression",
">",
">",
"let",
",",
"final",
"List",
"<",
"?",
"extends",
"Bson",
">",
"pipeline"... | Creates a $lookup pipeline stage, joining the current collection with the one specified in from using the given pipeline
@param <TExpression> the Variable value expression type
@param from the name of the collection in the same database to perform the join with.
@param let the variables to use in th... | [
"Creates",
"a",
"$lookup",
"pipeline",
"stage",
"joining",
"the",
"current",
"collection",
"with",
"the",
"one",
"specified",
"in",
"from",
"using",
"the",
"given",
"pipeline"
] | a92d47e2e9f2fca55d09229a0a2e2cdc714db085 | https://github.com/mongodb/mongo-java-driver/blob/a92d47e2e9f2fca55d09229a0a2e2cdc714db085/driver-core/src/main/com/mongodb/client/model/Aggregates.java#L280-L283 | valid | Create a lookup stage. | Of course, here is the Java code you requested:
```java
public static <TExpression> Bson lookup(final String from, @Nullable final List<Variable<TExpression>> let,
final List<? extends Bson> pipeline, final String as) {
return new LookupStage<TExpression>(from, let, p... |
Unidata/thredds | ui/src/main/java/ucar/nc2/ui/coverage2/CoverageRenderer.java | CoverageRenderer.getXYvalueStr | public String getXYvalueStr(ProjectionPoint loc) {
if ((lastGrid == null) || (geodata == null))
return "";
// convert to dataProjection, where x and y are orthogonal
if (!sameProjection) {
LatLonPoint llpt = drawProjection.projToLatLon(loc);
loc = dataProjection.latLonToProj(llpt);
}
... | java | public String getXYvalueStr(ProjectionPoint loc) {
if ((lastGrid == null) || (geodata == null))
return "";
// convert to dataProjection, where x and y are orthogonal
if (!sameProjection) {
LatLonPoint llpt = drawProjection.projToLatLon(loc);
loc = dataProjection.latLonToProj(llpt);
}
... | [
"public",
"String",
"getXYvalueStr",
"(",
"ProjectionPoint",
"loc",
")",
"{",
"if",
"(",
"(",
"lastGrid",
"==",
"null",
")",
"||",
"(",
"geodata",
"==",
"null",
")",
")",
"return",
"\"\"",
";",
"// convert to dataProjection, where x and y are orthogonal",
"if",
... | /*
Get the data value at this projection (x,y) point.
@param loc : point in display projection coordinates (plan view)
@return String representation of value | [
"/",
"*",
"Get",
"the",
"data",
"value",
"at",
"this",
"projection",
"(",
"x",
"y",
")",
"point",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/ui/src/main/java/ucar/nc2/ui/coverage2/CoverageRenderer.java#L186-L214 | test | Get the X Y value of the specified location in the last grid. | Of course, here is the Java code you requested:
```java
public String getXYvalueStr(ProjectionPoint loc) {
if ((lastGrid == null) || (geodata == null))
return "";
// convert to dataProjection, where x and y are orthogonal
if (!sameProjection) {
LatLonPoint llpt = drawProjection.projToLatLon(lo... |
Azure/azure-sdk-for-java | appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java | AppServiceEnvironmentsInner.listMultiRolePoolsNextAsync | public Observable<Page<WorkerPoolResourceInner>> listMultiRolePoolsNextAsync(final String nextPageLink) {
return listMultiRolePoolsNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<WorkerPoolResourceInner>>, Page<WorkerPoolResourceInner>>() {
@Override
... | java | public Observable<Page<WorkerPoolResourceInner>> listMultiRolePoolsNextAsync(final String nextPageLink) {
return listMultiRolePoolsNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<WorkerPoolResourceInner>>, Page<WorkerPoolResourceInner>>() {
@Override
... | [
"public",
"Observable",
"<",
"Page",
"<",
"WorkerPoolResourceInner",
">",
">",
"listMultiRolePoolsNextAsync",
"(",
"final",
"String",
"nextPageLink",
")",
"{",
"return",
"listMultiRolePoolsNextWithServiceResponseAsync",
"(",
"nextPageLink",
")",
".",
"map",
"(",
"new",
... | Get all multi-role pools.
Get all multi-role pools.
@param nextPageLink The NextLink from the previous successful call to List operation.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the PagedList<WorkerPoolResourceInner> object | [
"Get",
"all",
"multi",
"-",
"role",
"pools",
".",
"Get",
"all",
"multi",
"-",
"role",
"pools",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L7119-L7127 | train | Gets a list of multi - role pools. | Of course, here is the Java code you requested:
```java
public Observable<Page<WorkerPoolResourceInner>> listMultiRolePoolsNextAsync(final String nextPageLink) {
return listMultiRolePoolsNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<WorkerPoolResourceInner>>, Page<W... |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/proxyhandler/Neighbours.java | Neighbours.createProxy | protected boolean createProxy(
Neighbour neighbour,
DestinationHandler destination,
MESubscription subscription,
SIBUuid12 topicSpace,
String topic,
boolean warmRestarted) throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(
... | java | protected boolean createProxy(
Neighbour neighbour,
DestinationHandler destination,
MESubscription subscription,
SIBUuid12 topicSpace,
String topic,
boolean warmRestarted) throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(
... | [
"protected",
"boolean",
"createProxy",
"(",
"Neighbour",
"neighbour",
",",
"DestinationHandler",
"destination",
",",
"MESubscription",
"subscription",
",",
"SIBUuid12",
"topicSpace",
",",
"String",
"topic",
",",
"boolean",
"warmRestarted",
")",
"throws",
"SIResourceExce... | Creates the proxy based on the meName, topicSpace and topic
for the originating ME.
This creates the PubSubHandler and adds it to the MatchSpace.
@param neighbour The neighbour object that is creating the output handler.
@param destination The destination object that the remote pubsuboutput handler
should be create... | [
"Creates",
"the",
"proxy",
"based",
"on",
"the",
"meName",
"topicSpace",
"and",
"topic",
"for",
"the",
"originating",
"ME",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/proxyhandler/Neighbours.java#L1292-L1353 | train | Create a proxy object for the Neighbour. | Of course, here is the Java code you requested:
```java
protected boolean createProxy(
Neighbour neighbour,
DestinationHandler destination,
MESubscription subscription,
SIBUuid12 topicSpace,
String topic,
boolean warmRestarted) throws SIResourceException
{
if (TraceComponent.isAnyTracingE... |
fracpete/multisearch-weka-package | src/main/java/weka/core/setupgenerator/Space.java | Space.inc | protected boolean inc(Integer[] locations, int[] max) {
boolean result;
int i;
result = true;
i = 0;
while (i < locations.length) {
if (locations[i] < max[i] - 1) {
locations[i]++;
break;
}
else {
locations[i] = 0;
i++;
// adding was not po... | java | protected boolean inc(Integer[] locations, int[] max) {
boolean result;
int i;
result = true;
i = 0;
while (i < locations.length) {
if (locations[i] < max[i] - 1) {
locations[i]++;
break;
}
else {
locations[i] = 0;
i++;
// adding was not po... | [
"protected",
"boolean",
"inc",
"(",
"Integer",
"[",
"]",
"locations",
",",
"int",
"[",
"]",
"max",
")",
"{",
"boolean",
"result",
";",
"int",
"i",
";",
"result",
"=",
"true",
";",
"i",
"=",
"0",
";",
"while",
"(",
"i",
"<",
"locations",
".",
"len... | Increments the location array by 1.
@param locations the position in the space
@param max the maxima
@return true if locations could be incremented | [
"Increments",
"the",
"location",
"array",
"by",
"1",
"."
] | 756fcf343e7cc9fd3844c99a0e1e828368f393d0 | https://github.com/fracpete/multisearch-weka-package/blob/756fcf343e7cc9fd3844c99a0e1e828368f393d0/src/main/java/weka/core/setupgenerator/Space.java#L184-L206 | train | inc method. | Of course, here is the Java code you requested:
```java
protected boolean inc(Integer[] locations, int[] max) {
boolean result;
int i;
result = true;
i = 0;
while (i < locations.length) {
if (locations[i] < max[i] - 1) {
locations[i]++;
break;
}
else {
lo... |
hankcs/HanLP | src/main/java/com/hankcs/hanlp/model/maxent/MaxEntModel.java | MaxEntModel.load | public static MaxEntModel load(String txtPath)
{
ByteArray byteArray = ByteArray.createByteArray(txtPath + Predefine.BIN_EXT);
if (byteArray != null) return create(byteArray);
return create(txtPath);
} | java | public static MaxEntModel load(String txtPath)
{
ByteArray byteArray = ByteArray.createByteArray(txtPath + Predefine.BIN_EXT);
if (byteArray != null) return create(byteArray);
return create(txtPath);
} | [
"public",
"static",
"MaxEntModel",
"load",
"(",
"String",
"txtPath",
")",
"{",
"ByteArray",
"byteArray",
"=",
"ByteArray",
".",
"createByteArray",
"(",
"txtPath",
"+",
"Predefine",
".",
"BIN_EXT",
")",
";",
"if",
"(",
"byteArray",
"!=",
"null",
")",
"return"... | 加载最大熵模型<br>
如果存在缓存的话,优先读取缓存,否则读取txt,并且建立缓存
@param txtPath txt的路径,即使不存在.txt,只存在.bin,也应传入txt的路径,方法内部会自动加.bin后缀
@return | [
"加载最大熵模型<br",
">",
"如果存在缓存的话,优先读取缓存,否则读取txt,并且建立缓存"
] | a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce | https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/maxent/MaxEntModel.java#L372-L377 | train | Load a MaxEntModel from a file in a CRA file. | Of course, here is the Java code you requested:
```java
public static MaxEntModel load(String txtPath)
{
ByteArray byteArray = ByteArray.createByteArray(txtPath + Predefine.BIN_EXT);
if (byteArray != null) return create(byteArray);
return create(txtPath);
}
```
Hope this helps! |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java | MACNumber.isNull | @Pure
public boolean isNull() {
for (int i = 0; i < this.bytes.length; ++i) {
if (this.bytes[i] != 0) {
return false;
}
}
return true;
} | java | @Pure
public boolean isNull() {
for (int i = 0; i < this.bytes.length; ++i) {
if (this.bytes[i] != 0) {
return false;
}
}
return true;
} | [
"@",
"Pure",
"public",
"boolean",
"isNull",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"bytes",
".",
"length",
";",
"++",
"i",
")",
"{",
"if",
"(",
"this",
".",
"bytes",
"[",
"i",
"]",
"!=",
"0",
")",
"{",
... | Replies if all the MAC address number are equal to zero.
@return <code>true</code> if all the bytes are zero.
@see #NULL | [
"Replies",
"if",
"all",
"the",
"MAC",
"address",
"number",
"are",
"equal",
"to",
"zero",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java#L385-L393 | train | Checks if the value of this object is null. | Of course, here is the Java code you requested:
```java
@Pure
public boolean isNull() {
for (int i = 0; i < this.bytes.length; ++i) {
if (this.bytes[i] != 0) {
return false;
}
}
return true;
}
```
Hope this helps! |
line/armeria | core/src/main/java/com/linecorp/armeria/internal/annotation/AnnotationUtil.java | AnnotationUtil.find | static <T extends Annotation> List<T> find(AnnotatedElement element, Class<T> annotationType,
EnumSet<FindOption> findOptions) {
requireNonNull(element, "element");
requireNonNull(annotationType, "annotationType");
final Builder<T> builder = new Bu... | java | static <T extends Annotation> List<T> find(AnnotatedElement element, Class<T> annotationType,
EnumSet<FindOption> findOptions) {
requireNonNull(element, "element");
requireNonNull(annotationType, "annotationType");
final Builder<T> builder = new Bu... | [
"static",
"<",
"T",
"extends",
"Annotation",
">",
"List",
"<",
"T",
">",
"find",
"(",
"AnnotatedElement",
"element",
",",
"Class",
"<",
"T",
">",
"annotationType",
",",
"EnumSet",
"<",
"FindOption",
">",
"findOptions",
")",
"{",
"requireNonNull",
"(",
"ele... | Returns all annotations of the {@code annotationType} searching from the specified {@code element}.
The search range depends on the specified {@link FindOption}s.
@param element the {@link AnnotatedElement} to find annotations
@param annotationType the type of the annotation to find
@param findOptions the options to b... | [
"Returns",
"all",
"annotations",
"of",
"the",
"{",
"@code",
"annotationType",
"}",
"searching",
"from",
"the",
"specified",
"{",
"@code",
"element",
"}",
".",
"The",
"search",
"range",
"depends",
"on",
"the",
"specified",
"{",
"@link",
"FindOption",
"}",
"s"... | 67d29e019fd35a35f89c45cc8f9119ff9b12b44d | https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/internal/annotation/AnnotationUtil.java#L197-L218 | train | Find all annotations of the given type. | Of course, here is the Java code you requested:
```java
static <T extends Annotation> List<T> find(AnnotatedElement element, Class<T> annotationType,
EnumSet<FindOption> findOptions) {
requireNonNull(element, "element");
requireNonNull(annotationType, "ann... |
threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.blockFinished | protected void blockFinished (SceneBlock block)
{
--_pendingBlocks;
// once all the visible pending blocks have completed their
// resolution, recompute our visible object set and show ourselves
if (_visiBlocks.remove(block) && _visiBlocks.size() == 0) {
allBlocksFinishe... | java | protected void blockFinished (SceneBlock block)
{
--_pendingBlocks;
// once all the visible pending blocks have completed their
// resolution, recompute our visible object set and show ourselves
if (_visiBlocks.remove(block) && _visiBlocks.size() == 0) {
allBlocksFinishe... | [
"protected",
"void",
"blockFinished",
"(",
"SceneBlock",
"block",
")",
"{",
"--",
"_pendingBlocks",
";",
"// once all the visible pending blocks have completed their",
"// resolution, recompute our visible object set and show ourselves",
"if",
"(",
"_visiBlocks",
".",
"remove",
"... | Called whenever a block is done resolving, whether it was successfully resolved or if it
was abandoned. | [
"Called",
"whenever",
"a",
"block",
"is",
"done",
"resolving",
"whether",
"it",
"was",
"successfully",
"resolved",
"or",
"if",
"it",
"was",
"abandoned",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L938-L947 | train | Called when a block has finished. | Of course, here is the Java code you requested:
```java
protected void blockFinished (SceneBlock block)
{
--_pendingBlocks;
// once all the visible pending blocks have completed their
// resolution, recompute our visible object set and show ourselves
if (_visiBlocks.remove(block) &... |
inferred/FreeBuilder | generated/main/java/org/inferred/freebuilder/processor/Datatype_Builder.java | Datatype_Builder.setBuilderFactory | public Datatype.Builder setBuilderFactory(Optional<? extends BuilderFactory> builderFactory) {
if (builderFactory.isPresent()) {
return setBuilderFactory(builderFactory.get());
} else {
return clearBuilderFactory();
}
} | java | public Datatype.Builder setBuilderFactory(Optional<? extends BuilderFactory> builderFactory) {
if (builderFactory.isPresent()) {
return setBuilderFactory(builderFactory.get());
} else {
return clearBuilderFactory();
}
} | [
"public",
"Datatype",
".",
"Builder",
"setBuilderFactory",
"(",
"Optional",
"<",
"?",
"extends",
"BuilderFactory",
">",
"builderFactory",
")",
"{",
"if",
"(",
"builderFactory",
".",
"isPresent",
"(",
")",
")",
"{",
"return",
"setBuilderFactory",
"(",
"builderFac... | Sets the value to be returned by {@link Datatype#getBuilderFactory()}.
@return this {@code Builder} object | [
"Sets",
"the",
"value",
"to",
"be",
"returned",
"by",
"{",
"@link",
"Datatype#getBuilderFactory",
"()",
"}",
"."
] | d5a222f90648aece135da4b971c55a60afe8649c | https://github.com/inferred/FreeBuilder/blob/d5a222f90648aece135da4b971c55a60afe8649c/generated/main/java/org/inferred/freebuilder/processor/Datatype_Builder.java#L255-L261 | train | Set the Datatype. Builder builder factory. | Of course, here is the Java code you requested:
```java
public Datatype.Builder setBuilderFactory(Optional<? extends BuilderFactory> builderFactory) {
if (builderFactory.isPresent()) {
return setBuilderFactory(builderFactory.get());
} else {
return clearBuilderFactory();
}
}
```
Hope this he... |
aoindustries/aoweb-framework | src/main/java/com/aoindustries/website/framework/WebPage.java | WebPage.reportingDoGet | @Override
final protected void reportingDoGet(HttpServletRequest httpReq, HttpServletResponse resp) throws ServletException, IOException, SQLException {
WebSiteRequest req=getWebSiteRequest(httpReq);
WebPage page=getWebPage(getClass(), req);
// Logout when requested
boolean isLogout="true".equals(req.getParame... | java | @Override
final protected void reportingDoGet(HttpServletRequest httpReq, HttpServletResponse resp) throws ServletException, IOException, SQLException {
WebSiteRequest req=getWebSiteRequest(httpReq);
WebPage page=getWebPage(getClass(), req);
// Logout when requested
boolean isLogout="true".equals(req.getParame... | [
"@",
"Override",
"final",
"protected",
"void",
"reportingDoGet",
"(",
"HttpServletRequest",
"httpReq",
",",
"HttpServletResponse",
"resp",
")",
"throws",
"ServletException",
",",
"IOException",
",",
"SQLException",
"{",
"WebSiteRequest",
"req",
"=",
"getWebSiteRequest",... | First, resolves correct instance of <code>WebPage</code>. Next, handles security
mode, authentication check, and redirects. Anything left goes on to <code>doGet</code>.
@see #doGet(WebSiteRequest,HttpServletResponse) | [
"First",
"resolves",
"correct",
"instance",
"of",
"<code",
">",
"WebPage<",
"/",
"code",
">",
".",
"Next",
"handles",
"security",
"mode",
"authentication",
"check",
"and",
"redirects",
".",
"Anything",
"left",
"goes",
"on",
"to",
"<code",
">",
"doGet<",
"/",... | 8e58af4f5dd898cd2fdb855ffa810a1ca6973ae0 | https://github.com/aoindustries/aoweb-framework/blob/8e58af4f5dd898cd2fdb855ffa810a1ca6973ae0/src/main/java/com/aoindustries/website/framework/WebPage.java#L302-L336 | train | Override this method to perform processing for a GET request. | Of course, here is the Java code you requested:
```java
@Override
final protected void reportingDoGet(HttpServletRequest httpReq, HttpServletResponse resp) throws ServletException, IOException, SQLException {
WebSiteRequest req=getWebSiteRequest(httpReq);
WebPage page=getWebPage(getClass(), req);
// Logout when... |
alkacon/opencms-core | src/org/opencms/ade/sitemap/shared/CmsSitemapClipboardData.java | CmsSitemapClipboardData.addDeleted | public void addDeleted(CmsClientSitemapEntry entry) {
if (m_deletions.containsKey(entry.getId())) {
m_deletions.remove(entry.getId());
}
m_deletions.put(entry.getId(), entry);
checkMapSize(m_deletions);
} | java | public void addDeleted(CmsClientSitemapEntry entry) {
if (m_deletions.containsKey(entry.getId())) {
m_deletions.remove(entry.getId());
}
m_deletions.put(entry.getId(), entry);
checkMapSize(m_deletions);
} | [
"public",
"void",
"addDeleted",
"(",
"CmsClientSitemapEntry",
"entry",
")",
"{",
"if",
"(",
"m_deletions",
".",
"containsKey",
"(",
"entry",
".",
"getId",
"(",
")",
")",
")",
"{",
"m_deletions",
".",
"remove",
"(",
"entry",
".",
"getId",
"(",
")",
")",
... | Adds an entry to the deleted list.<p>
@param entry the entry to add | [
"Adds",
"an",
"entry",
"to",
"the",
"deleted",
"list",
".",
"<p",
">"
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/sitemap/shared/CmsSitemapClipboardData.java#L78-L85 | train | Adds a deleted entry to the sitemap. | Of course, here is the Java code you requested:
```java
public void addDeleted(CmsClientSitemapEntry entry) {
if (m_deletions.containsKey(entry.getId())) {
m_deletions.remove(entry.getId());
}
m_deletions.put(entry.getId(), entry);
checkMapSize(m_deletions);
}
```
Hope... |
mongodb/mongo-java-driver | bson/src/main/org/bson/types/ObjectId.java | ObjectId.putToByteBuffer | public void putToByteBuffer(final ByteBuffer buffer) {
notNull("buffer", buffer);
isTrueArgument("buffer.remaining() >=12", buffer.remaining() >= OBJECT_ID_LENGTH);
buffer.put(int3(timestamp));
buffer.put(int2(timestamp));
buffer.put(int1(timestamp));
buffer.put(int0(tim... | java | public void putToByteBuffer(final ByteBuffer buffer) {
notNull("buffer", buffer);
isTrueArgument("buffer.remaining() >=12", buffer.remaining() >= OBJECT_ID_LENGTH);
buffer.put(int3(timestamp));
buffer.put(int2(timestamp));
buffer.put(int1(timestamp));
buffer.put(int0(tim... | [
"public",
"void",
"putToByteBuffer",
"(",
"final",
"ByteBuffer",
"buffer",
")",
"{",
"notNull",
"(",
"\"buffer\"",
",",
"buffer",
")",
";",
"isTrueArgument",
"(",
"\"buffer.remaining() >=12\"",
",",
"buffer",
".",
"remaining",
"(",
")",
">=",
"OBJECT_ID_LENGTH",
... | Convert to bytes and put those bytes to the provided ByteBuffer.
Note that the numbers are stored in big-endian order.
@param buffer the ByteBuffer
@throws IllegalArgumentException if the buffer is null or does not have at least 12 bytes remaining
@since 3.4 | [
"Convert",
"to",
"bytes",
"and",
"put",
"those",
"bytes",
"to",
"the",
"provided",
"ByteBuffer",
".",
"Note",
"that",
"the",
"numbers",
"are",
"stored",
"in",
"big",
"-",
"endian",
"order",
"."
] | a92d47e2e9f2fca55d09229a0a2e2cdc714db085 | https://github.com/mongodb/mongo-java-driver/blob/a92d47e2e9f2fca55d09229a0a2e2cdc714db085/bson/src/main/org/bson/types/ObjectId.java#L284-L300 | valid | Puts the data to the given ByteBuffer. | Of course, here is the Java code you requested:
```java
public void putToByteBuffer(final ByteBuffer buffer) {
notNull("buffer", buffer);
isTrueArgument("buffer.remaining() >=12", buffer.remaining() >= OBJECT_ID_LENGTH);
buffer.put(int3(timestamp));
buffer.put(int2(timestamp));
... |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/functions/FunctionUtils.java | FunctionUtils.resolveFunction | public static String resolveFunction(String functionString, TestContext context) {
String functionExpression = VariableUtils.cutOffVariablesPrefix(functionString);
if (!functionExpression.contains("(") || !functionExpression.endsWith(")") || !functionExpression.contains(":")) {
throw new In... | java | public static String resolveFunction(String functionString, TestContext context) {
String functionExpression = VariableUtils.cutOffVariablesPrefix(functionString);
if (!functionExpression.contains("(") || !functionExpression.endsWith(")") || !functionExpression.contains(":")) {
throw new In... | [
"public",
"static",
"String",
"resolveFunction",
"(",
"String",
"functionString",
",",
"TestContext",
"context",
")",
"{",
"String",
"functionExpression",
"=",
"VariableUtils",
".",
"cutOffVariablesPrefix",
"(",
"functionString",
")",
";",
"if",
"(",
"!",
"functionE... | This method resolves a custom function to its respective result.
@param functionString to evaluate.
@throws com.consol.citrus.exceptions.CitrusRuntimeException
@return evaluated result | [
"This",
"method",
"resolves",
"a",
"custom",
"function",
"to",
"its",
"respective",
"result",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/functions/FunctionUtils.java#L127-L150 | train | Resolves a function string. | Of course, here is the Java code you requested:
```java
public static String resolveFunction(String functionString, TestContext context) {
String functionExpression = VariableUtils.cutOffVariablesPrefix(functionString);
if (!functionExpression.contains("(") || !functionExpression.endsWith(")") || !fun... |
aws/aws-sdk-java | aws-java-sdk-workdocs/src/main/java/com/amazonaws/services/workdocs/model/transform/ActivityMarshaller.java | ActivityMarshaller.marshall | public void marshall(Activity activity, ProtocolMarshaller protocolMarshaller) {
if (activity == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(activity.getType(), TYPE_BINDING);
protocol... | java | public void marshall(Activity activity, ProtocolMarshaller protocolMarshaller) {
if (activity == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(activity.getType(), TYPE_BINDING);
protocol... | [
"public",
"void",
"marshall",
"(",
"Activity",
"activity",
",",
"ProtocolMarshaller",
"protocolMarshaller",
")",
"{",
"if",
"(",
"activity",
"==",
"null",
")",
"{",
"throw",
"new",
"SdkClientException",
"(",
"\"Invalid argument passed to marshall(...)\"",
")",
";",
... | Marshall the given parameter object. | [
"Marshall",
"the",
"given",
"parameter",
"object",
"."
] | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-workdocs/src/main/java/com/amazonaws/services/workdocs/model/transform/ActivityMarshaller.java#L58-L77 | train | marshalls the given Activity to the JSON object. | Of course, here is the Java code you requested:
```java
public void marshall(Activity activity, ProtocolMarshaller protocolMarshaller) {
if (activity == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshal... |
Azure/azure-sdk-for-java | network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRoutePortsInner.java | ExpressRoutePortsInner.getByResourceGroupAsync | public Observable<ExpressRoutePortInner> getByResourceGroupAsync(String resourceGroupName, String expressRoutePortName) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, expressRoutePortName).map(new Func1<ServiceResponse<ExpressRoutePortInner>, ExpressRoutePortInner>() {
@Overr... | java | public Observable<ExpressRoutePortInner> getByResourceGroupAsync(String resourceGroupName, String expressRoutePortName) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, expressRoutePortName).map(new Func1<ServiceResponse<ExpressRoutePortInner>, ExpressRoutePortInner>() {
@Overr... | [
"public",
"Observable",
"<",
"ExpressRoutePortInner",
">",
"getByResourceGroupAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"expressRoutePortName",
")",
"{",
"return",
"getByResourceGroupWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"expressRoutePortNam... | Retrieves the requested ExpressRoutePort resource.
@param resourceGroupName The name of the resource group.
@param expressRoutePortName The name of ExpressRoutePort.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the ExpressRoutePortInner object | [
"Retrieves",
"the",
"requested",
"ExpressRoutePort",
"resource",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRoutePortsInner.java#L302-L309 | train | Gets an ExpressRoutePort resource. | Of course, here is the Java code you requested:
```java
public Observable<ExpressRoutePortInner> getByResourceGroupAsync(String resourceGroupName, String expressRoutePortName) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, expressRoutePortName).map(new Func1<ServiceResponse<ExpressRoute... |
osmdroid/osmdroid | osmdroid-android/src/main/java/org/osmdroid/tileprovider/modules/TileWriter.java | TileWriter.saveFile | @Override
public boolean saveFile(final ITileSource pTileSource, final long pMapTileIndex,
final InputStream pStream, final Long pExpirationTime) {
final File file = getFile(pTileSource, pMapTileIndex);
if (Configuration.getInstance().isDebugTileProviders()){
Log.d(IMapView.LOGTAG, "TileWrite " + file.getA... | java | @Override
public boolean saveFile(final ITileSource pTileSource, final long pMapTileIndex,
final InputStream pStream, final Long pExpirationTime) {
final File file = getFile(pTileSource, pMapTileIndex);
if (Configuration.getInstance().isDebugTileProviders()){
Log.d(IMapView.LOGTAG, "TileWrite " + file.getA... | [
"@",
"Override",
"public",
"boolean",
"saveFile",
"(",
"final",
"ITileSource",
"pTileSource",
",",
"final",
"long",
"pMapTileIndex",
",",
"final",
"InputStream",
"pStream",
",",
"final",
"Long",
"pExpirationTime",
")",
"{",
"final",
"File",
"file",
"=",
"getFile... | =========================================================== | [
"==========================================================="
] | 3b178b2f078497dd88c137110e87aafe45ad2b16 | https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/tileprovider/modules/TileWriter.java#L102-L135 | train | Save the contents of the given stream to the file system. | Of course, here is the Java code you requested:
```java
@Override
public boolean saveFile(final ITileSource pTileSource, final long pMapTileIndex,
final InputStream pStream, final Long pExpirationTime) {
final File file = getFile(pTileSource, pMapTileIndex);
if (Configuration.getInstance().isDebugTileProvide... |
jhalterman/failsafe | src/main/java/net/jodah/failsafe/FailurePolicy.java | FailurePolicy.resultPredicateFor | static <R> BiPredicate<R, Throwable> resultPredicateFor(R result) {
return (t, u) -> Objects.equals(result, t);
} | java | static <R> BiPredicate<R, Throwable> resultPredicateFor(R result) {
return (t, u) -> Objects.equals(result, t);
} | [
"static",
"<",
"R",
">",
"BiPredicate",
"<",
"R",
",",
"Throwable",
">",
"resultPredicateFor",
"(",
"R",
"result",
")",
"{",
"return",
"(",
"t",
",",
"u",
")",
"->",
"Objects",
".",
"equals",
"(",
"result",
",",
"t",
")",
";",
"}"
] | Returns a predicate that evaluates whether the {@code result} equals an execution result. | [
"Returns",
"a",
"predicate",
"that",
"evaluates",
"whether",
"the",
"{"
] | 65fcd3a82f7b232d2ff59bc525a59d693dd8e223 | https://github.com/jhalterman/failsafe/blob/65fcd3a82f7b232d2ff59bc525a59d693dd8e223/src/main/java/net/jodah/failsafe/FailurePolicy.java#L174-L176 | train | Returns a predicate that returns true if the given result is equal to the given exception. | Of course, here is the Java code you requested:
```java
static <R> BiPredicate<R, Throwable> resultPredicateFor(R result) {
return (t, u) -> Objects.equals(result, t);
}
```
Hope this helps! |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java | BaseBigtableInstanceAdminClient.deleteCluster | public final void deleteCluster(ClusterName name) {
DeleteClusterRequest request =
DeleteClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build();
deleteCluster(request);
} | java | public final void deleteCluster(ClusterName name) {
DeleteClusterRequest request =
DeleteClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build();
deleteCluster(request);
} | [
"public",
"final",
"void",
"deleteCluster",
"(",
"ClusterName",
"name",
")",
"{",
"DeleteClusterRequest",
"request",
"=",
"DeleteClusterRequest",
".",
"newBuilder",
"(",
")",
".",
"setName",
"(",
"name",
"==",
"null",
"?",
"null",
":",
"name",
".",
"toString",... | Deletes a cluster from an instance.
<p>Sample code:
<pre><code>
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
baseBigtableInstanceAdminClient.deleteCluster(name);
}
</code></... | [
"Deletes",
"a",
"cluster",
"from",
"an",
"instance",
"."
] | d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java#L1152-L1157 | train | Delete a cluster. | Of course, here is the Java code you requested:
```java
public final void deleteCluster(ClusterName name) {
DeleteClusterRequest request =
DeleteClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build();
deleteCluster(request);
}
```
Hope this helps! |
geomajas/geomajas-project-client-gwt2 | impl/src/main/java/org/geomajas/gwt2/client/map/render/dom/DomLayersModelRenderer.java | DomLayersModelRenderer.render | @Override
public void render(RenderingInfo renderingInfo) {
if (renderingInfo == null) {
throw new NullPointerException("RenderingInfo cannot be null.");
}
if (!(renderingInfo.getWidget() instanceof HtmlContainer)) {
throw new IllegalArgumentException("This renderer requires a HtmlContainer to render in.")... | java | @Override
public void render(RenderingInfo renderingInfo) {
if (renderingInfo == null) {
throw new NullPointerException("RenderingInfo cannot be null.");
}
if (!(renderingInfo.getWidget() instanceof HtmlContainer)) {
throw new IllegalArgumentException("This renderer requires a HtmlContainer to render in.")... | [
"@",
"Override",
"public",
"void",
"render",
"(",
"RenderingInfo",
"renderingInfo",
")",
"{",
"if",
"(",
"renderingInfo",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"RenderingInfo cannot be null.\"",
")",
";",
"}",
"if",
"(",
"!",
"... | ------------------------------------------------------------------------ | [
"------------------------------------------------------------------------"
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/impl/src/main/java/org/geomajas/gwt2/client/map/render/dom/DomLayersModelRenderer.java#L192-L217 | train | Render the rendering info. | Of course, here is the Java code you requested:
```java
@Override
public void render(RenderingInfo renderingInfo) {
if (renderingInfo == null) {
throw new NullPointerException("RenderingInfo cannot be null.");
}
if (!(renderingInfo.getWidget() instanceof HtmlContainer)) {
throw new IllegalArgumentExceptio... |
wcm-io/wcm-io-tooling | netbeans/sightly/src/main/java/io/wcm/tooling/netbeans/sightly/completion/classLookup/MemberLookupResolver.java | MemberLookupResolver.performNestedLookup | private Set<MemberLookupResult> performNestedLookup(String variable) {
Set<MemberLookupResult> ret = new LinkedHashSet<>();
// start with the first part
String[] parts = StringUtils.split(variable, ".");
if (parts.length > 2) {
Set<MemberLookupResult> subResult = performNestedLookup(StringUtils.su... | java | private Set<MemberLookupResult> performNestedLookup(String variable) {
Set<MemberLookupResult> ret = new LinkedHashSet<>();
// start with the first part
String[] parts = StringUtils.split(variable, ".");
if (parts.length > 2) {
Set<MemberLookupResult> subResult = performNestedLookup(StringUtils.su... | [
"private",
"Set",
"<",
"MemberLookupResult",
">",
"performNestedLookup",
"(",
"String",
"variable",
")",
"{",
"Set",
"<",
"MemberLookupResult",
">",
"ret",
"=",
"new",
"LinkedHashSet",
"<>",
"(",
")",
";",
"// start with the first part",
"String",
"[",
"]",
"par... | performs a nested lookup. E.g for foo.bar it will resolve the type of bar and then get it's methods
@param variable e.g. foo.bar
@return set with matching results | [
"performs",
"a",
"nested",
"lookup",
".",
"E",
".",
"g",
"for",
"foo",
".",
"bar",
"it",
"will",
"resolve",
"the",
"type",
"of",
"bar",
"and",
"then",
"get",
"it",
"s",
"methods"
] | 1abcd01dd3ad4cc248f03b431f929573d84fa9b4 | https://github.com/wcm-io/wcm-io-tooling/blob/1abcd01dd3ad4cc248f03b431f929573d84fa9b4/netbeans/sightly/src/main/java/io/wcm/tooling/netbeans/sightly/completion/classLookup/MemberLookupResolver.java#L109-L131 | train | Perform a nested lookup of a variable. | Of course, here is the Java code you requested:
```java
private Set<MemberLookupResult> performNestedLookup(String variable) {
Set<MemberLookupResult> ret = new LinkedHashSet<>();
// start with the first part
String[] parts = StringUtils.split(variable, ".");
if (parts.length > 2) {
Set<MemberLoo... |
aragozin/jvm-tools | mxdump/src/main/java/org/gridkit/jvmtool/jackson/NumberOutput.java | NumberOutput.outputLeadingTriplet | private static int outputLeadingTriplet(int triplet, char[] buffer, int offset)
{
int digitOffset = (triplet << 2);
char c = LEADING_TRIPLETS[digitOffset++];
if (c != NULL_CHAR) {
buffer[offset++] = c;
}
c = LEADING_TRIPLETS[digitOffset++];
if (c != NULL_C... | java | private static int outputLeadingTriplet(int triplet, char[] buffer, int offset)
{
int digitOffset = (triplet << 2);
char c = LEADING_TRIPLETS[digitOffset++];
if (c != NULL_CHAR) {
buffer[offset++] = c;
}
c = LEADING_TRIPLETS[digitOffset++];
if (c != NULL_C... | [
"private",
"static",
"int",
"outputLeadingTriplet",
"(",
"int",
"triplet",
",",
"char",
"[",
"]",
"buffer",
",",
"int",
"offset",
")",
"{",
"int",
"digitOffset",
"=",
"(",
"triplet",
"<<",
"2",
")",
";",
"char",
"c",
"=",
"LEADING_TRIPLETS",
"[",
"digitO... | /*
********************************************************
/* Internal methods
******************************************************** | [
"/",
"*",
"********************************************************",
"/",
"*",
"Internal",
"methods",
"********************************************************"
] | d3a4d0c6a47fb9317f274988569655f30dcd2f76 | https://github.com/aragozin/jvm-tools/blob/d3a4d0c6a47fb9317f274988569655f30dcd2f76/mxdump/src/main/java/org/gridkit/jvmtool/jackson/NumberOutput.java#L328-L342 | train | Output the leading triplet into the buffer. | Of course, here is the Java code you requested:
```java
private static int outputLeadingTriplet(int triplet, char[] buffer, int offset)
{
int digitOffset = (triplet << 2);
char c = LEADING_TRIPLETS[digitOffset++];
if (c != NULL_CHAR) {
buffer[offset++] = c;
}
c =... |
kotcrab/vis-ui | ui/src/main/java/com/kotcrab/vis/ui/util/form/FormValidator.java | FormValidator.directory | public FormInputValidator directory (VisValidatableTextField field, String errorMsg) {
DirectoryValidator validator = new DirectoryValidator(errorMsg);
field.addValidator(validator);
add(field);
return validator;
} | java | public FormInputValidator directory (VisValidatableTextField field, String errorMsg) {
DirectoryValidator validator = new DirectoryValidator(errorMsg);
field.addValidator(validator);
add(field);
return validator;
} | [
"public",
"FormInputValidator",
"directory",
"(",
"VisValidatableTextField",
"field",
",",
"String",
"errorMsg",
")",
"{",
"DirectoryValidator",
"validator",
"=",
"new",
"DirectoryValidator",
"(",
"errorMsg",
")",
";",
"field",
".",
"addValidator",
"(",
"validator",
... | Validates if relative path entered in text field points to an existing directory. | [
"Validates",
"if",
"relative",
"path",
"entered",
"in",
"text",
"field",
"points",
"to",
"an",
"existing",
"directory",
"."
] | 3b68f82d94ae32bffa2a3399c63f432e0f4908e0 | https://github.com/kotcrab/vis-ui/blob/3b68f82d94ae32bffa2a3399c63f432e0f4908e0/ui/src/main/java/com/kotcrab/vis/ui/util/form/FormValidator.java#L156-L161 | train | Validates if entered text is a directory. | Of course, here is the Java code you requested:
```java
public FormInputValidator directory (VisValidatableTextField field, String errorMsg) {
DirectoryValidator validator = new DirectoryValidator(errorMsg);
field.addValidator(validator);
add(field);
return validator;
}
```
Hope this helps! |
jayantk/jklol | src/com/jayantkrish/jklol/ccg/HeadedSyntacticCategory.java | HeadedSyntacticCategory.getCanonicalForm | public HeadedSyntacticCategory getCanonicalForm(Map<Integer, Integer> relabeling) {
Preconditions.checkArgument(relabeling.size() == 0);
int[] relabeledVariables = canonicalizeVariableArray(semanticVariables, relabeling);
return new HeadedSyntacticCategory(syntacticCategory.getCanonicalForm(), relabeledVari... | java | public HeadedSyntacticCategory getCanonicalForm(Map<Integer, Integer> relabeling) {
Preconditions.checkArgument(relabeling.size() == 0);
int[] relabeledVariables = canonicalizeVariableArray(semanticVariables, relabeling);
return new HeadedSyntacticCategory(syntacticCategory.getCanonicalForm(), relabeledVari... | [
"public",
"HeadedSyntacticCategory",
"getCanonicalForm",
"(",
"Map",
"<",
"Integer",
",",
"Integer",
">",
"relabeling",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"relabeling",
".",
"size",
"(",
")",
"==",
"0",
")",
";",
"int",
"[",
"]",
"relabele... | Gets a canonical representation of this category that treats each
variable number as an equivalence class. The canonical form
relabels variables in the category such that all categories with
the same variable equivalence relations have the same canonical
form.
@param relabeling the relabeling applied to variables in t... | [
"Gets",
"a",
"canonical",
"representation",
"of",
"this",
"category",
"that",
"treats",
"each",
"variable",
"number",
"as",
"an",
"equivalence",
"class",
".",
"The",
"canonical",
"form",
"relabels",
"variables",
"in",
"the",
"category",
"such",
"that",
"all",
... | d27532ca83e212d51066cf28f52621acc3fd44cc | https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/ccg/HeadedSyntacticCategory.java#L217-L221 | train | Gets the canonical form of this category. | Of course, here is the Java code you requested:
```java
public HeadedSyntacticCategory getCanonicalForm(Map<Integer, Integer> relabeling) {
Preconditions.checkArgument(relabeling.size() == 0);
int[] relabeledVariables = canonicalizeVariableArray(semanticVariables, relabeling);
return new HeadedSyntacticCat... |
infinispan/infinispan | persistence/remote/src/main/java/org/infinispan/persistence/remote/configuration/ExecutorFactoryConfigurationBuilder.java | ExecutorFactoryConfigurationBuilder.addExecutorProperty | public ExecutorFactoryConfigurationBuilder addExecutorProperty(String key, String value) {
TypedProperties properties = attributes.attribute(PROPERTIES).get();
properties.put(key, value);
attributes.attribute(PROPERTIES).set(properties);
return this;
} | java | public ExecutorFactoryConfigurationBuilder addExecutorProperty(String key, String value) {
TypedProperties properties = attributes.attribute(PROPERTIES).get();
properties.put(key, value);
attributes.attribute(PROPERTIES).set(properties);
return this;
} | [
"public",
"ExecutorFactoryConfigurationBuilder",
"addExecutorProperty",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"TypedProperties",
"properties",
"=",
"attributes",
".",
"attribute",
"(",
"PROPERTIES",
")",
".",
"get",
"(",
")",
";",
"properties",
"... | Add key/value property pair to this executor factory configuration
@param key
property key
@param value
property value
@return previous value if exists, null otherwise | [
"Add",
"key",
"/",
"value",
"property",
"pair",
"to",
"this",
"executor",
"factory",
"configuration"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/persistence/remote/src/main/java/org/infinispan/persistence/remote/configuration/ExecutorFactoryConfigurationBuilder.java#L59-L64 | train | Add an executor property to the configuration. | Of course, here is the Java code you requested:
```java
public ExecutorFactoryConfigurationBuilder addExecutorProperty(String key, String value) {
TypedProperties properties = attributes.attribute(PROPERTIES).get();
properties.put(key, value);
attributes.attribute(PROPERTIES).set(properties);
r... |
lemire/JavaFastPFOR | src/main/java/me/lemire/integercompression/differential/Delta.java | Delta.delta | public static int delta(int[] data, int start, int length, int init,
int[] out) {
for (int i = length - 1; i > 0; --i) {
out[i] = data[start + i] - data[start + i - 1];
}
out[0] = data[start] - init;
return data[star... | java | public static int delta(int[] data, int start, int length, int init,
int[] out) {
for (int i = length - 1; i > 0; --i) {
out[i] = data[start + i] - data[start + i - 1];
}
out[0] = data[start] - init;
return data[star... | [
"public",
"static",
"int",
"delta",
"(",
"int",
"[",
"]",
"data",
",",
"int",
"start",
",",
"int",
"length",
",",
"int",
"init",
",",
"int",
"[",
"]",
"out",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"length",
"-",
"1",
";",
"i",
">",
"0",
";",
... | Compute differential coding given an initial value. Output is written
to a provided array: must have length "length" or better.
@param data
data to be modified
@param start
starting index
@param length
number of integers to process
@param init
initial value
@param out
output array
@return next initial vale | [
"Compute",
"differential",
"coding",
"given",
"an",
"initial",
"value",
".",
"Output",
"is",
"written",
"to",
"a",
"provided",
"array",
":",
"must",
"have",
"length",
"length",
"or",
"better",
"."
] | ffeea61ab2fdb3854da7b0a557f8d22d674477f4 | https://github.com/lemire/JavaFastPFOR/blob/ffeea61ab2fdb3854da7b0a557f8d22d674477f4/src/main/java/me/lemire/integercompression/differential/Delta.java#L68-L75 | train | delta of two int array | Of course, here is the Java code you requested:
```java
public static int delta(int[] data, int start, int length, int init,
int[] out) {
for (int i = length - 1; i > 0; --i) {
out[i] = data[start + i] - data[start + i - 1];
}
out[... |
cdk/cdk | storage/pdb/src/main/java/org/openscience/cdk/templates/AminoAcids.java | AminoAcids.getHashMapBySingleCharCode | public static Map<String, IAminoAcid> getHashMapBySingleCharCode() {
IAminoAcid[] monomers = createAAs();
HashMap<String, IAminoAcid> map = new HashMap<String, IAminoAcid>();
for (int i = 0; i < monomers.length; i++) {
map.put((String) monomers[i].getProperty(RESIDUE_NAME_SHORT), mon... | java | public static Map<String, IAminoAcid> getHashMapBySingleCharCode() {
IAminoAcid[] monomers = createAAs();
HashMap<String, IAminoAcid> map = new HashMap<String, IAminoAcid>();
for (int i = 0; i < monomers.length; i++) {
map.put((String) monomers[i].getProperty(RESIDUE_NAME_SHORT), mon... | [
"public",
"static",
"Map",
"<",
"String",
",",
"IAminoAcid",
">",
"getHashMapBySingleCharCode",
"(",
")",
"{",
"IAminoAcid",
"[",
"]",
"monomers",
"=",
"createAAs",
"(",
")",
";",
"HashMap",
"<",
"String",
",",
"IAminoAcid",
">",
"map",
"=",
"new",
"HashMa... | Returns a HashMap where the key is one of G, A, V, L, I, S, T, C, M, D,
N, E, Q, R, K, H, F, Y, W and P. | [
"Returns",
"a",
"HashMap",
"where",
"the",
"key",
"is",
"one",
"of",
"G",
"A",
"V",
"L",
"I",
"S",
"T",
"C",
"M",
"D",
"N",
"E",
"Q",
"R",
"K",
"H",
"F",
"Y",
"W",
"and",
"P",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/pdb/src/main/java/org/openscience/cdk/templates/AminoAcids.java#L192-L199 | train | Get HashMap by single char code. | Of course, here is the Java code you requested:
```java
public static Map<String, IAminoAcid> getHashMapBySingleCharCode() {
IAminoAcid[] monomers = createAAs();
HashMap<String, IAminoAcid> map = new HashMap<String, IAminoAcid>();
for (int i = 0; i < monomers.length; i++) {
map.put(... |
Stratio/stratio-cassandra | src/java/org/apache/cassandra/cql3/ErrorCollector.java | ErrorCollector.appendQuerySnippet | private void appendQuerySnippet(Parser parser, StringBuilder builder)
{
TokenStream tokenStream = parser.getTokenStream();
int index = tokenStream.index();
int size = tokenStream.size();
Token from = tokenStream.get(getSnippetFirstTokenIndex(index));
Token to = tokenStream.g... | java | private void appendQuerySnippet(Parser parser, StringBuilder builder)
{
TokenStream tokenStream = parser.getTokenStream();
int index = tokenStream.index();
int size = tokenStream.size();
Token from = tokenStream.get(getSnippetFirstTokenIndex(index));
Token to = tokenStream.g... | [
"private",
"void",
"appendQuerySnippet",
"(",
"Parser",
"parser",
",",
"StringBuilder",
"builder",
")",
"{",
"TokenStream",
"tokenStream",
"=",
"parser",
".",
"getTokenStream",
"(",
")",
";",
"int",
"index",
"=",
"tokenStream",
".",
"index",
"(",
")",
";",
"... | Appends a query snippet to the message to help the user to understand the problem.
@param parser the parser used to parse the query
@param builder the <code>StringBuilder</code> used to build the error message | [
"Appends",
"a",
"query",
"snippet",
"to",
"the",
"message",
"to",
"help",
"the",
"user",
"to",
"understand",
"the",
"problem",
"."
] | f6416b43ad5309083349ad56266450fa8c6a2106 | https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/cql3/ErrorCollector.java#L110-L121 | train | Append the query snippet to the builder. | Of course, here is the Java code you requested:
```java
private void appendQuerySnippet(Parser parser, StringBuilder builder)
{
TokenStream tokenStream = parser.getTokenStream();
int index = tokenStream.index();
int size = tokenStream.size();
Token from = tokenStream.get(getSnippet... |
znerd/xmlenc | src/main/java/org/znerd/xmlenc/XMLChecker.java | XMLChecker.checkName | public static final void checkName(char[] ch, int start, int length) throws NullPointerException, IndexOutOfBoundsException, InvalidXMLException {
// Minimum length is 1
if (length < 1) {
throw new InvalidXMLException("An empty string does not match the 'Name' production.");
}
... | java | public static final void checkName(char[] ch, int start, int length) throws NullPointerException, IndexOutOfBoundsException, InvalidXMLException {
// Minimum length is 1
if (length < 1) {
throw new InvalidXMLException("An empty string does not match the 'Name' production.");
}
... | [
"public",
"static",
"final",
"void",
"checkName",
"(",
"char",
"[",
"]",
"ch",
",",
"int",
"start",
",",
"int",
"length",
")",
"throws",
"NullPointerException",
",",
"IndexOutOfBoundsException",
",",
"InvalidXMLException",
"{",
"// Minimum length is 1",
"if",
"(",... | Checks if the specified part of a character array matches the <em>Name</em> production. See:
<a href="http://www.w3.org/TR/REC-xml#NT-Name">Definition of Name</a>.
@param ch the character array that contains the characters to be checked, cannot be
<code>null</code>.
@param start the start index into <code>ch</cod... | [
"Checks",
"if",
"the",
"specified",
"part",
"of",
"a",
"character",
"array",
"matches",
"the",
"<em",
">",
"Name<",
"/",
"em",
">",
"production",
".",
"See",
":",
"<a",
"href",
"=",
"http",
":",
"//",
"www",
".",
"w3",
".",
"org",
"/",
"TR",
"/",
... | 6ff483777d9467db9990b7c7ae0158f21a243c31 | https://github.com/znerd/xmlenc/blob/6ff483777d9467db9990b7c7ae0158f21a243c31/src/main/java/org/znerd/xmlenc/XMLChecker.java#L97-L119 | train | Check if the array of characters is a valid XML Name. | Of course, here is the Java code you requested:
```java
public static final void checkName(char[] ch, int start, int length) throws NullPointerException, IndexOutOfBoundsException, InvalidXMLException {
// Minimum length is 1
if (length < 1) {
throw new InvalidXMLException("An empty string... |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/img/ImageExtensions.java | ImageExtensions.getResized | public static BufferedImage getResized(final BufferedImage originalImage,
final String formatName, final int targetWidth, final int targetHeight) throws IOException
{
return read(resize(originalImage, formatName, targetWidth, targetHeight));
} | java | public static BufferedImage getResized(final BufferedImage originalImage,
final String formatName, final int targetWidth, final int targetHeight) throws IOException
{
return read(resize(originalImage, formatName, targetWidth, targetHeight));
} | [
"public",
"static",
"BufferedImage",
"getResized",
"(",
"final",
"BufferedImage",
"originalImage",
",",
"final",
"String",
"formatName",
",",
"final",
"int",
"targetWidth",
",",
"final",
"int",
"targetHeight",
")",
"throws",
"IOException",
"{",
"return",
"read",
"... | Resize the given BufferedImage and returns the resized BufferedImage.
@param originalImage
the original image
@param formatName
the format name
@param targetWidth
the target width
@param targetHeight
the target height
@return the resized
@throws IOException
Signals that an I/O exception has occurred. | [
"Resize",
"the",
"given",
"BufferedImage",
"and",
"returns",
"the",
"resized",
"BufferedImage",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/img/ImageExtensions.java#L188-L192 | train | Resizes the image to the specified size. | Of course, here is the Java code you requested:
```java
public static BufferedImage getResized(final BufferedImage originalImage,
final String formatName, final int targetWidth, final int targetHeight) throws IOException
{
return read(resize(originalImage, formatName, targetWidth, targetHeight));
}
```
Hope thi... |
pushtorefresh/storio | storio-sqlite/src/main/java/com/pushtorefresh/storio3/sqlite/Changes.java | Changes.newInstance | @NonNull
public static Changes newInstance(@NonNull String affectedTable, @Nullable String... affectedTags) {
checkNotNull(affectedTable, "Please specify affected table");
return new Changes(singleton(affectedTable), nonNullSet(affectedTags));
} | java | @NonNull
public static Changes newInstance(@NonNull String affectedTable, @Nullable String... affectedTags) {
checkNotNull(affectedTable, "Please specify affected table");
return new Changes(singleton(affectedTable), nonNullSet(affectedTags));
} | [
"@",
"NonNull",
"public",
"static",
"Changes",
"newInstance",
"(",
"@",
"NonNull",
"String",
"affectedTable",
",",
"@",
"Nullable",
"String",
"...",
"affectedTags",
")",
"{",
"checkNotNull",
"(",
"affectedTable",
",",
"\"Please specify affected table\"",
")",
";",
... | Creates {@link Changes} container with info about changes.
@param affectedTable table that was affected.
@param affectedTags nullable set of affected tags.
@return new immutable instance of {@link Changes}. | [
"Creates",
"{",
"@link",
"Changes",
"}",
"container",
"with",
"info",
"about",
"changes",
"."
] | 58f53d81bcc7b069c8bb271c46a90e37775abe8d | https://github.com/pushtorefresh/storio/blob/58f53d81bcc7b069c8bb271c46a90e37775abe8d/storio-sqlite/src/main/java/com/pushtorefresh/storio3/sqlite/Changes.java#L100-L104 | train | Creates a new Changes object with the specified table and tags. | Of course, here is the Java code you requested:
```java
@NonNull
public static Changes newInstance(@NonNull String affectedTable, @Nullable String... affectedTags) {
checkNotNull(affectedTable, "Please specify affected table");
return new Changes(singleton(affectedTable), nonNullSet(affectedTags));... |
future-architect/uroborosql | src/main/java/jp/co/future/uroborosql/client/SqlREPL.java | SqlREPL.loadProps | private Properties loadProps(final Path path) {
Properties props = new Properties();
try {
InputStream is = Files.newInputStream(path);
props.load(new InputStreamReader(is, Charset.forName("UTF-8")));
} catch (IOException ex) {
throw new IllegalArgumentException("Failed to load properties.", ex);
}
r... | java | private Properties loadProps(final Path path) {
Properties props = new Properties();
try {
InputStream is = Files.newInputStream(path);
props.load(new InputStreamReader(is, Charset.forName("UTF-8")));
} catch (IOException ex) {
throw new IllegalArgumentException("Failed to load properties.", ex);
}
r... | [
"private",
"Properties",
"loadProps",
"(",
"final",
"Path",
"path",
")",
"{",
"Properties",
"props",
"=",
"new",
"Properties",
"(",
")",
";",
"try",
"{",
"InputStream",
"is",
"=",
"Files",
".",
"newInputStream",
"(",
"path",
")",
";",
"props",
".",
"load... | プロパティファイルの読み込み
@param path プロパティファイルパス
@return プロパティ | [
"プロパティファイルの読み込み"
] | 4c26db51defdac3c6ed16866e33ab45e190e2e0c | https://github.com/future-architect/uroborosql/blob/4c26db51defdac3c6ed16866e33ab45e190e2e0c/src/main/java/jp/co/future/uroborosql/client/SqlREPL.java#L122-L131 | train | Load properties from a file. | Of course, here is the Java code you requested:
```java
private Properties loadProps(final Path path) {
Properties props = new Properties();
try {
InputStream is = Files.newInputStream(path);
props.load(new InputStreamReader(is, Charset.forName("UTF-8")));
} catch (IOException ex) {
throw new IllegalArg... |
opensourceBIM/BIMserver | PluginBase/generated/org/bimserver/models/ifc4/impl/Ifc4PackageImpl.java | Ifc4PackageImpl.getIfcPreDefinedTextFont | @Override
public EClass getIfcPreDefinedTextFont() {
if (ifcPreDefinedTextFontEClass == null) {
ifcPreDefinedTextFontEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(445);
}
return ifcPreDefinedTextFontEClass;
} | java | @Override
public EClass getIfcPreDefinedTextFont() {
if (ifcPreDefinedTextFontEClass == null) {
ifcPreDefinedTextFontEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(445);
}
return ifcPreDefinedTextFontEClass;
} | [
"@",
"Override",
"public",
"EClass",
"getIfcPreDefinedTextFont",
"(",
")",
"{",
"if",
"(",
"ifcPreDefinedTextFontEClass",
"==",
"null",
")",
"{",
"ifcPreDefinedTextFontEClass",
"=",
"(",
"EClass",
")",
"EPackage",
".",
"Registry",
".",
"INSTANCE",
".",
"getEPackag... | <!-- begin-user-doc -->
<!-- end-user-doc -->
@generated | [
"<!",
"--",
"begin",
"-",
"user",
"-",
"doc",
"--",
">",
"<!",
"--",
"end",
"-",
"user",
"-",
"doc",
"--",
">"
] | 116803c3047d1b32217366757cee1bb3880fda63 | https://github.com/opensourceBIM/BIMserver/blob/116803c3047d1b32217366757cee1bb3880fda63/PluginBase/generated/org/bimserver/models/ifc4/impl/Ifc4PackageImpl.java#L25200-L25207 | train | Get the IfcPreDefinedTextFontEClass attribute of the interface. | Of course, here is the Java code you requested:
```java
@Override
public EClass getIfcPreDefinedTextFont() {
if (ifcPreDefinedTextFontEClass == null) {
ifcPreDefinedTextFontEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(445);
}
return ifcPreDef... |
OpenLiberty/open-liberty | dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/persistence/jpa/StepThreadExecutionEntity.java | StepThreadExecutionEntity.deserializeObject | private Serializable deserializeObject(byte[] buffer) throws IOException, ClassNotFoundException {
Serializable theObject = null;
DeserializationObjectInputStream objectIn = null;
if (buffer != null) {
objectIn = new DeserializationObjectInputStream(new ByteArrayInputStream(buffer)... | java | private Serializable deserializeObject(byte[] buffer) throws IOException, ClassNotFoundException {
Serializable theObject = null;
DeserializationObjectInputStream objectIn = null;
if (buffer != null) {
objectIn = new DeserializationObjectInputStream(new ByteArrayInputStream(buffer)... | [
"private",
"Serializable",
"deserializeObject",
"(",
"byte",
"[",
"]",
"buffer",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
"{",
"Serializable",
"theObject",
"=",
"null",
";",
"DeserializationObjectInputStream",
"objectIn",
"=",
"null",
";",
"if",
... | This method is used to de-serialized a table BLOB field to its original object form.
@param buffer the byte array save a BLOB
@return the object saved as byte array
@throws IOException
@throws ClassNotFoundException | [
"This",
"method",
"is",
"used",
"to",
"de",
"-",
"serialized",
"a",
"table",
"BLOB",
"field",
"to",
"its",
"original",
"object",
"form",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/persistence/jpa/StepThreadExecutionEntity.java#L394-L405 | train | Deserialize a single object from a byte array. | Of course, here is the Java code you requested:
```java
private Serializable deserializeObject(byte[] buffer) throws IOException, ClassNotFoundException {
Serializable theObject = null;
DeserializationObjectInputStream objectIn = null;
if (buffer != null) {
objectIn = new Deserial... |
Unidata/thredds | cdm/src/main/java/ucar/nc2/geotiff/GeoTiffWriter2.java | GeoTiffWriter2.getSwathLatLonInformation | private double[] getSwathLatLonInformation(Array lat, Array lon) {
// Calculate the increment of latitude and longitude of original swath data
// Calculate the size of the boundingBox
// element0: Longitude increment
// element1: Latitude increment
// element2: minLat
// element3: maxLat
// ... | java | private double[] getSwathLatLonInformation(Array lat, Array lon) {
// Calculate the increment of latitude and longitude of original swath data
// Calculate the size of the boundingBox
// element0: Longitude increment
// element1: Latitude increment
// element2: minLat
// element3: maxLat
// ... | [
"private",
"double",
"[",
"]",
"getSwathLatLonInformation",
"(",
"Array",
"lat",
",",
"Array",
"lon",
")",
"{",
"// Calculate the increment of latitude and longitude of original swath data",
"// Calculate the size of the boundingBox",
"// element0: Longitude increment",
"// element1:... | get lat lon information from the swath
@param lat 2D lat array
@param lon 2D lon array
@return double array for geotiff | [
"get",
"lat",
"lon",
"information",
"from",
"the",
"swath"
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/geotiff/GeoTiffWriter2.java#L606-L689 | test | This method returns the swath lat and lon information. | Of course, here is the Java code you requested:
```java
private double[] getSwathLatLonInformation(Array lat, Array lon) {
// Calculate the increment of latitude and longitude of original swath data
// Calculate the size of the boundingBox
// element0: Longitude increment
// element1: Latitude incremen... |
structr/structr | structr-core/src/main/java/org/structr/core/graph/search/SearchCommand.java | SearchCommand.assertPropertyIsIndexed | private void assertPropertyIsIndexed(final PropertyKey key) {
if (key != null && !key.isIndexed() && key instanceof AbstractPrimitiveProperty) {
final Class declaringClass = key.getDeclaringClass();
String className = "";
if (declaringClass != null) {
className = declaringClass.getSimpleNam... | java | private void assertPropertyIsIndexed(final PropertyKey key) {
if (key != null && !key.isIndexed() && key instanceof AbstractPrimitiveProperty) {
final Class declaringClass = key.getDeclaringClass();
String className = "";
if (declaringClass != null) {
className = declaringClass.getSimpleNam... | [
"private",
"void",
"assertPropertyIsIndexed",
"(",
"final",
"PropertyKey",
"key",
")",
"{",
"if",
"(",
"key",
"!=",
"null",
"&&",
"!",
"key",
".",
"isIndexed",
"(",
")",
"&&",
"key",
"instanceof",
"AbstractPrimitiveProperty",
")",
"{",
"final",
"Class",
"dec... | ----- private methods ---- | [
"-----",
"private",
"methods",
"----"
] | c111a1d0c0201c7fea5574ed69aa5a5053185a97 | https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-core/src/main/java/org/structr/core/graph/search/SearchCommand.java#L846-L860 | train | Assert that the property is indexed. | Of course, here is the Java code you requested:
```java
private void assertPropertyIsIndexed(final PropertyKey key) {
if (key != null && !key.isIndexed() && key instanceof AbstractPrimitiveProperty) {
final Class declaringClass = key.getDeclaringClass();
String className = "";
if (declaringClas... |
mbizhani/Adroit | src/main/java/org/devocative/adroit/sql/plugin/PaginationPlugin.java | PaginationPlugin.of | public static PaginationPlugin of(Connection connection, Long firstResult, Long maxResults) {
return DatabaseType.find(connection).createPagination(firstResult, maxResults);
} | java | public static PaginationPlugin of(Connection connection, Long firstResult, Long maxResults) {
return DatabaseType.find(connection).createPagination(firstResult, maxResults);
} | [
"public",
"static",
"PaginationPlugin",
"of",
"(",
"Connection",
"connection",
",",
"Long",
"firstResult",
",",
"Long",
"maxResults",
")",
"{",
"return",
"DatabaseType",
".",
"find",
"(",
"connection",
")",
".",
"createPagination",
"(",
"firstResult",
",",
"maxR... | ------------------------------ | [
"------------------------------"
] | 0d76dbd549dde23c009192919e6c256acffb1e41 | https://github.com/mbizhani/Adroit/blob/0d76dbd549dde23c009192919e6c256acffb1e41/src/main/java/org/devocative/adroit/sql/plugin/PaginationPlugin.java#L20-L22 | train | Creates a PaginationPlugin for the given connection. | Of course, here is the Java code you requested:
```java
public static PaginationPlugin of(Connection connection, Long firstResult, Long maxResults) {
return DatabaseType.find(connection).createPagination(firstResult, maxResults);
}
```
Hope this helps! |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/io/watch/watchers/DelayWatcher.java | DelayWatcher.onDelayModify | private void onDelayModify(WatchEvent<?> event, Path currentPath) {
Path eventPath = Paths.get(currentPath.toString(), event.context().toString());
if(eventSet.contains(eventPath)) {
//此事件已经被触发过,后续事件忽略,等待统一处理。
return;
}
//事件第一次触发,此时标记事件,并启动处理线程延迟处理,处理结束后会删除标记
eventSet.add(eventPath);
start... | java | private void onDelayModify(WatchEvent<?> event, Path currentPath) {
Path eventPath = Paths.get(currentPath.toString(), event.context().toString());
if(eventSet.contains(eventPath)) {
//此事件已经被触发过,后续事件忽略,等待统一处理。
return;
}
//事件第一次触发,此时标记事件,并启动处理线程延迟处理,处理结束后会删除标记
eventSet.add(eventPath);
start... | [
"private",
"void",
"onDelayModify",
"(",
"WatchEvent",
"<",
"?",
">",
"event",
",",
"Path",
"currentPath",
")",
"{",
"Path",
"eventPath",
"=",
"Paths",
".",
"get",
"(",
"currentPath",
".",
"toString",
"(",
")",
",",
"event",
".",
"context",
"(",
")",
"... | 触发延迟修改
@param event 事件
@param currentPath 事件发生的当前Path路径 | [
"触发延迟修改"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/watch/watchers/DelayWatcher.java#L79-L89 | train | Handle delay modify event. | Of course, here is the Java code you requested:
```java
private void onDelayModify(WatchEvent<?> event, Path currentPath) {
Path eventPath = Paths.get(currentPath.toString(), event.context().toString());
if(eventSet.contains(eventPath)) {
//此事件已经被触发过,后续事件忽略,等待统一处理。
return;
}
//事件第一次触发,此时标记事件,并启... |
aws/aws-sdk-java | aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/CopyCallable.java | CopyCallable.copyInParts | private void copyInParts() throws Exception {
multipartUploadId = initiateMultipartUpload(copyObjectRequest);
long optimalPartSize = getOptimalPartSize(metadata.getContentLength());
try {
CopyPartRequestFactory requestFactory = new CopyPartRequestFactory(
copyOb... | java | private void copyInParts() throws Exception {
multipartUploadId = initiateMultipartUpload(copyObjectRequest);
long optimalPartSize = getOptimalPartSize(metadata.getContentLength());
try {
CopyPartRequestFactory requestFactory = new CopyPartRequestFactory(
copyOb... | [
"private",
"void",
"copyInParts",
"(",
")",
"throws",
"Exception",
"{",
"multipartUploadId",
"=",
"initiateMultipartUpload",
"(",
"copyObjectRequest",
")",
";",
"long",
"optimalPartSize",
"=",
"getOptimalPartSize",
"(",
"metadata",
".",
"getContentLength",
"(",
")",
... | Performs the copy of an Amazon S3 object from source bucket to
destination bucket as multiple copy part requests. The information about
the part to be copied is specified in the request as a byte range
(first-last)
@throws Exception
Any Exception that occurs while carrying out the request. | [
"Performs",
"the",
"copy",
"of",
"an",
"Amazon",
"S3",
"object",
"from",
"source",
"bucket",
"to",
"destination",
"bucket",
"as",
"multiple",
"copy",
"part",
"requests",
".",
"The",
"information",
"about",
"the",
"part",
"to",
"be",
"copied",
"is",
"specifie... | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/CopyCallable.java#L167-L182 | train | Copy in parts. | Of course, here is the Java code you requested:
```java
private void copyInParts() throws Exception {
multipartUploadId = initiateMultipartUpload(copyObjectRequest);
long optimalPartSize = getOptimalPartSize(metadata.getContentLength());
try {
CopyPartRequestFactory requestFactory... |
JodaOrg/joda-time | src/main/java/org/joda/time/format/ISODateTimeFormat.java | ISODateTimeFormat.dateByWeek | private static boolean dateByWeek(
DateTimeFormatterBuilder bld,
Collection<DateTimeFieldType> fields,
boolean extended,
boolean strictISO) {
boolean reducedPrec = false;
if (fields.remove(DateTimeFieldType.weekyear())) {
bld.append(Constants.we);
... | java | private static boolean dateByWeek(
DateTimeFormatterBuilder bld,
Collection<DateTimeFieldType> fields,
boolean extended,
boolean strictISO) {
boolean reducedPrec = false;
if (fields.remove(DateTimeFieldType.weekyear())) {
bld.append(Constants.we);
... | [
"private",
"static",
"boolean",
"dateByWeek",
"(",
"DateTimeFormatterBuilder",
"bld",
",",
"Collection",
"<",
"DateTimeFieldType",
">",
"fields",
",",
"boolean",
"extended",
",",
"boolean",
"strictISO",
")",
"{",
"boolean",
"reducedPrec",
"=",
"false",
";",
"if",
... | Creates a date using the calendar date format.
Specification reference: 5.2.3.
@param bld the builder
@param fields the fields
@param extended true to use extended format
@param strictISO true to only allow ISO formats
@since 1.1 | [
"Creates",
"a",
"date",
"using",
"the",
"calendar",
"date",
"format",
".",
"Specification",
"reference",
":",
"5",
".",
"2",
".",
"3",
"."
] | bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42 | https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/ISODateTimeFormat.java#L318-L373 | train | dateByWeek Method. | Of course, here is the Java code you requested:
```java
private static boolean dateByWeek(
DateTimeFormatterBuilder bld,
Collection<DateTimeFieldType> fields,
boolean extended,
boolean strictISO) {
boolean reducedPrec = false;
if (fields.remove(DateTimeFieldType... |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.jaspic/src/com/ibm/ws/security/jaspi/client/ObjectFactory.java | ObjectFactory.createMsgLayer | @XmlElementDecl(namespace = "", name = "msgLayer")
public JAXBElement<String> createMsgLayer(String value) {
return new JAXBElement<String>(_MsgLayer_QNAME, String.class, null, value);
} | java | @XmlElementDecl(namespace = "", name = "msgLayer")
public JAXBElement<String> createMsgLayer(String value) {
return new JAXBElement<String>(_MsgLayer_QNAME, String.class, null, value);
} | [
"@",
"XmlElementDecl",
"(",
"namespace",
"=",
"\"\"",
",",
"name",
"=",
"\"msgLayer\"",
")",
"public",
"JAXBElement",
"<",
"String",
">",
"createMsgLayer",
"(",
"String",
"value",
")",
"{",
"return",
"new",
"JAXBElement",
"<",
"String",
">",
"(",
"_MsgLayer_... | Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} | [
"Create",
"an",
"instance",
"of",
"{",
"@link",
"JAXBElement",
"}",
"{",
"@code",
"<",
"}",
"{",
"@link",
"String",
"}",
"{",
"@code",
">",
"}"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jaspic/src/com/ibm/ws/security/jaspi/client/ObjectFactory.java#L80-L83 | train | Create an instance of the msgLayer JAXBElement. | Of course, here is the Java code you requested:
```java
@XmlElementDecl(namespace = "", name = "msgLayer")
public JAXBElement<String> createMsgLayer(String value) {
return new JAXBElement<String>(_MsgLayer_QNAME, String.class, null, value);
}
```
Hope this helps! |
haraldk/TwelveMonkeys | imageio/imageio-pict/src/main/java/com/twelvemonkeys/imageio/plugins/pict/PICTUtil.java | PICTUtil.readPattern | public static Pattern readPattern(final DataInput pStream) throws IOException {
// Get the data (8 bytes)
byte[] data = new byte[8];
pStream.readFully(data);
return new BitMapPattern(data);
} | java | public static Pattern readPattern(final DataInput pStream) throws IOException {
// Get the data (8 bytes)
byte[] data = new byte[8];
pStream.readFully(data);
return new BitMapPattern(data);
} | [
"public",
"static",
"Pattern",
"readPattern",
"(",
"final",
"DataInput",
"pStream",
")",
"throws",
"IOException",
"{",
"// Get the data (8 bytes)",
"byte",
"[",
"]",
"data",
"=",
"new",
"byte",
"[",
"8",
"]",
";",
"pStream",
".",
"readFully",
"(",
"data",
")... | Reads a {@link Pattern pattern} from the given stream.
@param pStream the input stream
@return the pattern read
@throws java.io.IOException if an I/O error occurs during read | [
"Reads",
"a",
"{",
"@link",
"Pattern",
"pattern",
"}",
"from",
"the",
"given",
"stream",
"."
] | 7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d | https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/imageio/imageio-pict/src/main/java/com/twelvemonkeys/imageio/plugins/pict/PICTUtil.java#L144-L149 | train | Read a pattern from the given input stream. | Of course, here is the Java code you requested:
```java
public static Pattern readPattern(final DataInput pStream) throws IOException {
// Get the data (8 bytes)
byte[] data = new byte[8];
pStream.readFully(data);
return new BitMapPattern(data);
}
```
Hope this helps! |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/EnumSet.java | EnumSet.of | public static <E extends Enum<E>> EnumSet<E> of(E e) {
EnumSet<E> result = noneOf(e.getDeclaringClass());
result.add(e);
return result;
} | java | public static <E extends Enum<E>> EnumSet<E> of(E e) {
EnumSet<E> result = noneOf(e.getDeclaringClass());
result.add(e);
return result;
} | [
"public",
"static",
"<",
"E",
"extends",
"Enum",
"<",
"E",
">",
">",
"EnumSet",
"<",
"E",
">",
"of",
"(",
"E",
"e",
")",
"{",
"EnumSet",
"<",
"E",
">",
"result",
"=",
"noneOf",
"(",
"e",
".",
"getDeclaringClass",
"(",
")",
")",
";",
"result",
"... | Creates an enum set initially containing the specified element.
Overloadings of this method exist to initialize an enum set with
one through five elements. A sixth overloading is provided that
uses the varargs feature. This overloading may be used to create
an enum set initially containing an arbitrary number of ele... | [
"Creates",
"an",
"enum",
"set",
"initially",
"containing",
"the",
"specified",
"element",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/EnumSet.java#L218-L222 | train | Create an EnumSet of the specified type. | Of course, here is the Java code you requested:
```java
public static <E extends Enum<E>> EnumSet<E> of(E e) {
EnumSet<E> result = noneOf(e.getDeclaringClass());
result.add(e);
return result;
}
```
Hope this helps! |
algolia/instantsearch-android | ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java | InstantSearch.enableProgressBar | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public void enableProgressBar() {
showProgressBar = true;
if (searchBoxViewModel != null) {
progressController = new SearchProgressController(new SearchProgressController.ProgressListener() {
@Override
... | java | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public void enableProgressBar() {
showProgressBar = true;
if (searchBoxViewModel != null) {
progressController = new SearchProgressController(new SearchProgressController.ProgressListener() {
@Override
... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"WeakerAccess\"",
",",
"\"unused\"",
"}",
")",
"// For library users",
"public",
"void",
"enableProgressBar",
"(",
")",
"{",
"showProgressBar",
"=",
"true",
";",
"if",
"(",
"searchBoxViewModel",
"!=",
"null",
")",
"{",
"progr... | Enables the display of a spinning {@link android.widget.ProgressBar ProgressBar} in the SearchView when waiting for results. | [
"Enables",
"the",
"display",
"of",
"a",
"spinning",
"{"
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java#L275-L292 | train | Enables the progress bar. | Of course, here is the Java code you requested:
```java
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public void enableProgressBar() {
showProgressBar = true;
if (searchBoxViewModel != null) {
progressController = new SearchProgressController(new SearchProgressCon... |
sebastiangraf/treetank | interfacemodules/filelistener/src/main/java/org/treetank/access/FilelistenerReadTrx.java | FilelistenerReadTrx.fileExists | @Override
public boolean fileExists(String pRelativePath) {
String paths[] = this.getFilePaths();
for (String s : paths) {
if (s.equals(pRelativePath)) {
return true;
}
}
return false;
} | java | @Override
public boolean fileExists(String pRelativePath) {
String paths[] = this.getFilePaths();
for (String s : paths) {
if (s.equals(pRelativePath)) {
return true;
}
}
return false;
} | [
"@",
"Override",
"public",
"boolean",
"fileExists",
"(",
"String",
"pRelativePath",
")",
"{",
"String",
"paths",
"[",
"]",
"=",
"this",
".",
"getFilePaths",
"(",
")",
";",
"for",
"(",
"String",
"s",
":",
"paths",
")",
"{",
"if",
"(",
"s",
".",
"equal... | {@inheritDoc} | [
"{"
] | 9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60 | https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/filelistener/src/main/java/org/treetank/access/FilelistenerReadTrx.java#L71-L81 | train | Check if the file exists in the base directory. | Of course, here is the Java code you requested:
```java
@Override
public boolean fileExists(String pRelativePath) {
String paths[] = this.getFilePaths();
for (String s : paths) {
if (s.equals(pRelativePath)) {
return true;
}
}
return false;
... |
hawkular/hawkular-agent | hawkular-agent-core/src/main/java/org/hawkular/agent/monitor/inventory/ResourceManager.java | ResourceManager.getResourcesBreadthFirst | public List<Resource<L>> getResourcesBreadthFirst() {
graphLockRead.lock();
try {
List<Resource<L>> result = new ArrayList<Resource<L>>();
Set<Resource<L>> roots = getRootResources();
if (roots.isEmpty()) {
return Collections.emptyList();
... | java | public List<Resource<L>> getResourcesBreadthFirst() {
graphLockRead.lock();
try {
List<Resource<L>> result = new ArrayList<Resource<L>>();
Set<Resource<L>> roots = getRootResources();
if (roots.isEmpty()) {
return Collections.emptyList();
... | [
"public",
"List",
"<",
"Resource",
"<",
"L",
">",
">",
"getResourcesBreadthFirst",
"(",
")",
"{",
"graphLockRead",
".",
"lock",
"(",
")",
";",
"try",
"{",
"List",
"<",
"Resource",
"<",
"L",
">>",
"result",
"=",
"new",
"ArrayList",
"<",
"Resource",
"<",... | Returns an immutable {@link List} of all {@link Resource}s contained in {@link #resourcesGraph} in breadth-first
order.
@return the list of all {@link Resource}s | [
"Returns",
"an",
"immutable",
"{",
"@link",
"List",
"}",
"of",
"all",
"{",
"@link",
"Resource",
"}",
"s",
"contained",
"in",
"{",
"@link",
"#resourcesGraph",
"}",
"in",
"breadth",
"-",
"first",
"order",
"."
] | a7a88fc7e4f12302e4c4306d1c91e11f81c8b811 | https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-agent-core/src/main/java/org/hawkular/agent/monitor/inventory/ResourceManager.java#L391-L416 | train | Get the resources breadth - first. | Of course, here is the Java code you requested:
```java
public List<Resource<L>> getResourcesBreadthFirst() {
graphLockRead.lock();
try {
List<Resource<L>> result = new ArrayList<Resource<L>>();
Set<Resource<L>> roots = getRootResources();
if (roots.isEmpty()) {
... |
GoogleCloudPlatform/bigdata-interop | util/src/main/java/com/google/cloud/hadoop/util/ApiErrorExtractor.java | ApiErrorExtractor.userProjectMissing | public boolean userProjectMissing(IOException e) {
GoogleJsonResponseException jsonException = getJsonResponseExceptionOrNull(e);
return jsonException != null && userProjectMissing(jsonException.getDetails());
} | java | public boolean userProjectMissing(IOException e) {
GoogleJsonResponseException jsonException = getJsonResponseExceptionOrNull(e);
return jsonException != null && userProjectMissing(jsonException.getDetails());
} | [
"public",
"boolean",
"userProjectMissing",
"(",
"IOException",
"e",
")",
"{",
"GoogleJsonResponseException",
"jsonException",
"=",
"getJsonResponseExceptionOrNull",
"(",
"e",
")",
";",
"return",
"jsonException",
"!=",
"null",
"&&",
"userProjectMissing",
"(",
"jsonExcept... | Determines if the given exception indicates that 'userProject' is missing in request.
Recursively checks getCause() if outer exception isn't an instance of the correct class. | [
"Determines",
"if",
"the",
"given",
"exception",
"indicates",
"that",
"userProject",
"is",
"missing",
"in",
"request",
".",
"Recursively",
"checks",
"getCause",
"()",
"if",
"outer",
"exception",
"isn",
"t",
"an",
"instance",
"of",
"the",
"correct",
"class",
".... | 918d91c80a63e36046edb28972a5c65d3326a858 | https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/util/src/main/java/com/google/cloud/hadoop/util/ApiErrorExtractor.java#L302-L305 | train | Checks if the user project is missing. | Of course, here is the Java code you requested:
```java
public boolean userProjectMissing(IOException e) {
GoogleJsonResponseException jsonException = getJsonResponseExceptionOrNull(e);
return jsonException != null && userProjectMissing(jsonException.getDetails());
}
```
Hope this helps! |
codegist/crest | core/src/main/java/org/codegist/crest/CRestBuilder.java | CRestBuilder.basicAuth | public CRestBuilder basicAuth(String username, String password) {
this.auth = "basic";
this.username = username;
this.password = password;
return this;
} | java | public CRestBuilder basicAuth(String username, String password) {
this.auth = "basic";
this.username = username;
this.password = password;
return this;
} | [
"public",
"CRestBuilder",
"basicAuth",
"(",
"String",
"username",
",",
"String",
"password",
")",
"{",
"this",
".",
"auth",
"=",
"\"basic\"",
";",
"this",
".",
"username",
"=",
"username",
";",
"this",
".",
"password",
"=",
"password",
";",
"return",
"this... | <p>Configures the resulting <b>CRest</b> instance to authenticate all requests using Basic Auth</p>
@param username user name to authenticate the requests with
@param password password to authenticate the requests with
@return current builder | [
"<p",
">",
"Configures",
"the",
"resulting",
"<b",
">",
"CRest<",
"/",
"b",
">",
"instance",
"to",
"authenticate",
"all",
"requests",
"using",
"Basic",
"Auth<",
"/",
"p",
">"
] | e99ba7728b27d2ddb2c247261350f1b6fa7a6698 | https://github.com/codegist/crest/blob/e99ba7728b27d2ddb2c247261350f1b6fa7a6698/core/src/main/java/org/codegist/crest/CRestBuilder.java#L662-L667 | train | Sets the basic authentication method. | Of course, here is the Java code you requested:
```java
public CRestBuilder basicAuth(String username, String password) {
this.auth = "basic";
this.username = username;
this.password = password;
return this;
}
```
Hope this helps! |
square/dagger | core/src/main/java/dagger/internal/Loader.java | Loader.instantiate | protected <T> T instantiate(String name, ClassLoader classLoader) {
try {
Class<?> generatedClass = loadClass(classLoader, name);
if (generatedClass == Void.class) {
return null;
}
@SuppressWarnings("unchecked")
T instance = (T) generatedClass.newInstance();
return instan... | java | protected <T> T instantiate(String name, ClassLoader classLoader) {
try {
Class<?> generatedClass = loadClass(classLoader, name);
if (generatedClass == Void.class) {
return null;
}
@SuppressWarnings("unchecked")
T instance = (T) generatedClass.newInstance();
return instan... | [
"protected",
"<",
"T",
">",
"T",
"instantiate",
"(",
"String",
"name",
",",
"ClassLoader",
"classLoader",
")",
"{",
"try",
"{",
"Class",
"<",
"?",
">",
"generatedClass",
"=",
"loadClass",
"(",
"classLoader",
",",
"name",
")",
";",
"if",
"(",
"generatedCl... | Instantiates a class using its default constructor and the given {@link ClassLoader}. This
method does not attempt to {@linkplain AccessibleObject#setAccessible set accessibility}. | [
"Instantiates",
"a",
"class",
"using",
"its",
"default",
"constructor",
"and",
"the",
"given",
"{"
] | 572cdd2fe97fc3c148fb3d8e1b2ce7beb4dcbcde | https://github.com/square/dagger/blob/572cdd2fe97fc3c148fb3d8e1b2ce7beb4dcbcde/core/src/main/java/dagger/internal/Loader.java#L77-L91 | train | Instantiates a single generated class. | Of course, here is the Java code you requested:
```java
protected <T> T instantiate(String name, ClassLoader classLoader) {
try {
Class<?> generatedClass = loadClass(classLoader, name);
if (generatedClass == Void.class) {
return null;
}
@SuppressWarnings("unchecked")
T instanc... |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/wizard/AbstractWizardPanel.java | AbstractWizardPanel.onInitializeLayout | @Override
protected void onInitializeLayout()
{
super.onInitializeLayout();
setLayout(new BorderLayout());
add(wizardContentPanel, BorderLayout.CENTER);
add(navigationPanel, BorderLayout.SOUTH);
} | java | @Override
protected void onInitializeLayout()
{
super.onInitializeLayout();
setLayout(new BorderLayout());
add(wizardContentPanel, BorderLayout.CENTER);
add(navigationPanel, BorderLayout.SOUTH);
} | [
"@",
"Override",
"protected",
"void",
"onInitializeLayout",
"(",
")",
"{",
"super",
".",
"onInitializeLayout",
"(",
")",
";",
"setLayout",
"(",
"new",
"BorderLayout",
"(",
")",
")",
";",
"add",
"(",
"wizardContentPanel",
",",
"BorderLayout",
".",
"CENTER",
"... | {@inheritDoc} | [
"{"
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/wizard/AbstractWizardPanel.java#L176-L183 | train | Initialize the layout of the wizard content panel and navigation panel. | Of course, here is the Java code you requested:
```java
@Override
protected void onInitializeLayout()
{
super.onInitializeLayout();
setLayout(new BorderLayout());
add(wizardContentPanel, BorderLayout.CENTER);
add(navigationPanel, BorderLayout.SOUTH);
}
```
Hope this helps! |
SpoonLabs/spoon-maven-plugin | src/main/java/fr/inria/gforge/spoon/configuration/XMLSpoonConfiguration.java | XMLSpoonConfiguration.loadTemplateFile | private String loadTemplateFile(String templateName) {
String name = templateName.replace('.', '/') + ".java";
InputStream in = SpoonMojoGenerate.class.getClassLoader().getResourceAsStream(name);
String packageName = templateName.substring(0, templateName.lastIndexOf('.'));
String fileName = templateName.substr... | java | private String loadTemplateFile(String templateName) {
String name = templateName.replace('.', '/') + ".java";
InputStream in = SpoonMojoGenerate.class.getClassLoader().getResourceAsStream(name);
String packageName = templateName.substring(0, templateName.lastIndexOf('.'));
String fileName = templateName.substr... | [
"private",
"String",
"loadTemplateFile",
"(",
"String",
"templateName",
")",
"{",
"String",
"name",
"=",
"templateName",
".",
"replace",
"(",
"'",
"'",
",",
"'",
"'",
")",
"+",
"\".java\"",
";",
"InputStream",
"in",
"=",
"SpoonMojoGenerate",
".",
"class",
... | Loads the template file at the path given. | [
"Loads",
"the",
"template",
"file",
"at",
"the",
"path",
"given",
"."
] | d38172c33792ec04ac29b0742840f746a9758b8d | https://github.com/SpoonLabs/spoon-maven-plugin/blob/d38172c33792ec04ac29b0742840f746a9758b8d/src/main/java/fr/inria/gforge/spoon/configuration/XMLSpoonConfiguration.java#L74-L86 | train | Load template file. | Of course, here is the Java code you requested:
```java
private String loadTemplateFile(String templateName) {
String name = templateName.replace('.', '/') + ".java";
InputStream in = SpoonMojoGenerate.class.getClassLoader().getResourceAsStream(name);
String packageName = templateName.substring(0, templateName.l... |
spring-projects/spring-android | spring-android-core/src/main/java/org/springframework/util/CollectionUtils.java | CollectionUtils.toMultiValueMap | public static <K, V> MultiValueMap<K, V> toMultiValueMap(Map<K, List<V>> map) {
return new MultiValueMapAdapter<K, V>(map);
} | java | public static <K, V> MultiValueMap<K, V> toMultiValueMap(Map<K, List<V>> map) {
return new MultiValueMapAdapter<K, V>(map);
} | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"MultiValueMap",
"<",
"K",
",",
"V",
">",
"toMultiValueMap",
"(",
"Map",
"<",
"K",
",",
"List",
"<",
"V",
">",
">",
"map",
")",
"{",
"return",
"new",
"MultiValueMapAdapter",
"<",
"K",
",",
"V",
">",
"(... | Adapts a {@code Map<K, List<V>>} to an {@code MultiValueMap<K,V>}.
@param map the map
@return the multi-value map | [
"Adapts",
"a",
"{",
"@code",
"Map<K",
"List<V",
">>",
"}",
"to",
"an",
"{",
"@code",
"MultiValueMap<K",
"V",
">",
"}",
"."
] | 941296e152d49a40e0745a3e81628a974f72b7e4 | https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-core/src/main/java/org/springframework/util/CollectionUtils.java#L338-L341 | train | Convert a Map to a MultiValue | Of course, here is the Java code you requested:
```java
public static <K, V> MultiValueMap<K, V> toMultiValueMap(Map<K, List<V>> map) {
return new MultiValueMapAdapter<K, V>(map);
}
```
Hope this helps! |
Azure/azure-sdk-for-java | network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkWatchersInner.java | NetworkWatchersInner.checkConnectivityWithServiceResponseAsync | public Observable<ServiceResponse<ConnectivityInformationInner>> checkConnectivityWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is req... | java | public Observable<ServiceResponse<ConnectivityInformationInner>> checkConnectivityWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is req... | [
"public",
"Observable",
"<",
"ServiceResponse",
"<",
"ConnectivityInformationInner",
">",
">",
"checkConnectivityWithServiceResponseAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"networkWatcherName",
",",
"ConnectivityParameters",
"parameters",
")",
"{",
"if",
... | Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server.
@param resourceGroupName The name of the network watcher resource group.
@param networkWatcherName The name of the network watcher resource.
@param parameters ... | [
"Verifies",
"the",
"possibility",
"of",
"establishing",
"a",
"direct",
"TCP",
"connection",
"from",
"a",
"virtual",
"machine",
"to",
"a",
"given",
"endpoint",
"including",
"another",
"VM",
"or",
"an",
"arbitrary",
"remote",
"server",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkWatchersInner.java#L2198-L2215 | train | Check connectivity of a specified Azure Cosmos DB database. | Of course, here is the Java code you requested:
```java
public Observable<ServiceResponse<ConnectivityInformationInner>> checkConnectivityWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) {
if (resourceGroupName == null) {
throw new Ill... |
aws/aws-sdk-java | aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/AmazonSageMakerClient.java | AmazonSageMakerClient.deleteEndpointConfig | @Override
public DeleteEndpointConfigResult deleteEndpointConfig(DeleteEndpointConfigRequest request) {
request = beforeClientExecution(request);
return executeDeleteEndpointConfig(request);
} | java | @Override
public DeleteEndpointConfigResult deleteEndpointConfig(DeleteEndpointConfigRequest request) {
request = beforeClientExecution(request);
return executeDeleteEndpointConfig(request);
} | [
"@",
"Override",
"public",
"DeleteEndpointConfigResult",
"deleteEndpointConfig",
"(",
"DeleteEndpointConfigRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteEndpointConfig",
"(",
"request",
")",
";",
... | <p>
Deletes an endpoint configuration. The <code>DeleteEndpointConfig</code> API deletes only the specified
configuration. It does not delete endpoints created using the configuration.
</p>
@param deleteEndpointConfigRequest
@return Result of the DeleteEndpointConfig operation returned by the service.
@sample AmazonSa... | [
"<p",
">",
"Deletes",
"an",
"endpoint",
"configuration",
".",
"The",
"<code",
">",
"DeleteEndpointConfig<",
"/",
"code",
">",
"API",
"deletes",
"only",
"the",
"specified",
"configuration",
".",
"It",
"does",
"not",
"delete",
"endpoints",
"created",
"using",
"t... | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/AmazonSageMakerClient.java#L1572-L1576 | train | Deletes an endpoint configuration. | Of course, here is the Java code you requested:
```java
@Override
public DeleteEndpointConfigResult deleteEndpointConfig(DeleteEndpointConfigRequest request) {
request = beforeClientExecution(request);
return executeDeleteEndpointConfig(request);
}
```
Hope this helps! |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.