repository_name stringlengths 7 58 | func_path_in_repository stringlengths 11 218 | func_name stringlengths 4 140 | whole_func_string stringlengths 153 5.32k | language stringclasses 1
value | func_code_string stringlengths 72 4k | func_code_tokens listlengths 20 832 | func_documentation_string stringlengths 61 2k | func_documentation_tokens listlengths 1 647 | split_name stringclasses 1
value | func_code_url stringlengths 102 339 |
|---|---|---|---|---|---|---|---|---|---|---|
eclipse/xtext-lib | org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/ObjectExtensions.java | ObjectExtensions.operator_doubleArrow | public static <T> T operator_doubleArrow(T object, Procedure1<? super T> block) {
"""
The <code>doubleArrow</code> operator is used as a 'with'- or 'let'-operation.
It allows to bind an object to a local scope in order to do something on it.
Example:
<code>
new Person => [
firstName = 'Han'
lastName = 'Sol... | java | public static <T> T operator_doubleArrow(T object, Procedure1<? super T> block) {
block.apply(object);
return object;
} | [
"public",
"static",
"<",
"T",
">",
"T",
"operator_doubleArrow",
"(",
"T",
"object",
",",
"Procedure1",
"<",
"?",
"super",
"T",
">",
"block",
")",
"{",
"block",
".",
"apply",
"(",
"object",
")",
";",
"return",
"object",
";",
"}"
] | The <code>doubleArrow</code> operator is used as a 'with'- or 'let'-operation.
It allows to bind an object to a local scope in order to do something on it.
Example:
<code>
new Person => [
firstName = 'Han'
lastName = 'Solo'
]
</code>
@param object
an object. Can be <code>null</code>.
@param block
the block to execute... | [
"The",
"<code",
">",
"doubleArrow<",
"/",
"code",
">",
"operator",
"is",
"used",
"as",
"a",
"with",
"-",
"or",
"let",
"-",
"operation",
".",
"It",
"allows",
"to",
"bind",
"an",
"object",
"to",
"a",
"local",
"scope",
"in",
"order",
"to",
"do",
"someth... | train | https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/ObjectExtensions.java#L138-L141 |
UrielCh/ovh-java-sdk | ovh-java-sdk-caascontainers/src/main/java/net/minidev/ovh/api/ApiOvhCaascontainers.java | ApiOvhCaascontainers.serviceName_registry_credentials_credentialsId_DELETE | public void serviceName_registry_credentials_credentialsId_DELETE(String serviceName, String credentialsId) throws IOException {
"""
Delete the registry credentials.
REST: DELETE /caas/containers/{serviceName}/registry/credentials/{credentialsId}
@param credentialsId [required] credentials id
@param serviceNa... | java | public void serviceName_registry_credentials_credentialsId_DELETE(String serviceName, String credentialsId) throws IOException {
String qPath = "/caas/containers/{serviceName}/registry/credentials/{credentialsId}";
StringBuilder sb = path(qPath, serviceName, credentialsId);
exec(qPath, "DELETE", sb.toString(), nu... | [
"public",
"void",
"serviceName_registry_credentials_credentialsId_DELETE",
"(",
"String",
"serviceName",
",",
"String",
"credentialsId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/caas/containers/{serviceName}/registry/credentials/{credentialsId}\"",
";",
"Str... | Delete the registry credentials.
REST: DELETE /caas/containers/{serviceName}/registry/credentials/{credentialsId}
@param credentialsId [required] credentials id
@param serviceName [required] service name
API beta | [
"Delete",
"the",
"registry",
"credentials",
"."
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-caascontainers/src/main/java/net/minidev/ovh/api/ApiOvhCaascontainers.java#L311-L315 |
aws/aws-sdk-java | aws-java-sdk-amplify/src/main/java/com/amazonaws/services/amplify/model/UpdateAppRequest.java | UpdateAppRequest.withEnvironmentVariables | public UpdateAppRequest withEnvironmentVariables(java.util.Map<String, String> environmentVariables) {
"""
<p>
Environment Variables for an Amplify App.
</p>
@param environmentVariables
Environment Variables for an Amplify App.
@return Returns a reference to this object so that method calls can be chained t... | java | public UpdateAppRequest withEnvironmentVariables(java.util.Map<String, String> environmentVariables) {
setEnvironmentVariables(environmentVariables);
return this;
} | [
"public",
"UpdateAppRequest",
"withEnvironmentVariables",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"environmentVariables",
")",
"{",
"setEnvironmentVariables",
"(",
"environmentVariables",
")",
";",
"return",
"this",
";",
"}"
] | <p>
Environment Variables for an Amplify App.
</p>
@param environmentVariables
Environment Variables for an Amplify App.
@return Returns a reference to this object so that method calls can be chained together. | [
"<p",
">",
"Environment",
"Variables",
"for",
"an",
"Amplify",
"App",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-amplify/src/main/java/com/amazonaws/services/amplify/model/UpdateAppRequest.java#L352-L355 |
salesforce/Argus | ArgusCore/src/main/java/com/salesforce/dva/argus/entity/Notification.java | Notification.getMetricToAnnotate | public static Metric getMetricToAnnotate(String metric) {
"""
Given a metric to annotate expression, return a corresponding metric object.
@param metric The metric to annotate expression.
@return The corresponding metric or null if the metric to annotate expression is invalid.
"""
Metric resu... | java | public static Metric getMetricToAnnotate(String metric) {
Metric result = null;
if (metric != null && !metric.isEmpty()) {
Pattern pattern = Pattern.compile(
"([\\w,\\-,\\.,/]+):([\\w,\\-,\\.,/]+)(\\{(?:[\\w,\\-,\\.,/]+=[\\w,\\-,\\.,/,\\*,|]+)(?:,[\\w,\\-,\\.,/]+=[\\w,\\-,\\... | [
"public",
"static",
"Metric",
"getMetricToAnnotate",
"(",
"String",
"metric",
")",
"{",
"Metric",
"result",
"=",
"null",
";",
"if",
"(",
"metric",
"!=",
"null",
"&&",
"!",
"metric",
".",
"isEmpty",
"(",
")",
")",
"{",
"Pattern",
"pattern",
"=",
"Pattern"... | Given a metric to annotate expression, return a corresponding metric object.
@param metric The metric to annotate expression.
@return The corresponding metric or null if the metric to annotate expression is invalid. | [
"Given",
"a",
"metric",
"to",
"annotate",
"expression",
"return",
"a",
"corresponding",
"metric",
"object",
"."
] | train | https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/entity/Notification.java#L367-L394 |
riversun/finbin | src/main/java/org/riversun/finbin/BinarySearcher.java | BinarySearcher.indexOf | public int indexOf(byte[] srcBytes, byte[] searchBytes, int startIndex) {
"""
Returns the index within this byte-array of the first occurrence of the
specified(search bytes) byte array.<br>
Starting the search at the specified index<br>
@param srcBytes
@param searchBytes
@param startIndex
@return
"""
... | java | public int indexOf(byte[] srcBytes, byte[] searchBytes, int startIndex) {
final int endIndex = srcBytes.length - 1;
return indexOf(srcBytes, searchBytes, startIndex, endIndex);
} | [
"public",
"int",
"indexOf",
"(",
"byte",
"[",
"]",
"srcBytes",
",",
"byte",
"[",
"]",
"searchBytes",
",",
"int",
"startIndex",
")",
"{",
"final",
"int",
"endIndex",
"=",
"srcBytes",
".",
"length",
"-",
"1",
";",
"return",
"indexOf",
"(",
"srcBytes",
",... | Returns the index within this byte-array of the first occurrence of the
specified(search bytes) byte array.<br>
Starting the search at the specified index<br>
@param srcBytes
@param searchBytes
@param startIndex
@return | [
"Returns",
"the",
"index",
"within",
"this",
"byte",
"-",
"array",
"of",
"the",
"first",
"occurrence",
"of",
"the",
"specified",
"(",
"search",
"bytes",
")",
"byte",
"array",
".",
"<br",
">",
"Starting",
"the",
"search",
"at",
"the",
"specified",
"index<br... | train | https://github.com/riversun/finbin/blob/d1db86a0d2966dcf47087340bbd0727a9d508b3e/src/main/java/org/riversun/finbin/BinarySearcher.java#L65-L68 |
Azure/azure-sdk-for-java | containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildStepsInner.java | BuildStepsInner.updateAsync | public Observable<BuildStepInner> updateAsync(String resourceGroupName, String registryName, String buildTaskName, String stepName, BuildStepUpdateParameters buildStepUpdateParameters) {
"""
Updates a build step in a build task.
@param resourceGroupName The name of the resource group to which the container regi... | java | public Observable<BuildStepInner> updateAsync(String resourceGroupName, String registryName, String buildTaskName, String stepName, BuildStepUpdateParameters buildStepUpdateParameters) {
return updateWithServiceResponseAsync(resourceGroupName, registryName, buildTaskName, stepName, buildStepUpdateParameters).ma... | [
"public",
"Observable",
"<",
"BuildStepInner",
">",
"updateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"registryName",
",",
"String",
"buildTaskName",
",",
"String",
"stepName",
",",
"BuildStepUpdateParameters",
"buildStepUpdateParameters",
")",
"{",
"ret... | Updates a build step in a build task.
@param resourceGroupName The name of the resource group to which the container registry belongs.
@param registryName The name of the container registry.
@param buildTaskName The name of the container registry build task.
@param stepName The name of a build step for a container reg... | [
"Updates",
"a",
"build",
"step",
"in",
"a",
"build",
"task",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildStepsInner.java#L934-L941 |
Azure/azure-sdk-for-java | marketplaceordering/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/marketplaceordering/v2015_06_01/implementation/MarketplaceAgreementsInner.java | MarketplaceAgreementsInner.getAgreementAsync | public Observable<AgreementTermsInner> getAgreementAsync(String publisherId, String offerId, String planId) {
"""
Get marketplace agreement.
@param publisherId Publisher identifier string of image being deployed.
@param offerId Offer identifier string of image being deployed.
@param planId Plan identifier str... | java | public Observable<AgreementTermsInner> getAgreementAsync(String publisherId, String offerId, String planId) {
return getAgreementWithServiceResponseAsync(publisherId, offerId, planId).map(new Func1<ServiceResponse<AgreementTermsInner>, AgreementTermsInner>() {
@Override
public AgreementT... | [
"public",
"Observable",
"<",
"AgreementTermsInner",
">",
"getAgreementAsync",
"(",
"String",
"publisherId",
",",
"String",
"offerId",
",",
"String",
"planId",
")",
"{",
"return",
"getAgreementWithServiceResponseAsync",
"(",
"publisherId",
",",
"offerId",
",",
"planId"... | Get marketplace agreement.
@param publisherId Publisher identifier string of image being deployed.
@param offerId Offer identifier string of image being deployed.
@param planId Plan identifier string of image being deployed.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observab... | [
"Get",
"marketplace",
"agreement",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/marketplaceordering/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/marketplaceordering/v2015_06_01/implementation/MarketplaceAgreementsInner.java#L508-L515 |
google/identity-toolkit-java-client | src/main/java/com/google/identitytoolkit/GitkitClient.java | GitkitClient.verifyPassword | public GitkitUser verifyPassword(String email, String password)
throws GitkitClientException, GitkitServerException {
"""
Verifies the user entered password at Gitkit server.
@param email The email of the user
@param password The password inputed by the user
@return Gitkit user if password is valid.
@t... | java | public GitkitUser verifyPassword(String email, String password)
throws GitkitClientException, GitkitServerException {
return verifyPassword(email, password, null, null);
} | [
"public",
"GitkitUser",
"verifyPassword",
"(",
"String",
"email",
",",
"String",
"password",
")",
"throws",
"GitkitClientException",
",",
"GitkitServerException",
"{",
"return",
"verifyPassword",
"(",
"email",
",",
"password",
",",
"null",
",",
"null",
")",
";",
... | Verifies the user entered password at Gitkit server.
@param email The email of the user
@param password The password inputed by the user
@return Gitkit user if password is valid.
@throws GitkitClientException for invalid request
@throws GitkitServerException for server error | [
"Verifies",
"the",
"user",
"entered",
"password",
"at",
"Gitkit",
"server",
"."
] | train | https://github.com/google/identity-toolkit-java-client/blob/61dda1aabbd541ad5e431e840fd266bfca5f8a4a/src/main/java/com/google/identitytoolkit/GitkitClient.java#L250-L253 |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwhtmlerrorpage.java | appfwhtmlerrorpage.get | public static appfwhtmlerrorpage get(nitro_service service, options option) throws Exception {
"""
Use this API to fetch all the appfwhtmlerrorpage resources that are configured on netscaler.
"""
appfwhtmlerrorpage obj = new appfwhtmlerrorpage();
appfwhtmlerrorpage[] response = (appfwhtmlerrorpage[])obj.g... | java | public static appfwhtmlerrorpage get(nitro_service service, options option) throws Exception{
appfwhtmlerrorpage obj = new appfwhtmlerrorpage();
appfwhtmlerrorpage[] response = (appfwhtmlerrorpage[])obj.get_resources(service,option);
return response[0];
} | [
"public",
"static",
"appfwhtmlerrorpage",
"get",
"(",
"nitro_service",
"service",
",",
"options",
"option",
")",
"throws",
"Exception",
"{",
"appfwhtmlerrorpage",
"obj",
"=",
"new",
"appfwhtmlerrorpage",
"(",
")",
";",
"appfwhtmlerrorpage",
"[",
"]",
"response",
"... | Use this API to fetch all the appfwhtmlerrorpage resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"appfwhtmlerrorpage",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | train | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwhtmlerrorpage.java#L125-L129 |
maven-nar/nar-maven-plugin | src/main/java/com/github/maven_nar/cpptasks/DependencyTable.java | DependencyTable.getDependencyInfo | public DependencyInfo getDependencyInfo(final String sourceRelativeName, final String includePathIdentifier) {
"""
This method returns a DependencyInfo for the specific source file and
include path identifier
"""
DependencyInfo dependInfo = null;
final DependencyInfo[] dependInfos = (DependencyInfo[])... | java | public DependencyInfo getDependencyInfo(final String sourceRelativeName, final String includePathIdentifier) {
DependencyInfo dependInfo = null;
final DependencyInfo[] dependInfos = (DependencyInfo[]) this.dependencies.get(sourceRelativeName);
if (dependInfos != null) {
for (final DependencyInfo depen... | [
"public",
"DependencyInfo",
"getDependencyInfo",
"(",
"final",
"String",
"sourceRelativeName",
",",
"final",
"String",
"includePathIdentifier",
")",
"{",
"DependencyInfo",
"dependInfo",
"=",
"null",
";",
"final",
"DependencyInfo",
"[",
"]",
"dependInfos",
"=",
"(",
... | This method returns a DependencyInfo for the specific source file and
include path identifier | [
"This",
"method",
"returns",
"a",
"DependencyInfo",
"for",
"the",
"specific",
"source",
"file",
"and",
"include",
"path",
"identifier"
] | train | https://github.com/maven-nar/nar-maven-plugin/blob/3c622e2024296b4203431bbae3bde290a01dac00/src/main/java/com/github/maven_nar/cpptasks/DependencyTable.java#L350-L362 |
line/armeria | grpc/src/main/java/com/linecorp/armeria/unsafe/grpc/GrpcUnsafeBufferUtil.java | GrpcUnsafeBufferUtil.releaseBuffer | public static void releaseBuffer(Object message, RequestContext ctx) {
"""
Releases the {@link ByteBuf} backing the provided {@link Message}.
"""
final IdentityHashMap<Object, ByteBuf> buffers = ctx.attr(BUFFERS).get();
checkState(buffers != null,
"Releasing buffer even thoug... | java | public static void releaseBuffer(Object message, RequestContext ctx) {
final IdentityHashMap<Object, ByteBuf> buffers = ctx.attr(BUFFERS).get();
checkState(buffers != null,
"Releasing buffer even though storeBuffer has not been called.");
final ByteBuf removed = buffers.remove... | [
"public",
"static",
"void",
"releaseBuffer",
"(",
"Object",
"message",
",",
"RequestContext",
"ctx",
")",
"{",
"final",
"IdentityHashMap",
"<",
"Object",
",",
"ByteBuf",
">",
"buffers",
"=",
"ctx",
".",
"attr",
"(",
"BUFFERS",
")",
".",
"get",
"(",
")",
... | Releases the {@link ByteBuf} backing the provided {@link Message}. | [
"Releases",
"the",
"{"
] | train | https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/grpc/src/main/java/com/linecorp/armeria/unsafe/grpc/GrpcUnsafeBufferUtil.java#L53-L62 |
box/box-java-sdk | src/main/java/com/box/sdk/BoxFolder.java | BoxFolder.uploadFile | public BoxFile.Info uploadFile(UploadFileCallback callback, String name) {
"""
Uploads a new file to this folder.
@param callback the callback which allows file content to be written on output stream.
@param name the name to give the uploaded file.
@return the uploaded file's info.
"""
FileUpl... | java | public BoxFile.Info uploadFile(UploadFileCallback callback, String name) {
FileUploadParams uploadInfo = new FileUploadParams()
.setUploadFileCallback(callback)
.setName(name);
return this.uploadFile(uploadInfo);
} | [
"public",
"BoxFile",
".",
"Info",
"uploadFile",
"(",
"UploadFileCallback",
"callback",
",",
"String",
"name",
")",
"{",
"FileUploadParams",
"uploadInfo",
"=",
"new",
"FileUploadParams",
"(",
")",
".",
"setUploadFileCallback",
"(",
"callback",
")",
".",
"setName",
... | Uploads a new file to this folder.
@param callback the callback which allows file content to be written on output stream.
@param name the name to give the uploaded file.
@return the uploaded file's info. | [
"Uploads",
"a",
"new",
"file",
"to",
"this",
"folder",
"."
] | train | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFolder.java#L466-L471 |
Talend/tesb-rt-se | examples/cxf/jaxrs-attachments/service/src/main/java/service/attachment/MultipartsServiceImpl.java | MultipartsServiceImpl.duplicateMultipartBody | private MultipartBody duplicateMultipartBody(MultipartBody body) {
"""
Verifies the MultipartBody by reading the individual parts
and copying them to a new MultipartBody instance which
will be written out in the multipart/mixed format.
@param body the incoming MultipartBody
@return new MultipartBody
"""
... | java | private MultipartBody duplicateMultipartBody(MultipartBody body) {
// It is possible to access individual parts by the Content-Id values
// This MultipartBody is expected to contain 3 parts,
// "book1", "book2" and "image".
// These individual parts have their Content... | [
"private",
"MultipartBody",
"duplicateMultipartBody",
"(",
"MultipartBody",
"body",
")",
"{",
"// It is possible to access individual parts by the Content-Id values",
"// This MultipartBody is expected to contain 3 parts, ",
"// \"book1\", \"book2\" and \"image\". ",
"// These individual parts... | Verifies the MultipartBody by reading the individual parts
and copying them to a new MultipartBody instance which
will be written out in the multipart/mixed format.
@param body the incoming MultipartBody
@return new MultipartBody | [
"Verifies",
"the",
"MultipartBody",
"by",
"reading",
"the",
"individual",
"parts",
"and",
"copying",
"them",
"to",
"a",
"new",
"MultipartBody",
"instance",
"which",
"will",
"be",
"written",
"out",
"in",
"the",
"multipart",
"/",
"mixed",
"format",
"."
] | train | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/jaxrs-attachments/service/src/main/java/service/attachment/MultipartsServiceImpl.java#L38-L66 |
drapostolos/type-parser | src/main/java/com/github/drapostolos/typeparser/TypeParserBuilder.java | TypeParserBuilder.registerParser | public <T> TypeParserBuilder registerParser(Class<T> targetType, Parser<T> parser) {
"""
Register a custom made {@link Parser} implementation, associated with
the given {@code targetType}.
@param targetType associated with given {@code parser}.
@param parser custom made {@link Parser} implementation.
@return... | java | public <T> TypeParserBuilder registerParser(Class<T> targetType, Parser<T> parser) {
if (parser == null) {
throw new NullPointerException(makeNullArgumentErrorMsg("parser"));
}
if (targetType == null) {
throw new NullPointerException(makeNullArgumentErrorMsg("targetType")... | [
"public",
"<",
"T",
">",
"TypeParserBuilder",
"registerParser",
"(",
"Class",
"<",
"T",
">",
"targetType",
",",
"Parser",
"<",
"T",
">",
"parser",
")",
"{",
"if",
"(",
"parser",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"makeNu... | Register a custom made {@link Parser} implementation, associated with
the given {@code targetType}.
@param targetType associated with given {@code parser}.
@param parser custom made {@link Parser} implementation.
@return {@link TypeParserBuilder}
@throws NullPointerException if any given argument is null. | [
"Register",
"a",
"custom",
"made",
"{",
"@link",
"Parser",
"}",
"implementation",
"associated",
"with",
"the",
"given",
"{",
"@code",
"targetType",
"}",
"."
] | train | https://github.com/drapostolos/type-parser/blob/74c66311f8dd009897c74ab5069e36c045cda073/src/main/java/com/github/drapostolos/typeparser/TypeParserBuilder.java#L62-L78 |
GenesysPureEngage/workspace-client-java | src/main/java/com/genesys/internal/workspace/api/VoiceApi.java | VoiceApi.setFocusTimeCall | public ApiSuccessResponse setFocusTimeCall(String id, SetFocusTimeData setFocusTimeData) throws ApiException {
"""
Set the focus time of call
Set the focus time to the specified call.
@param id The connection ID of the call. (required)
@param setFocusTimeData Request parameters. (required)
@return ApiSuccessRe... | java | public ApiSuccessResponse setFocusTimeCall(String id, SetFocusTimeData setFocusTimeData) throws ApiException {
ApiResponse<ApiSuccessResponse> resp = setFocusTimeCallWithHttpInfo(id, setFocusTimeData);
return resp.getData();
} | [
"public",
"ApiSuccessResponse",
"setFocusTimeCall",
"(",
"String",
"id",
",",
"SetFocusTimeData",
"setFocusTimeData",
")",
"throws",
"ApiException",
"{",
"ApiResponse",
"<",
"ApiSuccessResponse",
">",
"resp",
"=",
"setFocusTimeCallWithHttpInfo",
"(",
"id",
",",
"setFocu... | Set the focus time of call
Set the focus time to the specified call.
@param id The connection ID of the call. (required)
@param setFocusTimeData Request parameters. (required)
@return ApiSuccessResponse
@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body | [
"Set",
"the",
"focus",
"time",
"of",
"call",
"Set",
"the",
"focus",
"time",
"to",
"the",
"specified",
"call",
"."
] | train | https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/VoiceApi.java#L4083-L4086 |
google/error-prone-javac | src/jdk.compiler/share/classes/com/sun/tools/javac/util/AbstractLog.java | AbstractLog.mandatoryNote | public void mandatoryNote(final JavaFileObject file, Note noteKey) {
"""
Provide a non-fatal notification, unless suppressed by the -nowarn option.
@param noteKey The key for the localized notification message.
"""
report(diags.mandatoryNote(getSource(file), noteKey));
} | java | public void mandatoryNote(final JavaFileObject file, Note noteKey) {
report(diags.mandatoryNote(getSource(file), noteKey));
} | [
"public",
"void",
"mandatoryNote",
"(",
"final",
"JavaFileObject",
"file",
",",
"Note",
"noteKey",
")",
"{",
"report",
"(",
"diags",
".",
"mandatoryNote",
"(",
"getSource",
"(",
"file",
")",
",",
"noteKey",
")",
")",
";",
"}"
] | Provide a non-fatal notification, unless suppressed by the -nowarn option.
@param noteKey The key for the localized notification message. | [
"Provide",
"a",
"non",
"-",
"fatal",
"notification",
"unless",
"suppressed",
"by",
"the",
"-",
"nowarn",
"option",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/util/AbstractLog.java#L392-L394 |
linkedin/dexmaker | dexmaker/src/main/java/com/android/dx/stock/ProxyBuilder.java | ProxyBuilder.setInvocationHandler | public static void setInvocationHandler(Object instance, InvocationHandler handler) {
"""
Sets the proxy's {@link InvocationHandler}.
<p>
If you create a proxy with {@link #build()}, the proxy will already have a handler set,
provided that you configured one with {@link #handler(InvocationHandler)}.
<p>
If yo... | java | public static void setInvocationHandler(Object instance, InvocationHandler handler) {
try {
Field handlerField = instance.getClass().getDeclaredField(FIELD_NAME_HANDLER);
handlerField.setAccessible(true);
handlerField.set(instance, handler);
} catch (NoSuchFieldExcept... | [
"public",
"static",
"void",
"setInvocationHandler",
"(",
"Object",
"instance",
",",
"InvocationHandler",
"handler",
")",
"{",
"try",
"{",
"Field",
"handlerField",
"=",
"instance",
".",
"getClass",
"(",
")",
".",
"getDeclaredField",
"(",
"FIELD_NAME_HANDLER",
")",
... | Sets the proxy's {@link InvocationHandler}.
<p>
If you create a proxy with {@link #build()}, the proxy will already have a handler set,
provided that you configured one with {@link #handler(InvocationHandler)}.
<p>
If you generate a proxy class with {@link #buildProxyClass()}, instances of the proxy class
will not auto... | [
"Sets",
"the",
"proxy",
"s",
"{",
"@link",
"InvocationHandler",
"}",
".",
"<p",
">",
"If",
"you",
"create",
"a",
"proxy",
"with",
"{",
"@link",
"#build",
"()",
"}",
"the",
"proxy",
"will",
"already",
"have",
"a",
"handler",
"set",
"provided",
"that",
"... | train | https://github.com/linkedin/dexmaker/blob/c58ffebcbb2564c7d1fa6fb58b48f351c330296d/dexmaker/src/main/java/com/android/dx/stock/ProxyBuilder.java#L419-L430 |
xiaosunzhu/resource-utils | src/main/java/net/sunyijun/resource/ResourceUtil.java | ResourceUtil.copyResourceToFile | public static void copyResourceToFile(String resourceAbsoluteClassPath, File targetFile) throws IOException {
"""
Copy resources to file system.
@param resourceAbsoluteClassPath resource's absolute class path, start with "/"
@param targetFile target file
@throws java.io.IOException
"""
... | java | public static void copyResourceToFile(String resourceAbsoluteClassPath, File targetFile) throws IOException {
InputStream is = ResourceUtil.class.getResourceAsStream(resourceAbsoluteClassPath);
if (is == null) {
throw new IOException("Resource not found! " + resourceAbsoluteClassPath);
... | [
"public",
"static",
"void",
"copyResourceToFile",
"(",
"String",
"resourceAbsoluteClassPath",
",",
"File",
"targetFile",
")",
"throws",
"IOException",
"{",
"InputStream",
"is",
"=",
"ResourceUtil",
".",
"class",
".",
"getResourceAsStream",
"(",
"resourceAbsoluteClassPat... | Copy resources to file system.
@param resourceAbsoluteClassPath resource's absolute class path, start with "/"
@param targetFile target file
@throws java.io.IOException | [
"Copy",
"resources",
"to",
"file",
"system",
"."
] | train | https://github.com/xiaosunzhu/resource-utils/blob/4f2bf3f36df10195a978f122ed682ba1eb0462b5/src/main/java/net/sunyijun/resource/ResourceUtil.java#L39-L63 |
UrielCh/ovh-java-sdk | ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java | ApiOvhOrder.cdn_dedicated_serviceName_cacheRule_duration_GET | public OvhOrder cdn_dedicated_serviceName_cacheRule_duration_GET(String serviceName, String duration, OvhOrderCacheRuleEnum cacheRule) throws IOException {
"""
Get prices and contracts information
REST: GET /order/cdn/dedicated/{serviceName}/cacheRule/{duration}
@param cacheRule [required] cache rule upgrade o... | java | public OvhOrder cdn_dedicated_serviceName_cacheRule_duration_GET(String serviceName, String duration, OvhOrderCacheRuleEnum cacheRule) throws IOException {
String qPath = "/order/cdn/dedicated/{serviceName}/cacheRule/{duration}";
StringBuilder sb = path(qPath, serviceName, duration);
query(sb, "cacheRule", cacheR... | [
"public",
"OvhOrder",
"cdn_dedicated_serviceName_cacheRule_duration_GET",
"(",
"String",
"serviceName",
",",
"String",
"duration",
",",
"OvhOrderCacheRuleEnum",
"cacheRule",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/order/cdn/dedicated/{serviceName}/cacheRu... | Get prices and contracts information
REST: GET /order/cdn/dedicated/{serviceName}/cacheRule/{duration}
@param cacheRule [required] cache rule upgrade option to 100 or 1000
@param serviceName [required] The internal name of your CDN offer
@param duration [required] Duration | [
"Get",
"prices",
"and",
"contracts",
"information"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L5277-L5283 |
xcesco/kripton | kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java | AssertKripton.asserTrueOrForeignKeyNotFound | public static void asserTrueOrForeignKeyNotFound(boolean expression, SQLiteEntity currentEntity, ClassName entity) {
"""
Asser true or foreign key not found.
@param expression
the expression
@param currentEntity
the current entity
@param entity
the entity
"""
if (!expression) {
throw (new Foreign... | java | public static void asserTrueOrForeignKeyNotFound(boolean expression, SQLiteEntity currentEntity, ClassName entity) {
if (!expression) {
throw (new ForeignKeyNotFoundException(currentEntity, entity));
}
} | [
"public",
"static",
"void",
"asserTrueOrForeignKeyNotFound",
"(",
"boolean",
"expression",
",",
"SQLiteEntity",
"currentEntity",
",",
"ClassName",
"entity",
")",
"{",
"if",
"(",
"!",
"expression",
")",
"{",
"throw",
"(",
"new",
"ForeignKeyNotFoundException",
"(",
... | Asser true or foreign key not found.
@param expression
the expression
@param currentEntity
the current entity
@param entity
the entity | [
"Asser",
"true",
"or",
"foreign",
"key",
"not",
"found",
"."
] | train | https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L347-L353 |
citiususc/hipster | hipster-core/src/main/java/es/usc/citius/hipster/util/examples/maze/Maze2D.java | Maze2D.validLocationsFrom | public Collection<Point> validLocationsFrom(Point loc) {
"""
Return all neighbor empty points from a specific location point.
@param loc source point
@return collection of empty neighbor points.
"""
Collection<Point> validMoves = new HashSet<Point>();
// Check for all valid movements
... | java | public Collection<Point> validLocationsFrom(Point loc) {
Collection<Point> validMoves = new HashSet<Point>();
// Check for all valid movements
for (int row = -1; row <= 1; row++) {
for (int column = -1; column <= 1; column++) {
try {
if (isFree(new... | [
"public",
"Collection",
"<",
"Point",
">",
"validLocationsFrom",
"(",
"Point",
"loc",
")",
"{",
"Collection",
"<",
"Point",
">",
"validMoves",
"=",
"new",
"HashSet",
"<",
"Point",
">",
"(",
")",
";",
"// Check for all valid movements",
"for",
"(",
"int",
"ro... | Return all neighbor empty points from a specific location point.
@param loc source point
@return collection of empty neighbor points. | [
"Return",
"all",
"neighbor",
"empty",
"points",
"from",
"a",
"specific",
"location",
"point",
"."
] | train | https://github.com/citiususc/hipster/blob/9ab1236abb833a27641ae73ba9ca890d5c17598e/hipster-core/src/main/java/es/usc/citius/hipster/util/examples/maze/Maze2D.java#L382-L399 |
apache/flink | flink-core/src/main/java/org/apache/flink/util/IOUtils.java | IOUtils.copyBytes | public static void copyBytes(final InputStream in, final OutputStream out, final int buffSize, final boolean close)
throws IOException {
"""
Copies from one stream to another.
@param in
InputStream to read from
@param out
OutputStream to write to
@param buffSize
the size of the buffer
@param close
whe... | java | public static void copyBytes(final InputStream in, final OutputStream out, final int buffSize, final boolean close)
throws IOException {
@SuppressWarnings("resource")
final PrintStream ps = out instanceof PrintStream ? (PrintStream) out : null;
final byte[] buf = new byte[buffSize];
try {
int bytesRead =... | [
"public",
"static",
"void",
"copyBytes",
"(",
"final",
"InputStream",
"in",
",",
"final",
"OutputStream",
"out",
",",
"final",
"int",
"buffSize",
",",
"final",
"boolean",
"close",
")",
"throws",
"IOException",
"{",
"@",
"SuppressWarnings",
"(",
"\"resource\"",
... | Copies from one stream to another.
@param in
InputStream to read from
@param out
OutputStream to write to
@param buffSize
the size of the buffer
@param close
whether or not close the InputStream and OutputStream at the end. The streams are closed in the finally
clause.
@throws IOException
thrown if an error occurred w... | [
"Copies",
"from",
"one",
"stream",
"to",
"another",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/IOUtils.java#L56-L77 |
jbundle/jbundle | thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldTable.java | FieldTable.setHandle | public FieldList setHandle(Object bookmark, int iHandleType) throws DBException {
"""
Reposition to this record Using this bookmark.
@param Object bookmark Bookmark.
@param int iHandleType Type of handle (see getHandle).
@exception FILE_NOT_OPEN.
@return record if found/null - record not found.
"""
... | java | public FieldList setHandle(Object bookmark, int iHandleType) throws DBException
{
if (this.doSetHandle(bookmark, iHandleType))
return this.getRecord();
else
return null;
} | [
"public",
"FieldList",
"setHandle",
"(",
"Object",
"bookmark",
",",
"int",
"iHandleType",
")",
"throws",
"DBException",
"{",
"if",
"(",
"this",
".",
"doSetHandle",
"(",
"bookmark",
",",
"iHandleType",
")",
")",
"return",
"this",
".",
"getRecord",
"(",
")",
... | Reposition to this record Using this bookmark.
@param Object bookmark Bookmark.
@param int iHandleType Type of handle (see getHandle).
@exception FILE_NOT_OPEN.
@return record if found/null - record not found. | [
"Reposition",
"to",
"this",
"record",
"Using",
"this",
"bookmark",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldTable.java#L477-L483 |
trajano/caliper | caliper/src/main/java/com/google/caliper/runner/ServerSocketService.java | ServerSocketService.getConnection | public ListenableFuture<OpenedSocket> getConnection(UUID id) {
"""
Returns a {@link ListenableFuture} for an open connection corresponding to the given id.
<p>N.B. calling this method 'consumes' the connection and as such calling it twice with the
same id will not work, the second future returned will never co... | java | public ListenableFuture<OpenedSocket> getConnection(UUID id) {
checkState(isRunning(), "You can only get connections from a running service: %s", this);
return getConnectionImpl(id, Source.REQUEST);
} | [
"public",
"ListenableFuture",
"<",
"OpenedSocket",
">",
"getConnection",
"(",
"UUID",
"id",
")",
"{",
"checkState",
"(",
"isRunning",
"(",
")",
",",
"\"You can only get connections from a running service: %s\"",
",",
"this",
")",
";",
"return",
"getConnectionImpl",
"(... | Returns a {@link ListenableFuture} for an open connection corresponding to the given id.
<p>N.B. calling this method 'consumes' the connection and as such calling it twice with the
same id will not work, the second future returned will never complete. Similarly calling it
with an id that does not correspond to a work... | [
"Returns",
"a",
"{",
"@link",
"ListenableFuture",
"}",
"for",
"an",
"open",
"connection",
"corresponding",
"to",
"the",
"given",
"id",
"."
] | train | https://github.com/trajano/caliper/blob/a8bcfd84fa9d7b893b3edfadc3b13240ae5cd658/caliper/src/main/java/com/google/caliper/runner/ServerSocketService.java#L134-L137 |
deeplearning4j/deeplearning4j | datavec/datavec-data/datavec-data-image/src/main/java/org/datavec/image/transform/ColorConversionTransform.java | ColorConversionTransform.doTransform | @Override
protected ImageWritable doTransform(ImageWritable image, Random random) {
"""
Takes an image and returns a transformed image.
Uses the random object in the case of random transformations.
@param image to transform, null == end of stream
@param random object to use (or null for deterministic)
@... | java | @Override
protected ImageWritable doTransform(ImageWritable image, Random random) {
if (image == null) {
return null;
}
Mat mat = (Mat) converter.convert(image.getFrame());
Mat result = new Mat();
try {
cvtColor(mat, result, conversionCode);
... | [
"@",
"Override",
"protected",
"ImageWritable",
"doTransform",
"(",
"ImageWritable",
"image",
",",
"Random",
"random",
")",
"{",
"if",
"(",
"image",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"Mat",
"mat",
"=",
"(",
"Mat",
")",
"converter",
".",
... | Takes an image and returns a transformed image.
Uses the random object in the case of random transformations.
@param image to transform, null == end of stream
@param random object to use (or null for deterministic)
@return transformed image | [
"Takes",
"an",
"image",
"and",
"returns",
"a",
"transformed",
"image",
".",
"Uses",
"the",
"random",
"object",
"in",
"the",
"case",
"of",
"random",
"transformations",
"."
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-data/datavec-data-image/src/main/java/org/datavec/image/transform/ColorConversionTransform.java#L81-L97 |
unbescape/unbescape | src/main/java/org/unbescape/xml/XmlEscape.java | XmlEscape.escapeXml11 | public static void escapeXml11(final Reader reader, final Writer writer, final XmlEscapeType type, final XmlEscapeLevel level)
throws IOException {
"""
<p>
Perform a (configurable) XML 1.1 <strong>escape</strong> operation on a <tt>Reader</tt> input,
writing results to a <tt>Writer</tt>.
</p>
<p>
... | java | public static void escapeXml11(final Reader reader, final Writer writer, final XmlEscapeType type, final XmlEscapeLevel level)
throws IOException {
escapeXml(reader, writer, XmlEscapeSymbols.XML11_SYMBOLS, type, level);
} | [
"public",
"static",
"void",
"escapeXml11",
"(",
"final",
"Reader",
"reader",
",",
"final",
"Writer",
"writer",
",",
"final",
"XmlEscapeType",
"type",
",",
"final",
"XmlEscapeLevel",
"level",
")",
"throws",
"IOException",
"{",
"escapeXml",
"(",
"reader",
",",
"... | <p>
Perform a (configurable) XML 1.1 <strong>escape</strong> operation on a <tt>Reader</tt> input,
writing results to a <tt>Writer</tt>.
</p>
<p>
This method will perform an escape operation according to the specified
{@link org.unbescape.xml.XmlEscapeType} and {@link org.unbescape.xml.XmlEscapeLevel}
argument values.
... | [
"<p",
">",
"Perform",
"a",
"(",
"configurable",
")",
"XML",
"1",
".",
"1",
"<strong",
">",
"escape<",
"/",
"strong",
">",
"operation",
"on",
"a",
"<tt",
">",
"Reader<",
"/",
"tt",
">",
"input",
"writing",
"results",
"to",
"a",
"<tt",
">",
"Writer<",
... | train | https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/xml/XmlEscape.java#L1622-L1625 |
box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.createMetadata | public Metadata createMetadata(String typeName, Metadata metadata) {
"""
Creates metadata on this file in the specified template type.
@param typeName the metadata template type name.
@param metadata the new metadata values.
@return the metadata returned from the server.
"""
String scope = Metadat... | java | public Metadata createMetadata(String typeName, Metadata metadata) {
String scope = Metadata.scopeBasedOnType(typeName);
return this.createMetadata(typeName, scope, metadata);
} | [
"public",
"Metadata",
"createMetadata",
"(",
"String",
"typeName",
",",
"Metadata",
"metadata",
")",
"{",
"String",
"scope",
"=",
"Metadata",
".",
"scopeBasedOnType",
"(",
"typeName",
")",
";",
"return",
"this",
".",
"createMetadata",
"(",
"typeName",
",",
"sc... | Creates metadata on this file in the specified template type.
@param typeName the metadata template type name.
@param metadata the new metadata values.
@return the metadata returned from the server. | [
"Creates",
"metadata",
"on",
"this",
"file",
"in",
"the",
"specified",
"template",
"type",
"."
] | train | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L1019-L1022 |
leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/impl/JPAGenericDAORulesBasedImpl.java | JPAGenericDAORulesBasedImpl.addOrders | protected void addOrders(CriteriaBuilder criteriaBuilder, Root<T> root, CriteriaQuery<T> criteriaQuery, Map<String, OrderType> orders) {
"""
Méthode de chargement des ordres
@param criteriaBuilder Constructeur de criteres
@param root Objet racine
@param criteriaQuery Requete de critères
@param orders Liste de... | java | protected void addOrders(CriteriaBuilder criteriaBuilder, Root<T> root, CriteriaQuery<T> criteriaQuery, Map<String, OrderType> orders) {
// Si la liste est vide
if(orders == null || orders.size() == 0) return;
// Liste d'ordres
List<Order> lOrders = new ArrayList<Order>();
// Parcours
for ... | [
"protected",
"void",
"addOrders",
"(",
"CriteriaBuilder",
"criteriaBuilder",
",",
"Root",
"<",
"T",
">",
"root",
",",
"CriteriaQuery",
"<",
"T",
">",
"criteriaQuery",
",",
"Map",
"<",
"String",
",",
"OrderType",
">",
"orders",
")",
"{",
"// Si la liste est vid... | Méthode de chargement des ordres
@param criteriaBuilder Constructeur de criteres
@param root Objet racine
@param criteriaQuery Requete de critères
@param orders Liste des ordres | [
"Méthode",
"de",
"chargement",
"des",
"ordres"
] | train | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/impl/JPAGenericDAORulesBasedImpl.java#L675-L705 |
JOML-CI/JOML | src/org/joml/Matrix4d.java | Matrix4d.translateLocal | public Matrix4d translateLocal(Vector3dc offset, Matrix4d dest) {
"""
Pre-multiply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in <code>dest</code>.
<p>
If <code>M</code> is <code>this</code> matrix and <code>T</code> the translation
matrix, then ... | java | public Matrix4d translateLocal(Vector3dc offset, Matrix4d dest) {
return translateLocal(offset.x(), offset.y(), offset.z(), dest);
} | [
"public",
"Matrix4d",
"translateLocal",
"(",
"Vector3dc",
"offset",
",",
"Matrix4d",
"dest",
")",
"{",
"return",
"translateLocal",
"(",
"offset",
".",
"x",
"(",
")",
",",
"offset",
".",
"y",
"(",
")",
",",
"offset",
".",
"z",
"(",
")",
",",
"dest",
"... | Pre-multiply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in <code>dest</code>.
<p>
If <code>M</code> is <code>this</code> matrix and <code>T</code> the translation
matrix, then the new matrix will be <code>T * M</code>. So when
transforming a vector <code>... | [
"Pre",
"-",
"multiply",
"a",
"translation",
"to",
"this",
"matrix",
"by",
"translating",
"by",
"the",
"given",
"number",
"of",
"units",
"in",
"x",
"y",
"and",
"z",
"and",
"store",
"the",
"result",
"in",
"<code",
">",
"dest<",
"/",
"code",
">",
".",
"... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4d.java#L5636-L5638 |
jglobus/JGlobus | gridftp/src/main/java/org/globus/ftp/GridFTPClient.java | GridFTPClient.changeGroup | public void changeGroup(String group, String file)
throws IOException, ServerException {
"""
Change the Unix group membership of a file.
@param group the name or ID of the group
@param file the file whose group membership should be changed
@exception ServerException if an error occurred.
"""
... | java | public void changeGroup(String group, String file)
throws IOException, ServerException {
String arguments = group + " " + file;
Command cmd = new Command("SITE CHGRP", arguments);
try {
controlChannel.execute(cmd);
} catch (UnexpectedReplyCodeException urce) {
... | [
"public",
"void",
"changeGroup",
"(",
"String",
"group",
",",
"String",
"file",
")",
"throws",
"IOException",
",",
"ServerException",
"{",
"String",
"arguments",
"=",
"group",
"+",
"\" \"",
"+",
"file",
";",
"Command",
"cmd",
"=",
"new",
"Command",
"(",
"\... | Change the Unix group membership of a file.
@param group the name or ID of the group
@param file the file whose group membership should be changed
@exception ServerException if an error occurred. | [
"Change",
"the",
"Unix",
"group",
"membership",
"of",
"a",
"file",
"."
] | train | https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/GridFTPClient.java#L1085-L1096 |
codeprimate-software/cp-elements | src/main/java/org/cp/elements/lang/Assert.java | Assert.notEmpty | public static void notEmpty(Object[] array, Supplier<String> message) {
"""
Asserts that the {@link Object array} is not empty.
The assertion holds if and only if the {@link Object array} is not {@literal null} and contains at least 1 element.
@param array {@link Object array} to evaluate.
@param message {@... | java | public static void notEmpty(Object[] array, Supplier<String> message) {
if (isEmpty(array)) {
throw new IllegalArgumentException(message.get());
}
} | [
"public",
"static",
"void",
"notEmpty",
"(",
"Object",
"[",
"]",
"array",
",",
"Supplier",
"<",
"String",
">",
"message",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"array",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"message",
".",
"get",... | Asserts that the {@link Object array} is not empty.
The assertion holds if and only if the {@link Object array} is not {@literal null} and contains at least 1 element.
@param array {@link Object array} to evaluate.
@param message {@link Supplier} containing the message using in the {@link IllegalArgumentException} th... | [
"Asserts",
"that",
"the",
"{",
"@link",
"Object",
"array",
"}",
"is",
"not",
"empty",
"."
] | train | https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/Assert.java#L973-L977 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java | ModelsImpl.getCompositeEntity | public CompositeEntityExtractor getCompositeEntity(UUID appId, String versionId, UUID cEntityId) {
"""
Gets information about the composite entity model.
@param appId The application ID.
@param versionId The version ID.
@param cEntityId The composite entity extractor ID.
@throws IllegalArgumentException thro... | java | public CompositeEntityExtractor getCompositeEntity(UUID appId, String versionId, UUID cEntityId) {
return getCompositeEntityWithServiceResponseAsync(appId, versionId, cEntityId).toBlocking().single().body();
} | [
"public",
"CompositeEntityExtractor",
"getCompositeEntity",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"UUID",
"cEntityId",
")",
"{",
"return",
"getCompositeEntityWithServiceResponseAsync",
"(",
"appId",
",",
"versionId",
",",
"cEntityId",
")",
".",
"toBlo... | Gets information about the composite entity model.
@param appId The application ID.
@param versionId The version ID.
@param cEntityId The composite entity extractor ID.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws ErrorResponseException thrown if the request is rejected by server
@... | [
"Gets",
"information",
"about",
"the",
"composite",
"entity",
"model",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L3937-L3939 |
alkacon/opencms-core | src/org/opencms/gwt/CmsVfsService.java | CmsVfsService.renameResourceInternal | public String renameResourceInternal(CmsUUID structureId, String newName) throws CmsException {
"""
Internal implementation for renaming a resource.<p>
@param structureId the structure id of the resource to rename
@param newName the new resource name
@return either null if the rename was successful, or an err... | java | public String renameResourceInternal(CmsUUID structureId, String newName) throws CmsException {
newName = newName.trim();
CmsObject rootCms = OpenCms.initCmsObject(getCmsObject());
rootCms.getRequestContext().setSiteRoot("");
Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLoc... | [
"public",
"String",
"renameResourceInternal",
"(",
"CmsUUID",
"structureId",
",",
"String",
"newName",
")",
"throws",
"CmsException",
"{",
"newName",
"=",
"newName",
".",
"trim",
"(",
")",
";",
"CmsObject",
"rootCms",
"=",
"OpenCms",
".",
"initCmsObject",
"(",
... | Internal implementation for renaming a resource.<p>
@param structureId the structure id of the resource to rename
@param newName the new resource name
@return either null if the rename was successful, or an error message
@throws CmsException if something goes wrong | [
"Internal",
"implementation",
"for",
"renaming",
"a",
"resource",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/CmsVfsService.java#L996-L1020 |
eobermuhlner/big-math | ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigDecimalMath.java | BigDecimalMath.acot | public static BigDecimal acot(BigDecimal x, MathContext mathContext) {
"""
Calculates the inverse cotangens (arc cotangens) of {@link BigDecimal} x.
<p>See: <a href="http://en.wikipedia.org/wiki/Arccotangens">Wikipedia: Arccotangens</a></p>
@param x the {@link BigDecimal} to calculate the arc cotangens for
... | java | public static BigDecimal acot(BigDecimal x, MathContext mathContext) {
checkMathContext(mathContext);
MathContext mc = new MathContext(mathContext.getPrecision() + 4, mathContext.getRoundingMode());
BigDecimal result = pi(mc).divide(TWO, mc).subtract(atan(x, mc), mc);
return round(result, mathContext);
} | [
"public",
"static",
"BigDecimal",
"acot",
"(",
"BigDecimal",
"x",
",",
"MathContext",
"mathContext",
")",
"{",
"checkMathContext",
"(",
"mathContext",
")",
";",
"MathContext",
"mc",
"=",
"new",
"MathContext",
"(",
"mathContext",
".",
"getPrecision",
"(",
")",
... | Calculates the inverse cotangens (arc cotangens) of {@link BigDecimal} x.
<p>See: <a href="http://en.wikipedia.org/wiki/Arccotangens">Wikipedia: Arccotangens</a></p>
@param x the {@link BigDecimal} to calculate the arc cotangens for
@param mathContext the {@link MathContext} used for the result
@return the calculated... | [
"Calculates",
"the",
"inverse",
"cotangens",
"(",
"arc",
"cotangens",
")",
"of",
"{",
"@link",
"BigDecimal",
"}",
"x",
"."
] | train | https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigDecimalMath.java#L1516-L1521 |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApiClient.java | GitLabApiClient.enableRequestResponseLogging | void enableRequestResponseLogging(Logger logger, Level level, int maxEntityLength, List<String> maskedHeaderNames) {
"""
Enable the logging of the requests to and the responses from the GitLab server API.
@param logger the Logger instance to log to
@param level the logging level (SEVERE, WARNING, INFO, CONFIG,... | java | void enableRequestResponseLogging(Logger logger, Level level, int maxEntityLength, List<String> maskedHeaderNames) {
MaskingLoggingFilter loggingFilter = new MaskingLoggingFilter(logger, level, maxEntityLength, maskedHeaderNames);
clientConfig.register(loggingFilter);
// Recreate the Client in... | [
"void",
"enableRequestResponseLogging",
"(",
"Logger",
"logger",
",",
"Level",
"level",
",",
"int",
"maxEntityLength",
",",
"List",
"<",
"String",
">",
"maskedHeaderNames",
")",
"{",
"MaskingLoggingFilter",
"loggingFilter",
"=",
"new",
"MaskingLoggingFilter",
"(",
"... | Enable the logging of the requests to and the responses from the GitLab server API.
@param logger the Logger instance to log to
@param level the logging level (SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST)
@param maxEntitySize maximum number of entity bytes to be logged. When logging if the maxEntitySize
is rea... | [
"Enable",
"the",
"logging",
"of",
"the",
"requests",
"to",
"and",
"the",
"responses",
"from",
"the",
"GitLab",
"server",
"API",
"."
] | train | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L253-L262 |
twilliamson/mogwee-logging | src/main/java/com/mogwee/logging/Logger.java | Logger.infof | public final void infof(String message, Object... args) {
"""
Logs a formatted message if INFO logging is enabled.
@param message a <a href="http://download.oracle.com/javase/6/docs/api/java/util/Formatter.html#syntax">format string</a>
@param args arguments referenced by the format specifiers in the format... | java | public final void infof(String message, Object... args)
{
logf(Level.INFO, null, message, args);
} | [
"public",
"final",
"void",
"infof",
"(",
"String",
"message",
",",
"Object",
"...",
"args",
")",
"{",
"logf",
"(",
"Level",
".",
"INFO",
",",
"null",
",",
"message",
",",
"args",
")",
";",
"}"
] | Logs a formatted message if INFO logging is enabled.
@param message a <a href="http://download.oracle.com/javase/6/docs/api/java/util/Formatter.html#syntax">format string</a>
@param args arguments referenced by the format specifiers in the format string. | [
"Logs",
"a",
"formatted",
"message",
"if",
"INFO",
"logging",
"is",
"enabled",
"."
] | train | https://github.com/twilliamson/mogwee-logging/blob/30b99c2649de455432d956a8f6a74316de4cd62c/src/main/java/com/mogwee/logging/Logger.java#L148-L151 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.escapeUnprintable | public static <T extends Appendable> boolean escapeUnprintable(T result, int c) {
"""
Escape unprintable characters using <backslash>uxxxx notation
for U+0000 to U+FFFF and <backslash>Uxxxxxxxx for U+10000 and
above. If the character is printable ASCII, then do nothing
and return FALSE. Otherwise, append the ... | java | public static <T extends Appendable> boolean escapeUnprintable(T result, int c) {
try {
if (isUnprintable(c)) {
result.append('\\');
if ((c & ~0xFFFF) != 0) {
result.append('U');
result.append(DIGITS[0xF&(c>>28)]);
... | [
"public",
"static",
"<",
"T",
"extends",
"Appendable",
">",
"boolean",
"escapeUnprintable",
"(",
"T",
"result",
",",
"int",
"c",
")",
"{",
"try",
"{",
"if",
"(",
"isUnprintable",
"(",
"c",
")",
")",
"{",
"result",
".",
"append",
"(",
"'",
"'",
")",
... | Escape unprintable characters using <backslash>uxxxx notation
for U+0000 to U+FFFF and <backslash>Uxxxxxxxx for U+10000 and
above. If the character is printable ASCII, then do nothing
and return FALSE. Otherwise, append the escaped notation and
return TRUE. | [
"Escape",
"unprintable",
"characters",
"using",
"<backslash",
">",
"uxxxx",
"notation",
"for",
"U",
"+",
"0000",
"to",
"U",
"+",
"FFFF",
"and",
"<backslash",
">",
"Uxxxxxxxx",
"for",
"U",
"+",
"10000",
"and",
"above",
".",
"If",
"the",
"character",
"is",
... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L1488-L1511 |
landawn/AbacusUtil | src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java | PoolablePreparedStatement.setNString | @Override
public void setNString(int parameterIndex, String value) throws SQLException {
"""
Method setNString.
@param parameterIndex
@param value
@throws SQLException
@see java.sql.PreparedStatement#setNString(int, String)
"""
internalStmt.setNString(parameterIndex, value);
} | java | @Override
public void setNString(int parameterIndex, String value) throws SQLException {
internalStmt.setNString(parameterIndex, value);
} | [
"@",
"Override",
"public",
"void",
"setNString",
"(",
"int",
"parameterIndex",
",",
"String",
"value",
")",
"throws",
"SQLException",
"{",
"internalStmt",
".",
"setNString",
"(",
"parameterIndex",
",",
"value",
")",
";",
"}"
] | Method setNString.
@param parameterIndex
@param value
@throws SQLException
@see java.sql.PreparedStatement#setNString(int, String) | [
"Method",
"setNString",
"."
] | train | https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java#L857-L860 |
teatrove/teatrove | trove/src/main/java/org/teatrove/trove/classfile/ClassFile.java | ClassFile.addMethod | public MethodInfo addMethod(Modifiers modifiers,
String methodName,
TypeDesc ret,
TypeDesc... params) {
"""
Add a method to this class.
@param ret Is null if method returns void.
@param params May be null if method ... | java | public MethodInfo addMethod(Modifiers modifiers,
String methodName,
TypeDesc ret,
TypeDesc... params) {
return addMethod(modifiers, methodName, null, ret, params);
} | [
"public",
"MethodInfo",
"addMethod",
"(",
"Modifiers",
"modifiers",
",",
"String",
"methodName",
",",
"TypeDesc",
"ret",
",",
"TypeDesc",
"...",
"params",
")",
"{",
"return",
"addMethod",
"(",
"modifiers",
",",
"methodName",
",",
"null",
",",
"ret",
",",
"pa... | Add a method to this class.
@param ret Is null if method returns void.
@param params May be null if method accepts no parameters. | [
"Add",
"a",
"method",
"to",
"this",
"class",
"."
] | train | https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/ClassFile.java#L410-L415 |
OpenLiberty/open-liberty | dev/com.ibm.ws.logging.hpel/src/com/ibm/websphere/logging/hpel/reader/HpelFormatter.java | HpelFormatter.setDateFormat | public void setDateFormat(Locale locale, boolean isoDateFormat) {
"""
Sets the formatter locale and the dateFormat that will be used to localize a log record being formatted. The formatter locale will be used
when {@link #formatRecord(RepositoryLogRecord)} is invoked. It is possible to format a log record with a ... | java | public void setDateFormat(Locale locale, boolean isoDateFormat) {
this.locale = locale;
if (null == locale) {
dateFormat = FormatSet.customizeDateFormat(DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM), isoDateFormat);
} else {
dateFormat = FormatSet.cu... | [
"public",
"void",
"setDateFormat",
"(",
"Locale",
"locale",
",",
"boolean",
"isoDateFormat",
")",
"{",
"this",
".",
"locale",
"=",
"locale",
";",
"if",
"(",
"null",
"==",
"locale",
")",
"{",
"dateFormat",
"=",
"FormatSet",
".",
"customizeDateFormat",
"(",
... | Sets the formatter locale and the dateFormat that will be used to localize a log record being formatted. The formatter locale will be used
when {@link #formatRecord(RepositoryLogRecord)} is invoked. It is possible to format a log record with a locale other than
one set by this method using {@link #formatRecord(Reposito... | [
"Sets",
"the",
"formatter",
"locale",
"and",
"the",
"dateFormat",
"that",
"will",
"be",
"used",
"to",
"localize",
"a",
"log",
"record",
"being",
"formatted",
".",
"The",
"formatter",
"locale",
"will",
"be",
"used",
"when",
"{",
"@link",
"#formatRecord",
"(",... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/websphere/logging/hpel/reader/HpelFormatter.java#L307-L314 |
google/closure-compiler | src/com/google/javascript/jscomp/TypeCheck.java | TypeCheck.visitInterfacePropertyAssignment | private void visitInterfacePropertyAssignment(Node object, Node lvalue) {
"""
Visits an lvalue node for cases such as
<pre>
interface.prototype.property = ...;
</pre>
"""
if (!lvalue.getParent().isAssign()) {
// assignments to interface properties cannot be in destructuring patterns or for-of lo... | java | private void visitInterfacePropertyAssignment(Node object, Node lvalue) {
if (!lvalue.getParent().isAssign()) {
// assignments to interface properties cannot be in destructuring patterns or for-of loops
reportInvalidInterfaceMemberDeclaration(object);
return;
}
Node assign = lvalue.getPare... | [
"private",
"void",
"visitInterfacePropertyAssignment",
"(",
"Node",
"object",
",",
"Node",
"lvalue",
")",
"{",
"if",
"(",
"!",
"lvalue",
".",
"getParent",
"(",
")",
".",
"isAssign",
"(",
")",
")",
"{",
"// assignments to interface properties cannot be in destructuri... | Visits an lvalue node for cases such as
<pre>
interface.prototype.property = ...;
</pre> | [
"Visits",
"an",
"lvalue",
"node",
"for",
"cases",
"such",
"as"
] | train | https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeCheck.java#L1801-L1825 |
aspectran/aspectran | core/src/main/java/com/aspectran/core/component/session/FileSessionDataStore.java | FileSessionDataStore.restoreAttributes | private void restoreAttributes(InputStream is, int size, SessionData data) throws Exception {
"""
Load attributes from an input stream that contains session data.
@param is the input stream containing session data
@param size number of attributes
@param data the data to restore to
@throws Exception if the in... | java | private void restoreAttributes(InputStream is, int size, SessionData data) throws Exception {
if (size > 0) {
// input stream should not be closed here
Map<String, Object> attributes = new HashMap<>();
ObjectInputStream ois = new CustomObjectInputStream(is);
... | [
"private",
"void",
"restoreAttributes",
"(",
"InputStream",
"is",
",",
"int",
"size",
",",
"SessionData",
"data",
")",
"throws",
"Exception",
"{",
"if",
"(",
"size",
">",
"0",
")",
"{",
"// input stream should not be closed here\r",
"Map",
"<",
"String",
",",
... | Load attributes from an input stream that contains session data.
@param is the input stream containing session data
@param size number of attributes
@param data the data to restore to
@throws Exception if the input stream is invalid or fails to read | [
"Load",
"attributes",
"from",
"an",
"input",
"stream",
"that",
"contains",
"session",
"data",
"."
] | train | https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/component/session/FileSessionDataStore.java#L394-L406 |
upwork/java-upwork | src/com/Upwork/api/Routers/Activities/Team.java | Team.addActivity | public JSONObject addActivity(String company, String team, HashMap<String, String> params) throws JSONException {
"""
Create an oTask/Activity record within a team
@param company Company ID
@param team Team ID
@param params Parameters
@throws JSONException If error occurred
@return {@link JSONObject}
... | java | public JSONObject addActivity(String company, String team, HashMap<String, String> params) throws JSONException {
return oClient.post("/otask/v1/tasks/companies/" + company + "/teams/" + team + "/tasks", params);
} | [
"public",
"JSONObject",
"addActivity",
"(",
"String",
"company",
",",
"String",
"team",
",",
"HashMap",
"<",
"String",
",",
"String",
">",
"params",
")",
"throws",
"JSONException",
"{",
"return",
"oClient",
".",
"post",
"(",
"\"/otask/v1/tasks/companies/\"",
"+"... | Create an oTask/Activity record within a team
@param company Company ID
@param team Team ID
@param params Parameters
@throws JSONException If error occurred
@return {@link JSONObject} | [
"Create",
"an",
"oTask",
"/",
"Activity",
"record",
"within",
"a",
"team"
] | train | https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Activities/Team.java#L97-L99 |
apache/groovy | subprojects/groovy-xml/src/main/java/groovy/xml/Namespace.java | Namespace.get | public QName get(String localName) {
"""
Returns the QName for the given localName.
@param localName
the local name within this
"""
if (uri != null && uri.length() > 0) {
if (prefix != null) {
return new QName(uri, localName, prefix);
}
else {
... | java | public QName get(String localName) {
if (uri != null && uri.length() > 0) {
if (prefix != null) {
return new QName(uri, localName, prefix);
}
else {
return new QName(uri, localName);
}
}
else {
return new... | [
"public",
"QName",
"get",
"(",
"String",
"localName",
")",
"{",
"if",
"(",
"uri",
"!=",
"null",
"&&",
"uri",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"if",
"(",
"prefix",
"!=",
"null",
")",
"{",
"return",
"new",
"QName",
"(",
"uri",
",",
"l... | Returns the QName for the given localName.
@param localName
the local name within this | [
"Returns",
"the",
"QName",
"for",
"the",
"given",
"localName",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-xml/src/main/java/groovy/xml/Namespace.java#L48-L60 |
gallandarakhneorg/afc | core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java | MathUtil.getCohenSutherlandCode | @Pure
public static int getCohenSutherlandCode(int px, int py, int rxmin, int rymin, int rxmax, int rymax) {
"""
Compute the zone where the point is against the given rectangle
according to the <a href="http://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm">Cohen-Sutherland algorithm</a>.
@param px ... | java | @Pure
public static int getCohenSutherlandCode(int px, int py, int rxmin, int rymin, int rxmax, int rymax) {
assert rxmin <= rxmax : AssertMessages.lowerEqualParameters(2, rxmin, 4, rxmax);
assert rymin <= rymax : AssertMessages.lowerEqualParameters(3, rymin, 5, rymax);
// initialised as being inside of clip win... | [
"@",
"Pure",
"public",
"static",
"int",
"getCohenSutherlandCode",
"(",
"int",
"px",
",",
"int",
"py",
",",
"int",
"rxmin",
",",
"int",
"rymin",
",",
"int",
"rxmax",
",",
"int",
"rymax",
")",
"{",
"assert",
"rxmin",
"<=",
"rxmax",
":",
"AssertMessages",
... | Compute the zone where the point is against the given rectangle
according to the <a href="http://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm">Cohen-Sutherland algorithm</a>.
@param px is the coordinates of the points.
@param py is the coordinates of the points.
@param rxmin is the min of the coordinates o... | [
"Compute",
"the",
"zone",
"where",
"the",
"point",
"is",
"against",
"the",
"given",
"rectangle",
"according",
"to",
"the",
"<a",
"href",
"=",
"http",
":",
"//",
"en",
".",
"wikipedia",
".",
"org",
"/",
"wiki",
"/",
"Cohen%E2%80%93Sutherland_algorithm",
">",
... | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java#L489-L512 |
carewebframework/carewebframework-core | org.carewebframework.shell/src/main/java/org/carewebframework/shell/CareWebShellEx.java | CareWebShellEx.registerLayout | public void registerLayout(String path, String resource) throws Exception {
"""
Registers a layout at the specified path.
@param path Format is <tab name>\<tree node path>
@param resource Location of the xml layout.
@throws Exception Unspecified exception.
"""
Layout layout = LayoutPar... | java | public void registerLayout(String path, String resource) throws Exception {
Layout layout = LayoutParser.parseResource(resource);
ElementUI parent = parentFromPath(path);
if (parent != null) {
layout.materialize(parent);
}
} | [
"public",
"void",
"registerLayout",
"(",
"String",
"path",
",",
"String",
"resource",
")",
"throws",
"Exception",
"{",
"Layout",
"layout",
"=",
"LayoutParser",
".",
"parseResource",
"(",
"resource",
")",
";",
"ElementUI",
"parent",
"=",
"parentFromPath",
"(",
... | Registers a layout at the specified path.
@param path Format is <tab name>\<tree node path>
@param resource Location of the xml layout.
@throws Exception Unspecified exception. | [
"Registers",
"a",
"layout",
"at",
"the",
"specified",
"path",
"."
] | train | https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/CareWebShellEx.java#L311-L318 |
menacher/java-game-server | jetserver/src/main/java/org/menacheri/jetserver/util/NettyUtils.java | NettyUtils.readSocketAddress | public static InetSocketAddress readSocketAddress(ChannelBuffer buffer) {
"""
Read a socket address from a buffer. The socket address will be provided
as two strings containing host and port.
@param buffer
The buffer containing the host and port as string.
@return The InetSocketAddress object created from ho... | java | public static InetSocketAddress readSocketAddress(ChannelBuffer buffer)
{
String remoteHost = NettyUtils.readString(buffer);
int remotePort = 0;
if (buffer.readableBytes() >= 4)
{
remotePort = buffer.readInt();
}
else
{
return null;
}
InetSocketAddress remoteAddress = null;
if (null != remote... | [
"public",
"static",
"InetSocketAddress",
"readSocketAddress",
"(",
"ChannelBuffer",
"buffer",
")",
"{",
"String",
"remoteHost",
"=",
"NettyUtils",
".",
"readString",
"(",
"buffer",
")",
";",
"int",
"remotePort",
"=",
"0",
";",
"if",
"(",
"buffer",
".",
"readab... | Read a socket address from a buffer. The socket address will be provided
as two strings containing host and port.
@param buffer
The buffer containing the host and port as string.
@return The InetSocketAddress object created from host and port or null
in case the strings are not there. | [
"Read",
"a",
"socket",
"address",
"from",
"a",
"buffer",
".",
"The",
"socket",
"address",
"will",
"be",
"provided",
"as",
"two",
"strings",
"containing",
"host",
"and",
"port",
"."
] | train | https://github.com/menacher/java-game-server/blob/668ca49e8bd1dac43add62378cf6c22a93125d48/jetserver/src/main/java/org/menacheri/jetserver/util/NettyUtils.java#L384-L402 |
rundeck/rundeck | core/src/main/java/com/dtolabs/rundeck/core/utils/StringArrayUtil.java | StringArrayUtil.asString | public static String asString(final Object[] input, final String delim) {
"""
Format an array of objects as a string separated by a delimiter by calling toString on each object
@param input List to format
@param delim delimiter string to insert between elements
@return formatted string
"""
final S... | java | public static String asString(final Object[] input, final String delim) {
final StringBuffer sb = new StringBuffer();
for (int i = 0 ; i < input.length ; i++) {
if (i > 0) {
sb.append(delim);
}
sb.append(input[i].toString());
}
return s... | [
"public",
"static",
"String",
"asString",
"(",
"final",
"Object",
"[",
"]",
"input",
",",
"final",
"String",
"delim",
")",
"{",
"final",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",... | Format an array of objects as a string separated by a delimiter by calling toString on each object
@param input List to format
@param delim delimiter string to insert between elements
@return formatted string | [
"Format",
"an",
"array",
"of",
"objects",
"as",
"a",
"string",
"separated",
"by",
"a",
"delimiter",
"by",
"calling",
"toString",
"on",
"each",
"object"
] | train | https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/StringArrayUtil.java#L63-L72 |
elki-project/elki | elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mkcop/MkCoPTreeNode.java | MkCoPTreeNode.progressiveKnnDistanceApproximation | protected ApproximationLine progressiveKnnDistanceApproximation(int k_max) {
"""
Determines and returns the progressive approximation for the knn distances
of this node as the maximum of the progressive approximations of all
entries.
@param k_max the maximum k parameter
@return the conservative approximation... | java | protected ApproximationLine progressiveKnnDistanceApproximation(int k_max) {
if(!isLeaf()) {
throw new UnsupportedOperationException("Progressive KNN-distance approximation " + "is only vailable in leaf nodes!");
}
// determine k_0, y_1, y_kmax
int k_0 = 0;
double y_1 = Double.POSITIVE_INFINI... | [
"protected",
"ApproximationLine",
"progressiveKnnDistanceApproximation",
"(",
"int",
"k_max",
")",
"{",
"if",
"(",
"!",
"isLeaf",
"(",
")",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"Progressive KNN-distance approximation \"",
"+",
"\"is only vaila... | Determines and returns the progressive approximation for the knn distances
of this node as the maximum of the progressive approximations of all
entries.
@param k_max the maximum k parameter
@return the conservative approximation for the knn distances | [
"Determines",
"and",
"returns",
"the",
"progressive",
"approximation",
"for",
"the",
"knn",
"distances",
"of",
"this",
"node",
"as",
"the",
"maximum",
"of",
"the",
"progressive",
"approximations",
"of",
"all",
"entries",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mkcop/MkCoPTreeNode.java#L111-L139 |
marvinlabs/android-intents | library/src/main/java/com/marvinlabs/intents/GeoIntents.java | GeoIntents.newMapsIntent | public static Intent newMapsIntent(String address, String placeTitle) {
"""
Intent that should allow opening a map showing the given address (if it exists)
@param address The address to search
@param placeTitle The title to show on the marker
@return the intent
"""
StringBuilder sb = new String... | java | public static Intent newMapsIntent(String address, String placeTitle) {
StringBuilder sb = new StringBuilder();
sb.append("geo:0,0?q=");
String addressEncoded = Uri.encode(address);
sb.append(addressEncoded);
// pass text for the info window
String titleEncoded = Uri.en... | [
"public",
"static",
"Intent",
"newMapsIntent",
"(",
"String",
"address",
",",
"String",
"placeTitle",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"\"geo:0,0?q=\"",
")",
";",
"String",
"addressEncoded",... | Intent that should allow opening a map showing the given address (if it exists)
@param address The address to search
@param placeTitle The title to show on the marker
@return the intent | [
"Intent",
"that",
"should",
"allow",
"opening",
"a",
"map",
"showing",
"the",
"given",
"address",
"(",
"if",
"it",
"exists",
")"
] | train | https://github.com/marvinlabs/android-intents/blob/33e79c825188b6a97601869522533cc825801f6e/library/src/main/java/com/marvinlabs/intents/GeoIntents.java#L37-L49 |
ManfredTremmel/gwt-commons-lang3 | src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java | FieldUtils.writeField | public static void writeField(final Field field, final Object target, final Object value, final boolean forceAccess)
throws IllegalAccessException {
"""
Writes a {@link Field}.
@param field
to write
@param target
the object to call on, may be {@code null} for {@code static} fields
@param value
... | java | public static void writeField(final Field field, final Object target, final Object value, final boolean forceAccess)
throws IllegalAccessException {
Validate.isTrue(field != null, "The field must not be null");
if (forceAccess && !field.isAccessible()) {
field.setAccessible(true)... | [
"public",
"static",
"void",
"writeField",
"(",
"final",
"Field",
"field",
",",
"final",
"Object",
"target",
",",
"final",
"Object",
"value",
",",
"final",
"boolean",
"forceAccess",
")",
"throws",
"IllegalAccessException",
"{",
"Validate",
".",
"isTrue",
"(",
"... | Writes a {@link Field}.
@param field
to write
@param target
the object to call on, may be {@code null} for {@code static} fields
@param value
to set
@param forceAccess
whether to break scope restrictions using the
{@link java.lang.reflect.AccessibleObject#setAccessible(boolean)} method. {@code false} will only
match {... | [
"Writes",
"a",
"{",
"@link",
"Field",
"}",
"."
] | train | https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java#L683-L692 |
haifengl/smile | math/src/main/java/smile/math/special/Gamma.java | Gamma.regularizedUpperIncompleteGamma | public static double regularizedUpperIncompleteGamma(double s, double x) {
"""
Regularized Upper/Complementary Incomplete Gamma Function
Q(s,x) = 1 - P(s,x) = 1 - <i><big>∫</big><sub><small>0</small></sub><sup><small>x</small></sup> e<sup>-t</sup> t<sup>(s-1)</sup> dt</i>
"""
if (s < 0.0) {
... | java | public static double regularizedUpperIncompleteGamma(double s, double x) {
if (s < 0.0) {
throw new IllegalArgumentException("Invalid s: " + s);
}
if (x < 0.0) {
throw new IllegalArgumentException("Invalid x: " + x);
}
double igf = 0.0;
if (x !=... | [
"public",
"static",
"double",
"regularizedUpperIncompleteGamma",
"(",
"double",
"s",
",",
"double",
"x",
")",
"{",
"if",
"(",
"s",
"<",
"0.0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid s: \"",
"+",
"s",
")",
";",
"}",
"if",
"(",... | Regularized Upper/Complementary Incomplete Gamma Function
Q(s,x) = 1 - P(s,x) = 1 - <i><big>∫</big><sub><small>0</small></sub><sup><small>x</small></sup> e<sup>-t</sup> t<sup>(s-1)</sup> dt</i> | [
"Regularized",
"Upper",
"/",
"Complementary",
"Incomplete",
"Gamma",
"Function",
"Q",
"(",
"s",
"x",
")",
"=",
"1",
"-",
"P",
"(",
"s",
"x",
")",
"=",
"1",
"-",
"<i",
">",
"<big",
">",
"∫",
";",
"<",
"/",
"big",
">",
"<sub",
">",
"<small",
... | train | https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/math/src/main/java/smile/math/special/Gamma.java#L148-L173 |
Netflix/eureka | eureka-core/src/main/java/com/netflix/eureka/aws/AwsAsgUtil.java | AwsAsgUtil.isASGEnabled | public boolean isASGEnabled(InstanceInfo instanceInfo) {
"""
Return the status of the ASG whether is enabled or disabled for service.
The value is picked up from the cache except the very first time.
@param instanceInfo the instanceInfo for the lookup
@return true if enabled, false otherwise
"""
C... | java | public boolean isASGEnabled(InstanceInfo instanceInfo) {
CacheKey cacheKey = new CacheKey(getAccountId(instanceInfo, accountId), instanceInfo.getASGName());
Boolean result = asgCache.getIfPresent(cacheKey);
if (result != null) {
return result;
} else {
if (!server... | [
"public",
"boolean",
"isASGEnabled",
"(",
"InstanceInfo",
"instanceInfo",
")",
"{",
"CacheKey",
"cacheKey",
"=",
"new",
"CacheKey",
"(",
"getAccountId",
"(",
"instanceInfo",
",",
"accountId",
")",
",",
"instanceInfo",
".",
"getASGName",
"(",
")",
")",
";",
"Bo... | Return the status of the ASG whether is enabled or disabled for service.
The value is picked up from the cache except the very first time.
@param instanceInfo the instanceInfo for the lookup
@return true if enabled, false otherwise | [
"Return",
"the",
"status",
"of",
"the",
"ASG",
"whether",
"is",
"enabled",
"or",
"disabled",
"for",
"service",
".",
"The",
"value",
"is",
"picked",
"up",
"from",
"the",
"cache",
"except",
"the",
"very",
"first",
"time",
"."
] | train | https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-core/src/main/java/com/netflix/eureka/aws/AwsAsgUtil.java#L162-L185 |
apache/flink | flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/util/InterpreterUtils.java | InterpreterUtils.deserializeFunction | @SuppressWarnings("unchecked")
public static <X> X deserializeFunction(RuntimeContext context, byte[] serFun) throws FlinkException {
"""
Deserialize the given python function. If the functions class definition cannot be found we assume that this is
the first invocation of this method for a given job and load th... | java | @SuppressWarnings("unchecked")
public static <X> X deserializeFunction(RuntimeContext context, byte[] serFun) throws FlinkException {
if (!jythonInitialized) {
// This branch is only tested by end-to-end tests
String path = context.getDistributedCache().getFile(PythonConstants.FLINK_PYTHON_DC_ID).getAbsolutePa... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"X",
">",
"X",
"deserializeFunction",
"(",
"RuntimeContext",
"context",
",",
"byte",
"[",
"]",
"serFun",
")",
"throws",
"FlinkException",
"{",
"if",
"(",
"!",
"jythonInitialized",
")"... | Deserialize the given python function. If the functions class definition cannot be found we assume that this is
the first invocation of this method for a given job and load the python script containing the class definition
via jython.
@param context the RuntimeContext of the java function
@param serFun serialized pyth... | [
"Deserialize",
"the",
"given",
"python",
"function",
".",
"If",
"the",
"functions",
"class",
"definition",
"cannot",
"be",
"found",
"we",
"assume",
"that",
"this",
"is",
"the",
"first",
"invocation",
"of",
"this",
"method",
"for",
"a",
"given",
"job",
"and",... | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/util/InterpreterUtils.java#L64-L95 |
Azure/azure-sdk-for-java | labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java | GlobalUsersInner.beginResetPasswordAsync | public Observable<Void> beginResetPasswordAsync(String userName, ResetPasswordPayload resetPasswordPayload) {
"""
Resets the user password on an environment This operation can take a while to complete.
@param userName The name of the user.
@param resetPasswordPayload Represents the payload for resetting passwo... | java | public Observable<Void> beginResetPasswordAsync(String userName, ResetPasswordPayload resetPasswordPayload) {
return beginResetPasswordWithServiceResponseAsync(userName, resetPasswordPayload).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> ... | [
"public",
"Observable",
"<",
"Void",
">",
"beginResetPasswordAsync",
"(",
"String",
"userName",
",",
"ResetPasswordPayload",
"resetPasswordPayload",
")",
"{",
"return",
"beginResetPasswordWithServiceResponseAsync",
"(",
"userName",
",",
"resetPasswordPayload",
")",
".",
"... | Resets the user password on an environment This operation can take a while to complete.
@param userName The name of the user.
@param resetPasswordPayload Represents the payload for resetting passwords.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the {@link ServiceResponse} object ... | [
"Resets",
"the",
"user",
"password",
"on",
"an",
"environment",
"This",
"operation",
"can",
"take",
"a",
"while",
"to",
"complete",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java#L1023-L1030 |
google/error-prone-javac | src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java | Operators.initOperators | @SafeVarargs
private final <O extends OperatorHelper> void initOperators(Map<Name, List<O>> opsMap, O... ops) {
"""
Complete the initialization of an operator helper by storing it into the corresponding operator map.
"""
for (O o : ops) {
Name opName = o.name;
List<O> helper... | java | @SafeVarargs
private final <O extends OperatorHelper> void initOperators(Map<Name, List<O>> opsMap, O... ops) {
for (O o : ops) {
Name opName = o.name;
List<O> helpers = opsMap.getOrDefault(opName, List.nil());
opsMap.put(opName, helpers.prepend(o));
}
} | [
"@",
"SafeVarargs",
"private",
"final",
"<",
"O",
"extends",
"OperatorHelper",
">",
"void",
"initOperators",
"(",
"Map",
"<",
"Name",
",",
"List",
"<",
"O",
">",
">",
"opsMap",
",",
"O",
"...",
"ops",
")",
"{",
"for",
"(",
"O",
"o",
":",
"ops",
")"... | Complete the initialization of an operator helper by storing it into the corresponding operator map. | [
"Complete",
"the",
"initialization",
"of",
"an",
"operator",
"helper",
"by",
"storing",
"it",
"into",
"the",
"corresponding",
"operator",
"map",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java#L818-L825 |
nikhaldi/android-view-selector | src/main/java/com/nikhaldimann/viewselector/ViewSelectorAssertions.java | ViewSelectorAssertions.assertThatSelection | public static ViewSelectionAssert assertThatSelection(String selector, Activity activity) {
"""
Fluent assertion entry point for a selection of views from the given activity
based on the given selector. It may be helpful to statically import this rather
than {@link #assertThat(ViewSelection)} to avoid conflicts ... | java | public static ViewSelectionAssert assertThatSelection(String selector, Activity activity) {
return assertThat(selection(selector, activity));
} | [
"public",
"static",
"ViewSelectionAssert",
"assertThatSelection",
"(",
"String",
"selector",
",",
"Activity",
"activity",
")",
"{",
"return",
"assertThat",
"(",
"selection",
"(",
"selector",
",",
"activity",
")",
")",
";",
"}"
] | Fluent assertion entry point for a selection of views from the given activity
based on the given selector. It may be helpful to statically import this rather
than {@link #assertThat(ViewSelection)} to avoid conflicts with other statically
imported {@code assertThat()} methods. | [
"Fluent",
"assertion",
"entry",
"point",
"for",
"a",
"selection",
"of",
"views",
"from",
"the",
"given",
"activity",
"based",
"on",
"the",
"given",
"selector",
".",
"It",
"may",
"be",
"helpful",
"to",
"statically",
"import",
"this",
"rather",
"than",
"{"
] | train | https://github.com/nikhaldi/android-view-selector/blob/d3e4bf05f6111d116c6b0c1a8c51396e8bfae9b5/src/main/java/com/nikhaldimann/viewselector/ViewSelectorAssertions.java#L53-L55 |
classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/json/JSONDeserializer.java | JSONDeserializer.deserializeToField | public static void deserializeToField(final Object containingObject, final String fieldName, final String json,
final ClassFieldCache classFieldCache) throws IllegalArgumentException {
"""
Deserialize JSON to a new object graph, with the root object of the specified expected type, and store the
root o... | java | public static void deserializeToField(final Object containingObject, final String fieldName, final String json,
final ClassFieldCache classFieldCache) throws IllegalArgumentException {
if (containingObject == null) {
throw new IllegalArgumentException("Cannot deserialize to a field of a ... | [
"public",
"static",
"void",
"deserializeToField",
"(",
"final",
"Object",
"containingObject",
",",
"final",
"String",
"fieldName",
",",
"final",
"String",
"json",
",",
"final",
"ClassFieldCache",
"classFieldCache",
")",
"throws",
"IllegalArgumentException",
"{",
"if",... | Deserialize JSON to a new object graph, with the root object of the specified expected type, and store the
root object in the named field of the given containing object. Works for generic types, since it is possible
to obtain the generic type of a field.
@param containingObject
The object containing the named field to... | [
"Deserialize",
"JSON",
"to",
"a",
"new",
"object",
"graph",
"with",
"the",
"root",
"object",
"of",
"the",
"specified",
"expected",
"type",
"and",
"store",
"the",
"root",
"object",
"in",
"the",
"named",
"field",
"of",
"the",
"given",
"containing",
"object",
... | train | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/json/JSONDeserializer.java#L712-L738 |
webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/jetty/servlet/WebApplicationHandler.java | WebApplicationHandler.addFilterServletMapping | public FilterHolder addFilterServletMapping(String servletName, String filterName, int dispatches) {
"""
Add a servlet filter mapping
@param servletName The name of the servlet to be filtered.
@param filterName The name of the filter.
@param dispatches An integer formed by the logical OR of FilterHolder.__REQUE... | java | public FilterHolder addFilterServletMapping(String servletName, String filterName, int dispatches)
{
FilterHolder holder= (FilterHolder)_filterMap.get(filterName);
if (holder == null)
throw new IllegalArgumentException("Unknown filter :" + filterName);
_servletFilterMap.add(servl... | [
"public",
"FilterHolder",
"addFilterServletMapping",
"(",
"String",
"servletName",
",",
"String",
"filterName",
",",
"int",
"dispatches",
")",
"{",
"FilterHolder",
"holder",
"=",
"(",
"FilterHolder",
")",
"_filterMap",
".",
"get",
"(",
"filterName",
")",
";",
"i... | Add a servlet filter mapping
@param servletName The name of the servlet to be filtered.
@param filterName The name of the filter.
@param dispatches An integer formed by the logical OR of FilterHolder.__REQUEST,
FilterHolder.__FORWARD,FilterHolder.__INCLUDE and/or FilterHolder.__ERROR.
@return The holder of the filter i... | [
"Add",
"a",
"servlet",
"filter",
"mapping"
] | train | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/jetty/servlet/WebApplicationHandler.java#L144-L151 |
cdapio/tigon | tigon-queue/src/main/java/co/cask/tigon/data/transaction/queue/inmemory/InMemoryQueueService.java | InMemoryQueueService.resetAllQueuesOrStreams | private void resetAllQueuesOrStreams(boolean clearStreams, @Nullable String prefix) {
"""
Drop either all streams or all queues.
@param clearStreams if true, drops all streams, if false, clears all queues.
@param prefix if non-null, drops only queues with a name that begins with this prefix.
"""
List<Str... | java | private void resetAllQueuesOrStreams(boolean clearStreams, @Nullable String prefix) {
List<String> toRemove = Lists.newArrayListWithCapacity(queues.size());
for (String queueName : queues.keySet()) {
if ((clearStreams && QueueName.isStream(queueName)) || (!clearStreams && QueueName.isQueue(queueName))) {
... | [
"private",
"void",
"resetAllQueuesOrStreams",
"(",
"boolean",
"clearStreams",
",",
"@",
"Nullable",
"String",
"prefix",
")",
"{",
"List",
"<",
"String",
">",
"toRemove",
"=",
"Lists",
".",
"newArrayListWithCapacity",
"(",
"queues",
".",
"size",
"(",
")",
")",
... | Drop either all streams or all queues.
@param clearStreams if true, drops all streams, if false, clears all queues.
@param prefix if non-null, drops only queues with a name that begins with this prefix. | [
"Drop",
"either",
"all",
"streams",
"or",
"all",
"queues",
"."
] | train | https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-queue/src/main/java/co/cask/tigon/data/transaction/queue/inmemory/InMemoryQueueService.java#L71-L83 |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeBooleanField | private void writeBooleanField(String fieldName, Object value) throws IOException {
"""
Write a boolean field to the JSON file.
@param fieldName field name
@param value field value
"""
boolean val = ((Boolean) value).booleanValue();
if (val)
{
m_writer.writeNameValuePair(fieldNam... | java | private void writeBooleanField(String fieldName, Object value) throws IOException
{
boolean val = ((Boolean) value).booleanValue();
if (val)
{
m_writer.writeNameValuePair(fieldName, val);
}
} | [
"private",
"void",
"writeBooleanField",
"(",
"String",
"fieldName",
",",
"Object",
"value",
")",
"throws",
"IOException",
"{",
"boolean",
"val",
"=",
"(",
"(",
"Boolean",
")",
"value",
")",
".",
"booleanValue",
"(",
")",
";",
"if",
"(",
"val",
")",
"{",
... | Write a boolean field to the JSON file.
@param fieldName field name
@param value field value | [
"Write",
"a",
"boolean",
"field",
"to",
"the",
"JSON",
"file",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L400-L407 |
kkopacz/agiso-tempel | templates/abstract-velocityDirectoryExtendEngine/src/main/java/org/agiso/tempel/engine/VelocityDirectoryExtendEngine.java | VelocityDirectoryExtendEngine.processVelocityResource | @Override
protected void processVelocityResource(ITemplateSource source, VelocityContext context, String target) throws Exception {
"""
Szablon może być pojedynczym plikiem (wówczas silnik działa tak jak silnik
{@link VelocityFileEngine}, lub katalogiem. W takiej sytuacji przetwarzane
są wszsytkie jego wpisy.
... | java | @Override
protected void processVelocityResource(ITemplateSource source, VelocityContext context, String target) throws Exception {
if(source.isFile()) {
super.processVelocityFile(source.getEntry(source.getResource()), context, target);
} else if(source.isDirectory()) {
for(ITemplateSourceEntry entry : sourc... | [
"@",
"Override",
"protected",
"void",
"processVelocityResource",
"(",
"ITemplateSource",
"source",
",",
"VelocityContext",
"context",
",",
"String",
"target",
")",
"throws",
"Exception",
"{",
"if",
"(",
"source",
".",
"isFile",
"(",
")",
")",
"{",
"super",
"."... | Szablon może być pojedynczym plikiem (wówczas silnik działa tak jak silnik
{@link VelocityFileEngine}, lub katalogiem. W takiej sytuacji przetwarzane
są wszsytkie jego wpisy. | [
"Szablon",
"może",
"być",
"pojedynczym",
"plikiem",
"(",
"wówczas",
"silnik",
"działa",
"tak",
"jak",
"silnik",
"{"
] | train | https://github.com/kkopacz/agiso-tempel/blob/ff7a96153153b6bc07212d776816b87d9538f6fa/templates/abstract-velocityDirectoryExtendEngine/src/main/java/org/agiso/tempel/engine/VelocityDirectoryExtendEngine.java#L44-L57 |
timols/java-gitlab-api | src/main/java/org/gitlab/api/GitlabAPI.java | GitlabAPI.editGroupBadge | public GitlabBadge editGroupBadge(Integer groupId, Integer badgeId, String linkUrl, String imageUrl) throws IOException {
"""
Edit group badge
@param groupId The id of the group for which the badge should be edited
@param badgeId The id of the badge that should be edited
@param linkUrl The URL that the bad... | java | public GitlabBadge editGroupBadge(Integer groupId, Integer badgeId, String linkUrl, String imageUrl) throws IOException {
String tailUrl = GitlabGroup.URL + "/" + groupId + GitlabBadge.URL
+ "/" + badgeId;
GitlabHTTPRequestor requestor = retrieve().method(PUT);
requestor.with("li... | [
"public",
"GitlabBadge",
"editGroupBadge",
"(",
"Integer",
"groupId",
",",
"Integer",
"badgeId",
",",
"String",
"linkUrl",
",",
"String",
"imageUrl",
")",
"throws",
"IOException",
"{",
"String",
"tailUrl",
"=",
"GitlabGroup",
".",
"URL",
"+",
"\"/\"",
"+",
"gr... | Edit group badge
@param groupId The id of the group for which the badge should be edited
@param badgeId The id of the badge that should be edited
@param linkUrl The URL that the badge should link to
@param imageUrl The URL to the badge image
@return The updated badge
@throws IOException on GitLab API call error | [
"Edit",
"group",
"badge"
] | train | https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L2729-L2736 |
micronaut-projects/micronaut-core | inject/src/main/java/io/micronaut/inject/annotation/DefaultAnnotationMetadata.java | DefaultAnnotationMetadata.mutateMember | @Internal
public static AnnotationMetadata mutateMember(
AnnotationMetadata annotationMetadata,
String annotationName,
String member,
Object value) {
"""
<p>Sets a member of the given {@link AnnotationMetadata} return a new annotation metadata instance without
mutating the exis... | java | @Internal
public static AnnotationMetadata mutateMember(
AnnotationMetadata annotationMetadata,
String annotationName,
String member,
Object value) {
return mutateMember(annotationMetadata, annotationName, Collections.singletonMap(member, value));
} | [
"@",
"Internal",
"public",
"static",
"AnnotationMetadata",
"mutateMember",
"(",
"AnnotationMetadata",
"annotationMetadata",
",",
"String",
"annotationName",
",",
"String",
"member",
",",
"Object",
"value",
")",
"{",
"return",
"mutateMember",
"(",
"annotationMetadata",
... | <p>Sets a member of the given {@link AnnotationMetadata} return a new annotation metadata instance without
mutating the existing.</p>
<p>WARNING: for internal use only be the framework</p>
@param annotationMetadata The metadata
@param annotationName The annotation name
@param member The member
@param ... | [
"<p",
">",
"Sets",
"a",
"member",
"of",
"the",
"given",
"{",
"@link",
"AnnotationMetadata",
"}",
"return",
"a",
"new",
"annotation",
"metadata",
"instance",
"without",
"mutating",
"the",
"existing",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/annotation/DefaultAnnotationMetadata.java#L918-L926 |
OpenLiberty/open-liberty | dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/DataModelSerializer.java | DataModelSerializer.getClassForFieldName | private static ClassAndMethod getClassForFieldName(String fieldName, Class<?> classToLookForFieldIn) {
"""
Gets a class for a JSON field name, by looking in a given Class for an appropriate setter.
The setter is assumed not to be a Collection.
@param fieldName the name to use to search for the getter.
@param ... | java | private static ClassAndMethod getClassForFieldName(String fieldName, Class<?> classToLookForFieldIn) {
return internalGetClassForFieldName(fieldName, classToLookForFieldIn, false);
} | [
"private",
"static",
"ClassAndMethod",
"getClassForFieldName",
"(",
"String",
"fieldName",
",",
"Class",
"<",
"?",
">",
"classToLookForFieldIn",
")",
"{",
"return",
"internalGetClassForFieldName",
"(",
"fieldName",
",",
"classToLookForFieldIn",
",",
"false",
")",
";",... | Gets a class for a JSON field name, by looking in a given Class for an appropriate setter.
The setter is assumed not to be a Collection.
@param fieldName the name to use to search for the getter.
@param classToLookForFieldIn the Class to search for the getter within.
@return instance of ClassAndMethod if one is found,... | [
"Gets",
"a",
"class",
"for",
"a",
"JSON",
"field",
"name",
"by",
"looking",
"in",
"a",
"given",
"Class",
"for",
"an",
"appropriate",
"setter",
".",
"The",
"setter",
"is",
"assumed",
"not",
"to",
"be",
"a",
"Collection",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/DataModelSerializer.java#L395-L397 |
Waikato/moa | moa/src/main/java/com/yahoo/labs/samoa/instances/SparseInstanceData.java | SparseInstanceData.setValue | @Override
public void setValue(int attributeIndex, double d) {
"""
Sets the value.
@param attributeIndex the attribute index
@param d the d
"""
int index = locateIndex(attributeIndex);
if (index(index) == attributeIndex) {
this.attributeValues[index] = d;
} else {
... | java | @Override
public void setValue(int attributeIndex, double d) {
int index = locateIndex(attributeIndex);
if (index(index) == attributeIndex) {
this.attributeValues[index] = d;
} else {
// We need to add the value
}
} | [
"@",
"Override",
"public",
"void",
"setValue",
"(",
"int",
"attributeIndex",
",",
"double",
"d",
")",
"{",
"int",
"index",
"=",
"locateIndex",
"(",
"attributeIndex",
")",
";",
"if",
"(",
"index",
"(",
"index",
")",
"==",
"attributeIndex",
")",
"{",
"this... | Sets the value.
@param attributeIndex the attribute index
@param d the d | [
"Sets",
"the",
"value",
"."
] | train | https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/com/yahoo/labs/samoa/instances/SparseInstanceData.java#L218-L226 |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/ZipUtils.java | ZipUtils.unzip | private static void unzip(final ZipFile zip, final File patchDir) throws IOException {
"""
unpack...
@param zip the zip
@param patchDir the patch dir
@throws IOException
"""
final Enumeration<? extends ZipEntry> entries = zip.entries();
while(entries.hasMoreElements()) {
final ... | java | private static void unzip(final ZipFile zip, final File patchDir) throws IOException {
final Enumeration<? extends ZipEntry> entries = zip.entries();
while(entries.hasMoreElements()) {
final ZipEntry entry = entries.nextElement();
final String name = entry.getName();
... | [
"private",
"static",
"void",
"unzip",
"(",
"final",
"ZipFile",
"zip",
",",
"final",
"File",
"patchDir",
")",
"throws",
"IOException",
"{",
"final",
"Enumeration",
"<",
"?",
"extends",
"ZipEntry",
">",
"entries",
"=",
"zip",
".",
"entries",
"(",
")",
";",
... | unpack...
@param zip the zip
@param patchDir the patch dir
@throws IOException | [
"unpack",
"..."
] | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/ZipUtils.java#L113-L131 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/LocalNetworkGatewaysInner.java | LocalNetworkGatewaysInner.beginUpdateTags | public LocalNetworkGatewayInner beginUpdateTags(String resourceGroupName, String localNetworkGatewayName, Map<String, String> tags) {
"""
Updates a local network gateway tags.
@param resourceGroupName The name of the resource group.
@param localNetworkGatewayName The name of the local network gateway.
@param ... | java | public LocalNetworkGatewayInner beginUpdateTags(String resourceGroupName, String localNetworkGatewayName, Map<String, String> tags) {
return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).toBlocking().single().body();
} | [
"public",
"LocalNetworkGatewayInner",
"beginUpdateTags",
"(",
"String",
"resourceGroupName",
",",
"String",
"localNetworkGatewayName",
",",
"Map",
"<",
"String",
",",
"String",
">",
"tags",
")",
"{",
"return",
"beginUpdateTagsWithServiceResponseAsync",
"(",
"resourceGroup... | Updates a local network gateway tags.
@param resourceGroupName The name of the resource group.
@param localNetworkGatewayName The name of the local network gateway.
@param tags Resource tags.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejec... | [
"Updates",
"a",
"local",
"network",
"gateway",
"tags",
"."
] | train | 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/LocalNetworkGatewaysInner.java#L744-L746 |
Ordinastie/MalisisCore | src/main/java/net/malisis/core/inventory/MalisisInventoryContainer.java | MalisisInventoryContainer.handleNormalClick | private ItemStack handleNormalClick(MalisisSlot slot, boolean fullStack) {
"""
Handles the normal left or right click.
@param slot the slot
@param fullStack the full stack
@return the item stack
"""
if (!getPickedItemStack().isEmpty() && !slot.isItemValid(pickedItemStack))
return getPickedItemStack()... | java | private ItemStack handleNormalClick(MalisisSlot slot, boolean fullStack)
{
if (!getPickedItemStack().isEmpty() && !slot.isItemValid(pickedItemStack))
return getPickedItemStack();
// already picked up an itemStack, insert/swap itemStack
if (!getPickedItemStack().isEmpty())
{
if (slot.isState(PLAYER_INSER... | [
"private",
"ItemStack",
"handleNormalClick",
"(",
"MalisisSlot",
"slot",
",",
"boolean",
"fullStack",
")",
"{",
"if",
"(",
"!",
"getPickedItemStack",
"(",
")",
".",
"isEmpty",
"(",
")",
"&&",
"!",
"slot",
".",
"isItemValid",
"(",
"pickedItemStack",
")",
")",... | Handles the normal left or right click.
@param slot the slot
@param fullStack the full stack
@return the item stack | [
"Handles",
"the",
"normal",
"left",
"or",
"right",
"click",
"."
] | train | https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/inventory/MalisisInventoryContainer.java#L459-L475 |
iig-uni-freiburg/SEWOL | ext/org/deckfour/xes/out/XMxmlSerializer.java | XMxmlSerializer.addModelReference | protected void addModelReference(XAttributable object, SXTag target)
throws IOException {
"""
Helper method, adds all model references of an attributable to the given
tag.
@param object
Attributable element.
@param target
Tag to add model references to.
"""
XAttributeLiteral modelRefAttr = (XAttrib... | java | protected void addModelReference(XAttributable object, SXTag target)
throws IOException {
XAttributeLiteral modelRefAttr = (XAttributeLiteral) object
.getAttributes().get(XSemanticExtension.KEY_MODELREFERENCE);
if (modelRefAttr != null) {
target.addAttribute("modelReference", modelRefAttr.getValue());
}... | [
"protected",
"void",
"addModelReference",
"(",
"XAttributable",
"object",
",",
"SXTag",
"target",
")",
"throws",
"IOException",
"{",
"XAttributeLiteral",
"modelRefAttr",
"=",
"(",
"XAttributeLiteral",
")",
"object",
".",
"getAttributes",
"(",
")",
".",
"get",
"(",... | Helper method, adds all model references of an attributable to the given
tag.
@param object
Attributable element.
@param target
Tag to add model references to. | [
"Helper",
"method",
"adds",
"all",
"model",
"references",
"of",
"an",
"attributable",
"to",
"the",
"given",
"tag",
"."
] | train | https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/out/XMxmlSerializer.java#L296-L303 |
Impetus/Kundera | src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/CQLTranslator.java | CQLTranslator.buildOrderByClause | public void buildOrderByClause(StringBuilder builder, String field, Object orderType, boolean useToken) {
"""
Builds the order by clause.
@param builder
the builder
@param field
the field
@param orderType
the order type
@param useToken
the use token
"""
builder.append(SPACE_STRING);
b... | java | public void buildOrderByClause(StringBuilder builder, String field, Object orderType, boolean useToken)
{
builder.append(SPACE_STRING);
builder.append(SORT_CLAUSE);
builder = ensureCase(builder, field, useToken);
builder.append(SPACE_STRING);
builder.append(orderType);
} | [
"public",
"void",
"buildOrderByClause",
"(",
"StringBuilder",
"builder",
",",
"String",
"field",
",",
"Object",
"orderType",
",",
"boolean",
"useToken",
")",
"{",
"builder",
".",
"append",
"(",
"SPACE_STRING",
")",
";",
"builder",
".",
"append",
"(",
"SORT_CLA... | Builds the order by clause.
@param builder
the builder
@param field
the field
@param orderType
the order type
@param useToken
the use token | [
"Builds",
"the",
"order",
"by",
"clause",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/CQLTranslator.java#L1488-L1495 |
bitcoinj/bitcoinj | core/src/main/java/org/bitcoinj/core/PeerGroup.java | PeerGroup.addConnectedEventListener | public void addConnectedEventListener(Executor executor, PeerConnectedEventListener listener) {
"""
<p>Adds a listener that will be notified on the given executor when
new peers are connected to.</p>
"""
peerConnectedEventListeners.add(new ListenerRegistration<>(checkNotNull(listener), executor));
... | java | public void addConnectedEventListener(Executor executor, PeerConnectedEventListener listener) {
peerConnectedEventListeners.add(new ListenerRegistration<>(checkNotNull(listener), executor));
for (Peer peer : getConnectedPeers())
peer.addConnectedEventListener(executor, listener);
for... | [
"public",
"void",
"addConnectedEventListener",
"(",
"Executor",
"executor",
",",
"PeerConnectedEventListener",
"listener",
")",
"{",
"peerConnectedEventListeners",
".",
"add",
"(",
"new",
"ListenerRegistration",
"<>",
"(",
"checkNotNull",
"(",
"listener",
")",
",",
"e... | <p>Adds a listener that will be notified on the given executor when
new peers are connected to.</p> | [
"<p",
">",
"Adds",
"a",
"listener",
"that",
"will",
"be",
"notified",
"on",
"the",
"given",
"executor",
"when",
"new",
"peers",
"are",
"connected",
"to",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/PeerGroup.java#L673-L679 |
opsmatters/opsmatters-core | src/main/java/com/opsmatters/core/util/StringUtilities.java | StringUtilities.getOccurrenceCount | public static int getOccurrenceCount(String expr, String str) {
"""
Returns the number of occurrences of the substring in the given string.
@param expr The string to look for occurrences of
@param str The string to search
@return The number of occurences
"""
int ret = 0;
Pattern p = Pattern.... | java | public static int getOccurrenceCount(String expr, String str)
{
int ret = 0;
Pattern p = Pattern.compile(expr);
Matcher m = p.matcher(str);
while(m.find())
++ret;
return ret;
} | [
"public",
"static",
"int",
"getOccurrenceCount",
"(",
"String",
"expr",
",",
"String",
"str",
")",
"{",
"int",
"ret",
"=",
"0",
";",
"Pattern",
"p",
"=",
"Pattern",
".",
"compile",
"(",
"expr",
")",
";",
"Matcher",
"m",
"=",
"p",
".",
"matcher",
"(",... | Returns the number of occurrences of the substring in the given string.
@param expr The string to look for occurrences of
@param str The string to search
@return The number of occurences | [
"Returns",
"the",
"number",
"of",
"occurrences",
"of",
"the",
"substring",
"in",
"the",
"given",
"string",
"."
] | train | https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/util/StringUtilities.java#L301-L309 |
audit4j/audit4j-core | src/main/java/org/audit4j/core/annotation/DeIdentifyUtil.java | DeIdentifyUtil.deidentifyRight | public static String deidentifyRight(String str, int size) {
"""
Deidentify right.
@param str the str
@param size the size
@return the string
@since 2.0.0
"""
int end = str.length();
int repeat;
if (size > str.length()) {
repeat = str.length();
} else {
repeat = size;
}
return StringU... | java | public static String deidentifyRight(String str, int size) {
int end = str.length();
int repeat;
if (size > str.length()) {
repeat = str.length();
} else {
repeat = size;
}
return StringUtils.overlay(str, StringUtils.repeat('*', repeat), end - size, end);
} | [
"public",
"static",
"String",
"deidentifyRight",
"(",
"String",
"str",
",",
"int",
"size",
")",
"{",
"int",
"end",
"=",
"str",
".",
"length",
"(",
")",
";",
"int",
"repeat",
";",
"if",
"(",
"size",
">",
"str",
".",
"length",
"(",
")",
")",
"{",
"... | Deidentify right.
@param str the str
@param size the size
@return the string
@since 2.0.0 | [
"Deidentify",
"right",
"."
] | train | https://github.com/audit4j/audit4j-core/blob/dc8569108851e64cb0ecc7a39048db0ad070fba2/src/main/java/org/audit4j/core/annotation/DeIdentifyUtil.java#L68-L77 |
phax/ph-oton | ph-oton-uicore/src/main/java/com/helger/photon/uicore/html/swf/HCSWFObject.java | HCSWFObject.addFlashVar | @Nonnull
public final HCSWFObject addFlashVar (@Nonnull final String sName, final Object aValue) {
"""
Add a parameter to be passed to the Flash object
@param sName
Parameter name
@param aValue
Parameter value
@return this
"""
if (!JSMarshaller.isJSIdentifier (sName))
throw new IllegalArgume... | java | @Nonnull
public final HCSWFObject addFlashVar (@Nonnull final String sName, final Object aValue)
{
if (!JSMarshaller.isJSIdentifier (sName))
throw new IllegalArgumentException ("The name '" + sName + "' is not a legal JS identifier!");
if (m_aFlashVars == null)
m_aFlashVars = new CommonsLinkedH... | [
"@",
"Nonnull",
"public",
"final",
"HCSWFObject",
"addFlashVar",
"(",
"@",
"Nonnull",
"final",
"String",
"sName",
",",
"final",
"Object",
"aValue",
")",
"{",
"if",
"(",
"!",
"JSMarshaller",
".",
"isJSIdentifier",
"(",
"sName",
")",
")",
"throw",
"new",
"Il... | Add a parameter to be passed to the Flash object
@param sName
Parameter name
@param aValue
Parameter value
@return this | [
"Add",
"a",
"parameter",
"to",
"be",
"passed",
"to",
"the",
"Flash",
"object"
] | train | https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-uicore/src/main/java/com/helger/photon/uicore/html/swf/HCSWFObject.java#L168-L178 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X400Address.java | X400Address.constrains | public int constrains(GeneralNameInterface inputName) throws UnsupportedOperationException {
"""
Return type of constraint inputName places on this name:<ul>
<li>NAME_DIFF_TYPE = -1: input name is different type from name (i.e. does not constrain).
<li>NAME_MATCH = 0: input name matches name.
<li>NAME_NARROWS =... | java | public int constrains(GeneralNameInterface inputName) throws UnsupportedOperationException {
int constraintType;
if (inputName == null)
constraintType = NAME_DIFF_TYPE;
else if (inputName.getType() != NAME_X400)
constraintType = NAME_DIFF_TYPE;
else
//... | [
"public",
"int",
"constrains",
"(",
"GeneralNameInterface",
"inputName",
")",
"throws",
"UnsupportedOperationException",
"{",
"int",
"constraintType",
";",
"if",
"(",
"inputName",
"==",
"null",
")",
"constraintType",
"=",
"NAME_DIFF_TYPE",
";",
"else",
"if",
"(",
... | Return type of constraint inputName places on this name:<ul>
<li>NAME_DIFF_TYPE = -1: input name is different type from name (i.e. does not constrain).
<li>NAME_MATCH = 0: input name matches name.
<li>NAME_NARROWS = 1: input name narrows name (is lower in the naming subtree)
<li>NAME_WIDENS = 2: input name widens name ... | [
"Return",
"type",
"of",
"constraint",
"inputName",
"places",
"on",
"this",
"name",
":",
"<ul",
">",
"<li",
">",
"NAME_DIFF_TYPE",
"=",
"-",
"1",
":",
"input",
"name",
"is",
"different",
"type",
"from",
"name",
"(",
"i",
".",
"e",
".",
"does",
"not",
... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X400Address.java#L399-L409 |
orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveRepeatedPoints.java | ST_RemoveRepeatedPoints.removeDuplicateCoordinates | public static Polygon removeDuplicateCoordinates(Polygon polygon, double tolerance) throws SQLException {
"""
Removes duplicated coordinates within a Polygon.
@param polygon the input polygon
@param tolerance to delete the coordinates
@return
@throws java.sql.SQLException
"""
Coordinate[] shellCo... | java | public static Polygon removeDuplicateCoordinates(Polygon polygon, double tolerance) throws SQLException {
Coordinate[] shellCoords = CoordinateUtils.removeRepeatedCoordinates(polygon.getExteriorRing().getCoordinates(),tolerance,true);
LinearRing shell = FACTORY.createLinearRing(shellCoords);
Arr... | [
"public",
"static",
"Polygon",
"removeDuplicateCoordinates",
"(",
"Polygon",
"polygon",
",",
"double",
"tolerance",
")",
"throws",
"SQLException",
"{",
"Coordinate",
"[",
"]",
"shellCoords",
"=",
"CoordinateUtils",
".",
"removeRepeatedCoordinates",
"(",
"polygon",
"."... | Removes duplicated coordinates within a Polygon.
@param polygon the input polygon
@param tolerance to delete the coordinates
@return
@throws java.sql.SQLException | [
"Removes",
"duplicated",
"coordinates",
"within",
"a",
"Polygon",
"."
] | train | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_RemoveRepeatedPoints.java#L157-L169 |
OpenLiberty/open-liberty | dev/com.ibm.ws.session/src/com/ibm/ws/session/StoreCallback.java | StoreCallback.sessionLastAccessTimeSet | public void sessionLastAccessTimeSet(ISession session, long old, long newaccess) {
"""
Method sessionLastAccessTimeSet
<p>
@param session
@param old
@param newaccess
@see com.ibm.wsspi.session.IStoreCallback#sessionLastAccessTimeSet(com.ibm.wsspi.session.ISession, long, long)
"""
_sessionStateEv... | java | public void sessionLastAccessTimeSet(ISession session, long old, long newaccess) {
_sessionStateEventDispatcher.sessionLastAccessTimeSet(session, old, newaccess);
} | [
"public",
"void",
"sessionLastAccessTimeSet",
"(",
"ISession",
"session",
",",
"long",
"old",
",",
"long",
"newaccess",
")",
"{",
"_sessionStateEventDispatcher",
".",
"sessionLastAccessTimeSet",
"(",
"session",
",",
"old",
",",
"newaccess",
")",
";",
"}"
] | Method sessionLastAccessTimeSet
<p>
@param session
@param old
@param newaccess
@see com.ibm.wsspi.session.IStoreCallback#sessionLastAccessTimeSet(com.ibm.wsspi.session.ISession, long, long) | [
"Method",
"sessionLastAccessTimeSet",
"<p",
">"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.session/src/com/ibm/ws/session/StoreCallback.java#L224-L227 |
pravega/pravega | segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/SegmentAggregator.java | SegmentAggregator.mergeIfNecessary | private CompletableFuture<WriterFlushResult> mergeIfNecessary(WriterFlushResult flushResult, TimeoutTimer timer) {
"""
Executes a merger of a Transaction StreamSegment into this one.
Conditions for merger:
<ul>
<li> This StreamSegment is stand-alone (not a Transaction).
<li> The next outstanding operation is a... | java | private CompletableFuture<WriterFlushResult> mergeIfNecessary(WriterFlushResult flushResult, TimeoutTimer timer) {
ensureInitializedAndNotClosed();
long traceId = LoggerHelpers.traceEnterWithContext(log, this.traceObjectId, "mergeIfNecessary");
StorageOperation first = this.operations.getFirst(... | [
"private",
"CompletableFuture",
"<",
"WriterFlushResult",
">",
"mergeIfNecessary",
"(",
"WriterFlushResult",
"flushResult",
",",
"TimeoutTimer",
"timer",
")",
"{",
"ensureInitializedAndNotClosed",
"(",
")",
";",
"long",
"traceId",
"=",
"LoggerHelpers",
".",
"traceEnterW... | Executes a merger of a Transaction StreamSegment into this one.
Conditions for merger:
<ul>
<li> This StreamSegment is stand-alone (not a Transaction).
<li> The next outstanding operation is a MergeSegmentOperation for a Transaction StreamSegment of this StreamSegment.
<li> The StreamSegment to merge is not deleted, it... | [
"Executes",
"a",
"merger",
"of",
"a",
"Transaction",
"StreamSegment",
"into",
"this",
"one",
".",
"Conditions",
"for",
"merger",
":",
"<ul",
">",
"<li",
">",
"This",
"StreamSegment",
"is",
"stand",
"-",
"alone",
"(",
"not",
"a",
"Transaction",
")",
".",
... | train | https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/SegmentAggregator.java#L861-L880 |
SimiaCryptus/utilities | java-util/src/main/java/com/simiacryptus/util/Util.java | Util.pathTo | public static String pathTo(@javax.annotation.Nonnull final File from, @javax.annotation.Nonnull final File to) {
"""
Path to string.
@param from the from
@param to the to
@return the string
"""
return from.toPath().relativize(to.toPath()).toString().replaceAll("\\\\", "/");
} | java | public static String pathTo(@javax.annotation.Nonnull final File from, @javax.annotation.Nonnull final File to) {
return from.toPath().relativize(to.toPath()).toString().replaceAll("\\\\", "/");
} | [
"public",
"static",
"String",
"pathTo",
"(",
"@",
"javax",
".",
"annotation",
".",
"Nonnull",
"final",
"File",
"from",
",",
"@",
"javax",
".",
"annotation",
".",
"Nonnull",
"final",
"File",
"to",
")",
"{",
"return",
"from",
".",
"toPath",
"(",
")",
"."... | Path to string.
@param from the from
@param to the to
@return the string | [
"Path",
"to",
"string",
"."
] | train | https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/util/Util.java#L356-L358 |
trellis-ldp/trellis | core/http/src/main/java/org/trellisldp/http/impl/HttpUtils.java | HttpUtils.checkIfUnmodifiedSince | public static void checkIfUnmodifiedSince(final String ifUnmodifiedSince, final Instant modified) {
"""
Check for a conditional operation.
@param ifUnmodifiedSince the If-Unmodified-Since header
@param modified the resource modification date
"""
final Instant time = parseDate(ifUnmodifiedSince);
... | java | public static void checkIfUnmodifiedSince(final String ifUnmodifiedSince, final Instant modified) {
final Instant time = parseDate(ifUnmodifiedSince);
if (time != null && modified.truncatedTo(SECONDS).isAfter(time)) {
throw new ClientErrorException(status(PRECONDITION_FAILED).build());
... | [
"public",
"static",
"void",
"checkIfUnmodifiedSince",
"(",
"final",
"String",
"ifUnmodifiedSince",
",",
"final",
"Instant",
"modified",
")",
"{",
"final",
"Instant",
"time",
"=",
"parseDate",
"(",
"ifUnmodifiedSince",
")",
";",
"if",
"(",
"time",
"!=",
"null",
... | Check for a conditional operation.
@param ifUnmodifiedSince the If-Unmodified-Since header
@param modified the resource modification date | [
"Check",
"for",
"a",
"conditional",
"operation",
"."
] | train | https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/core/http/src/main/java/org/trellisldp/http/impl/HttpUtils.java#L324-L329 |
grycap/coreutils | coreutils-fiber/src/main/java/es/upv/grycap/coreutils/fiber/http/Http2Client.java | Http2Client.asyncGet | public void asyncGet(final String url, final @Nullable List<String> acceptableMediaTypes, final boolean nocache, final Callback callback) {
"""
Retrieve information from a server via a HTTP GET request.
@param url - URL target of this request
@param acceptableMediaTypes - Content-Types that are acceptable for th... | java | public void asyncGet(final String url, final @Nullable List<String> acceptableMediaTypes, final boolean nocache, final Callback callback) {
final String url2 = requireNonNull(trimToNull(url), "A non-empty URL expected");
requireNonNull(callback, "A valid callback expected");
// configure cache
final CacheContro... | [
"public",
"void",
"asyncGet",
"(",
"final",
"String",
"url",
",",
"final",
"@",
"Nullable",
"List",
"<",
"String",
">",
"acceptableMediaTypes",
",",
"final",
"boolean",
"nocache",
",",
"final",
"Callback",
"callback",
")",
"{",
"final",
"String",
"url2",
"="... | Retrieve information from a server via a HTTP GET request.
@param url - URL target of this request
@param acceptableMediaTypes - Content-Types that are acceptable for this request
@param nocache - don't accept an invalidated cached response, and don't store the server's response in any cache
@param callback - is called... | [
"Retrieve",
"information",
"from",
"a",
"server",
"via",
"a",
"HTTP",
"GET",
"request",
"."
] | train | https://github.com/grycap/coreutils/blob/e6db61dc50b49ea7276c0c29c7401204681a10c2/coreutils-fiber/src/main/java/es/upv/grycap/coreutils/fiber/http/Http2Client.java#L93-L105 |
astrapi69/jaulp-wicket | jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/labeled/label/LabeledEnumLabelPanel.java | LabeledEnumLabelPanel.newEnumLabel | @SuppressWarnings( {
"""
Factory method for create a new {@link EnumLabel}. This method is invoked in the constructor
from the derived classes and can be overridden so users can provide their own version of a
new {@link EnumLabel}.
@param id
the id
@param model
the model of the label
@return the new {@lin... | java | @SuppressWarnings({ "rawtypes", "unchecked" })
protected EnumLabel newEnumLabel(final String id, final IModel<T> model)
{
final IModel viewableLabelModel = new PropertyModel(model.getObject(), this.getId());
return ComponentFactory.newEnumLabel(id, viewableLabelModel);
} | [
"@",
"SuppressWarnings",
"(",
"{",
"\"rawtypes\"",
",",
"\"unchecked\"",
"}",
")",
"protected",
"EnumLabel",
"newEnumLabel",
"(",
"final",
"String",
"id",
",",
"final",
"IModel",
"<",
"T",
">",
"model",
")",
"{",
"final",
"IModel",
"viewableLabelModel",
"=",
... | Factory method for create a new {@link EnumLabel}. This method is invoked in the constructor
from the derived classes and can be overridden so users can provide their own version of a
new {@link EnumLabel}.
@param id
the id
@param model
the model of the label
@return the new {@link EnumLabel}. | [
"Factory",
"method",
"for",
"create",
"a",
"new",
"{",
"@link",
"EnumLabel",
"}",
".",
"This",
"method",
"is",
"invoked",
"in",
"the",
"constructor",
"from",
"the",
"derived",
"classes",
"and",
"can",
"be",
"overridden",
"so",
"users",
"can",
"provide",
"t... | train | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/labeled/label/LabeledEnumLabelPanel.java#L80-L85 |
OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/osgi/container/config/WebAppConfigurator.java | WebAppConfigurator.configureWebAppHelperFactory | public void configureWebAppHelperFactory(WebAppConfiguratorHelperFactory webAppConfiguratorHelperFactory, ResourceRefConfigFactory resourceRefConfigFactory) {
"""
Configure the WebApp helper factory
@param webAppConfiguratorHelperFactory The factory to be used
@param resourceRefConfigFactory
"""
webA... | java | public void configureWebAppHelperFactory(WebAppConfiguratorHelperFactory webAppConfiguratorHelperFactory, ResourceRefConfigFactory resourceRefConfigFactory) {
webAppHelper = webAppConfiguratorHelperFactory.createWebAppConfiguratorHelper(this, resourceRefConfigFactory, getListenerInterfaces());
t... | [
"public",
"void",
"configureWebAppHelperFactory",
"(",
"WebAppConfiguratorHelperFactory",
"webAppConfiguratorHelperFactory",
",",
"ResourceRefConfigFactory",
"resourceRefConfigFactory",
")",
"{",
"webAppHelper",
"=",
"webAppConfiguratorHelperFactory",
".",
"createWebAppConfiguratorHelp... | Configure the WebApp helper factory
@param webAppConfiguratorHelperFactory The factory to be used
@param resourceRefConfigFactory | [
"Configure",
"the",
"WebApp",
"helper",
"factory"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/osgi/container/config/WebAppConfigurator.java#L217-L220 |
lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/IntegralImageOps.java | IntegralImageOps.convolveSparse | public static int convolveSparse(GrayS32 integral , IntegralKernel kernel , int x , int y ) {
"""
Convolves a kernel around a single point in the integral image.
@param integral Input integral image. Not modified.
@param kernel Convolution kernel.
@param x Pixel the convolution is performed at.
@param y Pixe... | java | public static int convolveSparse(GrayS32 integral , IntegralKernel kernel , int x , int y )
{
return ImplIntegralImageOps.convolveSparse(integral, kernel, x, y);
} | [
"public",
"static",
"int",
"convolveSparse",
"(",
"GrayS32",
"integral",
",",
"IntegralKernel",
"kernel",
",",
"int",
"x",
",",
"int",
"y",
")",
"{",
"return",
"ImplIntegralImageOps",
".",
"convolveSparse",
"(",
"integral",
",",
"kernel",
",",
"x",
",",
"y",... | Convolves a kernel around a single point in the integral image.
@param integral Input integral image. Not modified.
@param kernel Convolution kernel.
@param x Pixel the convolution is performed at.
@param y Pixel the convolution is performed at.
@return Value of the convolution | [
"Convolves",
"a",
"kernel",
"around",
"a",
"single",
"point",
"in",
"the",
"integral",
"image",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/IntegralImageOps.java#L340-L343 |
Azure/azure-sdk-for-java | mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/ServersInner.java | ServersInner.beginCreate | public ServerInner beginCreate(String resourceGroupName, String serverName, ServerForCreate parameters) {
"""
Creates a new server or updates an existing server. The update action will overwrite the existing server.
@param resourceGroupName The name of the resource group that contains the resource. You can obta... | java | public ServerInner beginCreate(String resourceGroupName, String serverName, ServerForCreate parameters) {
return beginCreateWithServiceResponseAsync(resourceGroupName, serverName, parameters).toBlocking().single().body();
} | [
"public",
"ServerInner",
"beginCreate",
"(",
"String",
"resourceGroupName",
",",
"String",
"serverName",
",",
"ServerForCreate",
"parameters",
")",
"{",
"return",
"beginCreateWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"serverName",
",",
"parameters",
")",
... | Creates a new server or updates an existing server. The update action will overwrite the existing server.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param serverName The name of the server.
@param par... | [
"Creates",
"a",
"new",
"server",
"or",
"updates",
"an",
"existing",
"server",
".",
"The",
"update",
"action",
"will",
"overwrite",
"the",
"existing",
"server",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/ServersInner.java#L193-L195 |
wcm-io/wcm-io-handler | commons/src/main/java/io/wcm/handler/commons/dom/HtmlElement.java | HtmlElement.setData | public final T setData(String attributeName, String value) {
"""
Custom Html5 "data-*" attribute.
@param attributeName Name of HTML5 data attribute (without the 'data-' prefix).
@param value Value of attribute
@return Self reference
"""
setAttribute(ATTRIBUTE_DATA_PREFIX + attributeName, value);
ret... | java | public final T setData(String attributeName, String value) {
setAttribute(ATTRIBUTE_DATA_PREFIX + attributeName, value);
return (T)this;
} | [
"public",
"final",
"T",
"setData",
"(",
"String",
"attributeName",
",",
"String",
"value",
")",
"{",
"setAttribute",
"(",
"ATTRIBUTE_DATA_PREFIX",
"+",
"attributeName",
",",
"value",
")",
";",
"return",
"(",
"T",
")",
"this",
";",
"}"
] | Custom Html5 "data-*" attribute.
@param attributeName Name of HTML5 data attribute (without the 'data-' prefix).
@param value Value of attribute
@return Self reference | [
"Custom",
"Html5",
"data",
"-",
"*",
"attribute",
"."
] | train | https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/commons/src/main/java/io/wcm/handler/commons/dom/HtmlElement.java#L246-L249 |
lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/splitmerge/SplitMergeLineFitLoop.java | SplitMergeLineFitLoop.splitPixels | protected void splitPixels(int indexStart, int length) {
"""
Recursively splits pixels between indexStart to indexStart+length. A split happens if there is a pixel
more than the desired distance away from the two end points. Results are placed into 'splits'
"""
// too short to split
if( length < minimumS... | java | protected void splitPixels(int indexStart, int length) {
// too short to split
if( length < minimumSideLengthPixel)
return;
// end points of the line
int indexEnd = (indexStart+length)%N;
int splitOffset = selectSplitOffset(indexStart,length);
if( splitOffset >= 0 ) {
// System.out.println(" splitt... | [
"protected",
"void",
"splitPixels",
"(",
"int",
"indexStart",
",",
"int",
"length",
")",
"{",
"// too short to split",
"if",
"(",
"length",
"<",
"minimumSideLengthPixel",
")",
"return",
";",
"// end points of the line",
"int",
"indexEnd",
"=",
"(",
"indexStart",
"... | Recursively splits pixels between indexStart to indexStart+length. A split happens if there is a pixel
more than the desired distance away from the two end points. Results are placed into 'splits' | [
"Recursively",
"splits",
"pixels",
"between",
"indexStart",
"to",
"indexStart",
"+",
"length",
".",
"A",
"split",
"happens",
"if",
"there",
"is",
"a",
"pixel",
"more",
"than",
"the",
"desired",
"distance",
"away",
"from",
"the",
"two",
"end",
"points",
".",
... | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/splitmerge/SplitMergeLineFitLoop.java#L98-L115 |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java | PathManagerService.addPathEntry | final PathEntry addPathEntry(final String pathName, final String path, final String relativeTo, final boolean readOnly) {
"""
Adds an entry for a path and sends an {@link org.jboss.as.controller.services.path.PathManager.Event#ADDED}
notification to any registered {@linkplain org.jboss.as.controller.services.path... | java | final PathEntry addPathEntry(final String pathName, final String path, final String relativeTo, final boolean readOnly) {
PathEntry pathEntry;
synchronized (pathEntries) {
if (pathEntries.containsKey(pathName)) {
throw ControllerLogger.ROOT_LOGGER.pathEntryAlreadyExists(pathN... | [
"final",
"PathEntry",
"addPathEntry",
"(",
"final",
"String",
"pathName",
",",
"final",
"String",
"path",
",",
"final",
"String",
"relativeTo",
",",
"final",
"boolean",
"readOnly",
")",
"{",
"PathEntry",
"pathEntry",
";",
"synchronized",
"(",
"pathEntries",
")",... | Adds an entry for a path and sends an {@link org.jboss.as.controller.services.path.PathManager.Event#ADDED}
notification to any registered {@linkplain org.jboss.as.controller.services.path.PathManager.Callback callbacks}.
@param pathName the logical name of the path within the model. Cannot be {@code null}
@param path... | [
"Adds",
"an",
"entry",
"for",
"a",
"path",
"and",
"sends",
"an",
"{",
"@link",
"org",
".",
"jboss",
".",
"as",
".",
"controller",
".",
"services",
".",
"path",
".",
"PathManager",
".",
"Event#ADDED",
"}",
"notification",
"to",
"any",
"registered",
"{",
... | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java#L295-L310 |
alkacon/opencms-core | src/org/opencms/lock/CmsLockManager.java | CmsLockManager.removeResourcesInProject | public void removeResourcesInProject(CmsUUID projectId, boolean removeSystemLocks) {
"""
Removes all resources locked in a project.<p>
@param projectId the ID of the project where the resources have been locked
@param removeSystemLocks if <code>true</code>, also system locks are removed
"""
Iterat... | java | public void removeResourcesInProject(CmsUUID projectId, boolean removeSystemLocks) {
Iterator<CmsLock> itLocks = OpenCms.getMemoryMonitor().getAllCachedLocks().iterator();
while (itLocks.hasNext()) {
CmsLock currentLock = itLocks.next();
if (removeSystemLocks && currentLock.getS... | [
"public",
"void",
"removeResourcesInProject",
"(",
"CmsUUID",
"projectId",
",",
"boolean",
"removeSystemLocks",
")",
"{",
"Iterator",
"<",
"CmsLock",
">",
"itLocks",
"=",
"OpenCms",
".",
"getMemoryMonitor",
"(",
")",
".",
"getAllCachedLocks",
"(",
")",
".",
"ite... | Removes all resources locked in a project.<p>
@param projectId the ID of the project where the resources have been locked
@param removeSystemLocks if <code>true</code>, also system locks are removed | [
"Removes",
"all",
"resources",
"locked",
"in",
"a",
"project",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/lock/CmsLockManager.java#L627-L639 |
BranchMetrics/android-branch-deep-linking | Branch-SDK/src/io/branch/referral/Branch.java | Branch.initSession | public boolean initSession(BranchUniversalReferralInitListener callback, Uri data, Activity activity) {
"""
<p>Initialises a session with the Branch API.</p>
@param callback A {@link BranchUniversalReferralInitListener} instance that will be called
following successful (or unsuccessful) initialisation of the s... | java | public boolean initSession(BranchUniversalReferralInitListener callback, Uri data, Activity activity) {
readAndStripParam(data, activity);
initSession(callback, activity);
return true;
} | [
"public",
"boolean",
"initSession",
"(",
"BranchUniversalReferralInitListener",
"callback",
",",
"Uri",
"data",
",",
"Activity",
"activity",
")",
"{",
"readAndStripParam",
"(",
"data",
",",
"activity",
")",
";",
"initSession",
"(",
"callback",
",",
"activity",
")"... | <p>Initialises a session with the Branch API.</p>
@param callback A {@link BranchUniversalReferralInitListener} instance that will be called
following successful (or unsuccessful) initialisation of the session
with the Branch API.
@param data A {@link Uri} variable containing the details of the source link that
l... | [
"<p",
">",
"Initialises",
"a",
"session",
"with",
"the",
"Branch",
"API",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/Branch.java#L1073-L1077 |
Omertron/api-themoviedb | src/main/java/com/omertron/themoviedbapi/methods/TmdbMovies.java | TmdbMovies.getReleaseDates | public ResultList<ReleaseDates> getReleaseDates(int movieId) throws MovieDbException {
"""
Get the release dates, certifications and related information by country for a specific movie id.
The results are keyed by country code and contain a type value.
@param movieId
@return
@throws MovieDbException
""... | java | public ResultList<ReleaseDates> getReleaseDates(int movieId) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, movieId);
URL url = new ApiUrl(apiKey, MethodBase.MOVIE).subMethod(MethodSub.RELEASE_DATES).buildUrl(parameters);
WrapperGene... | [
"public",
"ResultList",
"<",
"ReleaseDates",
">",
"getReleaseDates",
"(",
"int",
"movieId",
")",
"throws",
"MovieDbException",
"{",
"TmdbParameters",
"parameters",
"=",
"new",
"TmdbParameters",
"(",
")",
";",
"parameters",
".",
"add",
"(",
"Param",
".",
"ID",
... | Get the release dates, certifications and related information by country for a specific movie id.
The results are keyed by country code and contain a type value.
@param movieId
@return
@throws MovieDbException | [
"Get",
"the",
"release",
"dates",
"certifications",
"and",
"related",
"information",
"by",
"country",
"for",
"a",
"specific",
"movie",
"id",
"."
] | train | https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbMovies.java#L346-L353 |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/transform/TransformersImpl.java | TransformersImpl.transformAddress | protected static PathAddress transformAddress(final PathAddress original, final TransformationTarget target) {
"""
Transform a path address.
@param original the path address to be transformed
@param target the transformation target
@return the transformed path address
"""
final List<PathAddressTra... | java | protected static PathAddress transformAddress(final PathAddress original, final TransformationTarget target) {
final List<PathAddressTransformer> transformers = target.getPathTransformation(original);
final Iterator<PathAddressTransformer> transformations = transformers.iterator();
final PathAdd... | [
"protected",
"static",
"PathAddress",
"transformAddress",
"(",
"final",
"PathAddress",
"original",
",",
"final",
"TransformationTarget",
"target",
")",
"{",
"final",
"List",
"<",
"PathAddressTransformer",
">",
"transformers",
"=",
"target",
".",
"getPathTransformation",... | Transform a path address.
@param original the path address to be transformed
@param target the transformation target
@return the transformed path address | [
"Transform",
"a",
"path",
"address",
"."
] | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/TransformersImpl.java#L159-L164 |
alexvasilkov/GestureViews | library/src/main/java/com/alexvasilkov/gestures/utils/GravityUtils.java | GravityUtils.getDefaultPivot | public static void getDefaultPivot(Settings settings, Point out) {
"""
Calculates default pivot point for scale and rotation.
@param settings Image settings
@param out Output point
"""
getMovementAreaPosition(settings, tmpRect2);
Gravity.apply(settings.getGravity(), 0, 0, tmpRect2, tmpRect1... | java | public static void getDefaultPivot(Settings settings, Point out) {
getMovementAreaPosition(settings, tmpRect2);
Gravity.apply(settings.getGravity(), 0, 0, tmpRect2, tmpRect1);
out.set(tmpRect1.left, tmpRect1.top);
} | [
"public",
"static",
"void",
"getDefaultPivot",
"(",
"Settings",
"settings",
",",
"Point",
"out",
")",
"{",
"getMovementAreaPosition",
"(",
"settings",
",",
"tmpRect2",
")",
";",
"Gravity",
".",
"apply",
"(",
"settings",
".",
"getGravity",
"(",
")",
",",
"0",... | Calculates default pivot point for scale and rotation.
@param settings Image settings
@param out Output point | [
"Calculates",
"default",
"pivot",
"point",
"for",
"scale",
"and",
"rotation",
"."
] | train | https://github.com/alexvasilkov/GestureViews/blob/f0a4c266e31dcad23bd0d9013531bc1c501b9c9f/library/src/main/java/com/alexvasilkov/gestures/utils/GravityUtils.java#L73-L77 |
ironjacamar/ironjacamar | codegenerator/src/main/java/org/ironjacamar/codegenerator/xml/Ra10XmlGen.java | Ra10XmlGen.writeXmlBody | @Override
public void writeXmlBody(Definition def, Writer out) throws IOException {
"""
Output xml
@param def definition
@param out Writer
@throws IOException ioException
"""
writeConnectorVersion(out);
int indent = 1;
writeIndent(out, indent);
out.write("<display-name>Display ... | java | @Override
public void writeXmlBody(Definition def, Writer out) throws IOException
{
writeConnectorVersion(out);
int indent = 1;
writeIndent(out, indent);
out.write("<display-name>Display Name</display-name>");
writeEol(out);
writeIndent(out, indent);
out.write("<vendor-n... | [
"@",
"Override",
"public",
"void",
"writeXmlBody",
"(",
"Definition",
"def",
",",
"Writer",
"out",
")",
"throws",
"IOException",
"{",
"writeConnectorVersion",
"(",
"out",
")",
";",
"int",
"indent",
"=",
"1",
";",
"writeIndent",
"(",
"out",
",",
"indent",
"... | Output xml
@param def definition
@param out Writer
@throws IOException ioException | [
"Output",
"xml"
] | train | https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/xml/Ra10XmlGen.java#L45-L78 |
voldemort/voldemort | src/java/voldemort/server/protocol/admin/AsyncOperationService.java | AsyncOperationService.submitOperation | public synchronized void submitOperation(int requestId, AsyncOperation operation) {
"""
Submit a operations. Throw a run time exception if the operations is
already submitted
@param operation The asynchronous operations to submit
@param requestId Id of the request
"""
if(this.operations.containsKe... | java | public synchronized void submitOperation(int requestId, AsyncOperation operation) {
if(this.operations.containsKey(requestId))
throw new VoldemortException("Request " + requestId
+ " already submitted to the system");
this.operations.put(requestId, o... | [
"public",
"synchronized",
"void",
"submitOperation",
"(",
"int",
"requestId",
",",
"AsyncOperation",
"operation",
")",
"{",
"if",
"(",
"this",
".",
"operations",
".",
"containsKey",
"(",
"requestId",
")",
")",
"throw",
"new",
"VoldemortException",
"(",
"\"Reques... | Submit a operations. Throw a run time exception if the operations is
already submitted
@param operation The asynchronous operations to submit
@param requestId Id of the request | [
"Submit",
"a",
"operations",
".",
"Throw",
"a",
"run",
"time",
"exception",
"if",
"the",
"operations",
"is",
"already",
"submitted"
] | train | https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/server/protocol/admin/AsyncOperationService.java#L68-L76 |
bitcoinj/bitcoinj | core/src/main/java/org/bitcoinj/core/PeerGroup.java | PeerGroup.connectTo | @Nullable
public Peer connectTo(InetSocketAddress address) {
"""
Connect to a peer by creating a channel to the destination address. This should not be
used normally - let the PeerGroup manage connections through {@link #start()}
@param address destination IP and port.
@return The newly created Peer obje... | java | @Nullable
public Peer connectTo(InetSocketAddress address) {
lock.lock();
try {
PeerAddress peerAddress = new PeerAddress(params, address);
backoffMap.put(peerAddress, new ExponentialBackoff(peerBackoffParams));
return connectTo(peerAddress, true, vConnectTimeoutM... | [
"@",
"Nullable",
"public",
"Peer",
"connectTo",
"(",
"InetSocketAddress",
"address",
")",
"{",
"lock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"PeerAddress",
"peerAddress",
"=",
"new",
"PeerAddress",
"(",
"params",
",",
"address",
")",
";",
"backoffMap",
"... | Connect to a peer by creating a channel to the destination address. This should not be
used normally - let the PeerGroup manage connections through {@link #start()}
@param address destination IP and port.
@return The newly created Peer object or null if the peer could not be connected.
Use {@link Peer#getConnectionOp... | [
"Connect",
"to",
"a",
"peer",
"by",
"creating",
"a",
"channel",
"to",
"the",
"destination",
"address",
".",
"This",
"should",
"not",
"be",
"used",
"normally",
"-",
"let",
"the",
"PeerGroup",
"manage",
"connections",
"through",
"{",
"@link",
"#start",
"()",
... | train | https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/PeerGroup.java#L1307-L1317 |
Azure/azure-sdk-for-java | applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ExportConfigurationsInner.java | ExportConfigurationsInner.deleteAsync | public Observable<ApplicationInsightsComponentExportConfigurationInner> deleteAsync(String resourceGroupName, String resourceName, String exportId) {
"""
Delete a Continuous Export configuration of an Application Insights component.
@param resourceGroupName The name of the resource group.
@param resourceName T... | java | public Observable<ApplicationInsightsComponentExportConfigurationInner> deleteAsync(String resourceGroupName, String resourceName, String exportId) {
return deleteWithServiceResponseAsync(resourceGroupName, resourceName, exportId).map(new Func1<ServiceResponse<ApplicationInsightsComponentExportConfigurationInne... | [
"public",
"Observable",
"<",
"ApplicationInsightsComponentExportConfigurationInner",
">",
"deleteAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"resourceName",
",",
"String",
"exportId",
")",
"{",
"return",
"deleteWithServiceResponseAsync",
"(",
"resourceGroupName... | Delete a Continuous Export configuration of an Application Insights component.
@param resourceGroupName The name of the resource group.
@param resourceName The name of the Application Insights component resource.
@param exportId The Continuous Export configuration ID. This is unique within a Application Insights compo... | [
"Delete",
"a",
"Continuous",
"Export",
"configuration",
"of",
"an",
"Application",
"Insights",
"component",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ExportConfigurationsInner.java#L301-L308 |
roboconf/roboconf-platform | miscellaneous/roboconf-doc-generator/src/main/java/net/roboconf/doc/generator/internal/GraphUtils.java | GraphUtils.writeGraph | public static void writeGraph(
File outputFile,
Component selectedComponent,
Layout<AbstractType,String> layout,
Graph<AbstractType,String> graph ,
AbstractEdgeShapeTransformer<AbstractType,String> edgeShapeTransformer,
Map<String,String> options )
throws IOException {
"""
Writes a graph as a PN... | java | public static void writeGraph(
File outputFile,
Component selectedComponent,
Layout<AbstractType,String> layout,
Graph<AbstractType,String> graph ,
AbstractEdgeShapeTransformer<AbstractType,String> edgeShapeTransformer,
Map<String,String> options )
throws IOException {
VisualizationImageServer<Abs... | [
"public",
"static",
"void",
"writeGraph",
"(",
"File",
"outputFile",
",",
"Component",
"selectedComponent",
",",
"Layout",
"<",
"AbstractType",
",",
"String",
">",
"layout",
",",
"Graph",
"<",
"AbstractType",
",",
"String",
">",
"graph",
",",
"AbstractEdgeShapeT... | Writes a graph as a PNG image.
@param outputFile the output file
@param selectedComponent the component to highlight
@param layout the layout
@param graph the graph
@param edgeShapeTransformer the transformer for edge shapes (straight line, curved line, etc)
@throws IOException if something went wrong | [
"Writes",
"a",
"graph",
"as",
"a",
"PNG",
"image",
"."
] | train | https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-doc-generator/src/main/java/net/roboconf/doc/generator/internal/GraphUtils.java#L109-L144 |
elki-project/elki | elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/FormatUtil.java | FormatUtil.formatTo | public static StringBuilder formatTo(StringBuilder buf, double[][] d, String pre, String pos, String csep, NumberFormat nf) {
"""
Formats the array of double arrays d with the specified separators and
fraction digits.
@param buf Output buffer
@param d the double array to be formatted
@param pre Row prefix (e... | java | public static StringBuilder formatTo(StringBuilder buf, double[][] d, String pre, String pos, String csep, NumberFormat nf) {
if(d == null) {
return buf.append("null");
}
if(d.length == 0) {
return buf;
}
for(int i = 0; i < d.length; i++) {
formatTo(buf.append(pre), d[i], csep, nf)... | [
"public",
"static",
"StringBuilder",
"formatTo",
"(",
"StringBuilder",
"buf",
",",
"double",
"[",
"]",
"[",
"]",
"d",
",",
"String",
"pre",
",",
"String",
"pos",
",",
"String",
"csep",
",",
"NumberFormat",
"nf",
")",
"{",
"if",
"(",
"d",
"==",
"null",
... | Formats the array of double arrays d with the specified separators and
fraction digits.
@param buf Output buffer
@param d the double array to be formatted
@param pre Row prefix (e.g. " [")
@param pos Row postfix (e.g. "]\n")
@param csep Separator for columns (e.g. ", ")
@param nf the number format to use
@return Outpu... | [
"Formats",
"the",
"array",
"of",
"double",
"arrays",
"d",
"with",
"the",
"specified",
"separators",
"and",
"fraction",
"digits",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/FormatUtil.java#L596-L607 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.