repository_name stringlengths 7 58 | func_path_in_repository stringlengths 11 218 | func_name stringlengths 4 140 | whole_func_string stringlengths 153 5.32k | language stringclasses 1
value | func_code_string stringlengths 72 4k | func_code_tokens listlengths 20 832 | func_documentation_string stringlengths 61 2k | func_documentation_tokens listlengths 1 647 | split_name stringclasses 1
value | func_code_url stringlengths 102 339 |
|---|---|---|---|---|---|---|---|---|---|---|
sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java | SARLOperationHelper._hasSideEffects | protected Boolean _hasSideEffects(XSynchronizedExpression expression, ISideEffectContext context) {
"""
Test if the given expression has side effects.
@param expression the expression.
@param context the list of context expressions.
@return {@code true} if the expression has side effects.
"""
return has... | java | protected Boolean _hasSideEffects(XSynchronizedExpression expression, ISideEffectContext context) {
return hasSideEffects(expression.getExpression(), context);
} | [
"protected",
"Boolean",
"_hasSideEffects",
"(",
"XSynchronizedExpression",
"expression",
",",
"ISideEffectContext",
"context",
")",
"{",
"return",
"hasSideEffects",
"(",
"expression",
".",
"getExpression",
"(",
")",
",",
"context",
")",
";",
"}"
] | Test if the given expression has side effects.
@param expression the expression.
@param context the list of context expressions.
@return {@code true} if the expression has side effects. | [
"Test",
"if",
"the",
"given",
"expression",
"has",
"side",
"effects",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java#L264-L266 |
ginere/ginere-base | src/main/java/eu/ginere/base/util/i18n/I18NConnector.java | I18NConnector.getLabel | public static String getLabel(String section, String idInSection) {
"""
Returns the value for this label ussing the getThreadLocaleLanguage
@param section
@param idInSection
@return
"""
Language language=getThreadLocalLanguage(null);
if (language==null){
return idInSection;
} else {
return ... | java | public static String getLabel(String section, String idInSection) {
Language language=getThreadLocalLanguage(null);
if (language==null){
return idInSection;
} else {
return getLabel(language, section, idInSection);
}
} | [
"public",
"static",
"String",
"getLabel",
"(",
"String",
"section",
",",
"String",
"idInSection",
")",
"{",
"Language",
"language",
"=",
"getThreadLocalLanguage",
"(",
"null",
")",
";",
"if",
"(",
"language",
"==",
"null",
")",
"{",
"return",
"idInSection",
... | Returns the value for this label ussing the getThreadLocaleLanguage
@param section
@param idInSection
@return | [
"Returns",
"the",
"value",
"for",
"this",
"label",
"ussing",
"the",
"getThreadLocaleLanguage"
] | train | https://github.com/ginere/ginere-base/blob/b1cc1c5834bd8a31df475c6f3fc0ee51273c5a24/src/main/java/eu/ginere/base/util/i18n/I18NConnector.java#L85-L93 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java | BigtableDataClient.create | public static BigtableDataClient create(String projectId, String instanceId) throws IOException {
"""
Constructs an instance of BigtableDataClient with default settings.
@param projectId The project id of the instance to connect to.
@param instanceId The id of the instance to connect to.
@return A new client.... | java | public static BigtableDataClient create(String projectId, String instanceId) throws IOException {
BigtableDataSettings settings =
BigtableDataSettings.newBuilder().setProjectId(projectId).setInstanceId(instanceId).build();
return create(settings);
} | [
"public",
"static",
"BigtableDataClient",
"create",
"(",
"String",
"projectId",
",",
"String",
"instanceId",
")",
"throws",
"IOException",
"{",
"BigtableDataSettings",
"settings",
"=",
"BigtableDataSettings",
".",
"newBuilder",
"(",
")",
".",
"setProjectId",
"(",
"p... | Constructs an instance of BigtableDataClient with default settings.
@param projectId The project id of the instance to connect to.
@param instanceId The id of the instance to connect to.
@return A new client.
@throws IOException If any. | [
"Constructs",
"an",
"instance",
"of",
"BigtableDataClient",
"with",
"default",
"settings",
"."
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java#L123-L127 |
alkacon/opencms-core | src/org/opencms/db/CmsDriverManager.java | CmsDriverManager.deletePropertyDefinition | public void deletePropertyDefinition(CmsDbContext dbc, String name) throws CmsException {
"""
Deletes a property definition.<p>
@param dbc the current database context
@param name the name of the property definition to delete
@throws CmsException if something goes wrong
"""
CmsPropertyDefinitio... | java | public void deletePropertyDefinition(CmsDbContext dbc, String name) throws CmsException {
CmsPropertyDefinition propertyDefinition = null;
try {
// first read and then delete the metadefinition.
propertyDefinition = readPropertyDefinition(dbc, name);
getVfsDriver(db... | [
"public",
"void",
"deletePropertyDefinition",
"(",
"CmsDbContext",
"dbc",
",",
"String",
"name",
")",
"throws",
"CmsException",
"{",
"CmsPropertyDefinition",
"propertyDefinition",
"=",
"null",
";",
"try",
"{",
"// first read and then delete the metadefinition.",
"propertyDe... | Deletes a property definition.<p>
@param dbc the current database context
@param name the name of the property definition to delete
@throws CmsException if something goes wrong | [
"Deletes",
"a",
"property",
"definition",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L2748-L2765 |
MenoData/Time4J | base/src/main/java/net/time4j/MachineTime.java | MachineTime.ofPosixSeconds | public static MachineTime<TimeUnit> ofPosixSeconds(double seconds) {
"""
/*[deutsch]
<p>Erzeugt eine Dauer als Maschinenzeit auf der POSIX-Skala. </p>
@param seconds decimal POSIX-seconds
@return new machine time duration
@throws ArithmeticException in case of numerical overflow
@throws IllegalArgu... | java | public static MachineTime<TimeUnit> ofPosixSeconds(double seconds) {
if (Double.isInfinite(seconds) || Double.isNaN(seconds)) {
throw new IllegalArgumentException("Invalid value: " + seconds);
}
long secs = (long) Math.floor(seconds);
int fraction = (int) ((seconds - secs) ... | [
"public",
"static",
"MachineTime",
"<",
"TimeUnit",
">",
"ofPosixSeconds",
"(",
"double",
"seconds",
")",
"{",
"if",
"(",
"Double",
".",
"isInfinite",
"(",
"seconds",
")",
"||",
"Double",
".",
"isNaN",
"(",
"seconds",
")",
")",
"{",
"throw",
"new",
"Ille... | /*[deutsch]
<p>Erzeugt eine Dauer als Maschinenzeit auf der POSIX-Skala. </p>
@param seconds decimal POSIX-seconds
@return new machine time duration
@throws ArithmeticException in case of numerical overflow
@throws IllegalArgumentException if the argument is infinite or NaN
@since 2.0 | [
"/",
"*",
"[",
"deutsch",
"]",
"<p",
">",
"Erzeugt",
"eine",
"Dauer",
"als",
"Maschinenzeit",
"auf",
"der",
"POSIX",
"-",
"Skala",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/MachineTime.java#L330-L340 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java | ApiOvhDbaaslogs.serviceName_output_graylog_stream_streamId_archive_archiveId_url_POST | public OvhArchiveUrl serviceName_output_graylog_stream_streamId_archive_archiveId_url_POST(String serviceName, String streamId, String archiveId) throws IOException {
"""
Get a public temporary URL to access the archive
REST: POST /dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/archive/{archiveId}/ur... | java | public OvhArchiveUrl serviceName_output_graylog_stream_streamId_archive_archiveId_url_POST(String serviceName, String streamId, String archiveId) throws IOException {
String qPath = "/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/archive/{archiveId}/url";
StringBuilder sb = path(qPath, serviceName, stre... | [
"public",
"OvhArchiveUrl",
"serviceName_output_graylog_stream_streamId_archive_archiveId_url_POST",
"(",
"String",
"serviceName",
",",
"String",
"streamId",
",",
"String",
"archiveId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/dbaas/logs/{serviceName}/outpu... | Get a public temporary URL to access the archive
REST: POST /dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/archive/{archiveId}/url
@param serviceName [required] Service name
@param streamId [required] Stream ID
@param archiveId [required] Archive ID | [
"Get",
"a",
"public",
"temporary",
"URL",
"to",
"access",
"the",
"archive"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java#L1472-L1477 |
JM-Lab/utils-elasticsearch | src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchSearchAndCount.java | JMElasticsearchSearchAndCount.getSearchRequestBuilder | public SearchRequestBuilder getSearchRequestBuilder(boolean isSetExplain,
String[] indices, String[] types) {
"""
Gets search request builder.
@param isSetExplain the is set explain
@param indices the indices
@param types the types
@return the search request builder
"""
re... | java | public SearchRequestBuilder getSearchRequestBuilder(boolean isSetExplain,
String[] indices, String[] types) {
return getSearchRequestBuilder(isSetExplain, indices, types, null);
} | [
"public",
"SearchRequestBuilder",
"getSearchRequestBuilder",
"(",
"boolean",
"isSetExplain",
",",
"String",
"[",
"]",
"indices",
",",
"String",
"[",
"]",
"types",
")",
"{",
"return",
"getSearchRequestBuilder",
"(",
"isSetExplain",
",",
"indices",
",",
"types",
","... | Gets search request builder.
@param isSetExplain the is set explain
@param indices the indices
@param types the types
@return the search request builder | [
"Gets",
"search",
"request",
"builder",
"."
] | train | https://github.com/JM-Lab/utils-elasticsearch/blob/6ccec90e1e51d65d2af5efbb6d7b9f9bad90e638/src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchSearchAndCount.java#L247-L250 |
xvik/guice-persist-orient | src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/param/CommandParamsContext.java | CommandParamsContext.addStaticElVarValue | public void addStaticElVarValue(final String name, final String value) {
"""
Register static query el variable value.
@param name variable name
@param value variable value
"""
check(!staticElValues.containsKey(name),
"Duplicate el variable %s value declaration: %s (original: %s)", ... | java | public void addStaticElVarValue(final String name, final String value) {
check(!staticElValues.containsKey(name),
"Duplicate el variable %s value declaration: %s (original: %s)", name, value,
staticElValues.get(name));
check(!dynamicElValues.contains(name),
... | [
"public",
"void",
"addStaticElVarValue",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"value",
")",
"{",
"check",
"(",
"!",
"staticElValues",
".",
"containsKey",
"(",
"name",
")",
",",
"\"Duplicate el variable %s value declaration: %s (original: %s)\"",
","... | Register static query el variable value.
@param name variable name
@param value variable value | [
"Register",
"static",
"query",
"el",
"variable",
"value",
"."
] | train | https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/param/CommandParamsContext.java#L60-L68 |
osglworks/java-tool | src/main/java/org/osgl/Lang.java | F5.orElse | public F5<P1, P2, P3, P4, P5, R> orElse(
final Func5<? super P1, ? super P2, ? super P3, ? super P4, ? super P5, ? extends R> fallback
) {
"""
Returns a composed function that when applied, try to apply this function first, in case
a {@link NotAppliedException} is captured apply to the fal... | java | public F5<P1, P2, P3, P4, P5, R> orElse(
final Func5<? super P1, ? super P2, ? super P3, ? super P4, ? super P5, ? extends R> fallback
) {
final F5<P1, P2, P3, P4, P5, R> me = this;
return new F5<P1, P2, P3, P4, P5, R>() {
@Override
public ... | [
"public",
"F5",
"<",
"P1",
",",
"P2",
",",
"P3",
",",
"P4",
",",
"P5",
",",
"R",
">",
"orElse",
"(",
"final",
"Func5",
"<",
"?",
"super",
"P1",
",",
"?",
"super",
"P2",
",",
"?",
"super",
"P3",
",",
"?",
"super",
"P4",
",",
"?",
"super",
"P... | Returns a composed function that when applied, try to apply this function first, in case
a {@link NotAppliedException} is captured apply to the fallback function specified. This
method helps to implement partial function
@param fallback
the function to applied if this function doesn't apply to the parameter(s)
@return... | [
"Returns",
"a",
"composed",
"function",
"that",
"when",
"applied",
"try",
"to",
"apply",
"this",
"function",
"first",
"in",
"case",
"a",
"{",
"@link",
"NotAppliedException",
"}",
"is",
"captured",
"apply",
"to",
"the",
"fallback",
"function",
"specified",
".",... | train | https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/Lang.java#L1919-L1933 |
ibm-bluemix-mobile-services/bms-clientsdk-android-core | lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationHeaderHelper.java | AuthorizationHeaderHelper.addAuthorizationHeader | public static void addAuthorizationHeader(URLConnection urlConnection, String header) {
"""
Adds the authorization header to the given URL connection object.
@param urlConnection The URL connection to add the header to.
"""
if (header != null) {
urlConnection.setRequestProperty(AUTHORIZATI... | java | public static void addAuthorizationHeader(URLConnection urlConnection, String header) {
if (header != null) {
urlConnection.setRequestProperty(AUTHORIZATION_HEADER, header);
}
} | [
"public",
"static",
"void",
"addAuthorizationHeader",
"(",
"URLConnection",
"urlConnection",
",",
"String",
"header",
")",
"{",
"if",
"(",
"header",
"!=",
"null",
")",
"{",
"urlConnection",
".",
"setRequestProperty",
"(",
"AUTHORIZATION_HEADER",
",",
"header",
")"... | Adds the authorization header to the given URL connection object.
@param urlConnection The URL connection to add the header to. | [
"Adds",
"the",
"authorization",
"header",
"to",
"the",
"given",
"URL",
"connection",
"object",
"."
] | train | https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-core/blob/8db4f00d0d564792397bfc0e5bd57d52a238b858/lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationHeaderHelper.java#L60-L64 |
hellosign/hellosign-java-sdk | src/main/java/com/hellosign/sdk/resource/TemplateDraft.java | TemplateDraft.serializeMergeFields | public static String serializeMergeFields(Map<String, FieldType> mergeFields) throws HelloSignException {
"""
Helper method to convert a Java Map into the JSON string required
by the HelloSign API.
@param mergeFields Map
@return String
@throws HelloSignException Thrown if there's a problem parsing JSONObjects
... | java | public static String serializeMergeFields(Map<String, FieldType> mergeFields) throws HelloSignException {
if (mergeFields == null || mergeFields.isEmpty()) {
return null;
}
JSONArray mergeFieldArray = new JSONArray();
for (String key : mergeFields.keySet()) {
Fiel... | [
"public",
"static",
"String",
"serializeMergeFields",
"(",
"Map",
"<",
"String",
",",
"FieldType",
">",
"mergeFields",
")",
"throws",
"HelloSignException",
"{",
"if",
"(",
"mergeFields",
"==",
"null",
"||",
"mergeFields",
".",
"isEmpty",
"(",
")",
")",
"{",
... | Helper method to convert a Java Map into the JSON string required
by the HelloSign API.
@param mergeFields Map
@return String
@throws HelloSignException Thrown if there's a problem parsing JSONObjects | [
"Helper",
"method",
"to",
"convert",
"a",
"Java",
"Map",
"into",
"the",
"JSON",
"string",
"required",
"by",
"the",
"HelloSign",
"API",
"."
] | train | https://github.com/hellosign/hellosign-java-sdk/blob/08fa7aeb3b0c68ddb6c7ea797d114d55d36d36b1/src/main/java/com/hellosign/sdk/resource/TemplateDraft.java#L240-L257 |
Wikidata/Wikidata-Toolkit | wdtk-examples/src/main/java/org/wikidata/wdtk/examples/ClassPropertyUsageAnalyzer.java | ClassPropertyUsageAnalyzer.countPropertyQualifier | private void countPropertyQualifier(PropertyIdValue property, int count) {
"""
Counts additional occurrences of a property as qualifier property of
statements.
@param property
the property to count
@param count
the number of times to count the property
"""
PropertyRecord propertyRecord = getPropertyRe... | java | private void countPropertyQualifier(PropertyIdValue property, int count) {
PropertyRecord propertyRecord = getPropertyRecord(property);
propertyRecord.qualifierCount = propertyRecord.qualifierCount + count;
} | [
"private",
"void",
"countPropertyQualifier",
"(",
"PropertyIdValue",
"property",
",",
"int",
"count",
")",
"{",
"PropertyRecord",
"propertyRecord",
"=",
"getPropertyRecord",
"(",
"property",
")",
";",
"propertyRecord",
".",
"qualifierCount",
"=",
"propertyRecord",
"."... | Counts additional occurrences of a property as qualifier property of
statements.
@param property
the property to count
@param count
the number of times to count the property | [
"Counts",
"additional",
"occurrences",
"of",
"a",
"property",
"as",
"qualifier",
"property",
"of",
"statements",
"."
] | train | https://github.com/Wikidata/Wikidata-Toolkit/blob/7732851dda47e1febff406fba27bfec023f4786e/wdtk-examples/src/main/java/org/wikidata/wdtk/examples/ClassPropertyUsageAnalyzer.java#L448-L451 |
Netflix/eureka | eureka-client/src/main/java/com/netflix/appinfo/InstanceInfo.java | InstanceInfo.getZone | public static String getZone(String[] availZones, InstanceInfo myInfo) {
"""
Get the zone that a particular instance is in.
Note that for AWS deployments, myInfo should contain AWS dataCenterInfo which should contain
the AWS zone of the instance, and availZones is ignored.
@param availZones the list of availa... | java | public static String getZone(String[] availZones, InstanceInfo myInfo) {
String instanceZone = ((availZones == null || availZones.length == 0) ? "default"
: availZones[0]);
if (myInfo != null
&& myInfo.getDataCenterInfo().getName() == DataCenterInfo.Name.Amazon) {
... | [
"public",
"static",
"String",
"getZone",
"(",
"String",
"[",
"]",
"availZones",
",",
"InstanceInfo",
"myInfo",
")",
"{",
"String",
"instanceZone",
"=",
"(",
"(",
"availZones",
"==",
"null",
"||",
"availZones",
".",
"length",
"==",
"0",
")",
"?",
"\"default... | Get the zone that a particular instance is in.
Note that for AWS deployments, myInfo should contain AWS dataCenterInfo which should contain
the AWS zone of the instance, and availZones is ignored.
@param availZones the list of available zones for non-AWS deployments
@param myInfo
- The InstanceInfo object of the insta... | [
"Get",
"the",
"zone",
"that",
"a",
"particular",
"instance",
"is",
"in",
".",
"Note",
"that",
"for",
"AWS",
"deployments",
"myInfo",
"should",
"contain",
"AWS",
"dataCenterInfo",
"which",
"should",
"contain",
"the",
"AWS",
"zone",
"of",
"the",
"instance",
"a... | train | https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-client/src/main/java/com/netflix/appinfo/InstanceInfo.java#L1372-L1386 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/locking/CommonsOJBLockManager.java | CommonsOJBLockManager.tryLock | public boolean tryLock(Object ownerId, Object resourceId, int targetLockLevel, boolean reentrant, Object isolationId) {
"""
Tries to acquire a lock on a resource. <br>
<br>
This method does not block, but immediatly returns. If a lock is not
available <code>false</code> will be returned.
@param ownerId ... | java | public boolean tryLock(Object ownerId, Object resourceId, int targetLockLevel, boolean reentrant, Object isolationId)
{
timeoutCheck(ownerId);
OJBLock lock = atomicGetOrCreateLock(resourceId, isolationId);
boolean acquired = lock.tryLock(ownerId, targetLockLevel,
reent... | [
"public",
"boolean",
"tryLock",
"(",
"Object",
"ownerId",
",",
"Object",
"resourceId",
",",
"int",
"targetLockLevel",
",",
"boolean",
"reentrant",
",",
"Object",
"isolationId",
")",
"{",
"timeoutCheck",
"(",
"ownerId",
")",
";",
"OJBLock",
"lock",
"=",
"atomic... | Tries to acquire a lock on a resource. <br>
<br>
This method does not block, but immediatly returns. If a lock is not
available <code>false</code> will be returned.
@param ownerId a unique id identifying the entity that wants to acquire this
lock
@param resourceId the resource to get the level for
@param ... | [
"Tries",
"to",
"acquire",
"a",
"lock",
"on",
"a",
"resource",
".",
"<br",
">",
"<br",
">",
"This",
"method",
"does",
"not",
"block",
"but",
"immediatly",
"returns",
".",
"If",
"a",
"lock",
"is",
"not",
"available",
"<code",
">",
"false<",
"/",
"code",
... | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/locking/CommonsOJBLockManager.java#L73-L87 |
UrielCh/ovh-java-sdk | ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java | ApiOvhSms.serviceName_virtualNumbers_number_incoming_GET | public ArrayList<Long> serviceName_virtualNumbers_number_incoming_GET(String serviceName, String number, Date creationDatetime_from, Date creationDatetime_to, String sender, String tag) throws IOException {
"""
Sms received associated to the sms account
REST: GET /sms/{serviceName}/virtualNumbers/{number}/incom... | java | public ArrayList<Long> serviceName_virtualNumbers_number_incoming_GET(String serviceName, String number, Date creationDatetime_from, Date creationDatetime_to, String sender, String tag) throws IOException {
String qPath = "/sms/{serviceName}/virtualNumbers/{number}/incoming";
StringBuilder sb = path(qPath, serviceN... | [
"public",
"ArrayList",
"<",
"Long",
">",
"serviceName_virtualNumbers_number_incoming_GET",
"(",
"String",
"serviceName",
",",
"String",
"number",
",",
"Date",
"creationDatetime_from",
",",
"Date",
"creationDatetime_to",
",",
"String",
"sender",
",",
"String",
"tag",
"... | Sms received associated to the sms account
REST: GET /sms/{serviceName}/virtualNumbers/{number}/incoming
@param creationDatetime_from [required] Filter the value of creationDatetime property (>=)
@param creationDatetime_to [required] Filter the value of creationDatetime property (<=)
@param tag [required] Filter the v... | [
"Sms",
"received",
"associated",
"to",
"the",
"sms",
"account"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java#L410-L419 |
opensourceBIM/BIMserver | PluginBase/src/org/bimserver/geometry/Matrix.java | Matrix.setIdentityM | public static void setIdentityM(float[] sm, int smOffset) {
"""
Sets matrix m to the identity matrix.
@param sm returns the result
@param smOffset index into sm where the result matrix starts
"""
for (int i=0 ; i<16 ; i++) {
sm[smOffset + i] = 0;
}
for(int i = 0; i < 1... | java | public static void setIdentityM(float[] sm, int smOffset) {
for (int i=0 ; i<16 ; i++) {
sm[smOffset + i] = 0;
}
for(int i = 0; i < 16; i += 5) {
sm[smOffset + i] = 1.0f;
}
} | [
"public",
"static",
"void",
"setIdentityM",
"(",
"float",
"[",
"]",
"sm",
",",
"int",
"smOffset",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"16",
";",
"i",
"++",
")",
"{",
"sm",
"[",
"smOffset",
"+",
"i",
"]",
"=",
"0",
";",
... | Sets matrix m to the identity matrix.
@param sm returns the result
@param smOffset index into sm where the result matrix starts | [
"Sets",
"matrix",
"m",
"to",
"the",
"identity",
"matrix",
"."
] | train | https://github.com/opensourceBIM/BIMserver/blob/116803c3047d1b32217366757cee1bb3880fda63/PluginBase/src/org/bimserver/geometry/Matrix.java#L653-L660 |
assertthat/selenium-shutterbug | src/main/java/com/assertthat/selenium_shutterbug/core/Shutterbug.java | Shutterbug.shootPage | public static PageSnapshot shootPage(WebDriver driver, ScrollStrategy scroll, int scrollTimeout) {
"""
To be used when screen shooting the page
and need to scroll while making screen shots, either vertically or
horizontally or both directions (Chrome).
@param driver WebDriver instance
@param scroll ScrollStr... | java | public static PageSnapshot shootPage(WebDriver driver, ScrollStrategy scroll, int scrollTimeout) {
return shootPage(driver,scroll,scrollTimeout,false);
} | [
"public",
"static",
"PageSnapshot",
"shootPage",
"(",
"WebDriver",
"driver",
",",
"ScrollStrategy",
"scroll",
",",
"int",
"scrollTimeout",
")",
"{",
"return",
"shootPage",
"(",
"driver",
",",
"scroll",
",",
"scrollTimeout",
",",
"false",
")",
";",
"}"
] | To be used when screen shooting the page
and need to scroll while making screen shots, either vertically or
horizontally or both directions (Chrome).
@param driver WebDriver instance
@param scroll ScrollStrategy How you need to scroll
@param scrollTimeout Timeout to wait after scrolling and before taking screen shot
... | [
"To",
"be",
"used",
"when",
"screen",
"shooting",
"the",
"page",
"and",
"need",
"to",
"scroll",
"while",
"making",
"screen",
"shots",
"either",
"vertically",
"or",
"horizontally",
"or",
"both",
"directions",
"(",
"Chrome",
")",
"."
] | train | https://github.com/assertthat/selenium-shutterbug/blob/770d9b92423200d262c9ab70e40405921d81e262/src/main/java/com/assertthat/selenium_shutterbug/core/Shutterbug.java#L71-L73 |
micronaut-projects/micronaut-core | inject/src/main/java/io/micronaut/inject/writer/AbstractClassFileWriter.java | AbstractClassFileWriter.pushTypeArguments | protected static void pushTypeArguments(GeneratorAdapter generatorAdapter, Map<String, Object> types) {
"""
Pushes type arguments onto the stack.
@param generatorAdapter The generator adapter
@param types The type references
"""
if (types == null || types.isEmpty()) {
generatorAdapter.vis... | java | protected static void pushTypeArguments(GeneratorAdapter generatorAdapter, Map<String, Object> types) {
if (types == null || types.isEmpty()) {
generatorAdapter.visitInsn(ACONST_NULL);
return;
}
int len = types.size();
// Build calls to Argument.create(...)
... | [
"protected",
"static",
"void",
"pushTypeArguments",
"(",
"GeneratorAdapter",
"generatorAdapter",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"types",
")",
"{",
"if",
"(",
"types",
"==",
"null",
"||",
"types",
".",
"isEmpty",
"(",
")",
")",
"{",
"generat... | Pushes type arguments onto the stack.
@param generatorAdapter The generator adapter
@param types The type references | [
"Pushes",
"type",
"arguments",
"onto",
"the",
"stack",
"."
] | train | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/writer/AbstractClassFileWriter.java#L107-L135 |
flow/caustic | api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java | MeshGenerator.generateWireCuboid | public static void generateWireCuboid(TFloatList positions, TIntList indices, Vector3f size) {
"""
Generates a cuboid shaped wireframe (the outline of the cuboid). The center is at the middle of the cuboid.
@param positions Where to save the position information
@param indices Where to save the indices
@param... | java | public static void generateWireCuboid(TFloatList positions, TIntList indices, Vector3f size) {
/*
* 4------5
* |\ |\
* | 7------6
* | | | |
* 0-|----1 |
* \| \|
* 3------2
*/
// Corner positions
final Vector3f ... | [
"public",
"static",
"void",
"generateWireCuboid",
"(",
"TFloatList",
"positions",
",",
"TIntList",
"indices",
",",
"Vector3f",
"size",
")",
"{",
"/*\n * 4------5\n * |\\ |\\\n * | 7------6\n * | | | |\n * 0-|----1 |\n * \\| \\... | Generates a cuboid shaped wireframe (the outline of the cuboid). The center is at the middle of the cuboid.
@param positions Where to save the position information
@param indices Where to save the indices
@param size The size of the cuboid to generate, on x, y and z | [
"Generates",
"a",
"cuboid",
"shaped",
"wireframe",
"(",
"the",
"outline",
"of",
"the",
"cuboid",
")",
".",
"The",
"center",
"is",
"at",
"the",
"middle",
"of",
"the",
"cuboid",
"."
] | train | https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java#L550-L585 |
lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/geometry/ExampleImageStitching.java | ExampleImageStitching.computeTransform | public static<T extends ImageGray<T>, FD extends TupleDesc> Homography2D_F64
computeTransform( T imageA , T imageB ,
DetectDescribePoint<T,FD> detDesc ,
AssociateDescription<FD> associate ,
ModelMatcher<Homography2D_F64,AssociatedPair> modelMatcher ) {
"""
Using abstracted code, find a transf... | java | public static<T extends ImageGray<T>, FD extends TupleDesc> Homography2D_F64
computeTransform( T imageA , T imageB ,
DetectDescribePoint<T,FD> detDesc ,
AssociateDescription<FD> associate ,
ModelMatcher<Homography2D_F64,AssociatedPair> modelMatcher )
{
// get the length of the description
Lis... | [
"public",
"static",
"<",
"T",
"extends",
"ImageGray",
"<",
"T",
">",
",",
"FD",
"extends",
"TupleDesc",
">",
"Homography2D_F64",
"computeTransform",
"(",
"T",
"imageA",
",",
"T",
"imageB",
",",
"DetectDescribePoint",
"<",
"T",
",",
"FD",
">",
"detDesc",
",... | Using abstracted code, find a transform which minimizes the difference between corresponding features
in both images. This code is completely model independent and is the core algorithms. | [
"Using",
"abstracted",
"code",
"find",
"a",
"transform",
"which",
"minimizes",
"the",
"difference",
"between",
"corresponding",
"features",
"in",
"both",
"images",
".",
"This",
"code",
"is",
"completely",
"model",
"independent",
"and",
"is",
"the",
"core",
"algo... | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/geometry/ExampleImageStitching.java#L82-L122 |
apache/incubator-gobblin | gobblin-utility/src/main/java/org/apache/gobblin/util/ClustersNames.java | ClustersNames.getClusterName | public String getClusterName(Configuration conf) {
"""
Returns the cluster name on which the application is running. Uses Hadoop configuration passed in to get the
url of the resourceManager or jobtracker. The URL is then translated into a human readable cluster name using
{@link #getClusterName(String)}
<p>
... | java | public String getClusterName(Configuration conf) {
// ResourceManager address in Hadoop2
String clusterIdentifier = conf.get("yarn.resourcemanager.address");
clusterIdentifier = getClusterName(clusterIdentifier);
// If job is running outside of Hadoop (Standalone) use hostname
// If clusterIdentifi... | [
"public",
"String",
"getClusterName",
"(",
"Configuration",
"conf",
")",
"{",
"// ResourceManager address in Hadoop2",
"String",
"clusterIdentifier",
"=",
"conf",
".",
"get",
"(",
"\"yarn.resourcemanager.address\"",
")",
";",
"clusterIdentifier",
"=",
"getClusterName",
"(... | Returns the cluster name on which the application is running. Uses Hadoop configuration passed in to get the
url of the resourceManager or jobtracker. The URL is then translated into a human readable cluster name using
{@link #getClusterName(String)}
<p>
<b>MapReduce mode</b> Uses the value for "yarn.resourcemanager.a... | [
"Returns",
"the",
"cluster",
"name",
"on",
"which",
"the",
"application",
"is",
"running",
".",
"Uses",
"Hadoop",
"configuration",
"passed",
"in",
"to",
"get",
"the",
"url",
"of",
"the",
"resourceManager",
"or",
"jobtracker",
".",
"The",
"URL",
"is",
"then",... | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ClustersNames.java#L151-L168 |
Azure/azure-sdk-for-java | appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java | DiagnosticsInner.listSiteDiagnosticCategoriesSlotAsync | public Observable<Page<DiagnosticCategoryInner>> listSiteDiagnosticCategoriesSlotAsync(final String resourceGroupName, final String siteName, final String slot) {
"""
Get Diagnostics Categories.
Get Diagnostics Categories.
@param resourceGroupName Name of the resource group to which the resource belongs.
@par... | java | public Observable<Page<DiagnosticCategoryInner>> listSiteDiagnosticCategoriesSlotAsync(final String resourceGroupName, final String siteName, final String slot) {
return listSiteDiagnosticCategoriesSlotWithServiceResponseAsync(resourceGroupName, siteName, slot)
.map(new Func1<ServiceResponse<Page<Di... | [
"public",
"Observable",
"<",
"Page",
"<",
"DiagnosticCategoryInner",
">",
">",
"listSiteDiagnosticCategoriesSlotAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"siteName",
",",
"final",
"String",
"slot",
")",
"{",
"return",
"listSiteDiagno... | Get Diagnostics Categories.
Get Diagnostics Categories.
@param resourceGroupName Name of the resource group to which the resource belongs.
@param siteName Site Name
@param slot Slot Name
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the PagedList<DiagnosticCateg... | [
"Get",
"Diagnostics",
"Categories",
".",
"Get",
"Diagnostics",
"Categories",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java#L1392-L1400 |
lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/util/ClassUtils.java | ClassUtils.getValueFromMapForClass | public static Object getValueFromMapForClass(final Class typeClass, final Map classMap) {
"""
Given a {@link Map}where the keys are {@link Class}es, search the map
for the closest match of the key to the <tt>typeClass</tt>. This is
extremely useful to support polymorphism (and an absolute requirement to
find pr... | java | public static Object getValueFromMapForClass(final Class typeClass, final Map classMap) {
Object val = classMap.get(typeClass);
if (val == null) {
// search through the interfaces first
val = getValueFromMapForInterfaces(typeClass, classMap);
if (val == null) {
// now go up through the inheritance hie... | [
"public",
"static",
"Object",
"getValueFromMapForClass",
"(",
"final",
"Class",
"typeClass",
",",
"final",
"Map",
"classMap",
")",
"{",
"Object",
"val",
"=",
"classMap",
".",
"get",
"(",
"typeClass",
")",
";",
"if",
"(",
"val",
"==",
"null",
")",
"{",
"/... | Given a {@link Map}where the keys are {@link Class}es, search the map
for the closest match of the key to the <tt>typeClass</tt>. This is
extremely useful to support polymorphism (and an absolute requirement to
find proxied classes where classes are acting as keys in a map).
<p />
For example: If the Map has keys of N... | [
"Given",
"a",
"{",
"@link",
"Map",
"}",
"where",
"the",
"keys",
"are",
"{",
"@link",
"Class",
"}",
"es",
"search",
"the",
"map",
"for",
"the",
"closest",
"match",
"of",
"the",
"key",
"to",
"the",
"<tt",
">",
"typeClass<",
"/",
"tt",
">",
".",
"This... | train | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/ClassUtils.java#L257-L281 |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/BatchItemRequestSerializer.java | BatchItemRequestSerializer.getObjectMapper | private ObjectMapper getObjectMapper() {
"""
Method to get the Jackson object mapper
@return ObjectMapper the object mapper
"""
ObjectMapper mapper = new ObjectMapper();
AnnotationIntrospector primary = new JacksonAnnotationIntrospector();
AnnotationIntrospector secondary = new JaxbAnnotationIntrospec... | java | private ObjectMapper getObjectMapper() {
ObjectMapper mapper = new ObjectMapper();
AnnotationIntrospector primary = new JacksonAnnotationIntrospector();
AnnotationIntrospector secondary = new JaxbAnnotationIntrospector();
AnnotationIntrospector pair = new AnnotationIntrospectorPair(primary, secondary);
mappe... | [
"private",
"ObjectMapper",
"getObjectMapper",
"(",
")",
"{",
"ObjectMapper",
"mapper",
"=",
"new",
"ObjectMapper",
"(",
")",
";",
"AnnotationIntrospector",
"primary",
"=",
"new",
"JacksonAnnotationIntrospector",
"(",
")",
";",
"AnnotationIntrospector",
"secondary",
"=... | Method to get the Jackson object mapper
@return ObjectMapper the object mapper | [
"Method",
"to",
"get",
"the",
"Jackson",
"object",
"mapper"
] | train | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/BatchItemRequestSerializer.java#L163-L173 |
Impetus/Kundera | src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/CassandraClientBase.java | CassandraClientBase.populateCounterFkey | private CounterColumn populateCounterFkey(String rlName, Object rlValue) {
"""
Populate counter fkey.
@param rlName
the rl name
@param rlValue
the rl value
@return the counter column
"""
CounterColumn counterCol = new CounterColumn();
counterCol.setName(PropertyAccessorFactory.STRING.toB... | java | private CounterColumn populateCounterFkey(String rlName, Object rlValue) {
CounterColumn counterCol = new CounterColumn();
counterCol.setName(PropertyAccessorFactory.STRING.toBytes(rlName));
counterCol.setValue((Long) rlValue);
return counterCol;
} | [
"private",
"CounterColumn",
"populateCounterFkey",
"(",
"String",
"rlName",
",",
"Object",
"rlValue",
")",
"{",
"CounterColumn",
"counterCol",
"=",
"new",
"CounterColumn",
"(",
")",
";",
"counterCol",
".",
"setName",
"(",
"PropertyAccessorFactory",
".",
"STRING",
... | Populate counter fkey.
@param rlName
the rl name
@param rlValue
the rl value
@return the counter column | [
"Populate",
"counter",
"fkey",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/CassandraClientBase.java#L479-L484 |
allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.getLoader | public static final CClassLoader getLoader(final String fpath) {
"""
return the loader with the given path
@param fpath
the path to lookup
@return the loader with the given path
"""
String path = fpath;
CClassLoader currentLoader = CClassLoader.rootLoader;
if (path == null) {
return CClassLoad... | java | public static final CClassLoader getLoader(final String fpath) {
String path = fpath;
CClassLoader currentLoader = CClassLoader.rootLoader;
if (path == null) {
return CClassLoader.getRootLoader();
}
if (path.startsWith(CClassLoader.ROOT_LOADER)) {
path = path.substring(10);
}
final StringTokenize... | [
"public",
"static",
"final",
"CClassLoader",
"getLoader",
"(",
"final",
"String",
"fpath",
")",
"{",
"String",
"path",
"=",
"fpath",
";",
"CClassLoader",
"currentLoader",
"=",
"CClassLoader",
".",
"rootLoader",
";",
"if",
"(",
"path",
"==",
"null",
")",
"{",... | return the loader with the given path
@param fpath
the path to lookup
@return the loader with the given path | [
"return",
"the",
"loader",
"with",
"the",
"given",
"path"
] | train | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L689-L709 |
EsotericSoftware/jsonbeans | src/com/esotericsoftware/jsonbeans/Json.java | Json.writeValue | public void writeValue (String name, Object value) {
"""
Writes the value as a field on the current JSON object, without writing the actual class.
@param value May be null.
@see #writeValue(String, Object, Class, Class)
"""
try {
writer.name(name);
} catch (IOException ex) {
throw new JsonExcep... | java | public void writeValue (String name, Object value) {
try {
writer.name(name);
} catch (IOException ex) {
throw new JsonException(ex);
}
if (value == null)
writeValue(value, null, null);
else
writeValue(value, value.getClass(), null);
} | [
"public",
"void",
"writeValue",
"(",
"String",
"name",
",",
"Object",
"value",
")",
"{",
"try",
"{",
"writer",
".",
"name",
"(",
"name",
")",
";",
"}",
"catch",
"(",
"IOException",
"ex",
")",
"{",
"throw",
"new",
"JsonException",
"(",
"ex",
")",
";",... | Writes the value as a field on the current JSON object, without writing the actual class.
@param value May be null.
@see #writeValue(String, Object, Class, Class) | [
"Writes",
"the",
"value",
"as",
"a",
"field",
"on",
"the",
"current",
"JSON",
"object",
"without",
"writing",
"the",
"actual",
"class",
"."
] | train | https://github.com/EsotericSoftware/jsonbeans/blob/ff4502d0ff86cc77aa5c61d47371d0c66c14fe2f/src/com/esotericsoftware/jsonbeans/Json.java#L381-L391 |
openbase/jul | visual/javafx/src/main/java/org/openbase/jul/visual/javafx/fxml/FXMLProcessor.java | FXMLProcessor.loadFxmlPaneAndControllerPair | public static Pair<Pane, AbstractFXController> loadFxmlPaneAndControllerPair(final String fxmlFileUri, final Class clazz, final Callback<Class<?>, Object> controllerFactory) throws CouldNotPerformException {
"""
Method load the pane and controller of the given fxml file.
@param fxmlFileUri the uri pointin... | java | public static Pair<Pane, AbstractFXController> loadFxmlPaneAndControllerPair(final String fxmlFileUri, final Class clazz, final Callback<Class<?>, Object> controllerFactory) throws CouldNotPerformException {
return loadFxmlPaneAndControllerPair(fxmlFileUri, AbstractFXController.class, clazz, controllerFactory);... | [
"public",
"static",
"Pair",
"<",
"Pane",
",",
"AbstractFXController",
">",
"loadFxmlPaneAndControllerPair",
"(",
"final",
"String",
"fxmlFileUri",
",",
"final",
"Class",
"clazz",
",",
"final",
"Callback",
"<",
"Class",
"<",
"?",
">",
",",
"Object",
">",
"contr... | Method load the pane and controller of the given fxml file.
@param fxmlFileUri the uri pointing to the fxml file within the classpath.
@param clazz the responsible class which is used for class path resolution.
@param controllerFactory the controller factory to use. Can be null if the default one sho... | [
"Method",
"load",
"the",
"pane",
"and",
"controller",
"of",
"the",
"given",
"fxml",
"file",
"."
] | train | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/visual/javafx/src/main/java/org/openbase/jul/visual/javafx/fxml/FXMLProcessor.java#L136-L138 |
lucee/Lucee | core/src/main/java/lucee/runtime/type/util/ListUtil.java | ListUtil.listFindNoCase | public static int listFindNoCase(String list, String value, String delimiter) {
"""
finds a value inside a list, do not ignore case
@param list list to search
@param value value to find
@param delimiter delimiter of the list
@return position in list (0-n) or -1
"""
return listFindNoCase(list, value, del... | java | public static int listFindNoCase(String list, String value, String delimiter) {
return listFindNoCase(list, value, delimiter, true);
} | [
"public",
"static",
"int",
"listFindNoCase",
"(",
"String",
"list",
",",
"String",
"value",
",",
"String",
"delimiter",
")",
"{",
"return",
"listFindNoCase",
"(",
"list",
",",
"value",
",",
"delimiter",
",",
"true",
")",
";",
"}"
] | finds a value inside a list, do not ignore case
@param list list to search
@param value value to find
@param delimiter delimiter of the list
@return position in list (0-n) or -1 | [
"finds",
"a",
"value",
"inside",
"a",
"list",
"do",
"not",
"ignore",
"case"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/ListUtil.java#L610-L612 |
UrielCh/ovh-java-sdk | ovh-java-sdk-saascsp2/src/main/java/net/minidev/ovh/api/ApiOvhSaascsp2.java | ApiOvhSaascsp2.serviceName_configureDomain_POST | public OvhOfficeTask serviceName_configureDomain_POST(String serviceName, String domain, OvhSupportedServiceEnum[] supportedServices) throws IOException {
"""
Automatically sets up an OVH-hosted domain of yours for your office365 services. Note, this requires the domain to not have any interfering MX/SRV/TXT recor... | java | public OvhOfficeTask serviceName_configureDomain_POST(String serviceName, String domain, OvhSupportedServiceEnum[] supportedServices) throws IOException {
String qPath = "/saas/csp2/{serviceName}/configureDomain";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Object>(... | [
"public",
"OvhOfficeTask",
"serviceName_configureDomain_POST",
"(",
"String",
"serviceName",
",",
"String",
"domain",
",",
"OvhSupportedServiceEnum",
"[",
"]",
"supportedServices",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/saas/csp2/{serviceName}/config... | Automatically sets up an OVH-hosted domain of yours for your office365 services. Note, this requires the domain to not have any interfering MX/SRV/TXT records
REST: POST /saas/csp2/{serviceName}/configureDomain
@param supportedServices [required] Services that your domain needs to be configured with
@param domain [req... | [
"Automatically",
"sets",
"up",
"an",
"OVH",
"-",
"hosted",
"domain",
"of",
"yours",
"for",
"your",
"office365",
"services",
".",
"Note",
"this",
"requires",
"the",
"domain",
"to",
"not",
"have",
"any",
"interfering",
"MX",
"/",
"SRV",
"/",
"TXT",
"records"... | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-saascsp2/src/main/java/net/minidev/ovh/api/ApiOvhSaascsp2.java#L273-L281 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RuleBasedCollator.java | RuleBasedCollator.getCollationKey | @Override
public CollationKey getCollationKey(String source) {
"""
<p>
Get a Collation key for the argument String source from this RuleBasedCollator.
<p>
General recommendation: <br>
If comparison are to be done to the same String multiple times, it would be more efficient to generate
CollationKeys for t... | java | @Override
public CollationKey getCollationKey(String source) {
if (source == null) {
return null;
}
CollationBuffer buffer = null;
try {
buffer = getCollationBuffer();
return getCollationKey(source, buffer);
} finally {
releaseC... | [
"@",
"Override",
"public",
"CollationKey",
"getCollationKey",
"(",
"String",
"source",
")",
"{",
"if",
"(",
"source",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"CollationBuffer",
"buffer",
"=",
"null",
";",
"try",
"{",
"buffer",
"=",
"getCollatio... | <p>
Get a Collation key for the argument String source from this RuleBasedCollator.
<p>
General recommendation: <br>
If comparison are to be done to the same String multiple times, it would be more efficient to generate
CollationKeys for the Strings and use CollationKey.compareTo(CollationKey) for the comparisons. If t... | [
"<p",
">",
"Get",
"a",
"Collation",
"key",
"for",
"the",
"argument",
"String",
"source",
"from",
"this",
"RuleBasedCollator",
".",
"<p",
">",
"General",
"recommendation",
":",
"<br",
">",
"If",
"comparison",
"are",
"to",
"be",
"done",
"to",
"the",
"same",
... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RuleBasedCollator.java#L1030-L1042 |
ibm-bluemix-mobile-services/bms-clientsdk-android-core | lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/Utils.java | Utils.concatenateUrls | public static String concatenateUrls(String rootUrl, String path) {
"""
Concatenates two URLs. The function checks for trailing and preceding slashes in rootUrl and path.
@param rootUrl first part of the url
@param path second part of the url
@return Concatenated string containing rootUrl and path.
"""
... | java | public static String concatenateUrls(String rootUrl, String path) {
if (rootUrl == null || rootUrl.isEmpty()) {
return path;
}
if (path == null || path.isEmpty()) {
return rootUrl;
}
String finalUrl;
if (rootUrl.charAt(rootUrl.length() - 1) == '... | [
"public",
"static",
"String",
"concatenateUrls",
"(",
"String",
"rootUrl",
",",
"String",
"path",
")",
"{",
"if",
"(",
"rootUrl",
"==",
"null",
"||",
"rootUrl",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"path",
";",
"}",
"if",
"(",
"path",
"==",
... | Concatenates two URLs. The function checks for trailing and preceding slashes in rootUrl and path.
@param rootUrl first part of the url
@param path second part of the url
@return Concatenated string containing rootUrl and path. | [
"Concatenates",
"two",
"URLs",
".",
"The",
"function",
"checks",
"for",
"trailing",
"and",
"preceding",
"slashes",
"in",
"rootUrl",
"and",
"path",
"."
] | train | https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-core/blob/8db4f00d0d564792397bfc0e5bd57d52a238b858/lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/Utils.java#L172-L192 |
netscaler/sdx_nitro | src/main/java/com/citrix/sdx/nitro/resource/config/mps/mail_profile.java | mail_profile.get_nitro_bulk_response | protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception {
"""
<pre>
Converts API response of bulk operation into object and returns the object array in case of get request.
</pre>
"""
mail_profile_responses result = (mail_profile_responses) service.get_pa... | java | protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
{
mail_profile_responses result = (mail_profile_responses) service.get_payload_formatter().string_to_resource(mail_profile_responses.class, response);
if(result.errorcode != 0)
{
if (result.errorcod... | [
"protected",
"base_resource",
"[",
"]",
"get_nitro_bulk_response",
"(",
"nitro_service",
"service",
",",
"String",
"response",
")",
"throws",
"Exception",
"{",
"mail_profile_responses",
"result",
"=",
"(",
"mail_profile_responses",
")",
"service",
".",
"get_payload_form... | <pre>
Converts API response of bulk operation into object and returns the object array in case of get request.
</pre> | [
"<pre",
">",
"Converts",
"API",
"response",
"of",
"bulk",
"operation",
"into",
"object",
"and",
"returns",
"the",
"object",
"array",
"in",
"case",
"of",
"get",
"request",
".",
"<",
"/",
"pre",
">"
] | train | https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/mail_profile.java#L410-L427 |
joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.costRateTableWriteRequired | private boolean costRateTableWriteRequired(CostRateTableEntry entry, Date from) {
"""
This method determines whether the cost rate table should be written.
A default cost rate table should not be written to the file.
@param entry cost rate table entry
@param from from date
@return boolean flag
"""
... | java | private boolean costRateTableWriteRequired(CostRateTableEntry entry, Date from)
{
boolean fromDate = (DateHelper.compare(from, DateHelper.FIRST_DATE) > 0);
boolean toDate = (DateHelper.compare(entry.getEndDate(), DateHelper.LAST_DATE) > 0);
boolean costPerUse = (NumberHelper.getDouble(entry.getCost... | [
"private",
"boolean",
"costRateTableWriteRequired",
"(",
"CostRateTableEntry",
"entry",
",",
"Date",
"from",
")",
"{",
"boolean",
"fromDate",
"=",
"(",
"DateHelper",
".",
"compare",
"(",
"from",
",",
"DateHelper",
".",
"FIRST_DATE",
")",
">",
"0",
")",
";",
... | This method determines whether the cost rate table should be written.
A default cost rate table should not be written to the file.
@param entry cost rate table entry
@param from from date
@return boolean flag | [
"This",
"method",
"determines",
"whether",
"the",
"cost",
"rate",
"table",
"should",
"be",
"written",
".",
"A",
"default",
"cost",
"rate",
"table",
"should",
"not",
"be",
"written",
"to",
"the",
"file",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L996-L1004 |
threerings/gwt-utils | src/main/java/com/threerings/gwt/ui/Popups.java | Popups.errorAbove | public static InfoPopup errorAbove (String message, Widget source) {
"""
Displays error feedback to the user in a non-offensive way. The error feedback is displayed
near the supplied component and if the component supports focus, it is focused.
"""
return error(message, Position.ABOVE, source);
} | java | public static InfoPopup errorAbove (String message, Widget source)
{
return error(message, Position.ABOVE, source);
} | [
"public",
"static",
"InfoPopup",
"errorAbove",
"(",
"String",
"message",
",",
"Widget",
"source",
")",
"{",
"return",
"error",
"(",
"message",
",",
"Position",
".",
"ABOVE",
",",
"source",
")",
";",
"}"
] | Displays error feedback to the user in a non-offensive way. The error feedback is displayed
near the supplied component and if the component supports focus, it is focused. | [
"Displays",
"error",
"feedback",
"to",
"the",
"user",
"in",
"a",
"non",
"-",
"offensive",
"way",
".",
"The",
"error",
"feedback",
"is",
"displayed",
"near",
"the",
"supplied",
"component",
"and",
"if",
"the",
"component",
"supports",
"focus",
"it",
"is",
"... | train | https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/Popups.java#L127-L130 |
jboss/jboss-jstl-api_spec | src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java | SetSupport.convertToExpectedType | private Object convertToExpectedType(final Object value, Method m) throws ELException {
"""
Convert an object to an expected type of the method parameter according to the conversion
rules of the Expression Language.
@param value the value to convert
@param m the setter method
@return value converted to a... | java | private Object convertToExpectedType(final Object value, Method m) throws ELException {
if (value == null) {
return null;
}
Class<?> expectedType = m.getParameterTypes()[0];
return getExpressionFactory().coerceToType(value, expectedType);
} | [
"private",
"Object",
"convertToExpectedType",
"(",
"final",
"Object",
"value",
",",
"Method",
"m",
")",
"throws",
"ELException",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"Class",
"<",
"?",
">",
"expectedType",
"=",
"m"... | Convert an object to an expected type of the method parameter according to the conversion
rules of the Expression Language.
@param value the value to convert
@param m the setter method
@return value converted to an instance of the expected type; will be null if value was null
@throws javax.el.ELException if there ... | [
"Convert",
"an",
"object",
"to",
"an",
"expected",
"type",
"of",
"the",
"method",
"parameter",
"according",
"to",
"the",
"conversion",
"rules",
"of",
"the",
"Expression",
"Language",
"."
] | train | https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java#L256-L262 |
samskivert/samskivert | src/main/java/com/samskivert/util/MethodFinder.java | MethodFinder.findMethod | public Method findMethod (String methodName, Object[] args)
throws NoSuchMethodException {
"""
Like {@link #findMethod(String,Class[])} except that it takes the actual arguments that will
be passed to the found method and creates the array of class objects for you using {@link
ClassUtil#getParameterTypes... | java | public Method findMethod (String methodName, Object[] args)
throws NoSuchMethodException
{
return findMethod(methodName, ClassUtil.getParameterTypesFrom(args));
} | [
"public",
"Method",
"findMethod",
"(",
"String",
"methodName",
",",
"Object",
"[",
"]",
"args",
")",
"throws",
"NoSuchMethodException",
"{",
"return",
"findMethod",
"(",
"methodName",
",",
"ClassUtil",
".",
"getParameterTypesFrom",
"(",
"args",
")",
")",
";",
... | Like {@link #findMethod(String,Class[])} except that it takes the actual arguments that will
be passed to the found method and creates the array of class objects for you using {@link
ClassUtil#getParameterTypesFrom}. | [
"Like",
"{"
] | train | https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/MethodFinder.java#L134-L138 |
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.getPatternAnyEntityInfo | public PatternAnyEntityExtractor getPatternAnyEntityInfo(UUID appId, String versionId, UUID entityId) {
"""
Gets information about the application version's Pattern.Any model.
@param appId The application ID.
@param versionId The version ID.
@param entityId The entity extractor ID.
@throws IllegalArgumentExc... | java | public PatternAnyEntityExtractor getPatternAnyEntityInfo(UUID appId, String versionId, UUID entityId) {
return getPatternAnyEntityInfoWithServiceResponseAsync(appId, versionId, entityId).toBlocking().single().body();
} | [
"public",
"PatternAnyEntityExtractor",
"getPatternAnyEntityInfo",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"UUID",
"entityId",
")",
"{",
"return",
"getPatternAnyEntityInfoWithServiceResponseAsync",
"(",
"appId",
",",
"versionId",
",",
"entityId",
")",
".",... | Gets information about the application version's Pattern.Any model.
@param appId The application ID.
@param versionId The version ID.
@param entityId The entity extractor ID.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws ErrorResponseException thrown if the request is rejected by se... | [
"Gets",
"information",
"about",
"the",
"application",
"version",
"s",
"Pattern",
".",
"Any",
"model",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L10460-L10462 |
junit-team/junit4 | src/main/java/org/junit/Assert.java | Assert.assertSame | public static void assertSame(String message, Object expected, Object actual) {
"""
Asserts that two objects refer to the same object. If they are not, an
{@link AssertionError} is thrown with the given message.
@param message the identifying message for the {@link AssertionError} (<code>null</code>
okay)
@p... | java | public static void assertSame(String message, Object expected, Object actual) {
if (expected == actual) {
return;
}
failNotSame(message, expected, actual);
} | [
"public",
"static",
"void",
"assertSame",
"(",
"String",
"message",
",",
"Object",
"expected",
",",
"Object",
"actual",
")",
"{",
"if",
"(",
"expected",
"==",
"actual",
")",
"{",
"return",
";",
"}",
"failNotSame",
"(",
"message",
",",
"expected",
",",
"a... | Asserts that two objects refer to the same object. If they are not, an
{@link AssertionError} is thrown with the given message.
@param message the identifying message for the {@link AssertionError} (<code>null</code>
okay)
@param expected the expected object
@param actual the object to compare to <code>expected</code> | [
"Asserts",
"that",
"two",
"objects",
"refer",
"to",
"the",
"same",
"object",
".",
"If",
"they",
"are",
"not",
"an",
"{",
"@link",
"AssertionError",
"}",
"is",
"thrown",
"with",
"the",
"given",
"message",
"."
] | train | https://github.com/junit-team/junit4/blob/d9861ecdb6e487f6c352437ee823879aca3b81d4/src/main/java/org/junit/Assert.java#L768-L773 |
lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrPose3DUtils.java | QrPose3DUtils.setLensDistortion | public void setLensDistortion(Point2Transform2_F64 pixelToNorm, Point2Transform2_F64 undistToDist) {
"""
Specifies transform from pixel to normalize image coordinates
"""
if( pixelToNorm == null ) {
this.pixelToNorm = new DoNothing2Transform2_F64();
this.undistToDist = new DoNothing2Transform2_F64();
... | java | public void setLensDistortion(Point2Transform2_F64 pixelToNorm, Point2Transform2_F64 undistToDist) {
if( pixelToNorm == null ) {
this.pixelToNorm = new DoNothing2Transform2_F64();
this.undistToDist = new DoNothing2Transform2_F64();
} else {
this.pixelToNorm = pixelToNorm;
this.undistToDist = undistToDis... | [
"public",
"void",
"setLensDistortion",
"(",
"Point2Transform2_F64",
"pixelToNorm",
",",
"Point2Transform2_F64",
"undistToDist",
")",
"{",
"if",
"(",
"pixelToNorm",
"==",
"null",
")",
"{",
"this",
".",
"pixelToNorm",
"=",
"new",
"DoNothing2Transform2_F64",
"(",
")",
... | Specifies transform from pixel to normalize image coordinates | [
"Specifies",
"transform",
"from",
"pixel",
"to",
"normalize",
"image",
"coordinates"
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrPose3DUtils.java#L172-L180 |
google/error-prone-javac | src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PropertyBuilder.java | PropertyBuilder.buildPropertyComments | public void buildPropertyComments(XMLNode node, Content propertyDocTree) {
"""
Build the comments for the property. Do nothing if
{@link Configuration#nocomment} is set to true.
@param node the XML element that specifies which components to document
@param propertyDocTree the content tree to which the docume... | java | public void buildPropertyComments(XMLNode node, Content propertyDocTree) {
if (!configuration.nocomment) {
writer.addComments((MethodDoc) properties.get(currentPropertyIndex), propertyDocTree);
}
} | [
"public",
"void",
"buildPropertyComments",
"(",
"XMLNode",
"node",
",",
"Content",
"propertyDocTree",
")",
"{",
"if",
"(",
"!",
"configuration",
".",
"nocomment",
")",
"{",
"writer",
".",
"addComments",
"(",
"(",
"MethodDoc",
")",
"properties",
".",
"get",
"... | Build the comments for the property. Do nothing if
{@link Configuration#nocomment} is set to true.
@param node the XML element that specifies which components to document
@param propertyDocTree the content tree to which the documentation will be added | [
"Build",
"the",
"comments",
"for",
"the",
"property",
".",
"Do",
"nothing",
"if",
"{",
"@link",
"Configuration#nocomment",
"}",
"is",
"set",
"to",
"true",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PropertyBuilder.java#L205-L209 |
jbundle/webapp | base/src/main/java/org/jbundle/util/webapp/base/HttpServiceTracker.java | HttpServiceTracker.makeServlet | public Servlet makeServlet(String alias, Dictionary<String, String> dictionary) {
"""
Create the servlet.
The SERVLET_CLASS property must be supplied.
@param alias
@param dictionary
@return
"""
String servletClass = dictionary.get(BundleConstants.SERVICE_CLASS);
return (Servlet)ClassService... | java | public Servlet makeServlet(String alias, Dictionary<String, String> dictionary)
{
String servletClass = dictionary.get(BundleConstants.SERVICE_CLASS);
return (Servlet)ClassServiceUtility.getClassService().makeObjectFromClassName(servletClass);
} | [
"public",
"Servlet",
"makeServlet",
"(",
"String",
"alias",
",",
"Dictionary",
"<",
"String",
",",
"String",
">",
"dictionary",
")",
"{",
"String",
"servletClass",
"=",
"dictionary",
".",
"get",
"(",
"BundleConstants",
".",
"SERVICE_CLASS",
")",
";",
"return",... | Create the servlet.
The SERVLET_CLASS property must be supplied.
@param alias
@param dictionary
@return | [
"Create",
"the",
"servlet",
".",
"The",
"SERVLET_CLASS",
"property",
"must",
"be",
"supplied",
"."
] | train | https://github.com/jbundle/webapp/blob/af2cf32bd92254073052f1f9b4bcd47c2f76ba7d/base/src/main/java/org/jbundle/util/webapp/base/HttpServiceTracker.java#L98-L102 |
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.getHierarchicalEntityRoleAsync | public Observable<EntityRole> getHierarchicalEntityRoleAsync(UUID appId, String versionId, UUID hEntityId, UUID roleId) {
"""
Get one entity role for a given entity.
@param appId The application ID.
@param versionId The version ID.
@param hEntityId The hierarchical entity extractor ID.
@param roleId entity r... | java | public Observable<EntityRole> getHierarchicalEntityRoleAsync(UUID appId, String versionId, UUID hEntityId, UUID roleId) {
return getHierarchicalEntityRoleWithServiceResponseAsync(appId, versionId, hEntityId, roleId).map(new Func1<ServiceResponse<EntityRole>, EntityRole>() {
@Override
pub... | [
"public",
"Observable",
"<",
"EntityRole",
">",
"getHierarchicalEntityRoleAsync",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"UUID",
"hEntityId",
",",
"UUID",
"roleId",
")",
"{",
"return",
"getHierarchicalEntityRoleWithServiceResponseAsync",
"(",
"appId",
... | Get one entity role for a given entity.
@param appId The application ID.
@param versionId The version ID.
@param hEntityId The hierarchical entity extractor ID.
@param roleId entity role ID.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the EntityRole object | [
"Get",
"one",
"entity",
"role",
"for",
"a",
"given",
"entity",
"."
] | 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#L13189-L13196 |
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_number_serviceName_changeFeatureType_POST | public OvhTask billingAccount_number_serviceName_changeFeatureType_POST(String billingAccount, String serviceName, OvhTypeEnum featureType) throws IOException {
"""
Change the feature type of the phone number
REST: POST /telephony/{billingAccount}/number/{serviceName}/changeFeatureType
@param featureType [requ... | java | public OvhTask billingAccount_number_serviceName_changeFeatureType_POST(String billingAccount, String serviceName, OvhTypeEnum featureType) throws IOException {
String qPath = "/telephony/{billingAccount}/number/{serviceName}/changeFeatureType";
StringBuilder sb = path(qPath, billingAccount, serviceName);
HashMap... | [
"public",
"OvhTask",
"billingAccount_number_serviceName_changeFeatureType_POST",
"(",
"String",
"billingAccount",
",",
"String",
"serviceName",
",",
"OvhTypeEnum",
"featureType",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/telephony/{billingAccount}/number/{s... | Change the feature type of the phone number
REST: POST /telephony/{billingAccount}/number/{serviceName}/changeFeatureType
@param featureType [required] The new feature of the number
@param billingAccount [required] The name of your billingAccount
@param serviceName [required] Name of the service | [
"Change",
"the",
"feature",
"type",
"of",
"the",
"phone",
"number"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L5711-L5718 |
BlueBrain/bluima | modules/bluima_abbreviations/src/main/java/com/wcohen/ss/expt/ExtractAbbreviations.java | ExtractAbbreviations.main | public static void main(String[] args) {
"""
Extracts abbreviation pairs from text.<br><br>
Usage: ExtractAbbreviations input experiment_name [gold-file] [train-dir]
"""
if(args.length < 2){
System.out.println("Usage: ExtractAbbreviations input experiment_name [gold-file] [train-dir] \n\n"+
"inpu... | java | public static void main(String[] args) {
if(args.length < 2){
System.out.println("Usage: ExtractAbbreviations input experiment_name [gold-file] [train-dir] \n\n"+
"input - Corpus file (one line per file) from which abbreviations will be extracted.\n"+
"experiment_name - The experiment name will be ... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"if",
"(",
"args",
".",
"length",
"<",
"2",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"Usage: ExtractAbbreviations input experiment_name [gold-file] [train-dir] \\n\\n\"",
... | Extracts abbreviation pairs from text.<br><br>
Usage: ExtractAbbreviations input experiment_name [gold-file] [train-dir] | [
"Extracts",
"abbreviation",
"pairs",
"from",
"text",
".",
"<br",
">",
"<br",
">",
"Usage",
":",
"ExtractAbbreviations",
"input",
"experiment_name",
"[",
"gold",
"-",
"file",
"]",
"[",
"train",
"-",
"dir",
"]"
] | train | https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/expt/ExtractAbbreviations.java#L256-L293 |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/locale/Locale.java | Locale.getString | @Pure
public static String getString(ClassLoader classLoader, String key, Object... params) {
"""
Replies the text that corresponds to the specified resource.
<p>This function assumes the classname of the caller as the
resource provider.
@param classLoader is the classLoader to use.
@param key is the name... | java | @Pure
public static String getString(ClassLoader classLoader, String key, Object... params) {
return getString(classLoader, detectResourceClass(null), key, params);
} | [
"@",
"Pure",
"public",
"static",
"String",
"getString",
"(",
"ClassLoader",
"classLoader",
",",
"String",
"key",
",",
"Object",
"...",
"params",
")",
"{",
"return",
"getString",
"(",
"classLoader",
",",
"detectResourceClass",
"(",
"null",
")",
",",
"key",
",... | Replies the text that corresponds to the specified resource.
<p>This function assumes the classname of the caller as the
resource provider.
@param classLoader is the classLoader to use.
@param key is the name of the resource into the specified file
@param params is the the list of parameters which will
replaces the <... | [
"Replies",
"the",
"text",
"that",
"corresponds",
"to",
"the",
"specified",
"resource",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/locale/Locale.java#L326-L329 |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AwardEmojiApi.java | AwardEmojiApi.getSnippetAwardEmoji | public AwardEmoji getSnippetAwardEmoji(Object projectIdOrPath, Integer snippetId, Integer awardId) throws GitLabApiException {
"""
Get the specified award emoji for the specified snippet.
<pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/award_emoji/:award_id</code></pre>
@param projectIdOrP... | java | public AwardEmoji getSnippetAwardEmoji(Object projectIdOrPath, Integer snippetId, Integer awardId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_em... | [
"public",
"AwardEmoji",
"getSnippetAwardEmoji",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"snippetId",
",",
"Integer",
"awardId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
... | Get the specified award emoji for the specified snippet.
<pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/award_emoji/:award_id</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param snippetId the snippet ID to get the award emoji for... | [
"Get",
"the",
"specified",
"award",
"emoji",
"for",
"the",
"specified",
"snippet",
"."
] | train | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AwardEmojiApi.java#L132-L136 |
jmeetsma/Iglu-Util | src/main/java/org/ijsberg/iglu/util/io/FileSupport.java | FileSupport.getFilesInDirectoryTree | public static ArrayList<File> getFilesInDirectoryTree(String path) {
"""
Retrieves all files from a directory and its subdirectories.
@param path path to directory
@return A list containing the found files
"""
File directory = new File(path);
return getContentsInDirectoryTree(directory, "*", true, fals... | java | public static ArrayList<File> getFilesInDirectoryTree(String path) {
File directory = new File(path);
return getContentsInDirectoryTree(directory, "*", true, false);
} | [
"public",
"static",
"ArrayList",
"<",
"File",
">",
"getFilesInDirectoryTree",
"(",
"String",
"path",
")",
"{",
"File",
"directory",
"=",
"new",
"File",
"(",
"path",
")",
";",
"return",
"getContentsInDirectoryTree",
"(",
"directory",
",",
"\"*\"",
",",
"true",
... | Retrieves all files from a directory and its subdirectories.
@param path path to directory
@return A list containing the found files | [
"Retrieves",
"all",
"files",
"from",
"a",
"directory",
"and",
"its",
"subdirectories",
"."
] | train | https://github.com/jmeetsma/Iglu-Util/blob/971eb022115247b1e34dc26dd02e7e621e29e910/src/main/java/org/ijsberg/iglu/util/io/FileSupport.java#L45-L48 |
hypercube1024/firefly | firefly/src/main/java/com/firefly/codec/http2/model/HttpFields.java | HttpFields.addCSV | public boolean addCSV(String name, String... values) {
"""
Add comma separated values, but only if not already present.
@param name The header to add the value(s) to
@param values The value(s) to add
@return True if headers were modified
"""
QuotedCSV existing = null;
for (HttpField f : ... | java | public boolean addCSV(String name, String... values) {
QuotedCSV existing = null;
for (HttpField f : this) {
if (f.getName().equalsIgnoreCase(name)) {
if (existing == null)
existing = new QuotedCSV(false);
existing.addValue(f.getValue());
... | [
"public",
"boolean",
"addCSV",
"(",
"String",
"name",
",",
"String",
"...",
"values",
")",
"{",
"QuotedCSV",
"existing",
"=",
"null",
";",
"for",
"(",
"HttpField",
"f",
":",
"this",
")",
"{",
"if",
"(",
"f",
".",
"getName",
"(",
")",
".",
"equalsIgno... | Add comma separated values, but only if not already present.
@param name The header to add the value(s) to
@param values The value(s) to add
@return True if headers were modified | [
"Add",
"comma",
"separated",
"values",
"but",
"only",
"if",
"not",
"already",
"present",
"."
] | train | https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/http2/model/HttpFields.java#L259-L274 |
LAW-Unimi/BUbiNG | src/it/unimi/di/law/warc/records/WarcHeader.java | WarcHeader.parseId | public static UUID parseId(final String id) throws WarcFormatException {
"""
Parses the date found in a {@link WarcHeader.Name#WARC_RECORD_ID} header.
@param id the record id.
@return the parsed record id.
"""
if (! (id.startsWith(UUID_HEAD) && id.endsWith(UUID_TAIL))) throw new WarcFormatException("'" +... | java | public static UUID parseId(final String id) throws WarcFormatException {
if (! (id.startsWith(UUID_HEAD) && id.endsWith(UUID_TAIL))) throw new WarcFormatException("'" + id + "' wrong format for " + Name.WARC_RECORD_ID.value);
final int len = id.length();
UUID uuid;
try {
uuid = UUID.fromString(id.substring(U... | [
"public",
"static",
"UUID",
"parseId",
"(",
"final",
"String",
"id",
")",
"throws",
"WarcFormatException",
"{",
"if",
"(",
"!",
"(",
"id",
".",
"startsWith",
"(",
"UUID_HEAD",
")",
"&&",
"id",
".",
"endsWith",
"(",
"UUID_TAIL",
")",
")",
")",
"throw",
... | Parses the date found in a {@link WarcHeader.Name#WARC_RECORD_ID} header.
@param id the record id.
@return the parsed record id. | [
"Parses",
"the",
"date",
"found",
"in",
"a",
"{",
"@link",
"WarcHeader",
".",
"Name#WARC_RECORD_ID",
"}",
"header",
"."
] | train | https://github.com/LAW-Unimi/BUbiNG/blob/e148acc90031a4f3967422705a9fb07ddaf155e4/src/it/unimi/di/law/warc/records/WarcHeader.java#L159-L169 |
zxing/zxing | android-integration/src/main/java/com/google/zxing/integration/android/IntentIntegrator.java | IntentIntegrator.parseActivityResult | public static IntentResult parseActivityResult(int requestCode, int resultCode, Intent intent) {
"""
<p>Call this from your {@link Activity}'s
{@link Activity#onActivityResult(int, int, Intent)} method.</p>
@param requestCode request code from {@code onActivityResult()}
@param resultCode result code from {@co... | java | public static IntentResult parseActivityResult(int requestCode, int resultCode, Intent intent) {
if (requestCode == REQUEST_CODE) {
if (resultCode == Activity.RESULT_OK) {
String contents = intent.getStringExtra("SCAN_RESULT");
String formatName = intent.getStringExtra("SCAN_RESULT_FORMAT");
... | [
"public",
"static",
"IntentResult",
"parseActivityResult",
"(",
"int",
"requestCode",
",",
"int",
"resultCode",
",",
"Intent",
"intent",
")",
"{",
"if",
"(",
"requestCode",
"==",
"REQUEST_CODE",
")",
"{",
"if",
"(",
"resultCode",
"==",
"Activity",
".",
"RESULT... | <p>Call this from your {@link Activity}'s
{@link Activity#onActivityResult(int, int, Intent)} method.</p>
@param requestCode request code from {@code onActivityResult()}
@param resultCode result code from {@code onActivityResult()}
@param intent {@link Intent} from {@code onActivityResult()}
@return null if the event ... | [
"<p",
">",
"Call",
"this",
"from",
"your",
"{",
"@link",
"Activity",
"}",
"s",
"{",
"@link",
"Activity#onActivityResult",
"(",
"int",
"int",
"Intent",
")",
"}",
"method",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/android-integration/src/main/java/com/google/zxing/integration/android/IntentIntegrator.java#L419-L437 |
openxc/openxc-android | library/src/main/java/com/openxc/VehicleManager.java | VehicleManager.addListener | public void addListener(KeyMatcher matcher, VehicleMessage.Listener listener) {
"""
Register to receive a callback when a message with key matching the given
KeyMatcher is received.
This function can be used to set up a wildcard listener, or one that
receives a wider range of responses than just a 1 to 1 matc... | java | public void addListener(KeyMatcher matcher, VehicleMessage.Listener listener) {
Log.i(TAG, "Adding listener " + listener + " to " + matcher);
mNotifier.register(matcher, listener);
} | [
"public",
"void",
"addListener",
"(",
"KeyMatcher",
"matcher",
",",
"VehicleMessage",
".",
"Listener",
"listener",
")",
"{",
"Log",
".",
"i",
"(",
"TAG",
",",
"\"Adding listener \"",
"+",
"listener",
"+",
"\" to \"",
"+",
"matcher",
")",
";",
"mNotifier",
".... | Register to receive a callback when a message with key matching the given
KeyMatcher is received.
This function can be used to set up a wildcard listener, or one that
receives a wider range of responses than just a 1 to 1 match of keys.
@param matcher A KeyMatcher implement the desired filtering logic.
@param listene... | [
"Register",
"to",
"receive",
"a",
"callback",
"when",
"a",
"message",
"with",
"key",
"matching",
"the",
"given",
"KeyMatcher",
"is",
"received",
"."
] | train | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/VehicleManager.java#L407-L410 |
thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.checkCurrentUserFollowsArtistsOrUsers | public CheckCurrentUserFollowsArtistsOrUsersRequest.Builder checkCurrentUserFollowsArtistsOrUsers(
ModelObjectType type, String[] ids) {
"""
Check to see if the current user is following one or more artists or other Spotify users.
@param type The ID type: either artist or user.
@param ids A list of ... | java | public CheckCurrentUserFollowsArtistsOrUsersRequest.Builder checkCurrentUserFollowsArtistsOrUsers(
ModelObjectType type, String[] ids) {
return new CheckCurrentUserFollowsArtistsOrUsersRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.type(type)
... | [
"public",
"CheckCurrentUserFollowsArtistsOrUsersRequest",
".",
"Builder",
"checkCurrentUserFollowsArtistsOrUsers",
"(",
"ModelObjectType",
"type",
",",
"String",
"[",
"]",
"ids",
")",
"{",
"return",
"new",
"CheckCurrentUserFollowsArtistsOrUsersRequest",
".",
"Builder",
"(",
... | Check to see if the current user is following one or more artists or other Spotify users.
@param type The ID type: either artist or user.
@param ids A list of the artist or the user Spotify IDs to check. Maximum: 50 IDs.
@return A {@link CheckCurrentUserFollowsArtistsOrUsersRequest.Builder}.
@see <a href="https://dev... | [
"Check",
"to",
"see",
"if",
"the",
"current",
"user",
"is",
"following",
"one",
"or",
"more",
"artists",
"or",
"other",
"Spotify",
"users",
"."
] | train | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L612-L618 |
primefaces-extensions/core | src/main/java/org/primefaces/extensions/model/dynaform/DynaFormRow.java | DynaFormRow.addLabel | public DynaFormLabel addLabel(final String value, final int colspan, final int rowspan) {
"""
Adds a label with given text, colspan and rowspan.
@param value label text
@param colspan colspan
@param rowspan rowspan
@return DynaFormLabel added label
"""
return addLabel(value, true, colspan, rowspa... | java | public DynaFormLabel addLabel(final String value, final int colspan, final int rowspan) {
return addLabel(value, true, colspan, rowspan);
} | [
"public",
"DynaFormLabel",
"addLabel",
"(",
"final",
"String",
"value",
",",
"final",
"int",
"colspan",
",",
"final",
"int",
"rowspan",
")",
"{",
"return",
"addLabel",
"(",
"value",
",",
"true",
",",
"colspan",
",",
"rowspan",
")",
";",
"}"
] | Adds a label with given text, colspan and rowspan.
@param value label text
@param colspan colspan
@param rowspan rowspan
@return DynaFormLabel added label | [
"Adds",
"a",
"label",
"with",
"given",
"text",
"colspan",
"and",
"rowspan",
"."
] | train | https://github.com/primefaces-extensions/core/blob/afdbca591f60f47898e3517e1e939bc2f63d5355/src/main/java/org/primefaces/extensions/model/dynaform/DynaFormRow.java#L164-L166 |
aws/aws-sdk-java | aws-java-sdk-secretsmanager/src/main/java/com/amazonaws/services/secretsmanager/model/SecretListEntry.java | SecretListEntry.withSecretVersionsToStages | public SecretListEntry withSecretVersionsToStages(java.util.Map<String, java.util.List<String>> secretVersionsToStages) {
"""
<p>
A list of all of the currently assigned <code>SecretVersionStage</code> staging labels and the
<code>SecretVersionId</code> that each is attached to. Staging labels are used to keep t... | java | public SecretListEntry withSecretVersionsToStages(java.util.Map<String, java.util.List<String>> secretVersionsToStages) {
setSecretVersionsToStages(secretVersionsToStages);
return this;
} | [
"public",
"SecretListEntry",
"withSecretVersionsToStages",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"java",
".",
"util",
".",
"List",
"<",
"String",
">",
">",
"secretVersionsToStages",
")",
"{",
"setSecretVersionsToStages",
"(",
"secretVersionsToS... | <p>
A list of all of the currently assigned <code>SecretVersionStage</code> staging labels and the
<code>SecretVersionId</code> that each is attached to. Staging labels are used to keep track of the different
versions during the rotation process.
</p>
<note>
<p>
A version that does not have any <code>SecretVersionStage... | [
"<p",
">",
"A",
"list",
"of",
"all",
"of",
"the",
"currently",
"assigned",
"<code",
">",
"SecretVersionStage<",
"/",
"code",
">",
"staging",
"labels",
"and",
"the",
"<code",
">",
"SecretVersionId<",
"/",
"code",
">",
"that",
"each",
"is",
"attached",
"to",... | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-secretsmanager/src/main/java/com/amazonaws/services/secretsmanager/model/SecretListEntry.java#L822-L825 |
fcrepo4-labs/fcrepo4-client | fcrepo-client-impl/src/main/java/org/fcrepo/client/utils/HttpHelper.java | HttpHelper.createPostMethod | public HttpPost createPostMethod(final String path, final Map<String, List<String>> params) {
"""
Create POST method with list of parameters
@param path Resource path, relative to repository baseURL
@param params Query parameters
@return PUT method
"""
return new HttpPost(repositoryURL + path + quer... | java | public HttpPost createPostMethod(final String path, final Map<String, List<String>> params) {
return new HttpPost(repositoryURL + path + queryString(params));
} | [
"public",
"HttpPost",
"createPostMethod",
"(",
"final",
"String",
"path",
",",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"params",
")",
"{",
"return",
"new",
"HttpPost",
"(",
"repositoryURL",
"+",
"path",
"+",
"queryString",
"(",... | Create POST method with list of parameters
@param path Resource path, relative to repository baseURL
@param params Query parameters
@return PUT method | [
"Create",
"POST",
"method",
"with",
"list",
"of",
"parameters"
] | train | https://github.com/fcrepo4-labs/fcrepo4-client/blob/21eaf27200c5b2542095f6ebb9dd8ec865b95bbd/fcrepo-client-impl/src/main/java/org/fcrepo/client/utils/HttpHelper.java#L261-L263 |
msteiger/jxmapviewer2 | jxmapviewer2/src/main/java/org/jxmapviewer/viewer/AbstractTileFactory.java | AbstractTileFactory.getService | protected synchronized ExecutorService getService() {
"""
Subclasses may override this method to provide their own executor services. This method will be called each time
a tile needs to be loaded. Implementations should cache the ExecutorService when possible.
@return ExecutorService to load tiles with
"""
... | java | protected synchronized ExecutorService getService()
{
if (service == null)
{
// System.out.println("creating an executor service with a threadpool of size " + threadPoolSize);
service = Executors.newFixedThreadPool(threadPoolSize, new ThreadFactory()
{
... | [
"protected",
"synchronized",
"ExecutorService",
"getService",
"(",
")",
"{",
"if",
"(",
"service",
"==",
"null",
")",
"{",
"// System.out.println(\"creating an executor service with a threadpool of size \" + threadPoolSize);",
"service",
"=",
"Executors",
".",
"newFixedThreadPo... | Subclasses may override this method to provide their own executor services. This method will be called each time
a tile needs to be loaded. Implementations should cache the ExecutorService when possible.
@return ExecutorService to load tiles with | [
"Subclasses",
"may",
"override",
"this",
"method",
"to",
"provide",
"their",
"own",
"executor",
"services",
".",
"This",
"method",
"will",
"be",
"called",
"each",
"time",
"a",
"tile",
"needs",
"to",
"be",
"loaded",
".",
"Implementations",
"should",
"cache",
... | train | https://github.com/msteiger/jxmapviewer2/blob/82639273b0aac983b6026fb90aa925c0cf596410/jxmapviewer2/src/main/java/org/jxmapviewer/viewer/AbstractTileFactory.java#L196-L216 |
aol/cyclops | cyclops/src/main/java/cyclops/companion/Functions.java | Functions.concatDoubles | public static Function<? super ReactiveSeq<Double>, ? extends ReactiveSeq<Double>> concatDoubles( ReactiveSeq<Double> b) {
"""
/*
Fluent integer concat operation using primitive types
e.g.
<pre>
{@code
import static cyclops.ReactiveSeq.concatDoubles;
ReactiveSeq.ofDoubles(1d,2d,3d)
.to(concatDoubles(React... | java | public static Function<? super ReactiveSeq<Double>, ? extends ReactiveSeq<Double>> concatDoubles( ReactiveSeq<Double> b){
return a->ReactiveSeq.fromSpliterator(DoubleStream.concat(a.mapToDouble(i->i),b.mapToDouble(i->i)).spliterator());
} | [
"public",
"static",
"Function",
"<",
"?",
"super",
"ReactiveSeq",
"<",
"Double",
">",
",",
"?",
"extends",
"ReactiveSeq",
"<",
"Double",
">",
">",
"concatDoubles",
"(",
"ReactiveSeq",
"<",
"Double",
">",
"b",
")",
"{",
"return",
"a",
"->",
"ReactiveSeq",
... | /*
Fluent integer concat operation using primitive types
e.g.
<pre>
{@code
import static cyclops.ReactiveSeq.concatDoubles;
ReactiveSeq.ofDoubles(1d,2d,3d)
.to(concatDoubles(ReactiveSeq.ofDoubles(5,6,7,8,9)));
//[1d,2d,3d,5d,6d,7d,8d,9d]
}
</pre> | [
"/",
"*",
"Fluent",
"integer",
"concat",
"operation",
"using",
"primitive",
"types",
"e",
".",
"g",
".",
"<pre",
">",
"{",
"@code",
"import",
"static",
"cyclops",
".",
"ReactiveSeq",
".",
"concatDoubles",
";"
] | train | https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/cyclops/companion/Functions.java#L556-L559 |
reactor/reactor-netty | src/main/java/reactor/netty/channel/BootstrapHandlers.java | BootstrapHandlers.finalizeHandler | public static void finalizeHandler(ServerBootstrap b, ChannelOperations.OnSetup
opsFactory, ConnectionObserver childListener) {
"""
Finalize a server bootstrap pipeline configuration by turning it into a {@link
ChannelInitializer} to safely initialize each child channel.
@param b a server bootstrap
@param ... | java | public static void finalizeHandler(ServerBootstrap b, ChannelOperations.OnSetup
opsFactory, ConnectionObserver childListener) {
Objects.requireNonNull(b, "bootstrap");
Objects.requireNonNull(opsFactory, "ops");
Objects.requireNonNull(childListener, "childListener");
BootstrapPipelineHandler pipeline = null;... | [
"public",
"static",
"void",
"finalizeHandler",
"(",
"ServerBootstrap",
"b",
",",
"ChannelOperations",
".",
"OnSetup",
"opsFactory",
",",
"ConnectionObserver",
"childListener",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"b",
",",
"\"bootstrap\"",
")",
";",
"O... | Finalize a server bootstrap pipeline configuration by turning it into a {@link
ChannelInitializer} to safely initialize each child channel.
@param b a server bootstrap
@param opsFactory an operation factory
@param childListener a connection observer | [
"Finalize",
"a",
"server",
"bootstrap",
"pipeline",
"configuration",
"by",
"turning",
"it",
"into",
"a",
"{",
"@link",
"ChannelInitializer",
"}",
"to",
"safely",
"initialize",
"each",
"child",
"channel",
"."
] | train | https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/channel/BootstrapHandlers.java#L77-L90 |
keenlabs/KeenClient-Java | core/src/main/java/io/keen/client/java/KeenClient.java | KeenClient.validateEventValue | @SuppressWarnings("unchecked") // cast to generic Map will always be okay in this case
private void validateEventValue(Object value, int depth) {
"""
Validates a value within an event structure. This method will handle validating each element
in a list, as well as recursively validating nested maps.
@param... | java | @SuppressWarnings("unchecked") // cast to generic Map will always be okay in this case
private void validateEventValue(Object value, int depth) {
if (value instanceof String) {
String strValue = (String) value;
if (strValue.length() >= 10000) {
throw new InvalidEventE... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"// cast to generic Map will always be okay in this case",
"private",
"void",
"validateEventValue",
"(",
"Object",
"value",
",",
"int",
"depth",
")",
"{",
"if",
"(",
"value",
"instanceof",
"String",
")",
"{",
"String... | Validates a value within an event structure. This method will handle validating each element
in a list, as well as recursively validating nested maps.
@param value The value to validate.
@param depth The current depth of validation. | [
"Validates",
"a",
"value",
"within",
"an",
"event",
"structure",
".",
"This",
"method",
"will",
"handle",
"validating",
"each",
"element",
"in",
"a",
"list",
"as",
"well",
"as",
"recursively",
"validating",
"nested",
"maps",
"."
] | train | https://github.com/keenlabs/KeenClient-Java/blob/2ea021547b5338257c951a2596bd49749038d018/core/src/main/java/io/keen/client/java/KeenClient.java#L1284-L1299 |
UrielCh/ovh-java-sdk | ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java | ApiOvhOrder.telephony_lines_serviceName_hardware_POST | public OvhOrder telephony_lines_serviceName_hardware_POST(String serviceName, String hardware, String mondialRelayId, Boolean retractation, String shippingContactId) throws IOException {
"""
Create order
REST: POST /order/telephony/lines/{serviceName}/hardware
@param hardware [required] The hardware you want t... | java | public OvhOrder telephony_lines_serviceName_hardware_POST(String serviceName, String hardware, String mondialRelayId, Boolean retractation, String shippingContactId) throws IOException {
String qPath = "/order/telephony/lines/{serviceName}/hardware";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Ob... | [
"public",
"OvhOrder",
"telephony_lines_serviceName_hardware_POST",
"(",
"String",
"serviceName",
",",
"String",
"hardware",
",",
"String",
"mondialRelayId",
",",
"Boolean",
"retractation",
",",
"String",
"shippingContactId",
")",
"throws",
"IOException",
"{",
"String",
... | Create order
REST: POST /order/telephony/lines/{serviceName}/hardware
@param hardware [required] The hardware you want to order for this specific line
@param mondialRelayId [required] Use /supply/mondialRelay entry point to specify a relay point and ignore shipping contact address information entry.
@param shippingCon... | [
"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#L6924-L6934 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/io/file/FileCopier.java | FileCopier.internalCopyDirContent | private void internalCopyDirContent(File src, File dest) throws IORuntimeException {
"""
拷贝目录内容,只用于内部,不做任何安全检查<br>
拷贝内容的意思为源目录下的所有文件和目录拷贝到另一个目录下,而不拷贝源目录本身
@param src 源目录
@param dest 目标目录
@throws IORuntimeException IO异常
"""
if (null != copyFilter && false == copyFilter.accept(src)) {
//被过滤的目录跳过
... | java | private void internalCopyDirContent(File src, File dest) throws IORuntimeException {
if (null != copyFilter && false == copyFilter.accept(src)) {
//被过滤的目录跳过
return;
}
if (false == dest.exists()) {
//目标为不存在路径,创建为目录
dest.mkdirs();
} else if (false == dest.isDirectory()) {
throw new IOR... | [
"private",
"void",
"internalCopyDirContent",
"(",
"File",
"src",
",",
"File",
"dest",
")",
"throws",
"IORuntimeException",
"{",
"if",
"(",
"null",
"!=",
"copyFilter",
"&&",
"false",
"==",
"copyFilter",
".",
"accept",
"(",
"src",
")",
")",
"{",
"//被过滤的目录跳过\r"... | 拷贝目录内容,只用于内部,不做任何安全检查<br>
拷贝内容的意思为源目录下的所有文件和目录拷贝到另一个目录下,而不拷贝源目录本身
@param src 源目录
@param dest 目标目录
@throws IORuntimeException IO异常 | [
"拷贝目录内容,只用于内部,不做任何安全检查<br",
">",
"拷贝内容的意思为源目录下的所有文件和目录拷贝到另一个目录下,而不拷贝源目录本身"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/file/FileCopier.java#L201-L227 |
ngageoint/geopackage-core-java | src/main/java/mil/nga/geopackage/extension/NGAExtensions.java | NGAExtensions.deleteContentsId | public static void deleteContentsId(GeoPackageCore geoPackage, String table) {
"""
Delete the Contents Id extensions for the table
@param geoPackage
GeoPackage
@param table
table name
@since 3.2.0
"""
ContentsIdExtension contentsIdExtension = new ContentsIdExtension(
geoPackage);
if (contentsId... | java | public static void deleteContentsId(GeoPackageCore geoPackage, String table) {
ContentsIdExtension contentsIdExtension = new ContentsIdExtension(
geoPackage);
if (contentsIdExtension.has()) {
contentsIdExtension.delete(table);
}
} | [
"public",
"static",
"void",
"deleteContentsId",
"(",
"GeoPackageCore",
"geoPackage",
",",
"String",
"table",
")",
"{",
"ContentsIdExtension",
"contentsIdExtension",
"=",
"new",
"ContentsIdExtension",
"(",
"geoPackage",
")",
";",
"if",
"(",
"contentsIdExtension",
".",
... | Delete the Contents Id extensions for the table
@param geoPackage
GeoPackage
@param table
table name
@since 3.2.0 | [
"Delete",
"the",
"Contents",
"Id",
"extensions",
"for",
"the",
"table"
] | train | https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/NGAExtensions.java#L358-L366 |
albfernandez/itext2 | src/main/java/com/lowagie/text/pdf/PdfStamperImp.java | PdfStamperImp.setAdditionalAction | public void setAdditionalAction(PdfName actionType, PdfAction action) throws PdfException {
"""
Additional-actions defining the actions to be taken in
response to various trigger events affecting the document
as a whole. The actions types allowed are: <CODE>DOCUMENT_CLOSE</CODE>,
<CODE>WILL_SAVE</CODE>, <CODE>D... | java | public void setAdditionalAction(PdfName actionType, PdfAction action) throws PdfException {
if (!(actionType.equals(DOCUMENT_CLOSE) ||
actionType.equals(WILL_SAVE) ||
actionType.equals(DID_SAVE) ||
actionType.equals(WILL_PRINT) ||
actionType.equals(DID_PRINT))) {
thro... | [
"public",
"void",
"setAdditionalAction",
"(",
"PdfName",
"actionType",
",",
"PdfAction",
"action",
")",
"throws",
"PdfException",
"{",
"if",
"(",
"!",
"(",
"actionType",
".",
"equals",
"(",
"DOCUMENT_CLOSE",
")",
"||",
"actionType",
".",
"equals",
"(",
"WILL_S... | Additional-actions defining the actions to be taken in
response to various trigger events affecting the document
as a whole. The actions types allowed are: <CODE>DOCUMENT_CLOSE</CODE>,
<CODE>WILL_SAVE</CODE>, <CODE>DID_SAVE</CODE>, <CODE>WILL_PRINT</CODE>
and <CODE>DID_PRINT</CODE>.
@param actionType the action type
@... | [
"Additional",
"-",
"actions",
"defining",
"the",
"actions",
"to",
"be",
"taken",
"in",
"response",
"to",
"various",
"trigger",
"events",
"affecting",
"the",
"document",
"as",
"a",
"whole",
".",
"The",
"actions",
"types",
"allowed",
"are",
":",
"<CODE",
">",
... | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfStamperImp.java#L1476-L1496 |
influxdata/influxdb-java | src/main/java/org/influxdb/impl/Preconditions.java | Preconditions.checkNotNegativeNumber | public static void checkNotNegativeNumber(final Number number, final String name) throws IllegalArgumentException {
"""
Enforces that the number is not negative.
@param number the number to test
@param name variable name for reporting
@throws IllegalArgumentException if the number is less or equal to 0
"""
... | java | public static void checkNotNegativeNumber(final Number number, final String name) throws IllegalArgumentException {
if (number == null || number.doubleValue() < 0) {
throw new IllegalArgumentException("Expecting a positive or zero number for " + name);
}
} | [
"public",
"static",
"void",
"checkNotNegativeNumber",
"(",
"final",
"Number",
"number",
",",
"final",
"String",
"name",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"number",
"==",
"null",
"||",
"number",
".",
"doubleValue",
"(",
")",
"<",
"0",
... | Enforces that the number is not negative.
@param number the number to test
@param name variable name for reporting
@throws IllegalArgumentException if the number is less or equal to 0 | [
"Enforces",
"that",
"the",
"number",
"is",
"not",
"negative",
"."
] | train | https://github.com/influxdata/influxdb-java/blob/8ae777f34aa2e598f609208cf4fa12d4642f83f5/src/main/java/org/influxdb/impl/Preconditions.java#L45-L49 |
libgdx/gdx-ai | gdx-ai/src/com/badlogic/gdx/ai/utils/ArithmeticUtils.java | ArithmeticUtils.gcdPositive | public static int gcdPositive (int a, int b) {
"""
Returns the greatest common divisor of two <em>positive</em> numbers (this precondition is <em>not</em> checked and the
result is undefined if not fulfilled) using the "binary gcd" method which avoids division and modulo operations. See Knuth
4.5.2 algorithm B. ... | java | public static int gcdPositive (int a, int b) {
if (a == 0) return b;
if (b == 0) return a;
// Make "a" and "b" odd, keeping track of common power of 2.
final int aTwos = Integer.numberOfTrailingZeros(a);
a >>= aTwos;
final int bTwos = Integer.numberOfTrailingZeros(b);
b >>= bTwos;
final int shift = aT... | [
"public",
"static",
"int",
"gcdPositive",
"(",
"int",
"a",
",",
"int",
"b",
")",
"{",
"if",
"(",
"a",
"==",
"0",
")",
"return",
"b",
";",
"if",
"(",
"b",
"==",
"0",
")",
"return",
"a",
";",
"// Make \"a\" and \"b\" odd, keeping track of common power of 2."... | Returns the greatest common divisor of two <em>positive</em> numbers (this precondition is <em>not</em> checked and the
result is undefined if not fulfilled) using the "binary gcd" method which avoids division and modulo operations. See Knuth
4.5.2 algorithm B. The algorithm is due to Josef Stein (1961).
<p>
Special ca... | [
"Returns",
"the",
"greatest",
"common",
"divisor",
"of",
"two",
"<em",
">",
"positive<",
"/",
"em",
">",
"numbers",
"(",
"this",
"precondition",
"is",
"<em",
">",
"not<",
"/",
"em",
">",
"checked",
"and",
"the",
"result",
"is",
"undefined",
"if",
"not",
... | train | https://github.com/libgdx/gdx-ai/blob/2d1523a97193a45e18e11a4837c6800d08f177c5/gdx-ai/src/com/badlogic/gdx/ai/utils/ArithmeticUtils.java#L57-L86 |
OpenLiberty/open-liberty | dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDynacache.java | HTODDynacache.delCacheEntry | public void delCacheEntry(ValueSet deleteList, int cause, int source, boolean fromDepIdTemplateInvalidation, boolean fireEvent) {
"""
***********************************************************************
delCacheEntry()
Delete cacheEntry from the disk. This also remove dependencies for all dataIds and template... | java | public void delCacheEntry(ValueSet deleteList, int cause, int source, boolean fromDepIdTemplateInvalidation, boolean fireEvent) {
if (deleteList != null && deleteList.size() > 0) {
this.invalidationBuffer.add(deleteList, HTODInvalidationBuffer.EXPLICIT_BUFFER, cause, source, fromDepIdTemplateInvalid... | [
"public",
"void",
"delCacheEntry",
"(",
"ValueSet",
"deleteList",
",",
"int",
"cause",
",",
"int",
"source",
",",
"boolean",
"fromDepIdTemplateInvalidation",
",",
"boolean",
"fireEvent",
")",
"{",
"if",
"(",
"deleteList",
"!=",
"null",
"&&",
"deleteList",
".",
... | ***********************************************************************
delCacheEntry()
Delete cacheEntry from the disk. This also remove dependencies for all dataIds and templates
to the cacheEntry
*********************************************************************** | [
"***********************************************************************",
"delCacheEntry",
"()",
"Delete",
"cacheEntry",
"from",
"the",
"disk",
".",
"This",
"also",
"remove",
"dependencies",
"for",
"all",
"dataIds",
"and",
"templates",
"to",
"the",
"cacheEntry",
"*********... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDynacache.java#L678-L683 |
micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/GenericUtils.java | GenericUtils.resolveTypeVariable | protected DeclaredType resolveTypeVariable(Element element, TypeVariable typeVariable) {
"""
Resolve the first type argument to a parameterized type.
@param element The type element
@param typeVariable The type variable
@return The declaring type
"""
Element enclosing = element.getEnclosingEl... | java | protected DeclaredType resolveTypeVariable(Element element, TypeVariable typeVariable) {
Element enclosing = element.getEnclosingElement();
while (enclosing instanceof Parameterizable) {
Parameterizable parameterizable = (Parameterizable) enclosing;
String name = typeVariable.to... | [
"protected",
"DeclaredType",
"resolveTypeVariable",
"(",
"Element",
"element",
",",
"TypeVariable",
"typeVariable",
")",
"{",
"Element",
"enclosing",
"=",
"element",
".",
"getEnclosingElement",
"(",
")",
";",
"while",
"(",
"enclosing",
"instanceof",
"Parameterizable",... | Resolve the first type argument to a parameterized type.
@param element The type element
@param typeVariable The type variable
@return The declaring type | [
"Resolve",
"the",
"first",
"type",
"argument",
"to",
"a",
"parameterized",
"type",
"."
] | train | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/GenericUtils.java#L309-L329 |
hawkular/hawkular-commons | hawkular-bus/hawkular-bus-common/src/main/java/org/hawkular/bus/common/AbstractMessage.java | AbstractMessage.fromJSON | public static <T extends BasicMessage> BasicMessageWithExtraData<T> fromJSON(InputStream in, Class<T> clazz) {
"""
Convenience static method that reads a JSON string from the given stream and converts the JSON
string to a particular message object. The input stream will remain open so the caller can
stream any e... | java | public static <T extends BasicMessage> BasicMessageWithExtraData<T> fromJSON(InputStream in, Class<T> clazz) {
final T obj;
final byte[] remainder;
try (JsonParser parser = new JsonFactory().configure(Feature.AUTO_CLOSE_SOURCE, false).createParser(in)) {
Method buildObjectMapperForDe... | [
"public",
"static",
"<",
"T",
"extends",
"BasicMessage",
">",
"BasicMessageWithExtraData",
"<",
"T",
">",
"fromJSON",
"(",
"InputStream",
"in",
",",
"Class",
"<",
"T",
">",
"clazz",
")",
"{",
"final",
"T",
"obj",
";",
"final",
"byte",
"[",
"]",
"remainde... | Convenience static method that reads a JSON string from the given stream and converts the JSON
string to a particular message object. The input stream will remain open so the caller can
stream any extra data that might appear after it.
Because of the way the JSON parser works, some extra data might have been read from... | [
"Convenience",
"static",
"method",
"that",
"reads",
"a",
"JSON",
"string",
"from",
"the",
"given",
"stream",
"and",
"converts",
"the",
"JSON",
"string",
"to",
"a",
"particular",
"message",
"object",
".",
"The",
"input",
"stream",
"will",
"remain",
"open",
"s... | train | https://github.com/hawkular/hawkular-commons/blob/e4a832862b3446d7f4d629bb05790f2df578e035/hawkular-bus/hawkular-bus-common/src/main/java/org/hawkular/bus/common/AbstractMessage.java#L99-L118 |
jhunters/jprotobuf | src/main/java/com/baidu/bjf/remoting/protobuf/utils/MiniTemplator.java | MiniTemplator.setVariableEsc | public void setVariableEsc(String variableName, String variableValue) throws VariableNotDefinedException {
"""
Sets a template variable to an escaped value.
<p>
Convenience method for: <code>setVariable (variableName, MiniTemplator.escapeHtml(variableValue), false)</code>
@param variableName the name of the v... | java | public void setVariableEsc(String variableName, String variableValue) throws VariableNotDefinedException {
setVariable(variableName, escapeHtml(variableValue), false);
} | [
"public",
"void",
"setVariableEsc",
"(",
"String",
"variableName",
",",
"String",
"variableValue",
")",
"throws",
"VariableNotDefinedException",
"{",
"setVariable",
"(",
"variableName",
",",
"escapeHtml",
"(",
"variableValue",
")",
",",
"false",
")",
";",
"}"
] | Sets a template variable to an escaped value.
<p>
Convenience method for: <code>setVariable (variableName, MiniTemplator.escapeHtml(variableValue), false)</code>
@param variableName the name of the variable to be set. Case-insensitive.
@param variableValue the new value of the variable. May be <code>null</code>. Speci... | [
"Sets",
"a",
"template",
"variable",
"to",
"an",
"escaped",
"value",
".",
"<p",
">",
"Convenience",
"method",
"for",
":",
"<code",
">",
"setVariable",
"(",
"variableName",
"MiniTemplator",
".",
"escapeHtml",
"(",
"variableValue",
")",
"false",
")",
"<",
"/",... | train | https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/src/main/java/com/baidu/bjf/remoting/protobuf/utils/MiniTemplator.java#L468-L470 |
hdbeukel/james-extensions | src/main/java/org/jamesframework/ext/analysis/SearchRunResults.java | SearchRunResults.updateBestSolution | public void updateBestSolution(long time, double value, SolutionType newBestSolution) {
"""
Update the best found solution. The update time and newly obtained value are added
to the list of updates and the final best solution is overwritten.
@param time time at which the solution was found (milliseconds)
@par... | java | public void updateBestSolution(long time, double value, SolutionType newBestSolution){
times.add(time);
values.add(value);
bestSolution = newBestSolution;
} | [
"public",
"void",
"updateBestSolution",
"(",
"long",
"time",
",",
"double",
"value",
",",
"SolutionType",
"newBestSolution",
")",
"{",
"times",
".",
"add",
"(",
"time",
")",
";",
"values",
".",
"add",
"(",
"value",
")",
";",
"bestSolution",
"=",
"newBestSo... | Update the best found solution. The update time and newly obtained value are added
to the list of updates and the final best solution is overwritten.
@param time time at which the solution was found (milliseconds)
@param value value of the solution
@param newBestSolution newly found best solution | [
"Update",
"the",
"best",
"found",
"solution",
".",
"The",
"update",
"time",
"and",
"newly",
"obtained",
"value",
"are",
"added",
"to",
"the",
"list",
"of",
"updates",
"and",
"the",
"final",
"best",
"solution",
"is",
"overwritten",
"."
] | train | https://github.com/hdbeukel/james-extensions/blob/37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2/src/main/java/org/jamesframework/ext/analysis/SearchRunResults.java#L75-L79 |
jfoenixadmin/JFoenix | jfoenix/src/main/java/com/jfoenix/skins/ValidationPane.java | ValidationPane.updateErrorContainerSize | private void updateErrorContainerSize(double w, double errorContainerHeight) {
"""
update the size of error container and its clip
@param w
@param errorContainerHeight
"""
errorContainerClip.setWidth(w);
errorContainerClip.setHeight(errorContainerHeight);
resize(w, errorContainerHei... | java | private void updateErrorContainerSize(double w, double errorContainerHeight) {
errorContainerClip.setWidth(w);
errorContainerClip.setHeight(errorContainerHeight);
resize(w, errorContainerHeight);
} | [
"private",
"void",
"updateErrorContainerSize",
"(",
"double",
"w",
",",
"double",
"errorContainerHeight",
")",
"{",
"errorContainerClip",
".",
"setWidth",
"(",
"w",
")",
";",
"errorContainerClip",
".",
"setHeight",
"(",
"errorContainerHeight",
")",
";",
"resize",
... | update the size of error container and its clip
@param w
@param errorContainerHeight | [
"update",
"the",
"size",
"of",
"error",
"container",
"and",
"its",
"clip"
] | train | https://github.com/jfoenixadmin/JFoenix/blob/53235b5f561da4a515ef716059b8a8df5239ffa1/jfoenix/src/main/java/com/jfoenix/skins/ValidationPane.java#L205-L209 |
ModeShape/modeshape | modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/JcrTools.java | JcrTools.printQuery | public QueryResult printQuery( Session session,
String jcrSql2,
long expectedNumberOfResults,
Map<String, String> variables ) throws RepositoryException {
"""
Execute the supplied JCR-SQL2 query and, if printin... | java | public QueryResult printQuery( Session session,
String jcrSql2,
long expectedNumberOfResults,
Map<String, String> variables ) throws RepositoryException {
return printQuery(session, jcrSql2, Query.JCR_SQL2, ... | [
"public",
"QueryResult",
"printQuery",
"(",
"Session",
"session",
",",
"String",
"jcrSql2",
",",
"long",
"expectedNumberOfResults",
",",
"Map",
"<",
"String",
",",
"String",
">",
"variables",
")",
"throws",
"RepositoryException",
"{",
"return",
"printQuery",
"(",
... | Execute the supplied JCR-SQL2 query and, if printing is enabled, print out the results.
@param session the session
@param jcrSql2 the JCR-SQL2 query
@param expectedNumberOfResults the expected number of rows in the results, or -1 if this is not to be checked
@param variables the array of variable maps for the query; a... | [
"Execute",
"the",
"supplied",
"JCR",
"-",
"SQL2",
"query",
"and",
"if",
"printing",
"is",
"enabled",
"print",
"out",
"the",
"results",
"."
] | train | https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/JcrTools.java#L663-L668 |
Stratio/stratio-cassandra | src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java | CommitLogSegmentManager.discardSegment | private void discardSegment(final CommitLogSegment segment, final boolean deleteFile) {
"""
Indicates that a segment file should be deleted.
@param segment segment to be discarded
"""
logger.debug("Segment {} is no longer active and will be deleted {}", segment, deleteFile ? "now" : "by the archive ... | java | private void discardSegment(final CommitLogSegment segment, final boolean deleteFile)
{
logger.debug("Segment {} is no longer active and will be deleted {}", segment, deleteFile ? "now" : "by the archive script");
size.addAndGet(-DatabaseDescriptor.getCommitLogSegmentSize());
segmentManagem... | [
"private",
"void",
"discardSegment",
"(",
"final",
"CommitLogSegment",
"segment",
",",
"final",
"boolean",
"deleteFile",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Segment {} is no longer active and will be deleted {}\"",
",",
"segment",
",",
"deleteFile",
"?",
"\"now\""... | Indicates that a segment file should be deleted.
@param segment segment to be discarded | [
"Indicates",
"that",
"a",
"segment",
"file",
"should",
"be",
"deleted",
"."
] | train | https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java#L407-L422 |
albfernandez/itext2 | src/main/java/com/lowagie/text/rtf/RtfWriter2.java | RtfWriter2.importRtfDocumentIntoElement | public void importRtfDocumentIntoElement(Element elem, FileInputStream documentSource, EventListener[] events) throws IOException, DocumentException {
"""
Adds the complete RTF document to the current RTF element being generated.
It will parse the font and color tables and correct the font and color references
s... | java | public void importRtfDocumentIntoElement(Element elem, FileInputStream documentSource, EventListener[] events) throws IOException, DocumentException {
RtfParser rtfImport = new RtfParser(this.document);
if(events != null) {
for(int idx=0;idx<events.length;idx++) {
rtfImport.addListener(events... | [
"public",
"void",
"importRtfDocumentIntoElement",
"(",
"Element",
"elem",
",",
"FileInputStream",
"documentSource",
",",
"EventListener",
"[",
"]",
"events",
")",
"throws",
"IOException",
",",
"DocumentException",
"{",
"RtfParser",
"rtfImport",
"=",
"new",
"RtfParser"... | Adds the complete RTF document to the current RTF element being generated.
It will parse the font and color tables and correct the font and color references
so that the imported RTF document retains its formattings.
@param elem The Element the RTF document is to be imported into.
@param documentSource The Reader to re... | [
"Adds",
"the",
"complete",
"RTF",
"document",
"to",
"the",
"current",
"RTF",
"element",
"being",
"generated",
".",
"It",
"will",
"parse",
"the",
"font",
"and",
"color",
"tables",
"and",
"correct",
"the",
"font",
"and",
"color",
"references",
"so",
"that",
... | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/rtf/RtfWriter2.java#L376-L385 |
liferay/com-liferay-commerce | commerce-product-type-virtual-service/src/main/java/com/liferay/commerce/product/type/virtual/service/persistence/impl/CPDefinitionVirtualSettingPersistenceImpl.java | CPDefinitionVirtualSettingPersistenceImpl.removeByUUID_G | @Override
public CPDefinitionVirtualSetting removeByUUID_G(String uuid, long groupId)
throws NoSuchCPDefinitionVirtualSettingException {
"""
Removes the cp definition virtual setting where uuid = ? and groupId = ? from the database.
@param uuid the uuid
@param groupId the group ID
@return the cp de... | java | @Override
public CPDefinitionVirtualSetting removeByUUID_G(String uuid, long groupId)
throws NoSuchCPDefinitionVirtualSettingException {
CPDefinitionVirtualSetting cpDefinitionVirtualSetting = findByUUID_G(uuid,
groupId);
return remove(cpDefinitionVirtualSetting);
} | [
"@",
"Override",
"public",
"CPDefinitionVirtualSetting",
"removeByUUID_G",
"(",
"String",
"uuid",
",",
"long",
"groupId",
")",
"throws",
"NoSuchCPDefinitionVirtualSettingException",
"{",
"CPDefinitionVirtualSetting",
"cpDefinitionVirtualSetting",
"=",
"findByUUID_G",
"(",
"uu... | Removes the cp definition virtual setting where uuid = ? and groupId = ? from the database.
@param uuid the uuid
@param groupId the group ID
@return the cp definition virtual setting that was removed | [
"Removes",
"the",
"cp",
"definition",
"virtual",
"setting",
"where",
"uuid",
"=",
"?",
";",
"and",
"groupId",
"=",
"?",
";",
"from",
"the",
"database",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-type-virtual-service/src/main/java/com/liferay/commerce/product/type/virtual/service/persistence/impl/CPDefinitionVirtualSettingPersistenceImpl.java#L822-L829 |
sporniket/core | sporniket-core-ml/src/main/java/com/sporniket/libre/lang/xml/XmlStringTools.java | XmlStringTools.getTextInsideTag | public static String getTextInsideTag(String text, String tag, Map<String, String> attributes) {
"""
Wrap a text inside a tag with attributes.
@param text
the text to wrap
@param tag
the tag to use
@param attributes
the attribute map
@return the xml code
"""
StringBuffer _buffer = new StringBuffer()... | java | public static String getTextInsideTag(String text, String tag, Map<String, String> attributes)
{
StringBuffer _buffer = new StringBuffer();
Map<String, String> _attributes = (null != attributes) ? attributes : EMPTY_MAP;
return doAppendTextInsideTag(_buffer, text, tag, _attributes).toString();
} | [
"public",
"static",
"String",
"getTextInsideTag",
"(",
"String",
"text",
",",
"String",
"tag",
",",
"Map",
"<",
"String",
",",
"String",
">",
"attributes",
")",
"{",
"StringBuffer",
"_buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"Map",
"<",
"String"... | Wrap a text inside a tag with attributes.
@param text
the text to wrap
@param tag
the tag to use
@param attributes
the attribute map
@return the xml code | [
"Wrap",
"a",
"text",
"inside",
"a",
"tag",
"with",
"attributes",
"."
] | train | https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-ml/src/main/java/com/sporniket/libre/lang/xml/XmlStringTools.java#L625-L630 |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/model/JavacElements.java | JavacElements.nameToSymbol | private <S extends Symbol> S nameToSymbol(String nameStr, Class<S> clazz) {
"""
Returns a symbol given the type's or packages's canonical name,
or null if the name isn't found.
"""
Name name = names.fromString(nameStr);
// First check cache.
Symbol sym = (clazz == ClassSymbol.class)
... | java | private <S extends Symbol> S nameToSymbol(String nameStr, Class<S> clazz) {
Name name = names.fromString(nameStr);
// First check cache.
Symbol sym = (clazz == ClassSymbol.class)
? syms.classes.get(name)
: syms.packages.get(name);
try {
... | [
"private",
"<",
"S",
"extends",
"Symbol",
">",
"S",
"nameToSymbol",
"(",
"String",
"nameStr",
",",
"Class",
"<",
"S",
">",
"clazz",
")",
"{",
"Name",
"name",
"=",
"names",
".",
"fromString",
"(",
"nameStr",
")",
";",
"// First check cache.",
"Symbol",
"s... | Returns a symbol given the type's or packages's canonical name,
or null if the name isn't found. | [
"Returns",
"a",
"symbol",
"given",
"the",
"type",
"s",
"or",
"packages",
"s",
"canonical",
"name",
"or",
"null",
"if",
"the",
"name",
"isn",
"t",
"found",
"."
] | train | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/model/JavacElements.java#L116-L138 |
apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/dataset/DatasetUtils.java | DatasetUtils.instantiateCopyableFileFilter | public static CopyableFileFilter instantiateCopyableFileFilter(Properties props, Object... additionalArgs) {
"""
Instantiate a {@link CopyableFileFilter} from the class name at key {@link #COPYABLE_FILE_FILTER_KEY} in props
passed. If key {@link #COPYABLE_FILE_FILTER_KEY} is not set, a default {@link #ACCEPT_ALL_... | java | public static CopyableFileFilter instantiateCopyableFileFilter(Properties props, Object... additionalArgs) {
if (!props.containsKey(COPYABLE_FILE_FILTER_KEY)) {
return ACCEPT_ALL_COPYABLE_FILE_FILTER;
}
try {
Class<?> copyableFileFilterClass = Class.forName(props.getProperty(COPYABLE_FILE_FILT... | [
"public",
"static",
"CopyableFileFilter",
"instantiateCopyableFileFilter",
"(",
"Properties",
"props",
",",
"Object",
"...",
"additionalArgs",
")",
"{",
"if",
"(",
"!",
"props",
".",
"containsKey",
"(",
"COPYABLE_FILE_FILTER_KEY",
")",
")",
"{",
"return",
"ACCEPT_AL... | Instantiate a {@link CopyableFileFilter} from the class name at key {@link #COPYABLE_FILE_FILTER_KEY} in props
passed. If key {@link #COPYABLE_FILE_FILTER_KEY} is not set, a default {@link #ACCEPT_ALL_COPYABLE_FILE_FILTER} is
returned
@param props that contain path filter classname at {@link #COPYABLE_FILE_FILTER_KEY}... | [
"Instantiate",
"a",
"{",
"@link",
"CopyableFileFilter",
"}",
"from",
"the",
"class",
"name",
"at",
"key",
"{",
"@link",
"#COPYABLE_FILE_FILTER_KEY",
"}",
"in",
"props",
"passed",
".",
"If",
"key",
"{",
"@link",
"#COPYABLE_FILE_FILTER_KEY",
"}",
"is",
"not",
"s... | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/dataset/DatasetUtils.java#L136-L149 |
facebookarchive/hadoop-20 | src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/servers/HadoopLocationWizard.java | HadoopLocationWizard.createConfText | private Text createConfText(ModifyListener listener, Composite parent,
ConfProp prop) {
"""
Create a SWT Text component for the given {@link ConfProp} text
configuration property.
@param listener
@param parent
@param prop
@return
"""
Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
... | java | private Text createConfText(ModifyListener listener, Composite parent,
ConfProp prop) {
Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
GridData data = new GridData(GridData.FILL_HORIZONTAL);
text.setLayoutData(data);
text.setData("hProp", prop);
text.setText(location.getConfProp(prop)... | [
"private",
"Text",
"createConfText",
"(",
"ModifyListener",
"listener",
",",
"Composite",
"parent",
",",
"ConfProp",
"prop",
")",
"{",
"Text",
"text",
"=",
"new",
"Text",
"(",
"parent",
",",
"SWT",
".",
"SINGLE",
"|",
"SWT",
".",
"BORDER",
")",
";",
"Gri... | Create a SWT Text component for the given {@link ConfProp} text
configuration property.
@param listener
@param parent
@param prop
@return | [
"Create",
"a",
"SWT",
"Text",
"component",
"for",
"the",
"given",
"{",
"@link",
"ConfProp",
"}",
"text",
"configuration",
"property",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/servers/HadoopLocationWizard.java#L496-L507 |
Azure/azure-sdk-for-java | dns/resource-manager/v2016_04_01/src/main/java/com/microsoft/azure/management/dns/v2016_04_01/implementation/RecordSetsInner.java | RecordSetsInner.updateAsync | public Observable<RecordSetInner> updateAsync(String resourceGroupName, String zoneName, String relativeRecordSetName, RecordType recordType, RecordSetInner parameters, String ifMatch) {
"""
Updates a record set within a DNS zone.
@param resourceGroupName The name of the resource group.
@param zoneName The nam... | java | public Observable<RecordSetInner> updateAsync(String resourceGroupName, String zoneName, String relativeRecordSetName, RecordType recordType, RecordSetInner parameters, String ifMatch) {
return updateWithServiceResponseAsync(resourceGroupName, zoneName, relativeRecordSetName, recordType, parameters, ifMatch).ma... | [
"public",
"Observable",
"<",
"RecordSetInner",
">",
"updateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"zoneName",
",",
"String",
"relativeRecordSetName",
",",
"RecordType",
"recordType",
",",
"RecordSetInner",
"parameters",
",",
"String",
"ifMatch",
")... | Updates a record set within a DNS zone.
@param resourceGroupName The name of the resource group.
@param zoneName The name of the DNS zone (without a terminating dot).
@param relativeRecordSetName The name of the record set, relative to the name of the zone.
@param recordType The type of DNS record in this record set. ... | [
"Updates",
"a",
"record",
"set",
"within",
"a",
"DNS",
"zone",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/dns/resource-manager/v2016_04_01/src/main/java/com/microsoft/azure/management/dns/v2016_04_01/implementation/RecordSetsInner.java#L249-L256 |
jmxtrans/jmxtrans | jmxtrans-output/jmxtrans-output-core/src/main/java/com/googlecode/jmxtrans/model/output/support/opentsdb/OpenTSDBMessageFormatter.java | OpenTSDBMessageFormatter.addTypeNamesTags | protected void addTypeNamesTags(StringBuilder resultString, Result result) {
"""
Add the tag(s) for typeNames.
@param result - the result of the JMX query.
@param resultString - current form of the metric string.
@return String - the updated metric string with the necessary tag(s) added.
"""
if (m... | java | protected void addTypeNamesTags(StringBuilder resultString, Result result) {
if (mergeTypeNamesTags) {
// Produce a single tag with all the TypeName keys concatenated and all the values joined with '_'.
String typeNameValues = TypeNameValuesStringBuilder.getDefaultBuilder().build(typeNames, result.getTypeName()... | [
"protected",
"void",
"addTypeNamesTags",
"(",
"StringBuilder",
"resultString",
",",
"Result",
"result",
")",
"{",
"if",
"(",
"mergeTypeNamesTags",
")",
"{",
"// Produce a single tag with all the TypeName keys concatenated and all the values joined with '_'.",
"String",
"typeNameV... | Add the tag(s) for typeNames.
@param result - the result of the JMX query.
@param resultString - current form of the metric string.
@return String - the updated metric string with the necessary tag(s) added. | [
"Add",
"the",
"tag",
"(",
"s",
")",
"for",
"typeNames",
"."
] | train | https://github.com/jmxtrans/jmxtrans/blob/496f342de3bcf2c2226626374b7a16edf8f4ba2a/jmxtrans-output/jmxtrans-output-core/src/main/java/com/googlecode/jmxtrans/model/output/support/opentsdb/OpenTSDBMessageFormatter.java#L214-L228 |
sagiegurari/fax4j | src/main/java/org/fax4j/spi/LogFaxClientSpiInterceptor.java | LogFaxClientSpiInterceptor.onMethodInvocationError | public final void onMethodInvocationError(Method method,Object[] arguments,Throwable throwable) {
"""
This function is invoked by the fax client SPI proxy in of an error
while invoking the method in the fax client SPI itself.
@param method
The method invoked
@param arguments
The method arguments
@param... | java | public final void onMethodInvocationError(Method method,Object[] arguments,Throwable throwable)
{
this.logEvent(FaxClientSpiProxyEventType.ERROR_EVENT_TYPE,method,arguments,null,throwable);
} | [
"public",
"final",
"void",
"onMethodInvocationError",
"(",
"Method",
"method",
",",
"Object",
"[",
"]",
"arguments",
",",
"Throwable",
"throwable",
")",
"{",
"this",
".",
"logEvent",
"(",
"FaxClientSpiProxyEventType",
".",
"ERROR_EVENT_TYPE",
",",
"method",
",",
... | This function is invoked by the fax client SPI proxy in of an error
while invoking the method in the fax client SPI itself.
@param method
The method invoked
@param arguments
The method arguments
@param throwable
The throwable while invoking the method | [
"This",
"function",
"is",
"invoked",
"by",
"the",
"fax",
"client",
"SPI",
"proxy",
"in",
"of",
"an",
"error",
"while",
"invoking",
"the",
"method",
"in",
"the",
"fax",
"client",
"SPI",
"itself",
"."
] | train | https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/LogFaxClientSpiInterceptor.java#L191-L194 |
h2oai/h2o-3 | h2o-core/src/main/java/water/util/ReflectionUtils.java | ReflectionUtils.findActualFieldClass | public static Class findActualFieldClass(Class clz, Field f) {
"""
Reflection helper which returns the actual class for a field which has a parameterized type.
E.g., DeepLearningV2's "parameters" class is in parent ModelBuilderSchema, and is parameterized
by type parameter P.
"""
// schema.getClass().get... | java | public static Class findActualFieldClass(Class clz, Field f) {
// schema.getClass().getGenericSuperclass() instanceof ParameterizedType
Type generic_type = f.getGenericType();
if (! (generic_type instanceof TypeVariable))
return f.getType();
// field is a parameterized type
// ((TypeVariable)... | [
"public",
"static",
"Class",
"findActualFieldClass",
"(",
"Class",
"clz",
",",
"Field",
"f",
")",
"{",
"// schema.getClass().getGenericSuperclass() instanceof ParameterizedType",
"Type",
"generic_type",
"=",
"f",
".",
"getGenericType",
"(",
")",
";",
"if",
"(",
"!",
... | Reflection helper which returns the actual class for a field which has a parameterized type.
E.g., DeepLearningV2's "parameters" class is in parent ModelBuilderSchema, and is parameterized
by type parameter P. | [
"Reflection",
"helper",
"which",
"returns",
"the",
"actual",
"class",
"for",
"a",
"field",
"which",
"has",
"a",
"parameterized",
"type",
".",
"E",
".",
"g",
".",
"DeepLearningV2",
"s",
"parameters",
"class",
"is",
"in",
"parent",
"ModelBuilderSchema",
"and",
... | train | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/util/ReflectionUtils.java#L65-L94 |
alkacon/opencms-core | src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java | CmsDomUtil.getAncestor | public static Element getAncestor(Element element, String className) {
"""
Returns the given element or it's closest ancestor with the given class.<p>
Returns <code>null</code> if no appropriate element was found.<p>
@param element the element
@param className the class name
@return the matching element
... | java | public static Element getAncestor(Element element, String className) {
if (hasClass(className, element)) {
return element;
}
if (element.getTagName().equalsIgnoreCase(Tag.body.name())) {
return null;
}
return getAncestor(element.getParentElement(), classN... | [
"public",
"static",
"Element",
"getAncestor",
"(",
"Element",
"element",
",",
"String",
"className",
")",
"{",
"if",
"(",
"hasClass",
"(",
"className",
",",
"element",
")",
")",
"{",
"return",
"element",
";",
"}",
"if",
"(",
"element",
".",
"getTagName",
... | Returns the given element or it's closest ancestor with the given class.<p>
Returns <code>null</code> if no appropriate element was found.<p>
@param element the element
@param className the class name
@return the matching element | [
"Returns",
"the",
"given",
"element",
"or",
"it",
"s",
"closest",
"ancestor",
"with",
"the",
"given",
"class",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java#L1140-L1149 |
wildfly/wildfly-core | embedded/src/main/java/org/wildfly/core/embedded/EmbeddedProcessFactory.java | EmbeddedProcessFactory.createStandaloneServer | public static StandaloneServer createStandaloneServer(String jbossHomePath, String modulePath, String... systemPackages) {
"""
Create an embedded standalone server.
@param jbossHomePath the location of the root of server installation. Cannot be {@code null} or empty.
@param modulePath the location of the root ... | java | public static StandaloneServer createStandaloneServer(String jbossHomePath, String modulePath, String... systemPackages) {
return createStandaloneServer(jbossHomePath, modulePath, systemPackages, null);
} | [
"public",
"static",
"StandaloneServer",
"createStandaloneServer",
"(",
"String",
"jbossHomePath",
",",
"String",
"modulePath",
",",
"String",
"...",
"systemPackages",
")",
"{",
"return",
"createStandaloneServer",
"(",
"jbossHomePath",
",",
"modulePath",
",",
"systemPack... | Create an embedded standalone server.
@param jbossHomePath the location of the root of server installation. Cannot be {@code null} or empty.
@param modulePath the location of the root of the module repository. May be {@code null} if the standard
location under {@code jbossHomePath} should be used
@param systemPackages... | [
"Create",
"an",
"embedded",
"standalone",
"server",
"."
] | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/embedded/src/main/java/org/wildfly/core/embedded/EmbeddedProcessFactory.java#L92-L94 |
khuxtable/seaglass | src/main/java/com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java | SeaGlassSynthPainterImpl.paintArrowButtonBackground | public void paintArrowButtonBackground(SynthContext context, Graphics g, int x, int y, int w, int h) {
"""
Paints the background of an arrow button. Arrow buttons are created by
some components, such as <code>JScrollBar</code>.
@param context SynthContext identifying the <code>JComponent</code> and
<code>Regi... | java | public void paintArrowButtonBackground(SynthContext context, Graphics g, int x, int y, int w, int h) {
if (context.getComponent().getComponentOrientation().isLeftToRight()) {
paintBackground(context, g, x, y, w, h, null);
} else {
AffineTransform transform = new AffineTransform()... | [
"public",
"void",
"paintArrowButtonBackground",
"(",
"SynthContext",
"context",
",",
"Graphics",
"g",
",",
"int",
"x",
",",
"int",
"y",
",",
"int",
"w",
",",
"int",
"h",
")",
"{",
"if",
"(",
"context",
".",
"getComponent",
"(",
")",
".",
"getComponentOri... | Paints the background of an arrow button. Arrow buttons are created by
some components, such as <code>JScrollBar</code>.
@param context SynthContext identifying the <code>JComponent</code> and
<code>Region</code> to paint to
@param g <code>Graphics</code> to paint to
@param x X coordinate of the area to pa... | [
"Paints",
"the",
"background",
"of",
"an",
"arrow",
"button",
".",
"Arrow",
"buttons",
"are",
"created",
"by",
"some",
"components",
"such",
"as",
"<code",
">",
"JScrollBar<",
"/",
"code",
">",
"."
] | train | https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java#L332-L343 |
alkacon/opencms-core | src/org/opencms/ade/configuration/CmsConfigurationCache.java | CmsConfigurationCache.isSitemapConfiguration | @SuppressWarnings("deprecation")
protected boolean isSitemapConfiguration(String rootPath, int type) {
"""
Checks whether the given path/type combination belongs to a sitemap configuration.<p>
@param rootPath the root path
@param type the resource type id
@return true if the path/type belong to an acti... | java | @SuppressWarnings("deprecation")
protected boolean isSitemapConfiguration(String rootPath, int type) {
if (type == m_configType.getTypeId()) {
return rootPath.endsWith(CmsADEManager.CONFIG_SUFFIX);
} else {
return OpenCms.getResourceManager().matchResourceType(TYPE_SIT... | [
"@",
"SuppressWarnings",
"(",
"\"deprecation\"",
")",
"protected",
"boolean",
"isSitemapConfiguration",
"(",
"String",
"rootPath",
",",
"int",
"type",
")",
"{",
"if",
"(",
"type",
"==",
"m_configType",
".",
"getTypeId",
"(",
")",
")",
"{",
"return",
"rootPath"... | Checks whether the given path/type combination belongs to a sitemap configuration.<p>
@param rootPath the root path
@param type the resource type id
@return true if the path/type belong to an active sitemap configuration | [
"Checks",
"whether",
"the",
"given",
"path",
"/",
"type",
"combination",
"belongs",
"to",
"a",
"sitemap",
"configuration",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/configuration/CmsConfigurationCache.java#L462-L470 |
bekkopen/NoCommons | src/main/java/no/bekk/bekkopen/banking/Kidnummer.java | Kidnummer.mod11Kid | public static Kidnummer mod11Kid(String baseNumber, int targetLength) {
"""
Create a valid KID numer of the wanted length, using MOD11.
Input is padded with leading zeros to reach wanted target length
@param baseNumber base number to calculate checksum digit for
@param targetLength wanted length, 0-padded. Betw... | java | public static Kidnummer mod11Kid(String baseNumber, int targetLength) {
if (baseNumber.length() >= targetLength)
throw new IllegalArgumentException("baseNumber too long");
String padded = String.format("%0" + (targetLength-1) + "d", new BigInteger(baseNumber));
Kidnummer k = new ... | [
"public",
"static",
"Kidnummer",
"mod11Kid",
"(",
"String",
"baseNumber",
",",
"int",
"targetLength",
")",
"{",
"if",
"(",
"baseNumber",
".",
"length",
"(",
")",
">=",
"targetLength",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"baseNumber too long\"",... | Create a valid KID numer of the wanted length, using MOD11.
Input is padded with leading zeros to reach wanted target length
@param baseNumber base number to calculate checksum digit for
@param targetLength wanted length, 0-padded. Between 2-25
@return Kidnummer | [
"Create",
"a",
"valid",
"KID",
"numer",
"of",
"the",
"wanted",
"length",
"using",
"MOD11",
".",
"Input",
"is",
"padded",
"with",
"leading",
"zeros",
"to",
"reach",
"wanted",
"target",
"length"
] | train | https://github.com/bekkopen/NoCommons/blob/5a576696390cecaac111fa97fde581e0c1afb9b8/src/main/java/no/bekk/bekkopen/banking/Kidnummer.java#L60-L66 |
Azure/azure-sdk-for-java | automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ActivitysInner.java | ActivitysInner.getAsync | public Observable<ActivityInner> getAsync(String resourceGroupName, String automationAccountName, String moduleName, String activityName) {
"""
Retrieve the activity in the module identified by module name and activity name.
@param resourceGroupName Name of an Azure Resource group.
@param automationAccountName... | java | public Observable<ActivityInner> getAsync(String resourceGroupName, String automationAccountName, String moduleName, String activityName) {
return getWithServiceResponseAsync(resourceGroupName, automationAccountName, moduleName, activityName).map(new Func1<ServiceResponse<ActivityInner>, ActivityInner>() {
... | [
"public",
"Observable",
"<",
"ActivityInner",
">",
"getAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"automationAccountName",
",",
"String",
"moduleName",
",",
"String",
"activityName",
")",
"{",
"return",
"getWithServiceResponseAsync",
"(",
"resourceGroupN... | Retrieve the activity in the module identified by module name and activity name.
@param resourceGroupName Name of an Azure Resource group.
@param automationAccountName The name of the automation account.
@param moduleName The name of module.
@param activityName The name of activity.
@throws IllegalArgumentException th... | [
"Retrieve",
"the",
"activity",
"in",
"the",
"module",
"identified",
"by",
"module",
"name",
"and",
"activity",
"name",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ActivitysInner.java#L115-L122 |
ltearno/hexa.tools | hexa.core/src/main/java/fr/lteconsulting/hexa/linker/AppCacheLinker.java | AppCacheLinker.emitLandingPageCacheManifest | @SuppressWarnings( "rawtypes" )
private Artifact<?> emitLandingPageCacheManifest( LinkerContext context, TreeLogger logger, ArtifactSet artifacts ) throws UnableToCompleteException {
"""
Creates the cache-manifest resource specific for the landing page.
@param context
the linker environment
@param logger
th... | java | @SuppressWarnings( "rawtypes" )
private Artifact<?> emitLandingPageCacheManifest( LinkerContext context, TreeLogger logger, ArtifactSet artifacts ) throws UnableToCompleteException
{
StringBuilder publicSourcesSb = new StringBuilder();
StringBuilder staticResoucesSb = new StringBuilder();
if( artifacts != null... | [
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"private",
"Artifact",
"<",
"?",
">",
"emitLandingPageCacheManifest",
"(",
"LinkerContext",
"context",
",",
"TreeLogger",
"logger",
",",
"ArtifactSet",
"artifacts",
")",
"throws",
"UnableToCompleteException",
"{",
"St... | Creates the cache-manifest resource specific for the landing page.
@param context
the linker environment
@param logger
the tree logger to record to
@param artifacts
{@code null} to generate an empty cache manifest | [
"Creates",
"the",
"cache",
"-",
"manifest",
"resource",
"specific",
"for",
"the",
"landing",
"page",
"."
] | train | https://github.com/ltearno/hexa.tools/blob/604c804901b1bb13fe10b3823cc4a639f8993363/hexa.core/src/main/java/fr/lteconsulting/hexa/linker/AppCacheLinker.java#L106-L169 |
actorapp/actor-platform | actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java | ImageLoading.saveHq | public static byte[] saveHq(Bitmap src) throws ImageSaveException {
"""
Saving image in jpeg to byte array with better quality 90
@param src source image
@return saved data
@throws ImageSaveException if it is unable to save image
"""
return save(src, Bitmap.CompressFormat.JPEG, JPEG_QUALITY_HQ);
... | java | public static byte[] saveHq(Bitmap src) throws ImageSaveException {
return save(src, Bitmap.CompressFormat.JPEG, JPEG_QUALITY_HQ);
} | [
"public",
"static",
"byte",
"[",
"]",
"saveHq",
"(",
"Bitmap",
"src",
")",
"throws",
"ImageSaveException",
"{",
"return",
"save",
"(",
"src",
",",
"Bitmap",
".",
"CompressFormat",
".",
"JPEG",
",",
"JPEG_QUALITY_HQ",
")",
";",
"}"
] | Saving image in jpeg to byte array with better quality 90
@param src source image
@return saved data
@throws ImageSaveException if it is unable to save image | [
"Saving",
"image",
"in",
"jpeg",
"to",
"byte",
"array",
"with",
"better",
"quality",
"90"
] | train | https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java#L254-L256 |
DDTH/ddth-tsc | ddth-tsc-core/src/main/java/com/github/ddth/tsc/redis/ShardedRedisCounterFactory.java | ShardedRedisCounterFactory.newJedisPool | public static ShardedJedisPool newJedisPool(String hostsAndPorts, String password) {
"""
Creates a new {@link ShardedJedisPool}, with default timeout.
@param hostsAndPorts
format {@code host1:port1,host2:port2...}
@param password
@return
"""
return newJedisPool(hostsAndPorts, password, DEFAULT_TI... | java | public static ShardedJedisPool newJedisPool(String hostsAndPorts, String password) {
return newJedisPool(hostsAndPorts, password, DEFAULT_TIMEOUT_MS);
} | [
"public",
"static",
"ShardedJedisPool",
"newJedisPool",
"(",
"String",
"hostsAndPorts",
",",
"String",
"password",
")",
"{",
"return",
"newJedisPool",
"(",
"hostsAndPorts",
",",
"password",
",",
"DEFAULT_TIMEOUT_MS",
")",
";",
"}"
] | Creates a new {@link ShardedJedisPool}, with default timeout.
@param hostsAndPorts
format {@code host1:port1,host2:port2...}
@param password
@return | [
"Creates",
"a",
"new",
"{",
"@link",
"ShardedJedisPool",
"}",
"with",
"default",
"timeout",
"."
] | train | https://github.com/DDTH/ddth-tsc/blob/d233c304c8fed2f3c069de42a36b7bbd5c8be01b/ddth-tsc-core/src/main/java/com/github/ddth/tsc/redis/ShardedRedisCounterFactory.java#L39-L41 |
DataSketches/sketches-core | src/main/java/com/yahoo/sketches/quantiles/ItemsSketch.java | ItemsSketch.getQuantileLowerBound | public T getQuantileLowerBound(final double fraction) {
"""
Gets the lower bound of the value interval in which the true quantile of the given rank
exists with a confidence of at least 99%.
@param fraction the given normalized rank as a fraction
@return the lower bound of the value interval in which the true qu... | java | public T getQuantileLowerBound(final double fraction) {
return getQuantile(max(0, fraction - Util.getNormalizedRankError(k_, false)));
} | [
"public",
"T",
"getQuantileLowerBound",
"(",
"final",
"double",
"fraction",
")",
"{",
"return",
"getQuantile",
"(",
"max",
"(",
"0",
",",
"fraction",
"-",
"Util",
".",
"getNormalizedRankError",
"(",
"k_",
",",
"false",
")",
")",
")",
";",
"}"
] | Gets the lower bound of the value interval in which the true quantile of the given rank
exists with a confidence of at least 99%.
@param fraction the given normalized rank as a fraction
@return the lower bound of the value interval in which the true quantile of the given rank
exists with a confidence of at least 99%. R... | [
"Gets",
"the",
"lower",
"bound",
"of",
"the",
"value",
"interval",
"in",
"which",
"the",
"true",
"quantile",
"of",
"the",
"given",
"rank",
"exists",
"with",
"a",
"confidence",
"of",
"at",
"least",
"99%",
"."
] | train | https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/quantiles/ItemsSketch.java#L293-L295 |
TheCoder4eu/BootsFaces-OSP | src/main/java/net/bootsfaces/component/row/RowRenderer.java | RowRenderer.encodeEnd | @Override
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
"""
This methods generates the HTML code of the current b:row.
<code>encodeBegin</code> generates the start of the component. After the,
the JSF framework calls <code>encodeChildren()</code> to generate the
HTML c... | java | @Override
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
if (!component.isRendered()) {
return;
}
// Row row = (Row) component;
ResponseWriter rw = context.getResponseWriter();
endDisabledFieldset((IContentDisabled)component, rw);
rw.endElement("div");
} | [
"@",
"Override",
"public",
"void",
"encodeEnd",
"(",
"FacesContext",
"context",
",",
"UIComponent",
"component",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"component",
".",
"isRendered",
"(",
")",
")",
"{",
"return",
";",
"}",
"// Row row = (Row) comp... | This methods generates the HTML code of the current b:row.
<code>encodeBegin</code> generates the start of the component. After the,
the JSF framework calls <code>encodeChildren()</code> to generate the
HTML code between the beginning and the end of the component. For
instance, in the case of a panel component the cont... | [
"This",
"methods",
"generates",
"the",
"HTML",
"code",
"of",
"the",
"current",
"b",
":",
"row",
".",
"<code",
">",
"encodeBegin<",
"/",
"code",
">",
"generates",
"the",
"start",
"of",
"the",
"component",
".",
"After",
"the",
"the",
"JSF",
"framework",
"c... | train | https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/row/RowRenderer.java#L98-L107 |
virgo47/javasimon | core/src/main/java/org/javasimon/callback/quantiles/QuantilesCallback.java | QuantilesCallback.onStopwatchStop | @Override
public void onStopwatchStop(Split split, StopwatchSample sample) {
"""
When a split is stopped, if buckets have been initialized, the value
is added to appropriate bucket.
"""
onStopwatchSplit(split.getStopwatch(), split);
} | java | @Override
public void onStopwatchStop(Split split, StopwatchSample sample) {
onStopwatchSplit(split.getStopwatch(), split);
} | [
"@",
"Override",
"public",
"void",
"onStopwatchStop",
"(",
"Split",
"split",
",",
"StopwatchSample",
"sample",
")",
"{",
"onStopwatchSplit",
"(",
"split",
".",
"getStopwatch",
"(",
")",
",",
"split",
")",
";",
"}"
] | When a split is stopped, if buckets have been initialized, the value
is added to appropriate bucket. | [
"When",
"a",
"split",
"is",
"stopped",
"if",
"buckets",
"have",
"been",
"initialized",
"the",
"value",
"is",
"added",
"to",
"appropriate",
"bucket",
"."
] | train | https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/callback/quantiles/QuantilesCallback.java#L157-L160 |
btrplace/scheduler | json/src/main/java/org/btrplace/json/model/constraint/ConstraintsConverter.java | ConstraintsConverter.fromJSON | public Constraint fromJSON(Model mo, JSONObject in) throws JSONConverterException {
"""
Convert a json-encoded constraint.
@param mo the model to rely on
@param in the constraint to decode
@return the resulting constraint
@throws JSONConverterException if the conversion failed
"""
checkKeys(in, "... | java | public Constraint fromJSON(Model mo, JSONObject in) throws JSONConverterException {
checkKeys(in, "id");
Object id = in.get("id");
ConstraintConverter<? extends Constraint> c = json2java.get(id.toString());
if (c == null) {
throw new JSONConverterException("No converter avail... | [
"public",
"Constraint",
"fromJSON",
"(",
"Model",
"mo",
",",
"JSONObject",
"in",
")",
"throws",
"JSONConverterException",
"{",
"checkKeys",
"(",
"in",
",",
"\"id\"",
")",
";",
"Object",
"id",
"=",
"in",
".",
"get",
"(",
"\"id\"",
")",
";",
"ConstraintConve... | Convert a json-encoded constraint.
@param mo the model to rely on
@param in the constraint to decode
@return the resulting constraint
@throws JSONConverterException if the conversion failed | [
"Convert",
"a",
"json",
"-",
"encoded",
"constraint",
"."
] | train | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/model/constraint/ConstraintsConverter.java#L140-L148 |
tzaeschke/zoodb | src/org/zoodb/internal/util/ReflTools.java | ReflTools.getValue | public static final Object getValue(Object obj, String fieldName) {
"""
Read the value of the field <tt>fieldName</tt> of object <tt>obj</tt>.
@param obj The object
@param fieldName The field name
@return the value of the field.
"""
try {
return getField(obj.getClass(), fieldName).get(ob... | java | public static final Object getValue(Object obj, String fieldName) {
try {
return getField(obj.getClass(), fieldName).get(obj);
} catch (IllegalArgumentException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e) {
throw new RuntimeException... | [
"public",
"static",
"final",
"Object",
"getValue",
"(",
"Object",
"obj",
",",
"String",
"fieldName",
")",
"{",
"try",
"{",
"return",
"getField",
"(",
"obj",
".",
"getClass",
"(",
")",
",",
"fieldName",
")",
".",
"get",
"(",
"obj",
")",
";",
"}",
"cat... | Read the value of the field <tt>fieldName</tt> of object <tt>obj</tt>.
@param obj The object
@param fieldName The field name
@return the value of the field. | [
"Read",
"the",
"value",
"of",
"the",
"field",
"<tt",
">",
"fieldName<",
"/",
"tt",
">",
"of",
"object",
"<tt",
">",
"obj<",
"/",
"tt",
">",
"."
] | train | https://github.com/tzaeschke/zoodb/blob/058d0ff161a8ee9d53244c433aca97ee9c654410/src/org/zoodb/internal/util/ReflTools.java#L102-L110 |
flow/commons | src/main/java/com/flowpowered/commons/store/block/impl/AtomicShortIntArray.java | AtomicShortIntArray.uncompressedSet | public void uncompressedSet(int[] initial) {
"""
Sets the array equal to the given array without automatically compressing the data. The array should be the same length as this array
@param initial the array containing the new values
"""
resizeLock.lock();
try {
if (initial.lengt... | java | public void uncompressedSet(int[] initial) {
resizeLock.lock();
try {
if (initial.length != length) {
throw new IllegalArgumentException("Array length mismatch, expected " + length + ", got " + initial.length);
}
store.set(new AtomicShortIntDirectBacki... | [
"public",
"void",
"uncompressedSet",
"(",
"int",
"[",
"]",
"initial",
")",
"{",
"resizeLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"if",
"(",
"initial",
".",
"length",
"!=",
"length",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Array... | Sets the array equal to the given array without automatically compressing the data. The array should be the same length as this array
@param initial the array containing the new values | [
"Sets",
"the",
"array",
"equal",
"to",
"the",
"given",
"array",
"without",
"automatically",
"compressing",
"the",
"data",
".",
"The",
"array",
"should",
"be",
"the",
"same",
"length",
"as",
"this",
"array"
] | train | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/store/block/impl/AtomicShortIntArray.java#L169-L179 |
liferay/com-liferay-commerce | commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java | CommerceNotificationTemplatePersistenceImpl.findByGroupId | @Override
public List<CommerceNotificationTemplate> findByGroupId(long groupId) {
"""
Returns all the commerce notification templates where groupId = ?.
@param groupId the group ID
@return the matching commerce notification templates
"""
return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL... | java | @Override
public List<CommerceNotificationTemplate> findByGroupId(long groupId) {
return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
} | [
"@",
"Override",
"public",
"List",
"<",
"CommerceNotificationTemplate",
">",
"findByGroupId",
"(",
"long",
"groupId",
")",
"{",
"return",
"findByGroupId",
"(",
"groupId",
",",
"QueryUtil",
".",
"ALL_POS",
",",
"QueryUtil",
".",
"ALL_POS",
",",
"null",
")",
";"... | Returns all the commerce notification templates where groupId = ?.
@param groupId the group ID
@return the matching commerce notification templates | [
"Returns",
"all",
"the",
"commerce",
"notification",
"templates",
"where",
"groupId",
"=",
"?",
";",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java#L1544-L1547 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.