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 |
|---|---|---|---|---|---|---|---|---|---|---|
aws/aws-sdk-java | aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/StartBulkDeploymentRequest.java | StartBulkDeploymentRequest.withTags | public StartBulkDeploymentRequest withTags(java.util.Map<String, String> tags) {
"""
Tag(s) to add to the new resource
@param tags
Tag(s) to add to the new resource
@return Returns a reference to this object so that method calls can be chained together.
"""
setTags(tags);
return this;
... | java | public StartBulkDeploymentRequest withTags(java.util.Map<String, String> tags) {
setTags(tags);
return this;
} | [
"public",
"StartBulkDeploymentRequest",
"withTags",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"tags",
")",
"{",
"setTags",
"(",
"tags",
")",
";",
"return",
"this",
";",
"}"
] | Tag(s) to add to the new resource
@param tags
Tag(s) to add to the new resource
@return Returns a reference to this object so that method calls can be chained together. | [
"Tag",
"(",
"s",
")",
"to",
"add",
"to",
"the",
"new",
"resource"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/StartBulkDeploymentRequest.java#L207-L210 |
gallandarakhneorg/afc | core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphPath.java | GraphPath.removeAfter | public boolean removeAfter(ST obj, PT pt) {
"""
Remove the path's elements after the
specified one which is starting
at the specified point. The specified element will
not be removed.
<p>This function removes after the <i>first occurence</i>
of the given object.
@param obj is the segment to remove
@para... | java | public boolean removeAfter(ST obj, PT pt) {
return removeAfter(indexOf(obj, pt), false);
} | [
"public",
"boolean",
"removeAfter",
"(",
"ST",
"obj",
",",
"PT",
"pt",
")",
"{",
"return",
"removeAfter",
"(",
"indexOf",
"(",
"obj",
",",
"pt",
")",
",",
"false",
")",
";",
"}"
] | Remove the path's elements after the
specified one which is starting
at the specified point. The specified element will
not be removed.
<p>This function removes after the <i>first occurence</i>
of the given object.
@param obj is the segment to remove
@param pt is the point on which the segment was connected
as its fi... | [
"Remove",
"the",
"path",
"s",
"elements",
"after",
"the",
"specified",
"one",
"which",
"is",
"starting",
"at",
"the",
"specified",
"point",
".",
"The",
"specified",
"element",
"will",
"not",
"be",
"removed",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphPath.java#L778-L780 |
pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/InputUtils.java | InputUtils.setClassName | public static void setClassName(Map<String, Object> map, String className) {
"""
InputHandler converts every object into Map.
Sets Class name of object from which this Map was created.
@param map Map which would store Class name
@param className Class name
"""
String processedClassName = cl... | java | public static void setClassName(Map<String, Object> map, String className) {
String processedClassName = className;
if (processedClassName != null) {
// it is highly unlikely that class name would contain ".", but we are cleaning it just in case
processedClassName = processedCl... | [
"public",
"static",
"void",
"setClassName",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"map",
",",
"String",
"className",
")",
"{",
"String",
"processedClassName",
"=",
"className",
";",
"if",
"(",
"processedClassName",
"!=",
"null",
")",
"{",
"// it is ... | InputHandler converts every object into Map.
Sets Class name of object from which this Map was created.
@param map Map which would store Class name
@param className Class name | [
"InputHandler",
"converts",
"every",
"object",
"into",
"Map",
".",
"Sets",
"Class",
"name",
"of",
"object",
"from",
"which",
"this",
"Map",
"was",
"created",
"."
] | train | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/InputUtils.java#L75-L85 |
liferay/com-liferay-commerce | commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java | CPInstancePersistenceImpl.findByC_ERC | @Override
public CPInstance findByC_ERC(long companyId, String externalReferenceCode)
throws NoSuchCPInstanceException {
"""
Returns the cp instance where companyId = ? and externalReferenceCode = ? or throws a {@link NoSuchCPInstanceException} if it could not be found.
@param companyId the company I... | java | @Override
public CPInstance findByC_ERC(long companyId, String externalReferenceCode)
throws NoSuchCPInstanceException {
CPInstance cpInstance = fetchByC_ERC(companyId, externalReferenceCode);
if (cpInstance == null) {
StringBundler msg = new StringBundler(6);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
ms... | [
"@",
"Override",
"public",
"CPInstance",
"findByC_ERC",
"(",
"long",
"companyId",
",",
"String",
"externalReferenceCode",
")",
"throws",
"NoSuchCPInstanceException",
"{",
"CPInstance",
"cpInstance",
"=",
"fetchByC_ERC",
"(",
"companyId",
",",
"externalReferenceCode",
")... | Returns the cp instance where companyId = ? and externalReferenceCode = ? or throws a {@link NoSuchCPInstanceException} if it could not be found.
@param companyId the company ID
@param externalReferenceCode the external reference code
@return the matching cp instance
@throws NoSuchCPInstanceException if a matc... | [
"Returns",
"the",
"cp",
"instance",
"where",
"companyId",
"=",
"?",
";",
"and",
"externalReferenceCode",
"=",
"?",
";",
"or",
"throws",
"a",
"{",
"@link",
"NoSuchCPInstanceException",
"}",
"if",
"it",
"could",
"not",
"be",
"found",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java#L6826-L6852 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterProperty.java | UCharacterProperty.getAdditional | public int getAdditional(int codepoint, int column) {
"""
Gets the unicode additional properties.
Java version of C u_getUnicodeProperties().
@param codepoint codepoint whose additional properties is to be
retrieved
@param column The column index.
@return unicode properties
"""
assert column >= 0;... | java | public int getAdditional(int codepoint, int column) {
assert column >= 0;
if (column >= m_additionalColumnsCount_) {
return 0;
}
return m_additionalVectors_[m_additionalTrie_.get(codepoint) + column];
} | [
"public",
"int",
"getAdditional",
"(",
"int",
"codepoint",
",",
"int",
"column",
")",
"{",
"assert",
"column",
">=",
"0",
";",
"if",
"(",
"column",
">=",
"m_additionalColumnsCount_",
")",
"{",
"return",
"0",
";",
"}",
"return",
"m_additionalVectors_",
"[",
... | Gets the unicode additional properties.
Java version of C u_getUnicodeProperties().
@param codepoint codepoint whose additional properties is to be
retrieved
@param column The column index.
@return unicode properties | [
"Gets",
"the",
"unicode",
"additional",
"properties",
".",
"Java",
"version",
"of",
"C",
"u_getUnicodeProperties",
"()",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterProperty.java#L130-L136 |
micrometer-metrics/micrometer | micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jpa/HibernateMetrics.java | HibernateMetrics.monitor | public static void monitor(MeterRegistry registry, SessionFactory sessionFactory, String sessionFactoryName, String... tags) {
"""
Create {@code HibernateMetrics} and bind to the specified meter registry.
@param registry meter registry to use
@param sessionFactory session factory to use
@param sessionFactoryN... | java | public static void monitor(MeterRegistry registry, SessionFactory sessionFactory, String sessionFactoryName, String... tags) {
monitor(registry, sessionFactory, sessionFactoryName, Tags.of(tags));
} | [
"public",
"static",
"void",
"monitor",
"(",
"MeterRegistry",
"registry",
",",
"SessionFactory",
"sessionFactory",
",",
"String",
"sessionFactoryName",
",",
"String",
"...",
"tags",
")",
"{",
"monitor",
"(",
"registry",
",",
"sessionFactory",
",",
"sessionFactoryName... | Create {@code HibernateMetrics} and bind to the specified meter registry.
@param registry meter registry to use
@param sessionFactory session factory to use
@param sessionFactoryName session factory name as a tag value
@param tags additional tags | [
"Create",
"{",
"@code",
"HibernateMetrics",
"}",
"and",
"bind",
"to",
"the",
"specified",
"meter",
"registry",
"."
] | train | https://github.com/micrometer-metrics/micrometer/blob/127fa3265325cc894f368312ed8890b76a055d88/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jpa/HibernateMetrics.java#L58-L60 |
lessthanoptimal/ejml | main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java | CommonOps_ZDRM.elementDivide | public static void elementDivide(ZMatrixD1 input , double real , double imaginary, ZMatrixD1 output ) {
"""
<p>Performs element by element division operation with a complex number on the right<br>
<br>
output<sub>ij</sub> = input<sub>ij</sub> / (real + imaginary*i) <br>
</p>
@param input The left matrix in th... | java | public static void elementDivide(ZMatrixD1 input , double real , double imaginary, ZMatrixD1 output )
{
if( input.numCols != output.numCols || input.numRows != output.numRows ) {
throw new IllegalArgumentException("The 'input' and 'output' matrices do not have compatible dimensions");
}
... | [
"public",
"static",
"void",
"elementDivide",
"(",
"ZMatrixD1",
"input",
",",
"double",
"real",
",",
"double",
"imaginary",
",",
"ZMatrixD1",
"output",
")",
"{",
"if",
"(",
"input",
".",
"numCols",
"!=",
"output",
".",
"numCols",
"||",
"input",
".",
"numRow... | <p>Performs element by element division operation with a complex number on the right<br>
<br>
output<sub>ij</sub> = input<sub>ij</sub> / (real + imaginary*i) <br>
</p>
@param input The left matrix in the multiplication operation. Not modified.
@param real Real component of the number it is multiplied by
@param imagina... | [
"<p",
">",
"Performs",
"element",
"by",
"element",
"division",
"operation",
"with",
"a",
"complex",
"number",
"on",
"the",
"right<br",
">",
"<br",
">",
"output<sub",
">",
"ij<",
"/",
"sub",
">",
"=",
"input<sub",
">",
"ij<",
"/",
"sub",
">",
"/",
"(",
... | train | https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java#L962-L978 |
Netflix/conductor | mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/Query.java | Query.executeAndFetch | public <V> List<V> executeAndFetch(Class<V> returnType) {
"""
Execute the PreparedStatement and return a List of {@literal returnType} values from the ResultSet.
@param returnType The type Class return a List of.
@param <V> The type parameter to return a List of.
@return A {@code List<returnType>}.
@throws... | java | public <V> List<V> executeAndFetch(Class<V> returnType) {
try (ResultSet rs = executeQuery()) {
List<V> list = new ArrayList<>();
while (rs.next()) {
list.add(convert(rs.getObject(1), returnType));
}
return list;
} catch (SQLException ex) {... | [
"public",
"<",
"V",
">",
"List",
"<",
"V",
">",
"executeAndFetch",
"(",
"Class",
"<",
"V",
">",
"returnType",
")",
"{",
"try",
"(",
"ResultSet",
"rs",
"=",
"executeQuery",
"(",
")",
")",
"{",
"List",
"<",
"V",
">",
"list",
"=",
"new",
"ArrayList",
... | Execute the PreparedStatement and return a List of {@literal returnType} values from the ResultSet.
@param returnType The type Class return a List of.
@param <V> The type parameter to return a List of.
@return A {@code List<returnType>}.
@throws ApplicationException {@literal returnType} is unsupported, cannot be cas... | [
"Execute",
"the",
"PreparedStatement",
"and",
"return",
"a",
"List",
"of",
"{",
"@literal",
"returnType",
"}",
"values",
"from",
"the",
"ResultSet",
"."
] | train | https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/Query.java#L399-L409 |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/DynamicRespondrSkinViewController.java | DynamicRespondrSkinViewController.calculateDynamicSkinUrlPathToUse | private String calculateDynamicSkinUrlPathToUse(PortletRequest request, String lessfileBaseName)
throws IOException {
"""
Calculate the default skin URL path or the path to a skin CSS file that is specific to the
set of portlet preference values currently defined.
@param request
@return
@throws I... | java | private String calculateDynamicSkinUrlPathToUse(PortletRequest request, String lessfileBaseName)
throws IOException {
final DynamicSkinInstanceData data = new DefaultDynamicSkinInstanceDataImpl(request);
if (!service.skinCssFileExists(data)) {
// Trigger the LESS compilation
... | [
"private",
"String",
"calculateDynamicSkinUrlPathToUse",
"(",
"PortletRequest",
"request",
",",
"String",
"lessfileBaseName",
")",
"throws",
"IOException",
"{",
"final",
"DynamicSkinInstanceData",
"data",
"=",
"new",
"DefaultDynamicSkinInstanceDataImpl",
"(",
"request",
")"... | Calculate the default skin URL path or the path to a skin CSS file that is specific to the
set of portlet preference values currently defined.
@param request
@return
@throws IOException | [
"Calculate",
"the",
"default",
"skin",
"URL",
"path",
"or",
"the",
"path",
"to",
"a",
"skin",
"CSS",
"file",
"that",
"is",
"specific",
"to",
"the",
"set",
"of",
"portlet",
"preference",
"values",
"currently",
"defined",
"."
] | train | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/DynamicRespondrSkinViewController.java#L137-L145 |
pwall567/jsonutil | src/main/java/net/pwall/json/JSON.java | JSON.parseObject | public static JSONObject parseObject(InputStream is, String csName) throws IOException {
"""
Parse a sequence of characters from an {@link InputStream} as a JSON object, specifying
the character set by name.
@param is the {@link InputStream}
@param csName the character set name
@return the... | java | public static JSONObject parseObject(InputStream is, String csName) throws IOException {
return (JSONObject)parse(is, csName);
} | [
"public",
"static",
"JSONObject",
"parseObject",
"(",
"InputStream",
"is",
",",
"String",
"csName",
")",
"throws",
"IOException",
"{",
"return",
"(",
"JSONObject",
")",
"parse",
"(",
"is",
",",
"csName",
")",
";",
"}"
] | Parse a sequence of characters from an {@link InputStream} as a JSON object, specifying
the character set by name.
@param is the {@link InputStream}
@param csName the character set name
@return the JSON object
@throws JSONException if the stream does not contain a valid JSON value
@throws IOExcept... | [
"Parse",
"a",
"sequence",
"of",
"characters",
"from",
"an",
"{",
"@link",
"InputStream",
"}",
"as",
"a",
"JSON",
"object",
"specifying",
"the",
"character",
"set",
"by",
"name",
"."
] | train | https://github.com/pwall567/jsonutil/blob/dd5960b9b0bcc9acfe6c52b884fffd9ee5f422fe/src/main/java/net/pwall/json/JSON.java#L438-L440 |
Harium/keel | src/main/java/com/harium/keel/catalano/math/transform/FourierTransform.java | FourierTransform.transformBluestein | private static void transformBluestein(double[] real, double[] imag) {
"""
/*
Computes the discrete Fourier transform (DFT) of the given complex vector, storing the result back into the vector.
The vector can have any length. This requires the convolution function, which in turn requires the radix-2 FFT function... | java | private static void transformBluestein(double[] real, double[] imag) {
int n = real.length;
int m = Integer.highestOneBit(n * 2 + 1) << 1;
// Trignometric tables
double[] cosTable = new double[n];
double[] sinTable = new double[n];
for (int i = 0; i < n; i++) {
... | [
"private",
"static",
"void",
"transformBluestein",
"(",
"double",
"[",
"]",
"real",
",",
"double",
"[",
"]",
"imag",
")",
"{",
"int",
"n",
"=",
"real",
".",
"length",
";",
"int",
"m",
"=",
"Integer",
".",
"highestOneBit",
"(",
"n",
"*",
"2",
"+",
"... | /*
Computes the discrete Fourier transform (DFT) of the given complex vector, storing the result back into the vector.
The vector can have any length. This requires the convolution function, which in turn requires the radix-2 FFT function.
Uses Bluestein's chirp z-transform algorithm. | [
"/",
"*",
"Computes",
"the",
"discrete",
"Fourier",
"transform",
"(",
"DFT",
")",
"of",
"the",
"given",
"complex",
"vector",
"storing",
"the",
"result",
"back",
"into",
"the",
"vector",
".",
"The",
"vector",
"can",
"have",
"any",
"length",
".",
"This",
"... | train | https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/transform/FourierTransform.java#L303-L342 |
SonarSource/sonarqube | server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertiesDao.java | PropertiesDao.saveProperty | public void saveProperty(DbSession session, PropertyDto property) {
"""
Saves the specified property and its value.
<p>
If {@link PropertyDto#getValue()} is {@code null} or empty, the properties is persisted as empty.
</p>
@throws IllegalArgumentException if {@link PropertyDto#getKey()} is {@code null} or em... | java | public void saveProperty(DbSession session, PropertyDto property) {
save(getMapper(session), property.getKey(), property.getUserId(), property.getResourceId(), property.getValue());
} | [
"public",
"void",
"saveProperty",
"(",
"DbSession",
"session",
",",
"PropertyDto",
"property",
")",
"{",
"save",
"(",
"getMapper",
"(",
"session",
")",
",",
"property",
".",
"getKey",
"(",
")",
",",
"property",
".",
"getUserId",
"(",
")",
",",
"property",
... | Saves the specified property and its value.
<p>
If {@link PropertyDto#getValue()} is {@code null} or empty, the properties is persisted as empty.
</p>
@throws IllegalArgumentException if {@link PropertyDto#getKey()} is {@code null} or empty | [
"Saves",
"the",
"specified",
"property",
"and",
"its",
"value",
".",
"<p",
">",
"If",
"{",
"@link",
"PropertyDto#getValue",
"()",
"}",
"is",
"{",
"@code",
"null",
"}",
"or",
"empty",
"the",
"properties",
"is",
"persisted",
"as",
"empty",
".",
"<",
"/",
... | train | https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertiesDao.java#L202-L204 |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/TransactionUrl.java | TransactionUrl.removeTransactionUrl | public static MozuUrl removeTransactionUrl(Integer accountId, String transactionId) {
"""
Get Resource Url for RemoveTransaction
@param accountId Unique identifier of the customer account.
@param transactionId Unique identifier of the transaction to delete.
@return String Resource Url
"""
UrlFormatter ... | java | public static MozuUrl removeTransactionUrl(Integer accountId, String transactionId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/transactions/{transactionId}");
formatter.formatUrl("accountId", accountId);
formatter.formatUrl("transactionId", transactionId);
ret... | [
"public",
"static",
"MozuUrl",
"removeTransactionUrl",
"(",
"Integer",
"accountId",
",",
"String",
"transactionId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/accounts/{accountId}/transactions/{transactionId}\"",
")",
";"... | Get Resource Url for RemoveTransaction
@param accountId Unique identifier of the customer account.
@param transactionId Unique identifier of the transaction to delete.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"RemoveTransaction"
] | train | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/TransactionUrl.java#L48-L54 |
hector-client/hector | core/src/main/java/me/prettyprint/hector/api/factory/HFactory.java | HFactory.createKeyspace | public static Keyspace createKeyspace(String keyspace, Cluster cluster) {
"""
Creates a Keyspace with the default consistency level policy.
Example usage.
String clusterName = "Test Cluster";
String host = "localhost:9160";
Cluster cluster = HFactory.getOrCreateCluster(clusterName, host);
String keyspaceN... | java | public static Keyspace createKeyspace(String keyspace, Cluster cluster) {
return createKeyspace(keyspace, cluster,
createDefaultConsistencyLevelPolicy(),
FailoverPolicy.ON_FAIL_TRY_ALL_AVAILABLE);
} | [
"public",
"static",
"Keyspace",
"createKeyspace",
"(",
"String",
"keyspace",
",",
"Cluster",
"cluster",
")",
"{",
"return",
"createKeyspace",
"(",
"keyspace",
",",
"cluster",
",",
"createDefaultConsistencyLevelPolicy",
"(",
")",
",",
"FailoverPolicy",
".",
"ON_FAIL_... | Creates a Keyspace with the default consistency level policy.
Example usage.
String clusterName = "Test Cluster";
String host = "localhost:9160";
Cluster cluster = HFactory.getOrCreateCluster(clusterName, host);
String keyspaceName = "testKeyspace";
Keyspace myKeyspace = HFactory.createKeyspace(keyspaceName, cluster)... | [
"Creates",
"a",
"Keyspace",
"with",
"the",
"default",
"consistency",
"level",
"policy",
"."
] | train | https://github.com/hector-client/hector/blob/a302e68ca8d91b45d332e8c9afd7d98030b54de1/core/src/main/java/me/prettyprint/hector/api/factory/HFactory.java#L240-L244 |
Netflix/ribbon | ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/reactive/ExecutionContextListenerInvoker.java | ExecutionContextListenerInvoker.onExecutionSuccess | public void onExecutionSuccess(ExecutionContext<I> context, O response, ExecutionInfo info) {
"""
Called when the request is executed successfully on the server
@param response Object received from the execution
"""
for (ExecutionListener<I, O> listener: listeners) {
try {
... | java | public void onExecutionSuccess(ExecutionContext<I> context, O response, ExecutionInfo info) {
for (ExecutionListener<I, O> listener: listeners) {
try {
if (!isListenerDisabled(listener)) {
listener.onExecutionSuccess(context.getChildContext(listener), response, in... | [
"public",
"void",
"onExecutionSuccess",
"(",
"ExecutionContext",
"<",
"I",
">",
"context",
",",
"O",
"response",
",",
"ExecutionInfo",
"info",
")",
"{",
"for",
"(",
"ExecutionListener",
"<",
"I",
",",
"O",
">",
"listener",
":",
"listeners",
")",
"{",
"try"... | Called when the request is executed successfully on the server
@param response Object received from the execution | [
"Called",
"when",
"the",
"request",
"is",
"executed",
"successfully",
"on",
"the",
"server"
] | train | https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/reactive/ExecutionContextListenerInvoker.java#L139-L149 |
lessthanoptimal/BoofCV | main/boofcv-types/src/main/java/boofcv/struct/image/InterleavedU16.java | InterleavedU16.getBand | @Override
public int getBand(int x, int y, int band) {
"""
Returns the value of the specified band in the specified pixel.
@param x pixel coordinate.
@param y pixel coordinate.
@param band which color band in the pixel
@return an intensity value.
"""
if (!isInBounds(x, y))
throw new ImageAccessExce... | java | @Override
public int getBand(int x, int y, int band) {
if (!isInBounds(x, y))
throw new ImageAccessException("Requested pixel is out of bounds.");
if (band < 0 || band >= numBands)
throw new ImageAccessException("Invalid band requested.");
return data[getIndex(x, y, band)] & 0xFFFF;
} | [
"@",
"Override",
"public",
"int",
"getBand",
"(",
"int",
"x",
",",
"int",
"y",
",",
"int",
"band",
")",
"{",
"if",
"(",
"!",
"isInBounds",
"(",
"x",
",",
"y",
")",
")",
"throw",
"new",
"ImageAccessException",
"(",
"\"Requested pixel is out of bounds.\"",
... | Returns the value of the specified band in the specified pixel.
@param x pixel coordinate.
@param y pixel coordinate.
@param band which color band in the pixel
@return an intensity value. | [
"Returns",
"the",
"value",
"of",
"the",
"specified",
"band",
"in",
"the",
"specified",
"pixel",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/struct/image/InterleavedU16.java#L65-L73 |
osmdroid/osmdroid | osmdroid-android/src/main/java/org/osmdroid/tileprovider/util/ManifestUtil.java | ManifestUtil.retrieveKey | public static String retrieveKey(final Context aContext, final String aKey) {
"""
Retrieve a key from the manifest meta data, or empty string if not found.
"""
// get the key from the manifest
final PackageManager pm = aContext.getPackageManager();
try {
final ApplicationIn... | java | public static String retrieveKey(final Context aContext, final String aKey) {
// get the key from the manifest
final PackageManager pm = aContext.getPackageManager();
try {
final ApplicationInfo info = pm.getApplicationInfo(aContext.getPackageName(),
PackageManager.GET_META_DAT... | [
"public",
"static",
"String",
"retrieveKey",
"(",
"final",
"Context",
"aContext",
",",
"final",
"String",
"aKey",
")",
"{",
"// get the key from the manifest",
"final",
"PackageManager",
"pm",
"=",
"aContext",
".",
"getPackageManager",
"(",
")",
";",
"try",
"{",
... | Retrieve a key from the manifest meta data, or empty string if not found. | [
"Retrieve",
"a",
"key",
"from",
"the",
"manifest",
"meta",
"data",
"or",
"empty",
"string",
"if",
"not",
"found",
"."
] | train | https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/tileprovider/util/ManifestUtil.java#L17-L38 |
netty/netty | buffer/src/main/java/io/netty/buffer/ByteBufUtil.java | ByteBufUtil.isText | public static boolean isText(ByteBuf buf, Charset charset) {
"""
Returns {@code true} if the given {@link ByteBuf} is valid text using the given {@link Charset},
otherwise return {@code false}.
@param buf The given {@link ByteBuf}.
@param charset The specified {@link Charset}.
"""
return isText(bu... | java | public static boolean isText(ByteBuf buf, Charset charset) {
return isText(buf, buf.readerIndex(), buf.readableBytes(), charset);
} | [
"public",
"static",
"boolean",
"isText",
"(",
"ByteBuf",
"buf",
",",
"Charset",
"charset",
")",
"{",
"return",
"isText",
"(",
"buf",
",",
"buf",
".",
"readerIndex",
"(",
")",
",",
"buf",
".",
"readableBytes",
"(",
")",
",",
"charset",
")",
";",
"}"
] | Returns {@code true} if the given {@link ByteBuf} is valid text using the given {@link Charset},
otherwise return {@code false}.
@param buf The given {@link ByteBuf}.
@param charset The specified {@link Charset}. | [
"Returns",
"{",
"@code",
"true",
"}",
"if",
"the",
"given",
"{",
"@link",
"ByteBuf",
"}",
"is",
"valid",
"text",
"using",
"the",
"given",
"{",
"@link",
"Charset",
"}",
"otherwise",
"return",
"{",
"@code",
"false",
"}",
"."
] | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java#L1204-L1206 |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java | TemplateParser.findExpressionParameters | private void findExpressionParameters(Expression expression, List<VariableInfo> parameters) {
"""
Find all the parameters this expression depends on. This is either the local variables (from a
v-for loop) or the $event variable.
@param expression An expression from the Template
@param parameters The parameter... | java | private void findExpressionParameters(Expression expression, List<VariableInfo> parameters) {
if (expression instanceof NameExpr) {
NameExpr nameExpr = ((NameExpr) expression);
if ("$event".equals(nameExpr.getNameAsString())) {
processEventParameter(expression, nameExpr, parameters);
} els... | [
"private",
"void",
"findExpressionParameters",
"(",
"Expression",
"expression",
",",
"List",
"<",
"VariableInfo",
">",
"parameters",
")",
"{",
"if",
"(",
"expression",
"instanceof",
"NameExpr",
")",
"{",
"NameExpr",
"nameExpr",
"=",
"(",
"(",
"NameExpr",
")",
... | Find all the parameters this expression depends on. This is either the local variables (from a
v-for loop) or the $event variable.
@param expression An expression from the Template
@param parameters The parameters this expression depends on | [
"Find",
"all",
"the",
"parameters",
"this",
"expression",
"depends",
"on",
".",
"This",
"is",
"either",
"the",
"local",
"variables",
"(",
"from",
"a",
"v",
"-",
"for",
"loop",
")",
"or",
"the",
"$event",
"variable",
"."
] | train | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L785-L801 |
camunda/camunda-bpm-platform | engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java | BpmnParse.isValidEventNameForScope | protected boolean isValidEventNameForScope(String eventName, Element listenerElement) {
"""
Check if the given event name is valid. If not, an appropriate error is
added.
"""
if (eventName != null && eventName.trim().length() > 0) {
if ("start".equals(eventName) || "end".equals(eventName)) {
... | java | protected boolean isValidEventNameForScope(String eventName, Element listenerElement) {
if (eventName != null && eventName.trim().length() > 0) {
if ("start".equals(eventName) || "end".equals(eventName)) {
return true;
} else {
addError("Attribute 'event' must be one of {start|end}", lis... | [
"protected",
"boolean",
"isValidEventNameForScope",
"(",
"String",
"eventName",
",",
"Element",
"listenerElement",
")",
"{",
"if",
"(",
"eventName",
"!=",
"null",
"&&",
"eventName",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"if",
... | Check if the given event name is valid. If not, an appropriate error is
added. | [
"Check",
"if",
"the",
"given",
"event",
"name",
"is",
"valid",
".",
"If",
"not",
"an",
"appropriate",
"error",
"is",
"added",
"."
] | train | https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java#L4132-L4143 |
alkacon/opencms-core | src/org/opencms/search/CmsSearchManager.java | CmsSearchManager.rebuildIndexes | public void rebuildIndexes(List<String> indexNames, I_CmsReport report) throws CmsException {
"""
Rebuilds (if required creates) the List of indexes with the given name.<p>
@param indexNames the names (String) of the index to rebuild
@param report the report object to write messages (or <code>null</code>)
@... | java | public void rebuildIndexes(List<String> indexNames, I_CmsReport report) throws CmsException {
try {
SEARCH_MANAGER_LOCK.lock();
Iterator<String> i = indexNames.iterator();
while (i.hasNext()) {
String indexName = i.next();
// get the search in... | [
"public",
"void",
"rebuildIndexes",
"(",
"List",
"<",
"String",
">",
"indexNames",
",",
"I_CmsReport",
"report",
")",
"throws",
"CmsException",
"{",
"try",
"{",
"SEARCH_MANAGER_LOCK",
".",
"lock",
"(",
")",
";",
"Iterator",
"<",
"String",
">",
"i",
"=",
"i... | Rebuilds (if required creates) the List of indexes with the given name.<p>
@param indexNames the names (String) of the index to rebuild
@param report the report object to write messages (or <code>null</code>)
@throws CmsException if something goes wrong | [
"Rebuilds",
"(",
"if",
"required",
"creates",
")",
"the",
"List",
"of",
"indexes",
"with",
"the",
"given",
"name",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/CmsSearchManager.java#L1731-L1754 |
googleapis/cloud-bigtable-client | bigtable-dataflow-parent/bigtable-hbase-beam/src/main/java/com/google/cloud/bigtable/beam/AbstractCloudBigtableTableDoFn.java | AbstractCloudBigtableTableDoFn.logExceptions | protected void logExceptions(Object context, RetriesExhaustedWithDetailsException exception) {
"""
Logs a context and the exception's
{@link RetriesExhaustedWithDetailsException#getExhaustiveDescription()}.
"""
logRetriesExhaustedWithDetailsException(DOFN_LOG, String.valueOf(context), exception);
} | java | protected void logExceptions(Object context, RetriesExhaustedWithDetailsException exception) {
logRetriesExhaustedWithDetailsException(DOFN_LOG, String.valueOf(context), exception);
} | [
"protected",
"void",
"logExceptions",
"(",
"Object",
"context",
",",
"RetriesExhaustedWithDetailsException",
"exception",
")",
"{",
"logRetriesExhaustedWithDetailsException",
"(",
"DOFN_LOG",
",",
"String",
".",
"valueOf",
"(",
"context",
")",
",",
"exception",
")",
"... | Logs a context and the exception's
{@link RetriesExhaustedWithDetailsException#getExhaustiveDescription()}. | [
"Logs",
"a",
"context",
"and",
"the",
"exception",
"s",
"{"
] | train | https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-dataflow-parent/bigtable-hbase-beam/src/main/java/com/google/cloud/bigtable/beam/AbstractCloudBigtableTableDoFn.java#L115-L117 |
openbaton/openbaton-client | sdk/src/main/java/org/openbaton/sdk/api/rest/KeyAgent.java | KeyAgent.importKey | @Help(help = "Import a Key into the NFVO by providing name and public key")
public Key importKey(String name, String publicKey) throws SDKException {
"""
Import a Key into the NFVO by providing name and public key.
@param name the name of the Key
@param publicKey the public Key
@return the imported Key
@th... | java | @Help(help = "Import a Key into the NFVO by providing name and public key")
public Key importKey(String name, String publicKey) throws SDKException {
Key key = new Key();
key.setName(name);
key.setPublicKey(publicKey);
return (Key) requestPost(key);
} | [
"@",
"Help",
"(",
"help",
"=",
"\"Import a Key into the NFVO by providing name and public key\"",
")",
"public",
"Key",
"importKey",
"(",
"String",
"name",
",",
"String",
"publicKey",
")",
"throws",
"SDKException",
"{",
"Key",
"key",
"=",
"new",
"Key",
"(",
")",
... | Import a Key into the NFVO by providing name and public key.
@param name the name of the Key
@param publicKey the public Key
@return the imported Key
@throws SDKException if the request fails | [
"Import",
"a",
"Key",
"into",
"the",
"NFVO",
"by",
"providing",
"name",
"and",
"public",
"key",
"."
] | train | https://github.com/openbaton/openbaton-client/blob/6ca6dd6b62a23940d312213d6fa489d5b636061a/sdk/src/main/java/org/openbaton/sdk/api/rest/KeyAgent.java#L105-L111 |
structurizr/java | structurizr-core/src/com/structurizr/model/Model.java | Model.getDeploymentNodeWithName | public DeploymentNode getDeploymentNodeWithName(String name, String environment) {
"""
Gets the deployment node with the specified name and environment.
@param name the name of the deployment node
@param environment the name of the deployment environment
@return the DeploymentNode instance with the... | java | public DeploymentNode getDeploymentNodeWithName(String name, String environment) {
for (DeploymentNode deploymentNode : getDeploymentNodes()) {
if (deploymentNode.getEnvironment().equals(environment) && deploymentNode.getName().equals(name)) {
return deploymentNode;
}
... | [
"public",
"DeploymentNode",
"getDeploymentNodeWithName",
"(",
"String",
"name",
",",
"String",
"environment",
")",
"{",
"for",
"(",
"DeploymentNode",
"deploymentNode",
":",
"getDeploymentNodes",
"(",
")",
")",
"{",
"if",
"(",
"deploymentNode",
".",
"getEnvironment",... | Gets the deployment node with the specified name and environment.
@param name the name of the deployment node
@param environment the name of the deployment environment
@return the DeploymentNode instance with the specified name (or null if it doesn't exist). | [
"Gets",
"the",
"deployment",
"node",
"with",
"the",
"specified",
"name",
"and",
"environment",
"."
] | train | https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/Model.java#L690-L698 |
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_easyHunting_serviceName_hunting_agent_agentId_DELETE | public void billingAccount_easyHunting_serviceName_hunting_agent_agentId_DELETE(String billingAccount, String serviceName, Long agentId) throws IOException {
"""
Delete the given agent
REST: DELETE /telephony/{billingAccount}/easyHunting/{serviceName}/hunting/agent/{agentId}
@param billingAccount [required] Th... | java | public void billingAccount_easyHunting_serviceName_hunting_agent_agentId_DELETE(String billingAccount, String serviceName, Long agentId) throws IOException {
String qPath = "/telephony/{billingAccount}/easyHunting/{serviceName}/hunting/agent/{agentId}";
StringBuilder sb = path(qPath, billingAccount, serviceName, ag... | [
"public",
"void",
"billingAccount_easyHunting_serviceName_hunting_agent_agentId_DELETE",
"(",
"String",
"billingAccount",
",",
"String",
"serviceName",
",",
"Long",
"agentId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/telephony/{billingAccount}/easyHunting/... | Delete the given agent
REST: DELETE /telephony/{billingAccount}/easyHunting/{serviceName}/hunting/agent/{agentId}
@param billingAccount [required] The name of your billingAccount
@param serviceName [required]
@param agentId [required] | [
"Delete",
"the",
"given",
"agent"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L2388-L2392 |
pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/InputUtils.java | InputUtils.addClassName | public static String addClassName(String className, String key) {
"""
Used by InputHandlers.
Allows combining of few Maps into one Map.
In order to avoid "collisions" - Map Class name is user as prefix
@param className Map Class name
@param key Map key
@return unique key
"""
return classNa... | java | public static String addClassName(String className, String key) {
return className.toLowerCase() + "." + key.toLowerCase();
} | [
"public",
"static",
"String",
"addClassName",
"(",
"String",
"className",
",",
"String",
"key",
")",
"{",
"return",
"className",
".",
"toLowerCase",
"(",
")",
"+",
"\".\"",
"+",
"key",
".",
"toLowerCase",
"(",
")",
";",
"}"
] | Used by InputHandlers.
Allows combining of few Maps into one Map.
In order to avoid "collisions" - Map Class name is user as prefix
@param className Map Class name
@param key Map key
@return unique key | [
"Used",
"by",
"InputHandlers",
".",
"Allows",
"combining",
"of",
"few",
"Maps",
"into",
"one",
"Map",
".",
"In",
"order",
"to",
"avoid",
"collisions",
"-",
"Map",
"Class",
"name",
"is",
"user",
"as",
"prefix"
] | train | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/InputUtils.java#L112-L114 |
linkhub-sdk/popbill.sdk.java | src/main/java/com/popbill/api/BaseServiceImp.java | BaseServiceImp.fromJsonString | protected <T> T fromJsonString(String json, Class<T> clazz) {
"""
Convert JsonString to Object of Clazz
@param json
@param clazz
@return Object of Clazz
"""
return _gsonParser.fromJson(json, clazz);
} | java | protected <T> T fromJsonString(String json, Class<T> clazz) {
return _gsonParser.fromJson(json, clazz);
} | [
"protected",
"<",
"T",
">",
"T",
"fromJsonString",
"(",
"String",
"json",
",",
"Class",
"<",
"T",
">",
"clazz",
")",
"{",
"return",
"_gsonParser",
".",
"fromJson",
"(",
"json",
",",
"clazz",
")",
";",
"}"
] | Convert JsonString to Object of Clazz
@param json
@param clazz
@return Object of Clazz | [
"Convert",
"JsonString",
"to",
"Object",
"of",
"Clazz"
] | train | https://github.com/linkhub-sdk/popbill.sdk.java/blob/63a341fefe96d60a368776638f3d4c81888238b7/src/main/java/com/popbill/api/BaseServiceImp.java#L464-L466 |
aws/aws-sdk-java | aws-java-sdk-pinpointemail/src/main/java/com/amazonaws/services/pinpointemail/model/GetBlacklistReportsResult.java | GetBlacklistReportsResult.setBlacklistReport | public void setBlacklistReport(java.util.Map<String, java.util.List<BlacklistEntry>> blacklistReport) {
"""
<p>
An object that contains information about a blacklist that one of your dedicated IP addresses appears on.
</p>
@param blacklistReport
An object that contains information about a blacklist that one ... | java | public void setBlacklistReport(java.util.Map<String, java.util.List<BlacklistEntry>> blacklistReport) {
this.blacklistReport = blacklistReport;
} | [
"public",
"void",
"setBlacklistReport",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"java",
".",
"util",
".",
"List",
"<",
"BlacklistEntry",
">",
">",
"blacklistReport",
")",
"{",
"this",
".",
"blacklistReport",
"=",
"blacklistReport",
";",
"... | <p>
An object that contains information about a blacklist that one of your dedicated IP addresses appears on.
</p>
@param blacklistReport
An object that contains information about a blacklist that one of your dedicated IP addresses appears on. | [
"<p",
">",
"An",
"object",
"that",
"contains",
"information",
"about",
"a",
"blacklist",
"that",
"one",
"of",
"your",
"dedicated",
"IP",
"addresses",
"appears",
"on",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpointemail/src/main/java/com/amazonaws/services/pinpointemail/model/GetBlacklistReportsResult.java#L57-L59 |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java | ArrayUtil.findNot | public static int findNot(int[] array, int value) {
"""
Finds the first element of the array that is not equal to the given value.
"""
for (int i = 0; i < array.length; i++) {
if (array[i] != value) {
return i;
}
}
return -1;
} | java | public static int findNot(int[] array, int value) {
for (int i = 0; i < array.length; i++) {
if (array[i] != value) {
return i;
}
}
return -1;
} | [
"public",
"static",
"int",
"findNot",
"(",
"int",
"[",
"]",
"array",
",",
"int",
"value",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"array",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"array",
"[",
"i",
"]",
"!=",
... | Finds the first element of the array that is not equal to the given value. | [
"Finds",
"the",
"first",
"element",
"of",
"the",
"array",
"that",
"is",
"not",
"equal",
"to",
"the",
"given",
"value",
"."
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L293-L302 |
DV8FromTheWorld/JDA | src/main/java/net/dv8tion/jda/core/requests/restaction/MessageAction.java | MessageAction.addFile | @CheckReturnValue
public MessageAction addFile(final File file) {
"""
Adds the provided {@link java.io.File File} as file data.
<br>Shortcut for {@link #addFile(java.io.File, String) addFile(file, file.getName())} with the same side-effects.
@param file
The File that will be interpreted as file data
@... | java | @CheckReturnValue
public MessageAction addFile(final File file)
{
Checks.notNull(file, "File");
return addFile(file, file.getName());
} | [
"@",
"CheckReturnValue",
"public",
"MessageAction",
"addFile",
"(",
"final",
"File",
"file",
")",
"{",
"Checks",
".",
"notNull",
"(",
"file",
",",
"\"File\"",
")",
";",
"return",
"addFile",
"(",
"file",
",",
"file",
".",
"getName",
"(",
")",
")",
";",
... | Adds the provided {@link java.io.File File} as file data.
<br>Shortcut for {@link #addFile(java.io.File, String) addFile(file, file.getName())} with the same side-effects.
@param file
The File that will be interpreted as file data
@throws java.lang.IllegalStateException
If the file limit of {@value Message#MAX_FILE_... | [
"Adds",
"the",
"provided",
"{",
"@link",
"java",
".",
"io",
".",
"File",
"File",
"}",
"as",
"file",
"data",
".",
"<br",
">",
"Shortcut",
"for",
"{",
"@link",
"#addFile",
"(",
"java",
".",
"io",
".",
"File",
"String",
")",
"addFile",
"(",
"file",
"f... | train | https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/MessageAction.java#L433-L438 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UCharacter.java | UCharacter.toTitleFirst | @Deprecated
public static String toTitleFirst(ULocale locale, String str) {
"""
Return a string with just the first word titlecased, for menus and UI, etc. This does not affect most of the string,
and sometimes has no effect at all; the original string is returned whenever casing
would not be appropriate for... | java | @Deprecated
public static String toTitleFirst(ULocale locale, String str) {
int c = 0;
for (int i = 0; i < str.length(); i += UCharacter.charCount(c)) {
c = UCharacter.codePointAt(str, i);
int propertyMask = UCharacter.getIntPropertyValue(c, UProperty.GENERAL_CATEGORY_MASK);
... | [
"@",
"Deprecated",
"public",
"static",
"String",
"toTitleFirst",
"(",
"ULocale",
"locale",
",",
"String",
"str",
")",
"{",
"int",
"c",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"str",
".",
"length",
"(",
")",
";",
"i",
"+=",... | Return a string with just the first word titlecased, for menus and UI, etc. This does not affect most of the string,
and sometimes has no effect at all; the original string is returned whenever casing
would not be appropriate for the first word (such as for CJK characters or initial numbers).
Initial non-letters are sk... | [
"Return",
"a",
"string",
"with",
"just",
"the",
"first",
"word",
"titlecased",
"for",
"menus",
"and",
"UI",
"etc",
".",
"This",
"does",
"not",
"affect",
"most",
"of",
"the",
"string",
"and",
"sometimes",
"has",
"no",
"effect",
"at",
"all",
";",
"the",
... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UCharacter.java#L4557-L4602 |
samskivert/samskivert | src/main/java/com/samskivert/swing/CollapsibleList.java | CollapsibleList.addSection | public int addSection (String label, ListModel model) {
"""
Adds a section to this collapsible list.
@param label the title of the section.
@param model the list model to use for the new section.
@return the index of the newly added section.
"""
add(new JLabel(label));
add(new JList(mode... | java | public int addSection (String label, ListModel model)
{
add(new JLabel(label));
add(new JList(model));
return getSectionCount()-1;
} | [
"public",
"int",
"addSection",
"(",
"String",
"label",
",",
"ListModel",
"model",
")",
"{",
"add",
"(",
"new",
"JLabel",
"(",
"label",
")",
")",
";",
"add",
"(",
"new",
"JList",
"(",
"model",
")",
")",
";",
"return",
"getSectionCount",
"(",
")",
"-",... | Adds a section to this collapsible list.
@param label the title of the section.
@param model the list model to use for the new section.
@return the index of the newly added section. | [
"Adds",
"a",
"section",
"to",
"this",
"collapsible",
"list",
"."
] | train | https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/swing/CollapsibleList.java#L64-L69 |
lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/segmentation/ms/MergeSmallRegions.java | MergeSmallRegions.process | public void process( T image,
GrayS32 pixelToRegion ,
GrowQueue_I32 regionMemberCount,
FastQueue<float[]> regionColor ) {
"""
Merges together smaller regions. Segmented image, region member count, and region color are all updated.
@param image Input image. Used to compute color of each re... | java | public void process( T image,
GrayS32 pixelToRegion ,
GrowQueue_I32 regionMemberCount,
FastQueue<float[]> regionColor ) {
stopRequested = false;
// iterate until no more regions need to be merged together
while( !stopRequested ) {
// Update the color of each region
regionColor.resize(... | [
"public",
"void",
"process",
"(",
"T",
"image",
",",
"GrayS32",
"pixelToRegion",
",",
"GrowQueue_I32",
"regionMemberCount",
",",
"FastQueue",
"<",
"float",
"[",
"]",
">",
"regionColor",
")",
"{",
"stopRequested",
"=",
"false",
";",
"// iterate until no more region... | Merges together smaller regions. Segmented image, region member count, and region color are all updated.
@param image Input image. Used to compute color of each region
@param pixelToRegion (input/output) Segmented image with the ID of each region. Modified.
@param regionMemberCount (input/output) Number of members ... | [
"Merges",
"together",
"smaller",
"regions",
".",
"Segmented",
"image",
"region",
"member",
"count",
"and",
"region",
"color",
"are",
"all",
"updated",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/segmentation/ms/MergeSmallRegions.java#L100-L130 |
aws/aws-sdk-java | aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/GetDeviceDefinitionResult.java | GetDeviceDefinitionResult.withTags | public GetDeviceDefinitionResult withTags(java.util.Map<String, String> tags) {
"""
The tags for the definition.
@param tags
The tags for the definition.
@return Returns a reference to this object so that method calls can be chained together.
"""
setTags(tags);
return this;
} | java | public GetDeviceDefinitionResult withTags(java.util.Map<String, String> tags) {
setTags(tags);
return this;
} | [
"public",
"GetDeviceDefinitionResult",
"withTags",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"tags",
")",
"{",
"setTags",
"(",
"tags",
")",
";",
"return",
"this",
";",
"}"
] | The tags for the definition.
@param tags
The tags for the definition.
@return Returns a reference to this object so that method calls can be chained together. | [
"The",
"tags",
"for",
"the",
"definition",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/GetDeviceDefinitionResult.java#L310-L313 |
BorderTech/wcomponents | wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTableRenderer.java | WTableRenderer.paintPaginationDetails | private void paintPaginationDetails(final WTable table, final XmlStringBuilder xml) {
"""
Paint the pagination aspects of the table.
@param table the WDataTable being rendered
@param xml the string builder in use
"""
TableModel model = table.getTableModel();
xml.appendTagOpen("ui:pagination");
xml.ap... | java | private void paintPaginationDetails(final WTable table, final XmlStringBuilder xml) {
TableModel model = table.getTableModel();
xml.appendTagOpen("ui:pagination");
xml.appendAttribute("rows", model.getRowCount());
xml.appendOptionalAttribute("rowsPerPage", table.getRowsPerPage() > 0, table.
getRowsPerPage... | [
"private",
"void",
"paintPaginationDetails",
"(",
"final",
"WTable",
"table",
",",
"final",
"XmlStringBuilder",
"xml",
")",
"{",
"TableModel",
"model",
"=",
"table",
".",
"getTableModel",
"(",
")",
";",
"xml",
".",
"appendTagOpen",
"(",
"\"ui:pagination\"",
")",... | Paint the pagination aspects of the table.
@param table the WDataTable being rendered
@param xml the string builder in use | [
"Paint",
"the",
"pagination",
"aspects",
"of",
"the",
"table",
"."
] | train | https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTableRenderer.java#L126-L178 |
tvesalainen/util | util/src/main/java/org/vesalainen/nio/IntArray.java | IntArray.getInstance | public static IntArray getInstance(byte[] buffer, int offset, int length) {
"""
Creates IntArray backed by byte array
@param buffer
@param offset
@param length
@return
"""
return getInstance(buffer, offset, length, 8, ByteOrder.BIG_ENDIAN);
} | java | public static IntArray getInstance(byte[] buffer, int offset, int length)
{
return getInstance(buffer, offset, length, 8, ByteOrder.BIG_ENDIAN);
} | [
"public",
"static",
"IntArray",
"getInstance",
"(",
"byte",
"[",
"]",
"buffer",
",",
"int",
"offset",
",",
"int",
"length",
")",
"{",
"return",
"getInstance",
"(",
"buffer",
",",
"offset",
",",
"length",
",",
"8",
",",
"ByteOrder",
".",
"BIG_ENDIAN",
")"... | Creates IntArray backed by byte array
@param buffer
@param offset
@param length
@return | [
"Creates",
"IntArray",
"backed",
"by",
"byte",
"array"
] | train | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/IntArray.java#L73-L76 |
gliga/ekstazi | org.ekstazi.core/src/main/java/org/ekstazi/data/TxtStorer.java | TxtStorer.printLine | protected void printLine(State state, Writer pw, String externalForm, String hash) throws IOException {
"""
Prints one line to the given writer; the line includes path to file and
hash. Subclasses may include more fields.
"""
pw.write(externalForm);
pw.write(SEPARATOR);
pw.write(hash);... | java | protected void printLine(State state, Writer pw, String externalForm, String hash) throws IOException {
pw.write(externalForm);
pw.write(SEPARATOR);
pw.write(hash);
pw.write('\n');
} | [
"protected",
"void",
"printLine",
"(",
"State",
"state",
",",
"Writer",
"pw",
",",
"String",
"externalForm",
",",
"String",
"hash",
")",
"throws",
"IOException",
"{",
"pw",
".",
"write",
"(",
"externalForm",
")",
";",
"pw",
".",
"write",
"(",
"SEPARATOR",
... | Prints one line to the given writer; the line includes path to file and
hash. Subclasses may include more fields. | [
"Prints",
"one",
"line",
"to",
"the",
"given",
"writer",
";",
"the",
"line",
"includes",
"path",
"to",
"file",
"and",
"hash",
".",
"Subclasses",
"may",
"include",
"more",
"fields",
"."
] | train | https://github.com/gliga/ekstazi/blob/5bf4d39a13305afe62f8b8d2d7b4c573d37d42a1/org.ekstazi.core/src/main/java/org/ekstazi/data/TxtStorer.java#L185-L190 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java | FileUtil.writeBytes | public static File writeBytes(byte[] data, File dest) throws IORuntimeException {
"""
写数据到文件中
@param dest 目标文件
@param data 数据
@return 目标文件
@throws IORuntimeException IO异常
"""
return writeBytes(data, dest, 0, data.length, false);
} | java | public static File writeBytes(byte[] data, File dest) throws IORuntimeException {
return writeBytes(data, dest, 0, data.length, false);
} | [
"public",
"static",
"File",
"writeBytes",
"(",
"byte",
"[",
"]",
"data",
",",
"File",
"dest",
")",
"throws",
"IORuntimeException",
"{",
"return",
"writeBytes",
"(",
"data",
",",
"dest",
",",
"0",
",",
"data",
".",
"length",
",",
"false",
")",
";",
"}"
... | 写数据到文件中
@param dest 目标文件
@param data 数据
@return 目标文件
@throws IORuntimeException IO异常 | [
"写数据到文件中"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L3126-L3128 |
JoeKerouac/utils | src/main/java/com/joe/utils/cluster/redis/RedisClusterManagerFactory.java | RedisClusterManagerFactory.getInstance | public static RedisClusterManager getInstance(String host, int port, String password) {
"""
从缓存获取redis实现的分布式管理器
@param host redis的主机地址,例如192.168.1.100
@param port redis的端口,例如8080
@param password 密码
@return redis实现的分布式锁管理器
"""
return getInstance(buildRedisConfig(host, port, password));
... | java | public static RedisClusterManager getInstance(String host, int port, String password) {
return getInstance(buildRedisConfig(host, port, password));
} | [
"public",
"static",
"RedisClusterManager",
"getInstance",
"(",
"String",
"host",
",",
"int",
"port",
",",
"String",
"password",
")",
"{",
"return",
"getInstance",
"(",
"buildRedisConfig",
"(",
"host",
",",
"port",
",",
"password",
")",
")",
";",
"}"
] | 从缓存获取redis实现的分布式管理器
@param host redis的主机地址,例如192.168.1.100
@param port redis的端口,例如8080
@param password 密码
@return redis实现的分布式锁管理器 | [
"从缓存获取redis实现的分布式管理器"
] | train | https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/cluster/redis/RedisClusterManagerFactory.java#L43-L45 |
khuxtable/seaglass | src/main/java/com/seaglasslookandfeel/painter/ScrollPanePainter.java | ScrollPanePainter.paintCornerEnabled | private void paintCornerEnabled(Graphics2D g, int width, int height) {
"""
DOCUMENT ME!
@param g DOCUMENT ME!
@param width DOCUMENT ME!
@param height DOCUMENT ME!
"""
Shape s = decodeCornerBorder(width, height);
// g.setPaint(cornerBorder);
// g.fill(s);
s = decodeCorn... | java | private void paintCornerEnabled(Graphics2D g, int width, int height) {
Shape s = decodeCornerBorder(width, height);
// g.setPaint(cornerBorder);
// g.fill(s);
s = decodeCornerInside(width, height);
g.setPaint(decodeCornerGradient(s));
g.fill(s);
} | [
"private",
"void",
"paintCornerEnabled",
"(",
"Graphics2D",
"g",
",",
"int",
"width",
",",
"int",
"height",
")",
"{",
"Shape",
"s",
"=",
"decodeCornerBorder",
"(",
"width",
",",
"height",
")",
";",
"// g.setPaint(cornerBorder);",
"// g.fill(s);",
"s"... | DOCUMENT ME!
@param g DOCUMENT ME!
@param width DOCUMENT ME!
@param height DOCUMENT ME! | [
"DOCUMENT",
"ME!"
] | train | https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/ScrollPanePainter.java#L153-L161 |
h2oai/h2o-2 | h2o-samples/src/main/java/samples/launchers/CloudRemote.java | CloudRemote.launchIPs | public static void launchIPs(Class<? extends Job> job, String... ips) throws Exception {
"""
The current user is assumed to have ssh access (key-pair, no password) to the remote machines.
H2O will be deployed to '~/h2o_rsync/'.
"""
Cloud cloud = new Cloud();
cloud.publicIPs.addAll(Arrays.asList(ips));... | java | public static void launchIPs(Class<? extends Job> job, String... ips) throws Exception {
Cloud cloud = new Cloud();
cloud.publicIPs.addAll(Arrays.asList(ips));
launch(cloud, job);
} | [
"public",
"static",
"void",
"launchIPs",
"(",
"Class",
"<",
"?",
"extends",
"Job",
">",
"job",
",",
"String",
"...",
"ips",
")",
"throws",
"Exception",
"{",
"Cloud",
"cloud",
"=",
"new",
"Cloud",
"(",
")",
";",
"cloud",
".",
"publicIPs",
".",
"addAll",... | The current user is assumed to have ssh access (key-pair, no password) to the remote machines.
H2O will be deployed to '~/h2o_rsync/'. | [
"The",
"current",
"user",
"is",
"assumed",
"to",
"have",
"ssh",
"access",
"(",
"key",
"-",
"pair",
"no",
"password",
")",
"to",
"the",
"remote",
"machines",
".",
"H2O",
"will",
"be",
"deployed",
"to",
"~",
"/",
"h2o_rsync",
"/",
"."
] | train | https://github.com/h2oai/h2o-2/blob/be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1/h2o-samples/src/main/java/samples/launchers/CloudRemote.java#L36-L40 |
lucee/Lucee | core/src/main/java/lucee/commons/lang/ArchiveClassLoader.java | ArchiveClassLoader.loadClass | @Override
protected synchronized Class loadClass(String name, boolean resolve) throws ClassNotFoundException {
"""
Loads the class with the specified name. The default implementation of this method searches for
classes in the following order:
<p>
<ol>
<li>Call {@link #findLoadedClass(String)} to check if... | java | @Override
protected synchronized Class loadClass(String name, boolean resolve) throws ClassNotFoundException {
// First, check if the class has already been loaded
Class c = findLoadedClass(name);
if (c == null) {
c = findClassEL(name);
if (c == null) {
c = pcl.loadClass(name);
}
}
if (resolve... | [
"@",
"Override",
"protected",
"synchronized",
"Class",
"loadClass",
"(",
"String",
"name",
",",
"boolean",
"resolve",
")",
"throws",
"ClassNotFoundException",
"{",
"// First, check if the class has already been loaded",
"Class",
"c",
"=",
"findLoadedClass",
"(",
"name",
... | Loads the class with the specified name. The default implementation of this method searches for
classes in the following order:
<p>
<ol>
<li>Call {@link #findLoadedClass(String)} to check if the class has already been loaded.
<p>
<li>Call the <code>loadClass</code> method on the parent class loader. If the parent is
<... | [
"Loads",
"the",
"class",
"with",
"the",
"specified",
"name",
".",
"The",
"default",
"implementation",
"of",
"this",
"method",
"searches",
"for",
"classes",
"in",
"the",
"following",
"order",
":",
"<p",
">"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/ArchiveClassLoader.java#L103-L117 |
elki-project/elki | addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPlot.java | SVGPlot.saveAsPNG | public void saveAsPNG(File file, int width, int height) throws IOException, TranscoderException {
"""
Transcode file to PNG.
@param file Output filename
@param width Width
@param height Height
@throws IOException On write errors
@throws TranscoderException On input/parsing errors.
"""
PNGTranscoder ... | java | public void saveAsPNG(File file, int width, int height) throws IOException, TranscoderException {
PNGTranscoder t = new PNGTranscoder();
t.addTranscodingHint(PNGTranscoder.KEY_WIDTH, new Float(width));
t.addTranscodingHint(PNGTranscoder.KEY_HEIGHT, new Float(height));
transcode(file, t);
} | [
"public",
"void",
"saveAsPNG",
"(",
"File",
"file",
",",
"int",
"width",
",",
"int",
"height",
")",
"throws",
"IOException",
",",
"TranscoderException",
"{",
"PNGTranscoder",
"t",
"=",
"new",
"PNGTranscoder",
"(",
")",
";",
"t",
".",
"addTranscodingHint",
"(... | Transcode file to PNG.
@param file Output filename
@param width Width
@param height Height
@throws IOException On write errors
@throws TranscoderException On input/parsing errors. | [
"Transcode",
"file",
"to",
"PNG",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPlot.java#L516-L521 |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/JobApi.java | JobApi.downloadArtifactsFile | public InputStream downloadArtifactsFile(Object projectIdOrPath, String ref, String jobName) throws GitLabApiException {
"""
Get an InputStream pointing to the artifacts file from the given reference name and job
provided the job finished successfully. The file will be saved to the specified directory.
If the fi... | java | public InputStream downloadArtifactsFile(Object projectIdOrPath, String ref, String jobName) throws GitLabApiException {
Form formData = new GitLabApiForm().withParam("job", jobName, true);
Response response = getWithAccepts(Response.Status.OK, formData.asMap(), MediaType.MEDIA_TYPE_WILDCARD,
... | [
"public",
"InputStream",
"downloadArtifactsFile",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"ref",
",",
"String",
"jobName",
")",
"throws",
"GitLabApiException",
"{",
"Form",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"\"job\"... | Get an InputStream pointing to the artifacts file from the given reference name and job
provided the job finished successfully. The file will be saved to the specified directory.
If the file already exists in the directory it will be overwritten.
<pre><code>GitLab Endpoint: GET /projects/:id/jobs/artifacts/:ref_name/d... | [
"Get",
"an",
"InputStream",
"pointing",
"to",
"the",
"artifacts",
"file",
"from",
"the",
"given",
"reference",
"name",
"and",
"job",
"provided",
"the",
"job",
"finished",
"successfully",
".",
"The",
"file",
"will",
"be",
"saved",
"to",
"the",
"specified",
"d... | train | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L247-L252 |
grails/grails-core | grails-bootstrap/src/main/groovy/org/grails/build/parsing/CommandLineParser.java | CommandLineParser.parseString | public CommandLine parseString(String commandName, String args) {
"""
Parses a string of all the command line options converting them into an array of arguments to pass to #parse(String..args)
@param commandName The command name
@param args The string
@return The command line
"""
// Steal ants imp... | java | public CommandLine parseString(String commandName, String args) {
// Steal ants implementation for argument splitting. Handles quoted arguments with " or '.
// Doesn't handle escape sequences with \
String[] argArray = translateCommandline(args);
DefaultCommandLine cl = createCommandLine... | [
"public",
"CommandLine",
"parseString",
"(",
"String",
"commandName",
",",
"String",
"args",
")",
"{",
"// Steal ants implementation for argument splitting. Handles quoted arguments with \" or '.",
"// Doesn't handle escape sequences with \\",
"String",
"[",
"]",
"argArray",
"=",
... | Parses a string of all the command line options converting them into an array of arguments to pass to #parse(String..args)
@param commandName The command name
@param args The string
@return The command line | [
"Parses",
"a",
"string",
"of",
"all",
"the",
"command",
"line",
"options",
"converting",
"them",
"into",
"an",
"array",
"of",
"arguments",
"to",
"pass",
"to",
"#parse",
"(",
"String",
"..",
"args",
")"
] | train | https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-bootstrap/src/main/groovy/org/grails/build/parsing/CommandLineParser.java#L159-L167 |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/bcc/BccClient.java | BccClient.detachVolume | public void detachVolume(String volumeId, String instanceId) {
"""
Detaching the specified volume from a specified instance.
You can detach the specified volume from a specified instance only
when the instance is Running or Stopped ,
otherwise,it's will get <code>409</code> errorCode.
@param volumeId The i... | java | public void detachVolume(String volumeId, String instanceId) {
this.detachVolume(new DetachVolumeRequest().withVolumeId(volumeId).withInstanceId(instanceId));
} | [
"public",
"void",
"detachVolume",
"(",
"String",
"volumeId",
",",
"String",
"instanceId",
")",
"{",
"this",
".",
"detachVolume",
"(",
"new",
"DetachVolumeRequest",
"(",
")",
".",
"withVolumeId",
"(",
"volumeId",
")",
".",
"withInstanceId",
"(",
"instanceId",
"... | Detaching the specified volume from a specified instance.
You can detach the specified volume from a specified instance only
when the instance is Running or Stopped ,
otherwise,it's will get <code>409</code> errorCode.
@param volumeId The id of the volume which has been attached to specified instance.
@param instance... | [
"Detaching",
"the",
"specified",
"volume",
"from",
"a",
"specified",
"instance",
"."
] | train | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bcc/BccClient.java#L998-L1000 |
Teddy-Zhu/SilentGo | utils/src/main/java/com/silentgo/utils/asm/ClassUtils.java | ClassUtils.isOverridable | private static boolean isOverridable(Method method, Class<?> targetClass) {
"""
Determine whether the given method is overridable in the given target class.
@param method the method to check
@param targetClass the target class to check against
"""
if (Modifier.isPrivate(method.getModifiers()))... | java | private static boolean isOverridable(Method method, Class<?> targetClass) {
if (Modifier.isPrivate(method.getModifiers())) {
return false;
}
if (Modifier.isPublic(method.getModifiers()) || Modifier.isProtected(method.getModifiers())) {
return true;
}
retur... | [
"private",
"static",
"boolean",
"isOverridable",
"(",
"Method",
"method",
",",
"Class",
"<",
"?",
">",
"targetClass",
")",
"{",
"if",
"(",
"Modifier",
".",
"isPrivate",
"(",
"method",
".",
"getModifiers",
"(",
")",
")",
")",
"{",
"return",
"false",
";",
... | Determine whether the given method is overridable in the given target class.
@param method the method to check
@param targetClass the target class to check against | [
"Determine",
"whether",
"the",
"given",
"method",
"is",
"overridable",
"in",
"the",
"given",
"target",
"class",
"."
] | train | https://github.com/Teddy-Zhu/SilentGo/blob/27f58b0cafe56b2eb9fc6993efa9ca2b529661e1/utils/src/main/java/com/silentgo/utils/asm/ClassUtils.java#L837-L846 |
apache/groovy | src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java | DefaultGroovyMethods.toUnique | public static <T> Iterator<T> toUnique(Iterator<T> self) {
"""
Returns an iterator equivalent to this iterator with all duplicated
items removed by using the natural ordering of the items.
@param self an Iterator
@return an Iterator with no duplicate items
@since 2.4.0
"""
return toUnique(self, (... | java | public static <T> Iterator<T> toUnique(Iterator<T> self) {
return toUnique(self, (Comparator<T>) null);
} | [
"public",
"static",
"<",
"T",
">",
"Iterator",
"<",
"T",
">",
"toUnique",
"(",
"Iterator",
"<",
"T",
">",
"self",
")",
"{",
"return",
"toUnique",
"(",
"self",
",",
"(",
"Comparator",
"<",
"T",
">",
")",
"null",
")",
";",
"}"
] | Returns an iterator equivalent to this iterator with all duplicated
items removed by using the natural ordering of the items.
@param self an Iterator
@return an Iterator with no duplicate items
@since 2.4.0 | [
"Returns",
"an",
"iterator",
"equivalent",
"to",
"this",
"iterator",
"with",
"all",
"duplicated",
"items",
"removed",
"by",
"using",
"the",
"natural",
"ordering",
"of",
"the",
"items",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L1806-L1808 |
alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java | Postcard.withParcelableArray | public Postcard withParcelableArray(@Nullable String key, @Nullable Parcelable[] value) {
"""
Inserts an array of Parcelable values into the mapping of this Bundle,
replacing any existing value for the given key. Either key or value may
be null.
@param key a String, or null
@param value an array of Parcel... | java | public Postcard withParcelableArray(@Nullable String key, @Nullable Parcelable[] value) {
mBundle.putParcelableArray(key, value);
return this;
} | [
"public",
"Postcard",
"withParcelableArray",
"(",
"@",
"Nullable",
"String",
"key",
",",
"@",
"Nullable",
"Parcelable",
"[",
"]",
"value",
")",
"{",
"mBundle",
".",
"putParcelableArray",
"(",
"key",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Inserts an array of Parcelable values into the mapping of this Bundle,
replacing any existing value for the given key. Either key or value may
be null.
@param key a String, or null
@param value an array of Parcelable objects, or null
@return current | [
"Inserts",
"an",
"array",
"of",
"Parcelable",
"values",
"into",
"the",
"mapping",
"of",
"this",
"Bundle",
"replacing",
"any",
"existing",
"value",
"for",
"the",
"given",
"key",
".",
"Either",
"key",
"or",
"value",
"may",
"be",
"null",
"."
] | train | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java#L388-L391 |
finmath/finmath-lib | src/main/java6/net/finmath/montecarlo/interestrate/modelplugins/AbstractLIBORCovarianceModelParametric.java | AbstractLIBORCovarianceModelParametric.getCloneCalibrated | @Deprecated
public AbstractLIBORCovarianceModelParametric getCloneCalibrated(final LIBORMarketModelInterface calibrationModel, final AbstractLIBORMonteCarloProduct[] calibrationProducts, final double[] calibrationTargetValues, double[] calibrationWeights, Map<String,Object> calibrationParameters) throws CalculationExc... | java | @Deprecated
public AbstractLIBORCovarianceModelParametric getCloneCalibrated(final LIBORMarketModelInterface calibrationModel, final AbstractLIBORMonteCarloProduct[] calibrationProducts, final double[] calibrationTargetValues, double[] calibrationWeights, Map<String,Object> calibrationParameters) throws CalculationExc... | [
"@",
"Deprecated",
"public",
"AbstractLIBORCovarianceModelParametric",
"getCloneCalibrated",
"(",
"final",
"LIBORMarketModelInterface",
"calibrationModel",
",",
"final",
"AbstractLIBORMonteCarloProduct",
"[",
"]",
"calibrationProducts",
",",
"final",
"double",
"[",
"]",
"cali... | Performs a generic calibration of the parametric model by
trying to match a given vector of calibration product to a given vector of target values
using a given vector of weights.
Optional calibration parameters may be passed using the map calibrationParameters. The keys are (<code>String</code>s):
<ul>
<li><tt>browni... | [
"Performs",
"a",
"generic",
"calibration",
"of",
"the",
"parametric",
"model",
"by",
"trying",
"to",
"match",
"a",
"given",
"vector",
"of",
"calibration",
"product",
"to",
"a",
"given",
"vector",
"of",
"target",
"values",
"using",
"a",
"given",
"vector",
"of... | train | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/montecarlo/interestrate/modelplugins/AbstractLIBORCovarianceModelParametric.java#L119-L126 |
cdapio/tigon | tigon-yarn/src/main/java/co/cask/tigon/internal/io/FieldAccessorGenerator.java | FieldAccessorGenerator.primitiveGetter | private void primitiveGetter(Field field) {
"""
Generates the primitive getter (getXXX) based on the field type.
@param field The reflection field object.
"""
String typeName = field.getType().getName();
String methodName = String.format("get%c%s", Character.toUpperCase(typeName.charAt(0)), typeName.s... | java | private void primitiveGetter(Field field) {
String typeName = field.getType().getName();
String methodName = String.format("get%c%s", Character.toUpperCase(typeName.charAt(0)), typeName.substring(1));
GeneratorAdapter mg = new GeneratorAdapter(Opcodes.ACC_PUBLIC, getMethod(field.getType(), methodName, Obje... | [
"private",
"void",
"primitiveGetter",
"(",
"Field",
"field",
")",
"{",
"String",
"typeName",
"=",
"field",
".",
"getType",
"(",
")",
".",
"getName",
"(",
")",
";",
"String",
"methodName",
"=",
"String",
".",
"format",
"(",
"\"get%c%s\"",
",",
"Character",
... | Generates the primitive getter (getXXX) based on the field type.
@param field The reflection field object. | [
"Generates",
"the",
"primitive",
"getter",
"(",
"getXXX",
")",
"based",
"on",
"the",
"field",
"type",
"."
] | train | https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-yarn/src/main/java/co/cask/tigon/internal/io/FieldAccessorGenerator.java#L271-L291 |
doanduyhai/Achilles | achilles-core/src/main/java/info/archinnov/achilles/internals/dsl/options/AbstractOptionsForSelect.java | AbstractOptionsForSelect.withOutgoingPayload | public T withOutgoingPayload(Map<String, ByteBuffer> outgoingPayload) {
"""
Set the given outgoing payload map on the generated statement
@throws NullPointerException if outgoingPayload is null
"""
getOptions().setOutgoingPayLoad(Optional.of(outgoingPayload));
return getThis();
} | java | public T withOutgoingPayload(Map<String, ByteBuffer> outgoingPayload) {
getOptions().setOutgoingPayLoad(Optional.of(outgoingPayload));
return getThis();
} | [
"public",
"T",
"withOutgoingPayload",
"(",
"Map",
"<",
"String",
",",
"ByteBuffer",
">",
"outgoingPayload",
")",
"{",
"getOptions",
"(",
")",
".",
"setOutgoingPayLoad",
"(",
"Optional",
".",
"of",
"(",
"outgoingPayload",
")",
")",
";",
"return",
"getThis",
"... | Set the given outgoing payload map on the generated statement
@throws NullPointerException if outgoingPayload is null | [
"Set",
"the",
"given",
"outgoing",
"payload",
"map",
"on",
"the",
"generated",
"statement"
] | train | https://github.com/doanduyhai/Achilles/blob/8281c33100e72c993e570592ae1a5306afac6813/achilles-core/src/main/java/info/archinnov/achilles/internals/dsl/options/AbstractOptionsForSelect.java#L103-L106 |
camunda/camunda-bpm-platform | engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java | BpmnParse.parseSubProcess | public ActivityImpl parseSubProcess(Element subProcessElement, ScopeImpl scope) {
"""
Parses a subprocess (formally known as an embedded subprocess): a
subprocess defined within another process definition.
@param subProcessElement
The XML element corresponding with the subprocess definition
@param scope
The... | java | public ActivityImpl parseSubProcess(Element subProcessElement, ScopeImpl scope) {
ActivityImpl subProcessActivity = createActivityOnScope(subProcessElement, scope);
subProcessActivity.setSubProcessScope(true);
parseAsynchronousContinuationForActivity(subProcessElement, subProcessActivity);
Boolean isT... | [
"public",
"ActivityImpl",
"parseSubProcess",
"(",
"Element",
"subProcessElement",
",",
"ScopeImpl",
"scope",
")",
"{",
"ActivityImpl",
"subProcessActivity",
"=",
"createActivityOnScope",
"(",
"subProcessElement",
",",
"scope",
")",
";",
"subProcessActivity",
".",
"setSu... | Parses a subprocess (formally known as an embedded subprocess): a
subprocess defined within another process definition.
@param subProcessElement
The XML element corresponding with the subprocess definition
@param scope
The current scope on which the subprocess is defined. | [
"Parses",
"a",
"subprocess",
"(",
"formally",
"known",
"as",
"an",
"embedded",
"subprocess",
")",
":",
"a",
"subprocess",
"defined",
"within",
"another",
"process",
"definition",
"."
] | train | https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java#L3561-L3584 |
kaazing/gateway | util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java | Asn1Utils.decodeSequence | public static int decodeSequence(ByteBuffer buf) {
"""
Decode an ASN.1 SEQUENCE by reading the identifier and length octets. The remaining data in the buffer is the SEQUENCE.
@param buf
the DER-encoded SEQUENCE
@return the length of the SEQUENCE
"""
DerId id = DerId.decode(buf);
if (!id.ma... | java | public static int decodeSequence(ByteBuffer buf) {
DerId id = DerId.decode(buf);
if (!id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.CONSTRUCTED, ASN1_SEQUENCE_TAG_NUM)) {
throw new IllegalArgumentException("Expected SEQUENCE identifier, received " + id);
}
int len =... | [
"public",
"static",
"int",
"decodeSequence",
"(",
"ByteBuffer",
"buf",
")",
"{",
"DerId",
"id",
"=",
"DerId",
".",
"decode",
"(",
"buf",
")",
";",
"if",
"(",
"!",
"id",
".",
"matches",
"(",
"DerId",
".",
"TagClass",
".",
"UNIVERSAL",
",",
"DerId",
".... | Decode an ASN.1 SEQUENCE by reading the identifier and length octets. The remaining data in the buffer is the SEQUENCE.
@param buf
the DER-encoded SEQUENCE
@return the length of the SEQUENCE | [
"Decode",
"an",
"ASN",
".",
"1",
"SEQUENCE",
"by",
"reading",
"the",
"identifier",
"and",
"length",
"octets",
".",
"The",
"remaining",
"data",
"in",
"the",
"buffer",
"is",
"the",
"SEQUENCE",
"."
] | train | https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L218-L228 |
ldapchai/ldapchai | src/main/java/com/novell/ldapchai/provider/ChaiProviderFactory.java | ChaiProviderFactory.newProvider | public ChaiProvider newProvider( final String ldapURL, final String bindDN, final String password )
throws ChaiUnavailableException {
"""
Create a {@code ChaiProvider} using a standard (default) JNDI ChaiProvider.
@param bindDN ldap bind DN, in ldap fully qualified syntax. Also used as the DN of ... | java | public ChaiProvider newProvider( final String ldapURL, final String bindDN, final String password )
throws ChaiUnavailableException
{
final ChaiConfiguration chaiConfig = ChaiConfiguration.builder( ldapURL, bindDN, password ).build();
return newProvider( chaiConfig );
} | [
"public",
"ChaiProvider",
"newProvider",
"(",
"final",
"String",
"ldapURL",
",",
"final",
"String",
"bindDN",
",",
"final",
"String",
"password",
")",
"throws",
"ChaiUnavailableException",
"{",
"final",
"ChaiConfiguration",
"chaiConfig",
"=",
"ChaiConfiguration",
".",... | Create a {@code ChaiProvider} using a standard (default) JNDI ChaiProvider.
@param bindDN ldap bind DN, in ldap fully qualified syntax. Also used as the DN of the returned ChaiUser.
@param password password for the bind DN.
@param ldapURL ldap server and port in url format, example: <i>ldap://127.0.0.1:389</i>
@re... | [
"Create",
"a",
"{",
"@code",
"ChaiProvider",
"}",
"using",
"a",
"standard",
"(",
"default",
")",
"JNDI",
"ChaiProvider",
"."
] | train | https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/provider/ChaiProviderFactory.java#L136-L141 |
soabase/exhibitor | exhibitor-core/src/main/java/com/netflix/exhibitor/core/analyze/PathAnalyzer.java | PathAnalyzer.analyze | public Analysis analyze() throws Exception {
"""
Perform the analysis and return the results. Always check {@link Analysis#getError()}
to see if there was an error generating the results.
@return analysis
@throws Exception unrecoverable errors
"""
AtomicReference<String> error = new Atomic... | java | public Analysis analyze() throws Exception
{
AtomicReference<String> error = new AtomicReference<String>(null);
Map<String, PathComplete> loadedPaths = loadedPaths(paths, error);
if ( error.get() != null )
{
return new Analysis(error.get(), Lists.<PathComplete>n... | [
"public",
"Analysis",
"analyze",
"(",
")",
"throws",
"Exception",
"{",
"AtomicReference",
"<",
"String",
">",
"error",
"=",
"new",
"AtomicReference",
"<",
"String",
">",
"(",
"null",
")",
";",
"Map",
"<",
"String",
",",
"PathComplete",
">",
"loadedPaths",
... | Perform the analysis and return the results. Always check {@link Analysis#getError()}
to see if there was an error generating the results.
@return analysis
@throws Exception unrecoverable errors | [
"Perform",
"the",
"analysis",
"and",
"return",
"the",
"results",
".",
"Always",
"check",
"{",
"@link",
"Analysis#getError",
"()",
"}",
"to",
"see",
"if",
"there",
"was",
"an",
"error",
"generating",
"the",
"results",
"."
] | train | https://github.com/soabase/exhibitor/blob/d345d2d45c75b0694b562b6c346f8594f3a5d166/exhibitor-core/src/main/java/com/netflix/exhibitor/core/analyze/PathAnalyzer.java#L77-L90 |
zalando-stups/spring-boot-etcd | zalando-boot-etcd/src/main/java/org/zalando/boot/etcd/EtcdClient.java | EtcdClient.get | public EtcdResponse get(String key) throws EtcdException {
"""
Returns the node with the given key from etcd.
@param key
the node's key
@return the response from etcd with the node
@throws EtcdException
in case etcd returned an error
"""
UriComponentsBuilder builder = UriComponentsBuilder.fromUriStrin... | java | public EtcdResponse get(String key) throws EtcdException {
UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(KEYSPACE);
builder.pathSegment(key);
return execute(builder, HttpMethod.GET, null, EtcdResponse.class);
} | [
"public",
"EtcdResponse",
"get",
"(",
"String",
"key",
")",
"throws",
"EtcdException",
"{",
"UriComponentsBuilder",
"builder",
"=",
"UriComponentsBuilder",
".",
"fromUriString",
"(",
"KEYSPACE",
")",
";",
"builder",
".",
"pathSegment",
"(",
"key",
")",
";",
"ret... | Returns the node with the given key from etcd.
@param key
the node's key
@return the response from etcd with the node
@throws EtcdException
in case etcd returned an error | [
"Returns",
"the",
"node",
"with",
"the",
"given",
"key",
"from",
"etcd",
"."
] | train | https://github.com/zalando-stups/spring-boot-etcd/blob/6b4f48663d424777326c38b1e7da75c8b68a3841/zalando-boot-etcd/src/main/java/org/zalando/boot/etcd/EtcdClient.java#L211-L216 |
alkacon/opencms-core | src/org/opencms/gwt/CmsVfsService.java | CmsVfsService.addBrokenLinkAdditionalInfo | private void addBrokenLinkAdditionalInfo(CmsObject cms, CmsResource resource, CmsBrokenLinkBean result) {
"""
Adds additional info items for broken links.<p>
@param cms the CMS context to use
@param resource the resource from which the additional infos should be read
@param result the result in which to store... | java | private void addBrokenLinkAdditionalInfo(CmsObject cms, CmsResource resource, CmsBrokenLinkBean result) {
String dateLastModifiedLabel = org.opencms.workplace.commons.Messages.get().getBundle(
OpenCms.getWorkplaceManager().getWorkplaceLocale(cms)).key(
org.opencms.workplace.commons.... | [
"private",
"void",
"addBrokenLinkAdditionalInfo",
"(",
"CmsObject",
"cms",
",",
"CmsResource",
"resource",
",",
"CmsBrokenLinkBean",
"result",
")",
"{",
"String",
"dateLastModifiedLabel",
"=",
"org",
".",
"opencms",
".",
"workplace",
".",
"commons",
".",
"Messages",... | Adds additional info items for broken links.<p>
@param cms the CMS context to use
@param resource the resource from which the additional infos should be read
@param result the result in which to store the additional info | [
"Adds",
"additional",
"info",
"items",
"for",
"broken",
"links",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/CmsVfsService.java#L1281-L1300 |
enasequence/sequencetools | src/main/java/uk/ac/ebi/embl/api/validation/check/sourcefeature/SequenceCoverageCheck.java | SequenceCoverageCheck.reportCoverageError | private void reportCoverageError(ValidationResult result, Origin origin, String messageId, long coverage, long actualLength) {
"""
Adds error to the result.
@param result a reference to validation result
@param origin the origin
"""
result.append(EntryValidations.createMessage(origin, Severity.ERROR, mes... | java | private void reportCoverageError(ValidationResult result, Origin origin, String messageId, long coverage, long actualLength) {
result.append(EntryValidations.createMessage(origin, Severity.ERROR, messageId, coverage, actualLength));
} | [
"private",
"void",
"reportCoverageError",
"(",
"ValidationResult",
"result",
",",
"Origin",
"origin",
",",
"String",
"messageId",
",",
"long",
"coverage",
",",
"long",
"actualLength",
")",
"{",
"result",
".",
"append",
"(",
"EntryValidations",
".",
"createMessage"... | Adds error to the result.
@param result a reference to validation result
@param origin the origin | [
"Adds",
"error",
"to",
"the",
"result",
"."
] | train | https://github.com/enasequence/sequencetools/blob/4127f5e1a17540239f5810136153fbd6737fa262/src/main/java/uk/ac/ebi/embl/api/validation/check/sourcefeature/SequenceCoverageCheck.java#L197-L199 |
Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java | BottomNavigationBar.sendListenerCall | private void sendListenerCall(int oldPosition, int newPosition, boolean forcedSelection) {
"""
Internal method used to send callbacks to listener
@param oldPosition old selected tab position, -1 if this is first call
@param newPosition newly selected tab position
@param forcedSelection if bottom navig... | java | private void sendListenerCall(int oldPosition, int newPosition, boolean forcedSelection) {
if (mTabSelectedListener != null) {
// && oldPosition != -1) {
if (forcedSelection) {
mTabSelectedListener.onTabSelected(newPosition);
} else {
if (ol... | [
"private",
"void",
"sendListenerCall",
"(",
"int",
"oldPosition",
",",
"int",
"newPosition",
",",
"boolean",
"forcedSelection",
")",
"{",
"if",
"(",
"mTabSelectedListener",
"!=",
"null",
")",
"{",
"// && oldPosition != -1) {",
"if",
"(",
"forcedSelectio... | Internal method used to send callbacks to listener
@param oldPosition old selected tab position, -1 if this is first call
@param newPosition newly selected tab position
@param forcedSelection if bottom navigation bar forced to select tab (in this case call on selected irrespective of previous state | [
"Internal",
"method",
"used",
"to",
"send",
"callbacks",
"to",
"listener"
] | train | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java#L569-L585 |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.startPullSession | public StartPullSessionResponse startPullSession(StartPullSessionRequest request) {
"""
Start your pulling live session by live session id.
@param request The request object containing all parameters for starting pulling live session.
@return the response
"""
checkNotNull(request, "The parameter re... | java | public StartPullSessionResponse startPullSession(StartPullSessionRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getSessionId(), "The parameter sessionId should NOT be null or empty string.");
InternalRequest internalRequest = cr... | [
"public",
"StartPullSessionResponse",
"startPullSession",
"(",
"StartPullSessionRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getSessionId",
"(",
")... | Start your pulling live session by live session id.
@param request The request object containing all parameters for starting pulling live session.
@return the response | [
"Start",
"your",
"pulling",
"live",
"session",
"by",
"live",
"session",
"id",
"."
] | train | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1031-L1038 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.processSIMPLEPATTERNLIST | Vector processSIMPLEPATTERNLIST(
StylesheetHandler handler, String uri, String name, String rawName, String value,
ElemTemplateElement owner)
throws org.xml.sax.SAXException {
"""
Process an attribute string of type T_SIMPLEPATTERNLIST into
a vector of XPath match patterns.
@par... | java | Vector processSIMPLEPATTERNLIST(
StylesheetHandler handler, String uri, String name, String rawName, String value,
ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
try
{
StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f");
int nPatterns ... | [
"Vector",
"processSIMPLEPATTERNLIST",
"(",
"StylesheetHandler",
"handler",
",",
"String",
"uri",
",",
"String",
"name",
",",
"String",
"rawName",
",",
"String",
"value",
",",
"ElemTemplateElement",
"owner",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"S... | Process an attribute string of type T_SIMPLEPATTERNLIST into
a vector of XPath match patterns.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param uri The Namespace URI, or an empty string.
@param name The local name (without prefix), or empty string if not namespa... | [
"Process",
"an",
"attribute",
"string",
"of",
"type",
"T_SIMPLEPATTERNLIST",
"into",
"a",
"vector",
"of",
"XPath",
"match",
"patterns",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L1158-L1184 |
JavaMoney/jsr354-ri | moneta-core/src/main/java/org/javamoney/moneta/internal/loader/DefaultLoaderService.java | DefaultLoaderService.initialize | void initialize() {
"""
This method reads initial loads from the javamoney.properties and installs the according timers.
"""
// Cancel any running tasks
Timer oldTimer = timer;
timer = new Timer(true);
if (Objects.nonNull(oldTimer)) {
oldTimer.cancel();
}
... | java | void initialize() {
// Cancel any running tasks
Timer oldTimer = timer;
timer = new Timer(true);
if (Objects.nonNull(oldTimer)) {
oldTimer.cancel();
}
// (re)initialize
LoaderConfigurator configurator = new LoaderConfigurator(this);
defaultLoad... | [
"void",
"initialize",
"(",
")",
"{",
"// Cancel any running tasks",
"Timer",
"oldTimer",
"=",
"timer",
";",
"timer",
"=",
"new",
"Timer",
"(",
"true",
")",
";",
"if",
"(",
"Objects",
".",
"nonNull",
"(",
"oldTimer",
")",
")",
"{",
"oldTimer",
".",
"cance... | This method reads initial loads from the javamoney.properties and installs the according timers. | [
"This",
"method",
"reads",
"initial",
"loads",
"from",
"the",
"javamoney",
".",
"properties",
"and",
"installs",
"the",
"according",
"timers",
"."
] | train | https://github.com/JavaMoney/jsr354-ri/blob/cf8ff2bbaf9b115acc05eb9b0c76c8397c308284/moneta-core/src/main/java/org/javamoney/moneta/internal/loader/DefaultLoaderService.java#L91-L102 |
Omertron/api-themoviedb | src/main/java/com/omertron/themoviedbapi/tools/HttpTools.java | HttpTools.postRequest | public String postRequest(final URL url, final String jsonBody) throws MovieDbException {
"""
POST content to the URL with the specified body
@param url URL to use in the request
@param jsonBody Body to use in the request
@return String content
@throws MovieDbException exception
"""
try {
... | java | public String postRequest(final URL url, final String jsonBody) throws MovieDbException {
try {
HttpPost httpPost = new HttpPost(url.toURI());
httpPost.addHeader(HTTP.CONTENT_TYPE, APPLICATION_JSON);
httpPost.addHeader(HttpHeaders.ACCEPT, APPLICATION_JSON);
String... | [
"public",
"String",
"postRequest",
"(",
"final",
"URL",
"url",
",",
"final",
"String",
"jsonBody",
")",
"throws",
"MovieDbException",
"{",
"try",
"{",
"HttpPost",
"httpPost",
"=",
"new",
"HttpPost",
"(",
"url",
".",
"toURI",
"(",
")",
")",
";",
"httpPost",... | POST content to the URL with the specified body
@param url URL to use in the request
@param jsonBody Body to use in the request
@return String content
@throws MovieDbException exception | [
"POST",
"content",
"to",
"the",
"URL",
"with",
"the",
"specified",
"body"
] | train | https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/tools/HttpTools.java#L127-L139 |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/content/PropertyTypeUrl.java | PropertyTypeUrl.getPropertyTypesUrl | public static MozuUrl getPropertyTypesUrl(Integer pageSize, String responseFields, Integer startIndex) {
"""
Get Resource Url for GetPropertyTypes
@param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For ... | java | public static MozuUrl getPropertyTypesUrl(Integer pageSize, String responseFields, Integer startIndex)
{
UrlFormatter formatter = new UrlFormatter("/api/content/propertytypes/?pageSize={pageSize}&startIndex={startIndex}&responseFields={responseFields}");
formatter.formatUrl("pageSize", pageSize);
formatter.f... | [
"public",
"static",
"MozuUrl",
"getPropertyTypesUrl",
"(",
"Integer",
"pageSize",
",",
"String",
"responseFields",
",",
"Integer",
"startIndex",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/content/propertytypes/?pageSize={pageSize}&startI... | Get Resource Url for GetPropertyTypes
@param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50.
@param respon... | [
"Get",
"Resource",
"Url",
"for",
"GetPropertyTypes"
] | train | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/content/PropertyTypeUrl.java#L23-L30 |
xcesco/kripton | kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/ManagedPropertyPersistenceHelper.java | ManagedPropertyPersistenceHelper.generateFieldPersistance | public static void generateFieldPersistance(BindTypeContext context, List<? extends ManagedModelProperty> collection, PersistType persistType, boolean forceName, Modifier... modifiers) {
"""
Manage field's persistence for both in SharedPreference and SQLite flavours.
@param context the context
@param collectio... | java | public static void generateFieldPersistance(BindTypeContext context, List<? extends ManagedModelProperty> collection, PersistType persistType, boolean forceName, Modifier... modifiers) {
for (ManagedModelProperty property : collection) {
if (property.bindProperty != null && !property.hasTypeAdapter()) {
// if... | [
"public",
"static",
"void",
"generateFieldPersistance",
"(",
"BindTypeContext",
"context",
",",
"List",
"<",
"?",
"extends",
"ManagedModelProperty",
">",
"collection",
",",
"PersistType",
"persistType",
",",
"boolean",
"forceName",
",",
"Modifier",
"...",
"modifiers",... | Manage field's persistence for both in SharedPreference and SQLite flavours.
@param context the context
@param collection the collection
@param persistType the persist type
@param forceName the force name
@param modifiers the modifiers | [
"Manage",
"field",
"s",
"persistence",
"for",
"both",
"in",
"SharedPreference",
"and",
"SQLite",
"flavours",
"."
] | train | https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/ManagedPropertyPersistenceHelper.java#L75-L91 |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/JDBCXADataSource.java | JDBCXADataSource.getXAConnection | public XAConnection getXAConnection() throws SQLException {
"""
Get new PHYSICAL connection, to be managed by a connection manager.
"""
// Comment out before public release:
System.err.print("Executing " + getClass().getName()
+ ".getXAConnection()...");
try {... | java | public XAConnection getXAConnection() throws SQLException {
// Comment out before public release:
System.err.print("Executing " + getClass().getName()
+ ".getXAConnection()...");
try {
Class.forName(driver).newInstance();
} catch (ClassNotFoundExcep... | [
"public",
"XAConnection",
"getXAConnection",
"(",
")",
"throws",
"SQLException",
"{",
"// Comment out before public release:",
"System",
".",
"err",
".",
"print",
"(",
"\"Executing \"",
"+",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
"+",
"\".getXAConnection().... | Get new PHYSICAL connection, to be managed by a connection manager. | [
"Get",
"new",
"PHYSICAL",
"connection",
"to",
"be",
"managed",
"by",
"a",
"connection",
"manager",
"."
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/JDBCXADataSource.java#L122-L157 |
gitblit/fathom | fathom-rest/src/main/java/fathom/rest/controller/ControllerHandler.java | ControllerHandler.findMethod | protected Method findMethod(Class<?> controllerClass, String name) {
"""
Finds the named controller method.
@param controllerClass
@param name
@return the controller method or null
"""
// identify first method which matches the name
Method controllerMethod = null;
for (Method metho... | java | protected Method findMethod(Class<?> controllerClass, String name) {
// identify first method which matches the name
Method controllerMethod = null;
for (Method method : controllerClass.getMethods()) {
if (method.getName().equals(name)) {
if (controllerMethod == null)... | [
"protected",
"Method",
"findMethod",
"(",
"Class",
"<",
"?",
">",
"controllerClass",
",",
"String",
"name",
")",
"{",
"// identify first method which matches the name",
"Method",
"controllerMethod",
"=",
"null",
";",
"for",
"(",
"Method",
"method",
":",
"controllerC... | Finds the named controller method.
@param controllerClass
@param name
@return the controller method or null | [
"Finds",
"the",
"named",
"controller",
"method",
"."
] | train | https://github.com/gitblit/fathom/blob/f2f820eb16e9fea1e36ad4eda4ed51b35f056538/fathom-rest/src/main/java/fathom/rest/controller/ControllerHandler.java#L275-L290 |
lucee/Lucee | core/src/main/java/lucee/runtime/tag/Ldap.java | Ldap.setSortcontrol | public void setSortcontrol(String sortControl) throws PageException {
"""
Specifies how to sort query results.
@param sortControl sortControl to set
@throws PageException
"""
String[] sortControlArr = ArrayUtil.trim(ListUtil.toStringArray(ListUtil.listToArrayRemoveEmpty(sortControl, ',')));
for (int i = ... | java | public void setSortcontrol(String sortControl) throws PageException {
String[] sortControlArr = ArrayUtil.trim(ListUtil.toStringArray(ListUtil.listToArrayRemoveEmpty(sortControl, ',')));
for (int i = 0; i < sortControlArr.length; i++) {
String scs = sortControlArr[i].trim().toLowerCase();
if (scs.equals("a... | [
"public",
"void",
"setSortcontrol",
"(",
"String",
"sortControl",
")",
"throws",
"PageException",
"{",
"String",
"[",
"]",
"sortControlArr",
"=",
"ArrayUtil",
".",
"trim",
"(",
"ListUtil",
".",
"toStringArray",
"(",
"ListUtil",
".",
"listToArrayRemoveEmpty",
"(",
... | Specifies how to sort query results.
@param sortControl sortControl to set
@throws PageException | [
"Specifies",
"how",
"to",
"sort",
"query",
"results",
"."
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ldap.java#L265-L276 |
cloudant/sync-android | cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/documentstore/MultipartAttachmentWriter.java | MultipartAttachmentWriter.addAttachment | public void addAttachment(Attachment attachment, long length) throws IOException {
"""
Add an attachment to be streamed as a subsequent MIME body.
Depending on the underlying attachment type, (eg file), this is done without loading the
entire attachment into memory.
@param attachment The attachment to be stre... | java | public void addAttachment(Attachment attachment, long length) throws IOException {
this.attachments.add(attachment);
contentLength += partBoundary.length;
contentLength += 6; // 3 * crlf
contentLength += length;
} | [
"public",
"void",
"addAttachment",
"(",
"Attachment",
"attachment",
",",
"long",
"length",
")",
"throws",
"IOException",
"{",
"this",
".",
"attachments",
".",
"add",
"(",
"attachment",
")",
";",
"contentLength",
"+=",
"partBoundary",
".",
"length",
";",
"conte... | Add an attachment to be streamed as a subsequent MIME body.
Depending on the underlying attachment type, (eg file), this is done without loading the
entire attachment into memory.
@param attachment The attachment to be streamed
@param length Size in bytes of attachment, as it will be transmitted over the network
(... | [
"Add",
"an",
"attachment",
"to",
"be",
"streamed",
"as",
"a",
"subsequent",
"MIME",
"body",
".",
"Depending",
"on",
"the",
"underlying",
"attachment",
"type",
"(",
"eg",
"file",
")",
"this",
"is",
"done",
"without",
"loading",
"the",
"entire",
"attachment",
... | train | https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/documentstore/MultipartAttachmentWriter.java#L160-L165 |
steveohara/j2mod | src/main/java/com/ghgande/j2mod/modbus/facade/AbstractModbusMaster.java | AbstractModbusMaster.maskWriteRegister | public boolean maskWriteRegister(int ref, int andMask, int orMask) throws ModbusException {
"""
Mask write a single register to the slave.
@param ref the offset of the register to start writing to.
@param andMask AND mask.
@param orMask OR mask.
@return true if success, i.e. response data equals... | java | public boolean maskWriteRegister(int ref, int andMask, int orMask) throws ModbusException {
return maskWriteRegister(DEFAULT_UNIT_ID, ref, andMask, orMask);
} | [
"public",
"boolean",
"maskWriteRegister",
"(",
"int",
"ref",
",",
"int",
"andMask",
",",
"int",
"orMask",
")",
"throws",
"ModbusException",
"{",
"return",
"maskWriteRegister",
"(",
"DEFAULT_UNIT_ID",
",",
"ref",
",",
"andMask",
",",
"orMask",
")",
";",
"}"
] | Mask write a single register to the slave.
@param ref the offset of the register to start writing to.
@param andMask AND mask.
@param orMask OR mask.
@return true if success, i.e. response data equals to request data, false otherwise.
@throws ModbusException if an I/O error, a slave exception or
a transac... | [
"Mask",
"write",
"a",
"single",
"register",
"to",
"the",
"slave",
"."
] | train | https://github.com/steveohara/j2mod/blob/67162c55d7c02564e50211a9df06b8314953b5f2/src/main/java/com/ghgande/j2mod/modbus/facade/AbstractModbusMaster.java#L473-L475 |
apache/incubator-heron | heron/common/src/java/org/apache/heron/common/utils/topology/GeneralTopologyContextImpl.java | GeneralTopologyContextImpl.getComponentOutputFields | public Fields getComponentOutputFields(String componentId, String streamId) {
"""
Gets the declared output fields for the specified component/stream.
"""
Map<String, Fields> componentFields = componentsOutputFields.get(componentId);
if (componentFields != null) {
return componentFields.get(stream... | java | public Fields getComponentOutputFields(String componentId, String streamId) {
Map<String, Fields> componentFields = componentsOutputFields.get(componentId);
if (componentFields != null) {
return componentFields.get(streamId);
}
return null;
} | [
"public",
"Fields",
"getComponentOutputFields",
"(",
"String",
"componentId",
",",
"String",
"streamId",
")",
"{",
"Map",
"<",
"String",
",",
"Fields",
">",
"componentFields",
"=",
"componentsOutputFields",
".",
"get",
"(",
"componentId",
")",
";",
"if",
"(",
... | Gets the declared output fields for the specified component/stream. | [
"Gets",
"the",
"declared",
"output",
"fields",
"for",
"the",
"specified",
"component",
"/",
"stream",
"."
] | train | https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/common/src/java/org/apache/heron/common/utils/topology/GeneralTopologyContextImpl.java#L182-L189 |
lightblueseas/swing-components | src/main/java/de/alpharogroup/layout/ScreenSizeExtensions.java | ScreenSizeExtensions.computeDialogPositions | public static List<Point> computeDialogPositions(final int dialogWidth, final int dialogHeight) {
"""
Compute how much dialog can be put into the screen and returns a list with the coordinates
from the dialog positions as Point objects.
@param dialogWidth
the dialog width
@param dialogHeight
the dialog heig... | java | public static List<Point> computeDialogPositions(final int dialogWidth, final int dialogHeight)
{
List<Point> dialogPosition = null;
final int windowBesides = ScreenSizeExtensions.getScreenWidth() / dialogWidth;
final int windowBelow = ScreenSizeExtensions.getScreenHeight() / dialogHeight;
final int listSize =... | [
"public",
"static",
"List",
"<",
"Point",
">",
"computeDialogPositions",
"(",
"final",
"int",
"dialogWidth",
",",
"final",
"int",
"dialogHeight",
")",
"{",
"List",
"<",
"Point",
">",
"dialogPosition",
"=",
"null",
";",
"final",
"int",
"windowBesides",
"=",
"... | Compute how much dialog can be put into the screen and returns a list with the coordinates
from the dialog positions as Point objects.
@param dialogWidth
the dialog width
@param dialogHeight
the dialog height
@return the list with the computed Point objects. | [
"Compute",
"how",
"much",
"dialog",
"can",
"be",
"put",
"into",
"the",
"screen",
"and",
"returns",
"a",
"list",
"with",
"the",
"coordinates",
"from",
"the",
"dialog",
"positions",
"as",
"Point",
"objects",
"."
] | train | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/layout/ScreenSizeExtensions.java#L65-L86 |
gsi-upm/BeastTool | beast-tool/src/main/java/es/upm/dit/gsi/beast/reader/mas/CreateMASCaseManager.java | CreateMASCaseManager.addStory | public static void addStory(File caseManager, String storyName,
String testPath, String user, String feature, String benefit) throws BeastException {
"""
The third method to write caseManager. Its task is to write the call to
the story to be run.
@param caseManager
the file where the test must be ... | java | public static void addStory(File caseManager, String storyName,
String testPath, String user, String feature, String benefit) throws BeastException {
FileWriter caseManagerWriter;
String storyClass = SystemReader.createClassName(storyName);
try {
BufferedReader reader = ... | [
"public",
"static",
"void",
"addStory",
"(",
"File",
"caseManager",
",",
"String",
"storyName",
",",
"String",
"testPath",
",",
"String",
"user",
",",
"String",
"feature",
",",
"String",
"benefit",
")",
"throws",
"BeastException",
"{",
"FileWriter",
"caseManager... | The third method to write caseManager. Its task is to write the call to
the story to be run.
@param caseManager
the file where the test must be written
@param storyName
the name of the story
@param test_path
the path where the story can be found
@param user
the user requesting the story
@param feature
the feature requ... | [
"The",
"third",
"method",
"to",
"write",
"caseManager",
".",
"Its",
"task",
"is",
"to",
"write",
"the",
"call",
"to",
"the",
"story",
"to",
"be",
"run",
"."
] | train | https://github.com/gsi-upm/BeastTool/blob/cc7fdc75cb818c5d60802aaf32c27829e0ca144c/beast-tool/src/main/java/es/upm/dit/gsi/beast/reader/mas/CreateMASCaseManager.java#L183-L236 |
hawkular/hawkular-apm | client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java | FragmentBuilder.setState | public void setState(Object context, String name, Object value) {
"""
This method stores state information associated with the name and optional
context.
@param context The optional context
@param name The name
@param value The value
"""
StateInformation si = stateInformation.get(name);
i... | java | public void setState(Object context, String name, Object value) {
StateInformation si = stateInformation.get(name);
if (si == null) {
si = new StateInformation();
stateInformation.put(name, si);
}
si.set(context, value);
} | [
"public",
"void",
"setState",
"(",
"Object",
"context",
",",
"String",
"name",
",",
"Object",
"value",
")",
"{",
"StateInformation",
"si",
"=",
"stateInformation",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"si",
"==",
"null",
")",
"{",
"si",
"=",
... | This method stores state information associated with the name and optional
context.
@param context The optional context
@param name The name
@param value The value | [
"This",
"method",
"stores",
"state",
"information",
"associated",
"with",
"the",
"name",
"and",
"optional",
"context",
"."
] | train | https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L598-L605 |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/xml/XmlBeanAssert.java | XmlBeanAssert.assertEquals | public static void assertEquals(String message, XmlObject expected, XmlObject actual) {
"""
Asserts that two XmlBeans are equivalent based on a deep compare (ignoring
whitespace and ordering of element attributes). If the two XmlBeans are
not equivalent, an AssertionFailedError is thrown, failing the test case.
... | java | public static void assertEquals(String message, XmlObject expected, XmlObject actual)
{
assertEquals(message, expected.newCursor(), actual.newCursor());
} | [
"public",
"static",
"void",
"assertEquals",
"(",
"String",
"message",
",",
"XmlObject",
"expected",
",",
"XmlObject",
"actual",
")",
"{",
"assertEquals",
"(",
"message",
",",
"expected",
".",
"newCursor",
"(",
")",
",",
"actual",
".",
"newCursor",
"(",
")",
... | Asserts that two XmlBeans are equivalent based on a deep compare (ignoring
whitespace and ordering of element attributes). If the two XmlBeans are
not equivalent, an AssertionFailedError is thrown, failing the test case.
Note: we can't provide line numbers since XmlBeans only makes these available
if we're using the P... | [
"Asserts",
"that",
"two",
"XmlBeans",
"are",
"equivalent",
"based",
"on",
"a",
"deep",
"compare",
"(",
"ignoring",
"whitespace",
"and",
"ordering",
"of",
"element",
"attributes",
")",
".",
"If",
"the",
"two",
"XmlBeans",
"are",
"not",
"equivalent",
"an",
"As... | train | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/xml/XmlBeanAssert.java#L67-L70 |
amaembo/streamex | src/main/java/one/util/streamex/StreamEx.java | StreamEx.toSortedMap | public <K, V> SortedMap<K, V> toSortedMap(Function<? super T, ? extends K> keyMapper,
Function<? super T, ? extends V> valMapper) {
"""
Returns a {@link SortedMap} whose keys and values are the result of
applying the provided mapping functions to the input elements.
<p>
This is a <a href="package-... | java | public <K, V> SortedMap<K, V> toSortedMap(Function<? super T, ? extends K> keyMapper,
Function<? super T, ? extends V> valMapper) {
SortedMap<K, V> map = isParallel() ? new ConcurrentSkipListMap<>() : new TreeMap<>();
return toMapThrowing(keyMapper, valMapper, map);
} | [
"public",
"<",
"K",
",",
"V",
">",
"SortedMap",
"<",
"K",
",",
"V",
">",
"toSortedMap",
"(",
"Function",
"<",
"?",
"super",
"T",
",",
"?",
"extends",
"K",
">",
"keyMapper",
",",
"Function",
"<",
"?",
"super",
"T",
",",
"?",
"extends",
"V",
">",
... | Returns a {@link SortedMap} whose keys and values are the result of
applying the provided mapping functions to the input elements.
<p>
This is a <a href="package-summary.html#StreamOps">terminal</a>
operation.
<p>
If the mapped keys contains duplicates (according to
{@link Object#equals(Object)}), an {@code IllegalSt... | [
"Returns",
"a",
"{",
"@link",
"SortedMap",
"}",
"whose",
"keys",
"and",
"values",
"are",
"the",
"result",
"of",
"applying",
"the",
"provided",
"mapping",
"functions",
"to",
"the",
"input",
"elements",
"."
] | train | https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/StreamEx.java#L1107-L1111 |
alkacon/opencms-core | src/org/opencms/workflow/CmsDefaultWorkflowManager.java | CmsDefaultWorkflowManager.getLabel | public String getLabel(CmsObject cms, String key) {
"""
Gets the localized label for a given CMS context and key.<p>
@param cms the CMS context
@param key the localization key
@return the localized label
"""
CmsMessages messages = Messages.get().getBundle(getLocale(cms));
return mess... | java | public String getLabel(CmsObject cms, String key) {
CmsMessages messages = Messages.get().getBundle(getLocale(cms));
return messages.key(key);
} | [
"public",
"String",
"getLabel",
"(",
"CmsObject",
"cms",
",",
"String",
"key",
")",
"{",
"CmsMessages",
"messages",
"=",
"Messages",
".",
"get",
"(",
")",
".",
"getBundle",
"(",
"getLocale",
"(",
"cms",
")",
")",
";",
"return",
"messages",
".",
"key",
... | Gets the localized label for a given CMS context and key.<p>
@param cms the CMS context
@param key the localization key
@return the localized label | [
"Gets",
"the",
"localized",
"label",
"for",
"a",
"given",
"CMS",
"context",
"and",
"key",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workflow/CmsDefaultWorkflowManager.java#L215-L219 |
kirgor/enklib | sql/src/main/java/com/kirgor/enklib/sql/Session.java | Session.getCursor | public <T> Cursor<T> getCursor(String query, Class<T> entityClass, Object... params) throws NoSuchFieldException, SQLException {
"""
Creates cursor, which can be used for fetching data in partial mode.
@param <T> Entity type.
@param query SQL query string.
@param entityClass Entity class.
@para... | java | public <T> Cursor<T> getCursor(String query, Class<T> entityClass, Object... params) throws NoSuchFieldException, SQLException {
return getCursor(query, entityClass, 20, params);
} | [
"public",
"<",
"T",
">",
"Cursor",
"<",
"T",
">",
"getCursor",
"(",
"String",
"query",
",",
"Class",
"<",
"T",
">",
"entityClass",
",",
"Object",
"...",
"params",
")",
"throws",
"NoSuchFieldException",
",",
"SQLException",
"{",
"return",
"getCursor",
"(",
... | Creates cursor, which can be used for fetching data in partial mode.
@param <T> Entity type.
@param query SQL query string.
@param entityClass Entity class.
@param params Parameters, which will be placed instead of '?' signs.
@return Single result entity or null.
@throws SQLException In gene... | [
"Creates",
"cursor",
"which",
"can",
"be",
"used",
"for",
"fetching",
"data",
"in",
"partial",
"mode",
"."
] | train | https://github.com/kirgor/enklib/blob/8a24db296dc43db5d8fe509cf64ace0a0c7be8f2/sql/src/main/java/com/kirgor/enklib/sql/Session.java#L185-L187 |
OpenTSDB/opentsdb | src/tools/ConfigArgP.java | ConfigArgP.processBindings | protected void processBindings(ObjectMapper jsonMapper, JsonNode root) {
"""
Checks the <b><code>opentsdb.conf.json</code></b> document to see if it has a <b><code>bindings</code></b> segment
which contains JS statements to evaluate which will prime variables used by the configuration.
@param jsonMapper The JSON... | java | protected void processBindings(ObjectMapper jsonMapper, JsonNode root) {
String script = null;
try {
if(root.has("bindings")) {
JsonNode bindingsNode = root.get("bindings");
if(bindingsNode.isArray()) {
String[] jsLines = jsonMapper.reader(String[].class).readValue(bindingsNode);... | [
"protected",
"void",
"processBindings",
"(",
"ObjectMapper",
"jsonMapper",
",",
"JsonNode",
"root",
")",
"{",
"String",
"script",
"=",
"null",
";",
"try",
"{",
"if",
"(",
"root",
".",
"has",
"(",
"\"bindings\"",
")",
")",
"{",
"JsonNode",
"bindingsNode",
"... | Checks the <b><code>opentsdb.conf.json</code></b> document to see if it has a <b><code>bindings</code></b> segment
which contains JS statements to evaluate which will prime variables used by the configuration.
@param jsonMapper The JSON mapper
@param root The root <b><code>opentsdb.conf.json</code></b> document | [
"Checks",
"the",
"<b",
">",
"<code",
">",
"opentsdb",
".",
"conf",
".",
"json<",
"/",
"code",
">",
"<",
"/",
"b",
">",
"document",
"to",
"see",
"if",
"it",
"has",
"a",
"<b",
">",
"<code",
">",
"bindings<",
"/",
"code",
">",
"<",
"/",
"b",
">",
... | train | https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tools/ConfigArgP.java#L819-L838 |
bbottema/simple-java-mail | modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageHelper.java | MimeMessageHelper.configureForwarding | static void configureForwarding(@Nonnull final Email email, @Nonnull final MimeMultipart multipartRootMixed) throws MessagingException {
"""
If provided, adds the {@code emailToForward} as a MimeBodyPart to the mixed multipart root.
<p>
<strong>Note:</strong> this is done without setting {@code Content-Dispositi... | java | static void configureForwarding(@Nonnull final Email email, @Nonnull final MimeMultipart multipartRootMixed) throws MessagingException {
if (email.getEmailToForward() != null) {
final BodyPart fordwardedMessage = new MimeBodyPart();
fordwardedMessage.setContent(email.getEmailToForward(), "message/rfc822");
m... | [
"static",
"void",
"configureForwarding",
"(",
"@",
"Nonnull",
"final",
"Email",
"email",
",",
"@",
"Nonnull",
"final",
"MimeMultipart",
"multipartRootMixed",
")",
"throws",
"MessagingException",
"{",
"if",
"(",
"email",
".",
"getEmailToForward",
"(",
")",
"!=",
... | If provided, adds the {@code emailToForward} as a MimeBodyPart to the mixed multipart root.
<p>
<strong>Note:</strong> this is done without setting {@code Content-Disposition} so email clients can choose
how to display embedded forwards. Most client will show the forward as inline, some may show it as attachment. | [
"If",
"provided",
"adds",
"the",
"{"
] | train | https://github.com/bbottema/simple-java-mail/blob/b03635328aeecd525e35eddfef8f5b9a184559d8/modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageHelper.java#L143-L149 |
keshrath/Giphy4J | src/main/java/at/mukprojects/giphy4j/Giphy.java | Giphy.searchByID | public SearchGiphy searchByID(String id) throws GiphyException {
"""
Returns a SerachGiphy object.
<p>
Be aware that not every response has all information available. In that
case the value will be returned as null.
@param id
the Giphy id
@return the SerachGiphy object
@throws GiphyException
if an erro... | java | public SearchGiphy searchByID(String id) throws GiphyException {
SearchGiphy giphy = null;
HashMap<String, String> params = new HashMap<String, String>();
params.put("api_key", apiKey);
Request request = new Request(UrlUtil.buildUrlQuery(IDEndpoint + id, params));
try {
Response response = sender.sendRequ... | [
"public",
"SearchGiphy",
"searchByID",
"(",
"String",
"id",
")",
"throws",
"GiphyException",
"{",
"SearchGiphy",
"giphy",
"=",
"null",
";",
"HashMap",
"<",
"String",
",",
"String",
">",
"params",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(... | Returns a SerachGiphy object.
<p>
Be aware that not every response has all information available. In that
case the value will be returned as null.
@param id
the Giphy id
@return the SerachGiphy object
@throws GiphyException
if an error occurs during the search | [
"Returns",
"a",
"SerachGiphy",
"object",
"."
] | train | https://github.com/keshrath/Giphy4J/blob/e56b67f161e2184ccff9b9e8f95a70ef89cec897/src/main/java/at/mukprojects/giphy4j/Giphy.java#L178-L196 |
NessComputing/components-ness-event | core/src/main/java/com/nesscomputing/event/NessEvent.java | NessEvent.createEvent | @JsonCreator
static NessEvent createEvent(@Nullable @JsonProperty("user") final UUID user,
@Nullable @JsonProperty("timestamp") final DateTime timestamp,
@Nonnull @JsonProperty("id") final UUID id,
... | java | @JsonCreator
static NessEvent createEvent(@Nullable @JsonProperty("user") final UUID user,
@Nullable @JsonProperty("timestamp") final DateTime timestamp,
@Nonnull @JsonProperty("id") final UUID id,
... | [
"@",
"JsonCreator",
"static",
"NessEvent",
"createEvent",
"(",
"@",
"Nullable",
"@",
"JsonProperty",
"(",
"\"user\"",
")",
"final",
"UUID",
"user",
",",
"@",
"Nullable",
"@",
"JsonProperty",
"(",
"\"timestamp\"",
")",
"final",
"DateTime",
"timestamp",
",",
"@"... | Create a new event from over-the-wire json.
@param user User that the event happened for. Can be null for a system level event.
@param timestamp The time when this event entered the system
@param type The Event type.
@param payload Arbitrary data describing the event.
@param id UUID as event id. | [
"Create",
"a",
"new",
"event",
"from",
"over",
"-",
"the",
"-",
"wire",
"json",
"."
] | train | https://github.com/NessComputing/components-ness-event/blob/6d41f9e7c810c3ffa6bb79e19bb8cfb1d1c12c33/core/src/main/java/com/nesscomputing/event/NessEvent.java#L63-L71 |
find-sec-bugs/find-sec-bugs | findsecbugs-plugin/src/main/java/com/h3xstream/findsecbugs/injection/BasicInjectionDetector.java | BasicInjectionDetector.loadConfiguredSinks | protected void loadConfiguredSinks(String filename, String bugType) {
"""
Loads taint sinks from configuration
@param filename name of the configuration file
@param bugType type of an injection bug
"""
SINKS_LOADER.loadConfiguredSinks(filename, bugType, new SinksLoader.InjectionPointReceiver() {
... | java | protected void loadConfiguredSinks(String filename, String bugType) {
SINKS_LOADER.loadConfiguredSinks(filename, bugType, new SinksLoader.InjectionPointReceiver() {
@Override
public void receiveInjectionPoint(String fullMethodName, InjectionPoint injectionPoint) {
addPars... | [
"protected",
"void",
"loadConfiguredSinks",
"(",
"String",
"filename",
",",
"String",
"bugType",
")",
"{",
"SINKS_LOADER",
".",
"loadConfiguredSinks",
"(",
"filename",
",",
"bugType",
",",
"new",
"SinksLoader",
".",
"InjectionPointReceiver",
"(",
")",
"{",
"@",
... | Loads taint sinks from configuration
@param filename name of the configuration file
@param bugType type of an injection bug | [
"Loads",
"taint",
"sinks",
"from",
"configuration"
] | train | https://github.com/find-sec-bugs/find-sec-bugs/blob/362da013cef4925e6a1506dd3511fe5bdcc5fba3/findsecbugs-plugin/src/main/java/com/h3xstream/findsecbugs/injection/BasicInjectionDetector.java#L108-L115 |
ontop/ontop | core/model/src/main/java/it/unibz/inf/ontop/dbschema/RelationID.java | RelationID.createRelationIdFromDatabaseRecord | public static RelationID createRelationIdFromDatabaseRecord(QuotedIDFactory idfac, String schema, String table) {
"""
creates relation id from the database record (as though it is quoted)
@param schema as is in DB (possibly null)
@param table as is in DB
@return
"""
// both IDs are as though they are qu... | java | public static RelationID createRelationIdFromDatabaseRecord(QuotedIDFactory idfac, String schema, String table) {
// both IDs are as though they are quoted -- DB stores names as is
return new RelationID(QuotedID.createIdFromDatabaseRecord(idfac, schema),
QuotedID.createIdFromDatabaseRecord(idfac, table));... | [
"public",
"static",
"RelationID",
"createRelationIdFromDatabaseRecord",
"(",
"QuotedIDFactory",
"idfac",
",",
"String",
"schema",
",",
"String",
"table",
")",
"{",
"// both IDs are as though they are quoted -- DB stores names as is ",
"return",
"new",
"RelationID",
"(",
"Quot... | creates relation id from the database record (as though it is quoted)
@param schema as is in DB (possibly null)
@param table as is in DB
@return | [
"creates",
"relation",
"id",
"from",
"the",
"database",
"record",
"(",
"as",
"though",
"it",
"is",
"quoted",
")"
] | train | https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/dbschema/RelationID.java#L58-L62 |
sawano/java-commons | src/main/java/se/sawano/java/commons/lang/validate/Validate.java | Validate.exclusiveBetween | @SuppressWarnings("boxing")
public static double exclusiveBetween(double start, double end, double value) {
"""
Validate that the specified primitive value falls between the two exclusive values specified; otherwise, throws an exception.
<pre>Validate.exclusiveBetween(0.1, 2.1, 1.1);</pre>
@param start
th... | java | @SuppressWarnings("boxing")
public static double exclusiveBetween(double start, double end, double value) {
return INSTANCE.exclusiveBetween(start, end, value);
} | [
"@",
"SuppressWarnings",
"(",
"\"boxing\"",
")",
"public",
"static",
"double",
"exclusiveBetween",
"(",
"double",
"start",
",",
"double",
"end",
",",
"double",
"value",
")",
"{",
"return",
"INSTANCE",
".",
"exclusiveBetween",
"(",
"start",
",",
"end",
",",
"... | Validate that the specified primitive value falls between the two exclusive values specified; otherwise, throws an exception.
<pre>Validate.exclusiveBetween(0.1, 2.1, 1.1);</pre>
@param start
the exclusive start value
@param end
the exclusive end value
@param value
the value to validate
@return the value
@throws Ill... | [
"Validate",
"that",
"the",
"specified",
"primitive",
"value",
"falls",
"between",
"the",
"two",
"exclusive",
"values",
"specified",
";",
"otherwise",
"throws",
"an",
"exception",
".",
"<pre",
">",
"Validate",
".",
"exclusiveBetween",
"(",
"0",
".",
"1",
"2",
... | train | https://github.com/sawano/java-commons/blob/6f219c9e8dec4401dbe528d17ae6ec1ef9c0d284/src/main/java/se/sawano/java/commons/lang/validate/Validate.java#L1662-L1665 |
apache/incubator-gobblin | gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/HiveProxyQueryExecutor.java | HiveProxyQueryExecutor.executeQuery | public void executeQuery(String query, Optional<String> proxy)
throws SQLException {
"""
Execute query.
@param query the query
@param proxy the proxy
@throws SQLException the sql exception
"""
executeQueries(Collections.singletonList(query), proxy);
} | java | public void executeQuery(String query, Optional<String> proxy)
throws SQLException {
executeQueries(Collections.singletonList(query), proxy);
} | [
"public",
"void",
"executeQuery",
"(",
"String",
"query",
",",
"Optional",
"<",
"String",
">",
"proxy",
")",
"throws",
"SQLException",
"{",
"executeQueries",
"(",
"Collections",
".",
"singletonList",
"(",
"query",
")",
",",
"proxy",
")",
";",
"}"
] | Execute query.
@param query the query
@param proxy the proxy
@throws SQLException the sql exception | [
"Execute",
"query",
"."
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/HiveProxyQueryExecutor.java#L200-L203 |
Jasig/uPortal | uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java | UrlStringBuilder.addParameter | public UrlStringBuilder addParameter(String name, String... values) {
"""
Adds to a URL parameter, if a parameter with the same name already exists its values are
added to
@param name Parameter name, can not be null
@param values Values for the parameter, null is valid
@return this
"""
this.addPa... | java | public UrlStringBuilder addParameter(String name, String... values) {
this.addParameter(name, values != null ? Arrays.asList(values) : null);
return this;
} | [
"public",
"UrlStringBuilder",
"addParameter",
"(",
"String",
"name",
",",
"String",
"...",
"values",
")",
"{",
"this",
".",
"addParameter",
"(",
"name",
",",
"values",
"!=",
"null",
"?",
"Arrays",
".",
"asList",
"(",
"values",
")",
":",
"null",
")",
";",... | Adds to a URL parameter, if a parameter with the same name already exists its values are
added to
@param name Parameter name, can not be null
@param values Values for the parameter, null is valid
@return this | [
"Adds",
"to",
"a",
"URL",
"parameter",
"if",
"a",
"parameter",
"with",
"the",
"same",
"name",
"already",
"exists",
"its",
"values",
"are",
"added",
"to"
] | train | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java#L137-L140 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Collections.java | Collections.addAll | @SafeVarargs
public static <T> boolean addAll(Collection<? super T> c, T... elements) {
"""
Adds all of the specified elements to the specified collection.
Elements to be added may be specified individually or as an array.
The behavior of this convenience method is identical to that of
<tt>c.addAll(Arrays.a... | java | @SafeVarargs
public static <T> boolean addAll(Collection<? super T> c, T... elements) {
boolean result = false;
for (T element : elements)
result |= c.add(element);
return result;
} | [
"@",
"SafeVarargs",
"public",
"static",
"<",
"T",
">",
"boolean",
"addAll",
"(",
"Collection",
"<",
"?",
"super",
"T",
">",
"c",
",",
"T",
"...",
"elements",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"for",
"(",
"T",
"element",
":",
"elements... | Adds all of the specified elements to the specified collection.
Elements to be added may be specified individually or as an array.
The behavior of this convenience method is identical to that of
<tt>c.addAll(Arrays.asList(elements))</tt>, but this method is likely
to run significantly faster under most implementations.... | [
"Adds",
"all",
"of",
"the",
"specified",
"elements",
"to",
"the",
"specified",
"collection",
".",
"Elements",
"to",
"be",
"added",
"may",
"be",
"specified",
"individually",
"or",
"as",
"an",
"array",
".",
"The",
"behavior",
"of",
"this",
"convenience",
"meth... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Collections.java#L5437-L5443 |
liferay/com-liferay-commerce | commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceRegionPersistenceImpl.java | CommerceRegionPersistenceImpl.fetchByUUID_G | @Override
public CommerceRegion fetchByUUID_G(String uuid, long groupId) {
"""
Returns the commerce region where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache.
@param uuid the uuid
@param groupId the group ID
@return the matching commerce region... | java | @Override
public CommerceRegion fetchByUUID_G(String uuid, long groupId) {
return fetchByUUID_G(uuid, groupId, true);
} | [
"@",
"Override",
"public",
"CommerceRegion",
"fetchByUUID_G",
"(",
"String",
"uuid",
",",
"long",
"groupId",
")",
"{",
"return",
"fetchByUUID_G",
"(",
"uuid",
",",
"groupId",
",",
"true",
")",
";",
"}"
] | Returns the commerce region where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache.
@param uuid the uuid
@param groupId the group ID
@return the matching commerce region, or <code>null</code> if a matching commerce region could not be found | [
"Returns",
"the",
"commerce",
"region",
"where",
"uuid",
"=",
"?",
";",
"and",
"groupId",
"=",
"?",
";",
"or",
"returns",
"<code",
">",
"null<",
"/",
"code",
">",
"if",
"it",
"could",
"not",
"be",
"found",
".",
"Uses",
"the",
"finder",
"cache",
... | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceRegionPersistenceImpl.java#L700-L703 |
alkacon/opencms-core | src/org/opencms/security/CmsPrincipal.java | CmsPrincipal.getDisplayName | public String getDisplayName(CmsObject cms, Locale locale) throws CmsException {
"""
Returns the display name of this principal including the organizational unit.<p>
@param cms the cms context
@param locale the locale
@return the display name of this principal including the organizational unit
@throws Cm... | java | public String getDisplayName(CmsObject cms, Locale locale) throws CmsException {
return Messages.get().getBundle(locale).key(
Messages.GUI_PRINCIPAL_DISPLAY_NAME_2,
getSimpleName(),
OpenCms.getOrgUnitManager().readOrganizationalUnit(cms, getOuFqn()).getDisplayName(locale));
... | [
"public",
"String",
"getDisplayName",
"(",
"CmsObject",
"cms",
",",
"Locale",
"locale",
")",
"throws",
"CmsException",
"{",
"return",
"Messages",
".",
"get",
"(",
")",
".",
"getBundle",
"(",
"locale",
")",
".",
"key",
"(",
"Messages",
".",
"GUI_PRINCIPAL_DIS... | Returns the display name of this principal including the organizational unit.<p>
@param cms the cms context
@param locale the locale
@return the display name of this principal including the organizational unit
@throws CmsException if the organizational unit could not be read | [
"Returns",
"the",
"display",
"name",
"of",
"this",
"principal",
"including",
"the",
"organizational",
"unit",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/security/CmsPrincipal.java#L408-L414 |
apache/groovy | src/main/groovy/groovy/lang/Closure.java | Closure.rightShift | public <W> Closure<W> rightShift(final Closure<W> other) {
"""
Support for Closure forward composition.
<p>
Typical usage:
<pre class="groovyTestCase">
def times2 = { a {@code ->} a * 2 }
def add3 = { a {@code ->} a + 3 }
def timesThenAdd = times2 {@code >>} add3
// equivalent: timesThenAdd = { a {@code ->}... | java | public <W> Closure<W> rightShift(final Closure<W> other) {
return new ComposedClosure<W>(this, other);
} | [
"public",
"<",
"W",
">",
"Closure",
"<",
"W",
">",
"rightShift",
"(",
"final",
"Closure",
"<",
"W",
">",
"other",
")",
"{",
"return",
"new",
"ComposedClosure",
"<",
"W",
">",
"(",
"this",
",",
"other",
")",
";",
"}"
] | Support for Closure forward composition.
<p>
Typical usage:
<pre class="groovyTestCase">
def times2 = { a {@code ->} a * 2 }
def add3 = { a {@code ->} a + 3 }
def timesThenAdd = times2 {@code >>} add3
// equivalent: timesThenAdd = { a {@code ->} add3(times2(a)) }
assert timesThenAdd(3) == 9
</pre>
@param other the Clo... | [
"Support",
"for",
"Closure",
"forward",
"composition",
".",
"<p",
">",
"Typical",
"usage",
":",
"<pre",
"class",
"=",
"groovyTestCase",
">",
"def",
"times2",
"=",
"{",
"a",
"{",
"@code",
"-",
">",
"}",
"a",
"*",
"2",
"}",
"def",
"add3",
"=",
"{",
"... | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/lang/Closure.java#L636-L638 |
susom/database | src/main/java/com/github/susom/database/DatabaseProvider.java | DatabaseProvider.fromPropertyFile | public static Builder fromPropertyFile(String filename, String propertyPrefix, CharsetDecoder decoder) {
"""
Configure the database from up to five properties read from a file:
<br/>
<pre>
database.url=... Database connect string (required)
database.user=... Authenticate as this user (optional if prov... | java | public static Builder fromPropertyFile(String filename, String propertyPrefix, CharsetDecoder decoder) {
Properties properties = new Properties();
if (filename != null && filename.length() > 0) {
try {
properties.load(new InputStreamReader(new FileInputStream(filename), decoder));
} catch (E... | [
"public",
"static",
"Builder",
"fromPropertyFile",
"(",
"String",
"filename",
",",
"String",
"propertyPrefix",
",",
"CharsetDecoder",
"decoder",
")",
"{",
"Properties",
"properties",
"=",
"new",
"Properties",
"(",
")",
";",
"if",
"(",
"filename",
"!=",
"null",
... | Configure the database from up to five properties read from a file:
<br/>
<pre>
database.url=... Database connect string (required)
database.user=... Authenticate as this user (optional if provided in url)
database.password=... User password (optional if user and password provided in
url; prompted on standard ... | [
"Configure",
"the",
"database",
"from",
"up",
"to",
"five",
"properties",
"read",
"from",
"a",
"file",
":",
"<br",
"/",
">",
"<pre",
">",
"database",
".",
"url",
"=",
"...",
"Database",
"connect",
"string",
"(",
"required",
")",
"database",
".",
"user",
... | train | https://github.com/susom/database/blob/25add9e08ad863712f9b5e319b6cb826f6f97640/src/main/java/com/github/susom/database/DatabaseProvider.java#L340-L350 |
biojava/biojava | biojava-survival/src/main/java/org/biojava/nbio/survival/kaplanmeier/figure/KaplanMeierFigure.java | KaplanMeierFigure.setSurvivalData | public void setSurvivalData(ArrayList<String> title, LinkedHashMap<String, ArrayList<CensorStatus>> survivalData, Boolean useWeighted) throws Exception {
"""
The data will set the max time which will result in off time points for
tick marks
@param title
@param survivalData
@param useWeighted
@throws Excepti... | java | public void setSurvivalData(ArrayList<String> title, LinkedHashMap<String, ArrayList<CensorStatus>> survivalData, Boolean useWeighted) throws Exception {
this.setSurvivalData(title, survivalData, null, useWeighted);
} | [
"public",
"void",
"setSurvivalData",
"(",
"ArrayList",
"<",
"String",
">",
"title",
",",
"LinkedHashMap",
"<",
"String",
",",
"ArrayList",
"<",
"CensorStatus",
">",
">",
"survivalData",
",",
"Boolean",
"useWeighted",
")",
"throws",
"Exception",
"{",
"this",
".... | The data will set the max time which will result in off time points for
tick marks
@param title
@param survivalData
@param useWeighted
@throws Exception | [
"The",
"data",
"will",
"set",
"the",
"max",
"time",
"which",
"will",
"result",
"in",
"off",
"time",
"points",
"for",
"tick",
"marks"
] | train | https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/kaplanmeier/figure/KaplanMeierFigure.java#L290-L292 |
SonarSource/sonarqube | sonar-plugin-api/src/main/java/org/sonar/api/server/ws/Request.java | Request.mandatoryParamAsLong | public long mandatoryParamAsLong(String key) {
"""
Returns a long value. To be used when parameter is required or has a default value.
@throws java.lang.IllegalArgumentException is value is null or blank
"""
String s = mandatoryParam(key);
return parseLong(key, s);
} | java | public long mandatoryParamAsLong(String key) {
String s = mandatoryParam(key);
return parseLong(key, s);
} | [
"public",
"long",
"mandatoryParamAsLong",
"(",
"String",
"key",
")",
"{",
"String",
"s",
"=",
"mandatoryParam",
"(",
"key",
")",
";",
"return",
"parseLong",
"(",
"key",
",",
"s",
")",
";",
"}"
] | Returns a long value. To be used when parameter is required or has a default value.
@throws java.lang.IllegalArgumentException is value is null or blank | [
"Returns",
"a",
"long",
"value",
".",
"To",
"be",
"used",
"when",
"parameter",
"is",
"required",
"or",
"has",
"a",
"default",
"value",
"."
] | train | https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/Request.java#L109-L112 |
JOML-CI/JOML | src/org/joml/Quaternionf.java | Quaternionf.rotationXYZ | public Quaternionf rotationXYZ(float angleX, float angleY, float angleZ) {
"""
Set this quaternion from the supplied euler angles (in radians) with rotation order XYZ.
<p>
This method is equivalent to calling: <code>rotationX(angleX).rotateY(angleY).rotateZ(angleZ)</code>
<p>
Reference: <a href="http://gamedev... | java | public Quaternionf rotationXYZ(float angleX, float angleY, float angleZ) {
float sx = (float) Math.sin(angleX * 0.5);
float cx = (float) Math.cosFromSin(sx, angleX * 0.5);
float sy = (float) Math.sin(angleY * 0.5);
float cy = (float) Math.cosFromSin(sy, angleY * 0.5);
float sz = ... | [
"public",
"Quaternionf",
"rotationXYZ",
"(",
"float",
"angleX",
",",
"float",
"angleY",
",",
"float",
"angleZ",
")",
"{",
"float",
"sx",
"=",
"(",
"float",
")",
"Math",
".",
"sin",
"(",
"angleX",
"*",
"0.5",
")",
";",
"float",
"cx",
"=",
"(",
"float"... | Set this quaternion from the supplied euler angles (in radians) with rotation order XYZ.
<p>
This method is equivalent to calling: <code>rotationX(angleX).rotateY(angleY).rotateZ(angleZ)</code>
<p>
Reference: <a href="http://gamedev.stackexchange.com/questions/13436/glm-euler-angles-to-quaternion#answer-13446">this sta... | [
"Set",
"this",
"quaternion",
"from",
"the",
"supplied",
"euler",
"angles",
"(",
"in",
"radians",
")",
"with",
"rotation",
"order",
"XYZ",
".",
"<p",
">",
"This",
"method",
"is",
"equivalent",
"to",
"calling",
":",
"<code",
">",
"rotationX",
"(",
"angleX",
... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Quaternionf.java#L1635-L1653 |
spotify/logging-java | src/main/java/com/spotify/logging/LoggingConfigurator.java | LoggingConfigurator.addSentryAppender | public static SentryAppender addSentryAppender(final String dsn, Level logLevelThreshold) {
"""
Add a sentry appender.
@param dsn the sentry dsn to use (as produced by the sentry webinterface).
@param logLevelThreshold the threshold for log events to be sent to sentry.
@return the configured sentry appender.
... | java | public static SentryAppender addSentryAppender(final String dsn, Level logLevelThreshold) {
final Logger rootLogger = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
final LoggerContext context = rootLogger.getLoggerContext();
SentryAppender appender = new SentryAppender();
appender.setDsn(... | [
"public",
"static",
"SentryAppender",
"addSentryAppender",
"(",
"final",
"String",
"dsn",
",",
"Level",
"logLevelThreshold",
")",
"{",
"final",
"Logger",
"rootLogger",
"=",
"(",
"Logger",
")",
"LoggerFactory",
".",
"getLogger",
"(",
"Logger",
".",
"ROOT_LOGGER_NAM... | Add a sentry appender.
@param dsn the sentry dsn to use (as produced by the sentry webinterface).
@param logLevelThreshold the threshold for log events to be sent to sentry.
@return the configured sentry appender. | [
"Add",
"a",
"sentry",
"appender",
"."
] | train | https://github.com/spotify/logging-java/blob/73a7ebf6578c5f4228953375214a0afb44318d4d/src/main/java/com/spotify/logging/LoggingConfigurator.java#L300-L319 |
ngageoint/geopackage-android-map | geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java | StyleUtils.createMarkerOptions | public static MarkerOptions createMarkerOptions(FeatureStyle featureStyle, float density, IconCache iconCache) {
"""
Create new marker options populated with the feature style (icon or style)
@param featureStyle feature style
@param density display density: {@link android.util.DisplayMetrics#density}
@pa... | java | public static MarkerOptions createMarkerOptions(FeatureStyle featureStyle, float density, IconCache iconCache) {
MarkerOptions markerOptions = new MarkerOptions();
setFeatureStyle(markerOptions, featureStyle, density, iconCache);
return markerOptions;
} | [
"public",
"static",
"MarkerOptions",
"createMarkerOptions",
"(",
"FeatureStyle",
"featureStyle",
",",
"float",
"density",
",",
"IconCache",
"iconCache",
")",
"{",
"MarkerOptions",
"markerOptions",
"=",
"new",
"MarkerOptions",
"(",
")",
";",
"setFeatureStyle",
"(",
"... | Create new marker options populated with the feature style (icon or style)
@param featureStyle feature style
@param density display density: {@link android.util.DisplayMetrics#density}
@param iconCache icon cache
@return marker options populated with the feature style | [
"Create",
"new",
"marker",
"options",
"populated",
"with",
"the",
"feature",
"style",
"(",
"icon",
"or",
"style",
")"
] | train | https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java#L168-L174 |
UrielCh/ovh-java-sdk | ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java | ApiOvhHostingweb.serviceName_database_name_dump_id_GET | public OvhDatabaseDump serviceName_database_name_dump_id_GET(String serviceName, String name, Long id) throws IOException {
"""
Get this object properties
REST: GET /hosting/web/{serviceName}/database/{name}/dump/{id}
@param serviceName [required] The internal name of your hosting
@param name [required] Datab... | java | public OvhDatabaseDump serviceName_database_name_dump_id_GET(String serviceName, String name, Long id) throws IOException {
String qPath = "/hosting/web/{serviceName}/database/{name}/dump/{id}";
StringBuilder sb = path(qPath, serviceName, name, id);
String resp = exec(qPath, "GET", sb.toString(), null);
return ... | [
"public",
"OvhDatabaseDump",
"serviceName_database_name_dump_id_GET",
"(",
"String",
"serviceName",
",",
"String",
"name",
",",
"Long",
"id",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/hosting/web/{serviceName}/database/{name}/dump/{id}\"",
";",
"StringB... | Get this object properties
REST: GET /hosting/web/{serviceName}/database/{name}/dump/{id}
@param serviceName [required] The internal name of your hosting
@param name [required] Database name (like mydb.mysql.db or mydb.postgres.db)
@param id [required] Dump id | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L1216-L1221 |
querydsl/querydsl | querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java | Expressions.dateTemplate | public static <T extends Comparable<?>> DateTemplate<T> dateTemplate(Class<? extends T> cl, String template, List<?> args) {
"""
Create a new Template expression
@param cl type of expression
@param template template
@param args template parameters
@return template expression
"""
return dateTempla... | java | public static <T extends Comparable<?>> DateTemplate<T> dateTemplate(Class<? extends T> cl, String template, List<?> args) {
return dateTemplate(cl, createTemplate(template), args);
} | [
"public",
"static",
"<",
"T",
"extends",
"Comparable",
"<",
"?",
">",
">",
"DateTemplate",
"<",
"T",
">",
"dateTemplate",
"(",
"Class",
"<",
"?",
"extends",
"T",
">",
"cl",
",",
"String",
"template",
",",
"List",
"<",
"?",
">",
"args",
")",
"{",
"r... | Create a new Template expression
@param cl type of expression
@param template template
@param args template parameters
@return template expression | [
"Create",
"a",
"new",
"Template",
"expression"
] | train | https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L509-L511 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.