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 |
|---|---|---|---|---|---|---|---|---|---|---|
apache/groovy | src/main/java/org/codehaus/groovy/transform/SortableASTTransformation.java | SortableASTTransformation.compareExpr | private static BinaryExpression compareExpr(Expression lhv, Expression rhv, boolean reversed) {
"""
Helper method used to build a binary expression that compares two values
with the option to handle reverse order.
"""
return (reversed) ? cmpX(rhv, lhv) : cmpX(lhv, rhv);
} | java | private static BinaryExpression compareExpr(Expression lhv, Expression rhv, boolean reversed) {
return (reversed) ? cmpX(rhv, lhv) : cmpX(lhv, rhv);
} | [
"private",
"static",
"BinaryExpression",
"compareExpr",
"(",
"Expression",
"lhv",
",",
"Expression",
"rhv",
",",
"boolean",
"reversed",
")",
"{",
"return",
"(",
"reversed",
")",
"?",
"cmpX",
"(",
"rhv",
",",
"lhv",
")",
":",
"cmpX",
"(",
"lhv",
",",
"rhv... | Helper method used to build a binary expression that compares two values
with the option to handle reverse order. | [
"Helper",
"method",
"used",
"to",
"build",
"a",
"binary",
"expression",
"that",
"compares",
"two",
"values",
"with",
"the",
"option",
"to",
"handle",
"reverse",
"order",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/transform/SortableASTTransformation.java#L261-L263 |
google/auto | factory/src/main/java/com/google/auto/factory/processor/Key.java | Key.boxedType | private static TypeMirror boxedType(TypeMirror type, Types types) {
"""
If {@code type} is a primitive type, returns the boxed equivalent; otherwise returns
{@code type}.
"""
return type.getKind().isPrimitive()
? types.boxedClass(MoreTypes.asPrimitiveType(type)).asType()
: type;
} | java | private static TypeMirror boxedType(TypeMirror type, Types types) {
return type.getKind().isPrimitive()
? types.boxedClass(MoreTypes.asPrimitiveType(type)).asType()
: type;
} | [
"private",
"static",
"TypeMirror",
"boxedType",
"(",
"TypeMirror",
"type",
",",
"Types",
"types",
")",
"{",
"return",
"type",
".",
"getKind",
"(",
")",
".",
"isPrimitive",
"(",
")",
"?",
"types",
".",
"boxedClass",
"(",
"MoreTypes",
".",
"asPrimitiveType",
... | If {@code type} is a primitive type, returns the boxed equivalent; otherwise returns
{@code type}. | [
"If",
"{"
] | train | https://github.com/google/auto/blob/4158a5fa71f1ef763e683b627f4d29bc04cfde9d/factory/src/main/java/com/google/auto/factory/processor/Key.java#L90-L94 |
adessoAG/wicked-charts | highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/util/OptionsUtil.java | OptionsUtil.getPointWithWickedChartsId | public static Point getPointWithWickedChartsId(final Options options, final int wickedChartsId) {
"""
Retrieves the {@link Point} object with the given wickedChartsId from the
given {@link Options} object. Returns null if a Point with the given ID
does not exist.
@param options Chartoptions
@param wickedCh... | java | public static Point getPointWithWickedChartsId(final Options options, final int wickedChartsId) {
for (Series<?> series : options.getSeries()) {
for (Object object : series.getData()) {
if (!(object instanceof Point)) {
break;
} else {
... | [
"public",
"static",
"Point",
"getPointWithWickedChartsId",
"(",
"final",
"Options",
"options",
",",
"final",
"int",
"wickedChartsId",
")",
"{",
"for",
"(",
"Series",
"<",
"?",
">",
"series",
":",
"options",
".",
"getSeries",
"(",
")",
")",
"{",
"for",
"(",... | Retrieves the {@link Point} object with the given wickedChartsId from the
given {@link Options} object. Returns null if a Point with the given ID
does not exist.
@param options Chartoptions
@param wickedChartsId corresponding ID
@return Point object | [
"Retrieves",
"the",
"{",
"@link",
"Point",
"}",
"object",
"with",
"the",
"given",
"wickedChartsId",
"from",
"the",
"given",
"{",
"@link",
"Options",
"}",
"object",
".",
"Returns",
"null",
"if",
"a",
"Point",
"with",
"the",
"given",
"ID",
"does",
"not",
"... | train | https://github.com/adessoAG/wicked-charts/blob/498aceff025f612e22ba5135b26531afeabac03c/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/util/OptionsUtil.java#L193-L207 |
JOML-CI/JOML | src/org/joml/Matrix3d.java | Matrix3d.rotateYXZ | public Matrix3d rotateYXZ(Vector3d angles) {
"""
Apply rotation of <code>angles.y</code> radians about the Y axis, followed by a rotation of <code>angles.x</code> radians about the X axis and
followed by a rotation of <code>angles.z</code> radians about the Z axis.
<p>
When used with a right-handed coordinate s... | java | public Matrix3d rotateYXZ(Vector3d angles) {
return rotateYXZ(angles.y, angles.x, angles.z);
} | [
"public",
"Matrix3d",
"rotateYXZ",
"(",
"Vector3d",
"angles",
")",
"{",
"return",
"rotateYXZ",
"(",
"angles",
".",
"y",
",",
"angles",
".",
"x",
",",
"angles",
".",
"z",
")",
";",
"}"
] | Apply rotation of <code>angles.y</code> radians about the Y axis, followed by a rotation of <code>angles.x</code> radians about the X axis and
followed by a rotation of <code>angles.z</code> radians about the Z axis.
<p>
When used with a right-handed coordinate system, the produced rotation will rotate a vector
counter... | [
"Apply",
"rotation",
"of",
"<code",
">",
"angles",
".",
"y<",
"/",
"code",
">",
"radians",
"about",
"the",
"Y",
"axis",
"followed",
"by",
"a",
"rotation",
"of",
"<code",
">",
"angles",
".",
"x<",
"/",
"code",
">",
"radians",
"about",
"the",
"X",
"axi... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3d.java#L2404-L2406 |
OpenLiberty/open-liberty | dev/com.ibm.ws.logging.core/src/com/ibm/websphere/ras/Tr.java | Tr.formatMessage | public static String formatMessage(TraceComponent tc, Enumeration<Locale> locales, String msgKey, Object... objs) {
"""
Like {@link #formatMessage(TraceComponent, List, String, Object...)},
but takes an Enumeration of Locales.
@see #formatMessage(TraceComponent, List, String, Object...)
"""
return ... | java | public static String formatMessage(TraceComponent tc, Enumeration<Locale> locales, String msgKey, Object... objs) {
return formatMessage(tc, (locales == null) ? null : Collections.list(locales), msgKey, objs);
} | [
"public",
"static",
"String",
"formatMessage",
"(",
"TraceComponent",
"tc",
",",
"Enumeration",
"<",
"Locale",
">",
"locales",
",",
"String",
"msgKey",
",",
"Object",
"...",
"objs",
")",
"{",
"return",
"formatMessage",
"(",
"tc",
",",
"(",
"locales",
"==",
... | Like {@link #formatMessage(TraceComponent, List, String, Object...)},
but takes an Enumeration of Locales.
@see #formatMessage(TraceComponent, List, String, Object...) | [
"Like",
"{",
"@link",
"#formatMessage",
"(",
"TraceComponent",
"List",
"String",
"Object",
"...",
")",
"}",
"but",
"takes",
"an",
"Enumeration",
"of",
"Locales",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.core/src/com/ibm/websphere/ras/Tr.java#L695-L697 |
Impetus/Kundera | src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java | CassandraSchemaManager.appendPropertyToBuilder | private void appendPropertyToBuilder(StringBuilder builder, String replicateOnWrite, String keyword) {
"""
Append property to builder.
@param builder
the builder
@param replicateOnWrite
the replicate on write
@param keyword
the keyword
"""
String replicateOn_Write = CQLTranslator.getKeyword(key... | java | private void appendPropertyToBuilder(StringBuilder builder, String replicateOnWrite, String keyword)
{
String replicateOn_Write = CQLTranslator.getKeyword(keyword);
builder.append(replicateOn_Write);
builder.append(CQLTranslator.EQ_CLAUSE);
builder.append(replicateOnWrite);
b... | [
"private",
"void",
"appendPropertyToBuilder",
"(",
"StringBuilder",
"builder",
",",
"String",
"replicateOnWrite",
",",
"String",
"keyword",
")",
"{",
"String",
"replicateOn_Write",
"=",
"CQLTranslator",
".",
"getKeyword",
"(",
"keyword",
")",
";",
"builder",
".",
... | Append property to builder.
@param builder
the builder
@param replicateOnWrite
the replicate on write
@param keyword
the keyword | [
"Append",
"property",
"to",
"builder",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java#L2821-L2828 |
Azure/azure-sdk-for-java | storage/resource-manager/v2018_11_01/src/main/java/com/microsoft/azure/management/storage/v2018_11_01/implementation/BlobServicesInner.java | BlobServicesInner.setServiceProperties | public BlobServicePropertiesInner setServiceProperties(String resourceGroupName, String accountName, BlobServicePropertiesInner parameters) {
"""
Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
@param resourceGro... | java | public BlobServicePropertiesInner setServiceProperties(String resourceGroupName, String accountName, BlobServicePropertiesInner parameters) {
return setServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body();
} | [
"public",
"BlobServicePropertiesInner",
"setServiceProperties",
"(",
"String",
"resourceGroupName",
",",
"String",
"accountName",
",",
"BlobServicePropertiesInner",
"parameters",
")",
"{",
"return",
"setServicePropertiesWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
... | Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
@param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
@param accountName The name of the storage account wi... | [
"Sets",
"the",
"properties",
"of",
"a",
"storage",
"account’s",
"Blob",
"service",
"including",
"properties",
"for",
"Storage",
"Analytics",
"and",
"CORS",
"(",
"Cross",
"-",
"Origin",
"Resource",
"Sharing",
")",
"rules",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_11_01/src/main/java/com/microsoft/azure/management/storage/v2018_11_01/implementation/BlobServicesInner.java#L78-L80 |
jillesvangurp/jsonj | src/main/java/com/github/jsonj/tools/JsonBuilder.java | JsonBuilder.putArray | public @Nonnull JsonBuilder putArray(String key, @Nonnull Number... values) {
"""
Add a JsonArray to the object with the number values added.
@param key key
@param values values
values that go in the array
@return the builder
"""
JsonArray jjArray = new JsonArray();
for (Number number : v... | java | public @Nonnull JsonBuilder putArray(String key, @Nonnull Number... values) {
JsonArray jjArray = new JsonArray();
for (Number number : values) {
jjArray.add(primitive(number));
}
object.put(key, jjArray);
return this;
} | [
"public",
"@",
"Nonnull",
"JsonBuilder",
"putArray",
"(",
"String",
"key",
",",
"@",
"Nonnull",
"Number",
"...",
"values",
")",
"{",
"JsonArray",
"jjArray",
"=",
"new",
"JsonArray",
"(",
")",
";",
"for",
"(",
"Number",
"number",
":",
"values",
")",
"{",
... | Add a JsonArray to the object with the number values added.
@param key key
@param values values
values that go in the array
@return the builder | [
"Add",
"a",
"JsonArray",
"to",
"the",
"object",
"with",
"the",
"number",
"values",
"added",
"."
] | train | https://github.com/jillesvangurp/jsonj/blob/1da0c44c5bdb60c0cd806c48d2da5a8a75bf84af/src/main/java/com/github/jsonj/tools/JsonBuilder.java#L142-L149 |
alkacon/opencms-core | src-gwt/org/opencms/ade/publish/client/CmsBrokenLinksPanel.java | CmsBrokenLinksPanel.addEntry | public CmsListItemWidget addEntry(CmsPublishResource res) {
"""
Adds a resource bean to be displayed.<p>
@param res a resource bean
@return the list item widget of the created entry
"""
final CmsListItemWidget itemWidget = CmsPublishGroupPanel.createListItemWidget(res, SLOT_MAPPING);
CmsTr... | java | public CmsListItemWidget addEntry(CmsPublishResource res) {
final CmsListItemWidget itemWidget = CmsPublishGroupPanel.createListItemWidget(res, SLOT_MAPPING);
CmsTreeItem item = new CmsTreeItem(false, itemWidget);
item.setOpen(true);
for (CmsPublishResource subRes : res.getRelated()) {... | [
"public",
"CmsListItemWidget",
"addEntry",
"(",
"CmsPublishResource",
"res",
")",
"{",
"final",
"CmsListItemWidget",
"itemWidget",
"=",
"CmsPublishGroupPanel",
".",
"createListItemWidget",
"(",
"res",
",",
"SLOT_MAPPING",
")",
";",
"CmsTreeItem",
"item",
"=",
"new",
... | Adds a resource bean to be displayed.<p>
@param res a resource bean
@return the list item widget of the created entry | [
"Adds",
"a",
"resource",
"bean",
"to",
"be",
"displayed",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/publish/client/CmsBrokenLinksPanel.java#L136-L150 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java | ModelsImpl.deletePrebuiltEntityRole | public OperationStatus deletePrebuiltEntityRole(UUID appId, String versionId, UUID entityId, UUID roleId) {
"""
Delete an entity role.
@param appId The application ID.
@param versionId The version ID.
@param entityId The entity ID.
@param roleId The entity role Id.
@throws IllegalArgumentException thrown if... | java | public OperationStatus deletePrebuiltEntityRole(UUID appId, String versionId, UUID entityId, UUID roleId) {
return deletePrebuiltEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId).toBlocking().single().body();
} | [
"public",
"OperationStatus",
"deletePrebuiltEntityRole",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"UUID",
"entityId",
",",
"UUID",
"roleId",
")",
"{",
"return",
"deletePrebuiltEntityRoleWithServiceResponseAsync",
"(",
"appId",
",",
"versionId",
",",
"ent... | Delete an entity role.
@param appId The application ID.
@param versionId The version ID.
@param entityId The entity ID.
@param roleId The entity role Id.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws ErrorResponseException thrown if the request is rejected by server
@throws RuntimeE... | [
"Delete",
"an",
"entity",
"role",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L11450-L11452 |
Azure/azure-sdk-for-java | compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/DisksInner.java | DisksInner.beginUpdate | public DiskInner beginUpdate(String resourceGroupName, String diskName, DiskUpdate disk) {
"""
Updates (patches) a disk.
@param resourceGroupName The name of the resource group.
@param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported ch... | java | public DiskInner beginUpdate(String resourceGroupName, String diskName, DiskUpdate disk) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk).toBlocking().single().body();
} | [
"public",
"DiskInner",
"beginUpdate",
"(",
"String",
"resourceGroupName",
",",
"String",
"diskName",
",",
"DiskUpdate",
"disk",
")",
"{",
"return",
"beginUpdateWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"diskName",
",",
"disk",
")",
".",
"toBlocking",
... | Updates (patches) a disk.
@param resourceGroupName The name of the resource group.
@param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
@param disk Di... | [
"Updates",
"(",
"patches",
")",
"a",
"disk",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/DisksInner.java#L393-L395 |
dropbox/dropbox-sdk-java | src/main/java/com/dropbox/core/v1/DbxClientV1.java | DbxClientV1.getDeltaC | public <C> DbxDeltaC<C> getDeltaC(Collector<DbxDeltaC.Entry<DbxEntry>, C> collector, /*@Nullable*/String cursor,
boolean includeMediaInfo)
throws DbxException {
"""
A more generic version of {@link #getDelta}. You provide a <em>collector</em>,
which lets you process ... | java | public <C> DbxDeltaC<C> getDeltaC(Collector<DbxDeltaC.Entry<DbxEntry>, C> collector, /*@Nullable*/String cursor,
boolean includeMediaInfo)
throws DbxException
{
return _getDeltaC(collector, cursor, null, includeMediaInfo);
} | [
"public",
"<",
"C",
">",
"DbxDeltaC",
"<",
"C",
">",
"getDeltaC",
"(",
"Collector",
"<",
"DbxDeltaC",
".",
"Entry",
"<",
"DbxEntry",
">",
",",
"C",
">",
"collector",
",",
"/*@Nullable*/",
"String",
"cursor",
",",
"boolean",
"includeMediaInfo",
")",
"throws... | A more generic version of {@link #getDelta}. You provide a <em>collector</em>,
which lets you process the delta entries as they arrive over the network. | [
"A",
"more",
"generic",
"version",
"of",
"{"
] | train | https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/v1/DbxClientV1.java#L1498-L1503 |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java | StringConverter.unicodeStringToString | public static String unicodeStringToString(String s) {
"""
Hsqldb specific decoding used only for log files. This method converts
the 7 bit escaped ASCII strings in a log file back into Java Unicode
strings. See stringToUnicodeBytes() above. <p>
Method based on Hypersonic Code
@param s encoded ASCII string... | java | public static String unicodeStringToString(String s) {
if ((s == null) || (s.indexOf("\\u") == -1)) {
return s;
}
int len = s.length();
char[] b = new char[len];
int j = 0;
for (int i = 0; i < len; i++) {
char c = s.charAt(i);
... | [
"public",
"static",
"String",
"unicodeStringToString",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"(",
"s",
"==",
"null",
")",
"||",
"(",
"s",
".",
"indexOf",
"(",
"\"\\\\u\"",
")",
"==",
"-",
"1",
")",
")",
"{",
"return",
"s",
";",
"}",
"int",
"le... | Hsqldb specific decoding used only for log files. This method converts
the 7 bit escaped ASCII strings in a log file back into Java Unicode
strings. See stringToUnicodeBytes() above. <p>
Method based on Hypersonic Code
@param s encoded ASCII string in byte array
@return Java string | [
"Hsqldb",
"specific",
"decoding",
"used",
"only",
"for",
"log",
"files",
".",
"This",
"method",
"converts",
"the",
"7",
"bit",
"escaped",
"ASCII",
"strings",
"in",
"a",
"log",
"file",
"back",
"into",
"Java",
"Unicode",
"strings",
".",
"See",
"stringToUnicode... | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java#L434-L469 |
lightblueseas/wicket-js-addons | wicket-js-addons-core/src/main/java/de/alpharogroup/wicket/js/addon/core/JavascriptGenerator.java | JavascriptGenerator.generateJs | public String generateJs(final Settings settings, final String methodName) {
"""
Generate the javascript code.
@param settings
the settings
@param methodName
the method name
@return the string
"""
// 1. Create an empty map...
final Map<String, Object> variables = initializeVariables(settings.asSet... | java | public String generateJs(final Settings settings, final String methodName)
{
// 1. Create an empty map...
final Map<String, Object> variables = initializeVariables(settings.asSet());
// 4. Generate the js template with the map and the method name...
final String stringTemplateContent = generateJavascriptT... | [
"public",
"String",
"generateJs",
"(",
"final",
"Settings",
"settings",
",",
"final",
"String",
"methodName",
")",
"{",
"// 1. Create an empty map...\r",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"variables",
"=",
"initializeVariables",
"(",
"settings",
"... | Generate the javascript code.
@param settings
the settings
@param methodName
the method name
@return the string | [
"Generate",
"the",
"javascript",
"code",
"."
] | train | https://github.com/lightblueseas/wicket-js-addons/blob/b1c88c1abafd1e965f2e32ef13d66be0b28d76f6/wicket-js-addons-core/src/main/java/de/alpharogroup/wicket/js/addon/core/JavascriptGenerator.java#L163-L190 |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonStreamWriter.java | JsonStreamWriter.internalWriteNameValuePair | private void internalWriteNameValuePair(String name, String value) throws IOException {
"""
Core write attribute implementation.
@param name attribute name
@param value attribute value
"""
writeComma();
writeNewLineIndent();
writeName(name);
if (m_pretty)
{
m_writer.... | java | private void internalWriteNameValuePair(String name, String value) throws IOException
{
writeComma();
writeNewLineIndent();
writeName(name);
if (m_pretty)
{
m_writer.write(' ');
}
m_writer.write(value);
} | [
"private",
"void",
"internalWriteNameValuePair",
"(",
"String",
"name",
",",
"String",
"value",
")",
"throws",
"IOException",
"{",
"writeComma",
"(",
")",
";",
"writeNewLineIndent",
"(",
")",
";",
"writeName",
"(",
"name",
")",
";",
"if",
"(",
"m_pretty",
")... | Core write attribute implementation.
@param name attribute name
@param value attribute value | [
"Core",
"write",
"attribute",
"implementation",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonStreamWriter.java#L206-L218 |
pravega/pravega | controller/src/main/java/io/pravega/controller/task/Stream/StreamMetadataTasks.java | StreamMetadataTasks.createStream | @Task(name = "createStream", version = "1.0", resource = " {
"""
Create stream.
@param scope scope.
@param stream stream name.
@param config stream configuration.
@param createTimestamp creation timestamp.
@return creation status.
"""scope}/{stream}")
public CompletableFu... | java | @Task(name = "createStream", version = "1.0", resource = "{scope}/{stream}")
public CompletableFuture<CreateStreamStatus.Status> createStream(String scope, String stream, StreamConfiguration config, long createTimestamp) {
return execute(
new Resource(scope, stream),
new Seri... | [
"@",
"Task",
"(",
"name",
"=",
"\"createStream\"",
",",
"version",
"=",
"\"1.0\"",
",",
"resource",
"=",
"\"{scope}/{stream}\"",
")",
"public",
"CompletableFuture",
"<",
"CreateStreamStatus",
".",
"Status",
">",
"createStream",
"(",
"String",
"scope",
",",
"Stri... | Create stream.
@param scope scope.
@param stream stream name.
@param config stream configuration.
@param createTimestamp creation timestamp.
@return creation status. | [
"Create",
"stream",
"."
] | train | https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/controller/src/main/java/io/pravega/controller/task/Stream/StreamMetadataTasks.java#L155-L161 |
radkovo/jStyleParser | src/main/java/cz/vutbr/web/csskit/TermColorImpl.java | TermColorImpl.getColorByHash | public static TermColor getColorByHash(String hash) {
"""
Creates color from string in form #ABC or #AABBCC, or
just simply ABC and AABBCC.
where A, B, C are hexadecimal digits.
@param hash Hash string
@return Created color or <code>null</code> in case of error
"""
if(hash==null)
throw new Ille... | java | public static TermColor getColorByHash(String hash) {
if(hash==null)
throw new IllegalArgumentException("Invalid hash value (null) for color construction");
// lowercase and remove hash character, if any
hash = hash.toLowerCase().replaceAll("^#", "");
// color written in #ABC form... | [
"public",
"static",
"TermColor",
"getColorByHash",
"(",
"String",
"hash",
")",
"{",
"if",
"(",
"hash",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid hash value (null) for color construction\"",
")",
";",
"// lowercase and remove hash chara... | Creates color from string in form #ABC or #AABBCC, or
just simply ABC and AABBCC.
where A, B, C are hexadecimal digits.
@param hash Hash string
@return Created color or <code>null</code> in case of error | [
"Creates",
"color",
"from",
"string",
"in",
"form",
"#ABC",
"or",
"#AABBCC",
"or",
"just",
"simply",
"ABC",
"and",
"AABBCC",
".",
"where",
"A",
"B",
"C",
"are",
"hexadecimal",
"digits",
"."
] | train | https://github.com/radkovo/jStyleParser/blob/8ab049ac6866aa52c4d7deee25c9e294e7191957/src/main/java/cz/vutbr/web/csskit/TermColorImpl.java#L98-L122 |
xcesco/kripton | kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java | CollectionUtils.asList | public static <E extends List<Boolean>> E asList(boolean[] array, Class<E> listType) {
"""
As list.
@param <E> the element type
@param array the array
@param listType the list type
@return the e
"""
E result;
try {
result = listType.newInstance();
for (Object item : array) {
result.add((bo... | java | public static <E extends List<Boolean>> E asList(boolean[] array, Class<E> listType) {
E result;
try {
result = listType.newInstance();
for (Object item : array) {
result.add((boolean) item);
}
return result;
} catch (InstantiationException | IllegalAccessException e) {
e.printStackTrace();
... | [
"public",
"static",
"<",
"E",
"extends",
"List",
"<",
"Boolean",
">",
">",
"E",
"asList",
"(",
"boolean",
"[",
"]",
"array",
",",
"Class",
"<",
"E",
">",
"listType",
")",
"{",
"E",
"result",
";",
"try",
"{",
"result",
"=",
"listType",
".",
"newInst... | As list.
@param <E> the element type
@param array the array
@param listType the list type
@return the e | [
"As",
"list",
"."
] | train | https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java#L282-L296 |
landawn/AbacusUtil | src/com/landawn/abacus/util/N.java | N.removeAll | @SafeVarargs
public static long[] removeAll(final long[] a, final long... elements) {
"""
Returns a new array with removes all the occurrences of specified elements from <code>a</code>
@param a
@param elements
@return
@see Collection#removeAll(Collection)
"""
if (N.isNullOrEmpty(a)) {
... | java | @SafeVarargs
public static long[] removeAll(final long[] a, final long... elements) {
if (N.isNullOrEmpty(a)) {
return N.EMPTY_LONG_ARRAY;
} else if (N.isNullOrEmpty(elements)) {
return a.clone();
} else if (elements.length == 1) {
return removeAllO... | [
"@",
"SafeVarargs",
"public",
"static",
"long",
"[",
"]",
"removeAll",
"(",
"final",
"long",
"[",
"]",
"a",
",",
"final",
"long",
"...",
"elements",
")",
"{",
"if",
"(",
"N",
".",
"isNullOrEmpty",
"(",
"a",
")",
")",
"{",
"return",
"N",
".",
"EMPTY... | Returns a new array with removes all the occurrences of specified elements from <code>a</code>
@param a
@param elements
@return
@see Collection#removeAll(Collection) | [
"Returns",
"a",
"new",
"array",
"with",
"removes",
"all",
"the",
"occurrences",
"of",
"specified",
"elements",
"from",
"<code",
">",
"a<",
"/",
"code",
">"
] | train | https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/N.java#L23466-L23479 |
nguillaumin/slick2d-maven | slick2d-core/src/main/java/org/newdawn/slick/particles/ParticleIO.java | ParticleIO.saveConfiguredSystem | public static void saveConfiguredSystem(File file, ParticleSystem system)
throws IOException {
"""
Save a particle system with only ConfigurableEmitters in to an XML file
@param file
The file to save to
@param system
The system to store
@throws IOException
Indicates a failure to save or encode the syst... | java | public static void saveConfiguredSystem(File file, ParticleSystem system)
throws IOException {
saveConfiguredSystem(new FileOutputStream(file), system);
} | [
"public",
"static",
"void",
"saveConfiguredSystem",
"(",
"File",
"file",
",",
"ParticleSystem",
"system",
")",
"throws",
"IOException",
"{",
"saveConfiguredSystem",
"(",
"new",
"FileOutputStream",
"(",
"file",
")",
",",
"system",
")",
";",
"}"
] | Save a particle system with only ConfigurableEmitters in to an XML file
@param file
The file to save to
@param system
The system to store
@throws IOException
Indicates a failure to save or encode the system XML. | [
"Save",
"a",
"particle",
"system",
"with",
"only",
"ConfigurableEmitters",
"in",
"to",
"an",
"XML",
"file"
] | train | https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/particles/ParticleIO.java#L242-L245 |
EdwardRaff/JSAT | JSAT/src/jsat/DataSet.java | DataSet.setWeight | public void setWeight(int i, double w) {
"""
Sets the weight of a given datapoint within this data set.
@param i the index to change the weight of
@param w the new weight value.
"""
if(i >= size() || i < 0)
throw new IndexOutOfBoundsException("Dataset has only " + size() + " members, ca... | java | public void setWeight(int i, double w)
{
if(i >= size() || i < 0)
throw new IndexOutOfBoundsException("Dataset has only " + size() + " members, can't access index " + i );
else if(Double.isNaN(w) || Double.isInfinite(w) || w < 0)
throw new ArithmeticException("Invalid we... | [
"public",
"void",
"setWeight",
"(",
"int",
"i",
",",
"double",
"w",
")",
"{",
"if",
"(",
"i",
">=",
"size",
"(",
")",
"||",
"i",
"<",
"0",
")",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
"\"Dataset has only \"",
"+",
"size",
"(",
")",
"+",
"\"... | Sets the weight of a given datapoint within this data set.
@param i the index to change the weight of
@param w the new weight value. | [
"Sets",
"the",
"weight",
"of",
"a",
"given",
"datapoint",
"within",
"this",
"data",
"set",
"."
] | train | https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/DataSet.java#L832-L853 |
GoogleCloudPlatform/bigdata-interop | gcsio/src/main/java/com/google/cloud/hadoop/gcsio/PrefixMappedItemCache.java | PrefixMappedItemCache.invalidateBucket | public synchronized void invalidateBucket(String bucket) {
"""
Invalidates all cached items and lists associated with the given bucket.
@param bucket the bucket to invalidate. This must not be null.
"""
PrefixKey key = new PrefixKey(bucket, "");
getPrefixSubMap(itemMap, key).clear();
getPrefixS... | java | public synchronized void invalidateBucket(String bucket) {
PrefixKey key = new PrefixKey(bucket, "");
getPrefixSubMap(itemMap, key).clear();
getPrefixSubMap(prefixMap, key).clear();
} | [
"public",
"synchronized",
"void",
"invalidateBucket",
"(",
"String",
"bucket",
")",
"{",
"PrefixKey",
"key",
"=",
"new",
"PrefixKey",
"(",
"bucket",
",",
"\"\"",
")",
";",
"getPrefixSubMap",
"(",
"itemMap",
",",
"key",
")",
".",
"clear",
"(",
")",
";",
"... | Invalidates all cached items and lists associated with the given bucket.
@param bucket the bucket to invalidate. This must not be null. | [
"Invalidates",
"all",
"cached",
"items",
"and",
"lists",
"associated",
"with",
"the",
"given",
"bucket",
"."
] | train | https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/gcsio/src/main/java/com/google/cloud/hadoop/gcsio/PrefixMappedItemCache.java#L212-L217 |
wcm-io/wcm-io-caconfig | extensions/src/main/java/io/wcm/caconfig/extensions/persistence/impl/PersistenceUtils.java | PersistenceUtils.ensurePageIfNotContainingPage | public static Resource ensurePageIfNotContainingPage(ResourceResolver resolver, String pagePath,
String resourceType, ConfigurationManagementSettings configurationManagementSettings) {
"""
Ensure that a page at the given path exists, if the path is not already contained in a page.
@param resolver Resource r... | java | public static Resource ensurePageIfNotContainingPage(ResourceResolver resolver, String pagePath,
String resourceType, ConfigurationManagementSettings configurationManagementSettings) {
Matcher matcher = PAGE_PATH_PATTERN.matcher(pagePath);
if (matcher.matches()) {
// ensure that shorted path part th... | [
"public",
"static",
"Resource",
"ensurePageIfNotContainingPage",
"(",
"ResourceResolver",
"resolver",
",",
"String",
"pagePath",
",",
"String",
"resourceType",
",",
"ConfigurationManagementSettings",
"configurationManagementSettings",
")",
"{",
"Matcher",
"matcher",
"=",
"P... | Ensure that a page at the given path exists, if the path is not already contained in a page.
@param resolver Resource resolver
@param pagePath Page path
@param resourceType Resource type for page (if not template is set)
@param configurationManagementSettings Configuration management settings
@return Resource for AEM p... | [
"Ensure",
"that",
"a",
"page",
"at",
"the",
"given",
"path",
"exists",
"if",
"the",
"path",
"is",
"not",
"already",
"contained",
"in",
"a",
"page",
"."
] | train | https://github.com/wcm-io/wcm-io-caconfig/blob/48592eadb0b62a09eec555cedfae7e00b213f6ed/extensions/src/main/java/io/wcm/caconfig/extensions/persistence/impl/PersistenceUtils.java#L118-L128 |
Azure/azure-sdk-for-java | containerinstance/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2018_02_01_preview/implementation/ContainerGroupsInner.java | ContainerGroupsInner.deleteAsync | public Observable<ContainerGroupInner> deleteAsync(String resourceGroupName, String containerGroupName) {
"""
Delete the specified container group.
Delete the specified container group in the specified subscription and resource group. The operation does not delete other resources provided by the user, such as vol... | java | public Observable<ContainerGroupInner> deleteAsync(String resourceGroupName, String containerGroupName) {
return deleteWithServiceResponseAsync(resourceGroupName, containerGroupName).map(new Func1<ServiceResponse<ContainerGroupInner>, ContainerGroupInner>() {
@Override
public ContainerGr... | [
"public",
"Observable",
"<",
"ContainerGroupInner",
">",
"deleteAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"containerGroupName",
")",
"{",
"return",
"deleteWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"containerGroupName",
")",
".",
"map",
"... | Delete the specified container group.
Delete the specified container group in the specified subscription and resource group. The operation does not delete other resources provided by the user, such as volumes.
@param resourceGroupName The name of the resource group.
@param containerGroupName The name of the container ... | [
"Delete",
"the",
"specified",
"container",
"group",
".",
"Delete",
"the",
"specified",
"container",
"group",
"in",
"the",
"specified",
"subscription",
"and",
"resource",
"group",
".",
"The",
"operation",
"does",
"not",
"delete",
"other",
"resources",
"provided",
... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerinstance/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2018_02_01_preview/implementation/ContainerGroupsInner.java#L745-L752 |
m-m-m/util | io/src/main/java/net/sf/mmm/util/io/impl/ProcessableDetectorStream.java | ProcessableDetectorStream.processInternal | public void processInternal(ByteArray buffer, boolean eos) throws IOException {
"""
@see DetectorStreamProcessor#process(net.sf.mmm.util.io.api.spi.DetectorStreamBuffer, Map, boolean)
@param buffer is the next part of the streamed data.
@param eos - {@code true} if the end of the stream has been reached and th... | java | public void processInternal(ByteArray buffer, boolean eos) throws IOException {
if (buffer != null) {
this.firstBuffer.append(buffer);
}
this.firstBuffer.process(getMutableMetadata(), eos);
if (eos) {
setDone();
}
} | [
"public",
"void",
"processInternal",
"(",
"ByteArray",
"buffer",
",",
"boolean",
"eos",
")",
"throws",
"IOException",
"{",
"if",
"(",
"buffer",
"!=",
"null",
")",
"{",
"this",
".",
"firstBuffer",
".",
"append",
"(",
"buffer",
")",
";",
"}",
"this",
".",
... | @see DetectorStreamProcessor#process(net.sf.mmm.util.io.api.spi.DetectorStreamBuffer, Map, boolean)
@param buffer is the next part of the streamed data.
@param eos - {@code true} if the end of the stream has been reached and the given {@code buffer} has to be
@throws IOException in case of an Input/Output error. Shoul... | [
"@see",
"DetectorStreamProcessor#process",
"(",
"net",
".",
"sf",
".",
"mmm",
".",
"util",
".",
"io",
".",
"api",
".",
"spi",
".",
"DetectorStreamBuffer",
"Map",
"boolean",
")"
] | train | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/io/src/main/java/net/sf/mmm/util/io/impl/ProcessableDetectorStream.java#L73-L82 |
geomajas/geomajas-project-geometry | core/src/main/java/org/geomajas/geometry/service/BboxService.java | BboxService.intersects | public static boolean intersects(Bbox one, Bbox two) {
"""
Does one bounding box intersect another?
@param one
The first bounding box.
@param two
The second bounding box.
@return true if the both bounding boxes intersect, false otherwise.
"""
if (two.getX() > one.getMaxX()) {
return false;
}
if... | java | public static boolean intersects(Bbox one, Bbox two) {
if (two.getX() > one.getMaxX()) {
return false;
}
if (two.getY() > one.getMaxY()) {
return false;
}
if (two.getMaxX() < one.getX()) {
return false;
}
if (two.getMaxY() < one.getY()) {
return false;
}
return true;
} | [
"public",
"static",
"boolean",
"intersects",
"(",
"Bbox",
"one",
",",
"Bbox",
"two",
")",
"{",
"if",
"(",
"two",
".",
"getX",
"(",
")",
">",
"one",
".",
"getMaxX",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"two",
".",
"getY",
... | Does one bounding box intersect another?
@param one
The first bounding box.
@param two
The second bounding box.
@return true if the both bounding boxes intersect, false otherwise. | [
"Does",
"one",
"bounding",
"box",
"intersect",
"another?"
] | train | https://github.com/geomajas/geomajas-project-geometry/blob/09a214fede69c9c01e41630828c4abbb551a557d/core/src/main/java/org/geomajas/geometry/service/BboxService.java#L158-L172 |
aws/aws-sdk-java | aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/TransformJobDefinition.java | TransformJobDefinition.withEnvironment | public TransformJobDefinition withEnvironment(java.util.Map<String, String> environment) {
"""
<p>
The environment variables to set in the Docker container. We support up to 16 key and values entries in the map.
</p>
@param environment
The environment variables to set in the Docker container. We support up t... | java | public TransformJobDefinition withEnvironment(java.util.Map<String, String> environment) {
setEnvironment(environment);
return this;
} | [
"public",
"TransformJobDefinition",
"withEnvironment",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"environment",
")",
"{",
"setEnvironment",
"(",
"environment",
")",
";",
"return",
"this",
";",
"}"
] | <p>
The environment variables to set in the Docker container. We support up to 16 key and values entries in the map.
</p>
@param environment
The environment variables to set in the Docker container. We support up to 16 key and values entries in
the map.
@return Returns a reference to this object so that method calls c... | [
"<p",
">",
"The",
"environment",
"variables",
"to",
"set",
"in",
"the",
"Docker",
"container",
".",
"We",
"support",
"up",
"to",
"16",
"key",
"and",
"values",
"entries",
"in",
"the",
"map",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/TransformJobDefinition.java#L290-L293 |
moparisthebest/beehive | beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/RowToMapMapper.java | RowToMapMapper.mapRowToReturnType | public Object mapRowToReturnType() {
"""
Do the mapping.
@return A Map.
@throws ControlException on error.
"""
try {
return Collections.unmodifiableMap(new ResultSetHashMap(_resultSet, _keys));
} catch (SQLException e) {
throw new ControlException("Exception while creating ... | java | public Object mapRowToReturnType() {
try {
return Collections.unmodifiableMap(new ResultSetHashMap(_resultSet, _keys));
} catch (SQLException e) {
throw new ControlException("Exception while creating ResultSetHashMap.", e);
}
} | [
"public",
"Object",
"mapRowToReturnType",
"(",
")",
"{",
"try",
"{",
"return",
"Collections",
".",
"unmodifiableMap",
"(",
"new",
"ResultSetHashMap",
"(",
"_resultSet",
",",
"_keys",
")",
")",
";",
"}",
"catch",
"(",
"SQLException",
"e",
")",
"{",
"throw",
... | Do the mapping.
@return A Map.
@throws ControlException on error. | [
"Do",
"the",
"mapping",
"."
] | train | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/RowToMapMapper.java#L55-L61 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/NetworkUtils.java | NetworkUtils.setLearningRate | public static void setLearningRate(ComputationGraph net, ISchedule newLrSchedule) {
"""
Set the learning rate schedule for all layers in the network to the specified schedule.
This schedule will replace any/all existing schedules, and also any fixed learning rate values.<br>
Note that the iteration/epoch counts ... | java | public static void setLearningRate(ComputationGraph net, ISchedule newLrSchedule) {
setLearningRate(net, Double.NaN, newLrSchedule);
} | [
"public",
"static",
"void",
"setLearningRate",
"(",
"ComputationGraph",
"net",
",",
"ISchedule",
"newLrSchedule",
")",
"{",
"setLearningRate",
"(",
"net",
",",
"Double",
".",
"NaN",
",",
"newLrSchedule",
")",
";",
"}"
] | Set the learning rate schedule for all layers in the network to the specified schedule.
This schedule will replace any/all existing schedules, and also any fixed learning rate values.<br>
Note that the iteration/epoch counts will <i>not</i> be reset. Use {@link ComputationGraphConfiguration#setIterationCount(int)}
and ... | [
"Set",
"the",
"learning",
"rate",
"schedule",
"for",
"all",
"layers",
"in",
"the",
"network",
"to",
"the",
"specified",
"schedule",
".",
"This",
"schedule",
"will",
"replace",
"any",
"/",
"all",
"existing",
"schedules",
"and",
"also",
"any",
"fixed",
"learni... | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/NetworkUtils.java#L283-L285 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java | FileUtil.writeUtf8Lines | public static <T> File writeUtf8Lines(Collection<T> list, String path) throws IORuntimeException {
"""
将列表写入文件,覆盖模式,编码为UTF-8
@param <T> 集合元素类型
@param list 列表
@param path 绝对路径
@return 目标文件
@throws IORuntimeException IO异常
@since 3.2.0
"""
return writeLines(list, path, CharsetUtil.CHARSET_UTF_8);
} | java | public static <T> File writeUtf8Lines(Collection<T> list, String path) throws IORuntimeException {
return writeLines(list, path, CharsetUtil.CHARSET_UTF_8);
} | [
"public",
"static",
"<",
"T",
">",
"File",
"writeUtf8Lines",
"(",
"Collection",
"<",
"T",
">",
"list",
",",
"String",
"path",
")",
"throws",
"IORuntimeException",
"{",
"return",
"writeLines",
"(",
"list",
",",
"path",
",",
"CharsetUtil",
".",
"CHARSET_UTF_8"... | 将列表写入文件,覆盖模式,编码为UTF-8
@param <T> 集合元素类型
@param list 列表
@param path 绝对路径
@return 目标文件
@throws IORuntimeException IO异常
@since 3.2.0 | [
"将列表写入文件,覆盖模式,编码为UTF",
"-",
"8"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L2853-L2855 |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AOStream.java | AOStream.consumeAcceptedTick | public final void consumeAcceptedTick(TransactionCommon t, AOValue storedTick) throws Exception {
"""
Helper method called by the AOStream when a persistent tick representing a persistently locked
message should be removed since the message has been accepted. This method will also consume the
message
@param t t... | java | public final void consumeAcceptedTick(TransactionCommon t, AOValue storedTick) throws Exception
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "consumeAcceptedTick", storedTick);
try {
SIMPMessage msg =
consumerDispatcher.getMessageByValue(storedTick);... | [
"public",
"final",
"void",
"consumeAcceptedTick",
"(",
"TransactionCommon",
"t",
",",
"AOValue",
"storedTick",
")",
"throws",
"Exception",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
... | Helper method called by the AOStream when a persistent tick representing a persistently locked
message should be removed since the message has been accepted. This method will also consume the
message
@param t the transaction
@param stream the stream making this call
@param storedTick the persistent tick
@throws Excepti... | [
"Helper",
"method",
"called",
"by",
"the",
"AOStream",
"when",
"a",
"persistent",
"tick",
"representing",
"a",
"persistently",
"locked",
"message",
"should",
"be",
"removed",
"since",
"the",
"message",
"has",
"been",
"accepted",
".",
"This",
"method",
"will",
... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AOStream.java#L3184-L3214 |
jhalterman/failsafe | src/main/java/net/jodah/failsafe/ExecutionResult.java | ExecutionResult.withResult | public ExecutionResult withResult(Object result) {
"""
Returns a copy of the ExecutionResult with the {@code result} value, and completed and success set to true.
"""
return new ExecutionResult(result, null, nonResult, waitNanos, true, true, successAll);
} | java | public ExecutionResult withResult(Object result) {
return new ExecutionResult(result, null, nonResult, waitNanos, true, true, successAll);
} | [
"public",
"ExecutionResult",
"withResult",
"(",
"Object",
"result",
")",
"{",
"return",
"new",
"ExecutionResult",
"(",
"result",
",",
"null",
",",
"nonResult",
",",
"waitNanos",
",",
"true",
",",
"true",
",",
"successAll",
")",
";",
"}"
] | Returns a copy of the ExecutionResult with the {@code result} value, and completed and success set to true. | [
"Returns",
"a",
"copy",
"of",
"the",
"ExecutionResult",
"with",
"the",
"{"
] | train | https://github.com/jhalterman/failsafe/blob/65fcd3a82f7b232d2ff59bc525a59d693dd8e223/src/main/java/net/jodah/failsafe/ExecutionResult.java#L103-L105 |
jbehave/jbehave-core | jbehave-core/src/main/java/org/jbehave/core/embedder/MetaFilter.java | MetaFilter.createMetaMatcher | protected MetaMatcher createMetaMatcher(String filterAsString, Map<String, MetaMatcher> metaMatchers) {
"""
Creates a MetaMatcher based on the filter content.
@param filterAsString the String representation of the filter
@param metaMatchers the Map of custom MetaMatchers
@return A MetaMatcher used to match th... | java | protected MetaMatcher createMetaMatcher(String filterAsString, Map<String, MetaMatcher> metaMatchers) {
for ( String key : metaMatchers.keySet() ){
if ( filterAsString.startsWith(key)){
return metaMatchers.get(key);
}
}
if (filterAsString.startsWith(GROOVY)) {
return new... | [
"protected",
"MetaMatcher",
"createMetaMatcher",
"(",
"String",
"filterAsString",
",",
"Map",
"<",
"String",
",",
"MetaMatcher",
">",
"metaMatchers",
")",
"{",
"for",
"(",
"String",
"key",
":",
"metaMatchers",
".",
"keySet",
"(",
")",
")",
"{",
"if",
"(",
... | Creates a MetaMatcher based on the filter content.
@param filterAsString the String representation of the filter
@param metaMatchers the Map of custom MetaMatchers
@return A MetaMatcher used to match the filter content | [
"Creates",
"a",
"MetaMatcher",
"based",
"on",
"the",
"filter",
"content",
"."
] | train | https://github.com/jbehave/jbehave-core/blob/bdd6a6199528df3c35087e72d4644870655b23e6/jbehave-core/src/main/java/org/jbehave/core/embedder/MetaFilter.java#L112-L122 |
twitter/hraven | hraven-core/src/main/java/com/twitter/hraven/datasource/JobHistoryService.java | JobHistoryService.getHbasePuts | public static List<Put> getHbasePuts(JobDesc jobDesc, Configuration jobConf) {
"""
Returns the HBase {@code Put} instances to store for the given
{@code Configuration} data. Each configuration property will be stored as a
separate key value.
@param jobDesc the {@link JobDesc} generated for the job
@param job... | java | public static List<Put> getHbasePuts(JobDesc jobDesc, Configuration jobConf) {
List<Put> puts = new LinkedList<Put>();
JobKey jobKey = new JobKey(jobDesc);
byte[] jobKeyBytes = new JobKeyConverter().toBytes(jobKey);
// Add all columns to one put
Put jobPut = new Put(jobKeyBytes);
jobPut.addCol... | [
"public",
"static",
"List",
"<",
"Put",
">",
"getHbasePuts",
"(",
"JobDesc",
"jobDesc",
",",
"Configuration",
"jobConf",
")",
"{",
"List",
"<",
"Put",
">",
"puts",
"=",
"new",
"LinkedList",
"<",
"Put",
">",
"(",
")",
";",
"JobKey",
"jobKey",
"=",
"new"... | Returns the HBase {@code Put} instances to store for the given
{@code Configuration} data. Each configuration property will be stored as a
separate key value.
@param jobDesc the {@link JobDesc} generated for the job
@param jobConf the job configuration
@return puts for the given job configuration | [
"Returns",
"the",
"HBase",
"{",
"@code",
"Put",
"}",
"instances",
"to",
"store",
"for",
"the",
"given",
"{",
"@code",
"Configuration",
"}",
"data",
".",
"Each",
"configuration",
"property",
"will",
"be",
"stored",
"as",
"a",
"separate",
"key",
"value",
"."... | train | https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-core/src/main/java/com/twitter/hraven/datasource/JobHistoryService.java#L740-L774 |
apache/spark | common/unsafe/src/main/java/org/apache/spark/unsafe/types/ByteArray.java | ByteArray.writeToMemory | public static void writeToMemory(byte[] src, Object target, long targetOffset) {
"""
Writes the content of a byte array into a memory address, identified by an object and an
offset. The target memory address must already been allocated, and have enough space to
hold all the bytes in this string.
"""
Plat... | java | public static void writeToMemory(byte[] src, Object target, long targetOffset) {
Platform.copyMemory(src, Platform.BYTE_ARRAY_OFFSET, target, targetOffset, src.length);
} | [
"public",
"static",
"void",
"writeToMemory",
"(",
"byte",
"[",
"]",
"src",
",",
"Object",
"target",
",",
"long",
"targetOffset",
")",
"{",
"Platform",
".",
"copyMemory",
"(",
"src",
",",
"Platform",
".",
"BYTE_ARRAY_OFFSET",
",",
"target",
",",
"targetOffset... | Writes the content of a byte array into a memory address, identified by an object and an
offset. The target memory address must already been allocated, and have enough space to
hold all the bytes in this string. | [
"Writes",
"the",
"content",
"of",
"a",
"byte",
"array",
"into",
"a",
"memory",
"address",
"identified",
"by",
"an",
"object",
"and",
"an",
"offset",
".",
"The",
"target",
"memory",
"address",
"must",
"already",
"been",
"allocated",
"and",
"have",
"enough",
... | train | https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/unsafe/src/main/java/org/apache/spark/unsafe/types/ByteArray.java#L35-L37 |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/asset/AssetVersionSpec.java | AssetVersionSpec.parse | public static AssetVersionSpec parse(String versionSpec) {
"""
Smart Version Ranges:
This is similar to the OSGi version spec. There are four supported syntaxes:
- A specific version -- such as 1.2 -- can be specified.
- Zero can be specified to always use the latest asset version.
- A 'half-open' range -- su... | java | public static AssetVersionSpec parse(String versionSpec) {
Matcher matcher = VERSION_PATTERN.matcher(versionSpec);
String name = null;
String ver = null;
String pkg = null;
if (matcher.find()) {
int start = matcher.start();
ver = versionSpec.substring(star... | [
"public",
"static",
"AssetVersionSpec",
"parse",
"(",
"String",
"versionSpec",
")",
"{",
"Matcher",
"matcher",
"=",
"VERSION_PATTERN",
".",
"matcher",
"(",
"versionSpec",
")",
";",
"String",
"name",
"=",
"null",
";",
"String",
"ver",
"=",
"null",
";",
"Strin... | Smart Version Ranges:
This is similar to the OSGi version spec. There are four supported syntaxes:
- A specific version -- such as 1.2 -- can be specified.
- Zero can be specified to always use the latest asset version.
- A 'half-open' range -- such as [1.2,2) -- designates an inclusive lower limit and an exclusive up... | [
"Smart",
"Version",
"Ranges",
":",
"This",
"is",
"similar",
"to",
"the",
"OSGi",
"version",
"spec",
".",
"There",
"are",
"four",
"supported",
"syntaxes",
":",
"-",
"A",
"specific",
"version",
"--",
"such",
"as",
"1",
".",
"2",
"--",
"can",
"be",
"speci... | train | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/asset/AssetVersionSpec.java#L105-L128 |
apache/incubator-gobblin | gobblin-utility/src/main/java/org/apache/gobblin/util/HadoopUtils.java | HadoopUtils.sanitizePath | public static String sanitizePath(String path, String substitute) {
"""
Remove illegal HDFS path characters from the given path. Illegal characters will be replaced
with the given substitute.
"""
Preconditions.checkArgument(substitute.replaceAll(HDFS_ILLEGAL_TOKEN_REGEX, "").equals(substitute),
"s... | java | public static String sanitizePath(String path, String substitute) {
Preconditions.checkArgument(substitute.replaceAll(HDFS_ILLEGAL_TOKEN_REGEX, "").equals(substitute),
"substitute contains illegal characters: " + substitute);
return path.replaceAll(HDFS_ILLEGAL_TOKEN_REGEX, substitute);
} | [
"public",
"static",
"String",
"sanitizePath",
"(",
"String",
"path",
",",
"String",
"substitute",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"substitute",
".",
"replaceAll",
"(",
"HDFS_ILLEGAL_TOKEN_REGEX",
",",
"\"\"",
")",
".",
"equals",
"(",
"subst... | Remove illegal HDFS path characters from the given path. Illegal characters will be replaced
with the given substitute. | [
"Remove",
"illegal",
"HDFS",
"path",
"characters",
"from",
"the",
"given",
"path",
".",
"Illegal",
"characters",
"will",
"be",
"replaced",
"with",
"the",
"given",
"substitute",
"."
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/HadoopUtils.java#L919-L924 |
minio/minio-java | api/src/main/java/io/minio/MinioClient.java | MinioClient.presignedPutObject | public String presignedPutObject(String bucketName, String objectName, Integer expires)
throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException,
InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException,
InternalExcepti... | java | public String presignedPutObject(String bucketName, String objectName, Integer expires)
throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException,
InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException,
InternalExcepti... | [
"public",
"String",
"presignedPutObject",
"(",
"String",
"bucketName",
",",
"String",
"objectName",
",",
"Integer",
"expires",
")",
"throws",
"InvalidBucketNameException",
",",
"NoSuchAlgorithmException",
",",
"InsufficientDataException",
",",
"IOException",
",",
"Invalid... | Returns a presigned URL to upload an object in the bucket with given expiry time.
</p><b>Example:</b><br>
<pre>{@code String url = minioClient.presignedPutObject("my-bucketname", "my-objectname", 60 * 60 * 24);
System.out.println(url); }</pre>
@param bucketName Bucket name
@param objectName Object name in the bucke... | [
"Returns",
"a",
"presigned",
"URL",
"to",
"upload",
"an",
"object",
"in",
"the",
"bucket",
"with",
"given",
"expiry",
"time",
"."
] | train | https://github.com/minio/minio-java/blob/b2028f56403c89ce2d5900ae813bc1314c87bc7f/api/src/main/java/io/minio/MinioClient.java#L2506-L2511 |
SvenEwald/xmlbeam | src/main/java/org/xmlbeam/util/intern/duplex/DuplexExpression.java | DuplexExpression.getExpressionType | public ExpressionType getExpressionType() {
"""
Calculates the return type of the expression.
@return ExpressionType
"""
try { //TODO: cache expression type ?
final ExpressionType expressionType = node.firstChildAccept(new ExpressionTypeEvaluationVisitor(), null);
return expr... | java | public ExpressionType getExpressionType() {
try { //TODO: cache expression type ?
final ExpressionType expressionType = node.firstChildAccept(new ExpressionTypeEvaluationVisitor(), null);
return expressionType;
} catch (IllegalArgumentException e) {
throw new IllegalA... | [
"public",
"ExpressionType",
"getExpressionType",
"(",
")",
"{",
"try",
"{",
"//TODO: cache expression type ?",
"final",
"ExpressionType",
"expressionType",
"=",
"node",
".",
"firstChildAccept",
"(",
"new",
"ExpressionTypeEvaluationVisitor",
"(",
")",
",",
"null",
")",
... | Calculates the return type of the expression.
@return ExpressionType | [
"Calculates",
"the",
"return",
"type",
"of",
"the",
"expression",
"."
] | train | https://github.com/SvenEwald/xmlbeam/blob/acaac1b8fa28d246f17187f5e3c6696458a0b447/src/main/java/org/xmlbeam/util/intern/duplex/DuplexExpression.java#L169-L176 |
Chorus-bdd/Chorus | interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/HandlerConfigLoader.java | HandlerConfigLoader.loadPropertiesForSubGroup | public Properties loadPropertiesForSubGroup(ConfigurationManager configurationManager, String handlerPrefix, String groupName) {
"""
Get properties for a specific config, for a handler which maintains properties grouped by configNames
Defaults may also be provided in a special default configName, defaults provi... | java | public Properties loadPropertiesForSubGroup(ConfigurationManager configurationManager, String handlerPrefix, String groupName) {
PropertyOperations handlerProps = properties(loadProperties(configurationManager, handlerPrefix));
PropertyOperations defaultProps = handlerProps.filterByAndRemoveKeyPrefix(C... | [
"public",
"Properties",
"loadPropertiesForSubGroup",
"(",
"ConfigurationManager",
"configurationManager",
",",
"String",
"handlerPrefix",
",",
"String",
"groupName",
")",
"{",
"PropertyOperations",
"handlerProps",
"=",
"properties",
"(",
"loadProperties",
"(",
"configuratio... | Get properties for a specific config, for a handler which maintains properties grouped by configNames
Defaults may also be provided in a special default configName, defaults provide base values which may be overridden
by those set at configName level.
myHandler.config1.property1=val
myHandler.config1.property2=val
m... | [
"Get",
"properties",
"for",
"a",
"specific",
"config",
"for",
"a",
"handler",
"which",
"maintains",
"properties",
"grouped",
"by",
"configNames"
] | train | https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/HandlerConfigLoader.java#L65-L73 |
aws/aws-sdk-java | aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java | Item.withDouble | public Item withDouble(String attrName, double val) {
"""
Sets the value of the specified attribute in the current item to the
given value.
"""
checkInvalidAttrName(attrName);
return withNumber(attrName, Double.valueOf(val));
} | java | public Item withDouble(String attrName, double val) {
checkInvalidAttrName(attrName);
return withNumber(attrName, Double.valueOf(val));
} | [
"public",
"Item",
"withDouble",
"(",
"String",
"attrName",
",",
"double",
"val",
")",
"{",
"checkInvalidAttrName",
"(",
"attrName",
")",
";",
"return",
"withNumber",
"(",
"attrName",
",",
"Double",
".",
"valueOf",
"(",
"val",
")",
")",
";",
"}"
] | Sets the value of the specified attribute in the current item to the
given value. | [
"Sets",
"the",
"value",
"of",
"the",
"specified",
"attribute",
"in",
"the",
"current",
"item",
"to",
"the",
"given",
"value",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java#L323-L326 |
TouK/sputnik | src/main/java/pl/touk/sputnik/processor/sonar/SonarResultParser.java | SonarResultParser.getIssueFilePath | private String getIssueFilePath(String issueComponent, Map<String, Component> components) {
"""
Returns the path of the file linked to an issue created by Sonar.
The path is relative to the folder where Sonar has been run.
@param issueComponent "component" field in an issue.
@param components information abou... | java | private String getIssueFilePath(String issueComponent, Map<String, Component> components) {
Component comp = components.get(issueComponent);
String file = comp.path;
if (!Strings.isNullOrEmpty(comp.moduleKey)) {
String theKey = comp.moduleKey;
while (!theKey.isEmpty()) {
... | [
"private",
"String",
"getIssueFilePath",
"(",
"String",
"issueComponent",
",",
"Map",
"<",
"String",
",",
"Component",
">",
"components",
")",
"{",
"Component",
"comp",
"=",
"components",
".",
"get",
"(",
"issueComponent",
")",
";",
"String",
"file",
"=",
"c... | Returns the path of the file linked to an issue created by Sonar.
The path is relative to the folder where Sonar has been run.
@param issueComponent "component" field in an issue.
@param components information about all components. | [
"Returns",
"the",
"path",
"of",
"the",
"file",
"linked",
"to",
"an",
"issue",
"created",
"by",
"Sonar",
".",
"The",
"path",
"is",
"relative",
"to",
"the",
"folder",
"where",
"Sonar",
"has",
"been",
"run",
"."
] | train | https://github.com/TouK/sputnik/blob/64569e603d8837e800e3b3797b604a6942a7b5c5/src/main/java/pl/touk/sputnik/processor/sonar/SonarResultParser.java#L117-L138 |
twilliamson/mogwee-logging | src/main/java/com/mogwee/logging/Logger.java | Logger.warnf | public final void warnf(String message, Object... args) {
"""
Logs a formatted message if WARN logging is enabled.
@param message a <a href="http://download.oracle.com/javase/6/docs/api/java/util/Formatter.html#syntax">format string</a>
@param args arguments referenced by the format specifiers in the format... | java | public final void warnf(String message, Object... args)
{
logf(Level.WARN, null, message, args);
} | [
"public",
"final",
"void",
"warnf",
"(",
"String",
"message",
",",
"Object",
"...",
"args",
")",
"{",
"logf",
"(",
"Level",
".",
"WARN",
",",
"null",
",",
"message",
",",
"args",
")",
";",
"}"
] | Logs a formatted message if WARN logging is enabled.
@param message a <a href="http://download.oracle.com/javase/6/docs/api/java/util/Formatter.html#syntax">format string</a>
@param args arguments referenced by the format specifiers in the format string. | [
"Logs",
"a",
"formatted",
"message",
"if",
"WARN",
"logging",
"is",
"enabled",
"."
] | train | https://github.com/twilliamson/mogwee-logging/blob/30b99c2649de455432d956a8f6a74316de4cd62c/src/main/java/com/mogwee/logging/Logger.java#L213-L216 |
playn/playn | core/src/playn/core/Texture.java | Texture.tile | public Tile tile (float x, float y, float width, float height) {
"""
Returns an instance that can be used to render a sub-region of this texture.
"""
final float tileX = x, tileY = y, tileWidth = width, tileHeight = height;
return new Tile() {
@Override public Texture texture () { return Texture.... | java | public Tile tile (float x, float y, float width, float height) {
final float tileX = x, tileY = y, tileWidth = width, tileHeight = height;
return new Tile() {
@Override public Texture texture () { return Texture.this; }
@Override public float width () { return tileWidth; }
@Override public flo... | [
"public",
"Tile",
"tile",
"(",
"float",
"x",
",",
"float",
"y",
",",
"float",
"width",
",",
"float",
"height",
")",
"{",
"final",
"float",
"tileX",
"=",
"x",
",",
"tileY",
"=",
"y",
",",
"tileWidth",
"=",
"width",
",",
"tileHeight",
"=",
"height",
... | Returns an instance that can be used to render a sub-region of this texture. | [
"Returns",
"an",
"instance",
"that",
"can",
"be",
"used",
"to",
"render",
"a",
"sub",
"-",
"region",
"of",
"this",
"texture",
"."
] | train | https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/core/src/playn/core/Texture.java#L182-L202 |
jmrozanec/cron-utils | src/main/java/com/cronutils/model/time/TimeNode.java | TimeNode.getNearestBackwardValue | @VisibleForTesting
NearestValue getNearestBackwardValue(final int reference, int shiftsToApply) {
"""
We return same reference value if matches or previous one if does not match.
Then we start applying shifts.
This way we ensure same value is returned if no shift is requested.
@param reference - refer... | java | @VisibleForTesting
NearestValue getNearestBackwardValue(final int reference, int shiftsToApply) {
final List<Integer> temporaryValues = new ArrayList<>(this.values);
Collections.reverse(temporaryValues);
int index = 0;
boolean foundSmaller = false;
final AtomicInteger shift =... | [
"@",
"VisibleForTesting",
"NearestValue",
"getNearestBackwardValue",
"(",
"final",
"int",
"reference",
",",
"int",
"shiftsToApply",
")",
"{",
"final",
"List",
"<",
"Integer",
">",
"temporaryValues",
"=",
"new",
"ArrayList",
"<>",
"(",
"this",
".",
"values",
")",... | We return same reference value if matches or previous one if does not match.
Then we start applying shifts.
This way we ensure same value is returned if no shift is requested.
@param reference - reference value
@param shiftsToApply - shifts to apply
@return NearestValue instance, never null. Holds information on n... | [
"We",
"return",
"same",
"reference",
"value",
"if",
"matches",
"or",
"previous",
"one",
"if",
"does",
"not",
"match",
".",
"Then",
"we",
"start",
"applying",
"shifts",
".",
"This",
"way",
"we",
"ensure",
"same",
"value",
"is",
"returned",
"if",
"no",
"sh... | train | https://github.com/jmrozanec/cron-utils/blob/adac5ec8fd9160b082f9762a6eedea0715731170/src/main/java/com/cronutils/model/time/TimeNode.java#L91-L119 |
OpenLiberty/open-liberty | dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/ChecksumsManager.java | ChecksumsManager.saveChecksumFile | public static void saveChecksumFile(File csFile, Properties csprops, String reason) {
"""
Saves the checksum properties to csFile.
@param csFile Output file
@param csprops Checksum properties file
@param reason the reason for saving the checksum file
"""
FileOutputStream fOut = null;
try {... | java | public static void saveChecksumFile(File csFile, Properties csprops, String reason) {
FileOutputStream fOut = null;
try {
fOut = new FileOutputStream(csFile);
csprops.store(fOut, null);
logger.log(Level.FINEST, "Successfully updated the checksum file " + csFile.getAbs... | [
"public",
"static",
"void",
"saveChecksumFile",
"(",
"File",
"csFile",
",",
"Properties",
"csprops",
",",
"String",
"reason",
")",
"{",
"FileOutputStream",
"fOut",
"=",
"null",
";",
"try",
"{",
"fOut",
"=",
"new",
"FileOutputStream",
"(",
"csFile",
")",
";",... | Saves the checksum properties to csFile.
@param csFile Output file
@param csprops Checksum properties file
@param reason the reason for saving the checksum file | [
"Saves",
"the",
"checksum",
"properties",
"to",
"csFile",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/ChecksumsManager.java#L218-L229 |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer/src/com/ibm/ws/ejbcontainer/osgi/internal/naming/EJBJavaColonNamingHelper.java | EJBJavaColonNamingHelper.processJavaColonApp | private Object processJavaColonApp(String lookupName) throws NamingException {
"""
This method process lookup requests for java:app.
@param appName Application name.
@param lookupName JNDI lookup name.
@param cmd Component metadata.
@return the EJB object instance.
@throws NamingException
"""
C... | java | private Object processJavaColonApp(String lookupName) throws NamingException {
ComponentMetaData cmd = getComponentMetaData(JavaColonNamespace.APP, lookupName);
ModuleMetaData mmd = cmd.getModuleMetaData();
ApplicationMetaData amd = mmd.getApplicationMetaData();
Lock readLock = javaCol... | [
"private",
"Object",
"processJavaColonApp",
"(",
"String",
"lookupName",
")",
"throws",
"NamingException",
"{",
"ComponentMetaData",
"cmd",
"=",
"getComponentMetaData",
"(",
"JavaColonNamespace",
".",
"APP",
",",
"lookupName",
")",
";",
"ModuleMetaData",
"mmd",
"=",
... | This method process lookup requests for java:app.
@param appName Application name.
@param lookupName JNDI lookup name.
@param cmd Component metadata.
@return the EJB object instance.
@throws NamingException | [
"This",
"method",
"process",
"lookup",
"requests",
"for",
"java",
":",
"app",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer/src/com/ibm/ws/ejbcontainer/osgi/internal/naming/EJBJavaColonNamingHelper.java#L198-L218 |
alkacon/opencms-core | src/org/opencms/file/CmsObject.java | CmsObject.deleteRelationsFromResource | public void deleteRelationsFromResource(String resourceName, CmsRelationFilter filter) throws CmsException {
"""
Deletes the relations to a given resource.<p>
@param resourceName the resource to delete the relations from
@param filter the filter to use for deleting the relations
@throws CmsException if some... | java | public void deleteRelationsFromResource(String resourceName, CmsRelationFilter filter) throws CmsException {
CmsResource resource = readResource(resourceName, CmsResourceFilter.ALL);
m_securityManager.deleteRelationsForResource(m_context, resource, filter);
} | [
"public",
"void",
"deleteRelationsFromResource",
"(",
"String",
"resourceName",
",",
"CmsRelationFilter",
"filter",
")",
"throws",
"CmsException",
"{",
"CmsResource",
"resource",
"=",
"readResource",
"(",
"resourceName",
",",
"CmsResourceFilter",
".",
"ALL",
")",
";",... | Deletes the relations to a given resource.<p>
@param resourceName the resource to delete the relations from
@param filter the filter to use for deleting the relations
@throws CmsException if something goes wrong | [
"Deletes",
"the",
"relations",
"to",
"a",
"given",
"resource",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L1020-L1024 |
liferay/com-liferay-commerce | commerce-currency-api/src/main/java/com/liferay/commerce/currency/service/persistence/CommerceCurrencyUtil.java | CommerceCurrencyUtil.findByUUID_G | public static CommerceCurrency findByUUID_G(String uuid, long groupId)
throws com.liferay.commerce.currency.exception.NoSuchCurrencyException {
"""
Returns the commerce currency where uuid = ? and groupId = ? or throws a {@link NoSuchCurrencyException} if it could not be found.
@param uuid the uuid
@... | java | public static CommerceCurrency findByUUID_G(String uuid, long groupId)
throws com.liferay.commerce.currency.exception.NoSuchCurrencyException {
return getPersistence().findByUUID_G(uuid, groupId);
} | [
"public",
"static",
"CommerceCurrency",
"findByUUID_G",
"(",
"String",
"uuid",
",",
"long",
"groupId",
")",
"throws",
"com",
".",
"liferay",
".",
"commerce",
".",
"currency",
".",
"exception",
".",
"NoSuchCurrencyException",
"{",
"return",
"getPersistence",
"(",
... | Returns the commerce currency where uuid = ? and groupId = ? or throws a {@link NoSuchCurrencyException} if it could not be found.
@param uuid the uuid
@param groupId the group ID
@return the matching commerce currency
@throws NoSuchCurrencyException if a matching commerce currency could not be found | [
"Returns",
"the",
"commerce",
"currency",
"where",
"uuid",
"=",
"?",
";",
"and",
"groupId",
"=",
"?",
";",
"or",
"throws",
"a",
"{",
"@link",
"NoSuchCurrencyException",
"}",
"if",
"it",
"could",
"not",
"be",
"found",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-currency-api/src/main/java/com/liferay/commerce/currency/service/persistence/CommerceCurrencyUtil.java#L279-L282 |
javagl/CommonUI | src/main/java/de/javagl/common/ui/table/renderer/SortOrderTableHeaderCellRenderer.java | SortOrderTableHeaderCellRenderer.getSortOrder | private static SortOrder getSortOrder(JTable table, int column) {
"""
Returns the sort order of the specified column in the given table,
or null if the column is not sorted
@param table The table
@param column The column
@return The sort order
"""
List<? extends SortKey> sortKeys = table.getRowS... | java | private static SortOrder getSortOrder(JTable table, int column)
{
List<? extends SortKey> sortKeys = table.getRowSorter().getSortKeys();
for (int i=0; i<sortKeys.size(); i++)
{
SortKey sortKey = sortKeys.get(i);
if (sortKey.getColumn() == table.convertColumnInde... | [
"private",
"static",
"SortOrder",
"getSortOrder",
"(",
"JTable",
"table",
",",
"int",
"column",
")",
"{",
"List",
"<",
"?",
"extends",
"SortKey",
">",
"sortKeys",
"=",
"table",
".",
"getRowSorter",
"(",
")",
".",
"getSortKeys",
"(",
")",
";",
"for",
"(",... | Returns the sort order of the specified column in the given table,
or null if the column is not sorted
@param table The table
@param column The column
@return The sort order | [
"Returns",
"the",
"sort",
"order",
"of",
"the",
"specified",
"column",
"in",
"the",
"given",
"table",
"or",
"null",
"if",
"the",
"column",
"is",
"not",
"sorted"
] | train | https://github.com/javagl/CommonUI/blob/b2c7a7637d4e288271392ba148dc17e4c9780255/src/main/java/de/javagl/common/ui/table/renderer/SortOrderTableHeaderCellRenderer.java#L177-L189 |
CenturyLinkCloud/clc-java-sdk | sdk/src/main/java/com/centurylink/cloud/sdk/server/services/dsl/GroupService.java | GroupService.modify | public OperationFuture<List<Group>> modify(GroupFilter groupFilter, GroupConfig groupConfig) {
"""
Update provided list of groups
@param groupFilter search criteria
@param groupConfig group config
@return OperationFuture wrapper for list of Group
"""
List<Group> groups = Arrays.asList(getRefsFromFil... | java | public OperationFuture<List<Group>> modify(GroupFilter groupFilter, GroupConfig groupConfig) {
List<Group> groups = Arrays.asList(getRefsFromFilter(groupFilter));
return modify(groups, groupConfig);
} | [
"public",
"OperationFuture",
"<",
"List",
"<",
"Group",
">",
">",
"modify",
"(",
"GroupFilter",
"groupFilter",
",",
"GroupConfig",
"groupConfig",
")",
"{",
"List",
"<",
"Group",
">",
"groups",
"=",
"Arrays",
".",
"asList",
"(",
"getRefsFromFilter",
"(",
"gro... | Update provided list of groups
@param groupFilter search criteria
@param groupConfig group config
@return OperationFuture wrapper for list of Group | [
"Update",
"provided",
"list",
"of",
"groups"
] | train | https://github.com/CenturyLinkCloud/clc-java-sdk/blob/c026322f077dea71b1acf9f2d665253d79d9bf85/sdk/src/main/java/com/centurylink/cloud/sdk/server/services/dsl/GroupService.java#L343-L347 |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java | DataService.voidRequestAsync | public <T extends IEntity> void voidRequestAsync(T entity, CallbackHandler callbackHandler) throws FMSException {
"""
Method to cancel the operation for the corresponding entity in asynchronous fashion
@param entity
the entity
@param callbackHandler
the callback handler
@throws FMSException
"""
... | java | public <T extends IEntity> void voidRequestAsync(T entity, CallbackHandler callbackHandler) throws FMSException {
IntuitMessage intuitMessage = prepareVoidRequest(entity);
//set callback handler
intuitMessage.getRequestElements().setCallbackHandler(callbackHandler);
//execute async in... | [
"public",
"<",
"T",
"extends",
"IEntity",
">",
"void",
"voidRequestAsync",
"(",
"T",
"entity",
",",
"CallbackHandler",
"callbackHandler",
")",
"throws",
"FMSException",
"{",
"IntuitMessage",
"intuitMessage",
"=",
"prepareVoidRequest",
"(",
"entity",
")",
";",
"//s... | Method to cancel the operation for the corresponding entity in asynchronous fashion
@param entity
the entity
@param callbackHandler
the callback handler
@throws FMSException | [
"Method",
"to",
"cancel",
"the",
"operation",
"for",
"the",
"corresponding",
"entity",
"in",
"asynchronous",
"fashion"
] | train | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java#L839-L848 |
stratosphere/stratosphere | stratosphere-addons/spargel/src/main/java/eu/stratosphere/spargel/java/VertexCentricIteration.java | VertexCentricIteration.addBroadcastSetForMessagingFunction | public void addBroadcastSetForMessagingFunction(String name, DataSet<?> data) {
"""
Adds a data set as a broadcast set to the messaging function.
@param name The name under which the broadcast data is available in the messaging function.
@param data The data set to be broadcasted.
"""
this.bcVarsMessagin... | java | public void addBroadcastSetForMessagingFunction(String name, DataSet<?> data) {
this.bcVarsMessaging.add(new Tuple2<String, DataSet<?>>(name, data));
} | [
"public",
"void",
"addBroadcastSetForMessagingFunction",
"(",
"String",
"name",
",",
"DataSet",
"<",
"?",
">",
"data",
")",
"{",
"this",
".",
"bcVarsMessaging",
".",
"add",
"(",
"new",
"Tuple2",
"<",
"String",
",",
"DataSet",
"<",
"?",
">",
">",
"(",
"na... | Adds a data set as a broadcast set to the messaging function.
@param name The name under which the broadcast data is available in the messaging function.
@param data The data set to be broadcasted. | [
"Adds",
"a",
"data",
"set",
"as",
"a",
"broadcast",
"set",
"to",
"the",
"messaging",
"function",
"."
] | train | https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-addons/spargel/src/main/java/eu/stratosphere/spargel/java/VertexCentricIteration.java#L180-L182 |
Alluxio/alluxio | job/server/src/main/java/alluxio/worker/job/task/TaskExecutorManager.java | TaskExecutorManager.executeTask | public synchronized void executeTask(long jobId, int taskId, JobConfig jobConfig,
Serializable taskArgs, RunTaskContext context) {
"""
Executes the given task.
@param jobId the job id
@param taskId the task id
@param jobConfig the job configuration
@param taskArgs the arguments
@param context the cont... | java | public synchronized void executeTask(long jobId, int taskId, JobConfig jobConfig,
Serializable taskArgs, RunTaskContext context) {
Future<?> future = mTaskExecutionService
.submit(new TaskExecutor(jobId, taskId, jobConfig, taskArgs, context, this));
Pair<Long, Integer> id = new Pair<>(jobId, taskI... | [
"public",
"synchronized",
"void",
"executeTask",
"(",
"long",
"jobId",
",",
"int",
"taskId",
",",
"JobConfig",
"jobConfig",
",",
"Serializable",
"taskArgs",
",",
"RunTaskContext",
"context",
")",
"{",
"Future",
"<",
"?",
">",
"future",
"=",
"mTaskExecutionServic... | Executes the given task.
@param jobId the job id
@param taskId the task id
@param jobConfig the job configuration
@param taskArgs the arguments
@param context the context of the worker | [
"Executes",
"the",
"given",
"task",
"."
] | train | https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/job/server/src/main/java/alluxio/worker/job/task/TaskExecutorManager.java#L128-L141 |
elki-project/elki | elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/weightfunctions/ErfcStddevWeight.java | ErfcStddevWeight.getWeight | @Override
public double getWeight(double distance, double max, double stddev) {
"""
Return Erfc weight, scaled by standard deviation. max is ignored.
"""
if(stddev <= 0) {
return 1;
}
return NormalDistribution.erfc(MathUtil.SQRTHALF * distance / stddev);
} | java | @Override
public double getWeight(double distance, double max, double stddev) {
if(stddev <= 0) {
return 1;
}
return NormalDistribution.erfc(MathUtil.SQRTHALF * distance / stddev);
} | [
"@",
"Override",
"public",
"double",
"getWeight",
"(",
"double",
"distance",
",",
"double",
"max",
",",
"double",
"stddev",
")",
"{",
"if",
"(",
"stddev",
"<=",
"0",
")",
"{",
"return",
"1",
";",
"}",
"return",
"NormalDistribution",
".",
"erfc",
"(",
"... | Return Erfc weight, scaled by standard deviation. max is ignored. | [
"Return",
"Erfc",
"weight",
"scaled",
"by",
"standard",
"deviation",
".",
"max",
"is",
"ignored",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/weightfunctions/ErfcStddevWeight.java#L39-L45 |
jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/event/SubFileIntegrityHandler.java | SubFileIntegrityHandler.init | public void init(Record record, Record recSubFile, String strSubFile, boolean bRemoveSubRecords) {
"""
Constructor.
@param record My owner (usually passed as null, and set on addListener in setOwner()).
@param recordMain The main record to create a sub-query for.
@param bRemoteSubRecords Remove sub-records on d... | java | public void init(Record record, Record recSubFile, String strSubFile, boolean bRemoveSubRecords)
{ // For this to work right, the booking number field needs a listener to re-select this file whenever it changes
super.init(record, null, recSubFile, true);
m_strSubFile = strSubFile;
m_bRemo... | [
"public",
"void",
"init",
"(",
"Record",
"record",
",",
"Record",
"recSubFile",
",",
"String",
"strSubFile",
",",
"boolean",
"bRemoveSubRecords",
")",
"{",
"// For this to work right, the booking number field needs a listener to re-select this file whenever it changes",
"super",
... | Constructor.
@param record My owner (usually passed as null, and set on addListener in setOwner()).
@param recordMain The main record to create a sub-query for.
@param bRemoteSubRecords Remove sub-records on delete main? | [
"Constructor",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/SubFileIntegrityHandler.java#L91-L97 |
RestComm/sip-servlets | sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java | FacebookRestClient.notifications_send | public void notifications_send(Collection<Integer> recipientIds, CharSequence notification)
throws FacebookException, IOException {
"""
Send a notification message to the specified users on behalf of the logged-in user.
@param recipientIds the user ids to which the message is to be sent. if empty,
notifica... | java | public void notifications_send(Collection<Integer> recipientIds, CharSequence notification)
throws FacebookException, IOException {
assert (null != notification);
ArrayList<Pair<String, CharSequence>> args = new ArrayList<Pair<String, CharSequence>>(3);
if (null != recipientIds && !recipientIds.isEmpty(... | [
"public",
"void",
"notifications_send",
"(",
"Collection",
"<",
"Integer",
">",
"recipientIds",
",",
"CharSequence",
"notification",
")",
"throws",
"FacebookException",
",",
"IOException",
"{",
"assert",
"(",
"null",
"!=",
"notification",
")",
";",
"ArrayList",
"<... | Send a notification message to the specified users on behalf of the logged-in user.
@param recipientIds the user ids to which the message is to be sent. if empty,
notification will be sent to logged-in user.
@param notification the FBML to be displayed on the notifications page; only a stripped-down
set of FBML tags t... | [
"Send",
"a",
"notification",
"message",
"to",
"the",
"specified",
"users",
"on",
"behalf",
"of",
"the",
"logged",
"-",
"in",
"user",
"."
] | train | https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java#L1156-L1165 |
xiancloud/xian | xian-core/src/main/java/info/xiancloud/core/conf/plugin/PluginConfig.java | PluginConfig.extendedKey | private static String extendedKey(Properties properties, String key) {
"""
For internal use only, please do not rely on this method.
@return the environment specific configuration key. The original key will be returned if no prefixed configuration is specified for the current env.
"""
String extende... | java | private static String extendedKey(Properties properties, String key) {
String extendedKey = extendedKey(key);
return properties.containsKey(extendedKey) ? extendedKey : key;
} | [
"private",
"static",
"String",
"extendedKey",
"(",
"Properties",
"properties",
",",
"String",
"key",
")",
"{",
"String",
"extendedKey",
"=",
"extendedKey",
"(",
"key",
")",
";",
"return",
"properties",
".",
"containsKey",
"(",
"extendedKey",
")",
"?",
"extende... | For internal use only, please do not rely on this method.
@return the environment specific configuration key. The original key will be returned if no prefixed configuration is specified for the current env. | [
"For",
"internal",
"use",
"only",
"please",
"do",
"not",
"rely",
"on",
"this",
"method",
"."
] | train | https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/conf/plugin/PluginConfig.java#L144-L147 |
UrielCh/ovh-java-sdk | ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java | ApiOvhOrder.freefax_serviceName_convertToVoicefax_GET | public OvhOrder freefax_serviceName_convertToVoicefax_GET(String serviceName, String billingAccount) throws IOException {
"""
Get prices and contracts information
REST: GET /order/freefax/{serviceName}/convertToVoicefax
@param billingAccount [required] The /telephony billing account you want your service to be... | java | public OvhOrder freefax_serviceName_convertToVoicefax_GET(String serviceName, String billingAccount) throws IOException {
String qPath = "/order/freefax/{serviceName}/convertToVoicefax";
StringBuilder sb = path(qPath, serviceName);
query(sb, "billingAccount", billingAccount);
String resp = exec(qPath, "GET", sb... | [
"public",
"OvhOrder",
"freefax_serviceName_convertToVoicefax_GET",
"(",
"String",
"serviceName",
",",
"String",
"billingAccount",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/order/freefax/{serviceName}/convertToVoicefax\"",
";",
"StringBuilder",
"sb",
"=",
... | Get prices and contracts information
REST: GET /order/freefax/{serviceName}/convertToVoicefax
@param billingAccount [required] The /telephony billing account you want your service to be attached to
@param serviceName [required] Freefax number | [
"Get",
"prices",
"and",
"contracts",
"information"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L956-L962 |
j-a-w-r/jawr-main-repo | jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java | ResourceBundlesHandlerImpl.joinAndStoreBundle | private void joinAndStoreBundle(JoinableResourceBundle bundle) {
"""
Joins the members of a bundle and stores it
@param bundle
the bundle
@param the
flag indicating if we should process the bundle or not
"""
BundleProcessingStatus status = new BundleProcessingStatus(BundleProcessingStatus.FILE_PROCESS... | java | private void joinAndStoreBundle(JoinableResourceBundle bundle) {
BundleProcessingStatus status = new BundleProcessingStatus(BundleProcessingStatus.FILE_PROCESSING_TYPE, bundle,
resourceHandler, config);
JoinableResourceBundleContent store = null;
// Process the bundle for searching variant
if (needToSearc... | [
"private",
"void",
"joinAndStoreBundle",
"(",
"JoinableResourceBundle",
"bundle",
")",
"{",
"BundleProcessingStatus",
"status",
"=",
"new",
"BundleProcessingStatus",
"(",
"BundleProcessingStatus",
".",
"FILE_PROCESSING_TYPE",
",",
"bundle",
",",
"resourceHandler",
",",
"c... | Joins the members of a bundle and stores it
@param bundle
the bundle
@param the
flag indicating if we should process the bundle or not | [
"Joins",
"the",
"members",
"of",
"a",
"bundle",
"and",
"stores",
"it"
] | train | https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L1215-L1253 |
biojava/biojava | biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/ZipChemCompProvider.java | ZipChemCompProvider.finder | static private File[] finder( String dirName, final String suffix) {
"""
Return File(s) in dirName that match suffix.
@param dirName
@param suffix
@return
"""
if (null == dirName || null == suffix) {
return null;
}
final File dir = new File(dirName);
return dir.listFiles(new FilenameFilter() {
... | java | static private File[] finder( String dirName, final String suffix){
if (null == dirName || null == suffix) {
return null;
}
final File dir = new File(dirName);
return dir.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String filename)
{ return filename.endsWith(suffix); ... | [
"static",
"private",
"File",
"[",
"]",
"finder",
"(",
"String",
"dirName",
",",
"final",
"String",
"suffix",
")",
"{",
"if",
"(",
"null",
"==",
"dirName",
"||",
"null",
"==",
"suffix",
")",
"{",
"return",
"null",
";",
"}",
"final",
"File",
"dir",
"="... | Return File(s) in dirName that match suffix.
@param dirName
@param suffix
@return | [
"Return",
"File",
"(",
"s",
")",
"in",
"dirName",
"that",
"match",
"suffix",
"."
] | train | https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/ZipChemCompProvider.java#L215-L226 |
shrinkwrap/shrinkwrap | impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/io/IOUtil.java | IOUtil.copyWithClose | public static void copyWithClose(InputStream input, OutputStream output) throws IOException {
"""
Copies the contents from an InputStream to an OutputStream and closes both streams.
@param input
@param output
@throws IOException
If a problem occurred during any I/O operations during the copy, but on closing ... | java | public static void copyWithClose(InputStream input, OutputStream output) throws IOException {
try {
copy(input, output);
} finally {
try {
input.close();
} catch (final IOException ignore) {
if (log.isLoggable(Level.FINER)) {
... | [
"public",
"static",
"void",
"copyWithClose",
"(",
"InputStream",
"input",
",",
"OutputStream",
"output",
")",
"throws",
"IOException",
"{",
"try",
"{",
"copy",
"(",
"input",
",",
"output",
")",
";",
"}",
"finally",
"{",
"try",
"{",
"input",
".",
"close",
... | Copies the contents from an InputStream to an OutputStream and closes both streams.
@param input
@param output
@throws IOException
If a problem occurred during any I/O operations during the copy, but on closing the streams these
will be ignored and logged at {@link Level#FINER} | [
"Copies",
"the",
"contents",
"from",
"an",
"InputStream",
"to",
"an",
"OutputStream",
"and",
"closes",
"both",
"streams",
"."
] | train | https://github.com/shrinkwrap/shrinkwrap/blob/3f8a1a6d344651428c709a63ebb52d35343c5387/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/io/IOUtil.java#L202-L221 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java | SparkComputationGraph.doEvaluation | public IEvaluation[] doEvaluation(JavaRDD<String> data, int evalNumWorkers, int evalBatchSize, DataSetLoader loader, IEvaluation... emptyEvaluations) {
"""
Perform evaluation on serialized DataSet objects on disk, (potentially in any format), that are loaded using an {@link DataSetLoader}.
@param data ... | java | public IEvaluation[] doEvaluation(JavaRDD<String> data, int evalNumWorkers, int evalBatchSize, DataSetLoader loader, IEvaluation... emptyEvaluations) {
return doEvaluation(data, evalNumWorkers, evalBatchSize, loader, null, emptyEvaluations);
} | [
"public",
"IEvaluation",
"[",
"]",
"doEvaluation",
"(",
"JavaRDD",
"<",
"String",
">",
"data",
",",
"int",
"evalNumWorkers",
",",
"int",
"evalBatchSize",
",",
"DataSetLoader",
"loader",
",",
"IEvaluation",
"...",
"emptyEvaluations",
")",
"{",
"return",
"doEvalua... | Perform evaluation on serialized DataSet objects on disk, (potentially in any format), that are loaded using an {@link DataSetLoader}.
@param data List of paths to the data (that can be loaded as / converted to DataSets)
@param evalNumWorkers Number of workers to perform evaluation with. To reduce memory ... | [
"Perform",
"evaluation",
"on",
"serialized",
"DataSet",
"objects",
"on",
"disk",
"(",
"potentially",
"in",
"any",
"format",
")",
"that",
"are",
"loaded",
"using",
"an",
"{"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java#L881-L883 |
Netflix/astyanax | astyanax-core/src/main/java/com/netflix/astyanax/connectionpool/Host.java | Host.parsePortFromHostAndPort | public static int parsePortFromHostAndPort(String urlPort, int defaultPort) {
"""
Parse the port from a "hostname:port" formatted string
@param urlPort
@param defaultPort
@return
"""
return urlPort.lastIndexOf(':') > 0 ? Integer.valueOf(urlPort.substring(urlPort.lastIndexOf(':') + 1,
... | java | public static int parsePortFromHostAndPort(String urlPort, int defaultPort) {
return urlPort.lastIndexOf(':') > 0 ? Integer.valueOf(urlPort.substring(urlPort.lastIndexOf(':') + 1,
urlPort.length())) : defaultPort;
} | [
"public",
"static",
"int",
"parsePortFromHostAndPort",
"(",
"String",
"urlPort",
",",
"int",
"defaultPort",
")",
"{",
"return",
"urlPort",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
">",
"0",
"?",
"Integer",
".",
"valueOf",
"(",
"urlPort",
".",
"substring",
"... | Parse the port from a "hostname:port" formatted string
@param urlPort
@param defaultPort
@return | [
"Parse",
"the",
"port",
"from",
"a",
"hostname",
":",
"port",
"formatted",
"string"
] | train | https://github.com/Netflix/astyanax/blob/bcc3fd26e2dda05a923751aa32b139f6209fecdf/astyanax-core/src/main/java/com/netflix/astyanax/connectionpool/Host.java#L118-L121 |
pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/BaseLevel.java | BaseLevel.getClosestTopicByDBId | public SpecTopic getClosestTopicByDBId(final Integer DBId, final SpecNode callerNode, final boolean checkParentNode) {
"""
This function checks the levels nodes and child nodes to see if it can match a spec topic for a topic database id.
@param DBId The topic database id
@param callerNode The n... | java | public SpecTopic getClosestTopicByDBId(final Integer DBId, final SpecNode callerNode, final boolean checkParentNode) {
final SpecTopic retValue = super.getClosestTopicByDBId(DBId, callerNode, checkParentNode);
if (retValue != null) {
return retValue;
} else {
// Look up t... | [
"public",
"SpecTopic",
"getClosestTopicByDBId",
"(",
"final",
"Integer",
"DBId",
",",
"final",
"SpecNode",
"callerNode",
",",
"final",
"boolean",
"checkParentNode",
")",
"{",
"final",
"SpecTopic",
"retValue",
"=",
"super",
".",
"getClosestTopicByDBId",
"(",
"DBId",
... | This function checks the levels nodes and child nodes to see if it can match a spec topic for a topic database id.
@param DBId The topic database id
@param callerNode The node that called this function so that it isn't rechecked
@param checkParentNode If the function should check the levels parents as ... | [
"This",
"function",
"checks",
"the",
"levels",
"nodes",
"and",
"child",
"nodes",
"to",
"see",
"if",
"it",
"can",
"match",
"a",
"spec",
"topic",
"for",
"a",
"topic",
"database",
"id",
"."
] | train | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/BaseLevel.java#L73-L91 |
aws/aws-sdk-java | aws-java-sdk-codestar/src/main/java/com/amazonaws/services/codestar/model/TagProjectRequest.java | TagProjectRequest.withTags | public TagProjectRequest withTags(java.util.Map<String, String> tags) {
"""
<p>
The tags you want to add to the project.
</p>
@param tags
The tags you want to add to the project.
@return Returns a reference to this object so that method calls can be chained together.
"""
setTags(tags);
r... | java | public TagProjectRequest withTags(java.util.Map<String, String> tags) {
setTags(tags);
return this;
} | [
"public",
"TagProjectRequest",
"withTags",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"tags",
")",
"{",
"setTags",
"(",
"tags",
")",
";",
"return",
"this",
";",
"}"
] | <p>
The tags you want to add to the project.
</p>
@param tags
The tags you want to add to the project.
@return Returns a reference to this object so that method calls can be chained together. | [
"<p",
">",
"The",
"tags",
"you",
"want",
"to",
"add",
"to",
"the",
"project",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-codestar/src/main/java/com/amazonaws/services/codestar/model/TagProjectRequest.java#L116-L119 |
orbisgis/h2gis | postgis-jts/src/main/java/org/h2gis/postgis_jts/JtsBinaryParser.java | JtsBinaryParser.parseLineString | private LineString parseLineString(ValueGetter data, boolean haveZ, boolean haveM) {
"""
Parse the given {@link org.postgis.binary.ValueGetter} into a JTS
{@link org.locationtech.jts.geom.LineString}.
@param data {@link org.postgis.binary.ValueGetter} to parse.
@param haveZ True if the {@link org.locationtech... | java | private LineString parseLineString(ValueGetter data, boolean haveZ, boolean haveM) {
return JtsGeometry.geofac.createLineString(this.parseCS(data, haveZ, haveM));
} | [
"private",
"LineString",
"parseLineString",
"(",
"ValueGetter",
"data",
",",
"boolean",
"haveZ",
",",
"boolean",
"haveM",
")",
"{",
"return",
"JtsGeometry",
".",
"geofac",
".",
"createLineString",
"(",
"this",
".",
"parseCS",
"(",
"data",
",",
"haveZ",
",",
... | Parse the given {@link org.postgis.binary.ValueGetter} into a JTS
{@link org.locationtech.jts.geom.LineString}.
@param data {@link org.postgis.binary.ValueGetter} to parse.
@param haveZ True if the {@link org.locationtech.jts.geom.LineString} has a Z component.
@param haveM True if the {@link org.locationtech.jts.geom... | [
"Parse",
"the",
"given",
"{",
"@link",
"org",
".",
"postgis",
".",
"binary",
".",
"ValueGetter",
"}",
"into",
"a",
"JTS",
"{",
"@link",
"org",
".",
"locationtech",
".",
"jts",
".",
"geom",
".",
"LineString",
"}",
"."
] | train | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/postgis-jts/src/main/java/org/h2gis/postgis_jts/JtsBinaryParser.java#L253-L255 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java | Instance.setMetadata | public Operation setMetadata(Metadata metadata, OperationOption... options) {
"""
Sets the metadata for this instance.
@return a zone operation if the set request was issued correctly, {@code null} if the instance
was not found
@throws ComputeException upon failure
"""
return compute.setMetadata(getIn... | java | public Operation setMetadata(Metadata metadata, OperationOption... options) {
return compute.setMetadata(getInstanceId(), metadata, options);
} | [
"public",
"Operation",
"setMetadata",
"(",
"Metadata",
"metadata",
",",
"OperationOption",
"...",
"options",
")",
"{",
"return",
"compute",
".",
"setMetadata",
"(",
"getInstanceId",
"(",
")",
",",
"metadata",
",",
"options",
")",
";",
"}"
] | Sets the metadata for this instance.
@return a zone operation if the set request was issued correctly, {@code null} if the instance
was not found
@throws ComputeException upon failure | [
"Sets",
"the",
"metadata",
"for",
"this",
"instance",
"."
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java#L359-L361 |
sdl/odata | odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java | EntityDataModelUtil.checkIsEntityType | public static EntityType checkIsEntityType(Type type) {
"""
Checks if the specified OData type is an entity type and throws an exception if it is not.
@param type The OData type.
@return The OData type.
@throws ODataSystemException If the OData type is not an entity type.
"""
if (!isEntityType(typ... | java | public static EntityType checkIsEntityType(Type type) {
if (!isEntityType(type)) {
throw new ODataSystemException("An entity type is required, but '" + type.getFullyQualifiedName() +
"' is not an entity type: " + type.getMetaType());
}
return (EntityType) type;
... | [
"public",
"static",
"EntityType",
"checkIsEntityType",
"(",
"Type",
"type",
")",
"{",
"if",
"(",
"!",
"isEntityType",
"(",
"type",
")",
")",
"{",
"throw",
"new",
"ODataSystemException",
"(",
"\"An entity type is required, but '\"",
"+",
"type",
".",
"getFullyQuali... | Checks if the specified OData type is an entity type and throws an exception if it is not.
@param type The OData type.
@return The OData type.
@throws ODataSystemException If the OData type is not an entity type. | [
"Checks",
"if",
"the",
"specified",
"OData",
"type",
"is",
"an",
"entity",
"type",
"and",
"throws",
"an",
"exception",
"if",
"it",
"is",
"not",
"."
] | train | https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java#L204-L210 |
Azure/azure-sdk-for-java | containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ManagedClustersInner.java | ManagedClustersInner.listClusterUserCredentials | public CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName) {
"""
Gets cluster user credential of a managed cluster.
Gets cluster user credential of the managed cluster with a specified resource group and name.
@param resourceGroupName The name of the resource group.... | java | public CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName) {
return listClusterUserCredentialsWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body();
} | [
"public",
"CredentialResultsInner",
"listClusterUserCredentials",
"(",
"String",
"resourceGroupName",
",",
"String",
"resourceName",
")",
"{",
"return",
"listClusterUserCredentialsWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"resourceName",
")",
".",
"toBlocking",
... | Gets cluster user credential of a managed cluster.
Gets cluster user credential of the managed cluster with a specified resource group and name.
@param resourceGroupName The name of the resource group.
@param resourceName The name of the managed cluster resource.
@throws IllegalArgumentException thrown if parameters f... | [
"Gets",
"cluster",
"user",
"credential",
"of",
"a",
"managed",
"cluster",
".",
"Gets",
"cluster",
"user",
"credential",
"of",
"the",
"managed",
"cluster",
"with",
"a",
"specified",
"resource",
"group",
"and",
"name",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ManagedClustersInner.java#L661-L663 |
spotbugs/spotbugs | spotbugs/src/main/java/edu/umd/cs/findbugs/BugInstance.java | BugInstance.getProperty | public String getProperty(String name, String defaultValue) {
"""
Get value of given property, returning given default value if the
property has not been set.
@param name
name of the property to get
@param defaultValue
default value to return if propery is not set
@return the value of the named property, o... | java | public String getProperty(String name, String defaultValue) {
String value = getProperty(name);
return value != null ? value : defaultValue;
} | [
"public",
"String",
"getProperty",
"(",
"String",
"name",
",",
"String",
"defaultValue",
")",
"{",
"String",
"value",
"=",
"getProperty",
"(",
"name",
")",
";",
"return",
"value",
"!=",
"null",
"?",
"value",
":",
"defaultValue",
";",
"}"
] | Get value of given property, returning given default value if the
property has not been set.
@param name
name of the property to get
@param defaultValue
default value to return if propery is not set
@return the value of the named property, or the default value if the
property has not been set | [
"Get",
"value",
"of",
"given",
"property",
"returning",
"given",
"default",
"value",
"if",
"the",
"property",
"has",
"not",
"been",
"set",
"."
] | train | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/BugInstance.java#L688-L691 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java | ImgUtil.writeJpg | public static void writeJpg(Image image, OutputStream out) throws IORuntimeException {
"""
写出图像为JPG格式
@param image {@link Image}
@param out 写出到的目标流
@throws IORuntimeException IO异常
@since 4.0.10
"""
write(image, IMAGE_TYPE_JPG, out);
} | java | public static void writeJpg(Image image, OutputStream out) throws IORuntimeException {
write(image, IMAGE_TYPE_JPG, out);
} | [
"public",
"static",
"void",
"writeJpg",
"(",
"Image",
"image",
",",
"OutputStream",
"out",
")",
"throws",
"IORuntimeException",
"{",
"write",
"(",
"image",
",",
"IMAGE_TYPE_JPG",
",",
"out",
")",
";",
"}"
] | 写出图像为JPG格式
@param image {@link Image}
@param out 写出到的目标流
@throws IORuntimeException IO异常
@since 4.0.10 | [
"写出图像为JPG格式"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L1377-L1379 |
eclipse/xtext-extras | org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/grammarAccess/GrammarAccess.java | GrammarAccess.toJavaIdentifier | public String toJavaIdentifier(final String text, final boolean uppercaseFirst) {
"""
Converts an arbitary string to a valid Java identifier.
The string is split up along the the characters that are not valid as Java
identifier. The first character of each segments is made upper case which
leads to a camel-case... | java | public String toJavaIdentifier(final String text, final boolean uppercaseFirst) {
return GrammarAccessUtil.toJavaIdentifier(text, Boolean.valueOf(uppercaseFirst));
} | [
"public",
"String",
"toJavaIdentifier",
"(",
"final",
"String",
"text",
",",
"final",
"boolean",
"uppercaseFirst",
")",
"{",
"return",
"GrammarAccessUtil",
".",
"toJavaIdentifier",
"(",
"text",
",",
"Boolean",
".",
"valueOf",
"(",
"uppercaseFirst",
")",
")",
";"... | Converts an arbitary string to a valid Java identifier.
The string is split up along the the characters that are not valid as Java
identifier. The first character of each segments is made upper case which
leads to a camel-case style.
@param text the string
@param uppercaseFirst whether the first character of the return... | [
"Converts",
"an",
"arbitary",
"string",
"to",
"a",
"valid",
"Java",
"identifier",
".",
"The",
"string",
"is",
"split",
"up",
"along",
"the",
"the",
"characters",
"that",
"are",
"not",
"valid",
"as",
"Java",
"identifier",
".",
"The",
"first",
"character",
"... | train | https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/grammarAccess/GrammarAccess.java#L46-L48 |
lessthanoptimal/ejml | main/ejml-zdense/src/org/ejml/dense/row/MatrixFeatures_ZDRM.java | MatrixFeatures_ZDRM.isEquals | public static boolean isEquals(ZMatrixD1 a , ZMatrixD1 b , double tol ) {
"""
<p>
Checks to see if each element in the two matrices are within tolerance of
each other: tol ≥ |a<sub>ij</sub> - b<sub>ij</sub>|.
<p>
<p>
NOTE: If any of the elements are not countable then false is returned.<br>
NOTE: If a t... | java | public static boolean isEquals(ZMatrixD1 a , ZMatrixD1 b , double tol )
{
if( a.numRows != b.numRows || a.numCols != b.numCols ) {
return false;
}
if( tol == 0.0 )
return isEquals(a,b);
final int length = a.getDataLength();
for( int i = 0; i < lengt... | [
"public",
"static",
"boolean",
"isEquals",
"(",
"ZMatrixD1",
"a",
",",
"ZMatrixD1",
"b",
",",
"double",
"tol",
")",
"{",
"if",
"(",
"a",
".",
"numRows",
"!=",
"b",
".",
"numRows",
"||",
"a",
".",
"numCols",
"!=",
"b",
".",
"numCols",
")",
"{",
"ret... | <p>
Checks to see if each element in the two matrices are within tolerance of
each other: tol ≥ |a<sub>ij</sub> - b<sub>ij</sub>|.
<p>
<p>
NOTE: If any of the elements are not countable then false is returned.<br>
NOTE: If a tolerance of zero is passed in this is equivalent to calling
{@link #isEquals(ZMatrixD1, ZM... | [
"<p",
">",
"Checks",
"to",
"see",
"if",
"each",
"element",
"in",
"the",
"two",
"matrices",
"are",
"within",
"tolerance",
"of",
"each",
"other",
":",
"tol",
"&ge",
";",
"|a<sub",
">",
"ij<",
"/",
"sub",
">",
"-",
"b<sub",
">",
"ij<",
"/",
"sub",
">"... | train | https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/MatrixFeatures_ZDRM.java#L154-L171 |
micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/io/support/AntPathMatcher.java | AntPathMatcher.matchStrings | private boolean matchStrings(String pattern, String str, Map<String, String> uriTemplateVariables) {
"""
Tests whether or not a string matches against a pattern. The pattern may contain two special characters:<br> '*'
means zero or more characters<br> '?' means one and only one character
@param pattern pattern... | java | private boolean matchStrings(String pattern, String str, Map<String, String> uriTemplateVariables) {
AntPathStringMatcher matcher = new AntPathStringMatcher(pattern, str, uriTemplateVariables);
return matcher.matchStrings();
} | [
"private",
"boolean",
"matchStrings",
"(",
"String",
"pattern",
",",
"String",
"str",
",",
"Map",
"<",
"String",
",",
"String",
">",
"uriTemplateVariables",
")",
"{",
"AntPathStringMatcher",
"matcher",
"=",
"new",
"AntPathStringMatcher",
"(",
"pattern",
",",
"st... | Tests whether or not a string matches against a pattern. The pattern may contain two special characters:<br> '*'
means zero or more characters<br> '?' means one and only one character
@param pattern pattern to match against. Must not be <code>null</code>.
@param str string which must be matched against the pattern... | [
"Tests",
"whether",
"or",
"not",
"a",
"string",
"matches",
"against",
"a",
"pattern",
".",
"The",
"pattern",
"may",
"contain",
"two",
"special",
"characters",
":",
"<br",
">",
"*",
"means",
"zero",
"or",
"more",
"characters<br",
">",
"?",
"means",
"one",
... | train | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/io/support/AntPathMatcher.java#L243-L246 |
drallgood/jpasskit | jpasskit/src/main/java/de/brendamour/jpasskit/signing/PKSigningInformationUtil.java | PKSigningInformationUtil.loadSigningInformationFromPKCS12AndIntermediateCertificate | public PKSigningInformation loadSigningInformationFromPKCS12AndIntermediateCertificate(final String keyPath,final String keyPassword, final String appleWWDRCAFilePath)
throws IOException, CertificateException {
"""
Load all signing information necessary for pass generation from the filesystem or classp... | java | public PKSigningInformation loadSigningInformationFromPKCS12AndIntermediateCertificate(final String keyPath,final String keyPassword, final String appleWWDRCAFilePath)
throws IOException, CertificateException {
try (InputStream walletCertStream = CertUtils.toInputStream(keyPath);
Input... | [
"public",
"PKSigningInformation",
"loadSigningInformationFromPKCS12AndIntermediateCertificate",
"(",
"final",
"String",
"keyPath",
",",
"final",
"String",
"keyPassword",
",",
"final",
"String",
"appleWWDRCAFilePath",
")",
"throws",
"IOException",
",",
"CertificateException",
... | Load all signing information necessary for pass generation from the filesystem or classpath.
@param keyPath
path to keystore (classpath or filesystem)
@param keyPassword
Password used to access the key store
@param appleWWDRCAFilePath
path to apple's WWDRCA certificate file (classpath or filesystem)
@return
a {@link P... | [
"Load",
"all",
"signing",
"information",
"necessary",
"for",
"pass",
"generation",
"from",
"the",
"filesystem",
"or",
"classpath",
"."
] | train | https://github.com/drallgood/jpasskit/blob/63bfa8abbdb85c2d7596c60eed41ed8e374cbd01/jpasskit/src/main/java/de/brendamour/jpasskit/signing/PKSigningInformationUtil.java#L68-L79 |
rometools/rome-certiorem | src/main/java/com/rometools/certiorem/hub/Hub.java | Hub.sendNotification | public void sendNotification(final String requestHost, final String topic) {
"""
Sends a notification to the subscribers
@param requestHost the host name the hub is running on. (Used for the user agent)
@param topic the URL of the topic that was updated.
@throws HttpStatusCodeException a wrapper exception wit... | java | public void sendNotification(final String requestHost, final String topic) {
// FIXME assert should not be used for validation because it can be disabled
assert validTopics.isEmpty() || validTopics.contains(topic) : "That topic is not supported by this hub. " + topic;
LOG.debug("Sending notifica... | [
"public",
"void",
"sendNotification",
"(",
"final",
"String",
"requestHost",
",",
"final",
"String",
"topic",
")",
"{",
"// FIXME assert should not be used for validation because it can be disabled",
"assert",
"validTopics",
".",
"isEmpty",
"(",
")",
"||",
"validTopics",
... | Sends a notification to the subscribers
@param requestHost the host name the hub is running on. (Used for the user agent)
@param topic the URL of the topic that was updated.
@throws HttpStatusCodeException a wrapper exception with a recommended status code for the
request. | [
"Sends",
"a",
"notification",
"to",
"the",
"subscribers"
] | train | https://github.com/rometools/rome-certiorem/blob/e5a003193dd2abd748e77961c0f216a7f5690712/src/main/java/com/rometools/certiorem/hub/Hub.java#L125-L162 |
UrielCh/ovh-java-sdk | ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java | ApiOvhCloud.serviceName_pca_pcaServiceName_sessions_sessionId_files_GET | public ArrayList<String> serviceName_pca_pcaServiceName_sessions_sessionId_files_GET(String serviceName, String pcaServiceName, String sessionId, String name) throws IOException {
"""
cloud archives files in session
REST: GET /cloud/{serviceName}/pca/{pcaServiceName}/sessions/{sessionId}/files
@param name [req... | java | public ArrayList<String> serviceName_pca_pcaServiceName_sessions_sessionId_files_GET(String serviceName, String pcaServiceName, String sessionId, String name) throws IOException {
String qPath = "/cloud/{serviceName}/pca/{pcaServiceName}/sessions/{sessionId}/files";
StringBuilder sb = path(qPath, serviceName, pcaSe... | [
"public",
"ArrayList",
"<",
"String",
">",
"serviceName_pca_pcaServiceName_sessions_sessionId_files_GET",
"(",
"String",
"serviceName",
",",
"String",
"pcaServiceName",
",",
"String",
"sessionId",
",",
"String",
"name",
")",
"throws",
"IOException",
"{",
"String",
"qPat... | cloud archives files in session
REST: GET /cloud/{serviceName}/pca/{pcaServiceName}/sessions/{sessionId}/files
@param name [required] Filter the value of name property (like)
@param serviceName [required] The internal name of your public cloud passport
@param pcaServiceName [required] The internal name of your PCA off... | [
"cloud",
"archives",
"files",
"in",
"session"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L2532-L2538 |
JOML-CI/JOML | src/org/joml/Matrix4x3f.java | Matrix4x3f.rotateLocalZ | public Matrix4x3f rotateLocalZ(float ang, Matrix4x3f dest) {
"""
Pre-multiply a rotation around the Z axis to this matrix by rotating the given amount of radians
about the Z axis and store the result in <code>dest</code>.
<p>
When used with a right-handed coordinate system, the produced rotation will rotate a v... | java | public Matrix4x3f rotateLocalZ(float ang, Matrix4x3f dest) {
float sin = (float) Math.sin(ang);
float cos = (float) Math.cosFromSin(sin, ang);
float nm00 = cos * m00 - sin * m01;
float nm01 = sin * m00 + cos * m01;
float nm10 = cos * m10 - sin * m11;
float nm11 = sin * m1... | [
"public",
"Matrix4x3f",
"rotateLocalZ",
"(",
"float",
"ang",
",",
"Matrix4x3f",
"dest",
")",
"{",
"float",
"sin",
"=",
"(",
"float",
")",
"Math",
".",
"sin",
"(",
"ang",
")",
";",
"float",
"cos",
"=",
"(",
"float",
")",
"Math",
".",
"cosFromSin",
"("... | Pre-multiply a rotation around the Z axis to this matrix by rotating the given amount of radians
about the Z axis and store the result in <code>dest</code>.
<p>
When used with a right-handed coordinate system, the produced rotation will rotate a vector
counter-clockwise around the rotation axis, when viewing along the ... | [
"Pre",
"-",
"multiply",
"a",
"rotation",
"around",
"the",
"Z",
"axis",
"to",
"this",
"matrix",
"by",
"rotating",
"the",
"given",
"amount",
"of",
"radians",
"about",
"the",
"Z",
"axis",
"and",
"store",
"the",
"result",
"in",
"<code",
">",
"dest<",
"/",
... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3f.java#L4404-L4429 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkSecurityGroupsInner.java | NetworkSecurityGroupsInner.createOrUpdateAsync | public Observable<NetworkSecurityGroupInner> createOrUpdateAsync(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters) {
"""
Creates or updates a network security group in the specified resource group.
@param resourceGroupName The name of the resource group.
@param ne... | java | public Observable<NetworkSecurityGroupInner> createOrUpdateAsync(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, parameters).map(new Func1<ServiceResponse<NetworkSecurity... | [
"public",
"Observable",
"<",
"NetworkSecurityGroupInner",
">",
"createOrUpdateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"networkSecurityGroupName",
",",
"NetworkSecurityGroupInner",
"parameters",
")",
"{",
"return",
"createOrUpdateWithServiceResponseAsync",
"("... | Creates or updates a network security group in the specified resource group.
@param resourceGroupName The name of the resource group.
@param networkSecurityGroupName The name of the network security group.
@param parameters Parameters supplied to the create or update network security group operation.
@throws IllegalAr... | [
"Creates",
"or",
"updates",
"a",
"network",
"security",
"group",
"in",
"the",
"specified",
"resource",
"group",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkSecurityGroupsInner.java#L471-L478 |
facebook/fresco | imagepipeline/src/main/java/com/facebook/imagepipeline/platform/GingerbreadPurgeableDecoder.java | GingerbreadPurgeableDecoder.decodeJPEGByteArrayAsPurgeable | @Override
protected Bitmap decodeJPEGByteArrayAsPurgeable(
CloseableReference<PooledByteBuffer> bytesRef, int length, BitmapFactory.Options options) {
"""
Decodes a byteArray containing jpeg encoded bytes into a purgeable bitmap
<p>Adds a JFIF End-Of-Image marker if needed before decoding.
@param byt... | java | @Override
protected Bitmap decodeJPEGByteArrayAsPurgeable(
CloseableReference<PooledByteBuffer> bytesRef, int length, BitmapFactory.Options options) {
byte[] suffix = endsWithEOI(bytesRef, length) ? null : EOI;
return decodeFileDescriptorAsPurgeable(bytesRef, length, suffix, options);
} | [
"@",
"Override",
"protected",
"Bitmap",
"decodeJPEGByteArrayAsPurgeable",
"(",
"CloseableReference",
"<",
"PooledByteBuffer",
">",
"bytesRef",
",",
"int",
"length",
",",
"BitmapFactory",
".",
"Options",
"options",
")",
"{",
"byte",
"[",
"]",
"suffix",
"=",
"endsWi... | Decodes a byteArray containing jpeg encoded bytes into a purgeable bitmap
<p>Adds a JFIF End-Of-Image marker if needed before decoding.
@param bytesRef the byte buffer that contains the encoded bytes
@param length the length of bytes for decox
@param options the options passed to the BitmapFactory
@return the decoded... | [
"Decodes",
"a",
"byteArray",
"containing",
"jpeg",
"encoded",
"bytes",
"into",
"a",
"purgeable",
"bitmap"
] | train | https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline/src/main/java/com/facebook/imagepipeline/platform/GingerbreadPurgeableDecoder.java#L71-L76 |
apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/writer/initializer/WriterInitializerFactory.java | WriterInitializerFactory.newInstace | public static WriterInitializer newInstace(State state, WorkUnitStream workUnits) {
"""
Provides WriterInitializer based on the writer. Mostly writer is decided by the Writer builder (and destination) that user passes.
If there's more than one branch, it will instantiate same number of WriterInitializer instance ... | java | public static WriterInitializer newInstace(State state, WorkUnitStream workUnits) {
int branches = state.getPropAsInt(ConfigurationKeys.FORK_BRANCHES_KEY, 1);
if (branches == 1) {
return newSingleInstance(state, workUnits, branches, 0);
}
List<WriterInitializer> wis = Lists.newArrayList();
fo... | [
"public",
"static",
"WriterInitializer",
"newInstace",
"(",
"State",
"state",
",",
"WorkUnitStream",
"workUnits",
")",
"{",
"int",
"branches",
"=",
"state",
".",
"getPropAsInt",
"(",
"ConfigurationKeys",
".",
"FORK_BRANCHES_KEY",
",",
"1",
")",
";",
"if",
"(",
... | Provides WriterInitializer based on the writer. Mostly writer is decided by the Writer builder (and destination) that user passes.
If there's more than one branch, it will instantiate same number of WriterInitializer instance as number of branches and combine it into MultiWriterInitializer.
@param state
@return Writer... | [
"Provides",
"WriterInitializer",
"based",
"on",
"the",
"writer",
".",
"Mostly",
"writer",
"is",
"decided",
"by",
"the",
"Writer",
"builder",
"(",
"and",
"destination",
")",
"that",
"user",
"passes",
".",
"If",
"there",
"s",
"more",
"than",
"one",
"branch",
... | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/writer/initializer/WriterInitializerFactory.java#L42-L53 |
UrielCh/ovh-java-sdk | ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java | ApiOvhXdsl.serviceName_rma_id_GET | public OvhRma serviceName_rma_id_GET(String serviceName, String id) throws IOException {
"""
Get this object properties
REST: GET /xdsl/{serviceName}/rma/{id}
@param serviceName [required] The internal name of your XDSL offer
@param id [required] Return merchandise authorisation identifier
"""
String qP... | java | public OvhRma serviceName_rma_id_GET(String serviceName, String id) throws IOException {
String qPath = "/xdsl/{serviceName}/rma/{id}";
StringBuilder sb = path(qPath, serviceName, id);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhRma.class);
} | [
"public",
"OvhRma",
"serviceName_rma_id_GET",
"(",
"String",
"serviceName",
",",
"String",
"id",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/xdsl/{serviceName}/rma/{id}\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",
",",
"serviceName",... | Get this object properties
REST: GET /xdsl/{serviceName}/rma/{id}
@param serviceName [required] The internal name of your XDSL offer
@param id [required] Return merchandise authorisation identifier | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L1790-L1795 |
sculptor/sculptor | sculptor-generator/sculptor-generator-core/src/main/java/org/sculptor/generator/util/HelperBase.java | HelperBase.substringBetween | public String substringBetween(String string, String begin, String end) {
"""
Gets a substring between the begin and end boundaries
@param string
original string
@param begin
start boundary
@param end
end boundary
@return substring between boundaries
"""
return substringBetween(string, begin, end, f... | java | public String substringBetween(String string, String begin, String end) {
return substringBetween(string, begin, end, false);
} | [
"public",
"String",
"substringBetween",
"(",
"String",
"string",
",",
"String",
"begin",
",",
"String",
"end",
")",
"{",
"return",
"substringBetween",
"(",
"string",
",",
"begin",
",",
"end",
",",
"false",
")",
";",
"}"
] | Gets a substring between the begin and end boundaries
@param string
original string
@param begin
start boundary
@param end
end boundary
@return substring between boundaries | [
"Gets",
"a",
"substring",
"between",
"the",
"begin",
"and",
"end",
"boundaries"
] | train | https://github.com/sculptor/sculptor/blob/38df06ceb7e40f5f52dbd53b1cd1d07ee11aade5/sculptor-generator/sculptor-generator-core/src/main/java/org/sculptor/generator/util/HelperBase.java#L523-L525 |
Azure/azure-sdk-for-java | batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/AccountsImpl.java | AccountsImpl.listNodeAgentSkus | public PagedList<NodeAgentSku> listNodeAgentSkus(final AccountListNodeAgentSkusOptions accountListNodeAgentSkusOptions) {
"""
Lists all node agent SKUs supported by the Azure Batch service.
@param accountListNodeAgentSkusOptions Additional parameters for the operation
@throws IllegalArgumentException thrown if... | java | public PagedList<NodeAgentSku> listNodeAgentSkus(final AccountListNodeAgentSkusOptions accountListNodeAgentSkusOptions) {
ServiceResponseWithHeaders<Page<NodeAgentSku>, AccountListNodeAgentSkusHeaders> response = listNodeAgentSkusSinglePageAsync(accountListNodeAgentSkusOptions).toBlocking().single();
re... | [
"public",
"PagedList",
"<",
"NodeAgentSku",
">",
"listNodeAgentSkus",
"(",
"final",
"AccountListNodeAgentSkusOptions",
"accountListNodeAgentSkusOptions",
")",
"{",
"ServiceResponseWithHeaders",
"<",
"Page",
"<",
"NodeAgentSku",
">",
",",
"AccountListNodeAgentSkusHeaders",
">"... | Lists all node agent SKUs supported by the Azure Batch service.
@param accountListNodeAgentSkusOptions Additional parameters for the operation
@throws IllegalArgumentException thrown if parameters fail the validation
@throws BatchErrorException thrown if the request is rejected by server
@throws RuntimeException all o... | [
"Lists",
"all",
"node",
"agent",
"SKUs",
"supported",
"by",
"the",
"Azure",
"Batch",
"service",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/AccountsImpl.java#L208-L223 |
alibaba/jstorm | jstorm-core/src/main/java/backtype/storm/StormSubmitter.java | StormSubmitter.submitTopologyWithProgressBar | public static void submitTopologyWithProgressBar(String name, Map stormConf, StormTopology topology, SubmitOptions opts)
throws AlreadyAliveException, InvalidTopologyException {
"""
Submits a topology to run on the cluster with a progress bar. A topology runs forever or until explicitly killed.
@par... | java | public static void submitTopologyWithProgressBar(String name, Map stormConf, StormTopology topology, SubmitOptions opts)
throws AlreadyAliveException, InvalidTopologyException {
/**
* progress bar is removed in jstorm
*/
submitTopology(name, stormConf, topology, opts);
... | [
"public",
"static",
"void",
"submitTopologyWithProgressBar",
"(",
"String",
"name",
",",
"Map",
"stormConf",
",",
"StormTopology",
"topology",
",",
"SubmitOptions",
"opts",
")",
"throws",
"AlreadyAliveException",
",",
"InvalidTopologyException",
"{",
"/**\n * prog... | Submits a topology to run on the cluster with a progress bar. A topology runs forever or until explicitly killed.
@param name the name of the storm.
@param stormConf the topology-specific configuration. See {@link Config}.
@param topology the processing to execute.
@param opts to manipulate the starting of ... | [
"Submits",
"a",
"topology",
"to",
"run",
"on",
"the",
"cluster",
"with",
"a",
"progress",
"bar",
".",
"A",
"topology",
"runs",
"forever",
"or",
"until",
"explicitly",
"killed",
"."
] | train | https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/StormSubmitter.java#L194-L200 |
OpenLiberty/open-liberty | dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JaxbPUnit21.java | JaxbPUnit21.getProperties | public Properties getProperties() {
"""
Gets the value of the properties property.
@return value of the properties property.
"""
Properties rtnProperties = null;
// Convert this Properties from the class defined in JAXB
// (com.ibm.ws.jpa.pxml21.Persistence.PersistenceUnit.Pro... | java | public Properties getProperties() {
Properties rtnProperties = null;
// Convert this Properties from the class defined in JAXB
// (com.ibm.ws.jpa.pxml21.Persistence.PersistenceUnit.Properties)
// to standard JDK classes (java.util.Properties).
com.ibm.ws.jpa.pxml21.Pe... | [
"public",
"Properties",
"getProperties",
"(",
")",
"{",
"Properties",
"rtnProperties",
"=",
"null",
";",
"// Convert this Properties from the class defined in JAXB",
"// (com.ibm.ws.jpa.pxml21.Persistence.PersistenceUnit.Properties)",
"// to standard JDK classes (java.util.Properties).",
... | Gets the value of the properties property.
@return value of the properties property. | [
"Gets",
"the",
"value",
"of",
"the",
"properties",
"property",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JaxbPUnit21.java#L248-L283 |
deeplearning4j/deeplearning4j | datavec/datavec-api/src/main/java/org/datavec/api/transform/serde/BaseSerializer.java | BaseSerializer.deserializeReducerList | public List<IAssociativeReducer> deserializeReducerList(String str) {
"""
Deserialize an IStringReducer List serialized using {@link #serializeReducerList(List)}, or
an array serialized using {@link #serialize(IReducer[])}
@param str String representation (YAML/JSON) of the IStringReducer list
@return {@code ... | java | public List<IAssociativeReducer> deserializeReducerList(String str) {
return load(str, ListWrappers.ReducerList.class).getList();
} | [
"public",
"List",
"<",
"IAssociativeReducer",
">",
"deserializeReducerList",
"(",
"String",
"str",
")",
"{",
"return",
"load",
"(",
"str",
",",
"ListWrappers",
".",
"ReducerList",
".",
"class",
")",
".",
"getList",
"(",
")",
";",
"}"
] | Deserialize an IStringReducer List serialized using {@link #serializeReducerList(List)}, or
an array serialized using {@link #serialize(IReducer[])}
@param str String representation (YAML/JSON) of the IStringReducer list
@return {@code List<IStringReducer>} | [
"Deserialize",
"an",
"IStringReducer",
"List",
"serialized",
"using",
"{",
"@link",
"#serializeReducerList",
"(",
"List",
")",
"}",
"or",
"an",
"array",
"serialized",
"using",
"{",
"@link",
"#serialize",
"(",
"IReducer",
"[]",
")",
"}"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-api/src/main/java/org/datavec/api/transform/serde/BaseSerializer.java#L311-L313 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/CacheEntryViews.java | CacheEntryViews.createEntryView | public static CacheEntryView<Data, Data> createEntryView(Data key, Data value, Data expiryPolicy, CacheRecord record,
CacheEntryViewType cacheEntryViewType) {
"""
Creates a {@link CacheEntryView} instance.
@param key the key to be wr... | java | public static CacheEntryView<Data, Data> createEntryView(Data key, Data value, Data expiryPolicy, CacheRecord record,
CacheEntryViewType cacheEntryViewType) {
if (cacheEntryViewType == null) {
throw new IllegalArgumentException("Empty cach... | [
"public",
"static",
"CacheEntryView",
"<",
"Data",
",",
"Data",
">",
"createEntryView",
"(",
"Data",
"key",
",",
"Data",
"value",
",",
"Data",
"expiryPolicy",
",",
"CacheRecord",
"record",
",",
"CacheEntryViewType",
"cacheEntryViewType",
")",
"{",
"if",
"(",
"... | Creates a {@link CacheEntryView} instance.
@param key the key to be wrapped
@param value the value to be wrapped
@param record {@link CacheRecord} instance to gather additional entry view properties like
access time, expiration time and access hit
@param cacheEntryViewT... | [
"Creates",
"a",
"{",
"@link",
"CacheEntryView",
"}",
"instance",
"."
] | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheEntryViews.java#L107-L120 |
JOML-CI/JOML | src/org/joml/Quaterniond.java | Quaterniond.rotateAxis | public Quaterniond rotateAxis(double angle, double axisX, double axisY, double axisZ, Quaterniond dest) {
"""
/* (non-Javadoc)
@see org.joml.Quaterniondc#rotateAxis(double, double, double, double, org.joml.Quaterniond)
"""
double hangle = angle / 2.0;
double sinAngle = Math.sin(hangle);
... | java | public Quaterniond rotateAxis(double angle, double axisX, double axisY, double axisZ, Quaterniond dest) {
double hangle = angle / 2.0;
double sinAngle = Math.sin(hangle);
double invVLength = 1.0 / Math.sqrt(axisX * axisX + axisY * axisY + axisZ * axisZ);
double rx = axisX * invVLength *... | [
"public",
"Quaterniond",
"rotateAxis",
"(",
"double",
"angle",
",",
"double",
"axisX",
",",
"double",
"axisY",
",",
"double",
"axisZ",
",",
"Quaterniond",
"dest",
")",
"{",
"double",
"hangle",
"=",
"angle",
"/",
"2.0",
";",
"double",
"sinAngle",
"=",
"Math... | /* (non-Javadoc)
@see org.joml.Quaterniondc#rotateAxis(double, double, double, double, org.joml.Quaterniond) | [
"/",
"*",
"(",
"non",
"-",
"Javadoc",
")"
] | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Quaterniond.java#L2471-L2486 |
thorntail/thorntail | plugins/gradle/gradle-plugin/src/main/java/org/wildfly/swarm/plugin/gradle/GradleDependencyResolutionHelper.java | GradleDependencyResolutionHelper.getAllProjects | private static Map<String, Project> getAllProjects(final Project project) {
"""
Get the collection of Gradle projects along with their GAV definitions. This collection is used for determining if an
artifact specification represents a Gradle project or not.
@param project the Gradle project that is being analyz... | java | private static Map<String, Project> getAllProjects(final Project project) {
return getCachedReference(project, "thorntail_project_gav_collection", () -> {
Map<String, Project> gavMap = new HashMap<>();
project.getRootProject().getAllprojects().forEach(p -> {
gavMap.put(p.... | [
"private",
"static",
"Map",
"<",
"String",
",",
"Project",
">",
"getAllProjects",
"(",
"final",
"Project",
"project",
")",
"{",
"return",
"getCachedReference",
"(",
"project",
",",
"\"thorntail_project_gav_collection\"",
",",
"(",
")",
"->",
"{",
"Map",
"<",
"... | Get the collection of Gradle projects along with their GAV definitions. This collection is used for determining if an
artifact specification represents a Gradle project or not.
@param project the Gradle project that is being analyzed.
@return a map of GAV coordinates for each of the available projects (returned as key... | [
"Get",
"the",
"collection",
"of",
"Gradle",
"projects",
"along",
"with",
"their",
"GAV",
"definitions",
".",
"This",
"collection",
"is",
"used",
"for",
"determining",
"if",
"an",
"artifact",
"specification",
"represents",
"a",
"Gradle",
"project",
"or",
"not",
... | train | https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/plugins/gradle/gradle-plugin/src/main/java/org/wildfly/swarm/plugin/gradle/GradleDependencyResolutionHelper.java#L321-L329 |
stephenc/simple-java-mail | src/main/java/org/codemonkey/simplejavamail/Email.java | Email.addAttachment | public void addAttachment(final String name, final byte[] data, final String mimetype) {
"""
Adds an attachment to the email message and generates the necessary {@link DataSource} with the given byte data.
Then delegates to {@link #addAttachment(String, DataSource)}. At this point the datasource is actually a
{@... | java | public void addAttachment(final String name, final byte[] data, final String mimetype) {
final ByteArrayDataSource dataSource = new ByteArrayDataSource(data, mimetype);
dataSource.setName(name);
addAttachment(name, dataSource);
} | [
"public",
"void",
"addAttachment",
"(",
"final",
"String",
"name",
",",
"final",
"byte",
"[",
"]",
"data",
",",
"final",
"String",
"mimetype",
")",
"{",
"final",
"ByteArrayDataSource",
"dataSource",
"=",
"new",
"ByteArrayDataSource",
"(",
"data",
",",
"mimetyp... | Adds an attachment to the email message and generates the necessary {@link DataSource} with the given byte data.
Then delegates to {@link #addAttachment(String, DataSource)}. At this point the datasource is actually a
{@link ByteArrayDataSource}.
@param name The name of the extension (eg. filename including extension)... | [
"Adds",
"an",
"attachment",
"to",
"the",
"email",
"message",
"and",
"generates",
"the",
"necessary",
"{",
"@link",
"DataSource",
"}",
"with",
"the",
"given",
"byte",
"data",
".",
"Then",
"delegates",
"to",
"{",
"@link",
"#addAttachment",
"(",
"String",
"Data... | train | https://github.com/stephenc/simple-java-mail/blob/8c5897e6bbc23c11e7c7eb5064f407625c653923/src/main/java/org/codemonkey/simplejavamail/Email.java#L144-L148 |
Whiley/WhileyCompiler | src/main/java/wyil/util/AbstractTypedVisitor.java | AbstractTypedVisitor.isDerivation | public boolean isDerivation(Type parent, Type child) {
"""
Check whether one type is a derivation of another. For example, in this
scenario:
<pre>
type parent is (int p) where ...
type child is (parent c) where ...
</pre>
@param parent
The type being derived to
@param child
The type we are trying to d... | java | public boolean isDerivation(Type parent, Type child) {
if (child.equals(parent)) {
return true;
} else if (child instanceof Type.Nominal) {
Type.Nominal t = (Type.Nominal) child;
Decl.Type decl = t.getLink().getTarget();
return isDerivation(parent, decl.getType());
} else {
return false;
}
} | [
"public",
"boolean",
"isDerivation",
"(",
"Type",
"parent",
",",
"Type",
"child",
")",
"{",
"if",
"(",
"child",
".",
"equals",
"(",
"parent",
")",
")",
"{",
"return",
"true",
";",
"}",
"else",
"if",
"(",
"child",
"instanceof",
"Type",
".",
"Nominal",
... | Check whether one type is a derivation of another. For example, in this
scenario:
<pre>
type parent is (int p) where ...
type child is (parent c) where ...
</pre>
@param parent
The type being derived to
@param child
The type we are trying to derive
@return | [
"Check",
"whether",
"one",
"type",
"is",
"a",
"derivation",
"of",
"another",
".",
"For",
"example",
"in",
"this",
"scenario",
":"
] | train | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/util/AbstractTypedVisitor.java#L1297-L1307 |
dhemery/hartley | src/main/java/com/dhemery/expressing/Expressive.java | Expressive.waitUntil | public <V> void waitUntil(Sampler<V> variable, Matcher<? super V> criteria) {
"""
Wait until a polled sample of the variable satisfies the criteria.
Uses a default ticker.
"""
waitUntil(variable, eventually(), criteria);
} | java | public <V> void waitUntil(Sampler<V> variable, Matcher<? super V> criteria) {
waitUntil(variable, eventually(), criteria);
} | [
"public",
"<",
"V",
">",
"void",
"waitUntil",
"(",
"Sampler",
"<",
"V",
">",
"variable",
",",
"Matcher",
"<",
"?",
"super",
"V",
">",
"criteria",
")",
"{",
"waitUntil",
"(",
"variable",
",",
"eventually",
"(",
")",
",",
"criteria",
")",
";",
"}"
] | Wait until a polled sample of the variable satisfies the criteria.
Uses a default ticker. | [
"Wait",
"until",
"a",
"polled",
"sample",
"of",
"the",
"variable",
"satisfies",
"the",
"criteria",
".",
"Uses",
"a",
"default",
"ticker",
"."
] | train | https://github.com/dhemery/hartley/blob/7754bd6bc12695f2249601b8890da530a61fcf33/src/main/java/com/dhemery/expressing/Expressive.java#L192-L194 |
dkpro/dkpro-argumentation | dkpro-argumentation-types/src/main/java/org/dkpro/argumentation/types/ArgumentUnitUtils.java | ArgumentUnitUtils.getProperty | public static String getProperty(ArgumentUnit argumentUnit, String propertyName) {
"""
Returns the property value
@param argumentUnit argument component
@param propertyName property name
@return the value to which the specified key is mapped, or
{@code null} if this map contains no mapping for the key
""... | java | public static String getProperty(ArgumentUnit argumentUnit, String propertyName)
{
Properties properties = ArgumentUnitUtils.getProperties(argumentUnit);
return (String) properties.get(propertyName);
} | [
"public",
"static",
"String",
"getProperty",
"(",
"ArgumentUnit",
"argumentUnit",
",",
"String",
"propertyName",
")",
"{",
"Properties",
"properties",
"=",
"ArgumentUnitUtils",
".",
"getProperties",
"(",
"argumentUnit",
")",
";",
"return",
"(",
"String",
")",
"pro... | Returns the property value
@param argumentUnit argument component
@param propertyName property name
@return the value to which the specified key is mapped, or
{@code null} if this map contains no mapping for the key | [
"Returns",
"the",
"property",
"value"
] | train | https://github.com/dkpro/dkpro-argumentation/blob/57ce6f5e73d8075b7088aeeebb107c85b3d4bbcb/dkpro-argumentation-types/src/main/java/org/dkpro/argumentation/types/ArgumentUnitUtils.java#L170-L174 |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java | NodeIndexer.addDoubleValue | protected void addDoubleValue(Document doc, String fieldName, Object internalValue) {
"""
Adds the double value to the document as the named field. The double
value is converted to an indexable string value using the
{@link DoubleField} class.
@param doc The document to which to add the field
@para... | java | protected void addDoubleValue(Document doc, String fieldName, Object internalValue)
{
double doubleVal = ((Double)internalValue).doubleValue();
doc.add(createFieldWithoutNorms(fieldName, DoubleField.doubleToString(doubleVal), PropertyType.DOUBLE));
} | [
"protected",
"void",
"addDoubleValue",
"(",
"Document",
"doc",
",",
"String",
"fieldName",
",",
"Object",
"internalValue",
")",
"{",
"double",
"doubleVal",
"=",
"(",
"(",
"Double",
")",
"internalValue",
")",
".",
"doubleValue",
"(",
")",
";",
"doc",
".",
"... | Adds the double value to the document as the named field. The double
value is converted to an indexable string value using the
{@link DoubleField} class.
@param doc The document to which to add the field
@param fieldName The name of the field to add
@param internalValue The value for the field to add to ... | [
"Adds",
"the",
"double",
"value",
"to",
"the",
"document",
"as",
"the",
"named",
"field",
".",
"The",
"double",
"value",
"is",
"converted",
"to",
"an",
"indexable",
"string",
"value",
"using",
"the",
"{",
"@link",
"DoubleField",
"}",
"class",
"."
] | train | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java#L760-L764 |
realtime-framework/RealtimeMessaging-Java | library/src/main/java/ibt/ortc/api/Balancer.java | Balancer.getServerFromBalancer | public static String getServerFromBalancer(String balancerUrl,String applicationKey, Proxy proxy) throws IOException, InvalidBalancerServerException {
"""
Retrieves an Ortc Server url from the Ortc Balancer
@param balancerUrl
The Ortc Balancer url
@return An Ortc Server url
@throws java.io.IOException
@thro... | java | public static String getServerFromBalancer(String balancerUrl,String applicationKey, Proxy proxy) throws IOException, InvalidBalancerServerException {
Matcher protocolMatcher = urlProtocolPattern.matcher(balancerUrl);
String protocol = protocolMatcher.matches() ? "" : protocolMatcher.group(1);
String parsedUrl ... | [
"public",
"static",
"String",
"getServerFromBalancer",
"(",
"String",
"balancerUrl",
",",
"String",
"applicationKey",
",",
"Proxy",
"proxy",
")",
"throws",
"IOException",
",",
"InvalidBalancerServerException",
"{",
"Matcher",
"protocolMatcher",
"=",
"urlProtocolPattern",
... | Retrieves an Ortc Server url from the Ortc Balancer
@param balancerUrl
The Ortc Balancer url
@return An Ortc Server url
@throws java.io.IOException
@throws UnknownHostException
@throws InvalidBalancerServerException | [
"Retrieves",
"an",
"Ortc",
"Server",
"url",
"from",
"the",
"Ortc",
"Balancer"
] | train | https://github.com/realtime-framework/RealtimeMessaging-Java/blob/cae0dfd01567a2d9e55a0849c0c9b09ad4b2cc08/library/src/main/java/ibt/ortc/api/Balancer.java#L76-L96 |
jeremylong/DependencyCheck | core/src/main/java/org/owasp/dependencycheck/data/nexus/NexusSearch.java | NexusSearch.preflightRequest | public boolean preflightRequest() {
"""
Do a preflight request to see if the repository is actually working.
@return whether the repository is listening and returns the /status URL
correctly
"""
final HttpURLConnection conn;
try {
final URL url = new URL(rootURL, "status");
... | java | public boolean preflightRequest() {
final HttpURLConnection conn;
try {
final URL url = new URL(rootURL, "status");
final URLConnectionFactory factory = new URLConnectionFactory(settings);
conn = factory.createHttpURLConnection(url, useProxy);
conn.addRequ... | [
"public",
"boolean",
"preflightRequest",
"(",
")",
"{",
"final",
"HttpURLConnection",
"conn",
";",
"try",
"{",
"final",
"URL",
"url",
"=",
"new",
"URL",
"(",
"rootURL",
",",
"\"status\"",
")",
";",
"final",
"URLConnectionFactory",
"factory",
"=",
"new",
"URL... | Do a preflight request to see if the repository is actually working.
@return whether the repository is listening and returns the /status URL
correctly | [
"Do",
"a",
"preflight",
"request",
"to",
"see",
"if",
"the",
"repository",
"is",
"actually",
"working",
"."
] | train | https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/data/nexus/NexusSearch.java#L177-L204 |
grpc/grpc-java | android/src/main/java/io/grpc/android/AndroidChannelBuilder.java | AndroidChannelBuilder.sslSocketFactory | @Deprecated
public AndroidChannelBuilder sslSocketFactory(SSLSocketFactory factory) {
"""
Set the delegate channel builder's sslSocketFactory.
@deprecated Use {@link #fromBuilder(ManagedChannelBuilder)} with a pre-configured
ManagedChannelBuilder instead.
"""
try {
OKHTTP_CHANNEL_BUILDER_CLASS
... | java | @Deprecated
public AndroidChannelBuilder sslSocketFactory(SSLSocketFactory factory) {
try {
OKHTTP_CHANNEL_BUILDER_CLASS
.getMethod("sslSocketFactory", SSLSocketFactory.class)
.invoke(delegateBuilder, factory);
return this;
} catch (Exception e) {
throw new RuntimeExcepti... | [
"@",
"Deprecated",
"public",
"AndroidChannelBuilder",
"sslSocketFactory",
"(",
"SSLSocketFactory",
"factory",
")",
"{",
"try",
"{",
"OKHTTP_CHANNEL_BUILDER_CLASS",
".",
"getMethod",
"(",
"\"sslSocketFactory\"",
",",
"SSLSocketFactory",
".",
"class",
")",
".",
"invoke",
... | Set the delegate channel builder's sslSocketFactory.
@deprecated Use {@link #fromBuilder(ManagedChannelBuilder)} with a pre-configured
ManagedChannelBuilder instead. | [
"Set",
"the",
"delegate",
"channel",
"builder",
"s",
"sslSocketFactory",
"."
] | train | https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/android/src/main/java/io/grpc/android/AndroidChannelBuilder.java#L137-L147 |
lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/collections/sort/RedBlackTreeInteger.java | RedBlackTreeInteger.getPrevious | public Node<T> getPrevious(Node<T> node) {
"""
Returns the node containing the key just before the key of the given node.
"""
if (node.left != null) {
node = node.left;
while (node.right != null) node = node.right;
return node;
}
// nothing at left, it may be the parent n... | java | public Node<T> getPrevious(Node<T> node) {
if (node.left != null) {
node = node.left;
while (node.right != null) node = node.right;
return node;
}
// nothing at left, it may be the parent node if the node is at the right
if (node == first) return null;
return getPrevio... | [
"public",
"Node",
"<",
"T",
">",
"getPrevious",
"(",
"Node",
"<",
"T",
">",
"node",
")",
"{",
"if",
"(",
"node",
".",
"left",
"!=",
"null",
")",
"{",
"node",
"=",
"node",
".",
"left",
";",
"while",
"(",
"node",
".",
"right",
"!=",
"null",
")",
... | Returns the node containing the key just before the key of the given node. | [
"Returns",
"the",
"node",
"containing",
"the",
"key",
"just",
"before",
"the",
"key",
"of",
"the",
"given",
"node",
"."
] | train | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/collections/sort/RedBlackTreeInteger.java#L107-L116 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.