repository_name stringlengths 7 54 | func_path_in_repository stringlengths 18 218 | func_name stringlengths 5 140 | whole_func_string stringlengths 79 3.99k | language stringclasses 1
value | func_code_string stringlengths 79 3.99k | func_code_tokens listlengths 20 624 | func_documentation_string stringlengths 61 1.96k | func_documentation_tokens listlengths 1 478 | split_name stringclasses 1
value | func_code_url stringlengths 107 339 |
|---|---|---|---|---|---|---|---|---|---|---|
JodaOrg/joda-time | src/main/java/org/joda/time/tz/DateTimeZoneBuilder.java | DateTimeZoneBuilder.writeTo | public void writeTo(String zoneID, OutputStream out) throws IOException {
if (out instanceof DataOutput) {
writeTo(zoneID, (DataOutput)out);
} else {
DataOutputStream dout = new DataOutputStream(out);
writeTo(zoneID, (DataOutput)dout);
dout.flush();
... | java | public void writeTo(String zoneID, OutputStream out) throws IOException {
if (out instanceof DataOutput) {
writeTo(zoneID, (DataOutput)out);
} else {
DataOutputStream dout = new DataOutputStream(out);
writeTo(zoneID, (DataOutput)dout);
dout.flush();
... | [
"public",
"void",
"writeTo",
"(",
"String",
"zoneID",
",",
"OutputStream",
"out",
")",
"throws",
"IOException",
"{",
"if",
"(",
"out",
"instanceof",
"DataOutput",
")",
"{",
"writeTo",
"(",
"zoneID",
",",
"(",
"DataOutput",
")",
"out",
")",
";",
"}",
"els... | Encodes a built DateTimeZone to the given stream. Call readFrom to
decode the data into a DateTimeZone object.
@param out the output stream to receive the encoded DateTimeZone
@since 1.5 (parameter added) | [
"Encodes",
"a",
"built",
"DateTimeZone",
"to",
"the",
"given",
"stream",
".",
"Call",
"readFrom",
"to",
"decode",
"the",
"data",
"into",
"a",
"DateTimeZone",
"object",
"."
] | train | https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/tz/DateTimeZoneBuilder.java#L447-L455 |
Wolfgang-Schuetzelhofer/jcypher | src/main/java/iot/jcypher/query/LiteralMapList.java | LiteralMapList.selectFirst | public LiteralMap selectFirst(String key, Object value) {
for (LiteralMap lm : this) {
if (isEqual(value, lm.get(key)))
return lm;
}
return null;
} | java | public LiteralMap selectFirst(String key, Object value) {
for (LiteralMap lm : this) {
if (isEqual(value, lm.get(key)))
return lm;
}
return null;
} | [
"public",
"LiteralMap",
"selectFirst",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"for",
"(",
"LiteralMap",
"lm",
":",
"this",
")",
"{",
"if",
"(",
"isEqual",
"(",
"value",
",",
"lm",
".",
"get",
"(",
"key",
")",
")",
")",
"return",
"l... | Answer the first literal map with the given key and value
@param key
@param value
@return | [
"Answer",
"the",
"first",
"literal",
"map",
"with",
"the",
"given",
"key",
"and",
"value"
] | train | https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/query/LiteralMapList.java#L91-L97 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/Logger.java | Logger.entering | public void entering(String sourceClass, String sourceMethod, Object param1) {
if (Level.FINER.intValue() < levelValue) {
return;
}
Object params[] = { param1 };
logp(Level.FINER, sourceClass, sourceMethod, "ENTRY {0}", params);
} | java | public void entering(String sourceClass, String sourceMethod, Object param1) {
if (Level.FINER.intValue() < levelValue) {
return;
}
Object params[] = { param1 };
logp(Level.FINER, sourceClass, sourceMethod, "ENTRY {0}", params);
} | [
"public",
"void",
"entering",
"(",
"String",
"sourceClass",
",",
"String",
"sourceMethod",
",",
"Object",
"param1",
")",
"{",
"if",
"(",
"Level",
".",
"FINER",
".",
"intValue",
"(",
")",
"<",
"levelValue",
")",
"{",
"return",
";",
"}",
"Object",
"params"... | Log a method entry, with one parameter.
<p>
This is a convenience method that can be used to log entry
to a method. A LogRecord with message "ENTRY {0}", log level
FINER, and the given sourceMethod, sourceClass, and parameter
is logged.
<p>
@param sourceClass name of class that issued the logging request
@param ... | [
"Log",
"a",
"method",
"entry",
"with",
"one",
"parameter",
".",
"<p",
">",
"This",
"is",
"a",
"convenience",
"method",
"that",
"can",
"be",
"used",
"to",
"log",
"entry",
"to",
"a",
"method",
".",
"A",
"LogRecord",
"with",
"message",
"ENTRY",
"{",
"0",
... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/Logger.java#L1045-L1051 |
ppiastucki/recast4j | detour/src/main/java/org/recast4j/detour/NavMesh.java | NavMesh.encodePolyId | public static long encodePolyId(int salt, int it, int ip) {
return (((long) salt) << (DT_POLY_BITS + DT_TILE_BITS)) | ((long) it << DT_POLY_BITS) | ip;
} | java | public static long encodePolyId(int salt, int it, int ip) {
return (((long) salt) << (DT_POLY_BITS + DT_TILE_BITS)) | ((long) it << DT_POLY_BITS) | ip;
} | [
"public",
"static",
"long",
"encodePolyId",
"(",
"int",
"salt",
",",
"int",
"it",
",",
"int",
"ip",
")",
"{",
"return",
"(",
"(",
"(",
"long",
")",
"salt",
")",
"<<",
"(",
"DT_POLY_BITS",
"+",
"DT_TILE_BITS",
")",
")",
"|",
"(",
"(",
"long",
")",
... | Derives a standard polygon reference.
@note This function is generally meant for internal use only.
@param salt
The tile's salt value.
@param it
The index of the tile.
@param ip
The index of the polygon within the tile.
@return encoded polygon reference | [
"Derives",
"a",
"standard",
"polygon",
"reference",
"."
] | train | https://github.com/ppiastucki/recast4j/blob/a414dc34f16b87c95fb4e0f46c28a7830d421788/detour/src/main/java/org/recast4j/detour/NavMesh.java#L124-L126 |
zaproxy/zaproxy | src/org/apache/commons/httpclient/HttpMethodBase.java | HttpMethodBase.setRequestHeader | @Override
public void setRequestHeader(String headerName, String headerValue) {
Header header = new Header(headerName, headerValue);
setRequestHeader(header);
} | java | @Override
public void setRequestHeader(String headerName, String headerValue) {
Header header = new Header(headerName, headerValue);
setRequestHeader(header);
} | [
"@",
"Override",
"public",
"void",
"setRequestHeader",
"(",
"String",
"headerName",
",",
"String",
"headerValue",
")",
"{",
"Header",
"header",
"=",
"new",
"Header",
"(",
"headerName",
",",
"headerValue",
")",
";",
"setRequestHeader",
"(",
"header",
")",
";",
... | Set the specified request header, overwriting any previous value. Note
that header-name matching is case-insensitive.
@param headerName the header's name
@param headerValue the header's value | [
"Set",
"the",
"specified",
"request",
"header",
"overwriting",
"any",
"previous",
"value",
".",
"Note",
"that",
"header",
"-",
"name",
"matching",
"is",
"case",
"-",
"insensitive",
"."
] | train | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/apache/commons/httpclient/HttpMethodBase.java#L498-L502 |
caspervg/SC4D-LEX4J | lex4j/src/main/java/net/caspervg/lex4j/route/LotRoute.java | LotRoute.getLotDownload | public boolean getLotDownload(int id, File directory) {
ClientResource resource = new ClientResource(Route.DOWNLOAD_LOT.url(id));
resource.setChallengeResponse(this.auth.toChallenge());
try {
Representation repr = resource.get(MediaType.APPLICATION_ZIP);
Disposition disp... | java | public boolean getLotDownload(int id, File directory) {
ClientResource resource = new ClientResource(Route.DOWNLOAD_LOT.url(id));
resource.setChallengeResponse(this.auth.toChallenge());
try {
Representation repr = resource.get(MediaType.APPLICATION_ZIP);
Disposition disp... | [
"public",
"boolean",
"getLotDownload",
"(",
"int",
"id",
",",
"File",
"directory",
")",
"{",
"ClientResource",
"resource",
"=",
"new",
"ClientResource",
"(",
"Route",
".",
"DOWNLOAD_LOT",
".",
"url",
"(",
"id",
")",
")",
";",
"resource",
".",
"setChallengeRe... | Downloads a lot/file
@param id ID of the lot/file
@param directory Directory where the file should be downloaded
@custom.require Authentication
@return Download succeeded | [
"Downloads",
"a",
"lot",
"/",
"file"
] | train | https://github.com/caspervg/SC4D-LEX4J/blob/3d086ec70c817119a88573c2e23af27276cdb1d6/lex4j/src/main/java/net/caspervg/lex4j/route/LotRoute.java#L105-L126 |
eyp/serfj | src/main/java/net/sf/serfj/client/Client.java | Client.postRequest | public Object postRequest(String restUrl, Map<String, String> params) throws IOException, WebServiceException {
return this.postRequest(HttpMethod.POST, restUrl, params);
} | java | public Object postRequest(String restUrl, Map<String, String> params) throws IOException, WebServiceException {
return this.postRequest(HttpMethod.POST, restUrl, params);
} | [
"public",
"Object",
"postRequest",
"(",
"String",
"restUrl",
",",
"Map",
"<",
"String",
",",
"String",
">",
"params",
")",
"throws",
"IOException",
",",
"WebServiceException",
"{",
"return",
"this",
".",
"postRequest",
"(",
"HttpMethod",
".",
"POST",
",",
"r... | Do a POST HTTP request to the given REST-URL.
@param restUrl
REST URL.
@param params
Parameters for adding to the query string.
@throws IOException
if the request go bad. | [
"Do",
"a",
"POST",
"HTTP",
"request",
"to",
"the",
"given",
"REST",
"-",
"URL",
"."
] | train | https://github.com/eyp/serfj/blob/e617592af6f24e59ea58443f2785c44aa2312189/src/main/java/net/sf/serfj/client/Client.java#L130-L132 |
moparisthebest/beehive | beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/datagrid/DataGrid.java | DataGrid.setBehavior | public void setBehavior(String name, Object value, String facet)
throws JspException {
if(facet != null && facet.equals(FACET_RESOURCE)) {
_dataGridTagModel.addResourceOverride(name, (value != null ? value.toString() : null));
}
else {
String s = Bundle.getStr... | java | public void setBehavior(String name, Object value, String facet)
throws JspException {
if(facet != null && facet.equals(FACET_RESOURCE)) {
_dataGridTagModel.addResourceOverride(name, (value != null ? value.toString() : null));
}
else {
String s = Bundle.getStr... | [
"public",
"void",
"setBehavior",
"(",
"String",
"name",
",",
"Object",
"value",
",",
"String",
"facet",
")",
"throws",
"JspException",
"{",
"if",
"(",
"facet",
"!=",
"null",
"&&",
"facet",
".",
"equals",
"(",
"FACET_RESOURCE",
")",
")",
"{",
"_dataGridTagM... | <p>
Implementation of the {@link IBehaviorConsumer} interface that extends the functionality of this
tag beyond that exposed via the JSP tag attributes. This method accepts the following facets:
<table>
<tr><td>Facet Name</td><td>Operation</td></tr>
<tr><td><code>resource</code></td><td>Adds or overrides a data grid r... | [
"<p",
">",
"Implementation",
"of",
"the",
"{"
] | train | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/datagrid/DataGrid.java#L749-L758 |
UrielCh/ovh-java-sdk | ovh-java-sdk-partners/src/main/java/net/minidev/ovh/api/ApiOvhPartners.java | ApiOvhPartners.register_company_companyId_contact_POST | public OvhContact register_company_companyId_contact_POST(String companyId, String email, String facebook, String firstName, String lastName, String linkedin, Boolean newsletter, OvhNic[] otherNics, String phone, String role, String twitter) throws IOException {
String qPath = "/partners/register/company/{companyId}/... | java | public OvhContact register_company_companyId_contact_POST(String companyId, String email, String facebook, String firstName, String lastName, String linkedin, Boolean newsletter, OvhNic[] otherNics, String phone, String role, String twitter) throws IOException {
String qPath = "/partners/register/company/{companyId}/... | [
"public",
"OvhContact",
"register_company_companyId_contact_POST",
"(",
"String",
"companyId",
",",
"String",
"email",
",",
"String",
"facebook",
",",
"String",
"firstName",
",",
"String",
"lastName",
",",
"String",
"linkedin",
",",
"Boolean",
"newsletter",
",",
"Ov... | Created a new contact for the inscription
REST: POST /partners/register/company/{companyId}/contact
@param companyId [required] Company's id
@param otherNics [required] List of nics to associate with this contact
@param firstName [required] Contact's first name
@param lastName [required] Contact's last name
@param ema... | [
"Created",
"a",
"new",
"contact",
"for",
"the",
"inscription"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-partners/src/main/java/net/minidev/ovh/api/ApiOvhPartners.java#L250-L266 |
xwiki/xwiki-commons | xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-infinispan/src/main/java/org/xwiki/cache/infinispan/internal/InfinispanCache.java | InfinispanCache.cacheEntryRemoved | private void cacheEntryRemoved(String key, T value)
{
InfinispanCacheEntryEvent<T> event =
new InfinispanCacheEntryEvent<>(new InfinispanCacheEntry<T>(this, key, value));
sendEntryRemovedEvent(event);
} | java | private void cacheEntryRemoved(String key, T value)
{
InfinispanCacheEntryEvent<T> event =
new InfinispanCacheEntryEvent<>(new InfinispanCacheEntry<T>(this, key, value));
sendEntryRemovedEvent(event);
} | [
"private",
"void",
"cacheEntryRemoved",
"(",
"String",
"key",
",",
"T",
"value",
")",
"{",
"InfinispanCacheEntryEvent",
"<",
"T",
">",
"event",
"=",
"new",
"InfinispanCacheEntryEvent",
"<>",
"(",
"new",
"InfinispanCacheEntry",
"<",
"T",
">",
"(",
"this",
",",
... | Dispatch data remove event.
@param key the entry key.
@param value the entry value. | [
"Dispatch",
"data",
"remove",
"event",
"."
] | train | https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-infinispan/src/main/java/org/xwiki/cache/infinispan/internal/InfinispanCache.java#L224-L230 |
UrielCh/ovh-java-sdk | ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java | ApiOvhOrder.license_plesk_new_duration_POST | public OvhOrder license_plesk_new_duration_POST(String duration, OvhOrderableAntivirusEnum antivirus, OvhPleskApplicationSetEnum applicationSet, OvhOrderablePleskDomainNumberEnum domainNumber, String ip, OvhOrderablePleskLanguagePackEnum languagePackNumber, Boolean powerpack, Boolean resellerManagement, OvhLicenseTypeE... | java | public OvhOrder license_plesk_new_duration_POST(String duration, OvhOrderableAntivirusEnum antivirus, OvhPleskApplicationSetEnum applicationSet, OvhOrderablePleskDomainNumberEnum domainNumber, String ip, OvhOrderablePleskLanguagePackEnum languagePackNumber, Boolean powerpack, Boolean resellerManagement, OvhLicenseTypeE... | [
"public",
"OvhOrder",
"license_plesk_new_duration_POST",
"(",
"String",
"duration",
",",
"OvhOrderableAntivirusEnum",
"antivirus",
",",
"OvhPleskApplicationSetEnum",
"applicationSet",
",",
"OvhOrderablePleskDomainNumberEnum",
"domainNumber",
",",
"String",
"ip",
",",
"OvhOrdera... | Create order
REST: POST /order/license/plesk/new/{duration}
@param serviceType [required] # DEPRECATED # The kind of service on which this license will be used # Will not be used, keeped only for compatibility #
@param languagePackNumber [required] The amount of language pack numbers to include in this licences
@param... | [
"Create",
"order"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L1830-L1846 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPPrefixesInner.java | PublicIPPrefixesInner.beginCreateOrUpdate | public PublicIPPrefixInner beginCreateOrUpdate(String resourceGroupName, String publicIpPrefixName, PublicIPPrefixInner parameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, parameters).toBlocking().single().body();
} | java | public PublicIPPrefixInner beginCreateOrUpdate(String resourceGroupName, String publicIpPrefixName, PublicIPPrefixInner parameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, parameters).toBlocking().single().body();
} | [
"public",
"PublicIPPrefixInner",
"beginCreateOrUpdate",
"(",
"String",
"resourceGroupName",
",",
"String",
"publicIpPrefixName",
",",
"PublicIPPrefixInner",
"parameters",
")",
"{",
"return",
"beginCreateOrUpdateWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"publicIp... | Creates or updates a static or dynamic public IP prefix.
@param resourceGroupName The name of the resource group.
@param publicIpPrefixName The name of the public IP prefix.
@param parameters Parameters supplied to the create or update public IP prefix operation.
@throws IllegalArgumentException thrown if parameters f... | [
"Creates",
"or",
"updates",
"a",
"static",
"or",
"dynamic",
"public",
"IP",
"prefix",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPPrefixesInner.java#L519-L521 |
lionsoul2014/jcseg | jcseg-core/src/main/java/org/lionsoul/jcseg/util/StringUtil.java | StringUtil.isLetterOrNumeric | public static boolean isLetterOrNumeric(String str, int beginIndex, int endIndex)
{
for ( int i = beginIndex; i < endIndex; i++ ) {
char chr = str.charAt(i);
if ( ! StringUtil.isEnLetter(chr)
&& ! StringUtil.isEnNumeric(chr) ) {
return false;
... | java | public static boolean isLetterOrNumeric(String str, int beginIndex, int endIndex)
{
for ( int i = beginIndex; i < endIndex; i++ ) {
char chr = str.charAt(i);
if ( ! StringUtil.isEnLetter(chr)
&& ! StringUtil.isEnNumeric(chr) ) {
return false;
... | [
"public",
"static",
"boolean",
"isLetterOrNumeric",
"(",
"String",
"str",
",",
"int",
"beginIndex",
",",
"int",
"endIndex",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"beginIndex",
";",
"i",
"<",
"endIndex",
";",
"i",
"++",
")",
"{",
"char",
"chr",
"=",
... | check if the specified string is Latin numeric or letter
@param str
@param beginIndex
@param endIndex
@return boolean | [
"check",
"if",
"the",
"specified",
"string",
"is",
"Latin",
"numeric",
"or",
"letter"
] | train | https://github.com/lionsoul2014/jcseg/blob/7c8a912e3bbcaf4f8de701180b9c24e2e444a94b/jcseg-core/src/main/java/org/lionsoul/jcseg/util/StringUtil.java#L374-L385 |
ivanceras/orm | src/main/java/com/ivanceras/db/server/core/DB_PostgreSQL.java | DB_PostgreSQL.correctDataType | private Object correctDataType(Object value, String dataType) {
if(value == null ){return null;}
return value;
} | java | private Object correctDataType(Object value, String dataType) {
if(value == null ){return null;}
return value;
} | [
"private",
"Object",
"correctDataType",
"(",
"Object",
"value",
",",
"String",
"dataType",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"value",
";",
"}"
] | add logic here if PostgreSQL JDBC didn't map DB data type to their correct Java Data type
@param value
@param dataType
@return | [
"add",
"logic",
"here",
"if",
"PostgreSQL",
"JDBC",
"didn",
"t",
"map",
"DB",
"data",
"type",
"to",
"their",
"correct",
"Java",
"Data",
"type"
] | train | https://github.com/ivanceras/orm/blob/e63213cb8abefd11df0e2d34b1c95477788e600e/src/main/java/com/ivanceras/db/server/core/DB_PostgreSQL.java#L881-L884 |
rundeck/rundeck | core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyLookup.java | PropertyLookup.create | public static PropertyLookup create(final File propfile, final IPropertyLookup defaultsLookup) {
return new PropertyLookup(fetchProperties(propfile), defaultsLookup);
} | java | public static PropertyLookup create(final File propfile, final IPropertyLookup defaultsLookup) {
return new PropertyLookup(fetchProperties(propfile), defaultsLookup);
} | [
"public",
"static",
"PropertyLookup",
"create",
"(",
"final",
"File",
"propfile",
",",
"final",
"IPropertyLookup",
"defaultsLookup",
")",
"{",
"return",
"new",
"PropertyLookup",
"(",
"fetchProperties",
"(",
"propfile",
")",
",",
"defaultsLookup",
")",
";",
"}"
] | Calls base constructor with data from IPropertyLookup paramater as defaults. Defaults
data is read via the {@link IPropertyLookup#getPropertiesMap()} method.
@param propfile File containing property data
@param defaultsLookup IPropertyLookup of default properties
@return lookup | [
"Calls",
"base",
"constructor",
"with",
"data",
"from",
"IPropertyLookup",
"paramater",
"as",
"defaults",
".",
"Defaults",
"data",
"is",
"read",
"via",
"the",
"{",
"@link",
"IPropertyLookup#getPropertiesMap",
"()",
"}",
"method",
"."
] | train | https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyLookup.java#L148-L150 |
undertow-io/undertow | core/src/main/java/io/undertow/util/ETagUtils.java | ETagUtils.handleIfNoneMatch | public static boolean handleIfNoneMatch(final String ifNoneMatch, final ETag etag, boolean allowWeak) {
return handleIfNoneMatch(ifNoneMatch, Collections.singletonList(etag), allowWeak);
} | java | public static boolean handleIfNoneMatch(final String ifNoneMatch, final ETag etag, boolean allowWeak) {
return handleIfNoneMatch(ifNoneMatch, Collections.singletonList(etag), allowWeak);
} | [
"public",
"static",
"boolean",
"handleIfNoneMatch",
"(",
"final",
"String",
"ifNoneMatch",
",",
"final",
"ETag",
"etag",
",",
"boolean",
"allowWeak",
")",
"{",
"return",
"handleIfNoneMatch",
"(",
"ifNoneMatch",
",",
"Collections",
".",
"singletonList",
"(",
"etag"... | Handles the if-none-match header. returns true if the request should proceed, false otherwise
@param ifNoneMatch the header
@param etag The etags
@return | [
"Handles",
"the",
"if",
"-",
"none",
"-",
"match",
"header",
".",
"returns",
"true",
"if",
"the",
"request",
"should",
"proceed",
"false",
"otherwise"
] | train | https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/ETagUtils.java#L133-L135 |
pedrovgs/Renderers | renderers/src/main/java/com/pedrogomez/renderers/RendererAdapter.java | RendererAdapter.getView | @Override public View getView(int position, View convertView, ViewGroup parent) {
T content = getItem(position);
rendererBuilder.withContent(content);
rendererBuilder.withConvertView(convertView);
rendererBuilder.withParent(parent);
rendererBuilder.withLayoutInflater(LayoutInflater.from(parent.getCo... | java | @Override public View getView(int position, View convertView, ViewGroup parent) {
T content = getItem(position);
rendererBuilder.withContent(content);
rendererBuilder.withConvertView(convertView);
rendererBuilder.withParent(parent);
rendererBuilder.withLayoutInflater(LayoutInflater.from(parent.getCo... | [
"@",
"Override",
"public",
"View",
"getView",
"(",
"int",
"position",
",",
"View",
"convertView",
",",
"ViewGroup",
"parent",
")",
"{",
"T",
"content",
"=",
"getItem",
"(",
"position",
")",
";",
"rendererBuilder",
".",
"withContent",
"(",
"content",
")",
"... | Main method of RendererAdapter. This method has the responsibility of update the
RendererBuilder values and create or recycle a new Renderer. Once the renderer has been
obtained the RendereBuilder will call the render method in the renderer and will return the
Renderer root view to the ListView.
If rRendererBuilder re... | [
"Main",
"method",
"of",
"RendererAdapter",
".",
"This",
"method",
"has",
"the",
"responsibility",
"of",
"update",
"the",
"RendererBuilder",
"values",
"and",
"create",
"or",
"recycle",
"a",
"new",
"Renderer",
".",
"Once",
"the",
"renderer",
"has",
"been",
"obta... | train | https://github.com/pedrovgs/Renderers/blob/7477fb6e3984468b32b59c8520b66afb765081ea/renderers/src/main/java/com/pedrogomez/renderers/RendererAdapter.java#L86-L99 |
UrielCh/ovh-java-sdk | ovh-java-sdk-store/src/main/java/net/minidev/ovh/api/ApiOvhStore.java | ApiOvhStore.contact_POST | public OvhContact contact_POST(String city, String country, String email, String firstname, String lastname, String phone, String province, String street, String title, String zip) throws IOException {
String qPath = "/store/contact";
StringBuilder sb = path(qPath);
HashMap<String, Object>o = new HashMap<String, ... | java | public OvhContact contact_POST(String city, String country, String email, String firstname, String lastname, String phone, String province, String street, String title, String zip) throws IOException {
String qPath = "/store/contact";
StringBuilder sb = path(qPath);
HashMap<String, Object>o = new HashMap<String, ... | [
"public",
"OvhContact",
"contact_POST",
"(",
"String",
"city",
",",
"String",
"country",
",",
"String",
"email",
",",
"String",
"firstname",
",",
"String",
"lastname",
",",
"String",
"phone",
",",
"String",
"province",
",",
"String",
"street",
",",
"String",
... | Create a 'marketplace' contact for current nic
REST: POST /store/contact
@param title [required] Title
@param firstname [required] First name
@param lastname [required] Last name
@param email [required] Email address
@param street [required] Street address
@param country [required] Country
@param zip [required] Zipcod... | [
"Create",
"a",
"marketplace",
"contact",
"for",
"current",
"nic"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-store/src/main/java/net/minidev/ovh/api/ApiOvhStore.java#L253-L269 |
EsotericSoftware/kryo | src/com/esotericsoftware/kryo/unsafe/UnsafeByteBufferInput.java | UnsafeByteBufferInput.readBytes | public void readBytes (Object to, long offset, int count) throws KryoException {
int copyCount = Math.min(limit - position, count);
while (true) {
unsafe.copyMemory(null, bufferAddress + position, to, offset, copyCount);
position += copyCount;
count -= copyCount;
if (count == 0) break;
offset += copy... | java | public void readBytes (Object to, long offset, int count) throws KryoException {
int copyCount = Math.min(limit - position, count);
while (true) {
unsafe.copyMemory(null, bufferAddress + position, to, offset, copyCount);
position += copyCount;
count -= copyCount;
if (count == 0) break;
offset += copy... | [
"public",
"void",
"readBytes",
"(",
"Object",
"to",
",",
"long",
"offset",
",",
"int",
"count",
")",
"throws",
"KryoException",
"{",
"int",
"copyCount",
"=",
"Math",
".",
"min",
"(",
"limit",
"-",
"position",
",",
"count",
")",
";",
"while",
"(",
"true... | Read count bytes and write them to the object at the given offset inside the in-memory representation of the object. | [
"Read",
"count",
"bytes",
"and",
"write",
"them",
"to",
"the",
"object",
"at",
"the",
"given",
"offset",
"inside",
"the",
"in",
"-",
"memory",
"representation",
"of",
"the",
"object",
"."
] | train | https://github.com/EsotericSoftware/kryo/blob/a8be1ab26f347f299a3c3f7171d6447dd5390845/src/com/esotericsoftware/kryo/unsafe/UnsafeByteBufferInput.java#L229-L241 |
Ekryd/sortpom | sorter/src/main/java/sortpom/util/XmlOrderedResult.java | XmlOrderedResult.childElementDiffers | public static XmlOrderedResult childElementDiffers(String name, int originalSize, int newSize) {
return new XmlOrderedResult(false, String.format(
"The xml element <%s> with %s child elements should be placed before element <%s> with %s child elements",
name, newSize, name, origi... | java | public static XmlOrderedResult childElementDiffers(String name, int originalSize, int newSize) {
return new XmlOrderedResult(false, String.format(
"The xml element <%s> with %s child elements should be placed before element <%s> with %s child elements",
name, newSize, name, origi... | [
"public",
"static",
"XmlOrderedResult",
"childElementDiffers",
"(",
"String",
"name",
",",
"int",
"originalSize",
",",
"int",
"newSize",
")",
"{",
"return",
"new",
"XmlOrderedResult",
"(",
"false",
",",
"String",
".",
"format",
"(",
"\"The xml element <%s> with %s c... | The child elements of two elements differ. Example: When dependencies should be sorted | [
"The",
"child",
"elements",
"of",
"two",
"elements",
"differ",
".",
"Example",
":",
"When",
"dependencies",
"should",
"be",
"sorted"
] | train | https://github.com/Ekryd/sortpom/blob/27056420803ed04001e4149b04a719fbac774c5d/sorter/src/main/java/sortpom/util/XmlOrderedResult.java#L30-L34 |
datacleaner/AnalyzerBeans | env/xml-config/src/main/java/org/eobjects/analyzer/configuration/DatastoreXmlExternalizer.java | DatastoreXmlExternalizer.toElement | public Element toElement(ExcelDatastore datastore, String filename) {
final Element ds = getDocument().createElement("excel-datastore");
ds.setAttribute("name", datastore.getName());
if (!StringUtils.isNullOrEmpty(datastore.getDescription())) {
ds.setAttribute("description", datasto... | java | public Element toElement(ExcelDatastore datastore, String filename) {
final Element ds = getDocument().createElement("excel-datastore");
ds.setAttribute("name", datastore.getName());
if (!StringUtils.isNullOrEmpty(datastore.getDescription())) {
ds.setAttribute("description", datasto... | [
"public",
"Element",
"toElement",
"(",
"ExcelDatastore",
"datastore",
",",
"String",
"filename",
")",
"{",
"final",
"Element",
"ds",
"=",
"getDocument",
"(",
")",
".",
"createElement",
"(",
"\"excel-datastore\"",
")",
";",
"ds",
".",
"setAttribute",
"(",
"\"na... | Externalizes a {@link ExcelDatastore} to a XML element.
@param datastore
@param filename
the filename/path to use in the XML element. Since the
appropriate path will depend on the reading application's
environment (supported {@link Resource} types), this specific
property of the datastore is provided separately.
@retu... | [
"Externalizes",
"a",
"{",
"@link",
"ExcelDatastore",
"}",
"to",
"a",
"XML",
"element",
"."
] | train | https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/env/xml-config/src/main/java/org/eobjects/analyzer/configuration/DatastoreXmlExternalizer.java#L271-L282 |
Red5/red5-server-common | src/main/java/org/red5/server/net/rtmp/codec/RTMP.java | RTMP.setLastReadPacket | public void setLastReadPacket(int channelId, Packet packet) {
final ChannelInfo info = getChannelInfo(channelId);
// grab last packet
Packet prevPacket = info.getReadPacket();
// set new one
info.setReadPacket(packet);
// free the previous packet
freePacket... | java | public void setLastReadPacket(int channelId, Packet packet) {
final ChannelInfo info = getChannelInfo(channelId);
// grab last packet
Packet prevPacket = info.getReadPacket();
// set new one
info.setReadPacket(packet);
// free the previous packet
freePacket... | [
"public",
"void",
"setLastReadPacket",
"(",
"int",
"channelId",
",",
"Packet",
"packet",
")",
"{",
"final",
"ChannelInfo",
"info",
"=",
"getChannelInfo",
"(",
"channelId",
")",
";",
"// grab last packet\r",
"Packet",
"prevPacket",
"=",
"info",
".",
"getReadPacket"... | Setter for last read packet.
@param channelId
Channel id
@param packet
Packet | [
"Setter",
"for",
"last",
"read",
"packet",
"."
] | train | https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/codec/RTMP.java#L244-L252 |
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_phonebook_bookKey_DELETE | public void billingAccount_phonebook_bookKey_DELETE(String billingAccount, String bookKey) throws IOException {
String qPath = "/telephony/{billingAccount}/phonebook/{bookKey}";
StringBuilder sb = path(qPath, billingAccount, bookKey);
exec(qPath, "DELETE", sb.toString(), null);
} | java | public void billingAccount_phonebook_bookKey_DELETE(String billingAccount, String bookKey) throws IOException {
String qPath = "/telephony/{billingAccount}/phonebook/{bookKey}";
StringBuilder sb = path(qPath, billingAccount, bookKey);
exec(qPath, "DELETE", sb.toString(), null);
} | [
"public",
"void",
"billingAccount_phonebook_bookKey_DELETE",
"(",
"String",
"billingAccount",
",",
"String",
"bookKey",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/telephony/{billingAccount}/phonebook/{bookKey}\"",
";",
"StringBuilder",
"sb",
"=",
"path",... | Delete a phonebook
REST: DELETE /telephony/{billingAccount}/phonebook/{bookKey}
@param billingAccount [required] The name of your billingAccount
@param bookKey [required] Identifier of the phonebook | [
"Delete",
"a",
"phonebook"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L5596-L5600 |
ngageoint/geopackage-core-java | src/main/java/mil/nga/geopackage/extension/index/FeatureTableCoreIndex.java | FeatureTableCoreIndex.deleteIndex | public int deleteIndex(long geomId) {
int deleted = 0;
GeometryIndexKey key = new GeometryIndexKey(tableName, geomId);
try {
deleted = geometryIndexDao.deleteById(key);
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to delete index, GeoPackage: "
+ geoPackage.getName() + ", ... | java | public int deleteIndex(long geomId) {
int deleted = 0;
GeometryIndexKey key = new GeometryIndexKey(tableName, geomId);
try {
deleted = geometryIndexDao.deleteById(key);
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to delete index, GeoPackage: "
+ geoPackage.getName() + ", ... | [
"public",
"int",
"deleteIndex",
"(",
"long",
"geomId",
")",
"{",
"int",
"deleted",
"=",
"0",
";",
"GeometryIndexKey",
"key",
"=",
"new",
"GeometryIndexKey",
"(",
"tableName",
",",
"geomId",
")",
";",
"try",
"{",
"deleted",
"=",
"geometryIndexDao",
".",
"de... | Delete the index for the geometry id
@param geomId
geometry id
@return deleted rows, should be 0 or 1 | [
"Delete",
"the",
"index",
"for",
"the",
"geometry",
"id"
] | train | https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/index/FeatureTableCoreIndex.java#L351-L363 |
geomajas/geomajas-project-client-gwt | common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java | HtmlBuilder.tagStyleHtmlContent | public static String tagStyleHtmlContent(String tag, String style, String... content) {
return openTagStyleHtmlContent(tag, style, content) + closeTag(tag);
} | java | public static String tagStyleHtmlContent(String tag, String style, String... content) {
return openTagStyleHtmlContent(tag, style, content) + closeTag(tag);
} | [
"public",
"static",
"String",
"tagStyleHtmlContent",
"(",
"String",
"tag",
",",
"String",
"style",
",",
"String",
"...",
"content",
")",
"{",
"return",
"openTagStyleHtmlContent",
"(",
"tag",
",",
"style",
",",
"content",
")",
"+",
"closeTag",
"(",
"tag",
")"... | Build a String containing a HTML opening tag with given CSS style attribute(s), HTML content and closing tag.
@param tag String name of HTML tag
@param style style for tag (plain CSS)
@param content content string
@return HTML tag element as string | [
"Build",
"a",
"String",
"containing",
"a",
"HTML",
"opening",
"tag",
"with",
"given",
"CSS",
"style",
"attribute",
"(",
"s",
")",
"HTML",
"content",
"and",
"closing",
"tag",
"."
] | train | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java#L313-L315 |
moparisthebest/beehive | beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlBean.java | ControlBean.setControlProperty | protected void setControlProperty(PropertyKey key, Object o)
{
AnnotationConstraintValidator.validate(key, o);
_properties.setProperty(key, o);
} | java | protected void setControlProperty(PropertyKey key, Object o)
{
AnnotationConstraintValidator.validate(key, o);
_properties.setProperty(key, o);
} | [
"protected",
"void",
"setControlProperty",
"(",
"PropertyKey",
"key",
",",
"Object",
"o",
")",
"{",
"AnnotationConstraintValidator",
".",
"validate",
"(",
"key",
",",
"o",
")",
";",
"_properties",
".",
"setProperty",
"(",
"key",
",",
"o",
")",
";",
"}"
] | Sets a property on the ControlBean instance. All generated property setter methods
will delegate down to this method. | [
"Sets",
"a",
"property",
"on",
"the",
"ControlBean",
"instance",
".",
"All",
"generated",
"property",
"setter",
"methods",
"will",
"delegate",
"down",
"to",
"this",
"method",
"."
] | train | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlBean.java#L639-L643 |
apache/incubator-atlas | repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java | DefaultMetadataService.deleteTrait | @Override
public void deleteTrait(String guid, String traitNameToBeDeleted) throws AtlasException {
guid = ParamChecker.notEmpty(guid, "entity id");
traitNameToBeDeleted = ParamChecker.notEmpty(traitNameToBeDeleted, "trait name");
// ensure trait type is already registered w... | java | @Override
public void deleteTrait(String guid, String traitNameToBeDeleted) throws AtlasException {
guid = ParamChecker.notEmpty(guid, "entity id");
traitNameToBeDeleted = ParamChecker.notEmpty(traitNameToBeDeleted, "trait name");
// ensure trait type is already registered w... | [
"@",
"Override",
"public",
"void",
"deleteTrait",
"(",
"String",
"guid",
",",
"String",
"traitNameToBeDeleted",
")",
"throws",
"AtlasException",
"{",
"guid",
"=",
"ParamChecker",
".",
"notEmpty",
"(",
"guid",
",",
"\"entity id\"",
")",
";",
"traitNameToBeDeleted",... | Deletes a given trait from an existing entity represented by a guid.
@param guid globally unique identifier for the entity
@param traitNameToBeDeleted name of the trait
@throws AtlasException | [
"Deletes",
"a",
"given",
"trait",
"from",
"an",
"existing",
"entity",
"represented",
"by",
"a",
"guid",
"."
] | train | https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java#L663-L679 |
beanshell/beanshell | src/main/java/bsh/ClassGenerator.java | ClassGenerator.generateClass | public Class<?> generateClass(String name, Modifiers modifiers, Class<?>[] interfaces, Class<?> superClass, BSHBlock block, Type type, CallStack callstack, Interpreter interpreter) throws EvalError {
// Delegate to the static method
return generateClassImpl(name, modifiers, interfaces, superClass, block... | java | public Class<?> generateClass(String name, Modifiers modifiers, Class<?>[] interfaces, Class<?> superClass, BSHBlock block, Type type, CallStack callstack, Interpreter interpreter) throws EvalError {
// Delegate to the static method
return generateClassImpl(name, modifiers, interfaces, superClass, block... | [
"public",
"Class",
"<",
"?",
">",
"generateClass",
"(",
"String",
"name",
",",
"Modifiers",
"modifiers",
",",
"Class",
"<",
"?",
">",
"[",
"]",
"interfaces",
",",
"Class",
"<",
"?",
">",
"superClass",
",",
"BSHBlock",
"block",
",",
"Type",
"type",
",",... | Parse the BSHBlock for the class definition and generate the class. | [
"Parse",
"the",
"BSHBlock",
"for",
"the",
"class",
"definition",
"and",
"generate",
"the",
"class",
"."
] | train | https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/ClassGenerator.java#L53-L56 |
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.addCustomPrebuiltEntity | public UUID addCustomPrebuiltEntity(UUID appId, String versionId, PrebuiltDomainModelCreateObject prebuiltDomainModelCreateObject) {
return addCustomPrebuiltEntityWithServiceResponseAsync(appId, versionId, prebuiltDomainModelCreateObject).toBlocking().single().body();
} | java | public UUID addCustomPrebuiltEntity(UUID appId, String versionId, PrebuiltDomainModelCreateObject prebuiltDomainModelCreateObject) {
return addCustomPrebuiltEntityWithServiceResponseAsync(appId, versionId, prebuiltDomainModelCreateObject).toBlocking().single().body();
} | [
"public",
"UUID",
"addCustomPrebuiltEntity",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"PrebuiltDomainModelCreateObject",
"prebuiltDomainModelCreateObject",
")",
"{",
"return",
"addCustomPrebuiltEntityWithServiceResponseAsync",
"(",
"appId",
",",
"versionId",
","... | Adds a custom prebuilt entity model to the application.
@param appId The application ID.
@param versionId The version ID.
@param prebuiltDomainModelCreateObject A model object containing the name of the custom prebuilt entity and the name of the domain to which this model belongs.
@throws IllegalArgumentException thro... | [
"Adds",
"a",
"custom",
"prebuilt",
"entity",
"model",
"to",
"the",
"application",
"."
] | 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#L5889-L5891 |
apache/incubator-atlas | webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java | EntityREST.getClassification | @GET
@Path("/guid/{guid}/classification/{classificationName}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasClassification getClassification(@PathParam("guid") String guid, @PathParam("classificationName") final String classificationName) throws AtlasBaseException {
AtlasPerfTracer perf = null;
... | java | @GET
@Path("/guid/{guid}/classification/{classificationName}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasClassification getClassification(@PathParam("guid") String guid, @PathParam("classificationName") final String classificationName) throws AtlasBaseException {
AtlasPerfTracer perf = null;
... | [
"@",
"GET",
"@",
"Path",
"(",
"\"/guid/{guid}/classification/{classificationName}\"",
")",
"@",
"Produces",
"(",
"Servlets",
".",
"JSON_MEDIA_TYPE",
")",
"public",
"AtlasClassification",
"getClassification",
"(",
"@",
"PathParam",
"(",
"\"guid\"",
")",
"String",
"guid... | Gets the list of classifications for a given entity represented by a guid.
@param guid globally unique identifier for the entity
@return classification for the given entity guid | [
"Gets",
"the",
"list",
"of",
"classifications",
"for",
"a",
"given",
"entity",
"represented",
"by",
"a",
"guid",
"."
] | train | https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java#L276-L296 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/partition/impl/PartitionReplicaFragmentVersions.java | PartitionReplicaFragmentVersions.setVersions | private void setVersions(long[] newVersions, int fromReplica) {
int fromIndex = fromReplica - 1;
int len = newVersions.length - fromIndex;
arraycopy(newVersions, fromIndex, versions, fromIndex, len);
} | java | private void setVersions(long[] newVersions, int fromReplica) {
int fromIndex = fromReplica - 1;
int len = newVersions.length - fromIndex;
arraycopy(newVersions, fromIndex, versions, fromIndex, len);
} | [
"private",
"void",
"setVersions",
"(",
"long",
"[",
"]",
"newVersions",
",",
"int",
"fromReplica",
")",
"{",
"int",
"fromIndex",
"=",
"fromReplica",
"-",
"1",
";",
"int",
"len",
"=",
"newVersions",
".",
"length",
"-",
"fromIndex",
";",
"arraycopy",
"(",
... | Change versions for all replicas with an index greater than {@code fromReplica} to the new replica versions | [
"Change",
"versions",
"for",
"all",
"replicas",
"with",
"an",
"index",
"greater",
"than",
"{"
] | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/impl/PartitionReplicaFragmentVersions.java#L87-L91 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java | TrainingsImpl.getTaggedImagesWithServiceResponseAsync | public Observable<ServiceResponse<List<Image>>> getTaggedImagesWithServiceResponseAsync(UUID projectId, GetTaggedImagesOptionalParameter getTaggedImagesOptionalParameter) {
if (projectId == null) {
throw new IllegalArgumentException("Parameter projectId is required and cannot be null.");
}
... | java | public Observable<ServiceResponse<List<Image>>> getTaggedImagesWithServiceResponseAsync(UUID projectId, GetTaggedImagesOptionalParameter getTaggedImagesOptionalParameter) {
if (projectId == null) {
throw new IllegalArgumentException("Parameter projectId is required and cannot be null.");
}
... | [
"public",
"Observable",
"<",
"ServiceResponse",
"<",
"List",
"<",
"Image",
">",
">",
">",
"getTaggedImagesWithServiceResponseAsync",
"(",
"UUID",
"projectId",
",",
"GetTaggedImagesOptionalParameter",
"getTaggedImagesOptionalParameter",
")",
"{",
"if",
"(",
"projectId",
... | Get tagged images for a given project iteration.
This API supports batching and range selection. By default it will only return first 50 images matching images.
Use the {take} and {skip} parameters to control how many images to return in a given batch.
The filtering is on an and/or relationship. For example, if the pro... | [
"Get",
"tagged",
"images",
"for",
"a",
"given",
"project",
"iteration",
".",
"This",
"API",
"supports",
"batching",
"and",
"range",
"selection",
".",
"By",
"default",
"it",
"will",
"only",
"return",
"first",
"50",
"images",
"matching",
"images",
".",
"Use",
... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L5028-L5042 |
RestComm/sip-servlets | sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java | FacebookRestClient.profile_setFBML | public boolean profile_setFBML(CharSequence profileFbmlMarkup, CharSequence profileActionFbmlMarkup)
throws FacebookException, IOException {
return profile_setFBML(profileFbmlMarkup, profileActionFbmlMarkup, /* mobileFbmlMarkup */null, /* profileId */null);
} | java | public boolean profile_setFBML(CharSequence profileFbmlMarkup, CharSequence profileActionFbmlMarkup)
throws FacebookException, IOException {
return profile_setFBML(profileFbmlMarkup, profileActionFbmlMarkup, /* mobileFbmlMarkup */null, /* profileId */null);
} | [
"public",
"boolean",
"profile_setFBML",
"(",
"CharSequence",
"profileFbmlMarkup",
",",
"CharSequence",
"profileActionFbmlMarkup",
")",
"throws",
"FacebookException",
",",
"IOException",
"{",
"return",
"profile_setFBML",
"(",
"profileFbmlMarkup",
",",
"profileActionFbmlMarkup"... | Sets the FBML for the profile box and profile actions for the logged-in user.
Refer to the FBML documentation for a description of the markup and its role in various contexts.
@param profileFbmlMarkup the FBML for the profile box
@param profileActionFbmlMarkup the FBML for the profile actions
@return a boolean indicati... | [
"Sets",
"the",
"FBML",
"for",
"the",
"profile",
"box",
"and",
"profile",
"actions",
"for",
"the",
"logged",
"-",
"in",
"user",
".",
"Refer",
"to",
"the",
"FBML",
"documentation",
"for",
"a",
"description",
"of",
"the",
"markup",
"and",
"its",
"role",
"in... | train | https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java#L1515-L1518 |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/wrapper/PAbstractObject.java | PAbstractObject.getInt | @Override
public final int getInt(final String key) {
Integer result = optInt(key);
if (result == null) {
throw new ObjectMissingException(this, key);
}
return result;
} | java | @Override
public final int getInt(final String key) {
Integer result = optInt(key);
if (result == null) {
throw new ObjectMissingException(this, key);
}
return result;
} | [
"@",
"Override",
"public",
"final",
"int",
"getInt",
"(",
"final",
"String",
"key",
")",
"{",
"Integer",
"result",
"=",
"optInt",
"(",
"key",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"throw",
"new",
"ObjectMissingException",
"(",
"this",
... | Get a property as an int or throw an exception.
@param key the property name | [
"Get",
"a",
"property",
"as",
"an",
"int",
"or",
"throw",
"an",
"exception",
"."
] | train | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/PAbstractObject.java#L50-L57 |
Netflix/dyno | dyno-core/src/main/java/com/netflix/dyno/connectionpool/impl/HostStatusTracker.java | HostStatusTracker.checkIfChanged | public boolean checkIfChanged(Collection<Host> hostsUp, Collection<Host> hostsDown) {
boolean changed = activeSetChanged(hostsUp) || inactiveSetChanged(hostsUp, hostsDown);
if (changed && logger.isDebugEnabled()) {
Set<Host> changedHostsUp = new HashSet<>(hostsUp);
changedHostsUp.removeAll(activeHosts);
c... | java | public boolean checkIfChanged(Collection<Host> hostsUp, Collection<Host> hostsDown) {
boolean changed = activeSetChanged(hostsUp) || inactiveSetChanged(hostsUp, hostsDown);
if (changed && logger.isDebugEnabled()) {
Set<Host> changedHostsUp = new HashSet<>(hostsUp);
changedHostsUp.removeAll(activeHosts);
c... | [
"public",
"boolean",
"checkIfChanged",
"(",
"Collection",
"<",
"Host",
">",
"hostsUp",
",",
"Collection",
"<",
"Host",
">",
"hostsDown",
")",
"{",
"boolean",
"changed",
"=",
"activeSetChanged",
"(",
"hostsUp",
")",
"||",
"inactiveSetChanged",
"(",
"hostsUp",
"... | Helper method that checks if anything has changed b/w the current state and the new set of hosts up and down
@param hostsUp
@param hostsDown
@return true/false indicating whether the set of hosts has changed or not. | [
"Helper",
"method",
"that",
"checks",
"if",
"anything",
"has",
"changed",
"b",
"/",
"w",
"the",
"current",
"state",
"and",
"the",
"new",
"set",
"of",
"hosts",
"up",
"and",
"down"
] | train | https://github.com/Netflix/dyno/blob/158f807083ea8e9b09c8089cb07f98e954ad5b23/dyno-core/src/main/java/com/netflix/dyno/connectionpool/impl/HostStatusTracker.java#L130-L143 |
alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java | Postcard.withBundle | public Postcard withBundle(@Nullable String key, @Nullable Bundle value) {
mBundle.putBundle(key, value);
return this;
} | java | public Postcard withBundle(@Nullable String key, @Nullable Bundle value) {
mBundle.putBundle(key, value);
return this;
} | [
"public",
"Postcard",
"withBundle",
"(",
"@",
"Nullable",
"String",
"key",
",",
"@",
"Nullable",
"Bundle",
"value",
")",
"{",
"mBundle",
".",
"putBundle",
"(",
"key",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Inserts a Bundle value into the mapping of this Bundle, replacing
any existing value for the given key. Either key or value may be null.
@param key a String, or null
@param value a Bundle object, or null
@return current | [
"Inserts",
"a",
"Bundle",
"value",
"into",
"the",
"mapping",
"of",
"this",
"Bundle",
"replacing",
"any",
"existing",
"value",
"for",
"the",
"given",
"key",
".",
"Either",
"key",
"or",
"value",
"may",
"be",
"null",
"."
] | train | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java#L546-L549 |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/security/util/Util.java | Util.extractUserNameFromScopedName | public static String extractUserNameFromScopedName(byte[] scopedNameBytes) throws UnsupportedEncodingException {
String scopedUserName = new String(scopedNameBytes, "UTF8");
return extractUserNameFromScopedName(scopedUserName);
} | java | public static String extractUserNameFromScopedName(byte[] scopedNameBytes) throws UnsupportedEncodingException {
String scopedUserName = new String(scopedNameBytes, "UTF8");
return extractUserNameFromScopedName(scopedUserName);
} | [
"public",
"static",
"String",
"extractUserNameFromScopedName",
"(",
"byte",
"[",
"]",
"scopedNameBytes",
")",
"throws",
"UnsupportedEncodingException",
"{",
"String",
"scopedUserName",
"=",
"new",
"String",
"(",
"scopedNameBytes",
",",
"\"UTF8\"",
")",
";",
"return",
... | See csiv2 spec 16.2.5 par. 63-64. We extract the username if any and un-escape any
escaped \ and @ characters.
@param scopedNameBytes
@return
@throws UnsupportedEncodingException | [
"See",
"csiv2",
"spec",
"16",
".",
"2",
".",
"5",
"par",
".",
"63",
"-",
"64",
".",
"We",
"extract",
"the",
"username",
"if",
"any",
"and",
"un",
"-",
"escape",
"any",
"escaped",
"\\",
"and",
"@",
"characters",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/security/util/Util.java#L317-L320 |
fuinorg/utils4j | src/main/java/org/fuin/utils4j/Utils4J.java | Utils4J.createInstance | public static Object createInstance(final String className, final ClassLoader classLoader) {
checkNotNull("className", className);
checkNotNull("classLoader", classLoader);
try {
final Class<?> clasz = Class.forName(className, true, classLoader);
return clasz.newInst... | java | public static Object createInstance(final String className, final ClassLoader classLoader) {
checkNotNull("className", className);
checkNotNull("classLoader", classLoader);
try {
final Class<?> clasz = Class.forName(className, true, classLoader);
return clasz.newInst... | [
"public",
"static",
"Object",
"createInstance",
"(",
"final",
"String",
"className",
",",
"final",
"ClassLoader",
"classLoader",
")",
"{",
"checkNotNull",
"(",
"\"className\"",
",",
"className",
")",
";",
"checkNotNull",
"(",
"\"classLoader\"",
",",
"classLoader",
... | Create an instance with Class.forName(..) and wrap all exceptions into RuntimeExceptions.
@param className
Full qualified class name - Cannot be <code>null</code>.
@param classLoader
Dedicated class loader to use - Cannot be <code>NULL</code>.
@return New instance of the class. | [
"Create",
"an",
"instance",
"with",
"Class",
".",
"forName",
"(",
"..",
")",
"and",
"wrap",
"all",
"exceptions",
"into",
"RuntimeExceptions",
"."
] | train | https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/Utils4J.java#L194-L207 |
JodaOrg/joda-time | src/main/java/org/joda/time/PeriodType.java | PeriodType.setIndexedField | boolean setIndexedField(ReadablePeriod period, int index, int[] values, int newValue) {
int realIndex = iIndices[index];
if (realIndex == -1) {
throw new UnsupportedOperationException("Field is not supported");
}
values[realIndex] = newValue;
return true;
} | java | boolean setIndexedField(ReadablePeriod period, int index, int[] values, int newValue) {
int realIndex = iIndices[index];
if (realIndex == -1) {
throw new UnsupportedOperationException("Field is not supported");
}
values[realIndex] = newValue;
return true;
} | [
"boolean",
"setIndexedField",
"(",
"ReadablePeriod",
"period",
",",
"int",
"index",
",",
"int",
"[",
"]",
"values",
",",
"int",
"newValue",
")",
"{",
"int",
"realIndex",
"=",
"iIndices",
"[",
"index",
"]",
";",
"if",
"(",
"realIndex",
"==",
"-",
"1",
"... | Sets the indexed field part of the period.
@param period the period to query
@param index the index to use
@param values the array to populate
@param newValue the value to set
@throws UnsupportedOperationException if not supported | [
"Sets",
"the",
"indexed",
"field",
"part",
"of",
"the",
"period",
"."
] | train | https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/PeriodType.java#L687-L694 |
sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/vim/VimGenerator2.java | VimGenerator2.generateKeywords | protected void generateKeywords(IStyleAppendable it, String family, VimSyntaxGroup color, Iterable<String> keywords) {
appendComment(it, "keywords for the '" + family + "' family."); //$NON-NLS-1$ //$NON-NLS-2$
final Iterator<String> iterator = keywords.iterator();
if (iterator.hasNext()) {
it.append("syn keyw... | java | protected void generateKeywords(IStyleAppendable it, String family, VimSyntaxGroup color, Iterable<String> keywords) {
appendComment(it, "keywords for the '" + family + "' family."); //$NON-NLS-1$ //$NON-NLS-2$
final Iterator<String> iterator = keywords.iterator();
if (iterator.hasNext()) {
it.append("syn keyw... | [
"protected",
"void",
"generateKeywords",
"(",
"IStyleAppendable",
"it",
",",
"String",
"family",
",",
"VimSyntaxGroup",
"color",
",",
"Iterable",
"<",
"String",
">",
"keywords",
")",
"{",
"appendComment",
"(",
"it",
",",
"\"keywords for the '\"",
"+",
"family",
... | Generate the Vim keywords.
@param it the receiver of the generated elements.
@param family the name of the keyword family.
@param color the color to be associated to the elements.
@param keywords the keywords. | [
"Generate",
"the",
"Vim",
"keywords",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/vim/VimGenerator2.java#L311-L326 |
jmchilton/galaxy-bootstrap | src/main/java/com/github/jmchilton/galaxybootstrap/GalaxyProperties.java | GalaxyProperties.getConfigSampleIni | private File getConfigSampleIni(File galaxyRoot) {
if (isPre20141006Release(galaxyRoot)) {
return new File(galaxyRoot, "universe_wsgi.ini.sample");
} else {
File configDirectory = new File(galaxyRoot, CONFIG_DIR_NAME);
return new File(configDirectory, "galaxy.ini.sample");
}
} | java | private File getConfigSampleIni(File galaxyRoot) {
if (isPre20141006Release(galaxyRoot)) {
return new File(galaxyRoot, "universe_wsgi.ini.sample");
} else {
File configDirectory = new File(galaxyRoot, CONFIG_DIR_NAME);
return new File(configDirectory, "galaxy.ini.sample");
}
} | [
"private",
"File",
"getConfigSampleIni",
"(",
"File",
"galaxyRoot",
")",
"{",
"if",
"(",
"isPre20141006Release",
"(",
"galaxyRoot",
")",
")",
"{",
"return",
"new",
"File",
"(",
"galaxyRoot",
",",
"\"universe_wsgi.ini.sample\"",
")",
";",
"}",
"else",
"{",
"Fil... | Gets the sample config ini for this Galaxy installation.
@param galaxyRoot The root directory of Galaxy.
@return A File object for the sample config ini for Galaxy. | [
"Gets",
"the",
"sample",
"config",
"ini",
"for",
"this",
"Galaxy",
"installation",
"."
] | train | https://github.com/jmchilton/galaxy-bootstrap/blob/4a899f5e6ec0c9f6f4b9b21d5a0320e5925ec649/src/main/java/com/github/jmchilton/galaxybootstrap/GalaxyProperties.java#L142-L149 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/utils/KerasModelUtils.java | KerasModelUtils.determineKerasBackend | public static String determineKerasBackend(Map<String, Object> modelConfig, KerasModelConfiguration config) {
String kerasBackend = null;
if (!modelConfig.containsKey(config.getFieldBackend())) {
// TODO: H5 files unfortunately do not seem to have this property in keras 1.
log.wa... | java | public static String determineKerasBackend(Map<String, Object> modelConfig, KerasModelConfiguration config) {
String kerasBackend = null;
if (!modelConfig.containsKey(config.getFieldBackend())) {
// TODO: H5 files unfortunately do not seem to have this property in keras 1.
log.wa... | [
"public",
"static",
"String",
"determineKerasBackend",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"modelConfig",
",",
"KerasModelConfiguration",
"config",
")",
"{",
"String",
"kerasBackend",
"=",
"null",
";",
"if",
"(",
"!",
"modelConfig",
".",
"containsKey"... | Determine Keras backend
@param modelConfig parsed model configuration for keras model
@param config basic model configuration (KerasModelConfiguration)
@return Keras backend string
@throws InvalidKerasConfigurationException Invalid Keras config | [
"Determine",
"Keras",
"backend"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/utils/KerasModelUtils.java#L126-L137 |
BorderTech/wcomponents | wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/thumbnail/ThumbnailUtil.java | ThumbnailUtil.createThumbnail | public static com.github.bordertech.wcomponents.Image createThumbnail(final InputStream is,
final String name,
final Dimension scaledSize, final String mimeType) {
final Dimension scale = scaledSize == null ? THUMBNAIL_SCALE_SIZE : scaledSize;
// Generate thumbnail for image files
if (is != null && mimeTyp... | java | public static com.github.bordertech.wcomponents.Image createThumbnail(final InputStream is,
final String name,
final Dimension scaledSize, final String mimeType) {
final Dimension scale = scaledSize == null ? THUMBNAIL_SCALE_SIZE : scaledSize;
// Generate thumbnail for image files
if (is != null && mimeTyp... | [
"public",
"static",
"com",
".",
"github",
".",
"bordertech",
".",
"wcomponents",
".",
"Image",
"createThumbnail",
"(",
"final",
"InputStream",
"is",
",",
"final",
"String",
"name",
",",
"final",
"Dimension",
"scaledSize",
",",
"final",
"String",
"mimeType",
")... | This method takes a input document (represented by an {@link InputStream}) and returns a byte[] representing a
JPEG "thumb nail" of a given page of the document. It can do this for a limited number of input document
"types"images.
@param is The {@link InputStream} representing the input document.
@param name The name ... | [
"This",
"method",
"takes",
"a",
"input",
"document",
"(",
"represented",
"by",
"an",
"{",
"@link",
"InputStream",
"}",
")",
"and",
"returns",
"a",
"byte",
"[]",
"representing",
"a",
"JPEG",
"thumb",
"nail",
"of",
"a",
"given",
"page",
"of",
"the",
"docum... | train | https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/thumbnail/ThumbnailUtil.java#L134-L152 |
lessthanoptimal/ejml | main/ejml-ddense/src/org/ejml/dense/row/mult/VectorVectorMult_DDRM.java | VectorVectorMult_DDRM.outerProd | public static void outerProd(DMatrixD1 x, DMatrixD1 y, DMatrix1Row A ) {
int m = A.numRows;
int n = A.numCols;
int index = 0;
for( int i = 0; i < m; i++ ) {
double xdat = x.get(i);
for( int j = 0; j < n; j++ ) {
A.set(index++ , xdat*y.get(j) );
... | java | public static void outerProd(DMatrixD1 x, DMatrixD1 y, DMatrix1Row A ) {
int m = A.numRows;
int n = A.numCols;
int index = 0;
for( int i = 0; i < m; i++ ) {
double xdat = x.get(i);
for( int j = 0; j < n; j++ ) {
A.set(index++ , xdat*y.get(j) );
... | [
"public",
"static",
"void",
"outerProd",
"(",
"DMatrixD1",
"x",
",",
"DMatrixD1",
"y",
",",
"DMatrix1Row",
"A",
")",
"{",
"int",
"m",
"=",
"A",
".",
"numRows",
";",
"int",
"n",
"=",
"A",
".",
"numCols",
";",
"int",
"index",
"=",
"0",
";",
"for",
... | <p>
Sets A ∈ ℜ <sup>m × n</sup> equal to an outer product multiplication of the two
vectors. This is also known as a rank-1 operation.<br>
<br>
A = x * y'
where x ∈ ℜ <sup>m</sup> and y ∈ ℜ <sup>n</sup> are vectors.
</p>
<p>
Which is equivalent to: A<sub>ij</sub> = x<sub>i</sub>*y<s... | [
"<p",
">",
"Sets",
"A",
"&isin",
";",
"&real",
";",
"<sup",
">",
"m",
"×",
";",
"n<",
"/",
"sup",
">",
"equal",
"to",
"an",
"outer",
"product",
"multiplication",
"of",
"the",
"two",
"vectors",
".",
"This",
"is",
"also",
"known",
"as",
"a",
"ra... | train | https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/mult/VectorVectorMult_DDRM.java#L157-L168 |
alibaba/canal | client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/bind/RelaxedDataBinder.java | RelaxedDataBinder.normalizePath | protected String normalizePath(BeanWrapper wrapper, String path) {
return initializePath(wrapper, new RelaxedDataBinder.BeanPath(path), 0);
} | java | protected String normalizePath(BeanWrapper wrapper, String path) {
return initializePath(wrapper, new RelaxedDataBinder.BeanPath(path), 0);
} | [
"protected",
"String",
"normalizePath",
"(",
"BeanWrapper",
"wrapper",
",",
"String",
"path",
")",
"{",
"return",
"initializePath",
"(",
"wrapper",
",",
"new",
"RelaxedDataBinder",
".",
"BeanPath",
"(",
"path",
")",
",",
"0",
")",
";",
"}"
] | Normalize a bean property path to a format understood by a BeanWrapper. This
is used so that
<ul>
<li>Fuzzy matching can be employed for bean property names</li>
<li>Period separators can be used instead of indexing ([...]) for map
keys</li>
</ul>
@param wrapper a bean wrapper for the object to bind
@param path the be... | [
"Normalize",
"a",
"bean",
"property",
"path",
"to",
"a",
"format",
"understood",
"by",
"a",
"BeanWrapper",
".",
"This",
"is",
"used",
"so",
"that",
"<ul",
">",
"<li",
">",
"Fuzzy",
"matching",
"can",
"be",
"employed",
"for",
"bean",
"property",
"names<",
... | train | https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/bind/RelaxedDataBinder.java#L239-L241 |
gallandarakhneorg/afc | core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java | XMLUtil.readXMLFragment | public static DocumentFragment readXMLFragment(URL file, boolean skipRoot)
throws IOException, SAXException, ParserConfigurationException {
assert file != null : AssertMessages.notNullParameter();
return readXMLFragment(file.openStream(), skipRoot);
} | java | public static DocumentFragment readXMLFragment(URL file, boolean skipRoot)
throws IOException, SAXException, ParserConfigurationException {
assert file != null : AssertMessages.notNullParameter();
return readXMLFragment(file.openStream(), skipRoot);
} | [
"public",
"static",
"DocumentFragment",
"readXMLFragment",
"(",
"URL",
"file",
",",
"boolean",
"skipRoot",
")",
"throws",
"IOException",
",",
"SAXException",
",",
"ParserConfigurationException",
"{",
"assert",
"file",
"!=",
"null",
":",
"AssertMessages",
".",
"notNu... | Read an XML fragment from an XML file.
The XML file is well-formed. It means that the fragment will contains a single element: the root element
within the input file.
@param file is the file to read
@param skipRoot if {@code true} the root element itself is not part of the fragment, and the children
of the root elemen... | [
"Read",
"an",
"XML",
"fragment",
"from",
"an",
"XML",
"file",
".",
"The",
"XML",
"file",
"is",
"well",
"-",
"formed",
".",
"It",
"means",
"that",
"the",
"fragment",
"will",
"contains",
"a",
"single",
"element",
":",
"the",
"root",
"element",
"within",
... | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L2154-L2158 |
spotbugs/spotbugs | spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java | Frame.setValue | public void setValue(int n, ValueType value) {
if (VERIFY_INTEGRITY && value == null) {
throw new IllegalArgumentException();
}
if (!isValid()) {
throw new IllegalStateException("accessing top or bottom frame");
}
slotList.set(n, value);
} | java | public void setValue(int n, ValueType value) {
if (VERIFY_INTEGRITY && value == null) {
throw new IllegalArgumentException();
}
if (!isValid()) {
throw new IllegalStateException("accessing top or bottom frame");
}
slotList.set(n, value);
} | [
"public",
"void",
"setValue",
"(",
"int",
"n",
",",
"ValueType",
"value",
")",
"{",
"if",
"(",
"VERIFY_INTEGRITY",
"&&",
"value",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"if",
"(",
"!",
"isValid",
"(",
")... | Set the value at the <i>n</i>th slot.
@param n
the slot in which to set a new value
@param value
the value to set | [
"Set",
"the",
"value",
"at",
"the",
"<i",
">",
"n<",
"/",
"i",
">",
"th",
"slot",
"."
] | train | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java#L552-L560 |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/stat/gslb/gslbservice_stats.java | gslbservice_stats.get | public static gslbservice_stats get(nitro_service service, String servicename) throws Exception{
gslbservice_stats obj = new gslbservice_stats();
obj.set_servicename(servicename);
gslbservice_stats response = (gslbservice_stats) obj.stat_resource(service);
return response;
} | java | public static gslbservice_stats get(nitro_service service, String servicename) throws Exception{
gslbservice_stats obj = new gslbservice_stats();
obj.set_servicename(servicename);
gslbservice_stats response = (gslbservice_stats) obj.stat_resource(service);
return response;
} | [
"public",
"static",
"gslbservice_stats",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"servicename",
")",
"throws",
"Exception",
"{",
"gslbservice_stats",
"obj",
"=",
"new",
"gslbservice_stats",
"(",
")",
";",
"obj",
".",
"set_servicename",
"(",
"service... | Use this API to fetch statistics of gslbservice_stats resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"statistics",
"of",
"gslbservice_stats",
"resource",
"of",
"given",
"name",
"."
] | train | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/gslb/gslbservice_stats.java#L309-L314 |
Stratio/deep-spark | deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java | Cells.getFloat | public Float getFloat(String nameSpace, String cellName) {
return getValue(nameSpace, cellName, Float.class);
} | java | public Float getFloat(String nameSpace, String cellName) {
return getValue(nameSpace, cellName, Float.class);
} | [
"public",
"Float",
"getFloat",
"(",
"String",
"nameSpace",
",",
"String",
"cellName",
")",
"{",
"return",
"getValue",
"(",
"nameSpace",
",",
"cellName",
",",
"Float",
".",
"class",
")",
";",
"}"
] | Returns the {@code Float} value of the {@link Cell} (associated to {@code table}) whose name iscellName, or null
if this Cells object contains no cell whose name is cellName.
@param nameSpace the name of the owning table
@param cellName the name of the Cell we want to retrieve from this Cells object.
@return the {@co... | [
"Returns",
"the",
"{",
"@code",
"Float",
"}",
"value",
"of",
"the",
"{",
"@link",
"Cell",
"}",
"(",
"associated",
"to",
"{",
"@code",
"table",
"}",
")",
"whose",
"name",
"iscellName",
"or",
"null",
"if",
"this",
"Cells",
"object",
"contains",
"no",
"ce... | train | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java#L1075-L1077 |
SimiaCryptus/utilities | java-util/src/main/java/com/simiacryptus/text/CompressionUtil.java | CompressionUtil.encodeLZ | public static byte[] encodeLZ(String data, String dictionary) {
byte[] asBytes = new byte[0];
try {
asBytes = data.getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
return encodeLZ(asBytes, dictionary);
} | java | public static byte[] encodeLZ(String data, String dictionary) {
byte[] asBytes = new byte[0];
try {
asBytes = data.getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
return encodeLZ(asBytes, dictionary);
} | [
"public",
"static",
"byte",
"[",
"]",
"encodeLZ",
"(",
"String",
"data",
",",
"String",
"dictionary",
")",
"{",
"byte",
"[",
"]",
"asBytes",
"=",
"new",
"byte",
"[",
"0",
"]",
";",
"try",
"{",
"asBytes",
"=",
"data",
".",
"getBytes",
"(",
"\"UTF-8\""... | Encode lz byte [ ].
@param data the data
@param dictionary the dictionary
@return the byte [ ] | [
"Encode",
"lz",
"byte",
"[",
"]",
"."
] | train | https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/text/CompressionUtil.java#L52-L60 |
alkacon/opencms-core | src/org/opencms/ui/apps/publishqueue/CmsQueuedTable.java | CmsQueuedTable.onItemClick | void onItemClick(MouseEvents.ClickEvent event, Object itemId, Object propertyId) {
setValue(null);
select(itemId);
if (event.getButton().equals(MouseButton.RIGHT) || (propertyId == null)) {
m_menu.setEntries(
getMenuEntries(),
Collections.singleton(((... | java | void onItemClick(MouseEvents.ClickEvent event, Object itemId, Object propertyId) {
setValue(null);
select(itemId);
if (event.getButton().equals(MouseButton.RIGHT) || (propertyId == null)) {
m_menu.setEntries(
getMenuEntries(),
Collections.singleton(((... | [
"void",
"onItemClick",
"(",
"MouseEvents",
".",
"ClickEvent",
"event",
",",
"Object",
"itemId",
",",
"Object",
"propertyId",
")",
"{",
"setValue",
"(",
"null",
")",
";",
"select",
"(",
"itemId",
")",
";",
"if",
"(",
"event",
".",
"getButton",
"(",
")",
... | Handles the table item clicks, including clicks on images inside of a table item.<p>
@param event the click event
@param itemId of the clicked row
@param propertyId column id | [
"Handles",
"the",
"table",
"item",
"clicks",
"including",
"clicks",
"on",
"images",
"inside",
"of",
"a",
"table",
"item",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/publishqueue/CmsQueuedTable.java#L540-L556 |
google/allocation-instrumenter | src/main/java/com/google/monitoring/runtime/instrumentation/AllocationClassAdapter.java | AllocationClassAdapter.visitMethod | @Override
public MethodVisitor visitMethod(
int access, String base, String desc, String signature, String[] exceptions) {
MethodVisitor mv = cv.visitMethod(access, base, desc, signature, exceptions);
if (mv != null) {
// We need to compute stackmaps (see
// AllocationInstrumenter#instrumen... | java | @Override
public MethodVisitor visitMethod(
int access, String base, String desc, String signature, String[] exceptions) {
MethodVisitor mv = cv.visitMethod(access, base, desc, signature, exceptions);
if (mv != null) {
// We need to compute stackmaps (see
// AllocationInstrumenter#instrumen... | [
"@",
"Override",
"public",
"MethodVisitor",
"visitMethod",
"(",
"int",
"access",
",",
"String",
"base",
",",
"String",
"desc",
",",
"String",
"signature",
",",
"String",
"[",
"]",
"exceptions",
")",
"{",
"MethodVisitor",
"mv",
"=",
"cv",
".",
"visitMethod",
... | For each method in the class being instrumented, <code>visitMethod</code> is called and the
returned MethodVisitor is used to visit the method. Note that a new MethodVisitor is
constructed for each method. | [
"For",
"each",
"method",
"in",
"the",
"class",
"being",
"instrumented",
"<code",
">",
"visitMethod<",
"/",
"code",
">",
"is",
"called",
"and",
"the",
"returned",
"MethodVisitor",
"is",
"used",
"to",
"visit",
"the",
"method",
".",
"Note",
"that",
"a",
"new"... | train | https://github.com/google/allocation-instrumenter/blob/58d8473e8832e51f39ae7aa38328f61c4b747bff/src/main/java/com/google/monitoring/runtime/instrumentation/AllocationClassAdapter.java#L45-L64 |
Azure/azure-sdk-for-java | edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java | DevicesInner.beginDownloadUpdates | public void beginDownloadUpdates(String deviceName, String resourceGroupName) {
beginDownloadUpdatesWithServiceResponseAsync(deviceName, resourceGroupName).toBlocking().single().body();
} | java | public void beginDownloadUpdates(String deviceName, String resourceGroupName) {
beginDownloadUpdatesWithServiceResponseAsync(deviceName, resourceGroupName).toBlocking().single().body();
} | [
"public",
"void",
"beginDownloadUpdates",
"(",
"String",
"deviceName",
",",
"String",
"resourceGroupName",
")",
"{",
"beginDownloadUpdatesWithServiceResponseAsync",
"(",
"deviceName",
",",
"resourceGroupName",
")",
".",
"toBlocking",
"(",
")",
".",
"single",
"(",
")",... | Downloads the updates on a data box edge/gateway device.
@param deviceName The device name.
@param resourceGroupName The resource group name.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by server
@throws RuntimeException all other w... | [
"Downloads",
"the",
"updates",
"on",
"a",
"data",
"box",
"edge",
"/",
"gateway",
"device",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java#L1270-L1272 |
line/armeria | core/src/main/java/com/linecorp/armeria/internal/annotation/AnnotatedElementNameUtil.java | AnnotatedElementNameUtil.findName | static String findName(Header header, Object nameRetrievalTarget) {
requireNonNull(nameRetrievalTarget, "nameRetrievalTarget");
final String value = header.value();
if (DefaultValues.isSpecified(value)) {
checkArgument(!value.isEmpty(), "value is empty");
return value;
... | java | static String findName(Header header, Object nameRetrievalTarget) {
requireNonNull(nameRetrievalTarget, "nameRetrievalTarget");
final String value = header.value();
if (DefaultValues.isSpecified(value)) {
checkArgument(!value.isEmpty(), "value is empty");
return value;
... | [
"static",
"String",
"findName",
"(",
"Header",
"header",
",",
"Object",
"nameRetrievalTarget",
")",
"{",
"requireNonNull",
"(",
"nameRetrievalTarget",
",",
"\"nameRetrievalTarget\"",
")",
";",
"final",
"String",
"value",
"=",
"header",
".",
"value",
"(",
")",
";... | Returns the value of the {@link Header} annotation which is specified on the {@code element} if
the value is not blank. If the value is blank, it returns the name of the specified
{@code nameRetrievalTarget} object which is an instance of {@link Parameter} or {@link Field}.
<p>Note that the name of the specified {@cod... | [
"Returns",
"the",
"value",
"of",
"the",
"{",
"@link",
"Header",
"}",
"annotation",
"which",
"is",
"specified",
"on",
"the",
"{",
"@code",
"element",
"}",
"if",
"the",
"value",
"is",
"not",
"blank",
".",
"If",
"the",
"value",
"is",
"blank",
"it",
"retur... | train | https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/internal/annotation/AnnotatedElementNameUtil.java#L60-L69 |
JakeWharton/NineOldAndroids | library/src/com/nineoldandroids/animation/ValueAnimator.java | ValueAnimator.ofObject | public static ValueAnimator ofObject(TypeEvaluator evaluator, Object... values) {
ValueAnimator anim = new ValueAnimator();
anim.setObjectValues(values);
anim.setEvaluator(evaluator);
return anim;
} | java | public static ValueAnimator ofObject(TypeEvaluator evaluator, Object... values) {
ValueAnimator anim = new ValueAnimator();
anim.setObjectValues(values);
anim.setEvaluator(evaluator);
return anim;
} | [
"public",
"static",
"ValueAnimator",
"ofObject",
"(",
"TypeEvaluator",
"evaluator",
",",
"Object",
"...",
"values",
")",
"{",
"ValueAnimator",
"anim",
"=",
"new",
"ValueAnimator",
"(",
")",
";",
"anim",
".",
"setObjectValues",
"(",
"values",
")",
";",
"anim",
... | Constructs and returns a ValueAnimator that animates between Object values. A single
value implies that that value is the one being animated to. However, this is not typically
useful in a ValueAnimator object because there is no way for the object to determine the
starting value for the animation (unlike ObjectAnimator... | [
"Constructs",
"and",
"returns",
"a",
"ValueAnimator",
"that",
"animates",
"between",
"Object",
"values",
".",
"A",
"single",
"value",
"implies",
"that",
"that",
"value",
"is",
"the",
"one",
"being",
"animated",
"to",
".",
"However",
"this",
"is",
"not",
"typ... | train | https://github.com/JakeWharton/NineOldAndroids/blob/d582f0ec8e79013e9fa96c07986160b52e662e63/library/src/com/nineoldandroids/animation/ValueAnimator.java#L351-L356 |
box/box-java-sdk | src/main/java/com/box/sdk/BoxFolder.java | BoxFolder.deleteMetadata | public void deleteMetadata(String templateName, String scope) {
URL url = METADATA_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID(), scope, templateName);
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "DELETE");
BoxAPIResponse response = request.send();
respons... | java | public void deleteMetadata(String templateName, String scope) {
URL url = METADATA_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID(), scope, templateName);
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "DELETE");
BoxAPIResponse response = request.send();
respons... | [
"public",
"void",
"deleteMetadata",
"(",
"String",
"templateName",
",",
"String",
"scope",
")",
"{",
"URL",
"url",
"=",
"METADATA_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"getAPI",
"(",
")",
".",
"getBaseURL",
"(",
")",
",",
"this",
".",
"getID",
"... | Deletes the metadata on this folder associated with a specified scope and template.
@param templateName the metadata template type name.
@param scope the scope of the template (usually "global" or "enterprise"). | [
"Deletes",
"the",
"metadata",
"on",
"this",
"folder",
"associated",
"with",
"a",
"specified",
"scope",
"and",
"template",
"."
] | train | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFolder.java#L970-L975 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java | DateUtil.round | public static DateTime round(Date date, DateField dateField) {
return new DateTime(round(calendar(date), dateField));
} | java | public static DateTime round(Date date, DateField dateField) {
return new DateTime(round(calendar(date), dateField));
} | [
"public",
"static",
"DateTime",
"round",
"(",
"Date",
"date",
",",
"DateField",
"dateField",
")",
"{",
"return",
"new",
"DateTime",
"(",
"round",
"(",
"calendar",
"(",
"date",
")",
",",
"dateField",
")",
")",
";",
"}"
] | 修改日期为某个时间字段四舍五入时间
@param date {@link Date}
@param dateField 时间字段
@return {@link DateTime}
@since 4.5.7 | [
"修改日期为某个时间字段四舍五入时间"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L779-L781 |
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.createCustomPrebuiltEntityRoleAsync | public Observable<UUID> createCustomPrebuiltEntityRoleAsync(UUID appId, String versionId, UUID entityId, CreateCustomPrebuiltEntityRoleOptionalParameter createCustomPrebuiltEntityRoleOptionalParameter) {
return createCustomPrebuiltEntityRoleWithServiceResponseAsync(appId, versionId, entityId, createCustomPrebui... | java | public Observable<UUID> createCustomPrebuiltEntityRoleAsync(UUID appId, String versionId, UUID entityId, CreateCustomPrebuiltEntityRoleOptionalParameter createCustomPrebuiltEntityRoleOptionalParameter) {
return createCustomPrebuiltEntityRoleWithServiceResponseAsync(appId, versionId, entityId, createCustomPrebui... | [
"public",
"Observable",
"<",
"UUID",
">",
"createCustomPrebuiltEntityRoleAsync",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"UUID",
"entityId",
",",
"CreateCustomPrebuiltEntityRoleOptionalParameter",
"createCustomPrebuiltEntityRoleOptionalParameter",
")",
"{",
"re... | Create an entity role for an entity in the application.
@param appId The application ID.
@param versionId The version ID.
@param entityId The entity model ID.
@param createCustomPrebuiltEntityRoleOptionalParameter the object representing the optional parameters to be set before calling this API
@throws IllegalArgument... | [
"Create",
"an",
"entity",
"role",
"for",
"an",
"entity",
"in",
"the",
"application",
"."
] | 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#L9741-L9748 |
docusign/docusign-java-client | src/main/java/com/docusign/esign/client/ApiClient.java | ApiClient.getAuthorizationUri | public URI getAuthorizationUri(String clientId, java.util.List<String> scopes, String redirectUri, String responseType) throws IllegalArgumentException, UriBuilderException {
return this.getAuthorizationUri(clientId, scopes, redirectUri, responseType, null);
} | java | public URI getAuthorizationUri(String clientId, java.util.List<String> scopes, String redirectUri, String responseType) throws IllegalArgumentException, UriBuilderException {
return this.getAuthorizationUri(clientId, scopes, redirectUri, responseType, null);
} | [
"public",
"URI",
"getAuthorizationUri",
"(",
"String",
"clientId",
",",
"java",
".",
"util",
".",
"List",
"<",
"String",
">",
"scopes",
",",
"String",
"redirectUri",
",",
"String",
"responseType",
")",
"throws",
"IllegalArgumentException",
",",
"UriBuilderExceptio... | Helper method to configure the OAuth accessCode/implicit flow parameters
@param clientId OAuth2 client ID: Identifies the client making the request.
Client applications may be scoped to a limited set of system access.
@param scopes the list of requested scopes. Values include {@link OAuth#Scope_SIGNATURE}, {@link OAuth... | [
"Helper",
"method",
"to",
"configure",
"the",
"OAuth",
"accessCode",
"/",
"implicit",
"flow",
"parameters"
] | train | https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/client/ApiClient.java#L512-L514 |
Azure/azure-sdk-for-java | batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java | JobsImpl.listPreparationAndReleaseTaskStatusAsync | public Observable<Page<JobPreparationAndReleaseTaskExecutionInformation>> listPreparationAndReleaseTaskStatusAsync(final String jobId, final JobListPreparationAndReleaseTaskStatusOptions jobListPreparationAndReleaseTaskStatusOptions) {
return listPreparationAndReleaseTaskStatusWithServiceResponseAsync(jobId, jo... | java | public Observable<Page<JobPreparationAndReleaseTaskExecutionInformation>> listPreparationAndReleaseTaskStatusAsync(final String jobId, final JobListPreparationAndReleaseTaskStatusOptions jobListPreparationAndReleaseTaskStatusOptions) {
return listPreparationAndReleaseTaskStatusWithServiceResponseAsync(jobId, jo... | [
"public",
"Observable",
"<",
"Page",
"<",
"JobPreparationAndReleaseTaskExecutionInformation",
">",
">",
"listPreparationAndReleaseTaskStatusAsync",
"(",
"final",
"String",
"jobId",
",",
"final",
"JobListPreparationAndReleaseTaskStatusOptions",
"jobListPreparationAndReleaseTaskStatusO... | Lists the execution status of the Job Preparation and Job Release task for the specified job across the compute nodes where the job has run.
This API returns the Job Preparation and Job Release task status on all compute nodes that have run the Job Preparation or Job Release task. This includes nodes which have since b... | [
"Lists",
"the",
"execution",
"status",
"of",
"the",
"Job",
"Preparation",
"and",
"Job",
"Release",
"task",
"for",
"the",
"specified",
"job",
"across",
"the",
"compute",
"nodes",
"where",
"the",
"job",
"has",
"run",
".",
"This",
"API",
"returns",
"the",
"Jo... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java#L2996-L3004 |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/schema/SchemaService.java | SchemaService.defineApplication | public void defineApplication(Tenant tenant, ApplicationDefinition appDef) {
checkServiceState();
appDef.setTenantName(tenant.getName());
ApplicationDefinition currAppDef = checkApplicationKey(appDef);
StorageService storageService = verifyStorageServiceOption(currAppDef, appDef);
... | java | public void defineApplication(Tenant tenant, ApplicationDefinition appDef) {
checkServiceState();
appDef.setTenantName(tenant.getName());
ApplicationDefinition currAppDef = checkApplicationKey(appDef);
StorageService storageService = verifyStorageServiceOption(currAppDef, appDef);
... | [
"public",
"void",
"defineApplication",
"(",
"Tenant",
"tenant",
",",
"ApplicationDefinition",
"appDef",
")",
"{",
"checkServiceState",
"(",
")",
";",
"appDef",
".",
"setTenantName",
"(",
"tenant",
".",
"getName",
"(",
")",
")",
";",
"ApplicationDefinition",
"cur... | Create the application with the given name in the given Tenant. If the given
application already exists, the request is treated as an application update. If the
update is successfully validated, its schema is stored in the database, and the
appropriate storage service is notified to implement required physical database... | [
"Create",
"the",
"application",
"with",
"the",
"given",
"name",
"in",
"the",
"given",
"Tenant",
".",
"If",
"the",
"given",
"application",
"already",
"exists",
"the",
"request",
"is",
"treated",
"as",
"an",
"application",
"update",
".",
"If",
"the",
"update",... | train | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/schema/SchemaService.java#L134-L141 |
bbossgroups/bboss-elasticsearch | bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java | RestClientUtil.searchAllParallel | public <T> ESDatas<T> searchAllParallel(String index,ScrollHandler<T> scrollHandler, Class<T> type,int thread) throws ElasticSearchException{
return searchAllParallel(index, DEFAULT_FETCHSIZE,scrollHandler,type,thread);
} | java | public <T> ESDatas<T> searchAllParallel(String index,ScrollHandler<T> scrollHandler, Class<T> type,int thread) throws ElasticSearchException{
return searchAllParallel(index, DEFAULT_FETCHSIZE,scrollHandler,type,thread);
} | [
"public",
"<",
"T",
">",
"ESDatas",
"<",
"T",
">",
"searchAllParallel",
"(",
"String",
"index",
",",
"ScrollHandler",
"<",
"T",
">",
"scrollHandler",
",",
"Class",
"<",
"T",
">",
"type",
",",
"int",
"thread",
")",
"throws",
"ElasticSearchException",
"{",
... | 并行检索索引所有数据,每批次返回默认为5000条数据,
@param index
@param scrollHandler 每批数据处理方法
@param type
@param <T>
@return
@throws ElasticSearchException | [
"并行检索索引所有数据",
"每批次返回默认为5000条数据,"
] | train | https://github.com/bbossgroups/bboss-elasticsearch/blob/31717c8aa2c4c880987be53aeeb8a0cf5183c3a7/bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java#L1840-L1842 |
authlete/authlete-java-common | src/main/java/com/authlete/common/dto/AuthorizationIssueRequest.java | AuthorizationIssueRequest.setClaims | public AuthorizationIssueRequest setClaims(Map<String, Object> claims)
{
if (claims == null || claims.size() == 0)
{
this.claims = null;
return this;
}
String json = Utils.toJson(claims);
return setClaims(json);
} | java | public AuthorizationIssueRequest setClaims(Map<String, Object> claims)
{
if (claims == null || claims.size() == 0)
{
this.claims = null;
return this;
}
String json = Utils.toJson(claims);
return setClaims(json);
} | [
"public",
"AuthorizationIssueRequest",
"setClaims",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"claims",
")",
"{",
"if",
"(",
"claims",
"==",
"null",
"||",
"claims",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"this",
".",
"claims",
"=",
"null",
... | Set the value of {@code "claims"} which is the claims of the subject.
The argument is converted into a JSON string and passed to {@link
#setClaims(String)} method.
@param claims
The claims of the subject. Keys are claim names.
@return
{@code this} object.
@since 1.24 | [
"Set",
"the",
"value",
"of",
"{",
"@code",
"claims",
"}",
"which",
"is",
"the",
"claims",
"of",
"the",
"subject",
".",
"The",
"argument",
"is",
"converted",
"into",
"a",
"JSON",
"string",
"and",
"passed",
"to",
"{",
"@link",
"#setClaims",
"(",
"String",
... | train | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/dto/AuthorizationIssueRequest.java#L517-L528 |
sirthias/parboiled | parboiled-core/src/main/java/org/parboiled/trees/GraphUtils.java | GraphUtils.printTree | public static <T extends GraphNode<T>> String printTree(T node, Formatter<T> formatter) {
checkArgNotNull(formatter, "formatter");
return printTree(node, formatter, Predicates.<T>alwaysTrue(), Predicates.<T>alwaysTrue());
} | java | public static <T extends GraphNode<T>> String printTree(T node, Formatter<T> formatter) {
checkArgNotNull(formatter, "formatter");
return printTree(node, formatter, Predicates.<T>alwaysTrue(), Predicates.<T>alwaysTrue());
} | [
"public",
"static",
"<",
"T",
"extends",
"GraphNode",
"<",
"T",
">",
">",
"String",
"printTree",
"(",
"T",
"node",
",",
"Formatter",
"<",
"T",
">",
"formatter",
")",
"{",
"checkArgNotNull",
"(",
"formatter",
",",
"\"formatter\"",
")",
";",
"return",
"pri... | Creates a string representation of the graph reachable from the given node using the given formatter.
@param node the root node
@param formatter the node formatter
@return a new string | [
"Creates",
"a",
"string",
"representation",
"of",
"the",
"graph",
"reachable",
"from",
"the",
"given",
"node",
"using",
"the",
"given",
"formatter",
"."
] | train | https://github.com/sirthias/parboiled/blob/84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a/parboiled-core/src/main/java/org/parboiled/trees/GraphUtils.java#L104-L107 |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java | CacheableWorkspaceDataManager.initACL | private ItemData initACL(NodeData parent, NodeData node) throws RepositoryException
{
return initACL(parent, node, null);
} | java | private ItemData initACL(NodeData parent, NodeData node) throws RepositoryException
{
return initACL(parent, node, null);
} | [
"private",
"ItemData",
"initACL",
"(",
"NodeData",
"parent",
",",
"NodeData",
"node",
")",
"throws",
"RepositoryException",
"{",
"return",
"initACL",
"(",
"parent",
",",
"node",
",",
"null",
")",
";",
"}"
] | Init ACL of the node.
@param parent
- a parent, can be null (get item by id)
@param node
- an item data
@return - an item data with ACL was initialized
@throws RepositoryException | [
"Init",
"ACL",
"of",
"the",
"node",
"."
] | train | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java#L2375-L2378 |
SpartaTech/sparta-spring-web-utils | src/main/java/org/sparta/springwebutils/util/ExternalEntryPointHelper.java | ExternalEntryPointHelper.isAnEntryPoint | public static boolean isAnEntryPoint(Method method, boolean scanEntryPointAnnotation) {
return !scanEntryPointAnnotation
|| scanEntryPointAnnotation && method.isAnnotationPresent(ExternalEntryPoint.class)
|| scanEntryPointAnnotation && method.getDeclaringClass().isAnnotationPresent(ExternalEntryPoint.class);... | java | public static boolean isAnEntryPoint(Method method, boolean scanEntryPointAnnotation) {
return !scanEntryPointAnnotation
|| scanEntryPointAnnotation && method.isAnnotationPresent(ExternalEntryPoint.class)
|| scanEntryPointAnnotation && method.getDeclaringClass().isAnnotationPresent(ExternalEntryPoint.class);... | [
"public",
"static",
"boolean",
"isAnEntryPoint",
"(",
"Method",
"method",
",",
"boolean",
"scanEntryPointAnnotation",
")",
"{",
"return",
"!",
"scanEntryPointAnnotation",
"||",
"scanEntryPointAnnotation",
"&&",
"method",
".",
"isAnnotationPresent",
"(",
"ExternalEntryPoin... | Returns whether the supplied method is an Entry Point or not.
It might be annotated by @ExternalEntryPoint
@param method Method to be scanned
@param scanEntryPointAnnotation Does it has annotation
@return boolean | [
"Returns",
"whether",
"the",
"supplied",
"method",
"is",
"an",
"Entry",
"Point",
"or",
"not",
".",
"It",
"might",
"be",
"annotated",
"by",
"@ExternalEntryPoint"
] | train | https://github.com/SpartaTech/sparta-spring-web-utils/blob/f5382474d46a6048d58707fc64e7936277e8b2ce/src/main/java/org/sparta/springwebutils/util/ExternalEntryPointHelper.java#L38-L42 |
kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.removeDoc | public boolean removeDoc(String collName, String docId) {
if (mCollections.containsKey(collName)) {
// remove IDs from collection
Map<String, Map<String,Object>> collection = mCollections.get(collName);
if (BuildConfig.DEBUG) {
log.debug("Removed doc: " + docI... | java | public boolean removeDoc(String collName, String docId) {
if (mCollections.containsKey(collName)) {
// remove IDs from collection
Map<String, Map<String,Object>> collection = mCollections.get(collName);
if (BuildConfig.DEBUG) {
log.debug("Removed doc: " + docI... | [
"public",
"boolean",
"removeDoc",
"(",
"String",
"collName",
",",
"String",
"docId",
")",
"{",
"if",
"(",
"mCollections",
".",
"containsKey",
"(",
"collName",
")",
")",
"{",
"// remove IDs from collection",
"Map",
"<",
"String",
",",
"Map",
"<",
"String",
",... | Handles deleting a document in a collection.
Override if you want to use your own collection data store.
@param collName collection name
@param docId document ID
@return true if doc was deleted, false otherwise | [
"Handles",
"deleting",
"a",
"document",
"in",
"a",
"collection",
".",
"Override",
"if",
"you",
"want",
"to",
"use",
"your",
"own",
"collection",
"data",
"store",
"."
] | train | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L731-L745 |
looly/hulu | src/main/java/com/xiaoleilu/hulu/Request.java | Request.convertGetMethodParamValue | private static String convertGetMethodParamValue(String value, String charsetOfServlet) {
if (isGetMethod()) {
if (null == charsetOfServlet) {
charsetOfServlet = CharsetUtil.ISO_8859_1;
}
String destCharset = CharsetUtil.UTF_8;
if (isIE()) {
// IE浏览器GET请求使用GBK编码
destCharset = Charset... | java | private static String convertGetMethodParamValue(String value, String charsetOfServlet) {
if (isGetMethod()) {
if (null == charsetOfServlet) {
charsetOfServlet = CharsetUtil.ISO_8859_1;
}
String destCharset = CharsetUtil.UTF_8;
if (isIE()) {
// IE浏览器GET请求使用GBK编码
destCharset = Charset... | [
"private",
"static",
"String",
"convertGetMethodParamValue",
"(",
"String",
"value",
",",
"String",
"charsetOfServlet",
")",
"{",
"if",
"(",
"isGetMethod",
"(",
")",
")",
"{",
"if",
"(",
"null",
"==",
"charsetOfServlet",
")",
"{",
"charsetOfServlet",
"=",
"Cha... | 转换值得编码 会根据浏览器类型自动识别GET请求的编码方式从而解码<br>
考虑到Servlet容器中会首先解码,给定的charsetOfServlet就是Servlet设置的解码charset<br>
charsetOfServlet为null则默认的ISO_8859_1
@param value 值
@param charsetOfServlet Servlet的编码
@return 转换后的字符串 | [
"转换值得编码",
"会根据浏览器类型自动识别GET请求的编码方式从而解码<br",
">",
"考虑到Servlet容器中会首先解码,给定的charsetOfServlet就是Servlet设置的解码charset<br",
">",
"charsetOfServlet为null则默认的ISO_8859_1"
] | train | https://github.com/looly/hulu/blob/4072de684e2e2f28ac8a3a44c0d5a690b289ef28/src/main/java/com/xiaoleilu/hulu/Request.java#L614-L629 |
Azure/azure-sdk-for-java | sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncMembersInner.java | SyncMembersInner.beginUpdate | public SyncMemberInner beginUpdate(String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters).toBlo... | java | public SyncMemberInner beginUpdate(String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters).toBlo... | [
"public",
"SyncMemberInner",
"beginUpdate",
"(",
"String",
"resourceGroupName",
",",
"String",
"serverName",
",",
"String",
"databaseName",
",",
"String",
"syncGroupName",
",",
"String",
"syncMemberName",
",",
"SyncMemberInner",
"parameters",
")",
"{",
"return",
"begi... | Updates an existing sync member.
@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 databaseName The name of the database on which the sync group is hosted.
@pa... | [
"Updates",
"an",
"existing",
"sync",
"member",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncMembersInner.java#L751-L753 |
twitter/hraven | hraven-etl/src/main/java/com/twitter/hraven/etl/FileLister.java | FileLister.traverseDirs | private static void traverseDirs(List<FileStatus> fileStatusesList, FileSystem hdfs,
Path inputPath, JobFileModifiedRangePathFilter jobFileModifiedRangePathFilter)
throws IOException
{
// get all the files and dirs in the current dir
FileStatus allFiles[] = hdfs.listStatus(inputPath);
for ... | java | private static void traverseDirs(List<FileStatus> fileStatusesList, FileSystem hdfs,
Path inputPath, JobFileModifiedRangePathFilter jobFileModifiedRangePathFilter)
throws IOException
{
// get all the files and dirs in the current dir
FileStatus allFiles[] = hdfs.listStatus(inputPath);
for ... | [
"private",
"static",
"void",
"traverseDirs",
"(",
"List",
"<",
"FileStatus",
">",
"fileStatusesList",
",",
"FileSystem",
"hdfs",
",",
"Path",
"inputPath",
",",
"JobFileModifiedRangePathFilter",
"jobFileModifiedRangePathFilter",
")",
"throws",
"IOException",
"{",
"// get... | Recursively traverses the dirs to get the list of
files for a given path filtered as per the input path range filter | [
"Recursively",
"traverses",
"the",
"dirs",
"to",
"get",
"the",
"list",
"of",
"files",
"for",
"a",
"given",
"path",
"filtered",
"as",
"per",
"the",
"input",
"path",
"range",
"filter"
] | train | https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-etl/src/main/java/com/twitter/hraven/etl/FileLister.java#L53-L71 |
Bernardo-MG/repository-pattern-java | src/main/java/com/wandrell/pattern/repository/jpa/JpaRepository.java | JpaRepository.getEntity | @SuppressWarnings("unchecked")
@Override
public final V getEntity(final NamedParameterQueryData query) {
final Query builtQuery; // Query created from the query data
V entity; // Entity acquired from the query
checkNotNull(query, "Received a null pointer as the query");
// Buil... | java | @SuppressWarnings("unchecked")
@Override
public final V getEntity(final NamedParameterQueryData query) {
final Query builtQuery; // Query created from the query data
V entity; // Entity acquired from the query
checkNotNull(query, "Received a null pointer as the query");
// Buil... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"Override",
"public",
"final",
"V",
"getEntity",
"(",
"final",
"NamedParameterQueryData",
"query",
")",
"{",
"final",
"Query",
"builtQuery",
";",
"// Query created from the query data",
"V",
"entity",
";",
"//... | Queries the entities in the repository and returns a single one.
<p>
The entity is acquired by building a query from the received
{@code QueryData} and executing it.
@param query
the query user to acquire the entities
@return the queried entity | [
"Queries",
"the",
"entities",
"in",
"the",
"repository",
"and",
"returns",
"a",
"single",
"one",
".",
"<p",
">",
"The",
"entity",
"is",
"acquired",
"by",
"building",
"a",
"query",
"from",
"the",
"received",
"{",
"@code",
"QueryData",
"}",
"and",
"executing... | train | https://github.com/Bernardo-MG/repository-pattern-java/blob/e94d5bbf9aeeb45acc8485f3686a6e791b082ea8/src/main/java/com/wandrell/pattern/repository/jpa/JpaRepository.java#L248-L267 |
google/closure-compiler | src/com/google/javascript/jscomp/Es6ConvertSuperConstructorCalls.java | Es6ConvertSuperConstructorCalls.isDefinedInSources | private boolean isDefinedInSources(NodeTraversal t, String varName) {
Var objectVar = t.getScope().getVar(varName);
return objectVar != null && !objectVar.isExtern();
} | java | private boolean isDefinedInSources(NodeTraversal t, String varName) {
Var objectVar = t.getScope().getVar(varName);
return objectVar != null && !objectVar.isExtern();
} | [
"private",
"boolean",
"isDefinedInSources",
"(",
"NodeTraversal",
"t",
",",
"String",
"varName",
")",
"{",
"Var",
"objectVar",
"=",
"t",
".",
"getScope",
"(",
")",
".",
"getVar",
"(",
"varName",
")",
";",
"return",
"objectVar",
"!=",
"null",
"&&",
"!",
"... | Is a variable with the given name defined in the source code being compiled?
<p>Please note that the call to {@code t.getScope()} is expensive, so we should avoid
calling this method when possible.
@param t
@param varName | [
"Is",
"a",
"variable",
"with",
"the",
"given",
"name",
"defined",
"in",
"the",
"source",
"code",
"being",
"compiled?"
] | train | https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/Es6ConvertSuperConstructorCalls.java#L484-L487 |
ManfredTremmel/gwt-commons-lang3 | src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java | TypeUtils.typesSatisfyVariables | public static boolean typesSatisfyVariables(final Map<TypeVariable<?>, Type> typeVarAssigns) {
Validate.notNull(typeVarAssigns, "typeVarAssigns is null");
// all types must be assignable to all the bounds of the their mapped
// type variable.
for (final Map.Entry<TypeVariable<?>, Type> e... | java | public static boolean typesSatisfyVariables(final Map<TypeVariable<?>, Type> typeVarAssigns) {
Validate.notNull(typeVarAssigns, "typeVarAssigns is null");
// all types must be assignable to all the bounds of the their mapped
// type variable.
for (final Map.Entry<TypeVariable<?>, Type> e... | [
"public",
"static",
"boolean",
"typesSatisfyVariables",
"(",
"final",
"Map",
"<",
"TypeVariable",
"<",
"?",
">",
",",
"Type",
">",
"typeVarAssigns",
")",
"{",
"Validate",
".",
"notNull",
"(",
"typeVarAssigns",
",",
"\"typeVarAssigns is null\"",
")",
";",
"// all... | <p>Determines whether or not specified types satisfy the bounds of their
mapped type variables. When a type parameter extends another (such as
{@code <T, S extends T>}), uses another as a type parameter (such as
{@code <T, S extends Comparable>>}), or otherwise depends on
another type variable to be specified, the depe... | [
"<p",
">",
"Determines",
"whether",
"or",
"not",
"specified",
"types",
"satisfy",
"the",
"bounds",
"of",
"their",
"mapped",
"type",
"variables",
".",
"When",
"a",
"type",
"parameter",
"extends",
"another",
"(",
"such",
"as",
"{",
"@code",
"<T",
"S",
"exten... | train | https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java#L1220-L1236 |
UrielCh/ovh-java-sdk | ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java | ApiOvhIp.ip_phishing_id_GET | public OvhAntiphishing ip_phishing_id_GET(String ip, Long id) throws IOException {
String qPath = "/ip/{ip}/phishing/{id}";
StringBuilder sb = path(qPath, ip, id);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhAntiphishing.class);
} | java | public OvhAntiphishing ip_phishing_id_GET(String ip, Long id) throws IOException {
String qPath = "/ip/{ip}/phishing/{id}";
StringBuilder sb = path(qPath, ip, id);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhAntiphishing.class);
} | [
"public",
"OvhAntiphishing",
"ip_phishing_id_GET",
"(",
"String",
"ip",
",",
"Long",
"id",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/ip/{ip}/phishing/{id}\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",
",",
"ip",
",",
"id",
")"... | Get this object properties
REST: GET /ip/{ip}/phishing/{id}
@param ip [required]
@param id [required] Internal ID of the phishing entry | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L98-L103 |
Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java | JoinedQueryExecutor.commonOrderingCount | private static <T extends Storable> int
commonOrderingCount(OrderingList<T> orderingA, OrderingList<T> orderingB)
{
int commonCount = Math.min(orderingA.size(), orderingB.size());
for (int i=0; i<commonCount; i++) {
if (!orderingA.get(i).equals(orderingB.get(i))) {
... | java | private static <T extends Storable> int
commonOrderingCount(OrderingList<T> orderingA, OrderingList<T> orderingB)
{
int commonCount = Math.min(orderingA.size(), orderingB.size());
for (int i=0; i<commonCount; i++) {
if (!orderingA.get(i).equals(orderingB.get(i))) {
... | [
"private",
"static",
"<",
"T",
"extends",
"Storable",
">",
"int",
"commonOrderingCount",
"(",
"OrderingList",
"<",
"T",
">",
"orderingA",
",",
"OrderingList",
"<",
"T",
">",
"orderingB",
")",
"{",
"int",
"commonCount",
"=",
"Math",
".",
"min",
"(",
"orderi... | Returns the count of exactly matching properties from the two
orderings. The match must be consecutive and start at the first
property. | [
"Returns",
"the",
"count",
"of",
"exactly",
"matching",
"properties",
"from",
"the",
"two",
"orderings",
".",
"The",
"match",
"must",
"be",
"consecutive",
"and",
"start",
"at",
"the",
"first",
"property",
"."
] | train | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java#L445-L457 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/mapreduce/aggregation/Aggregations.java | Aggregations.longAvg | public static <Key, Value> Aggregation<Key, Long, Long> longAvg() {
return new AggregationAdapter(new LongAvgAggregation<Key, Value>());
} | java | public static <Key, Value> Aggregation<Key, Long, Long> longAvg() {
return new AggregationAdapter(new LongAvgAggregation<Key, Value>());
} | [
"public",
"static",
"<",
"Key",
",",
"Value",
">",
"Aggregation",
"<",
"Key",
",",
"Long",
",",
"Long",
">",
"longAvg",
"(",
")",
"{",
"return",
"new",
"AggregationAdapter",
"(",
"new",
"LongAvgAggregation",
"<",
"Key",
",",
"Value",
">",
"(",
")",
")"... | Returns an aggregation to calculate the long average of all supplied values.<br/>
This aggregation is similar to: <pre>SELECT AVG(value) FROM x</pre>
@param <Key> the input key type
@param <Value> the supplied value type
@return the average over all supplied values | [
"Returns",
"an",
"aggregation",
"to",
"calculate",
"the",
"long",
"average",
"of",
"all",
"supplied",
"values",
".",
"<br",
"/",
">",
"This",
"aggregation",
"is",
"similar",
"to",
":",
"<pre",
">",
"SELECT",
"AVG",
"(",
"value",
")",
"FROM",
"x<",
"/",
... | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/mapreduce/aggregation/Aggregations.java#L150-L152 |
teatrove/teatrove | trove/src/main/java/org/teatrove/trove/io/LinePositionReader.java | LinePositionReader.createSequence | public static String createSequence(char c, int length) {
if (length < 0) length = 1;
StringBuffer buf = new StringBuffer(length);
for (; length > 0; length--) {
buf.append(c);
}
return buf.toString();
} | java | public static String createSequence(char c, int length) {
if (length < 0) length = 1;
StringBuffer buf = new StringBuffer(length);
for (; length > 0; length--) {
buf.append(c);
}
return buf.toString();
} | [
"public",
"static",
"String",
"createSequence",
"(",
"char",
"c",
",",
"int",
"length",
")",
"{",
"if",
"(",
"length",
"<",
"0",
")",
"length",
"=",
"1",
";",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
"length",
")",
";",
"for",
"(",
";"... | Creates and returns a String containing a sequence of the specified
length, repeating the given character. | [
"Creates",
"and",
"returns",
"a",
"String",
"containing",
"a",
"sequence",
"of",
"the",
"specified",
"length",
"repeating",
"the",
"given",
"character",
"."
] | train | https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/io/LinePositionReader.java#L118-L126 |
joniles/mpxj | src/main/java/net/sf/mpxj/primavera/UserFieldCounters.java | UserFieldCounters.nextField | public <E extends Enum<E> & FieldType> E nextField(Class<E> clazz, UserFieldDataType type)
{
for (String name : m_names[type.ordinal()])
{
int i = NumberHelper.getInt(m_counters.get(name)) + 1;
try
{
E e = Enum.valueOf(clazz, name + i);
m_counters.put(na... | java | public <E extends Enum<E> & FieldType> E nextField(Class<E> clazz, UserFieldDataType type)
{
for (String name : m_names[type.ordinal()])
{
int i = NumberHelper.getInt(m_counters.get(name)) + 1;
try
{
E e = Enum.valueOf(clazz, name + i);
m_counters.put(na... | [
"public",
"<",
"E",
"extends",
"Enum",
"<",
"E",
">",
"&",
"FieldType",
">",
"E",
"nextField",
"(",
"Class",
"<",
"E",
">",
"clazz",
",",
"UserFieldDataType",
"type",
")",
"{",
"for",
"(",
"String",
"name",
":",
"m_names",
"[",
"type",
".",
"ordinal"... | Generate the next available field for a user defined field.
@param <E> field type class
@param clazz class of the desired field enum
@param type user defined field type.
@return field of specified type | [
"Generate",
"the",
"next",
"available",
"field",
"for",
"a",
"user",
"defined",
"field",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/UserFieldCounters.java#L70-L89 |
molgenis/molgenis | molgenis-data-import/src/main/java/org/molgenis/data/importer/emx/EmxMetadataParser.java | EmxMetadataParser.parseAttributesSheet | private void parseAttributesSheet(
Repository<Entity> attributesRepo, IntermediateParseResults intermediateResults) {
for (Attribute attr : attributesRepo.getEntityType().getAtomicAttributes()) {
checkAttrSheetHeaders(attr);
}
Map<String, Map<String, EmxAttribute>> attributesMap = newLinkedHash... | java | private void parseAttributesSheet(
Repository<Entity> attributesRepo, IntermediateParseResults intermediateResults) {
for (Attribute attr : attributesRepo.getEntityType().getAtomicAttributes()) {
checkAttrSheetHeaders(attr);
}
Map<String, Map<String, EmxAttribute>> attributesMap = newLinkedHash... | [
"private",
"void",
"parseAttributesSheet",
"(",
"Repository",
"<",
"Entity",
">",
"attributesRepo",
",",
"IntermediateParseResults",
"intermediateResults",
")",
"{",
"for",
"(",
"Attribute",
"attr",
":",
"attributesRepo",
".",
"getEntityType",
"(",
")",
".",
"getAto... | Load all attributes from the source repository and add it to the {@link
IntermediateParseResults}.
@param attributesRepo Repository for the attributes
@param intermediateResults {@link IntermediateParseResults} with the tags already parsed | [
"Load",
"all",
"attributes",
"from",
"the",
"source",
"repository",
"and",
"add",
"it",
"to",
"the",
"{",
"@link",
"IntermediateParseResults",
"}",
"."
] | train | https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data-import/src/main/java/org/molgenis/data/importer/emx/EmxMetadataParser.java#L718-L743 |
jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/event/MoveOnChangeHandler.java | MoveOnChangeHandler.init | public void init(BaseField field, Converter fldDest, Converter fldSource, boolean bClearIfThisNull, boolean bOnlyIfDestNull, boolean bDontMoveNull)
{
super.init(field);
this.setRespondsToMode(DBConstants.INIT_MOVE, false);
this.setRespondsToMode(DBConstants.READ_MOVE, false); // By default, ... | java | public void init(BaseField field, Converter fldDest, Converter fldSource, boolean bClearIfThisNull, boolean bOnlyIfDestNull, boolean bDontMoveNull)
{
super.init(field);
this.setRespondsToMode(DBConstants.INIT_MOVE, false);
this.setRespondsToMode(DBConstants.READ_MOVE, false); // By default, ... | [
"public",
"void",
"init",
"(",
"BaseField",
"field",
",",
"Converter",
"fldDest",
",",
"Converter",
"fldSource",
",",
"boolean",
"bClearIfThisNull",
",",
"boolean",
"bOnlyIfDestNull",
",",
"boolean",
"bDontMoveNull",
")",
"{",
"super",
".",
"init",
"(",
"field",... | Constructor.
@param field The basefield owner of this listener (usually null and set on setOwner()).
@param fldDest The destination field.
@param fldSource The source field.
@param bClearIfThisNull If this listener's owner is set to null, set the destination field to null.
@param bOnlyIfDestNull Move only if the destin... | [
"Constructor",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/MoveOnChangeHandler.java#L109-L119 |
jqm4gwt/jqm4gwt | library/src/main/java/com/sksamuel/jqm4gwt/toolbar/JQMHeader.java | JQMHeader.setRightButton | public JQMButton setRightButton(String text, String url, DataIcon icon) {
JQMButton button = createButton(text, url, icon);
setRightButton(button);
return button;
} | java | public JQMButton setRightButton(String text, String url, DataIcon icon) {
JQMButton button = createButton(text, url, icon);
setRightButton(button);
return button;
} | [
"public",
"JQMButton",
"setRightButton",
"(",
"String",
"text",
",",
"String",
"url",
",",
"DataIcon",
"icon",
")",
"{",
"JQMButton",
"button",
"=",
"createButton",
"(",
"text",
",",
"url",
",",
"icon",
")",
";",
"setRightButton",
"(",
"button",
")",
";",
... | Creates a new {@link JQMButton} with the given text and linking to the
given url and with the given icon and then sets that button in the
right slot. Any existing right button will be replaced.
@param text
the text for the button
@param url
the optional url for the button, if null then this button
does not navigate by... | [
"Creates",
"a",
"new",
"{",
"@link",
"JQMButton",
"}",
"with",
"the",
"given",
"text",
"and",
"linking",
"to",
"the",
"given",
"url",
"and",
"with",
"the",
"given",
"icon",
"and",
"then",
"sets",
"that",
"button",
"in",
"the",
"right",
"slot",
".",
"An... | train | https://github.com/jqm4gwt/jqm4gwt/blob/cf59958e9ba6d4b70f42507b2c77f10c2465085b/library/src/main/java/com/sksamuel/jqm4gwt/toolbar/JQMHeader.java#L365-L369 |
spring-projects/spring-plugin | core/src/main/java/org/springframework/plugin/core/OrderAwarePluginRegistry.java | OrderAwarePluginRegistry.ofReverse | public static <S, T extends Plugin<S>> OrderAwarePluginRegistry<T, S> ofReverse(List<? extends T> plugins) {
return of(plugins, DEFAULT_REVERSE_COMPARATOR);
} | java | public static <S, T extends Plugin<S>> OrderAwarePluginRegistry<T, S> ofReverse(List<? extends T> plugins) {
return of(plugins, DEFAULT_REVERSE_COMPARATOR);
} | [
"public",
"static",
"<",
"S",
",",
"T",
"extends",
"Plugin",
"<",
"S",
">",
">",
"OrderAwarePluginRegistry",
"<",
"T",
",",
"S",
">",
"ofReverse",
"(",
"List",
"<",
"?",
"extends",
"T",
">",
"plugins",
")",
"{",
"return",
"of",
"(",
"plugins",
",",
... | Creates a new {@link OrderAwarePluginRegistry} with the given {@link Plugin}s and the order of the {@link Plugin}s
reverted.
@param plugins must not be {@literal null}.
@return
@since 2.0 | [
"Creates",
"a",
"new",
"{",
"@link",
"OrderAwarePluginRegistry",
"}",
"with",
"the",
"given",
"{",
"@link",
"Plugin",
"}",
"s",
"and",
"the",
"order",
"of",
"the",
"{",
"@link",
"Plugin",
"}",
"s",
"reverted",
"."
] | train | https://github.com/spring-projects/spring-plugin/blob/953d2ce12f05f26444fbb3bf21011f538f729868/core/src/main/java/org/springframework/plugin/core/OrderAwarePluginRegistry.java#L123-L125 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java | ComputerVisionImpl.generateThumbnailAsync | public Observable<InputStream> generateThumbnailAsync(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter) {
return generateThumbnailWithServiceResponseAsync(width, height, url, generateThumbnailOptionalParameter).map(new Func1<ServiceResponse<InputStream>, I... | java | public Observable<InputStream> generateThumbnailAsync(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter) {
return generateThumbnailWithServiceResponseAsync(width, height, url, generateThumbnailOptionalParameter).map(new Func1<ServiceResponse<InputStream>, I... | [
"public",
"Observable",
"<",
"InputStream",
">",
"generateThumbnailAsync",
"(",
"int",
"width",
",",
"int",
"height",
",",
"String",
"url",
",",
"GenerateThumbnailOptionalParameter",
"generateThumbnailOptionalParameter",
")",
"{",
"return",
"generateThumbnailWithServiceResp... | This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input i... | [
"This",
"operation",
"generates",
"a",
"thumbnail",
"image",
"with",
"the",
"user",
"-",
"specified",
"width",
"and",
"height",
".",
"By",
"default",
"the",
"service",
"analyzes",
"the",
"image",
"identifies",
"the",
"region",
"of",
"interest",
"(",
"ROI",
"... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java#L2095-L2102 |
jmrozanec/cron-utils | src/main/java/com/cronutils/mapper/ConstantsMapper.java | ConstantsMapper.weekDayMapping | public static int weekDayMapping(final WeekDay source, final WeekDay target, final int weekday) {
return source.mapTo(weekday, target);
} | java | public static int weekDayMapping(final WeekDay source, final WeekDay target, final int weekday) {
return source.mapTo(weekday, target);
} | [
"public",
"static",
"int",
"weekDayMapping",
"(",
"final",
"WeekDay",
"source",
",",
"final",
"WeekDay",
"target",
",",
"final",
"int",
"weekday",
")",
"{",
"return",
"source",
".",
"mapTo",
"(",
"weekday",
",",
"target",
")",
";",
"}"
] | Performs weekday mapping between two weekday definitions.
@param source - source
@param target - target weekday definition
@param weekday - value in source range.
@return int - mapped value | [
"Performs",
"weekday",
"mapping",
"between",
"two",
"weekday",
"definitions",
"."
] | train | https://github.com/jmrozanec/cron-utils/blob/adac5ec8fd9160b082f9762a6eedea0715731170/src/main/java/com/cronutils/mapper/ConstantsMapper.java#L31-L33 |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java | ParseUtils.missingRequiredElement | public static XMLStreamException missingRequiredElement(final XMLExtendedStreamReader reader, final Set<?> required) {
final StringBuilder b = new StringBuilder();
Iterator<?> iterator = required.iterator();
while (iterator.hasNext()) {
final Object o = iterator.next();
b... | java | public static XMLStreamException missingRequiredElement(final XMLExtendedStreamReader reader, final Set<?> required) {
final StringBuilder b = new StringBuilder();
Iterator<?> iterator = required.iterator();
while (iterator.hasNext()) {
final Object o = iterator.next();
b... | [
"public",
"static",
"XMLStreamException",
"missingRequiredElement",
"(",
"final",
"XMLExtendedStreamReader",
"reader",
",",
"final",
"Set",
"<",
"?",
">",
"required",
")",
"{",
"final",
"StringBuilder",
"b",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"Iterator",
... | Get an exception reporting a missing, required XML child element.
@param reader the stream reader
@param required a set of enums whose toString method returns the
attribute name
@return the exception | [
"Get",
"an",
"exception",
"reporting",
"a",
"missing",
"required",
"XML",
"child",
"element",
"."
] | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java#L246-L268 |
j-a-w-r/jawr-main-repo | jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java | VariantUtils.getVariantBundleName | public static String getVariantBundleName(String bundleName, Map<String, String> variants,
boolean isGeneratedResource) {
String variantKey = getVariantKey(variants);
return getVariantBundleName(bundleName, variantKey, isGeneratedResource);
} | java | public static String getVariantBundleName(String bundleName, Map<String, String> variants,
boolean isGeneratedResource) {
String variantKey = getVariantKey(variants);
return getVariantBundleName(bundleName, variantKey, isGeneratedResource);
} | [
"public",
"static",
"String",
"getVariantBundleName",
"(",
"String",
"bundleName",
",",
"Map",
"<",
"String",
",",
"String",
">",
"variants",
",",
"boolean",
"isGeneratedResource",
")",
"{",
"String",
"variantKey",
"=",
"getVariantKey",
"(",
"variants",
")",
";"... | Returns the bundle name from the variants given in parameter
@param bundleName
the original bundle name
@param variants
the map of variant
@param isGeneratedResource
the flag indicating if it's a generated resource or not
@return the variant bundle name | [
"Returns",
"the",
"bundle",
"name",
"from",
"the",
"variants",
"given",
"in",
"parameter"
] | train | https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java#L277-L282 |
apache/groovy | subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java | AstBuilder.visitIntegerLiteralAlt | @Override
public ConstantExpression visitIntegerLiteralAlt(IntegerLiteralAltContext ctx) {
String text = ctx.IntegerLiteral().getText();
Number num = null;
try {
num = Numbers.parseInteger(null, text);
} catch (Exception e) {
this.numberFormatError = tuple(ct... | java | @Override
public ConstantExpression visitIntegerLiteralAlt(IntegerLiteralAltContext ctx) {
String text = ctx.IntegerLiteral().getText();
Number num = null;
try {
num = Numbers.parseInteger(null, text);
} catch (Exception e) {
this.numberFormatError = tuple(ct... | [
"@",
"Override",
"public",
"ConstantExpression",
"visitIntegerLiteralAlt",
"(",
"IntegerLiteralAltContext",
"ctx",
")",
"{",
"String",
"text",
"=",
"ctx",
".",
"IntegerLiteral",
"(",
")",
".",
"getText",
"(",
")",
";",
"Number",
"num",
"=",
"null",
";",
"try",... | literal { -------------------------------------------------------------------- | [
"literal",
"{",
"--------------------------------------------------------------------"
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java#L3510-L3526 |
before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java | ConditionalCheck.notPositive | @Throws(IllegalPositiveArgumentException.class)
public static void notPositive(final boolean condition, final int value, @Nullable final String name) {
if (condition) {
Check.notPositive(value, name);
}
} | java | @Throws(IllegalPositiveArgumentException.class)
public static void notPositive(final boolean condition, final int value, @Nullable final String name) {
if (condition) {
Check.notPositive(value, name);
}
} | [
"@",
"Throws",
"(",
"IllegalPositiveArgumentException",
".",
"class",
")",
"public",
"static",
"void",
"notPositive",
"(",
"final",
"boolean",
"condition",
",",
"final",
"int",
"value",
",",
"@",
"Nullable",
"final",
"String",
"name",
")",
"{",
"if",
"(",
"c... | Ensures that an integer reference passed as a parameter to the calling method is not greater than {@code 0}.
@param condition
condition must be {@code true}^ so that the check will be performed
@param value
a number
@param name
name of the number reference (in source code)
@throws IllegalNullArgumentException
if the ... | [
"Ensures",
"that",
"an",
"integer",
"reference",
"passed",
"as",
"a",
"parameter",
"to",
"the",
"calling",
"method",
"is",
"not",
"greater",
"than",
"{",
"@code",
"0",
"}",
"."
] | train | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java#L2063-L2068 |
unbescape/unbescape | src/main/java/org/unbescape/properties/PropertiesEscape.java | PropertiesEscape.escapePropertiesValue | public static String escapePropertiesValue(final String text, final PropertiesValueEscapeLevel level) {
if (level == null) {
throw new IllegalArgumentException("The 'level' argument cannot be null");
}
return PropertiesValueEscapeUtil.escape(text, level);
} | java | public static String escapePropertiesValue(final String text, final PropertiesValueEscapeLevel level) {
if (level == null) {
throw new IllegalArgumentException("The 'level' argument cannot be null");
}
return PropertiesValueEscapeUtil.escape(text, level);
} | [
"public",
"static",
"String",
"escapePropertiesValue",
"(",
"final",
"String",
"text",
",",
"final",
"PropertiesValueEscapeLevel",
"level",
")",
"{",
"if",
"(",
"level",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The 'level' argument... | <p>
Perform a (configurable) Java Properties Value <strong>escape</strong> operation on a <tt>String</tt> input.
</p>
<p>
This method will perform an escape operation according to the specified
{@link org.unbescape.properties.PropertiesValueEscapeLevel} argument value.
</p>
<p>
All other <tt>String</tt>-based <tt>escap... | [
"<p",
">",
"Perform",
"a",
"(",
"configurable",
")",
"Java",
"Properties",
"Value",
"<strong",
">",
"escape<",
"/",
"strong",
">",
"operation",
"on",
"a",
"<tt",
">",
"String<",
"/",
"tt",
">",
"input",
".",
"<",
"/",
"p",
">",
"<p",
">",
"This",
"... | train | https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/properties/PropertiesEscape.java#L282-L290 |
SvenEwald/xmlbeam | src/main/java/org/xmlbeam/io/UrlIO.java | UrlIO.readAsMapOf | @Scope(DocScope.IO)
public <T> XBAutoMap<T> readAsMapOf(final Class<T> valueType) throws IOException {
DefaultXPathBinder.validateEvaluationType(valueType);
final Class<?> resourceAwareClass = ReflectionHelper.getDirectCallerClass();
Document document = IOHelper.getDocumentFromURL(projector.... | java | @Scope(DocScope.IO)
public <T> XBAutoMap<T> readAsMapOf(final Class<T> valueType) throws IOException {
DefaultXPathBinder.validateEvaluationType(valueType);
final Class<?> resourceAwareClass = ReflectionHelper.getDirectCallerClass();
Document document = IOHelper.getDocumentFromURL(projector.... | [
"@",
"Scope",
"(",
"DocScope",
".",
"IO",
")",
"public",
"<",
"T",
">",
"XBAutoMap",
"<",
"T",
">",
"readAsMapOf",
"(",
"final",
"Class",
"<",
"T",
">",
"valueType",
")",
"throws",
"IOException",
"{",
"DefaultXPathBinder",
".",
"validateEvaluationType",
"(... | Read complete document to a Map.
@param valueType
@return Closeable map bound to complete document.
@throws IOException | [
"Read",
"complete",
"document",
"to",
"a",
"Map",
"."
] | train | https://github.com/SvenEwald/xmlbeam/blob/acaac1b8fa28d246f17187f5e3c6696458a0b447/src/main/java/org/xmlbeam/io/UrlIO.java#L142-L149 |
Stratio/deep-spark | deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java | Cells.getBigInteger | public BigInteger getBigInteger(String nameSpace, String cellName) {
return getValue(nameSpace, cellName, BigInteger.class);
} | java | public BigInteger getBigInteger(String nameSpace, String cellName) {
return getValue(nameSpace, cellName, BigInteger.class);
} | [
"public",
"BigInteger",
"getBigInteger",
"(",
"String",
"nameSpace",
",",
"String",
"cellName",
")",
"{",
"return",
"getValue",
"(",
"nameSpace",
",",
"cellName",
",",
"BigInteger",
".",
"class",
")",
";",
"}"
] | Returns the {@code BigInteger} value of the {@link Cell} (associated to {@code table}) whose name iscellName, or
null if this Cells object contains no cell whose name is cellName.
@param nameSpace the name of the owning table
@param cellName the name of the Cell we want to retrieve from this Cells object.
@return the... | [
"Returns",
"the",
"{",
"@code",
"BigInteger",
"}",
"value",
"of",
"the",
"{",
"@link",
"Cell",
"}",
"(",
"associated",
"to",
"{",
"@code",
"table",
"}",
")",
"whose",
"name",
"iscellName",
"or",
"null",
"if",
"this",
"Cells",
"object",
"contains",
"no",
... | train | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java#L1219-L1221 |
Azure/azure-sdk-for-java | edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/OrdersInner.java | OrdersInner.beginCreateOrUpdate | public OrderInner beginCreateOrUpdate(String deviceName, String resourceGroupName, OrderInner order) {
return beginCreateOrUpdateWithServiceResponseAsync(deviceName, resourceGroupName, order).toBlocking().single().body();
} | java | public OrderInner beginCreateOrUpdate(String deviceName, String resourceGroupName, OrderInner order) {
return beginCreateOrUpdateWithServiceResponseAsync(deviceName, resourceGroupName, order).toBlocking().single().body();
} | [
"public",
"OrderInner",
"beginCreateOrUpdate",
"(",
"String",
"deviceName",
",",
"String",
"resourceGroupName",
",",
"OrderInner",
"order",
")",
"{",
"return",
"beginCreateOrUpdateWithServiceResponseAsync",
"(",
"deviceName",
",",
"resourceGroupName",
",",
"order",
")",
... | Creates or updates an order.
@param deviceName The device name.
@param resourceGroupName The resource group name.
@param order The order to be created or updated.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by server
@throws Runtime... | [
"Creates",
"or",
"updates",
"an",
"order",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/OrdersInner.java#L392-L394 |
recruit-mp/android-RMP-Appirater | library/src/main/java/jp/co/recruit_mp/android/rmp_appirater/RmpAppirater.java | RmpAppirater.tryToShowPrompt | public static void tryToShowPrompt(Context context, Options options, OnCompleteListener onCompleteListener) {
tryToShowPrompt(context, null, options, onCompleteListener);
} | java | public static void tryToShowPrompt(Context context, Options options, OnCompleteListener onCompleteListener) {
tryToShowPrompt(context, null, options, onCompleteListener);
} | [
"public",
"static",
"void",
"tryToShowPrompt",
"(",
"Context",
"context",
",",
"Options",
"options",
",",
"OnCompleteListener",
"onCompleteListener",
")",
"{",
"tryToShowPrompt",
"(",
"context",
",",
"null",
",",
"options",
",",
"onCompleteListener",
")",
";",
"}"... | Show rating dialog.
<p/>
The dialog will be showed if the user hasn't declined to rate or hasn't rated current version.
@param context Context
@param options RMP-Appirater options.
@param onCompleteListener Listener which be called after process of review dialog finished. | [
"Show",
"rating",
"dialog",
".",
"<p",
"/",
">",
"The",
"dialog",
"will",
"be",
"showed",
"if",
"the",
"user",
"hasn",
"t",
"declined",
"to",
"rate",
"or",
"hasn",
"t",
"rated",
"current",
"version",
"."
] | train | https://github.com/recruit-mp/android-RMP-Appirater/blob/14fcdf110dfb97120303f39aab1de9393e84b90a/library/src/main/java/jp/co/recruit_mp/android/rmp_appirater/RmpAppirater.java#L205-L207 |
amzn/ion-java | src/com/amazon/ion/facet/Facets.java | Facets.asFacet | public static <T> T asFacet(Class<T> facetType, Object subject)
{
T facet = null;
if (subject instanceof Faceted)
{
facet = ((Faceted)subject).asFacet(facetType);
}
else if (facetType.isInstance(subject))
{
facet = facetType.cast(subject);
... | java | public static <T> T asFacet(Class<T> facetType, Object subject)
{
T facet = null;
if (subject instanceof Faceted)
{
facet = ((Faceted)subject).asFacet(facetType);
}
else if (facetType.isInstance(subject))
{
facet = facetType.cast(subject);
... | [
"public",
"static",
"<",
"T",
">",
"T",
"asFacet",
"(",
"Class",
"<",
"T",
">",
"facetType",
",",
"Object",
"subject",
")",
"{",
"T",
"facet",
"=",
"null",
";",
"if",
"(",
"subject",
"instanceof",
"Faceted",
")",
"{",
"facet",
"=",
"(",
"(",
"Facet... | Returns a facet of the given subject if supported, returning null
otherwise.
<p>
If the subject implements {@link Faceted}, then this conversion is
delegated to {@link Faceted#asFacet(Class)}. Otherwise, a simple
cast of the subject is attempted.
@return the requested facet, or null if {@code subject} is null or if
su... | [
"Returns",
"a",
"facet",
"of",
"the",
"given",
"subject",
"if",
"supported",
"returning",
"null",
"otherwise",
".",
"<p",
">",
"If",
"the",
"subject",
"implements",
"{",
"@link",
"Faceted",
"}",
"then",
"this",
"conversion",
"is",
"delegated",
"to",
"{",
"... | train | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/facet/Facets.java#L61-L74 |
BranchMetrics/android-branch-deep-linking | Branch-SDK/src/io/branch/referral/util/LinkProperties.java | LinkProperties.addControlParameter | public LinkProperties addControlParameter(String key, String value) {
this.controlParams_.put(key, value);
return this;
} | java | public LinkProperties addControlParameter(String key, String value) {
this.controlParams_.put(key, value);
return this;
} | [
"public",
"LinkProperties",
"addControlParameter",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"this",
".",
"controlParams_",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | <p>Adds any control params that control the behaviour of the link.
Control parameters include Custom redirect url ($android_url,$ios_url),
path for auto deep linking($android_deeplink_path,$deeplink_path) etc </p>
@param key A {@link String} with value of key for the parameter
@param value A {@link String} with valu... | [
"<p",
">",
"Adds",
"any",
"control",
"params",
"that",
"control",
"the",
"behaviour",
"of",
"the",
"link",
".",
"Control",
"parameters",
"include",
"Custom",
"redirect",
"url",
"(",
"$android_url",
"$ios_url",
")",
"path",
"for",
"auto",
"deep",
"linking",
"... | train | https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/util/LinkProperties.java#L89-L92 |
liferay/com-liferay-commerce | commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CProductPersistenceImpl.java | CProductPersistenceImpl.fetchByUUID_G | @Override
public CProduct fetchByUUID_G(String uuid, long groupId) {
return fetchByUUID_G(uuid, groupId, true);
} | java | @Override
public CProduct fetchByUUID_G(String uuid, long groupId) {
return fetchByUUID_G(uuid, groupId, true);
} | [
"@",
"Override",
"public",
"CProduct",
"fetchByUUID_G",
"(",
"String",
"uuid",
",",
"long",
"groupId",
")",
"{",
"return",
"fetchByUUID_G",
"(",
"uuid",
",",
"groupId",
",",
"true",
")",
";",
"}"
] | Returns the c product where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache.
@param uuid the uuid
@param groupId the group ID
@return the matching c product, or <code>null</code> if a matching c product could not be found | [
"Returns",
"the",
"c",
"product",
"where",
"uuid",
"=",
"?",
";",
"and",
"groupId",
"=",
"?",
";",
"or",
"returns",
"<code",
">",
"null<",
"/",
"code",
">",
"if",
"it",
"could",
"not",
"be",
"found",
".",
"Uses",
"the",
"finder",
"cache",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CProductPersistenceImpl.java#L693-L696 |
j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.readHeader | public String[] readHeader(BufferedReader bufferedReader, ParseError parseError)
throws ParseException, IOException {
checkEntityConfig();
String header = bufferedReader.readLine();
if (header == null) {
if (parseError == null) {
throw new ParseException("no header line read", 0);
} else {
parseE... | java | public String[] readHeader(BufferedReader bufferedReader, ParseError parseError)
throws ParseException, IOException {
checkEntityConfig();
String header = bufferedReader.readLine();
if (header == null) {
if (parseError == null) {
throw new ParseException("no header line read", 0);
} else {
parseE... | [
"public",
"String",
"[",
"]",
"readHeader",
"(",
"BufferedReader",
"bufferedReader",
",",
"ParseError",
"parseError",
")",
"throws",
"ParseException",
",",
"IOException",
"{",
"checkEntityConfig",
"(",
")",
";",
"String",
"header",
"=",
"bufferedReader",
".",
"rea... | Read in a line and process it as a CSV header.
@param bufferedReader
Where to read the header from. It needs to be closed by the caller. Consider using
{@link BufferedReaderLineCounter} to populate the line-number for parse errors.
@param parseError
If not null, this will be set with the first parse error and it will ... | [
"Read",
"in",
"a",
"line",
"and",
"process",
"it",
"as",
"a",
"CSV",
"header",
"."
] | train | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L216-L240 |
mgledi/DRUMS | src/main/java/com/unister/semweb/drums/storable/GeneralStorable.java | GeneralStorable.setValue | public void setValue(int index, byte[] value) throws IOException {
if (index >= structure.valueSizes.size()) {
throw new IOException("Index " + index + " is out of range.");
}
int length = structure.valueSizes.get(index);
if (value.length != length) {
throw new IO... | java | public void setValue(int index, byte[] value) throws IOException {
if (index >= structure.valueSizes.size()) {
throw new IOException("Index " + index + " is out of range.");
}
int length = structure.valueSizes.get(index);
if (value.length != length) {
throw new IO... | [
"public",
"void",
"setValue",
"(",
"int",
"index",
",",
"byte",
"[",
"]",
"value",
")",
"throws",
"IOException",
"{",
"if",
"(",
"index",
">=",
"structure",
".",
"valueSizes",
".",
"size",
"(",
")",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"Inde... | Sets the value belonging to the given field.
@param index
the index of the requested field
@param value
the value to set
@throws IOException | [
"Sets",
"the",
"value",
"belonging",
"to",
"the",
"given",
"field",
"."
] | train | https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/storable/GeneralStorable.java#L137-L147 |
ironjacamar/ironjacamar | codegenerator/src/main/java/org/ironjacamar/codegenerator/code/PropsCodeGen.java | PropsCodeGen.writeHashCode | @Override
void writeHashCode(Definition def, Writer out, int indent) throws IOException
{
writeIndent(out, indent);
out.write("/** \n");
writeIndent(out, indent);
out.write(" * Returns a hash code value for the object.\n");
writeIndent(out, indent);
out.write(" * @return A hash... | java | @Override
void writeHashCode(Definition def, Writer out, int indent) throws IOException
{
writeIndent(out, indent);
out.write("/** \n");
writeIndent(out, indent);
out.write(" * Returns a hash code value for the object.\n");
writeIndent(out, indent);
out.write(" * @return A hash... | [
"@",
"Override",
"void",
"writeHashCode",
"(",
"Definition",
"def",
",",
"Writer",
"out",
",",
"int",
"indent",
")",
"throws",
"IOException",
"{",
"writeIndent",
"(",
"out",
",",
"indent",
")",
";",
"out",
".",
"write",
"(",
"\"/** \\n\"",
")",
";",
"wri... | Output hashCode method
@param def definition
@param out Writer
@param indent space number
@throws IOException ioException | [
"Output",
"hashCode",
"method"
] | train | https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/PropsCodeGen.java#L135-L166 |
xwiki/xwiki-rendering | xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/internal/transformation/macro/MacroTransformation.java | MacroTransformation.wrapInMacroMarker | private Block wrapInMacroMarker(MacroBlock macroBlockToWrap, List<Block> newBlocks)
{
return new MacroMarkerBlock(macroBlockToWrap.getId(), macroBlockToWrap.getParameters(),
macroBlockToWrap.getContent(), newBlocks, macroBlockToWrap.isInline());
} | java | private Block wrapInMacroMarker(MacroBlock macroBlockToWrap, List<Block> newBlocks)
{
return new MacroMarkerBlock(macroBlockToWrap.getId(), macroBlockToWrap.getParameters(),
macroBlockToWrap.getContent(), newBlocks, macroBlockToWrap.isInline());
} | [
"private",
"Block",
"wrapInMacroMarker",
"(",
"MacroBlock",
"macroBlockToWrap",
",",
"List",
"<",
"Block",
">",
"newBlocks",
")",
"{",
"return",
"new",
"MacroMarkerBlock",
"(",
"macroBlockToWrap",
".",
"getId",
"(",
")",
",",
"macroBlockToWrap",
".",
"getParameter... | Wrap the output of a macro block with a {@link MacroMarkerBlock}.
@param macroBlockToWrap the block that should be replaced
@param newBlocks list of blocks to wrap
@return the wrapper | [
"Wrap",
"the",
"output",
"of",
"a",
"macro",
"block",
"with",
"a",
"{",
"@link",
"MacroMarkerBlock",
"}",
"."
] | train | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/internal/transformation/macro/MacroTransformation.java#L331-L335 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.