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
aragozin/jvm-tools
mxdump/src/main/java/org/gridkit/jvmtool/jackson/JsonGenerator.java
JsonGenerator.writeNumberField
public final void writeNumberField(String fieldName, int value) throws IOException, JsonGenerationException { """ Convenience method for outputting a field entry ("member") that has the specified numeric value. Equivalent to: <pre> writeFieldName(fieldName); writeNumber(value); </pre> """ ...
java
public final void writeNumberField(String fieldName, int value) throws IOException, JsonGenerationException { writeFieldName(fieldName); writeNumber(value); }
[ "public", "final", "void", "writeNumberField", "(", "String", "fieldName", ",", "int", "value", ")", "throws", "IOException", ",", "JsonGenerationException", "{", "writeFieldName", "(", "fieldName", ")", ";", "writeNumber", "(", "value", ")", ";", "}" ]
Convenience method for outputting a field entry ("member") that has the specified numeric value. Equivalent to: <pre> writeFieldName(fieldName); writeNumber(value); </pre>
[ "Convenience", "method", "for", "outputting", "a", "field", "entry", "(", "member", ")", "that", "has", "the", "specified", "numeric", "value", ".", "Equivalent", "to", ":", "<pre", ">", "writeFieldName", "(", "fieldName", ")", ";", "writeNumber", "(", "valu...
train
https://github.com/aragozin/jvm-tools/blob/d3a4d0c6a47fb9317f274988569655f30dcd2f76/mxdump/src/main/java/org/gridkit/jvmtool/jackson/JsonGenerator.java#L735-L740
Azure/azure-sdk-for-java
kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/DatabasesInner.java
DatabasesInner.removePrincipals
public DatabasePrincipalListResultInner removePrincipals(String resourceGroupName, String clusterName, String databaseName, List<DatabasePrincipalInner> value) { """ Remove Database principals permissions. @param resourceGroupName The name of the resource group containing the Kusto cluster. @param clusterName ...
java
public DatabasePrincipalListResultInner removePrincipals(String resourceGroupName, String clusterName, String databaseName, List<DatabasePrincipalInner> value) { return removePrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, value).toBlocking().single().body(); }
[ "public", "DatabasePrincipalListResultInner", "removePrincipals", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "databaseName", ",", "List", "<", "DatabasePrincipalInner", ">", "value", ")", "{", "return", "removePrincipalsWithServiceRespo...
Remove Database principals permissions. @param resourceGroupName The name of the resource group containing the Kusto cluster. @param clusterName The name of the Kusto cluster. @param databaseName The name of the database in the Kusto cluster. @param value The list of Kusto database principals. @throws IllegalArgumentE...
[ "Remove", "Database", "principals", "permissions", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/DatabasesInner.java#L1324-L1326
contentful/contentful.java
src/main/java/com/contentful/java/cda/FetchQuery.java
FetchQuery.one
public T one(String id) { """ Fetch and return a resource matching the given {@code id}. @param id resource id. @return result resource, null if it does not exist. """ try { return baseQuery().one(id).blockingFirst(); } catch (NullPointerException e) { throw new CDAResourceNotFoundExcep...
java
public T one(String id) { try { return baseQuery().one(id).blockingFirst(); } catch (NullPointerException e) { throw new CDAResourceNotFoundException(type, id); } }
[ "public", "T", "one", "(", "String", "id", ")", "{", "try", "{", "return", "baseQuery", "(", ")", ".", "one", "(", "id", ")", ".", "blockingFirst", "(", ")", ";", "}", "catch", "(", "NullPointerException", "e", ")", "{", "throw", "new", "CDAResourceN...
Fetch and return a resource matching the given {@code id}. @param id resource id. @return result resource, null if it does not exist.
[ "Fetch", "and", "return", "a", "resource", "matching", "the", "given", "{", "@code", "id", "}", "." ]
train
https://github.com/contentful/contentful.java/blob/6ecc2ace454c674b218b99489dc50697b1dbffcb/src/main/java/com/contentful/java/cda/FetchQuery.java#L24-L30
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/timezone_enum.java
timezone_enum.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ timezone_enum_responses result = (timezone_enum_responses) service.get_...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { timezone_enum_responses result = (timezone_enum_responses) service.get_payload_formatter().string_to_resource(timezone_enum_responses.class, response); if(result.errorcode != 0) { if (result.error...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "timezone_enum_responses", "result", "=", "(", "timezone_enum_responses", ")", "service", ".", "get_payload_fo...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/timezone_enum.java#L197-L214
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/ContainerKeyCache.java
ContainerKeyCache.getTailHashes
Map<UUID, CacheBucketOffset> getTailHashes(long segmentId) { """ Gets the unindexed Key Hashes, mapped to their latest offsets. @param segmentId The Id of the Segment to get Hashes for. @return The result. """ return forSegmentCache(segmentId, SegmentKeyCache::getTailBucketOffsets, Collections.empt...
java
Map<UUID, CacheBucketOffset> getTailHashes(long segmentId) { return forSegmentCache(segmentId, SegmentKeyCache::getTailBucketOffsets, Collections.emptyMap()); }
[ "Map", "<", "UUID", ",", "CacheBucketOffset", ">", "getTailHashes", "(", "long", "segmentId", ")", "{", "return", "forSegmentCache", "(", "segmentId", ",", "SegmentKeyCache", "::", "getTailBucketOffsets", ",", "Collections", ".", "emptyMap", "(", ")", ")", ";", ...
Gets the unindexed Key Hashes, mapped to their latest offsets. @param segmentId The Id of the Segment to get Hashes for. @return The result.
[ "Gets", "the", "unindexed", "Key", "Hashes", "mapped", "to", "their", "latest", "offsets", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/ContainerKeyCache.java#L264-L266
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/geometry/GeometryUtilities.java
GeometryUtilities.getPointPositionAgainstLine
public static int getPointPositionAgainstLine( Coordinate point, Coordinate lineStart, Coordinate lineEnd ) { """ Get the position of a point (left, right, on line) for a given line. @param point the point to check. @param lineStart the start coordinate of the line. @param lineEnd the end coordinate of the li...
java
public static int getPointPositionAgainstLine( Coordinate point, Coordinate lineStart, Coordinate lineEnd ) { double value = (lineEnd.x - lineStart.x) * (point.y - lineStart.y) - (point.x - lineStart.x) * (lineEnd.y - lineStart.y); if (value > 0) { return 1; } else if (value < 0) { ...
[ "public", "static", "int", "getPointPositionAgainstLine", "(", "Coordinate", "point", ",", "Coordinate", "lineStart", ",", "Coordinate", "lineEnd", ")", "{", "double", "value", "=", "(", "lineEnd", ".", "x", "-", "lineStart", ".", "x", ")", "*", "(", "point"...
Get the position of a point (left, right, on line) for a given line. @param point the point to check. @param lineStart the start coordinate of the line. @param lineEnd the end coordinate of the line. @return 1 if the point is left of the line, -1 if it is right, 0 if it is on the line.
[ "Get", "the", "position", "of", "a", "point", "(", "left", "right", "on", "line", ")", "for", "a", "given", "line", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/geometry/GeometryUtilities.java#L944-L953
j256/ormlite-core
src/main/java/com/j256/ormlite/stmt/Where.java
Where.ge
public Where<T, ID> ge(String columnName, Object value) throws SQLException { """ Add a '&gt;=' clause so the column must be greater-than or equals-to the value. """ addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value, SimpleComparison.GREATER_THAN_EQUAL_TO_OPERATION)); re...
java
public Where<T, ID> ge(String columnName, Object value) throws SQLException { addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value, SimpleComparison.GREATER_THAN_EQUAL_TO_OPERATION)); return this; }
[ "public", "Where", "<", "T", ",", "ID", ">", "ge", "(", "String", "columnName", ",", "Object", "value", ")", "throws", "SQLException", "{", "addClause", "(", "new", "SimpleComparison", "(", "columnName", ",", "findColumnFieldType", "(", "columnName", ")", ",...
Add a '&gt;=' clause so the column must be greater-than or equals-to the value.
[ "Add", "a", "&gt", ";", "=", "clause", "so", "the", "column", "must", "be", "greater", "-", "than", "or", "equals", "-", "to", "the", "value", "." ]
train
https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/stmt/Where.java#L200-L204
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java
AccountsInner.listDataLakeStoreAccountsAsync
public Observable<Page<DataLakeStoreAccountInfoInner>> listDataLakeStoreAccountsAsync(final String resourceGroupName, final String accountName) { """ Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. @param...
java
public Observable<Page<DataLakeStoreAccountInfoInner>> listDataLakeStoreAccountsAsync(final String resourceGroupName, final String accountName) { return listDataLakeStoreAccountsWithServiceResponseAsync(resourceGroupName, accountName) .map(new Func1<ServiceResponse<Page<DataLakeStoreAccountInfoInner...
[ "public", "Observable", "<", "Page", "<", "DataLakeStoreAccountInfoInner", ">", ">", "listDataLakeStoreAccountsAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "accountName", ")", "{", "return", "listDataLakeStoreAccountsWithServiceResponseAsync", ...
Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. @param accountName The name of the Data Lake Analytics...
[ "Gets", "the", "first", "page", "of", "Data", "Lake", "Store", "accounts", "linked", "to", "the", "specified", "Data", "Lake", "Analytics", "account", ".", "The", "response", "includes", "a", "link", "to", "the", "next", "page", "if", "any", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java#L1563-L1571
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/JobConfigurationUtils.java
JobConfigurationUtils.fileToProperties
public static Properties fileToProperties(String fileName, Configuration conf) throws IOException, ConfigurationException { """ Load the properties from the specified file into a {@link Properties} object. @param fileName the name of the file to load properties from @param conf configuration object to de...
java
public static Properties fileToProperties(String fileName, Configuration conf) throws IOException, ConfigurationException { PropertiesConfiguration propsConfig = new PropertiesConfiguration(); Path filePath = new Path(fileName); URI fileURI = filePath.toUri(); if (fileURI.getScheme() == null && ...
[ "public", "static", "Properties", "fileToProperties", "(", "String", "fileName", ",", "Configuration", "conf", ")", "throws", "IOException", ",", "ConfigurationException", "{", "PropertiesConfiguration", "propsConfig", "=", "new", "PropertiesConfiguration", "(", ")", ";...
Load the properties from the specified file into a {@link Properties} object. @param fileName the name of the file to load properties from @param conf configuration object to determine the file system to be used @return a new {@link Properties} instance
[ "Load", "the", "properties", "from", "the", "specified", "file", "into", "a", "{", "@link", "Properties", "}", "object", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/JobConfigurationUtils.java#L106-L119
eduarddrenth/ConfigurableReports
src/main/java/com/vectorprint/report/itext/style/stylers/DocumentSettings.java
DocumentSettings.getKey
protected PrivateKey getKey(KeyStore ks, String alias, char[] password) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException { """ returns a private key from the given keystore, uses configured {@link #KEYSTORE_PASSWORD keystorepassword} @param ks @param alias @return @throws KeyStor...
java
protected PrivateKey getKey(KeyStore ks, String alias, char[] password) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException { return CertificateHelper.getKey(ks, alias, password); }
[ "protected", "PrivateKey", "getKey", "(", "KeyStore", "ks", ",", "String", "alias", ",", "char", "[", "]", "password", ")", "throws", "KeyStoreException", ",", "NoSuchAlgorithmException", ",", "UnrecoverableKeyException", "{", "return", "CertificateHelper", ".", "ge...
returns a private key from the given keystore, uses configured {@link #KEYSTORE_PASSWORD keystorepassword} @param ks @param alias @return @throws KeyStoreException @throws NoSuchAlgorithmException @throws UnrecoverableKeyException
[ "returns", "a", "private", "key", "from", "the", "given", "keystore", "uses", "configured", "{", "@link", "#KEYSTORE_PASSWORD", "keystorepassword", "}" ]
train
https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/style/stylers/DocumentSettings.java#L518-L520
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLGeometry.java
KMLGeometry.toKMLLineString
public static void toKMLLineString(LineString lineString, ExtrudeMode extrude, int altitudeModeEnum, StringBuilder sb) { """ Defines a connected set of line segments. Syntax : <LineString id="ID"> <!-- specific to LineString --> <gx:altitudeOffset>0</gx:altitudeOffset> <!-- double --> <extrude>0</extrude>...
java
public static void toKMLLineString(LineString lineString, ExtrudeMode extrude, int altitudeModeEnum, StringBuilder sb) { sb.append("<LineString>"); appendExtrude(extrude, sb); appendAltitudeMode(altitudeModeEnum, sb); appendKMLCoordinates(lineString.getCoordinates(), sb); sb.appe...
[ "public", "static", "void", "toKMLLineString", "(", "LineString", "lineString", ",", "ExtrudeMode", "extrude", ",", "int", "altitudeModeEnum", ",", "StringBuilder", "sb", ")", "{", "sb", ".", "append", "(", "\"<LineString>\"", ")", ";", "appendExtrude", "(", "ex...
Defines a connected set of line segments. Syntax : <LineString id="ID"> <!-- specific to LineString --> <gx:altitudeOffset>0</gx:altitudeOffset> <!-- double --> <extrude>0</extrude> <!-- boolean --> <tessellate>0</tessellate> <!-- boolean --> <altitudeMode>clampToGround</altitudeMode> <!-- kml:altitudeModeEnum: clamp...
[ "Defines", "a", "connected", "set", "of", "line", "segments", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLGeometry.java#L140-L146
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/normalization/KerasBatchNormalization.java
KerasBatchNormalization.getBatchNormMode
private int getBatchNormMode(Map<String, Object> layerConfig, boolean enforceTrainingConfig) throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException { """ Get BatchNormalization "mode" from Keras layer configuration. Most modes currently unsupported. @param layerConfig dict...
java
private int getBatchNormMode(Map<String, Object> layerConfig, boolean enforceTrainingConfig) throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException { Map<String, Object> innerConfig = KerasLayerUtils.getInnerLayerConfigFromConfig(layerConfig, conf); int batchNormMo...
[ "private", "int", "getBatchNormMode", "(", "Map", "<", "String", ",", "Object", ">", "layerConfig", ",", "boolean", "enforceTrainingConfig", ")", "throws", "InvalidKerasConfigurationException", ",", "UnsupportedKerasConfigurationException", "{", "Map", "<", "String", ",...
Get BatchNormalization "mode" from Keras layer configuration. Most modes currently unsupported. @param layerConfig dictionary containing Keras layer configuration @return batchnormalization mode @throws InvalidKerasConfigurationException Invalid Keras config
[ "Get", "BatchNormalization", "mode", "from", "Keras", "layer", "configuration", ".", "Most", "modes", "currently", "unsupported", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/normalization/KerasBatchNormalization.java#L324-L343
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/ant/DataSet.java
DataSet.createInsertionSql
public void createInsertionSql(Database model, Platform platform, Writer writer) throws IOException { """ Generates and writes the sql for inserting the currently contained data objects. @param model The database model @param platform The platform @param writer The output stream """ for (Ite...
java
public void createInsertionSql(Database model, Platform platform, Writer writer) throws IOException { for (Iterator it = _beans.iterator(); it.hasNext();) { writer.write(platform.getInsertSql(model, (DynaBean)it.next())); if (it.hasNext()) { ...
[ "public", "void", "createInsertionSql", "(", "Database", "model", ",", "Platform", "platform", ",", "Writer", "writer", ")", "throws", "IOException", "{", "for", "(", "Iterator", "it", "=", "_beans", ".", "iterator", "(", ")", ";", "it", ".", "hasNext", "(...
Generates and writes the sql for inserting the currently contained data objects. @param model The database model @param platform The platform @param writer The output stream
[ "Generates", "and", "writes", "the", "sql", "for", "inserting", "the", "currently", "contained", "data", "objects", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/ant/DataSet.java#L55-L65
mojohaus/clirr-maven-plugin
src/main/java/org/codehaus/mojo/clirr/AbstractClirrMojo.java
AbstractClirrMojo.createClassLoader
protected static ClassLoader createClassLoader( Collection artifacts, Set previousArtifacts ) throws MalformedURLException { """ Create a ClassLoader, which includes the artifacts in <code>artifacts</code>, but excludes the artifacts in <code>previousArtifacts</code>. The intention is, that we let BCEL i...
java
protected static ClassLoader createClassLoader( Collection artifacts, Set previousArtifacts ) throws MalformedURLException { URLClassLoader cl = null; if ( !artifacts.isEmpty() ) { List urls = new ArrayList( artifacts.size() ); for ( Iterator i = artifacts.ite...
[ "protected", "static", "ClassLoader", "createClassLoader", "(", "Collection", "artifacts", ",", "Set", "previousArtifacts", ")", "throws", "MalformedURLException", "{", "URLClassLoader", "cl", "=", "null", ";", "if", "(", "!", "artifacts", ".", "isEmpty", "(", ")"...
Create a ClassLoader, which includes the artifacts in <code>artifacts</code>, but excludes the artifacts in <code>previousArtifacts</code>. The intention is, that we let BCEL inspect the artifacts in the latter set, using a {@link ClassLoader}, which contains the dependencies. However, the {@link ClassLoader} must not ...
[ "Create", "a", "ClassLoader", "which", "includes", "the", "artifacts", "in", "<code", ">", "artifacts<", "/", "code", ">", "but", "excludes", "the", "artifacts", "in", "<code", ">", "previousArtifacts<", "/", "code", ">", ".", "The", "intention", "is", "that...
train
https://github.com/mojohaus/clirr-maven-plugin/blob/4348dc31ee003097fa352b1cc3a607dda502bb4c/src/main/java/org/codehaus/mojo/clirr/AbstractClirrMojo.java#L648-L669
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
ExecutionGraph.vertexFinished
void vertexFinished() { """ Called whenever a vertex reaches state FINISHED (completed successfully). Once all vertices are in the FINISHED state, the program is successfully done. """ assertRunningInJobMasterMainThread(); final int numFinished = verticesFinished.incrementAndGet(); if (numFinished == nu...
java
void vertexFinished() { assertRunningInJobMasterMainThread(); final int numFinished = verticesFinished.incrementAndGet(); if (numFinished == numVerticesTotal) { // done :-) // check whether we are still in "RUNNING" and trigger the final cleanup if (state == JobStatus.RUNNING) { // we do the final c...
[ "void", "vertexFinished", "(", ")", "{", "assertRunningInJobMasterMainThread", "(", ")", ";", "final", "int", "numFinished", "=", "verticesFinished", ".", "incrementAndGet", "(", ")", ";", "if", "(", "numFinished", "==", "numVerticesTotal", ")", "{", "// done :-)"...
Called whenever a vertex reaches state FINISHED (completed successfully). Once all vertices are in the FINISHED state, the program is successfully done.
[ "Called", "whenever", "a", "vertex", "reaches", "state", "FINISHED", "(", "completed", "successfully", ")", ".", "Once", "all", "vertices", "are", "in", "the", "FINISHED", "state", "the", "program", "is", "successfully", "done", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java#L1384-L1413
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java
OdsElements.flushTables
public void flushTables(final XMLUtil util, final ZipUTF8Writer writer) throws IOException { """ Flush the tables @param util the util @param writer the stream to write @throws IOException when write fails """ this.contentElement.flushTables(util, writer); }
java
public void flushTables(final XMLUtil util, final ZipUTF8Writer writer) throws IOException { this.contentElement.flushTables(util, writer); }
[ "public", "void", "flushTables", "(", "final", "XMLUtil", "util", ",", "final", "ZipUTF8Writer", "writer", ")", "throws", "IOException", "{", "this", ".", "contentElement", ".", "flushTables", "(", "util", ",", "writer", ")", ";", "}" ]
Flush the tables @param util the util @param writer the stream to write @throws IOException when write fails
[ "Flush", "the", "tables" ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L280-L282
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerDnsAliasesInner.java
ServerDnsAliasesInner.createOrUpdate
public ServerDnsAliasInner createOrUpdate(String resourceGroupName, String serverName, String dnsAliasName) { """ Creates a server dns alias. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param s...
java
public ServerDnsAliasInner createOrUpdate(String resourceGroupName, String serverName, String dnsAliasName) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, dnsAliasName).toBlocking().last().body(); }
[ "public", "ServerDnsAliasInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "dnsAliasName", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",", "dnsAliasName",...
Creates a server dns alias. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server that the alias is pointing to. @param dnsAliasName The name of the server DNS alias. @thr...
[ "Creates", "a", "server", "dns", "alias", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerDnsAliasesInner.java#L207-L209
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.mapKeys
public static Map mapKeys(Mapper mapper, Map map) { """ Create a new Map by mapping all keys from the original map and maintaining the original value. @param mapper a Mapper to map the keys @param map a Map @return a new Map with keys mapped """ return mapKeys(mapper, map, false); }
java
public static Map mapKeys(Mapper mapper, Map map) { return mapKeys(mapper, map, false); }
[ "public", "static", "Map", "mapKeys", "(", "Mapper", "mapper", ",", "Map", "map", ")", "{", "return", "mapKeys", "(", "mapper", ",", "map", ",", "false", ")", ";", "}" ]
Create a new Map by mapping all keys from the original map and maintaining the original value. @param mapper a Mapper to map the keys @param map a Map @return a new Map with keys mapped
[ "Create", "a", "new", "Map", "by", "mapping", "all", "keys", "from", "the", "original", "map", "and", "maintaining", "the", "original", "value", "." ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L374-L376
IBM/ibm-cos-sdk-java
ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/http/timers/TimeoutThreadPoolBuilder.java
TimeoutThreadPoolBuilder.safeSetRemoveOnCancel
private static void safeSetRemoveOnCancel(ScheduledThreadPoolExecutor executor) { """ {@link ScheduledThreadPoolExecutor#setRemoveOnCancelPolicy(boolean)} is not available in Java 6 so we invoke it with reflection to be able to compile against Java 6. @param executor """ try { executor....
java
private static void safeSetRemoveOnCancel(ScheduledThreadPoolExecutor executor) { try { executor.getClass().getMethod("setRemoveOnCancelPolicy", boolean.class).invoke(executor, Boolean.TRUE); } catch (IllegalAccessException e) { throwSetRemoveOnCancelException(e); } catch...
[ "private", "static", "void", "safeSetRemoveOnCancel", "(", "ScheduledThreadPoolExecutor", "executor", ")", "{", "try", "{", "executor", ".", "getClass", "(", ")", ".", "getMethod", "(", "\"setRemoveOnCancelPolicy\"", ",", "boolean", ".", "class", ")", ".", "invoke...
{@link ScheduledThreadPoolExecutor#setRemoveOnCancelPolicy(boolean)} is not available in Java 6 so we invoke it with reflection to be able to compile against Java 6. @param executor
[ "{", "@link", "ScheduledThreadPoolExecutor#setRemoveOnCancelPolicy", "(", "boolean", ")", "}", "is", "not", "available", "in", "Java", "6", "so", "we", "invoke", "it", "with", "reflection", "to", "be", "able", "to", "compile", "against", "Java", "6", "." ]
train
https://github.com/IBM/ibm-cos-sdk-java/blob/d0bb2dd754c328a05e7dba8dc42e28b271b6daf2/ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/http/timers/TimeoutThreadPoolBuilder.java#L68-L82
aalmiray/Json-lib
src/main/java/net/sf/json/JSONObject.java
JSONObject.element
public JSONObject element( String key, int value ) { """ Put a key/int pair in the JSONObject. @param key A key string. @param value An int which is the value. @return this. @throws JSONException If the key is null. """ verifyIsNull(); return element( key, new Integer( value ) ); }
java
public JSONObject element( String key, int value ) { verifyIsNull(); return element( key, new Integer( value ) ); }
[ "public", "JSONObject", "element", "(", "String", "key", ",", "int", "value", ")", "{", "verifyIsNull", "(", ")", ";", "return", "element", "(", "key", ",", "new", "Integer", "(", "value", ")", ")", ";", "}" ]
Put a key/int pair in the JSONObject. @param key A key string. @param value An int which is the value. @return this. @throws JSONException If the key is null.
[ "Put", "a", "key", "/", "int", "pair", "in", "the", "JSONObject", "." ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JSONObject.java#L1627-L1630
zafarkhaja/jsemver
src/main/java/com/github/zafarkhaja/semver/MetadataVersion.java
MetadataVersion.getLeastCommonArrayLength
private int getLeastCommonArrayLength(String[] arr1, String[] arr2) { """ Returns the size of the smallest array. @param arr1 the first array @param arr2 the second array @return the size of the smallest array """ return arr1.length <= arr2.length ? arr1.length : arr2.length; }
java
private int getLeastCommonArrayLength(String[] arr1, String[] arr2) { return arr1.length <= arr2.length ? arr1.length : arr2.length; }
[ "private", "int", "getLeastCommonArrayLength", "(", "String", "[", "]", "arr1", ",", "String", "[", "]", "arr2", ")", "{", "return", "arr1", ".", "length", "<=", "arr2", ".", "length", "?", "arr1", ".", "length", ":", "arr2", ".", "length", ";", "}" ]
Returns the size of the smallest array. @param arr1 the first array @param arr2 the second array @return the size of the smallest array
[ "Returns", "the", "size", "of", "the", "smallest", "array", "." ]
train
https://github.com/zafarkhaja/jsemver/blob/1f4996ea3dab06193c378fd66fd4f8fdc8334cc6/src/main/java/com/github/zafarkhaja/semver/MetadataVersion.java#L217-L219
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/media/MediaClient.java
MediaClient.createWaterMark
public CreateWaterMarkResponse createWaterMark(CreateWaterMarkRequest request) { """ Creates a water mark and return water mark ID @param request The request object containing all options for creating new water mark. @return watermarkId the unique ID of the new water mark. """ checkStringNotEmpty...
java
public CreateWaterMarkResponse createWaterMark(CreateWaterMarkRequest request) { checkStringNotEmpty(request.getBucket(), "The parameter bucket should NOT be null or empty string."); checkStringNotEmpty(request.getKey(), "The parameter key should NOT be null or empty string."); InternalRequest i...
[ "public", "CreateWaterMarkResponse", "createWaterMark", "(", "CreateWaterMarkRequest", "request", ")", "{", "checkStringNotEmpty", "(", "request", ".", "getBucket", "(", ")", ",", "\"The parameter bucket should NOT be null or empty string.\"", ")", ";", "checkStringNotEmpty", ...
Creates a water mark and return water mark ID @param request The request object containing all options for creating new water mark. @return watermarkId the unique ID of the new water mark.
[ "Creates", "a", "water", "mark", "and", "return", "water", "mark", "ID" ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/media/MediaClient.java#L1100-L1106
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/GlobalizationPreferences.java
GlobalizationPreferences.getDateFormat
public DateFormat getDateFormat(int dateStyle, int timeStyle) { """ Gets a date format according to the current settings. If there is an explicit (non-null) date/time format set, a copy of that is returned. Otherwise, the language priority list is used. DF_NONE should be used for the style, where only the date ...
java
public DateFormat getDateFormat(int dateStyle, int timeStyle) { if (dateStyle == DF_NONE && timeStyle == DF_NONE || dateStyle < 0 || dateStyle >= DF_LIMIT || timeStyle < 0 || timeStyle >= DF_LIMIT) { throw new IllegalArgumentException("Illegal date format style argume...
[ "public", "DateFormat", "getDateFormat", "(", "int", "dateStyle", ",", "int", "timeStyle", ")", "{", "if", "(", "dateStyle", "==", "DF_NONE", "&&", "timeStyle", "==", "DF_NONE", "||", "dateStyle", "<", "0", "||", "dateStyle", ">=", "DF_LIMIT", "||", "timeSty...
Gets a date format according to the current settings. If there is an explicit (non-null) date/time format set, a copy of that is returned. Otherwise, the language priority list is used. DF_NONE should be used for the style, where only the date or time format individually is being gotten. @param dateStyle DF_FULL, DF_L...
[ "Gets", "a", "date", "format", "according", "to", "the", "current", "settings", ".", "If", "there", "is", "an", "explicit", "(", "non", "-", "null", ")", "date", "/", "time", "format", "set", "a", "copy", "of", "that", "is", "returned", ".", "Otherwise...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/GlobalizationPreferences.java#L662-L680
banq/jdonframework
JdonAccessory/jdon-struts1x/src/main/java/com/jdon/strutsutil/ModelListAction.java
ModelListAction.customizeListForm
public void customizeListForm(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, ModelListForm modelListForm) throws Exception { """ 定制ModelListForm 缺省ModelListForm是只有一个List,包含一种Model集合 有的应用可能是两种Model集合,可以继承ModelListForm实现Map-backed ActionForms 再继承本Action,实现本方法。 @param acti...
java
public void customizeListForm(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, ModelListForm modelListForm) throws Exception { }
[ "public", "void", "customizeListForm", "(", "ActionMapping", "actionMapping", ",", "ActionForm", "actionForm", ",", "HttpServletRequest", "request", ",", "ModelListForm", "modelListForm", ")", "throws", "Exception", "{", "}" ]
定制ModelListForm 缺省ModelListForm是只有一个List,包含一种Model集合 有的应用可能是两种Model集合,可以继承ModelListForm实现Map-backed ActionForms 再继承本Action,实现本方法。 @param actionMapping @param actionForm @param request @param modelListForm @throws java.lang.Exception
[ "定制ModelListForm" ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/strutsutil/ModelListAction.java#L196-L199
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/util/UrlUtilities.java
UrlUtilities.createSecureBuddyIconUrl
public static String createSecureBuddyIconUrl(int iconFarm, int iconServer, String id) { """ Construct the BuddyIconUrl with {@code https} scheme. <p> If none available, return the <a href="https://www.flickr.com/images/buddyicon.jpg">default</a>, or an URL assembled from farm, iconserver and nsid. @see <a hr...
java
public static String createSecureBuddyIconUrl(int iconFarm, int iconServer, String id) { return createBuddyIconUrl("https", iconFarm, iconServer, id); }
[ "public", "static", "String", "createSecureBuddyIconUrl", "(", "int", "iconFarm", ",", "int", "iconServer", ",", "String", "id", ")", "{", "return", "createBuddyIconUrl", "(", "\"https\"", ",", "iconFarm", ",", "iconServer", ",", "id", ")", ";", "}" ]
Construct the BuddyIconUrl with {@code https} scheme. <p> If none available, return the <a href="https://www.flickr.com/images/buddyicon.jpg">default</a>, or an URL assembled from farm, iconserver and nsid. @see <a href="http://flickr.com/services/api/misc.buddyicons.html">Flickr Documentation</a> @param iconFarm @par...
[ "Construct", "the", "BuddyIconUrl", "with", "{", "@code", "https", "}", "scheme", ".", "<p", ">", "If", "none", "available", "return", "the", "<a", "href", "=", "https", ":", "//", "www", ".", "flickr", ".", "com", "/", "images", "/", "buddyicon", ".",...
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/util/UrlUtilities.java#L198-L200
sirthias/parboiled
parboiled-core/src/main/java/org/parboiled/support/Characters.java
Characters.of
public static Characters of(String chars) { """ Creates a new Characters instance containing only the given chars. @param chars the chars @return a new Characters object """ return StringUtils.isEmpty(chars) ? Characters.NONE : new Characters(false, chars.toCharArray()); }
java
public static Characters of(String chars) { return StringUtils.isEmpty(chars) ? Characters.NONE : new Characters(false, chars.toCharArray()); }
[ "public", "static", "Characters", "of", "(", "String", "chars", ")", "{", "return", "StringUtils", ".", "isEmpty", "(", "chars", ")", "?", "Characters", ".", "NONE", ":", "new", "Characters", "(", "false", ",", "chars", ".", "toCharArray", "(", ")", ")",...
Creates a new Characters instance containing only the given chars. @param chars the chars @return a new Characters object
[ "Creates", "a", "new", "Characters", "instance", "containing", "only", "the", "given", "chars", "." ]
train
https://github.com/sirthias/parboiled/blob/84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a/parboiled-core/src/main/java/org/parboiled/support/Characters.java#L257-L259
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/InternalResourceMap.java
InternalResourceMap.computeHash
public static String computeHash(final InternalResource resource) { """ Computes a simple hash of the resource contents. @param resource the resource to hash. @return a hash of the resource contents. """ final int bufferSize = 1024; try (InputStream stream = resource.getStream()) { if (stream == nu...
java
public static String computeHash(final InternalResource resource) { final int bufferSize = 1024; try (InputStream stream = resource.getStream()) { if (stream == null) { return null; } // Compute CRC-32 checksum // TODO: Is a 1 in 2^32 chance of a cache bust fail good enough? // Checksum checksu...
[ "public", "static", "String", "computeHash", "(", "final", "InternalResource", "resource", ")", "{", "final", "int", "bufferSize", "=", "1024", ";", "try", "(", "InputStream", "stream", "=", "resource", ".", "getStream", "(", ")", ")", "{", "if", "(", "str...
Computes a simple hash of the resource contents. @param resource the resource to hash. @return a hash of the resource contents.
[ "Computes", "a", "simple", "hash", "of", "the", "resource", "contents", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/InternalResourceMap.java#L83-L105
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.core/src/com/ibm/ws/collector/manager/buffer/BufferManagerImpl.java
BufferManagerImpl.addHandler
public synchronized void addHandler(String handlerId) { """ Add an asynchronous handler that will consume events from this BufferManagerImpl/Conduit's buffer @param handlerId handlerID to add to this BufferManager """ // If it is first async handler subscribed, then create the main buffer if (ringBuffe...
java
public synchronized void addHandler(String handlerId) { // If it is first async handler subscribed, then create the main buffer if (ringBuffer == null) { ringBuffer = new Buffer<Object>(capacity); } /* * Every new Asynchronous handler starts off with all events from EMQ. * So we write all EMQ messages ...
[ "public", "synchronized", "void", "addHandler", "(", "String", "handlerId", ")", "{", "// If it is first async handler subscribed, then create the main buffer", "if", "(", "ringBuffer", "==", "null", ")", "{", "ringBuffer", "=", "new", "Buffer", "<", "Object", ">", "(...
Add an asynchronous handler that will consume events from this BufferManagerImpl/Conduit's buffer @param handlerId handlerID to add to this BufferManager
[ "Add", "an", "asynchronous", "handler", "that", "will", "consume", "events", "from", "this", "BufferManagerImpl", "/", "Conduit", "s", "buffer" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.core/src/com/ibm/ws/collector/manager/buffer/BufferManagerImpl.java#L192-L212
sarl/sarl
main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/utils/M2EUtilities.java
M2EUtilities.compareOsgiVersions
public static int compareOsgiVersions(String v1, String v2) { """ Compare two OSGI versions. @param v1 first OSGI version. @param v2 second OSGI version. @return an integer that the sign indicates if v1 is lower, equal ot greater than v2. """ return Version.parseVersion(v1).compareTo(Version.parseVersio...
java
public static int compareOsgiVersions(String v1, String v2) { return Version.parseVersion(v1).compareTo(Version.parseVersion(v2)); }
[ "public", "static", "int", "compareOsgiVersions", "(", "String", "v1", ",", "String", "v2", ")", "{", "return", "Version", ".", "parseVersion", "(", "v1", ")", ".", "compareTo", "(", "Version", ".", "parseVersion", "(", "v2", ")", ")", ";", "}" ]
Compare two OSGI versions. @param v1 first OSGI version. @param v2 second OSGI version. @return an integer that the sign indicates if v1 is lower, equal ot greater than v2.
[ "Compare", "two", "OSGI", "versions", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/utils/M2EUtilities.java#L63-L65
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/PathWrapper.java
PathWrapper.openReadWrite
public void openReadWrite(ReadStreamOld is, WriteStreamOld os) throws IOException { """ Opens a ReadWritePair for reading and writing. <p>A chat channel, for example, would open its socket using this interface. @param is pre-allocated ReadStream to be initialized @param os pre-allocated WriteStream to be i...
java
public void openReadWrite(ReadStreamOld is, WriteStreamOld os) throws IOException { getWrappedPath().openReadWrite(is, os); }
[ "public", "void", "openReadWrite", "(", "ReadStreamOld", "is", ",", "WriteStreamOld", "os", ")", "throws", "IOException", "{", "getWrappedPath", "(", ")", ".", "openReadWrite", "(", "is", ",", "os", ")", ";", "}" ]
Opens a ReadWritePair for reading and writing. <p>A chat channel, for example, would open its socket using this interface. @param is pre-allocated ReadStream to be initialized @param os pre-allocated WriteStream to be initialized
[ "Opens", "a", "ReadWritePair", "for", "reading", "and", "writing", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/PathWrapper.java#L548-L551
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GalleryImagesInner.java
GalleryImagesInner.createOrUpdate
public GalleryImageInner createOrUpdate(String resourceGroupName, String labAccountName, String galleryImageName, GalleryImageInner galleryImage) { """ Create or replace an existing Gallery Image. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @para...
java
public GalleryImageInner createOrUpdate(String resourceGroupName, String labAccountName, String galleryImageName, GalleryImageInner galleryImage) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, labAccountName, galleryImageName, galleryImage).toBlocking().single().body(); }
[ "public", "GalleryImageInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ",", "String", "galleryImageName", ",", "GalleryImageInner", "galleryImage", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroup...
Create or replace an existing Gallery Image. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param galleryImageName The name of the gallery Image. @param galleryImage Represents an image from the Azure Marketplace @throws IllegalArgumentException thrown if p...
[ "Create", "or", "replace", "an", "existing", "Gallery", "Image", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GalleryImagesInner.java#L551-L553
lightblueseas/email-tails
src/main/java/de/alpharogroup/email/messages/EmailMessage.java
EmailMessage.setContent
@Override public void setContent(final Object content, final String type) throws MessagingException { """ Sets the content. @param content the content @param type the type @throws MessagingException is thrown if the underlying implementation does not support modification of existing values @see javax....
java
@Override public void setContent(final Object content, final String type) throws MessagingException { charset = EmailExtensions.getCharsetFromContentType(type); super.setContent(content, type); }
[ "@", "Override", "public", "void", "setContent", "(", "final", "Object", "content", ",", "final", "String", "type", ")", "throws", "MessagingException", "{", "charset", "=", "EmailExtensions", ".", "getCharsetFromContentType", "(", "type", ")", ";", "super", "."...
Sets the content. @param content the content @param type the type @throws MessagingException is thrown if the underlying implementation does not support modification of existing values @see javax.mail.Part#setContent(java.lang.Object, java.lang.String)
[ "Sets", "the", "content", "." ]
train
https://github.com/lightblueseas/email-tails/blob/7be6fee3548e61e697cc8e64e90603cb1f505be2/src/main/java/de/alpharogroup/email/messages/EmailMessage.java#L307-L312
strator-dev/greenpepper-open
extensions-external/php/src/main/java/com/greenpepper/phpsud/fixtures/PHPFixture.java
PHPFixture.findClass
public static PHPClassDescriptor findClass(PHPContainer php, String className) throws PHPException { """ <p>findClass.</p> @param php a {@link com.greenpepper.phpsud.container.PHPContainer} object. @param className a {@link java.lang.String} object. @return a {@link com.greenpepper.phpsud.container.PHPClassDe...
java
public static PHPClassDescriptor findClass(PHPContainer php, String className) throws PHPException { PHPClassDescriptor desc; desc = php.getClassDescriptor(className + "Fixture"); if (desc != null) { return desc; } desc = php.getClassDescriptor(className); if (desc != null) { return desc; } Strin...
[ "public", "static", "PHPClassDescriptor", "findClass", "(", "PHPContainer", "php", ",", "String", "className", ")", "throws", "PHPException", "{", "PHPClassDescriptor", "desc", ";", "desc", "=", "php", ".", "getClassDescriptor", "(", "className", "+", "\"Fixture\"",...
<p>findClass.</p> @param php a {@link com.greenpepper.phpsud.container.PHPContainer} object. @param className a {@link java.lang.String} object. @return a {@link com.greenpepper.phpsud.container.PHPClassDescriptor} object. @throws com.greenpepper.phpsud.exceptions.PHPException if any.
[ "<p", ">", "findClass", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper-open/blob/71fd244b4989e9cd2d07ae62dd954a1f2a269a92/extensions-external/php/src/main/java/com/greenpepper/phpsud/fixtures/PHPFixture.java#L59-L79
epam/parso
src/main/java/com/epam/parso/DataWriterUtil.java
DataWriterUtil.convertDateElementToString
private static String convertDateElementToString(Date currentDate, SimpleDateFormat dateFormat) { """ The function to convert a date into a string according to the format used. @param currentDate the date to convert. @param dateFormat the formatter to convert date element into string. @return the string that...
java
private static String convertDateElementToString(Date currentDate, SimpleDateFormat dateFormat) { return currentDate.getTime() != 0 ? dateFormat.format(currentDate.getTime()) : ""; }
[ "private", "static", "String", "convertDateElementToString", "(", "Date", "currentDate", ",", "SimpleDateFormat", "dateFormat", ")", "{", "return", "currentDate", ".", "getTime", "(", ")", "!=", "0", "?", "dateFormat", ".", "format", "(", "currentDate", ".", "ge...
The function to convert a date into a string according to the format used. @param currentDate the date to convert. @param dateFormat the formatter to convert date element into string. @return the string that corresponds to the date in the format used.
[ "The", "function", "to", "convert", "a", "date", "into", "a", "string", "according", "to", "the", "format", "used", "." ]
train
https://github.com/epam/parso/blob/fb132cf943ba099a35b2f5a1490c0a59641e09dc/src/main/java/com/epam/parso/DataWriterUtil.java#L260-L262
PistoiaHELM/HELM2NotationToolkit
src/main/java/org/helm/notation2/tools/HELM2NotationUtils.java
HELM2NotationUtils.section4
private static void section4(List<AnnotationNotation> annotations, Map<String, String> mapIds) { """ method to add annotations to the existent annotation section @param annotations new AnnotationNotations @param mapIds Map of old and new Ids """ for (AnnotationNotation annotation : annotations) { ...
java
private static void section4(List<AnnotationNotation> annotations, Map<String, String> mapIds) { for (AnnotationNotation annotation : annotations) { String notation = annotation.getAnnotation(); notation = changeIDs(notation, mapIds); helm2notation.addAnnotation(new AnnotationNotation(notation...
[ "private", "static", "void", "section4", "(", "List", "<", "AnnotationNotation", ">", "annotations", ",", "Map", "<", "String", ",", "String", ">", "mapIds", ")", "{", "for", "(", "AnnotationNotation", "annotation", ":", "annotations", ")", "{", "String", "n...
method to add annotations to the existent annotation section @param annotations new AnnotationNotations @param mapIds Map of old and new Ids
[ "method", "to", "add", "annotations", "to", "the", "existent", "annotation", "section" ]
train
https://github.com/PistoiaHELM/HELM2NotationToolkit/blob/ac5bb01fd5b4082134a8ef226bbe2ff0f60fcd38/src/main/java/org/helm/notation2/tools/HELM2NotationUtils.java#L326-L332
litsec/swedish-eid-shibboleth-base
shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/service/impl/AuthnContextServiceImpl.java
AuthnContextServiceImpl.addAuthnContextClassContext
protected void addAuthnContextClassContext(ProfileRequestContext<?, ?> context, AuthnContextClassContext authnContextClassContext) throws ExternalAutenticationErrorCodeException { """ Adds the supplied {@code AuthnContextClassContext} to the request context @param context the request context @param auth...
java
protected void addAuthnContextClassContext(ProfileRequestContext<?, ?> context, AuthnContextClassContext authnContextClassContext) throws ExternalAutenticationErrorCodeException { AuthenticationContext authnContext = authenticationContextLookupStrategy.apply(context); if (authnContext == null) { log...
[ "protected", "void", "addAuthnContextClassContext", "(", "ProfileRequestContext", "<", "?", ",", "?", ">", "context", ",", "AuthnContextClassContext", "authnContextClassContext", ")", "throws", "ExternalAutenticationErrorCodeException", "{", "AuthenticationContext", "authnConte...
Adds the supplied {@code AuthnContextClassContext} to the request context @param context the request context @param authnContextClassContext the context to add @throws ExternalAutenticationErrorCodeException if no context exists
[ "Adds", "the", "supplied", "{", "@code", "AuthnContextClassContext", "}", "to", "the", "request", "context" ]
train
https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/service/impl/AuthnContextServiceImpl.java#L136-L144
apache/reef
lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/DriverRuntimeStartHandler.java
DriverRuntimeStartHandler.onNext
@Override public synchronized void onNext(final RuntimeStart runtimeStart) { """ This method is called on start of the REEF Driver runtime event loop. It contains startup logic for REEF Driver that is independent from a runtime framework (e.g. Mesos, YARN, Local, etc). Platform-specific logic is then handled ...
java
@Override public synchronized void onNext(final RuntimeStart runtimeStart) { LOG.log(Level.FINEST, "RuntimeStart: {0}", runtimeStart); // Register for heartbeats and error messages from the Evaluators. this.remoteManager.registerHandler( EvaluatorRuntimeProtocol.EvaluatorHeartbeatProto.class, ...
[ "@", "Override", "public", "synchronized", "void", "onNext", "(", "final", "RuntimeStart", "runtimeStart", ")", "{", "LOG", ".", "log", "(", "Level", ".", "FINEST", ",", "\"RuntimeStart: {0}\"", ",", "runtimeStart", ")", ";", "// Register for heartbeats and error me...
This method is called on start of the REEF Driver runtime event loop. It contains startup logic for REEF Driver that is independent from a runtime framework (e.g. Mesos, YARN, Local, etc). Platform-specific logic is then handled in ResourceManagerStartHandler. @param runtimeStart An event that signals start of the Driv...
[ "This", "method", "is", "called", "on", "start", "of", "the", "REEF", "Driver", "runtime", "event", "loop", ".", "It", "contains", "startup", "logic", "for", "REEF", "Driver", "that", "is", "independent", "from", "a", "runtime", "framework", "(", "e", ".",...
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/DriverRuntimeStartHandler.java#L88-L109
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/segmentation/ms/SegmentMeanShift.java
SegmentMeanShift.process
public void process( T image , GrayS32 output ) { """ Performs mean-shift segmentation on the input image. The total number of regions can be found by calling {@link #getNumberOfRegions()}. @param image Image @param output Storage for output image. Each pixel is set to the region it belongs to. """ I...
java
public void process( T image , GrayS32 output ) { InputSanityCheck.checkSameShape(image,output); stopRequested = false; // long time0 = System.currentTimeMillis(); search.process(image); if( stopRequested ) return; // long time1 = System.currentTimeMillis(); FastQueue<float[]> regionColor = search.getMo...
[ "public", "void", "process", "(", "T", "image", ",", "GrayS32", "output", ")", "{", "InputSanityCheck", ".", "checkSameShape", "(", "image", ",", "output", ")", ";", "stopRequested", "=", "false", ";", "//\t\tlong time0 = System.currentTimeMillis();", "search", "....
Performs mean-shift segmentation on the input image. The total number of regions can be found by calling {@link #getNumberOfRegions()}. @param image Image @param output Storage for output image. Each pixel is set to the region it belongs to.
[ "Performs", "mean", "-", "shift", "segmentation", "on", "the", "input", "image", ".", "The", "total", "number", "of", "regions", "can", "be", "found", "by", "calling", "{", "@link", "#getNumberOfRegions", "()", "}", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/segmentation/ms/SegmentMeanShift.java#L102-L135
ops4j/org.ops4j.pax.swissbox
pax-swissbox-core/src/main/java/org/ops4j/pax/swissbox/core/ContextClassLoaderUtils.java
ContextClassLoaderUtils.doWithClassLoader
public static <V> V doWithClassLoader( final ClassLoader classLoader, final Callable<V> callable ) throws Exception { """ Executes a piece of code (callable.call) using a specific class loader set as context class loader. If the curent thread context clas loader is already set, it will be restored after e...
java
public static <V> V doWithClassLoader( final ClassLoader classLoader, final Callable<V> callable ) throws Exception { Thread currentThread = null; ClassLoader backupClassLoader = null; try { if( classLoader != null ) { currentThread = T...
[ "public", "static", "<", "V", ">", "V", "doWithClassLoader", "(", "final", "ClassLoader", "classLoader", ",", "final", "Callable", "<", "V", ">", "callable", ")", "throws", "Exception", "{", "Thread", "currentThread", "=", "null", ";", "ClassLoader", "backupCl...
Executes a piece of code (callable.call) using a specific class loader set as context class loader. If the curent thread context clas loader is already set, it will be restored after execution. @param classLoader clas loader to be used as context clas loader during call. @param callable piece of code to be executed...
[ "Executes", "a", "piece", "of", "code", "(", "callable", ".", "call", ")", "using", "a", "specific", "class", "loader", "set", "as", "context", "class", "loader", ".", "If", "the", "curent", "thread", "context", "clas", "loader", "is", "already", "set", ...
train
https://github.com/ops4j/org.ops4j.pax.swissbox/blob/00b0ee16cdbe8017984a4d7ba808b10d985c5b5c/pax-swissbox-core/src/main/java/org/ops4j/pax/swissbox/core/ContextClassLoaderUtils.java#L47-L69
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/map/MapView.java
MapView.translate
public void translate(double x, double y) { """ Move the view on the map. This happens by translating the camera in turn. @param x Translation factor along the X-axis in world space. @param y Translation factor along the Y-axis in world space. """ saveState(); doSetOrigin(new Coordinate(viewState.get...
java
public void translate(double x, double y) { saveState(); doSetOrigin(new Coordinate(viewState.getX() + x, viewState.getY() + y)); fireEvent(false, null); }
[ "public", "void", "translate", "(", "double", "x", ",", "double", "y", ")", "{", "saveState", "(", ")", ";", "doSetOrigin", "(", "new", "Coordinate", "(", "viewState", ".", "getX", "(", ")", "+", "x", ",", "viewState", ".", "getY", "(", ")", "+", "...
Move the view on the map. This happens by translating the camera in turn. @param x Translation factor along the X-axis in world space. @param y Translation factor along the Y-axis in world space.
[ "Move", "the", "view", "on", "the", "map", ".", "This", "happens", "by", "translating", "the", "camera", "in", "turn", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/map/MapView.java#L331-L335
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/pubmed/ManualDescriptor.java
ManualDescriptor.setGeneSymbolList
public void setGeneSymbolList(int i, String v) { """ indexed setter for geneSymbolList - sets an indexed value - GeneSymbolList in PubMed @generated @param i index in the array to set @param v value to set into the array """ if (ManualDescriptor_Type.featOkTst && ((ManualDescriptor_Type)jcasType).casFe...
java
public void setGeneSymbolList(int i, String v) { if (ManualDescriptor_Type.featOkTst && ((ManualDescriptor_Type)jcasType).casFeat_geneSymbolList == null) jcasType.jcas.throwFeatMissing("geneSymbolList", "de.julielab.jules.types.pubmed.ManualDescriptor"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_...
[ "public", "void", "setGeneSymbolList", "(", "int", "i", ",", "String", "v", ")", "{", "if", "(", "ManualDescriptor_Type", ".", "featOkTst", "&&", "(", "(", "ManualDescriptor_Type", ")", "jcasType", ")", ".", "casFeat_geneSymbolList", "==", "null", ")", "jcasTy...
indexed setter for geneSymbolList - sets an indexed value - GeneSymbolList in PubMed @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "geneSymbolList", "-", "sets", "an", "indexed", "value", "-", "GeneSymbolList", "in", "PubMed" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/pubmed/ManualDescriptor.java#L297-L301
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementUI.java
ElementUI.setDesignContextMenu
protected void setDesignContextMenu(BaseUIComponent component, Menupopup contextMenu) { """ Apply/remove the design context menu to/from the specified component. If applying the design context menu, any existing context menu is saved. When removing the context menu, any saved context menu is restored. @param ...
java
protected void setDesignContextMenu(BaseUIComponent component, Menupopup contextMenu) { component.setAttribute(CONTEXT_MENU, contextMenu); if (contextMenu == null) { SavedState.restore(component); applyHint(); } else { new SavedState(component); ...
[ "protected", "void", "setDesignContextMenu", "(", "BaseUIComponent", "component", ",", "Menupopup", "contextMenu", ")", "{", "component", ".", "setAttribute", "(", "CONTEXT_MENU", ",", "contextMenu", ")", ";", "if", "(", "contextMenu", "==", "null", ")", "{", "S...
Apply/remove the design context menu to/from the specified component. If applying the design context menu, any existing context menu is saved. When removing the context menu, any saved context menu is restored. @param component Component to which to apply/remove the design context menu. @param contextMenu The design m...
[ "Apply", "/", "remove", "the", "design", "context", "menu", "to", "/", "from", "the", "specified", "component", ".", "If", "applying", "the", "design", "context", "menu", "any", "existing", "context", "menu", "is", "saved", ".", "When", "removing", "the", ...
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementUI.java#L226-L237
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/boosting/Bagging.java
Bagging.getSampledDataSet
public static ClassificationDataSet getSampledDataSet(ClassificationDataSet dataSet, int[] sampledCounts) { """ Creates a new data set from the given sample counts. Points sampled multiple times will have multiple entries in the data set. @param dataSet the data set that was sampled from @param sampledCounts th...
java
public static ClassificationDataSet getSampledDataSet(ClassificationDataSet dataSet, int[] sampledCounts) { ClassificationDataSet destination = new ClassificationDataSet(dataSet.getNumNumericalVars(), dataSet.getCategories(), dataSet.getPredicting()); for (int i = 0; i < sampledCoun...
[ "public", "static", "ClassificationDataSet", "getSampledDataSet", "(", "ClassificationDataSet", "dataSet", ",", "int", "[", "]", "sampledCounts", ")", "{", "ClassificationDataSet", "destination", "=", "new", "ClassificationDataSet", "(", "dataSet", ".", "getNumNumericalVa...
Creates a new data set from the given sample counts. Points sampled multiple times will have multiple entries in the data set. @param dataSet the data set that was sampled from @param sampledCounts the sampling values obtained from {@link #sampleWithReplacement(int[], int, java.util.Random) } @return a new sampled clas...
[ "Creates", "a", "new", "data", "set", "from", "the", "given", "sample", "counts", ".", "Points", "sampled", "multiple", "times", "will", "have", "multiple", "entries", "in", "the", "data", "set", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/boosting/Bagging.java#L278-L290
ziccardi/jnrpe
jnrpe-lib/src/main/java/it/jnrpe/utils/PluginRepositoryUtil.java
PluginRepositoryUtil.parsePluginDefinition
@SuppressWarnings("rawtypes") private static PluginDefinition parsePluginDefinition(final ClassLoader cl, final Element plugin) throws PluginConfigurationException { """ Parse an XML plugin definition. @param cl The classloader to be used to load classes @param plugin The plugin XML element @return ...
java
@SuppressWarnings("rawtypes") private static PluginDefinition parsePluginDefinition(final ClassLoader cl, final Element plugin) throws PluginConfigurationException { // Check if the plugin definition is inside its own file if (getAttributeValue(plugin, "definedIn", false) != null) { Str...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "private", "static", "PluginDefinition", "parsePluginDefinition", "(", "final", "ClassLoader", "cl", ",", "final", "Element", "plugin", ")", "throws", "PluginConfigurationException", "{", "// Check if the plugin definition ...
Parse an XML plugin definition. @param cl The classloader to be used to load classes @param plugin The plugin XML element @return the parsed plugin definition * @throws PluginConfigurationException -
[ "Parse", "an", "XML", "plugin", "definition", "." ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-lib/src/main/java/it/jnrpe/utils/PluginRepositoryUtil.java#L187-L234
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java
Calendar.aggregateStamp
private static int aggregateStamp(int stamp_a, int stamp_b) { """ Returns the pseudo-time-stamp for two fields, given their individual pseudo-time-stamps. If either of the fields is unset, then the aggregate is unset. Otherwise, the aggregate is the later of the two stamps. """ if (stamp_a == UNSE...
java
private static int aggregateStamp(int stamp_a, int stamp_b) { if (stamp_a == UNSET || stamp_b == UNSET) { return UNSET; } return (stamp_a > stamp_b) ? stamp_a : stamp_b; }
[ "private", "static", "int", "aggregateStamp", "(", "int", "stamp_a", ",", "int", "stamp_b", ")", "{", "if", "(", "stamp_a", "==", "UNSET", "||", "stamp_b", "==", "UNSET", ")", "{", "return", "UNSET", ";", "}", "return", "(", "stamp_a", ">", "stamp_b", ...
Returns the pseudo-time-stamp for two fields, given their individual pseudo-time-stamps. If either of the fields is unset, then the aggregate is unset. Otherwise, the aggregate is the later of the two stamps.
[ "Returns", "the", "pseudo", "-", "time", "-", "stamp", "for", "two", "fields", "given", "their", "individual", "pseudo", "-", "time", "-", "stamps", ".", "If", "either", "of", "the", "fields", "is", "unset", "then", "the", "aggregate", "is", "unset", "."...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java#L2525-L2530
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/SegmentKeyCache.java
SegmentKeyCache.get
CacheBucketOffset get(UUID keyHash, int generation) { """ Looks up a cached offset for the given Key Hash. @param keyHash A UUID representing the Key Hash to look up. @return A {@link CacheBucketOffset} representing the sought result. """ CacheEntry entry; synchronized (this) { ...
java
CacheBucketOffset get(UUID keyHash, int generation) { CacheEntry entry; synchronized (this) { // First, check the tail cache. CacheBucketOffset tailOffset = this.tailOffsets.get(keyHash); if (tailOffset != null) { return tailOffset; } ...
[ "CacheBucketOffset", "get", "(", "UUID", "keyHash", ",", "int", "generation", ")", "{", "CacheEntry", "entry", ";", "synchronized", "(", "this", ")", "{", "// First, check the tail cache.", "CacheBucketOffset", "tailOffset", "=", "this", ".", "tailOffsets", ".", "...
Looks up a cached offset for the given Key Hash. @param keyHash A UUID representing the Key Hash to look up. @return A {@link CacheBucketOffset} representing the sought result.
[ "Looks", "up", "a", "cached", "offset", "for", "the", "given", "Key", "Hash", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/SegmentKeyCache.java#L211-L232
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.serviceName_monitoringNotifications_GET
public ArrayList<Long> serviceName_monitoringNotifications_GET(String serviceName) throws IOException { """ List the notifications for this access REST: GET /xdsl/{serviceName}/monitoringNotifications @param serviceName [required] The internal name of your XDSL offer """ String qPath = "/xdsl/{serviceNam...
java
public ArrayList<Long> serviceName_monitoringNotifications_GET(String serviceName) throws IOException { String qPath = "/xdsl/{serviceName}/monitoringNotifications"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t15); }
[ "public", "ArrayList", "<", "Long", ">", "serviceName_monitoringNotifications_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/xdsl/{serviceName}/monitoringNotifications\"", ";", "StringBuilder", "sb", "=", "path", "(", ...
List the notifications for this access REST: GET /xdsl/{serviceName}/monitoringNotifications @param serviceName [required] The internal name of your XDSL offer
[ "List", "the", "notifications", "for", "this", "access" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L1425-L1430
lucee/Lucee
core/src/main/java/lucee/commons/io/res/util/ResourceUtil.java
ResourceUtil.copyRecursive
public static void copyRecursive(Resource src, Resource trg) throws IOException { """ copy a file or directory recursive (with his content) @param res file or directory to delete @throws IOException @throws FileNotFoundException """ copyRecursive(src, trg, null); }
java
public static void copyRecursive(Resource src, Resource trg) throws IOException { copyRecursive(src, trg, null); }
[ "public", "static", "void", "copyRecursive", "(", "Resource", "src", ",", "Resource", "trg", ")", "throws", "IOException", "{", "copyRecursive", "(", "src", ",", "trg", ",", "null", ")", ";", "}" ]
copy a file or directory recursive (with his content) @param res file or directory to delete @throws IOException @throws FileNotFoundException
[ "copy", "a", "file", "or", "directory", "recursive", "(", "with", "his", "content", ")" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/res/util/ResourceUtil.java#L926-L928
primefaces/primefaces
src/main/java/org/primefaces/renderkit/InputRenderer.java
InputRenderer.renderARIACombobox
protected void renderARIACombobox(FacesContext context, UIInput component) throws IOException { """ Adds ARIA attributes if the component is "role=combobox". @param context the {@link FacesContext} @param component the {@link UIInput} component to add attributes for @throws IOException if any error occurs wri...
java
protected void renderARIACombobox(FacesContext context, UIInput component) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.writeAttribute("role", "combobox", null); writer.writeAttribute(HTML.ARIA_HASPOPUP, "true", null); writer.writeAttribute(HTML.ARIA_E...
[ "protected", "void", "renderARIACombobox", "(", "FacesContext", "context", ",", "UIInput", "component", ")", "throws", "IOException", "{", "ResponseWriter", "writer", "=", "context", ".", "getResponseWriter", "(", ")", ";", "writer", ".", "writeAttribute", "(", "\...
Adds ARIA attributes if the component is "role=combobox". @param context the {@link FacesContext} @param component the {@link UIInput} component to add attributes for @throws IOException if any error occurs writing the response @see https://www.w3.org/TR/wai-aria-practices/#combobox
[ "Adds", "ARIA", "attributes", "if", "the", "component", "is", "role", "=", "combobox", "." ]
train
https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/renderkit/InputRenderer.java#L153-L158
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.setChecksum
public void setChecksum(String algorithm, String value) throws ClientException, ServerException, IOException { """ implement GridFTP v2 SCKS command as described in <a href="http://www.ogf.org/documents/GFD.47.pdf">GridFTP v2 Protocol Description</a> <pre> 5.2 SCKS This command is sent prior to upload comm...
java
public void setChecksum(String algorithm, String value) throws ClientException, ServerException, IOException { // check if we the cksum commands and specific algorithm are supported checkCksumSupport(algorithm); // form CKSM command String parameters = String.format("%s %s",algorit...
[ "public", "void", "setChecksum", "(", "String", "algorithm", ",", "String", "value", ")", "throws", "ClientException", ",", "ServerException", ",", "IOException", "{", "// check if we the cksum commands and specific algorithm are supported", "checkCksumSupport", "(", "algorit...
implement GridFTP v2 SCKS command as described in <a href="http://www.ogf.org/documents/GFD.47.pdf">GridFTP v2 Protocol Description</a> <pre> 5.2 SCKS This command is sent prior to upload command such as STOR, ESTO, PUT. It is used to convey to the server that the checksum value for the file which is about to be upload...
[ "implement", "GridFTP", "v2", "SCKS", "command", "as", "described", "in", "<a", "href", "=", "http", ":", "//", "www", ".", "ogf", ".", "org", "/", "documents", "/", "GFD", ".", "47", ".", "pdf", ">", "GridFTP", "v2", "Protocol", "Description<", "/", ...
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L2212-L2232
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java
FlowController.getRewrittenActionURI
public String getRewrittenActionURI( String actionName, Map parameters, boolean asValidXml ) throws URISyntaxException { """ Create a fully-rewritten URI given an action and parameters. @param actionName the action name to convert into a fully-rewritten URI; may be qualified with a path from the we...
java
public String getRewrittenActionURI( String actionName, Map parameters, boolean asValidXml ) throws URISyntaxException { if ( _perRequestState == null ) { throw new IllegalStateException( "getRewrittenActionURI was called outside of a valid context." ); } Serv...
[ "public", "String", "getRewrittenActionURI", "(", "String", "actionName", ",", "Map", "parameters", ",", "boolean", "asValidXml", ")", "throws", "URISyntaxException", "{", "if", "(", "_perRequestState", "==", "null", ")", "{", "throw", "new", "IllegalStateException"...
Create a fully-rewritten URI given an action and parameters. @param actionName the action name to convert into a fully-rewritten URI; may be qualified with a path from the webapp root, in which case the parent directory from the current request is <i>not</i> used. @param parameters the additional parameters to include...
[ "Create", "a", "fully", "-", "rewritten", "URI", "given", "an", "action", "and", "parameters", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java#L2070-L2083
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerAutomaticTuningsInner.java
ServerAutomaticTuningsInner.getAsync
public Observable<ServerAutomaticTuningInner> getAsync(String resourceGroupName, String serverName) { """ Retrieves server automatic tuning options. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @...
java
public Observable<ServerAutomaticTuningInner> getAsync(String resourceGroupName, String serverName) { return getWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<ServerAutomaticTuningInner>, ServerAutomaticTuningInner>() { @Override public ServerAutoma...
[ "public", "Observable", "<", "ServerAutomaticTuningInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ")", ".", "map", "(", "new", ...
Retrieves server automatic tuning options. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @throws IllegalArgumentException thrown if parameters fail the validation...
[ "Retrieves", "server", "automatic", "tuning", "options", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerAutomaticTuningsInner.java#L102-L109
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildsInner.java
BuildsInner.beginUpdate
public BuildInner beginUpdate(String resourceGroupName, String registryName, String buildId) { """ Patch the build properties. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param buildId The build ID. ...
java
public BuildInner beginUpdate(String resourceGroupName, String registryName, String buildId) { return beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, buildId).toBlocking().single().body(); }
[ "public", "BuildInner", "beginUpdate", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "String", "buildId", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "registryName", ",", "buildId", ")", ".", "toB...
Patch the build properties. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param buildId The build ID. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if th...
[ "Patch", "the", "build", "properties", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildsInner.java#L609-L611
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PhotosApi.java
PhotosApi.getExif
public ExifData getExif(String photoId, String secret) throws JinxException { """ <br> Retrieves a list of EXIF/TIFF/GPS tags for a given photo. The calling user must have permission to view the photo. <br> This method does not require authentication. @param photoId Required. The id of the photo to fetch inf...
java
public ExifData getExif(String photoId, String secret) throws JinxException { JinxUtils.validateParams(photoId); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.photos.getExif"); params.put("photo_id", photoId); if (!JinxUtils.isNullOrEmpty(secret)) { params.put("sec...
[ "public", "ExifData", "getExif", "(", "String", "photoId", ",", "String", "secret", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "photoId", ")", ";", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", ...
<br> Retrieves a list of EXIF/TIFF/GPS tags for a given photo. The calling user must have permission to view the photo. <br> This method does not require authentication. @param photoId Required. The id of the photo to fetch information for. @param secret Optional. The secret for the photo. If the correct secret is pa...
[ "<br", ">", "Retrieves", "a", "list", "of", "EXIF", "/", "TIFF", "/", "GPS", "tags", "for", "a", "given", "photo", ".", "The", "calling", "user", "must", "have", "permission", "to", "view", "the", "photo", ".", "<br", ">", "This", "method", "does", "...
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PhotosApi.java#L281-L290
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/jetty/servlet/jmx/ConfigurationMBean.java
ConfigurationMBean.uniqueObjectName
public synchronized ObjectName uniqueObjectName(MBeanServer server, String on) { """ uniqueObjectName Make a unique jmx name for this configuration object @see org.browsermob.proxy.jetty.util.jmx.ModelMBeanImpl#uniqueObjectName(javax.management.MBeanServer, java.lang.String) """ ObjectName oName=null...
java
public synchronized ObjectName uniqueObjectName(MBeanServer server, String on) { ObjectName oName=null; try{oName=new ObjectName(on+",config="+_config.getClass().getName());} catch(Exception e){log.warn(LogSupport.EXCEPTION,e);} return oName; }
[ "public", "synchronized", "ObjectName", "uniqueObjectName", "(", "MBeanServer", "server", ",", "String", "on", ")", "{", "ObjectName", "oName", "=", "null", ";", "try", "{", "oName", "=", "new", "ObjectName", "(", "on", "+", "\",config=\"", "+", "_config", "...
uniqueObjectName Make a unique jmx name for this configuration object @see org.browsermob.proxy.jetty.util.jmx.ModelMBeanImpl#uniqueObjectName(javax.management.MBeanServer, java.lang.String)
[ "uniqueObjectName", "Make", "a", "unique", "jmx", "name", "for", "this", "configuration", "object" ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/jetty/servlet/jmx/ConfigurationMBean.java#L78-L85
beanshell/beanshell
src/main/java/bsh/BshArray.java
BshArray.setIndex
@SuppressWarnings("unchecked") public static void setIndex(Object array, int index, Object val) throws ReflectError, UtilTargetError { """ Set element value of array or list at index. Array.set for array or List.set for list. @param array to set value for. @param index of the element to set @pa...
java
@SuppressWarnings("unchecked") public static void setIndex(Object array, int index, Object val) throws ReflectError, UtilTargetError { try { val = Primitive.unwrap(val); if ( array instanceof List ) ((List<Object>) array).set(index, val); else ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "void", "setIndex", "(", "Object", "array", ",", "int", "index", ",", "Object", "val", ")", "throws", "ReflectError", ",", "UtilTargetError", "{", "try", "{", "val", "=", "Primitive", "....
Set element value of array or list at index. Array.set for array or List.set for list. @param array to set value for. @param index of the element to set @param val the value to set @throws UtilTargetError wrapped target exceptions
[ "Set", "element", "value", "of", "array", "or", "list", "at", "index", ".", "Array", ".", "set", "for", "array", "or", "List", ".", "set", "for", "list", "." ]
train
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/BshArray.java#L58-L79
apereo/cas
core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/principal/DefaultResponse.java
DefaultResponse.getRedirectResponse
public static Response getRedirectResponse(final String url, final Map<String, String> parameters) { """ Gets the redirect response. @param url the url @param parameters the parameters @return the redirect response """ val builder = new StringBuilder(parameters.size() * RESPONSE_INITIAL_CAP...
java
public static Response getRedirectResponse(final String url, final Map<String, String> parameters) { val builder = new StringBuilder(parameters.size() * RESPONSE_INITIAL_CAPACITY); val sanitizedUrl = sanitizeUrl(url); LOGGER.debug("Sanitized URL for redirect response is [{}]", sanitizedUrl); ...
[ "public", "static", "Response", "getRedirectResponse", "(", "final", "String", "url", ",", "final", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "val", "builder", "=", "new", "StringBuilder", "(", "parameters", ".", "size", "(", ")", "...
Gets the redirect response. @param url the url @param parameters the parameters @return the redirect response
[ "Gets", "the", "redirect", "response", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/principal/DefaultResponse.java#L71-L99
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java
ZeroMQNetworkService.firePeerDisconnected
protected void firePeerDisconnected(URI peerURI, SpaceID space) { """ Notifies that a peer space was disconnected. @param peerURI - the URI of the peer that was disconnected to. @param space - the identifier of the disconnected space. """ final NetworkServiceListener[] ilisteners; synchro...
java
protected void firePeerDisconnected(URI peerURI, SpaceID space) { final NetworkServiceListener[] ilisteners; synchronized (this.listeners) { ilisteners = new NetworkServiceListener[this.listeners.size()]; this.listeners.toArray(ilisteners); } for (final NetworkSer...
[ "protected", "void", "firePeerDisconnected", "(", "URI", "peerURI", ",", "SpaceID", "space", ")", "{", "final", "NetworkServiceListener", "[", "]", "ilisteners", ";", "synchronized", "(", "this", ".", "listeners", ")", "{", "ilisteners", "=", "new", "NetworkServ...
Notifies that a peer space was disconnected. @param peerURI - the URI of the peer that was disconnected to. @param space - the identifier of the disconnected space.
[ "Notifies", "that", "a", "peer", "space", "was", "disconnected", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java#L204-L213
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.doConfigure
public void doConfigure(final InputStream inputStream, LoggerRepository repository) throws FactoryConfigurationError { """ Configure log4j by reading in a log4j.dtd compliant XML configuration file. """ ParseAction action = new ParseAction() { publi...
java
public void doConfigure(final InputStream inputStream, LoggerRepository repository) throws FactoryConfigurationError { ParseAction action = new ParseAction() { public Document parse(final DocumentBuilder parser) throws SAXException, IOException { ...
[ "public", "void", "doConfigure", "(", "final", "InputStream", "inputStream", ",", "LoggerRepository", "repository", ")", "throws", "FactoryConfigurationError", "{", "ParseAction", "action", "=", "new", "ParseAction", "(", ")", "{", "public", "Document", "parse", "("...
Configure log4j by reading in a log4j.dtd compliant XML configuration file.
[ "Configure", "log4j", "by", "reading", "in", "a", "log4j", ".", "dtd", "compliant", "XML", "configuration", "file", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L695-L709
JDBDT/jdbdt
src/main/java/org/jdbdt/JDBDT.java
JDBDT.foreach
private static <T> void foreach(T[] arguments, CallHandler<T> handler, CallInfo callInfo) { """ Utility method to deal with facade methods that accept variable length arguments. @param arguments Argument array. @param handler handler. @param callInfo Call info. @param <T> Type of objects. """ if (argu...
java
private static <T> void foreach(T[] arguments, CallHandler<T> handler, CallInfo callInfo) { if (arguments == null || arguments.length == 0) { throw new InvalidOperationException("Empty or null array!"); } for (T argument : arguments) { handler.action(callInfo, argument); } }
[ "private", "static", "<", "T", ">", "void", "foreach", "(", "T", "[", "]", "arguments", ",", "CallHandler", "<", "T", ">", "handler", ",", "CallInfo", "callInfo", ")", "{", "if", "(", "arguments", "==", "null", "||", "arguments", ".", "length", "==", ...
Utility method to deal with facade methods that accept variable length arguments. @param arguments Argument array. @param handler handler. @param callInfo Call info. @param <T> Type of objects.
[ "Utility", "method", "to", "deal", "with", "facade", "methods", "that", "accept", "variable", "length", "arguments", "." ]
train
https://github.com/JDBDT/jdbdt/blob/7e32845ad41dfbc5d6fd0fd561e3613697186df4/src/main/java/org/jdbdt/JDBDT.java#L1385-L1392
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/svg/inkscape/Util.java
Util.getFloatAttribute
static float getFloatAttribute(Element element, String attr) throws ParsingException { """ Get a floating point attribute that may appear in either the default or SODIPODI namespace @param element The element from which the attribute should be read @param attr The attribute to be read @return The value from ...
java
static float getFloatAttribute(Element element, String attr) throws ParsingException { String cx = element.getAttribute(attr); if ((cx == null) || (cx.equals(""))) { cx = element.getAttributeNS(SODIPODI, attr); } try { return Float.parseFloat(cx); } catch (NumberFormatException e) { throw...
[ "static", "float", "getFloatAttribute", "(", "Element", "element", ",", "String", "attr", ")", "throws", "ParsingException", "{", "String", "cx", "=", "element", ".", "getAttribute", "(", "attr", ")", ";", "if", "(", "(", "cx", "==", "null", ")", "||", "...
Get a floating point attribute that may appear in either the default or SODIPODI namespace @param element The element from which the attribute should be read @param attr The attribute to be read @return The value from the given attribute @throws ParsingException Indicates the value in the attribute was not a float
[ "Get", "a", "floating", "point", "attribute", "that", "may", "appear", "in", "either", "the", "default", "or", "SODIPODI", "namespace" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/svg/inkscape/Util.java#L170-L181
JadiraOrg/jadira
cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java
UnsafeOperations.deepCopyObjectField
public final void deepCopyObjectField(Object source, Object copy, Field field, IdentityHashMap<Object, Object> referencesToReuse) { """ Copies the object of the specified type from the given field in the source object to the same field in the copy, visiting the object during the copy so that its fields are also c...
java
public final void deepCopyObjectField(Object source, Object copy, Field field, IdentityHashMap<Object, Object> referencesToReuse) { deepCopyObjectAtOffset(source, copy, field.getType(), getObjectFieldOffset(field), referencesToReuse); }
[ "public", "final", "void", "deepCopyObjectField", "(", "Object", "source", ",", "Object", "copy", ",", "Field", "field", ",", "IdentityHashMap", "<", "Object", ",", "Object", ">", "referencesToReuse", ")", "{", "deepCopyObjectAtOffset", "(", "source", ",", "copy...
Copies the object of the specified type from the given field in the source object to the same field in the copy, visiting the object during the copy so that its fields are also copied @param source The object to copy from @param copy The target object @param field Field to be copied @param referencesToReuse An identity...
[ "Copies", "the", "object", "of", "the", "specified", "type", "from", "the", "given", "field", "in", "the", "source", "object", "to", "the", "same", "field", "in", "the", "copy", "visiting", "the", "object", "during", "the", "copy", "so", "that", "its", "...
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java#L429-L432
jMotif/SAX
src/main/java/net/seninp/util/HeatChart.java
HeatChart.getChartImage
public Image getChartImage(boolean alpha) { """ Generates and returns a new chart <code>Image</code> configured according to this object's currently held settings. The given parameter determines whether transparency should be enabled for the generated image. <p> No chart will be generated until this or the r...
java
public Image getChartImage(boolean alpha) { // Calculate all unknown dimensions. measureComponents(); updateCoordinates(); // Determine image type based upon whether require alpha or not. // Using BufferedImage.TYPE_INT_ARGB seems to break on jpg. int imageType = (alpha ? BufferedImage.TYPE_4BY...
[ "public", "Image", "getChartImage", "(", "boolean", "alpha", ")", "{", "// Calculate all unknown dimensions.", "measureComponents", "(", ")", ";", "updateCoordinates", "(", ")", ";", "// Determine image type based upon whether require alpha or not.", "// Using BufferedImage.TYPE_...
Generates and returns a new chart <code>Image</code> configured according to this object's currently held settings. The given parameter determines whether transparency should be enabled for the generated image. <p> No chart will be generated until this or the related <code>saveToFile(File)</code> method are called. Al...
[ "Generates", "and", "returns", "a", "new", "chart", "<code", ">", "Image<", "/", "code", ">", "configured", "according", "to", "this", "object", "s", "currently", "held", "settings", ".", "The", "given", "parameter", "determines", "whether", "transparency", "s...
train
https://github.com/jMotif/SAX/blob/39ee07a69facaa330def5130b8790aeda85f1061/src/main/java/net/seninp/util/HeatChart.java#L1225-L1264
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/servlet/MockHttpServletResponse.java
MockHttpServletResponse.setIntHeader
@Override public void setIntHeader(final String name, final int value) { """ Sets an integer header. @param name the header name. @param value the header value. """ headers.put(name, String.valueOf(value)); }
java
@Override public void setIntHeader(final String name, final int value) { headers.put(name, String.valueOf(value)); }
[ "@", "Override", "public", "void", "setIntHeader", "(", "final", "String", "name", ",", "final", "int", "value", ")", "{", "headers", ".", "put", "(", "name", ",", "String", ".", "valueOf", "(", "value", ")", ")", ";", "}" ]
Sets an integer header. @param name the header name. @param value the header value.
[ "Sets", "an", "integer", "header", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/servlet/MockHttpServletResponse.java#L197-L200
io7m/jaffirm
com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Invariants.java
Invariants.checkInvariant
public static <T> T checkInvariant( final T value, final ContractConditionType<T> condition) throws InvariantViolationException { """ <p>Evaluate the given {@code predicate} using {@code value} as input.</p> <p>The function throws {@link InvariantViolationException} if the predicate is false.</p> ...
java
public static <T> T checkInvariant( final T value, final ContractConditionType<T> condition) throws InvariantViolationException { return checkInvariant(value, condition.predicate(), condition.describer()); }
[ "public", "static", "<", "T", ">", "T", "checkInvariant", "(", "final", "T", "value", ",", "final", "ContractConditionType", "<", "T", ">", "condition", ")", "throws", "InvariantViolationException", "{", "return", "checkInvariant", "(", "value", ",", "condition"...
<p>Evaluate the given {@code predicate} using {@code value} as input.</p> <p>The function throws {@link InvariantViolationException} if the predicate is false.</p> @param value The value @param condition The predicate @param <T> The type of values @return value @throws InvariantViolationException If the p...
[ "<p", ">", "Evaluate", "the", "given", "{", "@code", "predicate", "}", "using", "{", "@code", "value", "}", "as", "input", ".", "<", "/", "p", ">" ]
train
https://github.com/io7m/jaffirm/blob/c97d246242d381e48832838737418cfe4cb57b4d/com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Invariants.java#L180-L186
jamesagnew/hapi-fhir
hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/validation/InstanceValidator.java
InstanceValidator.start
private void start(List<ValidationMessage> errors, WrapperElement resource, WrapperElement element, StructureDefinition profile, NodeStack stack) throws FHIRException { """ the instance validator had no issues against the base resource profile """ // profile is valid, and matches the resource name if (...
java
private void start(List<ValidationMessage> errors, WrapperElement resource, WrapperElement element, StructureDefinition profile, NodeStack stack) throws FHIRException { // profile is valid, and matches the resource name if (rule(errors, IssueType.STRUCTURE, element.line(), element.col(), stack.getLiteralPath(),...
[ "private", "void", "start", "(", "List", "<", "ValidationMessage", ">", "errors", ",", "WrapperElement", "resource", ",", "WrapperElement", "element", ",", "StructureDefinition", "profile", ",", "NodeStack", "stack", ")", "throws", "FHIRException", "{", "// profile ...
the instance validator had no issues against the base resource profile
[ "the", "instance", "validator", "had", "no", "issues", "against", "the", "base", "resource", "profile" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/validation/InstanceValidator.java#L1251-L1265
auth0/Auth0.Android
auth0/src/main/java/com/auth0/android/provider/PermissionHandler.java
PermissionHandler.isPermissionGranted
public boolean isPermissionGranted(@NonNull Activity activity, @NonNull String permission) { """ Checks if the given Android Manifest Permission has been granted by the user to this application before. @param activity the caller activity @param permission to check availability for @return true if the Androi...
java
public boolean isPermissionGranted(@NonNull Activity activity, @NonNull String permission) { Log.v(TAG, String.format("Checking if %s permission is granted.", permission)); int result = ContextCompat.checkSelfPermission(activity, permission); return result == PermissionChecker.PERMISSION_GRANTED...
[ "public", "boolean", "isPermissionGranted", "(", "@", "NonNull", "Activity", "activity", ",", "@", "NonNull", "String", "permission", ")", "{", "Log", ".", "v", "(", "TAG", ",", "String", ".", "format", "(", "\"Checking if %s permission is granted.\"", ",", "per...
Checks if the given Android Manifest Permission has been granted by the user to this application before. @param activity the caller activity @param permission to check availability for @return true if the Android Manifest Permission is currently granted, false otherwise.
[ "Checks", "if", "the", "given", "Android", "Manifest", "Permission", "has", "been", "granted", "by", "the", "user", "to", "this", "application", "before", "." ]
train
https://github.com/auth0/Auth0.Android/blob/ee37b7f94d989c1fbab2cb1378c87fdcaf7a8156/auth0/src/main/java/com/auth0/android/provider/PermissionHandler.java#L54-L58
daimajia/AndroidImageSlider
library/src/main/java/com/daimajia/slider/library/Indicators/PagerIndicator.java
PagerIndicator.setDefaultIndicatorColor
public void setDefaultIndicatorColor(int selectedColor,int unselectedColor) { """ if you are using the default indicator , this method will help you to set the selected status and the unselected status color. @param selectedColor @param unselectedColor """ if(mUserSetSelectedIndicatorResId == 0){ ...
java
public void setDefaultIndicatorColor(int selectedColor,int unselectedColor){ if(mUserSetSelectedIndicatorResId == 0){ mSelectedGradientDrawable.setColor(selectedColor); } if(mUserSetUnSelectedIndicatorResId == 0){ mUnSelectedGradientDrawable.setColor(unselectedColor); ...
[ "public", "void", "setDefaultIndicatorColor", "(", "int", "selectedColor", ",", "int", "unselectedColor", ")", "{", "if", "(", "mUserSetSelectedIndicatorResId", "==", "0", ")", "{", "mSelectedGradientDrawable", ".", "setColor", "(", "selectedColor", ")", ";", "}", ...
if you are using the default indicator , this method will help you to set the selected status and the unselected status color. @param selectedColor @param unselectedColor
[ "if", "you", "are", "using", "the", "default", "indicator", "this", "method", "will", "help", "you", "to", "set", "the", "selected", "status", "and", "the", "unselected", "status", "color", "." ]
train
https://github.com/daimajia/AndroidImageSlider/blob/e318cabdef668de985efdcc45ca304e2ac6f58b5/library/src/main/java/com/daimajia/slider/library/Indicators/PagerIndicator.java#L239-L247
molgenis/molgenis
molgenis-navigator/src/main/java/org/molgenis/navigator/copy/service/EntityTypeCopier.java
EntityTypeCopier.assignUniqueLabel
private EntityType assignUniqueLabel(EntityType entityType, CopyState state) { """ Checks if there's an EntityType in the target location with the same label. If so, keeps adding a postfix until the label is unique. """ Set<String> existingLabels; Package targetPackage = state.targetPackage(); if ...
java
private EntityType assignUniqueLabel(EntityType entityType, CopyState state) { Set<String> existingLabels; Package targetPackage = state.targetPackage(); if (targetPackage != null) { existingLabels = stream(targetPackage.getEntityTypes()).map(EntityType::getLabel).collect(toSet()); } els...
[ "private", "EntityType", "assignUniqueLabel", "(", "EntityType", "entityType", ",", "CopyState", "state", ")", "{", "Set", "<", "String", ">", "existingLabels", ";", "Package", "targetPackage", "=", "state", ".", "targetPackage", "(", ")", ";", "if", "(", "tar...
Checks if there's an EntityType in the target location with the same label. If so, keeps adding a postfix until the label is unique.
[ "Checks", "if", "there", "s", "an", "EntityType", "in", "the", "target", "location", "with", "the", "same", "label", ".", "If", "so", "keeps", "adding", "a", "postfix", "until", "the", "label", "is", "unique", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-navigator/src/main/java/org/molgenis/navigator/copy/service/EntityTypeCopier.java#L103-L120
Esri/geometry-api-java
src/main/java/com/esri/core/geometry/Transformation2D.java
Transformation2D.setRotate
void setRotate(double cosA, double sinA, Point2D rotationCenter) { """ Sets this transformation to be a rotation around point rotationCenter. When the axis Y is directed up and X is directed to the right, the positive angle corresponds to the anti-clockwise rotation. When the axis Y is directed down and X is ...
java
void setRotate(double cosA, double sinA, Point2D rotationCenter) { setShift(-rotationCenter.x, -rotationCenter.y); Transformation2D temp = new Transformation2D(); temp.setRotate(cosA, sinA); multiply(temp); shift(rotationCenter.x, rotationCenter.y); }
[ "void", "setRotate", "(", "double", "cosA", ",", "double", "sinA", ",", "Point2D", "rotationCenter", ")", "{", "setShift", "(", "-", "rotationCenter", ".", "x", ",", "-", "rotationCenter", ".", "y", ")", ";", "Transformation2D", "temp", "=", "new", "Transf...
Sets this transformation to be a rotation around point rotationCenter. When the axis Y is directed up and X is directed to the right, the positive angle corresponds to the anti-clockwise rotation. When the axis Y is directed down and X is directed to the right, the positive angle corresponds to the clockwise rotation....
[ "Sets", "this", "transformation", "to", "be", "a", "rotation", "around", "point", "rotationCenter", "." ]
train
https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/Transformation2D.java#L752-L758
gallandarakhneorg/afc
core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d2/Transform2D.java
Transform2D.makeTranslationMatrix
public void makeTranslationMatrix(double dx, double dy) { """ Sets the value of this matrix to the given translation, without rotation. <p>This function changes all the elements of the matrix including the scaling and the shearing. <p>After a call to this function, the matrix will contains (? means any val...
java
public void makeTranslationMatrix(double dx, double dy) { this.m00 = 1.; this.m01 = 0.; this.m02 = dx; this.m10 = 0.; this.m11 = 1.; this.m12 = dy; this.m20 = 0.; this.m21 = 0.; this.m22 = 1.; }
[ "public", "void", "makeTranslationMatrix", "(", "double", "dx", ",", "double", "dy", ")", "{", "this", ".", "m00", "=", "1.", ";", "this", ".", "m01", "=", "0.", ";", "this", ".", "m02", "=", "dx", ";", "this", ".", "m10", "=", "0.", ";", "this",...
Sets the value of this matrix to the given translation, without rotation. <p>This function changes all the elements of the matrix including the scaling and the shearing. <p>After a call to this function, the matrix will contains (? means any value): <pre> [ 1 0 x ] [ 0 1 y ] [ 0 0 1 ] </...
[ "Sets", "the", "value", "of", "this", "matrix", "to", "the", "given", "translation", "without", "rotation", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d2/Transform2D.java#L605-L617
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/EncryptedPrivateKeyReader.java
EncryptedPrivateKeyReader.getKeyPair
public static KeyPair getKeyPair(final File encryptedPrivateKeyFile, final String password) throws FileNotFoundException, IOException, PEMException { """ Reads from the given {@link File} that contains the password protected {@link KeyPair} and returns it @param encryptedPrivateKeyFile the file that contain...
java
public static KeyPair getKeyPair(final File encryptedPrivateKeyFile, final String password) throws FileNotFoundException, IOException, PEMException { PEMParser pemParser = new PEMParser(new FileReader(encryptedPrivateKeyFile)); Object pemObject = pemParser.readObject(); pemParser.close(); JcaPEMKeyConverter...
[ "public", "static", "KeyPair", "getKeyPair", "(", "final", "File", "encryptedPrivateKeyFile", ",", "final", "String", "password", ")", "throws", "FileNotFoundException", ",", "IOException", ",", "PEMException", "{", "PEMParser", "pemParser", "=", "new", "PEMParser", ...
Reads from the given {@link File} that contains the password protected {@link KeyPair} and returns it @param encryptedPrivateKeyFile the file that contains the password protected {@link KeyPair} @param password the password @return the key pair @throws FileNotFoundException is thrown if the file did not found @throws ...
[ "Reads", "from", "the", "given", "{", "@link", "File", "}", "that", "contains", "the", "password", "protected", "{", "@link", "KeyPair", "}", "and", "returns", "it" ]
train
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/EncryptedPrivateKeyReader.java#L177-L199
trajano/caliper
caliper/src/main/java/com/google/caliper/options/CommandLineParser.java
CommandLineParser.parseShortOptions
private void parseShortOptions(String arg, Iterator<String> args) throws InvalidCommandException { """ (But not -abf=out.txt --- POSIX doesn't mention that either way, but GNU expressly forbids it.) """ for (int i = 1; i < arg.length(); ++i) { String name = "-" + arg.charAt(i); InjectableOption...
java
private void parseShortOptions(String arg, Iterator<String> args) throws InvalidCommandException { for (int i = 1; i < arg.length(); ++i) { String name = "-" + arg.charAt(i); InjectableOption injectable = injectionMap.getInjectableOption(name); String value; if (injectable.isBoolean()) { ...
[ "private", "void", "parseShortOptions", "(", "String", "arg", ",", "Iterator", "<", "String", ">", "args", ")", "throws", "InvalidCommandException", "{", "for", "(", "int", "i", "=", "1", ";", "i", "<", "arg", ".", "length", "(", ")", ";", "++", "i", ...
(But not -abf=out.txt --- POSIX doesn't mention that either way, but GNU expressly forbids it.)
[ "(", "But", "not", "-", "abf", "=", "out", ".", "txt", "---", "POSIX", "doesn", "t", "mention", "that", "either", "way", "but", "GNU", "expressly", "forbids", "it", ".", ")" ]
train
https://github.com/trajano/caliper/blob/a8bcfd84fa9d7b893b3edfadc3b13240ae5cd658/caliper/src/main/java/com/google/caliper/options/CommandLineParser.java#L395-L416
linkedin/PalDB
paldb/src/main/java/com/linkedin/paldb/utils/LongPacker.java
LongPacker.packLong
static public int packLong(byte[] ba, long value) throws IOException { """ Pack non-negative long into byte array. It will occupy 1-10 bytes depending on value (lower values occupy smaller space) @param ba the byte array @param value the long value @return the number of bytes written @throws IOExcepti...
java
static public int packLong(byte[] ba, long value) throws IOException { if (value < 0) { throw new IllegalArgumentException("negative value: v=" + value); } int i = 1; while ((value & ~0x7FL) != 0) { ba[i - 1] = (byte) (((int) value & 0x7F) | 0x80); value >>>= 7; i++; ...
[ "static", "public", "int", "packLong", "(", "byte", "[", "]", "ba", ",", "long", "value", ")", "throws", "IOException", "{", "if", "(", "value", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"negative value: v=\"", "+", "value", ")...
Pack non-negative long into byte array. It will occupy 1-10 bytes depending on value (lower values occupy smaller space) @param ba the byte array @param value the long value @return the number of bytes written @throws IOException if an error occurs with the stream
[ "Pack", "non", "-", "negative", "long", "into", "byte", "array", ".", "It", "will", "occupy", "1", "-", "10", "bytes", "depending", "on", "value", "(", "lower", "values", "occupy", "smaller", "space", ")" ]
train
https://github.com/linkedin/PalDB/blob/d05ccdd3f67855eb2675dbd82599f19aa7a9f650/paldb/src/main/java/com/linkedin/paldb/utils/LongPacker.java#L71-L86
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/GeneSequence.java
GeneSequence.addTranscript
public TranscriptSequence addTranscript(AccessionID accession, int begin, int end) throws Exception { """ Add a transcription sequence to a gene which describes a ProteinSequence @param accession @param begin @param end @return transcript sequence @throws Exception If the accession id is already used """ ...
java
public TranscriptSequence addTranscript(AccessionID accession, int begin, int end) throws Exception { if (transcriptSequenceHashMap.containsKey(accession.getID())) { throw new Exception("Duplicate accesion id " + accession.getID()); } TranscriptSequence transcriptSequence = new TranscriptSequence(this, begin, ...
[ "public", "TranscriptSequence", "addTranscript", "(", "AccessionID", "accession", ",", "int", "begin", ",", "int", "end", ")", "throws", "Exception", "{", "if", "(", "transcriptSequenceHashMap", ".", "containsKey", "(", "accession", ".", "getID", "(", ")", ")", ...
Add a transcription sequence to a gene which describes a ProteinSequence @param accession @param begin @param end @return transcript sequence @throws Exception If the accession id is already used
[ "Add", "a", "transcription", "sequence", "to", "a", "gene", "which", "describes", "a", "ProteinSequence" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/GeneSequence.java#L184-L192
jenkinsci/jenkins
core/src/main/java/hudson/security/ACL.java
ACL.hasPermission
public final boolean hasPermission(@Nonnull Permission p) { """ Checks if the current security principal has this permission. @return false if the user doesn't have the permission. """ Authentication a = Jenkins.getAuthentication(); if (a == SYSTEM) { return true; } ...
java
public final boolean hasPermission(@Nonnull Permission p) { Authentication a = Jenkins.getAuthentication(); if (a == SYSTEM) { return true; } return hasPermission(a, p); }
[ "public", "final", "boolean", "hasPermission", "(", "@", "Nonnull", "Permission", "p", ")", "{", "Authentication", "a", "=", "Jenkins", ".", "getAuthentication", "(", ")", ";", "if", "(", "a", "==", "SYSTEM", ")", "{", "return", "true", ";", "}", "return...
Checks if the current security principal has this permission. @return false if the user doesn't have the permission.
[ "Checks", "if", "the", "current", "security", "principal", "has", "this", "permission", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/security/ACL.java#L82-L88
RestComm/media-core
client/mgcp/driver/src/main/java/org/restcomm/media/client/mgcp/handlers/TransactionHandler.java
TransactionHandler.receiveResponse
public void receiveResponse(byte[] data,SplitDetails[] msg,Integer txID,ReturnCode returnCode) { """ Used by stack for relaying received MGCP response messages to the application. @param message receive MGCP response message. """ cancelReTransmissionTimer(); cancelLongtranTimer(); JainMgcpResponseEve...
java
public void receiveResponse(byte[] data,SplitDetails[] msg,Integer txID,ReturnCode returnCode) { cancelReTransmissionTimer(); cancelLongtranTimer(); JainMgcpResponseEvent event = null; try { event = decodeResponse(data,msg,txID,returnCode); } catch (Exception e) { logger.error("Could not dec...
[ "public", "void", "receiveResponse", "(", "byte", "[", "]", "data", ",", "SplitDetails", "[", "]", "msg", ",", "Integer", "txID", ",", "ReturnCode", "returnCode", ")", "{", "cancelReTransmissionTimer", "(", ")", ";", "cancelLongtranTimer", "(", ")", ";", "Ja...
Used by stack for relaying received MGCP response messages to the application. @param message receive MGCP response message.
[ "Used", "by", "stack", "for", "relaying", "received", "MGCP", "response", "messages", "to", "the", "application", "." ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/client/mgcp/driver/src/main/java/org/restcomm/media/client/mgcp/handlers/TransactionHandler.java#L636-L659
JodaOrg/joda-convert
src/main/java/org/joda/convert/StringConvert.java
StringConvert.registerMethods
public <T> void registerMethods(final Class<T> cls, String toStringMethodName, String fromStringMethodName) { """ Registers a converter for a specific type by method names. <p> This method allows the converter to be used when the target class cannot have annotations added. The two method names must obey the sam...
java
public <T> void registerMethods(final Class<T> cls, String toStringMethodName, String fromStringMethodName) { if (cls == null) { throw new IllegalArgumentException("Class must not be null"); } if (toStringMethodName == null || fromStringMethodName == null) { throw ne...
[ "public", "<", "T", ">", "void", "registerMethods", "(", "final", "Class", "<", "T", ">", "cls", ",", "String", "toStringMethodName", ",", "String", "fromStringMethodName", ")", "{", "if", "(", "cls", "==", "null", ")", "{", "throw", "new", "IllegalArgumen...
Registers a converter for a specific type by method names. <p> This method allows the converter to be used when the target class cannot have annotations added. The two method names must obey the same rules as defined by the annotations {@link ToString} and {@link FromString}. The converter will be used for subclasses u...
[ "Registers", "a", "converter", "for", "a", "specific", "type", "by", "method", "names", ".", "<p", ">", "This", "method", "allows", "the", "converter", "to", "be", "used", "when", "the", "target", "class", "cannot", "have", "annotations", "added", ".", "Th...
train
https://github.com/JodaOrg/joda-convert/blob/266bd825f4550590d5dafdf4225c548559e0633b/src/main/java/org/joda/convert/StringConvert.java#L739-L753
alkacon/opencms-core
src/org/opencms/ugc/CmsUgcSessionFactory.java
CmsUgcSessionFactory.createSession
public CmsUgcSession createSession(CmsObject cms, HttpServletRequest request, CmsUgcConfiguration config) throws CmsUgcException { """ Creates a new editing session.<p> @param cms the cms context @param request the request @param config the configuration @return the form session @throws CmsUgcExcept...
java
public CmsUgcSession createSession(CmsObject cms, HttpServletRequest request, CmsUgcConfiguration config) throws CmsUgcException { CmsUgcSession session = createSession(cms, config); HttpSession httpSession = request.getSession(true); httpSession.setAttribute("" + session.getId(), session);...
[ "public", "CmsUgcSession", "createSession", "(", "CmsObject", "cms", ",", "HttpServletRequest", "request", ",", "CmsUgcConfiguration", "config", ")", "throws", "CmsUgcException", "{", "CmsUgcSession", "session", "=", "createSession", "(", "cms", ",", "config", ")", ...
Creates a new editing session.<p> @param cms the cms context @param request the request @param config the configuration @return the form session @throws CmsUgcException if creating the session fails
[ "Creates", "a", "new", "editing", "session", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ugc/CmsUgcSessionFactory.java#L103-L110
wwadge/bonecp
bonecp/src/main/java/com/jolbox/bonecp/BoneCPConfig.java
BoneCPConfig.setCloseConnectionWatchTimeout
public void setCloseConnectionWatchTimeout(long closeConnectionWatchTimeout, TimeUnit timeUnit) { """ Sets the time to wait when close connection watch threads are enabled. 0 = wait forever. @param closeConnectionWatchTimeout the watchTimeout to set @param timeUnit Time granularity """ this.closeConnection...
java
public void setCloseConnectionWatchTimeout(long closeConnectionWatchTimeout, TimeUnit timeUnit) { this.closeConnectionWatchTimeoutInMs = TimeUnit.MILLISECONDS.convert(closeConnectionWatchTimeout, timeUnit); }
[ "public", "void", "setCloseConnectionWatchTimeout", "(", "long", "closeConnectionWatchTimeout", ",", "TimeUnit", "timeUnit", ")", "{", "this", ".", "closeConnectionWatchTimeoutInMs", "=", "TimeUnit", ".", "MILLISECONDS", ".", "convert", "(", "closeConnectionWatchTimeout", ...
Sets the time to wait when close connection watch threads are enabled. 0 = wait forever. @param closeConnectionWatchTimeout the watchTimeout to set @param timeUnit Time granularity
[ "Sets", "the", "time", "to", "wait", "when", "close", "connection", "watch", "threads", "are", "enabled", ".", "0", "=", "wait", "forever", "." ]
train
https://github.com/wwadge/bonecp/blob/74bc3287025fc137ca28909f0f7693edae37a15d/bonecp/src/main/java/com/jolbox/bonecp/BoneCPConfig.java#L1106-L1108
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/Model.java
Model.convertDate
@Deprecated protected static ValidationBuilder convertDate(String attributeName, String format) { """ Converts a named attribute to <code>java.sql.Date</code> if possible. Acts as a validator if cannot make a conversion. @param attributeName name of attribute to convert to <code>java.sql.Date</code>. @par...
java
@Deprecated protected static ValidationBuilder convertDate(String attributeName, String format){ return ModelDelegate.convertDate(modelClass(), attributeName, format); }
[ "@", "Deprecated", "protected", "static", "ValidationBuilder", "convertDate", "(", "String", "attributeName", ",", "String", "format", ")", "{", "return", "ModelDelegate", ".", "convertDate", "(", "modelClass", "(", ")", ",", "attributeName", ",", "format", ")", ...
Converts a named attribute to <code>java.sql.Date</code> if possible. Acts as a validator if cannot make a conversion. @param attributeName name of attribute to convert to <code>java.sql.Date</code>. @param format format for conversion. Refer to {@link java.text.SimpleDateFormat} @return message passing for custom val...
[ "Converts", "a", "named", "attribute", "to", "<code", ">", "java", ".", "sql", ".", "Date<", "/", "code", ">", "if", "possible", ".", "Acts", "as", "a", "validator", "if", "cannot", "make", "a", "conversion", "." ]
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Model.java#L2080-L2083
meltmedia/cadmium
cli/src/main/java/com/meltmedia/cadmium/cli/WarInfoCommand.java
WarInfoCommand.getDeployedWarInfo
public static WarInfo getDeployedWarInfo(String url, String warName, String token) throws Exception { """ Retrieves information about a deployed cadmium war. @param url The uri to a Cadmium deployer war. @param warName The name of a deployed war. @param token The Github API token used for authentication. @re...
java
public static WarInfo getDeployedWarInfo(String url, String warName, String token) throws Exception { HttpClient client = httpClient(); HttpGet get = new HttpGet(url + "/system/deployment/details/"+warName); addAuthHeader(token, get); HttpResponse resp = client.execute(get); if(resp.g...
[ "public", "static", "WarInfo", "getDeployedWarInfo", "(", "String", "url", ",", "String", "warName", ",", "String", "token", ")", "throws", "Exception", "{", "HttpClient", "client", "=", "httpClient", "(", ")", ";", "HttpGet", "get", "=", "new", "HttpGet", "...
Retrieves information about a deployed cadmium war. @param url The uri to a Cadmium deployer war. @param warName The name of a deployed war. @param token The Github API token used for authentication. @return @throws Exception
[ "Retrieves", "information", "about", "a", "deployed", "cadmium", "war", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/cli/src/main/java/com/meltmedia/cadmium/cli/WarInfoCommand.java#L102-L116
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.isResponsible
@SuppressWarnings("static-method") protected boolean isResponsible(Map<Object, Object> context, EObject eObject) { """ Replies if the validator is responsible to validate the given object. @param context the context. @param eObject the validated object. @return {@code true} if the validator could be run. ...
java
@SuppressWarnings("static-method") protected boolean isResponsible(Map<Object, Object> context, EObject eObject) { // Skip the validation of an feature call if one of its container was validated previously if (eObject instanceof XMemberFeatureCall || eObject instanceof XFeatureCall) { final XAbstractFeatureCall...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "boolean", "isResponsible", "(", "Map", "<", "Object", ",", "Object", ">", "context", ",", "EObject", "eObject", ")", "{", "// Skip the validation of an feature call if one of its container was validated p...
Replies if the validator is responsible to validate the given object. @param context the context. @param eObject the validated object. @return {@code true} if the validator could be run.
[ "Replies", "if", "the", "validator", "is", "responsible", "to", "validate", "the", "given", "object", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L245-L253
nats-io/java-nats
src/main/java/io/nats/client/NKey.java
NKey.createCluster
public static NKey createCluster(SecureRandom random) throws IOException, NoSuchProviderException, NoSuchAlgorithmException { """ Create an Cluster NKey from the provided random number generator. If no random is provided, SecureRandom.getInstance("SHA1PRNG", "SUN") will be used to creat eone. The...
java
public static NKey createCluster(SecureRandom random) throws IOException, NoSuchProviderException, NoSuchAlgorithmException { return createPair(Type.CLUSTER, random); }
[ "public", "static", "NKey", "createCluster", "(", "SecureRandom", "random", ")", "throws", "IOException", ",", "NoSuchProviderException", ",", "NoSuchAlgorithmException", "{", "return", "createPair", "(", "Type", ".", "CLUSTER", ",", "random", ")", ";", "}" ]
Create an Cluster NKey from the provided random number generator. If no random is provided, SecureRandom.getInstance("SHA1PRNG", "SUN") will be used to creat eone. The new NKey contains the private seed, which should be saved in a secure location. @param random A secure random provider @return the new Nkey @throws I...
[ "Create", "an", "Cluster", "NKey", "from", "the", "provided", "random", "number", "generator", "." ]
train
https://github.com/nats-io/java-nats/blob/5f291048fd30192ba39b3fe2925ecd60aaad6b48/src/main/java/io/nats/client/NKey.java#L497-L500
OpenLiberty/open-liberty
dev/com.ibm.ws.jca.cm/src/com/ibm/ws/jca/cm/JcaServiceUtilities.java
JcaServiceUtilities.endContextClassLoader
public void endContextClassLoader(ClassLoader raClassLoader, ClassLoader previousClassLoader) { """ Restore current context class loader saved when the context class loader was set to the one for the resource adapter. @param raClassLoader @param previousClassLoader """ if (raClassLoader != null) {...
java
public void endContextClassLoader(ClassLoader raClassLoader, ClassLoader previousClassLoader) { if (raClassLoader != null) { AccessController.doPrivileged(new GetAndSetContextClassLoader(previousClassLoader)); } }
[ "public", "void", "endContextClassLoader", "(", "ClassLoader", "raClassLoader", ",", "ClassLoader", "previousClassLoader", ")", "{", "if", "(", "raClassLoader", "!=", "null", ")", "{", "AccessController", ".", "doPrivileged", "(", "new", "GetAndSetContextClassLoader", ...
Restore current context class loader saved when the context class loader was set to the one for the resource adapter. @param raClassLoader @param previousClassLoader
[ "Restore", "current", "context", "class", "loader", "saved", "when", "the", "context", "class", "loader", "was", "set", "to", "the", "one", "for", "the", "resource", "adapter", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.cm/src/com/ibm/ws/jca/cm/JcaServiceUtilities.java#L37-L41
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsUtils.java
CommsUtils.getRuntimeDoubleProperty
public static double getRuntimeDoubleProperty(String property, String defaultValue) { """ This method will get a runtime property from the sib.properties file and will convert the value (if set) to an double. If the property in the file was set to something that was not parseable as an double, then the default v...
java
public static double getRuntimeDoubleProperty(String property, String defaultValue) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getRuntimeDoubleProperty", new Object[] {property, defaultValue}); // Note that we parse the default value outside of the try / ca...
[ "public", "static", "double", "getRuntimeDoubleProperty", "(", "String", "property", ",", "String", "defaultValue", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "en...
This method will get a runtime property from the sib.properties file and will convert the value (if set) to an double. If the property in the file was set to something that was not parseable as an double, then the default value will be returned. @param property The property key used to look up in the file. @param defa...
[ "This", "method", "will", "get", "a", "runtime", "property", "from", "the", "sib", ".", "properties", "file", "and", "will", "convert", "the", "value", "(", "if", "set", ")", "to", "an", "double", ".", "If", "the", "property", "in", "the", "file", "was...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsUtils.java#L131-L154
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/util/ClassInfo.java
ClassInfo.of
public static ClassInfo of(Class<?> underlyingClass, boolean ignoreCase) { """ Returns the class information for the given underlying class. @param underlyingClass underlying class or {@code null} for {@code null} result @param ignoreCase whether field names are case sensitive @return class information or {@c...
java
public static ClassInfo of(Class<?> underlyingClass, boolean ignoreCase) { if (underlyingClass == null) { return null; } final Map<Class<?>, ClassInfo> cache = ignoreCase ? CACHE_IGNORE_CASE : CACHE; ClassInfo classInfo; synchronized (cache) { classInfo = cache.get(underlyingClass); ...
[ "public", "static", "ClassInfo", "of", "(", "Class", "<", "?", ">", "underlyingClass", ",", "boolean", "ignoreCase", ")", "{", "if", "(", "underlyingClass", "==", "null", ")", "{", "return", "null", ";", "}", "final", "Map", "<", "Class", "<", "?", ">"...
Returns the class information for the given underlying class. @param underlyingClass underlying class or {@code null} for {@code null} result @param ignoreCase whether field names are case sensitive @return class information or {@code null} for {@code null} input @since 1.10
[ "Returns", "the", "class", "information", "for", "the", "given", "underlying", "class", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/ClassInfo.java#L80-L94
apache/groovy
subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/GPathResult.java
GPathResult.setMetaClass
@Override public void setMetaClass(final MetaClass metaClass) { """ Replaces the MetaClass of this GPathResult. @param metaClass the new MetaClass """ final MetaClass newMetaClass = new DelegatingMetaClass(metaClass) { @Override public Object getAttribute(final Object obj...
java
@Override public void setMetaClass(final MetaClass metaClass) { final MetaClass newMetaClass = new DelegatingMetaClass(metaClass) { @Override public Object getAttribute(final Object object, final String attribute) { return GPathResult.this.getProperty("@" + attribute)...
[ "@", "Override", "public", "void", "setMetaClass", "(", "final", "MetaClass", "metaClass", ")", "{", "final", "MetaClass", "newMetaClass", "=", "new", "DelegatingMetaClass", "(", "metaClass", ")", "{", "@", "Override", "public", "Object", "getAttribute", "(", "f...
Replaces the MetaClass of this GPathResult. @param metaClass the new MetaClass
[ "Replaces", "the", "MetaClass", "of", "this", "GPathResult", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/GPathResult.java#L89-L103
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java
WeightVectors.readFromResourcesInJMetal
public static double[][] readFromResourcesInJMetal(String filePath) { """ Read a set of weight vector from a file in the resources folder in jMetal @param filePath The name of file in the resources folder of jMetal @return A set of weight vectors """ double[][] weights; Vector<double[]> listOfWeights ...
java
public static double[][] readFromResourcesInJMetal(String filePath) { double[][] weights; Vector<double[]> listOfWeights = new Vector<>(); try { InputStream in = WeightVectors.class.getResourceAsStream("/" + filePath); InputStreamReader isr = new InputStreamReader(in); BufferedReader br = new BufferedR...
[ "public", "static", "double", "[", "]", "[", "]", "readFromResourcesInJMetal", "(", "String", "filePath", ")", "{", "double", "[", "]", "[", "]", "weights", ";", "Vector", "<", "double", "[", "]", ">", "listOfWeights", "=", "new", "Vector", "<>", "(", ...
Read a set of weight vector from a file in the resources folder in jMetal @param filePath The name of file in the resources folder of jMetal @return A set of weight vectors
[ "Read", "a", "set", "of", "weight", "vector", "from", "a", "file", "in", "the", "resources", "folder", "in", "jMetal" ]
train
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java#L76-L114
osmdroid/osmdroid
osmdroid-android/src/main/java/org/osmdroid/views/Projection.java
Projection.toProjectedPixels
public PointL toProjectedPixels(final GeoPoint geoPoint, final PointL reuse) { """ A wrapper for {@link #toProjectedPixels(double, double, PointL)} """ return toProjectedPixels(geoPoint.getLatitude(), geoPoint.getLongitude(), reuse); }
java
public PointL toProjectedPixels(final GeoPoint geoPoint, final PointL reuse) { return toProjectedPixels(geoPoint.getLatitude(), geoPoint.getLongitude(), reuse); }
[ "public", "PointL", "toProjectedPixels", "(", "final", "GeoPoint", "geoPoint", ",", "final", "PointL", "reuse", ")", "{", "return", "toProjectedPixels", "(", "geoPoint", ".", "getLatitude", "(", ")", ",", "geoPoint", ".", "getLongitude", "(", ")", ",", "reuse"...
A wrapper for {@link #toProjectedPixels(double, double, PointL)}
[ "A", "wrapper", "for", "{" ]
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/views/Projection.java#L235-L237
stratosphere/stratosphere
stratosphere-compiler/src/main/java/eu/stratosphere/compiler/contextcheck/ContextChecker.java
ContextChecker.checkSingleInputContract
private void checkSingleInputContract(SingleInputOperator<?, ?, ?> singleInputContract) { """ Checks whether a SingleInputOperator is correctly connected. In case that the contract is incorrectly connected a RuntimeException is thrown. @param singleInputContract SingleInputOperator that is checked. """ ...
java
private void checkSingleInputContract(SingleInputOperator<?, ?, ?> singleInputContract) { Operator<?> input = singleInputContract.getInput(); // check if input exists if (input == null) { throw new MissingChildException(); } }
[ "private", "void", "checkSingleInputContract", "(", "SingleInputOperator", "<", "?", ",", "?", ",", "?", ">", "singleInputContract", ")", "{", "Operator", "<", "?", ">", "input", "=", "singleInputContract", ".", "getInput", "(", ")", ";", "// check if input exis...
Checks whether a SingleInputOperator is correctly connected. In case that the contract is incorrectly connected a RuntimeException is thrown. @param singleInputContract SingleInputOperator that is checked.
[ "Checks", "whether", "a", "SingleInputOperator", "is", "correctly", "connected", ".", "In", "case", "that", "the", "contract", "is", "incorrectly", "connected", "a", "RuntimeException", "is", "thrown", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-compiler/src/main/java/eu/stratosphere/compiler/contextcheck/ContextChecker.java#L177-L183
coursera/courier
generator-api/src/main/java/org/coursera/courier/api/FileFormatDataSchemaParser.java
FileFormatDataSchemaParser.parseFile
private void parseFile(File schemaSourceFile, CourierParseResult result) throws IOException { """ Parse a source that specifies a file (not a fully qualified schema name). @param schemaSourceFile provides the source file. @param result {@link ParseResult} to update. @throws IOException if there is a...
java
private void parseFile(File schemaSourceFile, CourierParseResult result) throws IOException { if (wasResolved(schemaSourceFile)) { return; } final List<DataSchema> schemas = parseSchema(schemaSourceFile, result); for (DataSchema schema : schemas) { validateSchemaWithFilePat...
[ "private", "void", "parseFile", "(", "File", "schemaSourceFile", ",", "CourierParseResult", "result", ")", "throws", "IOException", "{", "if", "(", "wasResolved", "(", "schemaSourceFile", ")", ")", "{", "return", ";", "}", "final", "List", "<", "DataSchema", "...
Parse a source that specifies a file (not a fully qualified schema name). @param schemaSourceFile provides the source file. @param result {@link ParseResult} to update. @throws IOException if there is a file access error.
[ "Parse", "a", "source", "that", "specifies", "a", "file", "(", "not", "a", "fully", "qualified", "schema", "name", ")", "." ]
train
https://github.com/coursera/courier/blob/749674fa7ee33804ad11b6c8ecb560f455cb4c22/generator-api/src/main/java/org/coursera/courier/api/FileFormatDataSchemaParser.java#L174-L190
apache/flink
flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/datastream/PythonKeyedStream.java
PythonKeyedStream.count_window
public PythonWindowedStream count_window(long size, long slide) { """ A thin wrapper layer over {@link KeyedStream#countWindow(long, long)}. @param size The size of the windows in number of elements. @param slide The slide interval in number of elements. @return The python windowed stream {@link PythonWindowe...
java
public PythonWindowedStream count_window(long size, long slide) { return new PythonWindowedStream<GlobalWindow>(this.stream.countWindow(size, slide)); }
[ "public", "PythonWindowedStream", "count_window", "(", "long", "size", ",", "long", "slide", ")", "{", "return", "new", "PythonWindowedStream", "<", "GlobalWindow", ">", "(", "this", ".", "stream", ".", "countWindow", "(", "size", ",", "slide", ")", ")", ";"...
A thin wrapper layer over {@link KeyedStream#countWindow(long, long)}. @param size The size of the windows in number of elements. @param slide The slide interval in number of elements. @return The python windowed stream {@link PythonWindowedStream}
[ "A", "thin", "wrapper", "layer", "over", "{", "@link", "KeyedStream#countWindow", "(", "long", "long", ")", "}", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/datastream/PythonKeyedStream.java#L54-L56
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/ocr/AipOcr.java
AipOcr.basicGeneral
public JSONObject basicGeneral(byte[] image, HashMap<String, String> options) { """ 通用文字识别接口 用户向服务请求识别某张图中的所有文字 @param image - 二进制图像数据 @param options - 可选参数对象,key: value都为string类型 options - options列表: language_type 识别语言类型,默认为CHN_ENG。可选值包括:<br>- CHN_ENG:中英文混合;<br>- ENG:英文;<br>- POR:葡萄牙语;<br>- FRE:法语;<br>- GE...
java
public JSONObject basicGeneral(byte[] image, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); String base64Content = Base64Util.encode(image); request.addBody("image", base64Content); if (options != null) { requ...
[ "public", "JSONObject", "basicGeneral", "(", "byte", "[", "]", "image", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest", "(", ")", ";", "preOperation", "(", "request", ")", ";", "S...
通用文字识别接口 用户向服务请求识别某张图中的所有文字 @param image - 二进制图像数据 @param options - 可选参数对象,key: value都为string类型 options - options列表: language_type 识别语言类型,默认为CHN_ENG。可选值包括:<br>- CHN_ENG:中英文混合;<br>- ENG:英文;<br>- POR:葡萄牙语;<br>- FRE:法语;<br>- GER:德语;<br>- ITA:意大利语;<br>- SPA:西班牙语;<br>- RUS:俄语;<br>- JAP:日语;<br>- KOR:韩语; detect_direction 是否检...
[ "通用文字识别接口", "用户向服务请求识别某张图中的所有文字" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/ocr/AipOcr.java#L46-L58
rzwitserloot/lombok
src/delombok/lombok/delombok/FormatPreferenceScanner.java
FormatPreferenceScanner.tryEasy
private FormatPreferences tryEasy(FormatPreferences preferences, boolean force) { """ Checks validity of preferences, and returns with a non-null value if ALL format keys are available, thus negating the need for a scan. """ int count = 0; for (Map.Entry<String, String> e : preferences.rawMap.entrySet()) {...
java
private FormatPreferences tryEasy(FormatPreferences preferences, boolean force) { int count = 0; for (Map.Entry<String, String> e : preferences.rawMap.entrySet()) { if (!"scan".equalsIgnoreCase(e.getValue())) count++; } if (force || count >= FormatPreferences.KEYS.size()) return preferences; return null; ...
[ "private", "FormatPreferences", "tryEasy", "(", "FormatPreferences", "preferences", ",", "boolean", "force", ")", "{", "int", "count", "=", "0", ";", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "e", ":", "preferences", ".", "rawMap"...
Checks validity of preferences, and returns with a non-null value if ALL format keys are available, thus negating the need for a scan.
[ "Checks", "validity", "of", "preferences", "and", "returns", "with", "a", "non", "-", "null", "value", "if", "ALL", "format", "keys", "are", "available", "thus", "negating", "the", "need", "for", "a", "scan", "." ]
train
https://github.com/rzwitserloot/lombok/blob/75601240760bd81ff95fcde7a1b8185769ce64e8/src/delombok/lombok/delombok/FormatPreferenceScanner.java#L40-L47
alkacon/opencms-core
src-modules/org/opencms/workplace/list/A_CmsListAction.java
A_CmsListAction.defaultConfirmationHtml
public static String defaultConfirmationHtml(String confId, String confText) { """ Generates html for the confirmation message when having one confirmation message for several actions.<p> @param confId the id of the confirmation message @param confText the confirmation message @return html code """ ...
java
public static String defaultConfirmationHtml(String confId, String confText) { StringBuffer html = new StringBuffer(1024); html.append("<div class='hide' id='conf"); html.append(confId); html.append("'>"); html.append(CmsStringUtil.isEmptyOrWhitespaceOnly(confText) ? "null" : co...
[ "public", "static", "String", "defaultConfirmationHtml", "(", "String", "confId", ",", "String", "confText", ")", "{", "StringBuffer", "html", "=", "new", "StringBuffer", "(", "1024", ")", ";", "html", ".", "append", "(", "\"<div class='hide' id='conf\"", ")", "...
Generates html for the confirmation message when having one confirmation message for several actions.<p> @param confId the id of the confirmation message @param confText the confirmation message @return html code
[ "Generates", "html", "for", "the", "confirmation", "message", "when", "having", "one", "confirmation", "message", "for", "several", "actions", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/list/A_CmsListAction.java#L74-L83
jbossws/jbossws-common
src/main/java/org/jboss/ws/common/DOMUtils.java
DOMUtils.createElement
public static Element createElement(String localPart, String prefix, String uri) { """ Create an Element for a given name, prefix and uri. This uses the document builder associated with the current thread. """ Document doc = getOwnerDocument(); if (prefix == null || prefix.length() == 0) { ...
java
public static Element createElement(String localPart, String prefix, String uri) { Document doc = getOwnerDocument(); if (prefix == null || prefix.length() == 0) { if (ROOT_LOGGER.isTraceEnabled()) ROOT_LOGGER.trace("createElement {" + uri + "}" + localPart); return doc.createElem...
[ "public", "static", "Element", "createElement", "(", "String", "localPart", ",", "String", "prefix", ",", "String", "uri", ")", "{", "Document", "doc", "=", "getOwnerDocument", "(", ")", ";", "if", "(", "prefix", "==", "null", "||", "prefix", ".", "length"...
Create an Element for a given name, prefix and uri. This uses the document builder associated with the current thread.
[ "Create", "an", "Element", "for", "a", "given", "name", "prefix", "and", "uri", ".", "This", "uses", "the", "document", "builder", "associated", "with", "the", "current", "thread", "." ]
train
https://github.com/jbossws/jbossws-common/blob/fcff8a3ef9bfe046d6fa8c855a3fe4f62841add7/src/main/java/org/jboss/ws/common/DOMUtils.java#L305-L318
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/P2sVpnGatewaysInner.java
P2sVpnGatewaysInner.generateVpnProfile
public VpnProfileResponseInner generateVpnProfile(String resourceGroupName, String gatewayName, AuthenticationMethod authenticationMethod) { """ Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. @param resourceGroupName The name of the resource group. @param gatewayName...
java
public VpnProfileResponseInner generateVpnProfile(String resourceGroupName, String gatewayName, AuthenticationMethod authenticationMethod) { return generateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName, authenticationMethod).toBlocking().last().body(); }
[ "public", "VpnProfileResponseInner", "generateVpnProfile", "(", "String", "resourceGroupName", ",", "String", "gatewayName", ",", "AuthenticationMethod", "authenticationMethod", ")", "{", "return", "generateVpnProfileWithServiceResponseAsync", "(", "resourceGroupName", ",", "ga...
Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. @param resourceGroupName The name of the resource group. @param gatewayName The name of the P2SVpnGateway. @param authenticationMethod VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible v...
[ "Generates", "VPN", "profile", "for", "P2S", "client", "of", "the", "P2SVpnGateway", "in", "the", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/P2sVpnGatewaysInner.java#L1144-L1146
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/AffineTransformation.java
AffineTransformation.applyRelativeInverse
public double[] applyRelativeInverse(double[] v) { """ Apply the inverse transformation onto a vector @param v vector of dimensionality dim @return transformed vector of dimensionality dim """ if(inv == null) { updateInverse(); } return unhomogeneRelativeVector(times(inv, homogeneRelative...
java
public double[] applyRelativeInverse(double[] v) { if(inv == null) { updateInverse(); } return unhomogeneRelativeVector(times(inv, homogeneRelativeVector(v))); }
[ "public", "double", "[", "]", "applyRelativeInverse", "(", "double", "[", "]", "v", ")", "{", "if", "(", "inv", "==", "null", ")", "{", "updateInverse", "(", ")", ";", "}", "return", "unhomogeneRelativeVector", "(", "times", "(", "inv", ",", "homogeneRel...
Apply the inverse transformation onto a vector @param v vector of dimensionality dim @return transformed vector of dimensionality dim
[ "Apply", "the", "inverse", "transformation", "onto", "a", "vector" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/AffineTransformation.java#L384-L389
jparsec/jparsec
jparsec/src/main/java/org/jparsec/pattern/Patterns.java
Patterns.isChar
public static Pattern isChar(final CharPredicate predicate) { """ Returns a {@link Pattern} object that matches if the current character in the input satisfies {@code predicate}, in which case {@code 1} is returned as match length. """ return new Pattern() { @Override public int match(CharSequence s...
java
public static Pattern isChar(final CharPredicate predicate) { return new Pattern() { @Override public int match(CharSequence src, int begin, int end) { if (begin >= end) return MISMATCH; else if (predicate.isChar(src.charAt(begin))) return 1; else return M...
[ "public", "static", "Pattern", "isChar", "(", "final", "CharPredicate", "predicate", ")", "{", "return", "new", "Pattern", "(", ")", "{", "@", "Override", "public", "int", "match", "(", "CharSequence", "src", ",", "int", "begin", ",", "int", "end", ")", ...
Returns a {@link Pattern} object that matches if the current character in the input satisfies {@code predicate}, in which case {@code 1} is returned as match length.
[ "Returns", "a", "{" ]
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/pattern/Patterns.java#L187-L202