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
groupon/odo
proxylib/src/main/java/com/groupon/odo/proxylib/PathOverrideService.java
PathOverrideService.setPath
public void setPath(int pathId, String path) { """ Sets the actual path for this ID @param pathId ID of path @param path value of path """ PreparedStatement statement = null; try (Connection sqlConnection = sqlService.getConnection()) { statement = sqlConnection.prepareStatement...
java
public void setPath(int pathId, String path) { PreparedStatement statement = null; try (Connection sqlConnection = sqlService.getConnection()) { statement = sqlConnection.prepareStatement( "UPDATE " + Constants.DB_TABLE_PATH + " SET " + Constants.PATH_PROF...
[ "public", "void", "setPath", "(", "int", "pathId", ",", "String", "path", ")", "{", "PreparedStatement", "statement", "=", "null", ";", "try", "(", "Connection", "sqlConnection", "=", "sqlService", ".", "getConnection", "(", ")", ")", "{", "statement", "=", ...
Sets the actual path for this ID @param pathId ID of path @param path value of path
[ "Sets", "the", "actual", "path", "for", "this", "ID" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxylib/src/main/java/com/groupon/odo/proxylib/PathOverrideService.java#L1147-L1169
tommyettinger/RegExodus
src/main/java/regexodus/ds/CharArrayList.java
CharArrayList.addElements
public void addElements(final int index, final char a[], final int offset, final int length) { """ Adds elements to this type-specific list using optimized system calls. @param index the index at which to add elements. @param a the array containing the elements. @param offset the offset of the first ele...
java
public void addElements(final int index, final char a[], final int offset, final int length) { ensureIndex(index); CharArrays.ensureOffsetLength(a, offset, length); grow(size + length); System.arraycopy(this.a, index, this.a, index + length, size - index); System.arraycopy(a, off...
[ "public", "void", "addElements", "(", "final", "int", "index", ",", "final", "char", "a", "[", "]", ",", "final", "int", "offset", ",", "final", "int", "length", ")", "{", "ensureIndex", "(", "index", ")", ";", "CharArrays", ".", "ensureOffsetLength", "(...
Adds elements to this type-specific list using optimized system calls. @param index the index at which to add elements. @param a the array containing the elements. @param offset the offset of the first element to add. @param length the number of elements to add.
[ "Adds", "elements", "to", "this", "type", "-", "specific", "list", "using", "optimized", "system", "calls", "." ]
train
https://github.com/tommyettinger/RegExodus/blob/d4af9bb7c132c5f9d29f45b76121f93b2f89de16/src/main/java/regexodus/ds/CharArrayList.java#L495-L502
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java
HtmlSerialFieldWriter.addMemberDescription
public void addMemberDescription(VariableElement field, Content contentTree) { """ Add the description text for this member. @param field the field to document. @param contentTree the tree to which the deprecated info will be added """ if (!utils.getFullBody(field).isEmpty()) { writer.a...
java
public void addMemberDescription(VariableElement field, Content contentTree) { if (!utils.getFullBody(field).isEmpty()) { writer.addInlineComment(field, contentTree); } List<? extends DocTree> tags = utils.getBlockTags(field, DocTree.Kind.SERIAL); if (!tags.isEmpty()) { ...
[ "public", "void", "addMemberDescription", "(", "VariableElement", "field", ",", "Content", "contentTree", ")", "{", "if", "(", "!", "utils", ".", "getFullBody", "(", "field", ")", ".", "isEmpty", "(", ")", ")", "{", "writer", ".", "addInlineComment", "(", ...
Add the description text for this member. @param field the field to document. @param contentTree the tree to which the deprecated info will be added
[ "Add", "the", "description", "text", "for", "this", "member", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java#L161-L169
FINRAOS/DataGenerator
dg-example-hadoop/src/main/java/org/finra/datagenerator/samples/manager/JettyManager.java
JettyManager.makeReport
public String makeReport(String name, String report) { """ Handles reports by consumers @param name the name of the reporting consumer @param report the number of lines the consumer has written since last report @return "exit" if maxScenarios has been reached, "ok" otherwise """ long increment = L...
java
public String makeReport(String name, String report) { long increment = Long.valueOf(report); long currentLineCount = globalLineCounter.addAndGet(increment); if (currentLineCount >= maxScenarios) { return "exit"; } else { return "ok"; } }
[ "public", "String", "makeReport", "(", "String", "name", ",", "String", "report", ")", "{", "long", "increment", "=", "Long", ".", "valueOf", "(", "report", ")", ";", "long", "currentLineCount", "=", "globalLineCounter", ".", "addAndGet", "(", "increment", "...
Handles reports by consumers @param name the name of the reporting consumer @param report the number of lines the consumer has written since last report @return "exit" if maxScenarios has been reached, "ok" otherwise
[ "Handles", "reports", "by", "consumers" ]
train
https://github.com/FINRAOS/DataGenerator/blob/1f69f949401cbed4db4f553c3eb8350832c4d45a/dg-example-hadoop/src/main/java/org/finra/datagenerator/samples/manager/JettyManager.java#L101-L110
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/Conversion.java
Conversion.byteArrayToUuid
@GwtIncompatible("incompatible method") public static UUID byteArrayToUuid(final byte[] src, final int srcPos) { """ <p> Converts bytes from an array into a UUID using the default (little endian, Lsb0) byte and bit ordering. </p> @param src the byte array to convert @param srcPos the position in {@code ...
java
@GwtIncompatible("incompatible method") public static UUID byteArrayToUuid(final byte[] src, final int srcPos) { if (src.length - srcPos < 16) { throw new IllegalArgumentException("Need at least 16 bytes for UUID"); } return new UUID(byteArrayToLong(src, srcPos, 0, 0, 8), byteArr...
[ "@", "GwtIncompatible", "(", "\"incompatible method\"", ")", "public", "static", "UUID", "byteArrayToUuid", "(", "final", "byte", "[", "]", "src", ",", "final", "int", "srcPos", ")", "{", "if", "(", "src", ".", "length", "-", "srcPos", "<", "16", ")", "{...
<p> Converts bytes from an array into a UUID using the default (little endian, Lsb0) byte and bit ordering. </p> @param src the byte array to convert @param srcPos the position in {@code src} where to copy the result from @return a UUID @throws NullPointerException if {@code src} is {@code null} @throws IllegalArgumen...
[ "<p", ">", "Converts", "bytes", "from", "an", "array", "into", "a", "UUID", "using", "the", "default", "(", "little", "endian", "Lsb0", ")", "byte", "and", "bit", "ordering", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/Conversion.java#L1545-L1551
shrinkwrap/shrinkwrap
impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/exporter/ExplodedExporterDelegate.java
ExplodedExporterDelegate.processArchiveAsset
private void processArchiveAsset(File parentDirectory, ArchiveAsset nestedArchiveAsset) { """ Processes a nested archive by delegating to the ExplodedArchiveExporter @param parentDirectory @param nestedArchiveAsset """ // Get the nested archive Archive<?> nestedArchive = nestedArchiveAsset....
java
private void processArchiveAsset(File parentDirectory, ArchiveAsset nestedArchiveAsset) { // Get the nested archive Archive<?> nestedArchive = nestedArchiveAsset.getArchive(); nestedArchive.as(ExplodedExporter.class).exportExploded(parentDirectory); }
[ "private", "void", "processArchiveAsset", "(", "File", "parentDirectory", ",", "ArchiveAsset", "nestedArchiveAsset", ")", "{", "// Get the nested archive", "Archive", "<", "?", ">", "nestedArchive", "=", "nestedArchiveAsset", ".", "getArchive", "(", ")", ";", "nestedA...
Processes a nested archive by delegating to the ExplodedArchiveExporter @param parentDirectory @param nestedArchiveAsset
[ "Processes", "a", "nested", "archive", "by", "delegating", "to", "the", "ExplodedArchiveExporter" ]
train
https://github.com/shrinkwrap/shrinkwrap/blob/3f8a1a6d344651428c709a63ebb52d35343c5387/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/exporter/ExplodedExporterDelegate.java#L165-L169
alkacon/opencms-core
src-gwt/org/opencms/ui/client/CmsWidgetSetEntryPoint.java
CmsWidgetSetEntryPoint.loadScriptDependencies
public static void loadScriptDependencies(final JsArrayString dependencies, final JavaScriptObject callback) { """ Loads JavaScript resources into the window context.<p> @param dependencies the dependencies to load @param callback the callback to execute once the resources are loaded """ if (depen...
java
public static void loadScriptDependencies(final JsArrayString dependencies, final JavaScriptObject callback) { if (dependencies.length() == 0) { return; } final Set<String> absoluteUris = new HashSet<String>(); for (int i = 0; i < dependencies.length(); i++) { ab...
[ "public", "static", "void", "loadScriptDependencies", "(", "final", "JsArrayString", "dependencies", ",", "final", "JavaScriptObject", "callback", ")", "{", "if", "(", "dependencies", ".", "length", "(", ")", "==", "0", ")", "{", "return", ";", "}", "final", ...
Loads JavaScript resources into the window context.<p> @param dependencies the dependencies to load @param callback the callback to execute once the resources are loaded
[ "Loads", "JavaScript", "resources", "into", "the", "window", "context", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ui/client/CmsWidgetSetEntryPoint.java#L57-L109
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/URLUtil.java
URLUtil.encodeAll
public static String encodeAll(String url, Charset charset) throws UtilException { """ 编码URL<br> 将需要转换的内容(ASCII码形式之外的内容),用十六进制表示法转换出来,并在之前加上%开头。 @param url URL @param charset 编码 @return 编码后的URL @exception UtilException UnsupportedEncodingException """ try { return java.net.URLEncoder.encode(url, ...
java
public static String encodeAll(String url, Charset charset) throws UtilException { try { return java.net.URLEncoder.encode(url, charset.toString()); } catch (UnsupportedEncodingException e) { throw new UtilException(e); } }
[ "public", "static", "String", "encodeAll", "(", "String", "url", ",", "Charset", "charset", ")", "throws", "UtilException", "{", "try", "{", "return", "java", ".", "net", ".", "URLEncoder", ".", "encode", "(", "url", ",", "charset", ".", "toString", "(", ...
编码URL<br> 将需要转换的内容(ASCII码形式之外的内容),用十六进制表示法转换出来,并在之前加上%开头。 @param url URL @param charset 编码 @return 编码后的URL @exception UtilException UnsupportedEncodingException
[ "编码URL<br", ">", "将需要转换的内容(ASCII码形式之外的内容),用十六进制表示法转换出来,并在之前加上%开头。" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/URLUtil.java#L229-L235
Waikato/moa
moa/src/main/java/moa/clusterers/clustree/ClusKernel.java
ClusKernel.aggregate
protected void aggregate(ClusKernel other, long timeDifference, double negLambda) { """ Make this cluster older bei weighting it and add to this cluster the given cluster. If we want to add somethin to the cluster, but don't want to weight it, we should use the function <code>add(Cluster)</code>. @param other T...
java
protected void aggregate(ClusKernel other, long timeDifference, double negLambda) { makeOlder(timeDifference, negLambda); add(other); }
[ "protected", "void", "aggregate", "(", "ClusKernel", "other", ",", "long", "timeDifference", ",", "double", "negLambda", ")", "{", "makeOlder", "(", "timeDifference", ",", "negLambda", ")", ";", "add", "(", "other", ")", ";", "}" ]
Make this cluster older bei weighting it and add to this cluster the given cluster. If we want to add somethin to the cluster, but don't want to weight it, we should use the function <code>add(Cluster)</code>. @param other The other cluster to be added to this one. @param timeDifference The time elapsed between the las...
[ "Make", "this", "cluster", "older", "bei", "weighting", "it", "and", "add", "to", "this", "cluster", "the", "given", "cluster", ".", "If", "we", "want", "to", "add", "somethin", "to", "the", "cluster", "but", "don", "t", "want", "to", "weight", "it", "...
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/clusterers/clustree/ClusKernel.java#L101-L104
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/reflection/GobblinConstructorUtils.java
GobblinConstructorUtils.invokeConstructor
@SuppressWarnings("unchecked") public static <T> T invokeConstructor(final Class<T> superType, final String clsName, Object... args) { """ Utility method to create an instance of <code>clsName</code> using the constructor matching the arguments, <code>args</code> @param superType of <code>clsName</code>. The ...
java
@SuppressWarnings("unchecked") public static <T> T invokeConstructor(final Class<T> superType, final String clsName, Object... args) { try { return (T) ConstructorUtils.invokeConstructor(Class.forName(clsName), args); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException |...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "invokeConstructor", "(", "final", "Class", "<", "T", ">", "superType", ",", "final", "String", "clsName", ",", "Object", "...", "args", ")", "{", "try", "{", "re...
Utility method to create an instance of <code>clsName</code> using the constructor matching the arguments, <code>args</code> @param superType of <code>clsName</code>. The new instance is cast to superType @param clsName complete cannonical name of the class to be instantiated @param args constructor args to be used @...
[ "Utility", "method", "to", "create", "an", "instance", "of", "<code", ">", "clsName<", "/", "code", ">", "using", "the", "constructor", "matching", "the", "arguments", "<code", ">", "args<", "/", "code", ">" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/reflection/GobblinConstructorUtils.java#L109-L118
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlMNStatement.java
SqlMNStatement.appendWhereClause
protected void appendWhereClause(StringBuffer stmt, Object[] columns) { """ Generate a sql where-clause matching the contraints defined by the array of fields @param columns array containing all columns used in WHERE clause """ stmt.append(" WHERE "); for (int i = 0; i < columns.length; ...
java
protected void appendWhereClause(StringBuffer stmt, Object[] columns) { stmt.append(" WHERE "); for (int i = 0; i < columns.length; i++) { if (i > 0) { stmt.append(" AND "); } stmt.append(columns[i]); stm...
[ "protected", "void", "appendWhereClause", "(", "StringBuffer", "stmt", ",", "Object", "[", "]", "columns", ")", "{", "stmt", ".", "append", "(", "\" WHERE \"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "columns", ".", "length", ";", ...
Generate a sql where-clause matching the contraints defined by the array of fields @param columns array containing all columns used in WHERE clause
[ "Generate", "a", "sql", "where", "-", "clause", "matching", "the", "contraints", "defined", "by", "the", "array", "of", "fields" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlMNStatement.java#L87-L100
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/spider/SpiderDataAger.java
SpiderDataAger.checkTable
private void checkTable() { """ Scan the given table for expired objects relative to the given date. """ // Documentation says that "0 xxx" means data-aging is disabled. if (m_retentionAge.getValue() == 0) { m_logger.info("Data aging disabled for table: {}", m_tableDef.getTableName(...
java
private void checkTable() { // Documentation says that "0 xxx" means data-aging is disabled. if (m_retentionAge.getValue() == 0) { m_logger.info("Data aging disabled for table: {}", m_tableDef.getTableName()); return; } m_logger.info("Checking expired obj...
[ "private", "void", "checkTable", "(", ")", "{", "// Documentation says that \"0 xxx\" means data-aging is disabled.", "if", "(", "m_retentionAge", ".", "getValue", "(", ")", "==", "0", ")", "{", "m_logger", ".", "info", "(", "\"Data aging disabled for table: {}\"", ",",...
Scan the given table for expired objects relative to the given date.
[ "Scan", "the", "given", "table", "for", "expired", "objects", "relative", "to", "the", "given", "date", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/SpiderDataAger.java#L75-L114
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/AccountsImpl.java
AccountsImpl.listPoolNodeCounts
public PagedList<PoolNodeCounts> listPoolNodeCounts(final AccountListPoolNodeCountsOptions accountListPoolNodeCountsOptions) { """ Gets the number of nodes in each state, grouped by pool. @param accountListPoolNodeCountsOptions Additional parameters for the operation @throws IllegalArgumentException thrown if ...
java
public PagedList<PoolNodeCounts> listPoolNodeCounts(final AccountListPoolNodeCountsOptions accountListPoolNodeCountsOptions) { ServiceResponseWithHeaders<Page<PoolNodeCounts>, AccountListPoolNodeCountsHeaders> response = listPoolNodeCountsSinglePageAsync(accountListPoolNodeCountsOptions).toBlocking().single(); ...
[ "public", "PagedList", "<", "PoolNodeCounts", ">", "listPoolNodeCounts", "(", "final", "AccountListPoolNodeCountsOptions", "accountListPoolNodeCountsOptions", ")", "{", "ServiceResponseWithHeaders", "<", "Page", "<", "PoolNodeCounts", ">", ",", "AccountListPoolNodeCountsHeaders...
Gets the number of nodes in each state, grouped by pool. @param accountListPoolNodeCountsOptions Additional parameters for the operation @throws IllegalArgumentException thrown if parameters fail the validation @throws BatchErrorException thrown if the request is rejected by server @throws RuntimeException all other w...
[ "Gets", "the", "number", "of", "nodes", "in", "each", "state", "grouped", "by", "pool", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/AccountsImpl.java#L483-L498
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/JobExecutionsInner.java
JobExecutionsInner.listByJobWithServiceResponseAsync
public Observable<ServiceResponse<Page<JobExecutionInner>>> listByJobWithServiceResponseAsync(final String resourceGroupName, final String serverName, final String jobAgentName, final String jobName) { """ Lists a job's executions. @param resourceGroupName The name of the resource group that contains the resour...
java
public Observable<ServiceResponse<Page<JobExecutionInner>>> listByJobWithServiceResponseAsync(final String resourceGroupName, final String serverName, final String jobAgentName, final String jobName) { return listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName) .concatMap(n...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "JobExecutionInner", ">", ">", ">", "listByJobWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "serverName", ",", "final", "String", "jobAgentName", ",", ...
Lists a job's executions. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param jobAgentName The name of the job agent. @param jobName The name of the job to get. ...
[ "Lists", "a", "job", "s", "executions", "." ]
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/JobExecutionsInner.java#L768-L780
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/document/json/JsonObject.java
JsonObject.putAndEncrypt
public JsonObject putAndEncrypt(String name, Map<String, ?> value, String providerName) { """ Attempt to convert a {@link Map} to a {@link JsonObject} value and store it, as encrypted identified by the field name. Note: Use of the Field Level Encryption functionality provided in the com.couchbase.client.encry...
java
public JsonObject putAndEncrypt(String name, Map<String, ?> value, String providerName) { addValueEncryptionInfo(name, providerName, true); return put(name, JsonObject.from(value)); }
[ "public", "JsonObject", "putAndEncrypt", "(", "String", "name", ",", "Map", "<", "String", ",", "?", ">", "value", ",", "String", "providerName", ")", "{", "addValueEncryptionInfo", "(", "name", ",", "providerName", ",", "true", ")", ";", "return", "put", ...
Attempt to convert a {@link Map} to a {@link JsonObject} value and store it, as encrypted identified by the field name. Note: Use of the Field Level Encryption functionality provided in the com.couchbase.client.encryption namespace provided by Couchbase is subject to the Couchbase Inc. Enterprise Subscription License ...
[ "Attempt", "to", "convert", "a", "{", "@link", "Map", "}", "to", "a", "{", "@link", "JsonObject", "}", "value", "and", "store", "it", "as", "encrypted", "identified", "by", "the", "field", "name", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/document/json/JsonObject.java#L742-L745
moparisthebest/beehive
beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/EventNotifier.java
EventNotifier.removeListener
synchronized public void removeListener(Object listener) { """ Remove an existing callback event listener for this EventNotifier """ if (!_listeners.contains(listener)) throw new IllegalStateException("Invalid listener, not currently registered"); _listeners.remove(listener); }
java
synchronized public void removeListener(Object listener) { if (!_listeners.contains(listener)) throw new IllegalStateException("Invalid listener, not currently registered"); _listeners.remove(listener); }
[ "synchronized", "public", "void", "removeListener", "(", "Object", "listener", ")", "{", "if", "(", "!", "_listeners", ".", "contains", "(", "listener", ")", ")", "throw", "new", "IllegalStateException", "(", "\"Invalid listener, not currently registered\"", ")", ";...
Remove an existing callback event listener for this EventNotifier
[ "Remove", "an", "existing", "callback", "event", "listener", "for", "this", "EventNotifier" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/EventNotifier.java#L41-L47
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/FormatSet.java
FormatSet.getBasicDateFormatter
public static DateFormat getBasicDateFormatter() { """ Return a DateFormat object that can be used to format timestamps in the System.out, System.err and TraceOutput logs. It will use the default date format. """ // PK42263 - made static // Retrieve a standard Java DateFormat object with desired form...
java
public static DateFormat getBasicDateFormatter() { // PK42263 - made static // Retrieve a standard Java DateFormat object with desired format, using default locale return customizeDateFormat(DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM), false); }
[ "public", "static", "DateFormat", "getBasicDateFormatter", "(", ")", "{", "// PK42263 - made static", "// Retrieve a standard Java DateFormat object with desired format, using default locale", "return", "customizeDateFormat", "(", "DateFormat", ".", "getDateTimeInstance", "(", "DateF...
Return a DateFormat object that can be used to format timestamps in the System.out, System.err and TraceOutput logs. It will use the default date format.
[ "Return", "a", "DateFormat", "object", "that", "can", "be", "used", "to", "format", "timestamps", "in", "the", "System", ".", "out", "System", ".", "err", "and", "TraceOutput", "logs", ".", "It", "will", "use", "the", "default", "date", "format", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/FormatSet.java#L112-L115
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/factory/feature/detdesc/FactoryDetectDescribe.java
FactoryDetectDescribe.surfColorStable
public static <T extends ImageMultiBand<T>, II extends ImageGray<II>> DetectDescribePoint<T,BrightFeature> surfColorStable( @Nullable ConfigFastHessian configDetector, @Nullable ConfigSurfDescribe.Stability configDescribe, @Nullable ConfigSlidingIntegral configOrientation, ...
java
public static <T extends ImageMultiBand<T>, II extends ImageGray<II>> DetectDescribePoint<T,BrightFeature> surfColorStable( @Nullable ConfigFastHessian configDetector, @Nullable ConfigSurfDescribe.Stability configDescribe, @Nullable ConfigSlidingIntegral configOrientation, ...
[ "public", "static", "<", "T", "extends", "ImageMultiBand", "<", "T", ">", ",", "II", "extends", "ImageGray", "<", "II", ">", ">", "DetectDescribePoint", "<", "T", ",", "BrightFeature", ">", "surfColorStable", "(", "@", "Nullable", "ConfigFastHessian", "configD...
<p> Color version of SURF stable feature. Features are detected in a gray scale image, but the descriptors are computed using a color image. Each band in the page adds to the descriptor length. See {@link DetectDescribeSurfPlanar} for details. </p> @see DescribePointSurfPlanar @see FastHessianFeatureDetector @see b...
[ "<p", ">", "Color", "version", "of", "SURF", "stable", "feature", ".", "Features", "are", "detected", "in", "a", "gray", "scale", "image", "but", "the", "descriptors", "are", "computed", "using", "a", "color", "image", ".", "Each", "band", "in", "the", "...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/detdesc/FactoryDetectDescribe.java#L245-L268
mokies/ratelimitj
ratelimitj-core/src/main/java/es/moki/ratelimitj/core/limiter/request/RequestLimitRule.java
RequestLimitRule.withPrecision
public RequestLimitRule withPrecision(Duration precision) { """ Controls (approximate) sliding window precision. A lower duration increases precision and minimises the Thundering herd problem - https://en.wikipedia.org/wiki/Thundering_herd_problem @param precision Defines the time precision that will be used to...
java
public RequestLimitRule withPrecision(Duration precision) { checkDuration(precision); return new RequestLimitRule(this.durationSeconds, this.limit, (int) precision.getSeconds(), this.name, this.keys); }
[ "public", "RequestLimitRule", "withPrecision", "(", "Duration", "precision", ")", "{", "checkDuration", "(", "precision", ")", ";", "return", "new", "RequestLimitRule", "(", "this", ".", "durationSeconds", ",", "this", ".", "limit", ",", "(", "int", ")", "prec...
Controls (approximate) sliding window precision. A lower duration increases precision and minimises the Thundering herd problem - https://en.wikipedia.org/wiki/Thundering_herd_problem @param precision Defines the time precision that will be used to approximate the sliding window. The precision must be greater than 1 s...
[ "Controls", "(", "approximate", ")", "sliding", "window", "precision", ".", "A", "lower", "duration", "increases", "precision", "and", "minimises", "the", "Thundering", "herd", "problem", "-", "https", ":", "//", "en", ".", "wikipedia", ".", "org", "/", "wik...
train
https://github.com/mokies/ratelimitj/blob/eb15ec42055c46b2b3f6f84131d86f570e489c32/ratelimitj-core/src/main/java/es/moki/ratelimitj/core/limiter/request/RequestLimitRule.java#L70-L73
erlang/otp
lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
OtpOutputStream.write_ref
public void write_ref(final String node, final int[] ids, final int creation) { """ Write an Erlang ref to the stream. @param node the nodename. @param ids an array of arbitrary numbers. Only the low order 18 bits of the first number will be used. At most three numbers will be read from the array. @pa...
java
public void write_ref(final String node, final int[] ids, final int creation) { int arity = ids.length; if (arity > 3) { arity = 3; // max 3 words in ref } write1(OtpExternal.newRefTag); // how many id values write2BE(arity); write_atom(node); write1(creation & 0x3); // 2 bi...
[ "public", "void", "write_ref", "(", "final", "String", "node", ",", "final", "int", "[", "]", "ids", ",", "final", "int", "creation", ")", "{", "int", "arity", "=", "ids", ".", "length", ";", "if", "(", "arity", ">", "3", ")", "{", "arity", "=", ...
Write an Erlang ref to the stream. @param node the nodename. @param ids an array of arbitrary numbers. Only the low order 18 bits of the first number will be used. At most three numbers will be read from the array. @param creation another arbitrary number. Only the low order 2 bits will be used.
[ "Write", "an", "Erlang", "ref", "to", "the", "stream", "." ]
train
https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java#L826-L848
oasp/oasp4j
modules/rest/src/main/java/io/oasp/module/rest/service/impl/RestServiceExceptionFacade.java
RestServiceExceptionFacade.createResponse
protected Response createResponse(NlsRuntimeException error) { """ Create the {@link Response} for the given {@link NlsRuntimeException}. @param error the generic {@link NlsRuntimeException}. @return the corresponding {@link Response}. """ Status status; if (error.isTechnical()) { status = S...
java
protected Response createResponse(NlsRuntimeException error) { Status status; if (error.isTechnical()) { status = Status.INTERNAL_SERVER_ERROR; } else { status = Status.BAD_REQUEST; } return createResponse(status, error, null); }
[ "protected", "Response", "createResponse", "(", "NlsRuntimeException", "error", ")", "{", "Status", "status", ";", "if", "(", "error", ".", "isTechnical", "(", ")", ")", "{", "status", "=", "Status", ".", "INTERNAL_SERVER_ERROR", ";", "}", "else", "{", "stat...
Create the {@link Response} for the given {@link NlsRuntimeException}. @param error the generic {@link NlsRuntimeException}. @return the corresponding {@link Response}.
[ "Create", "the", "{", "@link", "Response", "}", "for", "the", "given", "{", "@link", "NlsRuntimeException", "}", "." ]
train
https://github.com/oasp/oasp4j/blob/03f90132699fad95e52ec8efa54aa391f8d3c7e4/modules/rest/src/main/java/io/oasp/module/rest/service/impl/RestServiceExceptionFacade.java#L387-L396
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/rendering/TagRenderingBase.java
TagRenderingBase.renderAttributes
protected void renderAttributes(int type, AbstractRenderAppender sb, AbstractAttributeState state, boolean doubleQuote) { """ Render all of the attributes defined in a map and return the string value. The attributes are rendered with in a name="value" style supported by XML. @param type an integer key indentify...
java
protected void renderAttributes(int type, AbstractRenderAppender sb, AbstractAttributeState state, boolean doubleQuote) { HashMap map = null; switch (type) { case AbstractAttributeState.ATTR_GENERAL: map = state.getGeneralAttributeMap(); break; ...
[ "protected", "void", "renderAttributes", "(", "int", "type", ",", "AbstractRenderAppender", "sb", ",", "AbstractAttributeState", "state", ",", "boolean", "doubleQuote", ")", "{", "HashMap", "map", "=", "null", ";", "switch", "(", "type", ")", "{", "case", "Abs...
Render all of the attributes defined in a map and return the string value. The attributes are rendered with in a name="value" style supported by XML. @param type an integer key indentifying the map
[ "Render", "all", "of", "the", "attributes", "defined", "in", "a", "map", "and", "return", "the", "string", "value", ".", "The", "attributes", "are", "rendered", "with", "in", "a", "name", "=", "value", "style", "supported", "by", "XML", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/rendering/TagRenderingBase.java#L224-L238
openengsb/openengsb
api/core/src/main/java/org/openengsb/core/api/model/ContextId.java
ContextId.fromMetaData
public static ContextId fromMetaData(Map<String, String> metaData) { """ parses a ContextId object from a Map-representation used in {@link org.openengsb.core.api.persistence.ConfigPersistenceService} """ return new ContextId(metaData.get(META_KEY_ID)); }
java
public static ContextId fromMetaData(Map<String, String> metaData) { return new ContextId(metaData.get(META_KEY_ID)); }
[ "public", "static", "ContextId", "fromMetaData", "(", "Map", "<", "String", ",", "String", ">", "metaData", ")", "{", "return", "new", "ContextId", "(", "metaData", ".", "get", "(", "META_KEY_ID", ")", ")", ";", "}" ]
parses a ContextId object from a Map-representation used in {@link org.openengsb.core.api.persistence.ConfigPersistenceService}
[ "parses", "a", "ContextId", "object", "from", "a", "Map", "-", "representation", "used", "in", "{" ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/core/src/main/java/org/openengsb/core/api/model/ContextId.java#L65-L67
leancloud/java-sdk-all
realtime/src/main/java/cn/leancloud/im/v2/AVIMClient.java
AVIMClient.getConversation
public AVIMConversation getConversation(String conversationId, int convType) { """ get conversation by id and type @param conversationId @param convType @return """ AVIMConversation result = null; switch (convType) { case Conversation.CONV_TYPE_SYSTEM: result = getServiceConversation...
java
public AVIMConversation getConversation(String conversationId, int convType) { AVIMConversation result = null; switch (convType) { case Conversation.CONV_TYPE_SYSTEM: result = getServiceConversation(conversationId); break; case Conversation.CONV_TYPE_TEMPORARY: result = getTe...
[ "public", "AVIMConversation", "getConversation", "(", "String", "conversationId", ",", "int", "convType", ")", "{", "AVIMConversation", "result", "=", "null", ";", "switch", "(", "convType", ")", "{", "case", "Conversation", ".", "CONV_TYPE_SYSTEM", ":", "result",...
get conversation by id and type @param conversationId @param convType @return
[ "get", "conversation", "by", "id", "and", "type" ]
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/realtime/src/main/java/cn/leancloud/im/v2/AVIMClient.java#L402-L419
threerings/nenya
core/src/main/java/com/threerings/openal/SoundManager.java
SoundManager.loadClip
public void loadClip (ClipProvider provider, String path, Observer observer) { """ Loads a clip buffer for the sound clip loaded via the specified provider with the specified path. The loaded clip is placed in the cache. """ getClip(provider, path, observer); }
java
public void loadClip (ClipProvider provider, String path, Observer observer) { getClip(provider, path, observer); }
[ "public", "void", "loadClip", "(", "ClipProvider", "provider", ",", "String", "path", ",", "Observer", "observer", ")", "{", "getClip", "(", "provider", ",", "path", ",", "observer", ")", ";", "}" ]
Loads a clip buffer for the sound clip loaded via the specified provider with the specified path. The loaded clip is placed in the cache.
[ "Loads", "a", "clip", "buffer", "for", "the", "sound", "clip", "loaded", "via", "the", "specified", "provider", "with", "the", "specified", "path", ".", "The", "loaded", "clip", "is", "placed", "in", "the", "cache", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/SoundManager.java#L191-L194
gosu-lang/gosu-lang
gosu-ant-tools/src/main/java/gosu/tools/ant/Gosuc.java
Gosuc.asFiles
private List<File> asFiles(File srcDir, String[] files, FileNameMapper m) { """ Converts an array of relative String filenames to a {@code List<File>} @param srcDir The root directory of all files @param files All files are relative to srcDir @return a List of Files by joining srcDir to each file """ Li...
java
private List<File> asFiles(File srcDir, String[] files, FileNameMapper m) { List<File> newFiles = new ArrayList<>(); for(String file : files) { boolean hasMatchingExtension = m.mapFileName(file) != null; //use mapFileName as a check to validate if the source file extension is recognized by the mapper or n...
[ "private", "List", "<", "File", ">", "asFiles", "(", "File", "srcDir", ",", "String", "[", "]", "files", ",", "FileNameMapper", "m", ")", "{", "List", "<", "File", ">", "newFiles", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "String", ...
Converts an array of relative String filenames to a {@code List<File>} @param srcDir The root directory of all files @param files All files are relative to srcDir @return a List of Files by joining srcDir to each file
[ "Converts", "an", "array", "of", "relative", "String", "filenames", "to", "a", "{" ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-ant-tools/src/main/java/gosu/tools/ant/Gosuc.java#L242-L251
duracloud/duracloud
chunk/src/main/java/org/duracloud/chunk/writer/DuracloudContentWriter.java
DuracloudContentWriter.writeChunk
private void writeChunk(String spaceId, ChunkInputStream chunk) throws NotFoundException { """ /* Writes chunk to DuraCloud if it does not already exist in DuraCloud with a matching checksum. Retry failed transfers. """ // Write chunk as a temp file String chunkId = chunk.getChunkId()...
java
private void writeChunk(String spaceId, ChunkInputStream chunk) throws NotFoundException { // Write chunk as a temp file String chunkId = chunk.getChunkId(); File chunkFile = IOUtil.writeStreamToFile(chunk); try { String chunkChecksum = getChunkChecksum(chunkFile); ...
[ "private", "void", "writeChunk", "(", "String", "spaceId", ",", "ChunkInputStream", "chunk", ")", "throws", "NotFoundException", "{", "// Write chunk as a temp file", "String", "chunkId", "=", "chunk", ".", "getChunkId", "(", ")", ";", "File", "chunkFile", "=", "I...
/* Writes chunk to DuraCloud if it does not already exist in DuraCloud with a matching checksum. Retry failed transfers.
[ "/", "*", "Writes", "chunk", "to", "DuraCloud", "if", "it", "does", "not", "already", "exist", "in", "DuraCloud", "with", "a", "matching", "checksum", ".", "Retry", "failed", "transfers", "." ]
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/chunk/src/main/java/org/duracloud/chunk/writer/DuracloudContentWriter.java#L198-L240
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/engine/MergedContextSource.java
MergedContextSource.init
public void init(ClassLoader loader, ContextSource[] contextSources, String[] prefixes, boolean profilingEnabled) throws Exception { """ Creates a unified context source for all those passed in. An Exception may be thrown if the call to a source's getContextType() method...
java
public void init(ClassLoader loader, ContextSource[] contextSources, String[] prefixes, boolean profilingEnabled) throws Exception { mSources = contextSources; int len = contextSources.length; ArrayList<Class<?>> contextList = new ArrayList<Class<?>>(l...
[ "public", "void", "init", "(", "ClassLoader", "loader", ",", "ContextSource", "[", "]", "contextSources", ",", "String", "[", "]", "prefixes", ",", "boolean", "profilingEnabled", ")", "throws", "Exception", "{", "mSources", "=", "contextSources", ";", "int", "...
Creates a unified context source for all those passed in. An Exception may be thrown if the call to a source's getContextType() method throws an exception.
[ "Creates", "a", "unified", "context", "source", "for", "all", "those", "passed", "in", ".", "An", "Exception", "may", "be", "thrown", "if", "the", "call", "to", "a", "source", "s", "getContextType", "()", "method", "throws", "an", "exception", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/engine/MergedContextSource.java#L54-L94
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/ControlCreateDurableImpl.java
ControlCreateDurableImpl.setDurableSelectorNamespaceMap
public void setDurableSelectorNamespaceMap(Map<String,String> namespaceMap) { """ Sets a map of prefixes to namespace URLs that are associated with the selector. @param namespaceMap """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setDurableSelectorNamespaceMap...
java
public void setDurableSelectorNamespaceMap(Map<String,String> namespaceMap) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setDurableSelectorNamespaceMap", namespaceMap); if (namespaceMap == null) { jmo.setChoiceField(ControlAccess.BODY_CREATEDURABLE_NAMESPACEMAP...
[ "public", "void", "setDurableSelectorNamespaceMap", "(", "Map", "<", "String", ",", "String", ">", "namespaceMap", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "e...
Sets a map of prefixes to namespace URLs that are associated with the selector. @param namespaceMap
[ "Sets", "a", "map", "of", "prefixes", "to", "namespace", "URLs", "that", "are", "associated", "with", "the", "selector", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/ControlCreateDurableImpl.java#L287-L304
apache/flink
flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java
ExceptionUtils.stripException
public static Throwable stripException(Throwable throwableToStrip, Class<? extends Throwable> typeToStrip) { """ Unpacks an specified exception and returns its cause. Otherwise the given {@link Throwable} is returned. @param throwableToStrip to strip @param typeToStrip type to strip @return Unpacked cause or...
java
public static Throwable stripException(Throwable throwableToStrip, Class<? extends Throwable> typeToStrip) { while (typeToStrip.isAssignableFrom(throwableToStrip.getClass()) && throwableToStrip.getCause() != null) { throwableToStrip = throwableToStrip.getCause(); } return throwableToStrip; }
[ "public", "static", "Throwable", "stripException", "(", "Throwable", "throwableToStrip", ",", "Class", "<", "?", "extends", "Throwable", ">", "typeToStrip", ")", "{", "while", "(", "typeToStrip", ".", "isAssignableFrom", "(", "throwableToStrip", ".", "getClass", "...
Unpacks an specified exception and returns its cause. Otherwise the given {@link Throwable} is returned. @param throwableToStrip to strip @param typeToStrip type to strip @return Unpacked cause or given Throwable if not packed
[ "Unpacks", "an", "specified", "exception", "and", "returns", "its", "cause", ".", "Otherwise", "the", "given", "{", "@link", "Throwable", "}", "is", "returned", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java#L419-L425
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/internal/SRTServletRequestUtils.java
SRTServletRequestUtils.removePrivateAttribute
public static void removePrivateAttribute(HttpServletRequest req, String key) { """ Remove a private attribute from the request (if applicable). If the request object is of an unexpected type, no operation occurs. @param req @param key @see IPrivateRequestAttributes#removePrivateAttribute(String) """ ...
java
public static void removePrivateAttribute(HttpServletRequest req, String key) { HttpServletRequest sr = getWrappedServletRequestObject(req); if (sr instanceof IPrivateRequestAttributes) { ((IPrivateRequestAttributes) sr).removePrivateAttribute(key); } else { if (tc.isDebu...
[ "public", "static", "void", "removePrivateAttribute", "(", "HttpServletRequest", "req", ",", "String", "key", ")", "{", "HttpServletRequest", "sr", "=", "getWrappedServletRequestObject", "(", "req", ")", ";", "if", "(", "sr", "instanceof", "IPrivateRequestAttributes",...
Remove a private attribute from the request (if applicable). If the request object is of an unexpected type, no operation occurs. @param req @param key @see IPrivateRequestAttributes#removePrivateAttribute(String)
[ "Remove", "a", "private", "attribute", "from", "the", "request", "(", "if", "applicable", ")", ".", "If", "the", "request", "object", "is", "of", "an", "unexpected", "type", "no", "operation", "occurs", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/internal/SRTServletRequestUtils.java#L76-L85
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java
OjbTagsHandler.forAllFieldDefinitions
public void forAllFieldDefinitions(String template, Properties attributes) throws XDocletException { """ Processes the template for all field definitions of the current class definition (including inherited ones if required) @param template The template @param attributes The attributes...
java
public void forAllFieldDefinitions(String template, Properties attributes) throws XDocletException { for (Iterator it = _curClassDef.getFields(); it.hasNext(); ) { _curFieldDef = (FieldDescriptorDef)it.next(); if (!isFeatureIgnored(LEVEL_FIELD) && !_curF...
[ "public", "void", "forAllFieldDefinitions", "(", "String", "template", ",", "Properties", "attributes", ")", "throws", "XDocletException", "{", "for", "(", "Iterator", "it", "=", "_curClassDef", ".", "getFields", "(", ")", ";", "it", ".", "hasNext", "(", ")", ...
Processes the template for all field definitions of the current class definition (including inherited ones if required) @param template The template @param attributes The attributes of the tag @exception XDocletException if an error occurs @doc.tag type="block"
[ "Processes", "the", "template", "for", "all", "field", "definitions", "of", "the", "current", "class", "definition", "(", "including", "inherited", "ones", "if", "required", ")" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java#L791-L803
aws/aws-sdk-java
aws-java-sdk-simpledb/src/main/java/com/amazonaws/services/simpledb/util/SimpleDBUtils.java
SimpleDBUtils.decodeRealNumberRangeLong
public static long decodeRealNumberRangeLong(String value, long offsetValue) { """ Decodes a long value from the string representation that was created by using encodeRealNumberRange(..) function. @param value string representation of the long value @param offsetValue offset value that was used in the origi...
java
public static long decodeRealNumberRangeLong(String value, long offsetValue) { long offsetNumber = Long.parseLong(value, 10); return (long) (offsetNumber - offsetValue); }
[ "public", "static", "long", "decodeRealNumberRangeLong", "(", "String", "value", ",", "long", "offsetValue", ")", "{", "long", "offsetNumber", "=", "Long", ".", "parseLong", "(", "value", ",", "10", ")", ";", "return", "(", "long", ")", "(", "offsetNumber", ...
Decodes a long value from the string representation that was created by using encodeRealNumberRange(..) function. @param value string representation of the long value @param offsetValue offset value that was used in the original encoding @return original long value
[ "Decodes", "a", "long", "value", "from", "the", "string", "representation", "that", "was", "created", "by", "using", "encodeRealNumberRange", "(", "..", ")", "function", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-simpledb/src/main/java/com/amazonaws/services/simpledb/util/SimpleDBUtils.java#L256-L259
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/script/common/ImplicitObjectUtil.java
ImplicitObjectUtil.loadFacesBackingBean
public static void loadFacesBackingBean(ServletRequest request, FacesBackingBean facesBackingBean) { """ Load the JSF backing bean into the request. @param request the request @param facesBackingBean the JSF backing bean """ if(facesBackingBean != null) request.setAttribute(BACKING_IMPLIC...
java
public static void loadFacesBackingBean(ServletRequest request, FacesBackingBean facesBackingBean) { if(facesBackingBean != null) request.setAttribute(BACKING_IMPLICIT_OBJECT_KEY, facesBackingBean); }
[ "public", "static", "void", "loadFacesBackingBean", "(", "ServletRequest", "request", ",", "FacesBackingBean", "facesBackingBean", ")", "{", "if", "(", "facesBackingBean", "!=", "null", ")", "request", ".", "setAttribute", "(", "BACKING_IMPLICIT_OBJECT_KEY", ",", "fac...
Load the JSF backing bean into the request. @param request the request @param facesBackingBean the JSF backing bean
[ "Load", "the", "JSF", "backing", "bean", "into", "the", "request", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/script/common/ImplicitObjectUtil.java#L118-L121
primefaces-extensions/core
src/main/java/org/primefaces/extensions/component/sheet/Sheet.java
Sheet.getRenderValueForCell
public String getRenderValueForCell(final FacesContext context, final String rowKey, final int col) { """ Gets the render string for the value the given cell. Applys the available converters to convert the value. @param context @param rowKey @param col @return """ // if we have a submitted value...
java
public String getRenderValueForCell(final FacesContext context, final String rowKey, final int col) { // if we have a submitted value still, use it // note: can't check for null, as null may be the submitted value final SheetRowColIndex index = new SheetRowColIndex(rowKey, col); if (sub...
[ "public", "String", "getRenderValueForCell", "(", "final", "FacesContext", "context", ",", "final", "String", "rowKey", ",", "final", "int", "col", ")", "{", "// if we have a submitted value still, use it", "// note: can't check for null, as null may be the submitted value", "f...
Gets the render string for the value the given cell. Applys the available converters to convert the value. @param context @param rowKey @param col @return
[ "Gets", "the", "render", "string", "for", "the", "value", "the", "given", "cell", ".", "Applys", "the", "available", "converters", "to", "convert", "the", "value", "." ]
train
https://github.com/primefaces-extensions/core/blob/afdbca591f60f47898e3517e1e939bc2f63d5355/src/main/java/org/primefaces/extensions/component/sheet/Sheet.java#L363-L385
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/seo/CmsSeoOptionsDialog.java
CmsSeoOptionsDialog.loadAliases
public static void loadAliases(final CmsUUID structureId, final AsyncCallback<List<CmsAliasBean>> callback) { """ Loads the aliases for a given page.<p> @param structureId the structure id of the page @param callback the callback for the loaded aliases """ final CmsRpcAction<List<CmsAliasBean>> ...
java
public static void loadAliases(final CmsUUID structureId, final AsyncCallback<List<CmsAliasBean>> callback) { final CmsRpcAction<List<CmsAliasBean>> action = new CmsRpcAction<List<CmsAliasBean>>() { @Override public void execute() { start(200, true); ...
[ "public", "static", "void", "loadAliases", "(", "final", "CmsUUID", "structureId", ",", "final", "AsyncCallback", "<", "List", "<", "CmsAliasBean", ">", ">", "callback", ")", "{", "final", "CmsRpcAction", "<", "List", "<", "CmsAliasBean", ">", ">", "action", ...
Loads the aliases for a given page.<p> @param structureId the structure id of the page @param callback the callback for the loaded aliases
[ "Loads", "the", "aliases", "for", "a", "given", "page", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/seo/CmsSeoOptionsDialog.java#L186-L205
loldevs/riotapi
rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java
ThrottledApiHandler.getStatsSummary
public Future<List<PlayerStats>> getStatsSummary(long summoner, Season season) { """ Get player stats for the player @param summoner The id of the summoner @param season The season @return The player's stats @see <a href=https://developer.riotgames.com/api/methods#!/622/1938>Official API documentation</a> ...
java
public Future<List<PlayerStats>> getStatsSummary(long summoner, Season season) { return new ApiFuture<>(() -> handler.getStatsSummary(summoner, season)); }
[ "public", "Future", "<", "List", "<", "PlayerStats", ">", ">", "getStatsSummary", "(", "long", "summoner", ",", "Season", "season", ")", "{", "return", "new", "ApiFuture", "<>", "(", "(", ")", "->", "handler", ".", "getStatsSummary", "(", "summoner", ",", ...
Get player stats for the player @param summoner The id of the summoner @param season The season @return The player's stats @see <a href=https://developer.riotgames.com/api/methods#!/622/1938>Official API documentation</a>
[ "Get", "player", "stats", "for", "the", "player" ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java#L1076-L1078
undertow-io/undertow
core/src/main/java/io/undertow/websockets/core/protocol/version07/Base64.java
Base64.encodeBytes
public static String encodeBytes(byte[] source, int options) throws java.io.IOException { """ Encodes a byte array into Base64 notation. <p> Example options: <pre> GZIP: gzip-compresses object before encoding it. DO_BREAK_LINES: break lines at 76 characters <i>Note: Technically, this makes your encoding no...
java
public static String encodeBytes(byte[] source, int options) throws java.io.IOException { return encodeBytes(source, 0, source.length, options); }
[ "public", "static", "String", "encodeBytes", "(", "byte", "[", "]", "source", ",", "int", "options", ")", "throws", "java", ".", "io", ".", "IOException", "{", "return", "encodeBytes", "(", "source", ",", "0", ",", "source", ".", "length", ",", "options"...
Encodes a byte array into Base64 notation. <p> Example options: <pre> GZIP: gzip-compresses object before encoding it. DO_BREAK_LINES: break lines at 76 characters <i>Note: Technically, this makes your encoding non-compliant.</i> </pre> <p> Example: <code>encodeBytes( myData, Base64.GZIP )</code> or <p> Example: <code...
[ "Encodes", "a", "byte", "array", "into", "Base64", "notation", ".", "<p", ">", "Example", "options", ":" ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/websockets/core/protocol/version07/Base64.java#L691-L693
scireum/server-sass
src/main/java/org/serversass/ast/FunctionCall.java
FunctionCall.appendNameAndParameters
protected static void appendNameAndParameters(StringBuilder sb, String name, List<Expression> parameters) { """ Appends the name and parameters to the given string builder. @param sb the target to write the output to @param name the name of the function @param parameters the list of parameters ...
java
protected static void appendNameAndParameters(StringBuilder sb, String name, List<Expression> parameters) { sb.append(name); sb.append("("); boolean first = true; for (Expression expr : parameters) { if (!first) { sb.append(", "); } fir...
[ "protected", "static", "void", "appendNameAndParameters", "(", "StringBuilder", "sb", ",", "String", "name", ",", "List", "<", "Expression", ">", "parameters", ")", "{", "sb", ".", "append", "(", "name", ")", ";", "sb", ".", "append", "(", "\"(\"", ")", ...
Appends the name and parameters to the given string builder. @param sb the target to write the output to @param name the name of the function @param parameters the list of parameters
[ "Appends", "the", "name", "and", "parameters", "to", "the", "given", "string", "builder", "." ]
train
https://github.com/scireum/server-sass/blob/e74af983567f10c43420d70cd31165dd080ba8fc/src/main/java/org/serversass/ast/FunctionCall.java#L48-L60
mcaserta/spring-crypto-utils
src/main/java/com/springcryptoutils/core/key/PrivateKeyRegistryByAliasImpl.java
PrivateKeyRegistryByAliasImpl.get
public PrivateKey get(KeyStoreChooser keyStoreChooser, PrivateKeyChooserByAlias privateKeyChooserByAlias) { """ Returns the selected private key or null if not found. @param keyStoreChooser the keystore chooser @param privateKeyChooserByAlias the private key chooser by alias @return the selected priv...
java
public PrivateKey get(KeyStoreChooser keyStoreChooser, PrivateKeyChooserByAlias privateKeyChooserByAlias) { CacheKey cacheKey = new CacheKey(keyStoreChooser.getKeyStoreName(), privateKeyChooserByAlias.getAlias()); PrivateKey retrievedPrivateKey = cache.get(cacheKey); if (retrievedPrivateKey != ...
[ "public", "PrivateKey", "get", "(", "KeyStoreChooser", "keyStoreChooser", ",", "PrivateKeyChooserByAlias", "privateKeyChooserByAlias", ")", "{", "CacheKey", "cacheKey", "=", "new", "CacheKey", "(", "keyStoreChooser", ".", "getKeyStoreName", "(", ")", ",", "privateKeyCho...
Returns the selected private key or null if not found. @param keyStoreChooser the keystore chooser @param privateKeyChooserByAlias the private key chooser by alias @return the selected private key or null if not found
[ "Returns", "the", "selected", "private", "key", "or", "null", "if", "not", "found", "." ]
train
https://github.com/mcaserta/spring-crypto-utils/blob/1dbf6211542fb1e3f9297941d691e7e89cc72c46/src/main/java/com/springcryptoutils/core/key/PrivateKeyRegistryByAliasImpl.java#L53-L82
wdullaer/SwipeActionAdapter
library/src/main/java/com/wdullaer/swipeactionadapter/SwipeActionAdapter.java
SwipeActionAdapter.hasActions
@Override public boolean hasActions(int position, SwipeDirection direction) { """ SwipeActionTouchListener.ActionCallbacks callback We just link it through to our own interface @param position the position of the item that was swiped @param direction the direction in which the swipe has happened @return ...
java
@Override public boolean hasActions(int position, SwipeDirection direction){ return mSwipeActionListener != null && mSwipeActionListener.hasActions(position, direction); }
[ "@", "Override", "public", "boolean", "hasActions", "(", "int", "position", ",", "SwipeDirection", "direction", ")", "{", "return", "mSwipeActionListener", "!=", "null", "&&", "mSwipeActionListener", ".", "hasActions", "(", "position", ",", "direction", ")", ";", ...
SwipeActionTouchListener.ActionCallbacks callback We just link it through to our own interface @param position the position of the item that was swiped @param direction the direction in which the swipe has happened @return boolean indicating whether the item has actions
[ "SwipeActionTouchListener", ".", "ActionCallbacks", "callback", "We", "just", "link", "it", "through", "to", "our", "own", "interface" ]
train
https://github.com/wdullaer/SwipeActionAdapter/blob/24a7e2ed953ac11ea0d8875d375bba571ffeba55/library/src/main/java/com/wdullaer/swipeactionadapter/SwipeActionAdapter.java#L76-L79
rolfl/MicroBench
src/main/java/net/tuis/ubench/UBench.java
UBench.press
public UReport press(UMode mode, final long timeLimit, final TimeUnit timeUnit) { """ Benchmark all added tasks until they exceed the set time limit @param mode The UMode execution model to use for task execution @param timeLimit combined with the timeUnit, indicates how long to run tests for. A value less ...
java
public UReport press(UMode mode, final long timeLimit, final TimeUnit timeUnit) { return press(mode, 0, 0, 0.0, timeLimit, timeUnit); }
[ "public", "UReport", "press", "(", "UMode", "mode", ",", "final", "long", "timeLimit", ",", "final", "TimeUnit", "timeUnit", ")", "{", "return", "press", "(", "mode", ",", "0", ",", "0", ",", "0.0", ",", "timeLimit", ",", "timeUnit", ")", ";", "}" ]
Benchmark all added tasks until they exceed the set time limit @param mode The UMode execution model to use for task execution @param timeLimit combined with the timeUnit, indicates how long to run tests for. A value less than or equal to 0 turns off this check. @param timeUnit combined with the timeLimit, indicates h...
[ "Benchmark", "all", "added", "tasks", "until", "they", "exceed", "the", "set", "time", "limit" ]
train
https://github.com/rolfl/MicroBench/blob/f2bfa92dacd7ea0d6b8eae4d4fe2975139d317ce/src/main/java/net/tuis/ubench/UBench.java#L351-L353
Azure/azure-sdk-for-java
iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/implementation/AppsInner.java
AppsInner.beginUpdate
public AppInner beginUpdate(String resourceGroupName, String resourceName, AppPatch appPatch) { """ Update the metadata of an IoT Central application. @param resourceGroupName The name of the resource group that contains the IoT Central application. @param resourceName The ARM resource name of the IoT Central ...
java
public AppInner beginUpdate(String resourceGroupName, String resourceName, AppPatch appPatch) { return beginUpdateWithServiceResponseAsync(resourceGroupName, resourceName, appPatch).toBlocking().single().body(); }
[ "public", "AppInner", "beginUpdate", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "AppPatch", "appPatch", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ",", "appPatch", ")", ".", "t...
Update the metadata of an IoT Central application. @param resourceGroupName The name of the resource group that contains the IoT Central application. @param resourceName The ARM resource name of the IoT Central application. @param appPatch The IoT Central application metadata and security metadata. @throws IllegalArgu...
[ "Update", "the", "metadata", "of", "an", "IoT", "Central", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/implementation/AppsInner.java#L468-L470
Headline/CleverBotAPI-Java
src/main/java/com/michaelwflaherty/cleverbotapi/CleverBotQuery.java
CleverBotQuery.sendRequest
public void sendRequest() throws IOException { """ Sends request to CleverBot servers. API key and phrase should be set prior to this call @throws IOException exception upon query failure """ /* Create & Format URL */ URL url = new URL(CleverBotQuery.formatRequest(CleverBotQuery.URL_STRING, ...
java
public void sendRequest() throws IOException { /* Create & Format URL */ URL url = new URL(CleverBotQuery.formatRequest(CleverBotQuery.URL_STRING, this.key, this.phrase, this.conversationID)); /* Open Connection */ URLConnection urlConnection = url.openConnection(); /* Read...
[ "public", "void", "sendRequest", "(", ")", "throws", "IOException", "{", "/* Create & Format URL */", "URL", "url", "=", "new", "URL", "(", "CleverBotQuery", ".", "formatRequest", "(", "CleverBotQuery", ".", "URL_STRING", ",", "this", ".", "key", ",", "this", ...
Sends request to CleverBot servers. API key and phrase should be set prior to this call @throws IOException exception upon query failure
[ "Sends", "request", "to", "CleverBot", "servers", ".", "API", "key", "and", "phrase", "should", "be", "set", "prior", "to", "this", "call" ]
train
https://github.com/Headline/CleverBotAPI-Java/blob/fe6818362eec687cdfeb7ee8deb4d2ee19611676/src/main/java/com/michaelwflaherty/cleverbotapi/CleverBotQuery.java#L174-L194
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/FileIoUtil.java
FileIoUtil.readFileFrom
public static List<String> readFileFrom(String _fileName, Charset _charset, SearchOrder... _searchOrder) { """ Read a file from different sources depending on _searchOrder. Will return the first successfully read file which can be loaded either from custom path, classpath or system path. @param _fileName file ...
java
public static List<String> readFileFrom(String _fileName, Charset _charset, SearchOrder... _searchOrder) { InputStream stream = openInputStreamForFile(_fileName, _searchOrder); if (stream != null) { return readTextFileFromStream(stream, _charset, true); } return null; }
[ "public", "static", "List", "<", "String", ">", "readFileFrom", "(", "String", "_fileName", ",", "Charset", "_charset", ",", "SearchOrder", "...", "_searchOrder", ")", "{", "InputStream", "stream", "=", "openInputStreamForFile", "(", "_fileName", ",", "_searchOrde...
Read a file from different sources depending on _searchOrder. Will return the first successfully read file which can be loaded either from custom path, classpath or system path. @param _fileName file to read @param _charset charset used for reading @param _searchOrder search order @return List of String with file cont...
[ "Read", "a", "file", "from", "different", "sources", "depending", "on", "_searchOrder", ".", "Will", "return", "the", "first", "successfully", "read", "file", "which", "can", "be", "loaded", "either", "from", "custom", "path", "classpath", "or", "system", "pat...
train
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/FileIoUtil.java#L476-L482
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/CapabilityRegistry.java
CapabilityRegistry.removePossibleCapability
@Override public CapabilityRegistration<?> removePossibleCapability(Capability capability, PathAddress registrationPoint) { """ Remove a previously registered capability if all registration points for it have been removed. @param capability the capability. Cannot be {@code null} @param registrationP...
java
@Override public CapabilityRegistration<?> removePossibleCapability(Capability capability, PathAddress registrationPoint) { CapabilityId capabilityId = new CapabilityId(capability.getName(), CapabilityScope.GLOBAL); CapabilityRegistration<?> removed = null; writeLock.lock(); try { ...
[ "@", "Override", "public", "CapabilityRegistration", "<", "?", ">", "removePossibleCapability", "(", "Capability", "capability", ",", "PathAddress", "registrationPoint", ")", "{", "CapabilityId", "capabilityId", "=", "new", "CapabilityId", "(", "capability", ".", "get...
Remove a previously registered capability if all registration points for it have been removed. @param capability the capability. Cannot be {@code null} @param registrationPoint the specific registration point that is being removed @return the capability that was removed, or {@code null} if no matching capabilit...
[ "Remove", "a", "previously", "registered", "capability", "if", "all", "registration", "points", "for", "it", "have", "been", "removed", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/CapabilityRegistry.java#L595-L620
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/SightResourcesImpl.java
SightResourcesImpl.copySight
public Sight copySight(long sightId, ContainerDestination destination) throws SmartsheetException { """ Creates s copy of the specified Sight. It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/copy @param sightId the Id of the Sight @param destination the destination to copy to ...
java
public Sight copySight(long sightId, ContainerDestination destination) throws SmartsheetException { return this.createResource("sights/" + sightId + "/copy", Sight.class, destination); }
[ "public", "Sight", "copySight", "(", "long", "sightId", ",", "ContainerDestination", "destination", ")", "throws", "SmartsheetException", "{", "return", "this", ".", "createResource", "(", "\"sights/\"", "+", "sightId", "+", "\"/copy\"", ",", "Sight", ".", "class"...
Creates s copy of the specified Sight. It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/copy @param sightId the Id of the Sight @param destination the destination to copy to @return the newly created Sight resource. @throws IllegalArgumentException if any argument is null or empty string...
[ "Creates", "s", "copy", "of", "the", "specified", "Sight", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SightResourcesImpl.java#L184-L186
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/proxyqueue/impl/ProxyQueueConversationGroupImpl.java
ProxyQueueConversationGroupImpl.createAsynchConsumerProxyQueue
public synchronized AsynchConsumerProxyQueue createAsynchConsumerProxyQueue(OrderingContext oc) throws SIResourceException, SIIncorrectCallException { """ Creates a new asynchronous consumer proxy queue for this group. @throws SIResourceException @throws SIResourceException @throws SII...
java
public synchronized AsynchConsumerProxyQueue createAsynchConsumerProxyQueue(OrderingContext oc) throws SIResourceException, SIIncorrectCallException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createAsynchConsumerProxyQueue"); short id = nex...
[ "public", "synchronized", "AsynchConsumerProxyQueue", "createAsynchConsumerProxyQueue", "(", "OrderingContext", "oc", ")", "throws", "SIResourceException", ",", "SIIncorrectCallException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ...
Creates a new asynchronous consumer proxy queue for this group. @throws SIResourceException @throws SIResourceException @throws SIIncorrectCallException @throws SIIncorrectCallException @throws SIErrorException @throws SIConnectionUnavailableException @throws SISessionUnavailableException @throws SIConnectionDroppedExc...
[ "Creates", "a", "new", "asynchronous", "consumer", "proxy", "queue", "for", "this", "group", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/proxyqueue/impl/ProxyQueueConversationGroupImpl.java#L147-L173
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncMembersInner.java
SyncMembersInner.listBySyncGroupAsync
public Observable<Page<SyncMemberInner>> listBySyncGroupAsync(final String resourceGroupName, final String serverName, final String databaseName, final String syncGroupName) { """ Lists sync members in the given sync group. @param resourceGroupName The name of the resource group that contains the resource. You ...
java
public Observable<Page<SyncMemberInner>> listBySyncGroupAsync(final String resourceGroupName, final String serverName, final String databaseName, final String syncGroupName) { return listBySyncGroupWithServiceResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName) .map(new Func1<Se...
[ "public", "Observable", "<", "Page", "<", "SyncMemberInner", ">", ">", "listBySyncGroupAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "serverName", ",", "final", "String", "databaseName", ",", "final", "String", "syncGroupName", ")", ...
Lists sync members in the given sync group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database on which the sync group is ...
[ "Lists", "sync", "members", "in", "the", "given", "sync", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncMembersInner.java#L908-L916
calimero-project/calimero-core
src/tuwien/auto/calimero/xml/XmlOutputFactory.java
XmlOutputFactory.createXMLWriter
public XmlWriter createXMLWriter(final String systemId) throws KNXMLException { """ Creates a {@link XmlWriter} to write into the XML resource located by the specified identifier. @param systemId location identifier of the XML resource @return XML writer @throws KNXMLException if creation of the writer failed...
java
public XmlWriter createXMLWriter(final String systemId) throws KNXMLException { final XmlResolver res = new XmlResolver(); final OutputStream os = res.resolveOutput(systemId); return create(os, true); }
[ "public", "XmlWriter", "createXMLWriter", "(", "final", "String", "systemId", ")", "throws", "KNXMLException", "{", "final", "XmlResolver", "res", "=", "new", "XmlResolver", "(", ")", ";", "final", "OutputStream", "os", "=", "res", ".", "resolveOutput", "(", "...
Creates a {@link XmlWriter} to write into the XML resource located by the specified identifier. @param systemId location identifier of the XML resource @return XML writer @throws KNXMLException if creation of the writer failed or XML resource can't be resolved
[ "Creates", "a", "{", "@link", "XmlWriter", "}", "to", "write", "into", "the", "XML", "resource", "located", "by", "the", "specified", "identifier", "." ]
train
https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/xml/XmlOutputFactory.java#L74-L79
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.deleteResource
protected void deleteResource(CmsDbContext dbc, CmsResource resource, CmsResource.CmsResourceDeleteMode siblingMode) throws CmsException { """ Internal recursive method for deleting a resource.<p> @param dbc the db context @param resource the name of the resource to delete (full path) @param siblingMode i...
java
protected void deleteResource(CmsDbContext dbc, CmsResource resource, CmsResource.CmsResourceDeleteMode siblingMode) throws CmsException { if (resource.isFolder()) { // collect all resources in the folder (but exclude deleted ones) List<CmsResource> resources = m_driverManager.readC...
[ "protected", "void", "deleteResource", "(", "CmsDbContext", "dbc", ",", "CmsResource", "resource", ",", "CmsResource", ".", "CmsResourceDeleteMode", "siblingMode", ")", "throws", "CmsException", "{", "if", "(", "resource", ".", "isFolder", "(", ")", ")", "{", "/...
Internal recursive method for deleting a resource.<p> @param dbc the db context @param resource the name of the resource to delete (full path) @param siblingMode indicates how to handle siblings of the deleted resource @throws CmsException if something goes wrong
[ "Internal", "recursive", "method", "for", "deleting", "a", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L7142-L7178
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/convert/GlConverter.java
GlConverter.setString
public int setString(String strString, boolean bDisplayOption, int moveMode) // init this field override for other value { """ Convert and move string to this field. Override this method to convert the String to the actual Physical Data Type. @param strString the state to set the data to. @pa...
java
public int setString(String strString, boolean bDisplayOption, int moveMode) // init this field override for other value { // By default, move the data as-is String string = Constants.BLANK; int fieldLength = strString.length(); for (int source = 0; source < (int)fieldLeng...
[ "public", "int", "setString", "(", "String", "strString", ",", "boolean", "bDisplayOption", ",", "int", "moveMode", ")", "// init this field override for other value", "{", "// By default, move the data as-is", "String", "string", "=", "Constants", ".", "BLANK", ";", "i...
Convert and move string to this field. Override this method to convert the String to the actual Physical Data Type. @param strString the state to set the data to. @param bDisplayOption Display the data on the screen if true. @param iMoveMode INIT, SCREEN, or READ move mode. @return The error code.
[ "Convert", "and", "move", "string", "to", "this", "field", ".", "Override", "this", "method", "to", "convert", "the", "String", "to", "the", "actual", "Physical", "Data", "Type", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/convert/GlConverter.java#L78-L91
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java
FacebookRestClient.data_setCookie
public boolean data_setCookie(Integer userId, CharSequence cookieName, CharSequence cookieValue) throws FacebookException, IOException { """ Sets a cookie for a given user and application. @param userId The user for whom this cookie needs to be set @param cookieName Name of the cookie. @param cookieValue Va...
java
public boolean data_setCookie(Integer userId, CharSequence cookieName, CharSequence cookieValue) throws FacebookException, IOException { return data_setCookie(userId, cookieName, cookieValue, /*expiresTimestamp*/null, /*path*/ null); }
[ "public", "boolean", "data_setCookie", "(", "Integer", "userId", ",", "CharSequence", "cookieName", ",", "CharSequence", "cookieValue", ")", "throws", "FacebookException", ",", "IOException", "{", "return", "data_setCookie", "(", "userId", ",", "cookieName", ",", "c...
Sets a cookie for a given user and application. @param userId The user for whom this cookie needs to be set @param cookieName Name of the cookie. @param cookieValue Value of the cookie. @return true if cookie was successfully set, false otherwise @see <a href="http://wiki.developers.facebook.com/index.php/Data.getCooki...
[ "Sets", "a", "cookie", "for", "a", "given", "user", "and", "application", "." ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java#L2317-L2320
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/HadoopUtils.java
HadoopUtils.deserializeWriterDirPermissions
public static FsPermission deserializeWriterDirPermissions(State state, int numBranches, int branchId) { """ Deserializes a {@link FsPermission}s object that should be used when a {@link DataWriter} is creating directories. """ return new FsPermission(state.getPropAsShortWithRadix( ForkOperatorUtil...
java
public static FsPermission deserializeWriterDirPermissions(State state, int numBranches, int branchId) { return new FsPermission(state.getPropAsShortWithRadix( ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.WRITER_DIR_PERMISSIONS, numBranches, branchId), FsPermission.getDefault().toSho...
[ "public", "static", "FsPermission", "deserializeWriterDirPermissions", "(", "State", "state", ",", "int", "numBranches", ",", "int", "branchId", ")", "{", "return", "new", "FsPermission", "(", "state", ".", "getPropAsShortWithRadix", "(", "ForkOperatorUtils", ".", "...
Deserializes a {@link FsPermission}s object that should be used when a {@link DataWriter} is creating directories.
[ "Deserializes", "a", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/HadoopUtils.java#L894-L898
Azure/azure-sdk-for-java
privatedns/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/privatedns/v2018_09_01/implementation/RecordSetsInner.java
RecordSetsInner.listAsync
public Observable<Page<RecordSetInner>> listAsync(final String resourceGroupName, final String privateZoneName) { """ Lists all record sets in a Private DNS zone. @param resourceGroupName The name of the resource group. @param privateZoneName The name of the Private DNS zone (without a terminating dot). @thro...
java
public Observable<Page<RecordSetInner>> listAsync(final String resourceGroupName, final String privateZoneName) { return listWithServiceResponseAsync(resourceGroupName, privateZoneName) .map(new Func1<ServiceResponse<Page<RecordSetInner>>, Page<RecordSetInner>>() { @Override ...
[ "public", "Observable", "<", "Page", "<", "RecordSetInner", ">", ">", "listAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "privateZoneName", ")", "{", "return", "listWithServiceResponseAsync", "(", "resourceGroupName", ",", "privateZoneNa...
Lists all record sets in a Private DNS zone. @param resourceGroupName The name of the resource group. @param privateZoneName The name of the Private DNS zone (without a terminating dot). @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;RecordSetInner&...
[ "Lists", "all", "record", "sets", "in", "a", "Private", "DNS", "zone", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/privatedns/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/privatedns/v2018_09_01/implementation/RecordSetsInner.java#L1147-L1155
igniterealtime/Smack
smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/TranscriptManager.java
TranscriptManager.getTranscripts
public Transcripts getTranscripts(EntityBareJid workgroupJID, Jid userID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Returns the transcripts of a given user. The answer will contain the complete history of conversations that a user had. @param userID the i...
java
public Transcripts getTranscripts(EntityBareJid workgroupJID, Jid userID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Transcripts request = new Transcripts(userID); request.setTo(workgroupJID); Transcripts response = connection.createStanzaCollec...
[ "public", "Transcripts", "getTranscripts", "(", "EntityBareJid", "workgroupJID", ",", "Jid", "userID", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "Transcripts", "request", "=", "new", ...
Returns the transcripts of a given user. The answer will contain the complete history of conversations that a user had. @param userID the id of the user to get his conversations. @param workgroupJID the JID of the workgroup that will process the request. @return the transcripts of a given user. @throws XMPPErrorExcept...
[ "Returns", "the", "transcripts", "of", "a", "given", "user", ".", "The", "answer", "will", "contain", "the", "complete", "history", "of", "conversations", "that", "a", "user", "had", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/TranscriptManager.java#L75-L80
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/security/impl/BasicEvaluationCtx.java
BasicEvaluationCtx.mapAttributes
private void mapAttributes(List<Attribute> input, Map<String, List<Attribute>> output) { """ Generic routine for resource, attribute and environment attributes to build the lookup map for each. The Form is a Map that is indexed by the String form of the attribute ids, and that contains Sets at each entry with a...
java
private void mapAttributes(List<Attribute> input, Map<String, List<Attribute>> output) { Iterator<Attribute> it = input.iterator(); while (it.hasNext()) { Attribute attr = it.next(); String id = attr.getId().toString(); if (output.containsKey(id)) { L...
[ "private", "void", "mapAttributes", "(", "List", "<", "Attribute", ">", "input", ",", "Map", "<", "String", ",", "List", "<", "Attribute", ">", ">", "output", ")", "{", "Iterator", "<", "Attribute", ">", "it", "=", "input", ".", "iterator", "(", ")", ...
Generic routine for resource, attribute and environment attributes to build the lookup map for each. The Form is a Map that is indexed by the String form of the attribute ids, and that contains Sets at each entry with all attributes that have that id
[ "Generic", "routine", "for", "resource", "attribute", "and", "environment", "attributes", "to", "build", "the", "lookup", "map", "for", "each", ".", "The", "Form", "is", "a", "Map", "that", "is", "indexed", "by", "the", "String", "form", "of", "the", "attr...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/impl/BasicEvaluationCtx.java#L360-L375
greenmail-mail-test/greenmail
greenmail-core/src/main/java/com/icegreen/greenmail/imap/ImapRequestLineReader.java
ImapRequestLineReader.eol
public void eol() throws ProtocolException { """ Moves the request line reader to end of the line, checking that no non-space character are found. @throws ProtocolException If more non-space tokens are found in this line, or the end-of-file is reached. """ char next = nextChar(); // Ig...
java
public void eol() throws ProtocolException { char next = nextChar(); // Ignore trailing spaces. while (next == ' ') { consume(); next = nextChar(); } // handle DOS and unix end-of-lines if (next == '\r') { consume(); ...
[ "public", "void", "eol", "(", ")", "throws", "ProtocolException", "{", "char", "next", "=", "nextChar", "(", ")", ";", "// Ignore trailing spaces.\r", "while", "(", "next", "==", "'", "'", ")", "{", "consume", "(", ")", ";", "next", "=", "nextChar", "(",...
Moves the request line reader to end of the line, checking that no non-space character are found. @throws ProtocolException If more non-space tokens are found in this line, or the end-of-file is reached.
[ "Moves", "the", "request", "line", "reader", "to", "end", "of", "the", "line", "checking", "that", "no", "non", "-", "space", "character", "are", "found", "." ]
train
https://github.com/greenmail-mail-test/greenmail/blob/6d19a62233d1ef6fedbbd1f6fdde2d28e713834a/greenmail-core/src/main/java/com/icegreen/greenmail/imap/ImapRequestLineReader.java#L104-L124
wdullaer/SwipeActionAdapter
library/src/main/java/com/wdullaer/swipeactionadapter/SwipeActionAdapter.java
SwipeActionAdapter.addBackground
public SwipeActionAdapter addBackground(SwipeDirection key, int resId) { """ Add a background image for a certain callback. The key for the background must be one of the directions from the SwipeDirections class. @param key the identifier of the callback for which this resource should be shown @param resId th...
java
public SwipeActionAdapter addBackground(SwipeDirection key, int resId){ if(SwipeDirection.getAllDirections().contains(key)) mBackgroundResIds.put(key,resId); return this; }
[ "public", "SwipeActionAdapter", "addBackground", "(", "SwipeDirection", "key", ",", "int", "resId", ")", "{", "if", "(", "SwipeDirection", ".", "getAllDirections", "(", ")", ".", "contains", "(", "key", ")", ")", "mBackgroundResIds", ".", "put", "(", "key", ...
Add a background image for a certain callback. The key for the background must be one of the directions from the SwipeDirections class. @param key the identifier of the callback for which this resource should be shown @param resId the resource Id of the background to add @return A reference to the current instance so ...
[ "Add", "a", "background", "image", "for", "a", "certain", "callback", ".", "The", "key", "for", "the", "background", "must", "be", "one", "of", "the", "directions", "from", "the", "SwipeDirections", "class", "." ]
train
https://github.com/wdullaer/SwipeActionAdapter/blob/24a7e2ed953ac11ea0d8875d375bba571ffeba55/library/src/main/java/com/wdullaer/swipeactionadapter/SwipeActionAdapter.java#L243-L246
phax/ph-schedule
ph-mini-quartz/src/main/java/com/helger/quartz/impl/calendar/DailyCalendar.java
DailyCalendar.setTimeRange
public final void setTimeRange (final Calendar rangeStartingCalendar, final Calendar rangeEndingCalendar) { """ Sets the time range for the <CODE>DailyCalendar</CODE> to the times represented in the specified <CODE>Calendar</CODE>s. @param rangeStartingCalendar a Calendar containing the start time for the <C...
java
public final void setTimeRange (final Calendar rangeStartingCalendar, final Calendar rangeEndingCalendar) { setTimeRange (rangeStartingCalendar.get (Calendar.HOUR_OF_DAY), rangeStartingCalendar.get (Calendar.MINUTE), rangeStartingCalendar.get (Calendar.SECOND), ...
[ "public", "final", "void", "setTimeRange", "(", "final", "Calendar", "rangeStartingCalendar", ",", "final", "Calendar", "rangeEndingCalendar", ")", "{", "setTimeRange", "(", "rangeStartingCalendar", ".", "get", "(", "Calendar", ".", "HOUR_OF_DAY", ")", ",", "rangeSt...
Sets the time range for the <CODE>DailyCalendar</CODE> to the times represented in the specified <CODE>Calendar</CODE>s. @param rangeStartingCalendar a Calendar containing the start time for the <CODE>DailyCalendar</CODE> @param rangeEndingCalendar a Calendar containing the end time for the <CODE>DailyCalendar</CODE>
[ "Sets", "the", "time", "range", "for", "the", "<CODE", ">", "DailyCalendar<", "/", "CODE", ">", "to", "the", "times", "represented", "in", "the", "specified", "<CODE", ">", "Calendar<", "/", "CODE", ">", "s", "." ]
train
https://github.com/phax/ph-schedule/blob/b000790b46a9f8d23ad44cc20591f753d07c0229/ph-mini-quartz/src/main/java/com/helger/quartz/impl/calendar/DailyCalendar.java#L887-L897
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/websphere/logging/hpel/reader/RepositoryReaderImpl.java
RepositoryReaderImpl.getLogLists
@Override public Iterable<ServerInstanceLogRecordList> getLogLists(RepositoryPointer after) { """ returns log records from the binary repository that are within the date range and which satisfy condition of the filter as specified by the parameters. @param after pointer to the a repository location where th...
java
@Override public Iterable<ServerInstanceLogRecordList> getLogLists(RepositoryPointer after) { return getLogLists(after, (Date) null, (LogRecordHeaderFilter) null); }
[ "@", "Override", "public", "Iterable", "<", "ServerInstanceLogRecordList", ">", "getLogLists", "(", "RepositoryPointer", "after", ")", "{", "return", "getLogLists", "(", "after", ",", "(", "Date", ")", "null", ",", "(", "LogRecordHeaderFilter", ")", "null", ")",...
returns log records from the binary repository that are within the date range and which satisfy condition of the filter as specified by the parameters. @param after pointer to the a repository location where the query should start. Only includes records after this point @return the iterable instance of a list of log r...
[ "returns", "log", "records", "from", "the", "binary", "repository", "that", "are", "within", "the", "date", "range", "and", "which", "satisfy", "condition", "of", "the", "filter", "as", "specified", "by", "the", "parameters", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/websphere/logging/hpel/reader/RepositoryReaderImpl.java#L370-L373
JodaOrg/joda-time
src/main/java/org/joda/time/base/BasePeriod.java
BasePeriod.checkAndUpdate
private void checkAndUpdate(DurationFieldType type, int[] values, int newValue) { """ Checks whether a field type is supported, and if so adds the new value to the relevant index in the specified array. @param type the field type @param values the array to update @param newValue the new value to store if ...
java
private void checkAndUpdate(DurationFieldType type, int[] values, int newValue) { int index = indexOf(type); if (index == -1) { if (newValue != 0) { throw new IllegalArgumentException( "Period does not support field '" + type.getName() + "'"); ...
[ "private", "void", "checkAndUpdate", "(", "DurationFieldType", "type", ",", "int", "[", "]", "values", ",", "int", "newValue", ")", "{", "int", "index", "=", "indexOf", "(", "type", ")", ";", "if", "(", "index", "==", "-", "1", ")", "{", "if", "(", ...
Checks whether a field type is supported, and if so adds the new value to the relevant index in the specified array. @param type the field type @param values the array to update @param newValue the new value to store if successful
[ "Checks", "whether", "a", "field", "type", "is", "supported", "and", "if", "so", "adds", "the", "new", "value", "to", "the", "relevant", "index", "in", "the", "specified", "array", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/base/BasePeriod.java#L389-L399
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/utils/EventUtils.java
EventUtils.getAddressForUrl
public static String getAddressForUrl(String address, boolean resolveForIp) { """ Extract host name from the given endpoint URI. @see <a href="http://tools.ietf.org/html/rfc3986#section-3">RFC 3986, Section 3</a> @param address endpoint URI or bare IP address. @param resolveForIp dummy. @return host name ...
java
public static String getAddressForUrl(String address, boolean resolveForIp) { if (address == null) { return null; } // drop schema int pos = address.indexOf("://"); if (pos > 0) { address = address.substring(pos + 3); } // drop user authe...
[ "public", "static", "String", "getAddressForUrl", "(", "String", "address", ",", "boolean", "resolveForIp", ")", "{", "if", "(", "address", "==", "null", ")", "{", "return", "null", ";", "}", "// drop schema", "int", "pos", "=", "address", ".", "indexOf", ...
Extract host name from the given endpoint URI. @see <a href="http://tools.ietf.org/html/rfc3986#section-3">RFC 3986, Section 3</a> @param address endpoint URI or bare IP address. @param resolveForIp dummy. @return host name contained in the URI.
[ "Extract", "host", "name", "from", "the", "given", "endpoint", "URI", ".", "@see", "<a", "href", "=", "http", ":", "//", "tools", ".", "ietf", ".", "org", "/", "html", "/", "rfc3986#section", "-", "3", ">", "RFC", "3986", "Section", "3<", "/", "a", ...
train
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/utils/EventUtils.java#L34-L59
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/ManagementResources.java
ManagementResources.updateWardenSuspensionLevelsAndDurations
@PUT @Path("/wardensuspensionlevelsanddurations") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @Description("Updates warden infraction level counts and suspension durations.") public Response updateWardenSuspensionLevelsAndDurations(@Context HttpServletRequest req, Map...
java
@PUT @Path("/wardensuspensionlevelsanddurations") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @Description("Updates warden infraction level counts and suspension durations.") public Response updateWardenSuspensionLevelsAndDurations(@Context HttpServletRequest req, Map...
[ "@", "PUT", "@", "Path", "(", "\"/wardensuspensionlevelsanddurations\"", ")", "@", "Consumes", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "Produces", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "Description", "(", "\"Updates warden infraction level ...
Updates warden suspension levels. @param req The HTTP request. @param infractionCounts Warden suspension levels. @return Response object indicating whether the operation was successful or not. @throws IllegalArgumentException WebApplicationException.
[ "Updates", "warden", "suspension", "levels", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/ManagementResources.java#L189-L201
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/Hdf5Archive.java
Hdf5Archive.readAttributeAsJson
public String readAttributeAsJson(String attributeName, String... groups) throws UnsupportedKerasConfigurationException { """ Read JSON-formatted string attribute from group path. @param attributeName Name of attribute @param groups Array of zero or more ancestor groups from root to parent. ...
java
public String readAttributeAsJson(String attributeName, String... groups) throws UnsupportedKerasConfigurationException { synchronized (Hdf5Archive.LOCK_OBJECT) { if (groups.length == 0) { Attribute a = this.file.openAttribute(attributeName); String s = re...
[ "public", "String", "readAttributeAsJson", "(", "String", "attributeName", ",", "String", "...", "groups", ")", "throws", "UnsupportedKerasConfigurationException", "{", "synchronized", "(", "Hdf5Archive", ".", "LOCK_OBJECT", ")", "{", "if", "(", "groups", ".", "leng...
Read JSON-formatted string attribute from group path. @param attributeName Name of attribute @param groups Array of zero or more ancestor groups from root to parent. @return HDF5 attribute as JSON @throws UnsupportedKerasConfigurationException Unsupported Keras config
[ "Read", "JSON", "-", "formatted", "string", "attribute", "from", "group", "path", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/Hdf5Archive.java#L126-L142
nohana/Amalgam
amalgam/src/main/java/com/amalgam/os/BundleUtils.java
BundleUtils.optFloatArray
@Nullable public static float[] optFloatArray(@Nullable Bundle bundle, @Nullable String key) { """ Returns a optional float array value. In other words, returns the value mapped by key if it exists and is a float array. The bundle argument is allowed to be {@code null}. If the bundle is null, this method retu...
java
@Nullable public static float[] optFloatArray(@Nullable Bundle bundle, @Nullable String key) { return optFloatArray(bundle, key, new float[0]); }
[ "@", "Nullable", "public", "static", "float", "[", "]", "optFloatArray", "(", "@", "Nullable", "Bundle", "bundle", ",", "@", "Nullable", "String", "key", ")", "{", "return", "optFloatArray", "(", "bundle", ",", "key", ",", "new", "float", "[", "0", "]", ...
Returns a optional float array value. In other words, returns the value mapped by key if it exists and is a float array. The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns null. @param bundle a bundle. If the bundle is null, this method will return null. @param key a key for t...
[ "Returns", "a", "optional", "float", "array", "value", ".", "In", "other", "words", "returns", "the", "value", "mapped", "by", "key", "if", "it", "exists", "and", "is", "a", "float", "array", ".", "The", "bundle", "argument", "is", "allowed", "to", "be",...
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/os/BundleUtils.java#L511-L514
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/util/ShareSheetStyle.java
ShareSheetStyle.setCopyUrlStyle
public ShareSheetStyle setCopyUrlStyle(@DrawableRes int drawableIconID, @StringRes int stringLabelID, @StringRes int stringMessageID) { """ <p> Set the icon, label and success message for copy url option. Default label is "Copy link".</p> @param drawableIconID Resource ID for the drawable to set as the icon fo...
java
public ShareSheetStyle setCopyUrlStyle(@DrawableRes int drawableIconID, @StringRes int stringLabelID, @StringRes int stringMessageID) { copyUrlIcon_ = getDrawable(context_, drawableIconID); copyURlText_ = context_.getResources().getString(stringLabelID); urlCopiedMessage_ = context_.getResources...
[ "public", "ShareSheetStyle", "setCopyUrlStyle", "(", "@", "DrawableRes", "int", "drawableIconID", ",", "@", "StringRes", "int", "stringLabelID", ",", "@", "StringRes", "int", "stringMessageID", ")", "{", "copyUrlIcon_", "=", "getDrawable", "(", "context_", ",", "d...
<p> Set the icon, label and success message for copy url option. Default label is "Copy link".</p> @param drawableIconID Resource ID for the drawable to set as the icon for copy url option. Default icon is system menu_save icon @param stringLabelID Resource ID for the string label the copy url option. Default labe...
[ "<p", ">", "Set", "the", "icon", "label", "and", "success", "message", "for", "copy", "url", "option", ".", "Default", "label", "is", "Copy", "link", ".", "<", "/", "p", ">" ]
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/util/ShareSheetStyle.java#L135-L140
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java
ReviewsImpl.createVideoReviewsAsync
public Observable<List<String>> createVideoReviewsAsync(String teamName, String contentType, List<CreateVideoReviewsBodyItem> createVideoReviewsBody, CreateVideoReviewsOptionalParameter createVideoReviewsOptionalParameter) { """ The reviews created would show up for Reviewers on your team. As Reviewers complete re...
java
public Observable<List<String>> createVideoReviewsAsync(String teamName, String contentType, List<CreateVideoReviewsBodyItem> createVideoReviewsBody, CreateVideoReviewsOptionalParameter createVideoReviewsOptionalParameter) { return createVideoReviewsWithServiceResponseAsync(teamName, contentType, createVideoRev...
[ "public", "Observable", "<", "List", "<", "String", ">", ">", "createVideoReviewsAsync", "(", "String", "teamName", ",", "String", "contentType", ",", "List", "<", "CreateVideoReviewsBodyItem", ">", "createVideoReviewsBody", ",", "CreateVideoReviewsOptionalParameter", "...
The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. &lt;h3&gt;CallBack Schemas &lt;/h3&gt; &lt;h4&gt;Review Completion CallBack Sample&lt;/h4&gt; &lt;p&gt; {&lt;br/&gt; "ReviewId": "&lt;R...
[ "The", "reviews", "created", "would", "show", "up", "for", "Reviewers", "on", "your", "team", ".", "As", "Reviewers", "complete", "reviewing", "results", "of", "the", "Review", "would", "be", "POSTED", "(", "i", ".", "e", ".", "HTTP", "POST", ")", "on", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java#L1979-L1986
google/closure-templates
java/src/com/google/template/soy/soytree/SoyTreeUtils.java
SoyTreeUtils.isDescendantOf
public static boolean isDescendantOf(SoyNode node, SoyNode ancestor) { """ Returns true if {@code node} is a descendant of {@code ancestor}. """ for (; node != null; node = node.getParent()) { if (ancestor == node) { return true; } } return false; }
java
public static boolean isDescendantOf(SoyNode node, SoyNode ancestor) { for (; node != null; node = node.getParent()) { if (ancestor == node) { return true; } } return false; }
[ "public", "static", "boolean", "isDescendantOf", "(", "SoyNode", "node", ",", "SoyNode", "ancestor", ")", "{", "for", "(", ";", "node", "!=", "null", ";", "node", "=", "node", ".", "getParent", "(", ")", ")", "{", "if", "(", "ancestor", "==", "node", ...
Returns true if {@code node} is a descendant of {@code ancestor}.
[ "Returns", "true", "if", "{" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/soytree/SoyTreeUtils.java#L349-L356
maven-nar/nar-maven-plugin
src/main/java/com/github/maven_nar/cpptasks/msvc/MsvcProjectWriter.java
MsvcProjectWriter.writeMessage
private void writeMessage(final Writer writer, final String projectName, final String targtype) throws IOException { """ Writes "This is not a makefile" warning. @param writer Writer writer @param projectName String project name @param targtype String target type @throws IOException if error writing proj...
java
private void writeMessage(final Writer writer, final String projectName, final String targtype) throws IOException { writer.write("!MESSAGE This is not a valid makefile. "); writer.write("To build this project using NMAKE,\r\n"); writer.write("!MESSAGE use the Export Makefile command and run\r\n"); writ...
[ "private", "void", "writeMessage", "(", "final", "Writer", "writer", ",", "final", "String", "projectName", ",", "final", "String", "targtype", ")", "throws", "IOException", "{", "writer", ".", "write", "(", "\"!MESSAGE This is not a valid makefile. \"", ")", ";", ...
Writes "This is not a makefile" warning. @param writer Writer writer @param projectName String project name @param targtype String target type @throws IOException if error writing project
[ "Writes", "This", "is", "not", "a", "makefile", "warning", "." ]
train
https://github.com/maven-nar/nar-maven-plugin/blob/3c622e2024296b4203431bbae3bde290a01dac00/src/main/java/com/github/maven_nar/cpptasks/msvc/MsvcProjectWriter.java#L440-L471
apache/fluo-recipes
modules/core/src/main/java/org/apache/fluo/recipes/core/common/TransientRegistry.java
TransientRegistry.addTransientRange
public void addTransientRange(String id, RowRange range) { """ This method is expected to be called before Fluo is initialized to register transient ranges. """ String start = DatatypeConverter.printHexBinary(range.getStart().toArray()); String end = DatatypeConverter.printHexBinary(range.getEnd().toAr...
java
public void addTransientRange(String id, RowRange range) { String start = DatatypeConverter.printHexBinary(range.getStart().toArray()); String end = DatatypeConverter.printHexBinary(range.getEnd().toArray()); appConfig.setProperty(PREFIX + id, start + ":" + end); }
[ "public", "void", "addTransientRange", "(", "String", "id", ",", "RowRange", "range", ")", "{", "String", "start", "=", "DatatypeConverter", ".", "printHexBinary", "(", "range", ".", "getStart", "(", ")", ".", "toArray", "(", ")", ")", ";", "String", "end"...
This method is expected to be called before Fluo is initialized to register transient ranges.
[ "This", "method", "is", "expected", "to", "be", "called", "before", "Fluo", "is", "initialized", "to", "register", "transient", "ranges", "." ]
train
https://github.com/apache/fluo-recipes/blob/24c11234c9654b16d999437ff49ddc3db86665f8/modules/core/src/main/java/org/apache/fluo/recipes/core/common/TransientRegistry.java#L55-L60
sai-pullabhotla/catatumbo
src/main/java/com/jmethods/catatumbo/impl/Unmarshaller.java
Unmarshaller.initializeEmbedded
private static Object initializeEmbedded(EmbeddedMetadata embeddedMetadata, Object target) { """ Initializes the Embedded object represented by the given metadata. @param embeddedMetadata the metadata of the embedded field @param target the object in which the embedded field is declared/accessible from @ret...
java
private static Object initializeEmbedded(EmbeddedMetadata embeddedMetadata, Object target) { try { ConstructorMetadata constructorMetadata = embeddedMetadata.getConstructorMetadata(); Object embeddedObject = null; if (constructorMetadata.isClassicConstructionStrategy()) { embeddedObject = ...
[ "private", "static", "Object", "initializeEmbedded", "(", "EmbeddedMetadata", "embeddedMetadata", ",", "Object", "target", ")", "{", "try", "{", "ConstructorMetadata", "constructorMetadata", "=", "embeddedMetadata", ".", "getConstructorMetadata", "(", ")", ";", "Object"...
Initializes the Embedded object represented by the given metadata. @param embeddedMetadata the metadata of the embedded field @param target the object in which the embedded field is declared/accessible from @return the initialized object @throws EntityManagerException if any error occurs during initialization of the e...
[ "Initializes", "the", "Embedded", "object", "represented", "by", "the", "given", "metadata", "." ]
train
https://github.com/sai-pullabhotla/catatumbo/blob/96d4c6dce3a5009624f7112a398406914dd19165/src/main/java/com/jmethods/catatumbo/impl/Unmarshaller.java#L353-L367
tvesalainen/util
util/src/main/java/org/vesalainen/util/CmdArgs.java
CmdArgs.addOption
public final <T> void addOption(String name, String description) { """ Add a mandatory string option @param <T> Type of option @param name Option name Option name without @param description Option description """ addOption(String.class, name, description, null); }
java
public final <T> void addOption(String name, String description) { addOption(String.class, name, description, null); }
[ "public", "final", "<", "T", ">", "void", "addOption", "(", "String", "name", ",", "String", "description", ")", "{", "addOption", "(", "String", ".", "class", ",", "name", ",", "description", ",", "null", ")", ";", "}" ]
Add a mandatory string option @param <T> Type of option @param name Option name Option name without @param description Option description
[ "Add", "a", "mandatory", "string", "option" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CmdArgs.java#L320-L323
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/concurrent/ConcurrentUtils.java
ConcurrentUtils.putIfAbsent
public static <K, V> V putIfAbsent(final ConcurrentMap<K, V> map, final K key, final V value) { """ <p> Puts a value in the specified {@code ConcurrentMap} if the key is not yet present. This method works similar to the {@code putIfAbsent()} method of the {@code ConcurrentMap} interface, but the value returned ...
java
public static <K, V> V putIfAbsent(final ConcurrentMap<K, V> map, final K key, final V value) { if (map == null) { return null; } final V result = map.putIfAbsent(key, value); return result != null ? result : value; }
[ "public", "static", "<", "K", ",", "V", ">", "V", "putIfAbsent", "(", "final", "ConcurrentMap", "<", "K", ",", "V", ">", "map", ",", "final", "K", "key", ",", "final", "V", "value", ")", "{", "if", "(", "map", "==", "null", ")", "{", "return", ...
<p> Puts a value in the specified {@code ConcurrentMap} if the key is not yet present. This method works similar to the {@code putIfAbsent()} method of the {@code ConcurrentMap} interface, but the value returned is different. Basically, this method is equivalent to the following code fragment: </p> <pre> if (!map.cont...
[ "<p", ">", "Puts", "a", "value", "in", "the", "specified", "{", "@code", "ConcurrentMap", "}", "if", "the", "key", "is", "not", "yet", "present", ".", "This", "method", "works", "similar", "to", "the", "{", "@code", "putIfAbsent", "()", "}", "method", ...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/concurrent/ConcurrentUtils.java#L245-L252
ModeShape/modeshape
modeshape-schematic/src/main/java/org/modeshape/schematic/DocumentFactory.java
DocumentFactory.newDocument
public static EditableDocument newDocument( String name, Object value ) { """ Create a new editable document, initialized with a single field, that can be used as a new document entry in a SchematicDb or as nested documents for other documents. @param name the na...
java
public static EditableDocument newDocument( String name, Object value ) { return new DocumentEditor(new BasicDocument(name, value), DEFAULT_FACTORY); }
[ "public", "static", "EditableDocument", "newDocument", "(", "String", "name", ",", "Object", "value", ")", "{", "return", "new", "DocumentEditor", "(", "new", "BasicDocument", "(", "name", ",", "value", ")", ",", "DEFAULT_FACTORY", ")", ";", "}" ]
Create a new editable document, initialized with a single field, that can be used as a new document entry in a SchematicDb or as nested documents for other documents. @param name the name of the initial field in the resulting document; if null, the field will not be added to the returned document @param value the valu...
[ "Create", "a", "new", "editable", "document", "initialized", "with", "a", "single", "field", "that", "can", "be", "used", "as", "a", "new", "document", "entry", "in", "a", "SchematicDb", "or", "as", "nested", "documents", "for", "other", "documents", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-schematic/src/main/java/org/modeshape/schematic/DocumentFactory.java#L69-L72
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.newChannel
public Channel newChannel(String name, Orderer orderer, ChannelConfiguration channelConfiguration, byte[]... channelConfigurationSignatures) throws TransactionException, InvalidArgumentException { """ Create a new channel @param name The channel's name @p...
java
public Channel newChannel(String name, Orderer orderer, ChannelConfiguration channelConfiguration, byte[]... channelConfigurationSignatures) throws TransactionException, InvalidArgumentException { clientCheck(); if (Utils.isNullOrEmpty(name)) { throw new Invali...
[ "public", "Channel", "newChannel", "(", "String", "name", ",", "Orderer", "orderer", ",", "ChannelConfiguration", "channelConfiguration", ",", "byte", "[", "]", "...", "channelConfigurationSignatures", ")", "throws", "TransactionException", ",", "InvalidArgumentException"...
Create a new channel @param name The channel's name @param orderer Orderer to create the channel with. @param channelConfiguration Channel configuration data. @param channelConfigurationSignatures byte arrays containing ConfigSignature's proto serialized. See ...
[ "Create", "a", "new", "channel" ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L264-L288
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/RandomMatrices_DDRM.java
RandomMatrices_DDRM.rectangleGaussian
public static DMatrixRMaj rectangleGaussian(int numRow , int numCol , double mean , double stdev , Random rand ) { """ <p> Sets each element in the matrix to a value drawn from an Gaussian distribution with the specified mean and standard deviation </p> @param numRow Number of rows in the new matrix. @par...
java
public static DMatrixRMaj rectangleGaussian(int numRow , int numCol , double mean , double stdev , Random rand ) { DMatrixRMaj m = new DMatrixRMaj(numRow,numCol); fillGaussian(m,mean,stdev,rand); return m; }
[ "public", "static", "DMatrixRMaj", "rectangleGaussian", "(", "int", "numRow", ",", "int", "numCol", ",", "double", "mean", ",", "double", "stdev", ",", "Random", "rand", ")", "{", "DMatrixRMaj", "m", "=", "new", "DMatrixRMaj", "(", "numRow", ",", "numCol", ...
<p> Sets each element in the matrix to a value drawn from an Gaussian distribution with the specified mean and standard deviation </p> @param numRow Number of rows in the new matrix. @param numCol Number of columns in the new matrix. @param mean Mean value in the distribution @param stdev Standard deviation in the di...
[ "<p", ">", "Sets", "each", "element", "in", "the", "matrix", "to", "a", "value", "drawn", "from", "an", "Gaussian", "distribution", "with", "the", "specified", "mean", "and", "standard", "deviation", "<", "/", "p", ">" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/RandomMatrices_DDRM.java#L404-L409
groovy/groovy-core
src/main/org/apache/commons/cli/GroovyInternalPosixParser.java
GroovyInternalPosixParser.processNonOptionToken
private void processNonOptionToken(String value, boolean stopAtNonOption) { """ Add the special token "<b>--</b>" and the current <code>value</code> to the processed tokens list. Then add all the remaining <code>argument</code> values to the processed tokens list. @param value The current token """ ...
java
private void processNonOptionToken(String value, boolean stopAtNonOption) { if (stopAtNonOption && (currentOption == null || !currentOption.hasArg())) { eatTheRest = true; tokens.add("--"); } tokens.add(value); currentOption = null; }
[ "private", "void", "processNonOptionToken", "(", "String", "value", ",", "boolean", "stopAtNonOption", ")", "{", "if", "(", "stopAtNonOption", "&&", "(", "currentOption", "==", "null", "||", "!", "currentOption", ".", "hasArg", "(", ")", ")", ")", "{", "eatT...
Add the special token "<b>--</b>" and the current <code>value</code> to the processed tokens list. Then add all the remaining <code>argument</code> values to the processed tokens list. @param value The current token
[ "Add", "the", "special", "token", "<b", ">", "--", "<", "/", "b", ">", "and", "the", "current", "<code", ">", "value<", "/", "code", ">", "to", "the", "processed", "tokens", "list", ".", "Then", "add", "all", "the", "remaining", "<code", ">", "argume...
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/apache/commons/cli/GroovyInternalPosixParser.java#L183-L193
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java
SphereUtil.haversineFormulaDeg
public static double haversineFormulaDeg(double lat1, double lon1, double lat2, double lon2) { """ Compute the approximate great-circle distance of two points using the Haversine formula <p> Complexity: 5 trigonometric functions, 1 sqrt. <p> Reference: <p> R. W. Sinnott,<br> Virtues of the Haversine<br> S...
java
public static double haversineFormulaDeg(double lat1, double lon1, double lat2, double lon2) { return haversineFormulaRad(deg2rad(lat1), deg2rad(lon1), deg2rad(lat2), deg2rad(lon2)); }
[ "public", "static", "double", "haversineFormulaDeg", "(", "double", "lat1", ",", "double", "lon1", ",", "double", "lat2", ",", "double", "lon2", ")", "{", "return", "haversineFormulaRad", "(", "deg2rad", "(", "lat1", ")", ",", "deg2rad", "(", "lon1", ")", ...
Compute the approximate great-circle distance of two points using the Haversine formula <p> Complexity: 5 trigonometric functions, 1 sqrt. <p> Reference: <p> R. W. Sinnott,<br> Virtues of the Haversine<br> Sky and Telescope 68(2) @param lat1 Latitude of first point in degree @param lon1 Longitude of first point in deg...
[ "Compute", "the", "approximate", "great", "-", "circle", "distance", "of", "two", "points", "using", "the", "Haversine", "formula", "<p", ">", "Complexity", ":", "5", "trigonometric", "functions", "1", "sqrt", ".", "<p", ">", "Reference", ":", "<p", ">", "...
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java#L152-L154
undertow-io/undertow
core/src/main/java/io/undertow/server/handlers/ChannelUpgradeHandler.java
ChannelUpgradeHandler.removeProtocol
public synchronized void removeProtocol(String productString, HttpUpgradeListener upgradeListener) { """ Remove a protocol from this handler. @param productString the product string to match @param upgradeListener The upgrade listener """ List<Holder> holders = handlers.get(productString); ...
java
public synchronized void removeProtocol(String productString, HttpUpgradeListener upgradeListener) { List<Holder> holders = handlers.get(productString); if (holders == null) { return; } Iterator<Holder> it = holders.iterator(); while (it.hasNext()) { Holde...
[ "public", "synchronized", "void", "removeProtocol", "(", "String", "productString", ",", "HttpUpgradeListener", "upgradeListener", ")", "{", "List", "<", "Holder", ">", "holders", "=", "handlers", ".", "get", "(", "productString", ")", ";", "if", "(", "holders",...
Remove a protocol from this handler. @param productString the product string to match @param upgradeListener The upgrade listener
[ "Remove", "a", "protocol", "from", "this", "handler", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/server/handlers/ChannelUpgradeHandler.java#L151-L167
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.purgeDeletedCertificateAsync
public Observable<Void> purgeDeletedCertificateAsync(String vaultBaseUrl, String certificateName) { """ Permanently deletes the specified deleted certificate. The PurgeDeletedCertificate operation performs an irreversible deletion of the specified certificate, without possibility for recovery. The operation is no...
java
public Observable<Void> purgeDeletedCertificateAsync(String vaultBaseUrl, String certificateName) { return purgeDeletedCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> respon...
[ "public", "Observable", "<", "Void", ">", "purgeDeletedCertificateAsync", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ")", "{", "return", "purgeDeletedCertificateWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "certificateName", ")", ".", "map", ...
Permanently deletes the specified deleted certificate. The PurgeDeletedCertificate operation performs an irreversible deletion of the specified certificate, without possibility for recovery. The operation is not available if the recovery level does not specify 'Purgeable'. This operation requires the certificate/purge ...
[ "Permanently", "deletes", "the", "specified", "deleted", "certificate", ".", "The", "PurgeDeletedCertificate", "operation", "performs", "an", "irreversible", "deletion", "of", "the", "specified", "certificate", "without", "possibility", "for", "recovery", ".", "The", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L8648-L8655
logic-ng/LogicNG
src/main/java/org/logicng/solvers/MiniSat.java
MiniSat.miniCard
public static MiniSat miniCard(final FormulaFactory f) { """ Returns a new MiniCard solver. @param f the formula factory @return the solver """ return new MiniSat(f, SolverStyle.MINICARD, new MiniSatConfig.Builder().build(), null); }
java
public static MiniSat miniCard(final FormulaFactory f) { return new MiniSat(f, SolverStyle.MINICARD, new MiniSatConfig.Builder().build(), null); }
[ "public", "static", "MiniSat", "miniCard", "(", "final", "FormulaFactory", "f", ")", "{", "return", "new", "MiniSat", "(", "f", ",", "SolverStyle", ".", "MINICARD", ",", "new", "MiniSatConfig", ".", "Builder", "(", ")", ".", "build", "(", ")", ",", "null...
Returns a new MiniCard solver. @param f the formula factory @return the solver
[ "Returns", "a", "new", "MiniCard", "solver", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/MiniSat.java#L171-L173
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/function/Actions.java
Actions.toFunc
public static <T1, T2, R> Func2<T1, T2, R> toFunc(final Action2<T1, T2> action, final R result) { """ Converts an {@link Action2} to a function that calls the action and returns a specified value. @param action the {@link Action2} to convert @param result the value to return from the function call @return a {...
java
public static <T1, T2, R> Func2<T1, T2, R> toFunc(final Action2<T1, T2> action, final R result) { return new Func2<T1, T2, R>() { @Override public R call(T1 t1, T2 t2) { action.call(t1, t2); return result; } }; }
[ "public", "static", "<", "T1", ",", "T2", ",", "R", ">", "Func2", "<", "T1", ",", "T2", ",", "R", ">", "toFunc", "(", "final", "Action2", "<", "T1", ",", "T2", ">", "action", ",", "final", "R", "result", ")", "{", "return", "new", "Func2", "<",...
Converts an {@link Action2} to a function that calls the action and returns a specified value. @param action the {@link Action2} to convert @param result the value to return from the function call @return a {@link Func2} that calls {@code action} and returns {@code result}
[ "Converts", "an", "{", "@link", "Action2", "}", "to", "a", "function", "that", "calls", "the", "action", "and", "returns", "a", "specified", "value", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/function/Actions.java#L236-L244
calrissian/mango
mango-json/src/main/java/org/calrissian/mango/json/mappings/ObjectJsonNode.java
ObjectJsonNode.visit
@Override public void visit(String[] keys, int level, Map<Integer, Integer> levelToIdx, ValueJsonNode valueJsonNode) { """ Sets state on current instance based on the flattened tree representation from the input. This will also determine the next child, if necessary, and propagate the next level of the tree ...
java
@Override public void visit(String[] keys, int level, Map<Integer, Integer> levelToIdx, ValueJsonNode valueJsonNode) { if(level == keys.length-1) children.put(keys[level], valueJsonNode); else { JsonTreeNode child = children.get(keys[level]); // look toJson see...
[ "@", "Override", "public", "void", "visit", "(", "String", "[", "]", "keys", ",", "int", "level", ",", "Map", "<", "Integer", ",", "Integer", ">", "levelToIdx", ",", "ValueJsonNode", "valueJsonNode", ")", "{", "if", "(", "level", "==", "keys", ".", "le...
Sets state on current instance based on the flattened tree representation from the input. This will also determine the next child, if necessary, and propagate the next level of the tree (down to the child). @param keys @param level @param levelToIdx @param valueJsonNode
[ "Sets", "state", "on", "current", "instance", "based", "on", "the", "flattened", "tree", "representation", "from", "the", "input", ".", "This", "will", "also", "determine", "the", "next", "child", "if", "necessary", "and", "propagate", "the", "next", "level", ...
train
https://github.com/calrissian/mango/blob/a95aa5e77af9aa0e629787228d80806560023452/mango-json/src/main/java/org/calrissian/mango/json/mappings/ObjectJsonNode.java#L40-L63
line/armeria
core/src/main/java/com/linecorp/armeria/server/cors/AbstractCorsPolicyBuilder.java
AbstractCorsPolicyBuilder.preflightResponseHeader
public B preflightResponseHeader(CharSequence name, Iterable<?> values) { """ Specifies HTTP response headers that should be added to a CORS preflight response. <p>An intermediary like a load balancer might require that a CORS preflight request have certain headers set. This enables such headers to be added. ...
java
public B preflightResponseHeader(CharSequence name, Iterable<?> values) { requireNonNull(name, "name"); requireNonNull(values, "values"); checkArgument(!Iterables.isEmpty(values), "values should not be empty."); final ImmutableList.Builder builder = new Builder(); int i = 0; ...
[ "public", "B", "preflightResponseHeader", "(", "CharSequence", "name", ",", "Iterable", "<", "?", ">", "values", ")", "{", "requireNonNull", "(", "name", ",", "\"name\"", ")", ";", "requireNonNull", "(", "values", ",", "\"values\"", ")", ";", "checkArgument", ...
Specifies HTTP response headers that should be added to a CORS preflight response. <p>An intermediary like a load balancer might require that a CORS preflight request have certain headers set. This enables such headers to be added. @param name the name of the HTTP header. @param values the values for the HTTP header....
[ "Specifies", "HTTP", "response", "headers", "that", "should", "be", "added", "to", "a", "CORS", "preflight", "response", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/cors/AbstractCorsPolicyBuilder.java#L315-L330
d-michail/jheaps
src/main/java/org/jheaps/tree/FibonacciHeap.java
FibonacciHeap.link
private void link(Node<K, V> y, Node<K, V> x) { """ /* Remove node y from the root list and make it a child of x. Degree of x increases by 1 and y is unmarked if marked. """ // remove from root list y.prev.next = y.next; y.next.prev = y.prev; // one less root roots--;...
java
private void link(Node<K, V> y, Node<K, V> x) { // remove from root list y.prev.next = y.next; y.next.prev = y.prev; // one less root roots--; // clear if marked y.mark = false; // hang as x's child x.degree++; y.parent = x; Nod...
[ "private", "void", "link", "(", "Node", "<", "K", ",", "V", ">", "y", ",", "Node", "<", "K", ",", "V", ">", "x", ")", "{", "// remove from root list", "y", ".", "prev", ".", "next", "=", "y", ".", "next", ";", "y", ".", "next", ".", "prev", "...
/* Remove node y from the root list and make it a child of x. Degree of x increases by 1 and y is unmarked if marked.
[ "/", "*", "Remove", "node", "y", "from", "the", "root", "list", "and", "make", "it", "a", "child", "of", "x", ".", "Degree", "of", "x", "increases", "by", "1", "and", "y", "is", "unmarked", "if", "marked", "." ]
train
https://github.com/d-michail/jheaps/blob/7146451dd6591c2a8559dc564c9c40428c4a2c10/src/main/java/org/jheaps/tree/FibonacciHeap.java#L630-L656
MKLab-ITI/multimedia-indexing
src/main/java/gr/iti/mklab/visual/utilities/ImageIOGreyScale.java
ImageIOGreyScale.getImageReadersByFormatName
public static Iterator<ImageReader> getImageReadersByFormatName(String formatName) { """ Returns an <code>Iterator</code> containing all currently registered <code>ImageReader</code>s that claim to be able to decode the named format. @param formatName a <code>String</code> containing the informal name of a fo...
java
public static Iterator<ImageReader> getImageReadersByFormatName(String formatName) { if (formatName == null) { throw new IllegalArgumentException("formatName == null!"); } Iterator iter; // Ensure category is present try { iter = theRegistry.getServiceProviders(ImageReaderSpi.class, new ContainsF...
[ "public", "static", "Iterator", "<", "ImageReader", ">", "getImageReadersByFormatName", "(", "String", "formatName", ")", "{", "if", "(", "formatName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"formatName == null!\"", ")", ";", "}...
Returns an <code>Iterator</code> containing all currently registered <code>ImageReader</code>s that claim to be able to decode the named format. @param formatName a <code>String</code> containing the informal name of a format (<i>e.g.</i>, "jpeg" or "tiff". @return an <code>Iterator</code> containing <code>ImageReade...
[ "Returns", "an", "<code", ">", "Iterator<", "/", "code", ">", "containing", "all", "currently", "registered", "<code", ">", "ImageReader<", "/", "code", ">", "s", "that", "claim", "to", "be", "able", "to", "decode", "the", "named", "format", "." ]
train
https://github.com/MKLab-ITI/multimedia-indexing/blob/f82e8e517da706651f4b7a719805401f3102e135/src/main/java/gr/iti/mklab/visual/utilities/ImageIOGreyScale.java#L624-L636
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/common/utilities/PHPMethods.java
PHPMethods.arsort
public static <T extends Comparable<T>> Integer[] arsort(T[] array) { """ Sorts an array in descending order and returns an array with indexes of the original order. @param <T> @param array @return """ return _asort(array, true); }
java
public static <T extends Comparable<T>> Integer[] arsort(T[] array) { return _asort(array, true); }
[ "public", "static", "<", "T", "extends", "Comparable", "<", "T", ">", ">", "Integer", "[", "]", "arsort", "(", "T", "[", "]", "array", ")", "{", "return", "_asort", "(", "array", ",", "true", ")", ";", "}" ]
Sorts an array in descending order and returns an array with indexes of the original order. @param <T> @param array @return
[ "Sorts", "an", "array", "in", "descending", "order", "and", "returns", "an", "array", "with", "indexes", "of", "the", "original", "order", "." ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/common/utilities/PHPMethods.java#L281-L283
liyiorg/weixin-popular
src/main/java/weixin/popular/api/PoiAPI.java
PoiAPI.getPoiList
public static PoiListResult getPoiList(String accessToken, int begin, int limit) { """ 查询门店列表 @param accessToken 令牌 @param begin 开始位置,0 即为从第一条开始查询 @param limit 返回数据条数,最大允许50,默认为20 @return result """ return getPoiList(accessToken, String.format("{\"begin\":%d, \"limit\": %d}", begin, limit)); }
java
public static PoiListResult getPoiList(String accessToken, int begin, int limit) { return getPoiList(accessToken, String.format("{\"begin\":%d, \"limit\": %d}", begin, limit)); }
[ "public", "static", "PoiListResult", "getPoiList", "(", "String", "accessToken", ",", "int", "begin", ",", "int", "limit", ")", "{", "return", "getPoiList", "(", "accessToken", ",", "String", ".", "format", "(", "\"{\\\"begin\\\":%d, \\\"limit\\\": %d}\"", ",", "b...
查询门店列表 @param accessToken 令牌 @param begin 开始位置,0 即为从第一条开始查询 @param limit 返回数据条数,最大允许50,默认为20 @return result
[ "查询门店列表" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/PoiAPI.java#L107-L109
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java
EscapedFunctions2.sqlpower
public static void sqlpower(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { """ power to pow translation @param buf The buffer to append into @param parsedArgs arguments @throws SQLException if something wrong happens """ twoArgumentsFunctionCall(buf, "pow(", "power",...
java
public static void sqlpower(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { twoArgumentsFunctionCall(buf, "pow(", "power", parsedArgs); }
[ "public", "static", "void", "sqlpower", "(", "StringBuilder", "buf", ",", "List", "<", "?", "extends", "CharSequence", ">", "parsedArgs", ")", "throws", "SQLException", "{", "twoArgumentsFunctionCall", "(", "buf", ",", "\"pow(\"", ",", "\"power\"", ",", "parsedA...
power to pow translation @param buf The buffer to append into @param parsedArgs arguments @throws SQLException if something wrong happens
[ "power", "to", "pow", "translation" ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java#L120-L122
sarl/sarl
main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SectionNumber.java
SectionNumber.setFromString
public void setFromString(String sectionNumber, int level) { """ Change this version number from the given string representation. <p>The string representation should be integer numbers, separated by dot characters. @param sectionNumber the string representation of the version number. @param level is the lev...
java
public void setFromString(String sectionNumber, int level) { assert level >= 1; final String[] numbers = sectionNumber.split("[^0-9]+"); //$NON-NLS-1$ final int len = Math.max(0, this.numbers.size() - numbers.length); for (int i = 0; i < len; ++i) { this.numbers.removeLast(); } for (int i = 0; i < number...
[ "public", "void", "setFromString", "(", "String", "sectionNumber", ",", "int", "level", ")", "{", "assert", "level", ">=", "1", ";", "final", "String", "[", "]", "numbers", "=", "sectionNumber", ".", "split", "(", "\"[^0-9]+\"", ")", ";", "//$NON-NLS-1$", ...
Change this version number from the given string representation. <p>The string representation should be integer numbers, separated by dot characters. @param sectionNumber the string representation of the version number. @param level is the level at which the section number is visible (1 for the top level, 2 for subse...
[ "Change", "this", "version", "number", "from", "the", "given", "string", "representation", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SectionNumber.java#L56-L66
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java
MeshGenerator.generateCuboid
public static VertexData generateCuboid(Vector3f size) { """ Generates a solid cuboid mesh. This mesh includes the positions, normals, texture coords and tangents. The center is at the middle of the cuboid. @param size The size of the cuboid to generate, on x, y and z @return The vertex data """ fi...
java
public static VertexData generateCuboid(Vector3f size) { final VertexData destination = new VertexData(); final VertexAttribute positionsAttribute = new VertexAttribute("positions", DataType.FLOAT, 3); destination.addAttribute(0, positionsAttribute); final TFloatList positions = new TFlo...
[ "public", "static", "VertexData", "generateCuboid", "(", "Vector3f", "size", ")", "{", "final", "VertexData", "destination", "=", "new", "VertexData", "(", ")", ";", "final", "VertexAttribute", "positionsAttribute", "=", "new", "VertexAttribute", "(", "\"positions\"...
Generates a solid cuboid mesh. This mesh includes the positions, normals, texture coords and tangents. The center is at the middle of the cuboid. @param size The size of the cuboid to generate, on x, y and z @return The vertex data
[ "Generates", "a", "solid", "cuboid", "mesh", ".", "This", "mesh", "includes", "the", "positions", "normals", "texture", "coords", "and", "tangents", ".", "The", "center", "is", "at", "the", "middle", "of", "the", "cuboid", "." ]
train
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java#L660-L679
RuedigerMoeller/kontraktor
examples/misc/pub-sub/tcp-based/src/main/java/pubsub/point2point/MediatorActor.java
MediatorActor.tellSubscribers
public void tellSubscribers( Actor sender, String topic, Object message) { """ send a fire and forget message to all @param sender @param topic @param message """ List<ReceiverActor> subscriber = topic2Subscriber.get(topic); if ( subscriber != null ) { subscriber.stream() ...
java
public void tellSubscribers( Actor sender, String topic, Object message) { List<ReceiverActor> subscriber = topic2Subscriber.get(topic); if ( subscriber != null ) { subscriber.stream() .filter(subs -> !subs.equals(sender)) // do not receive self sent .forEach(...
[ "public", "void", "tellSubscribers", "(", "Actor", "sender", ",", "String", "topic", ",", "Object", "message", ")", "{", "List", "<", "ReceiverActor", ">", "subscriber", "=", "topic2Subscriber", ".", "get", "(", "topic", ")", ";", "if", "(", "subscriber", ...
send a fire and forget message to all @param sender @param topic @param message
[ "send", "a", "fire", "and", "forget", "message", "to", "all" ]
train
https://github.com/RuedigerMoeller/kontraktor/blob/d5f3817f9476f3786187b8ef00400b7a4f25a404/examples/misc/pub-sub/tcp-based/src/main/java/pubsub/point2point/MediatorActor.java#L63-L70
grpc/grpc-java
core/src/main/java/io/grpc/internal/MessageFramer.java
MessageFramer.writeKnownLengthUncompressed
private int writeKnownLengthUncompressed(InputStream message, int messageLength) throws IOException { """ Write an unserialized message with a known length, uncompressed. """ if (maxOutboundMessageSize >= 0 && messageLength > maxOutboundMessageSize) { throw Status.RESOURCE_EXHAUSTED ....
java
private int writeKnownLengthUncompressed(InputStream message, int messageLength) throws IOException { if (maxOutboundMessageSize >= 0 && messageLength > maxOutboundMessageSize) { throw Status.RESOURCE_EXHAUSTED .withDescription( String.format("message too large %d > %d", messageL...
[ "private", "int", "writeKnownLengthUncompressed", "(", "InputStream", "message", ",", "int", "messageLength", ")", "throws", "IOException", "{", "if", "(", "maxOutboundMessageSize", ">=", "0", "&&", "messageLength", ">", "maxOutboundMessageSize", ")", "{", "throw", ...
Write an unserialized message with a known length, uncompressed.
[ "Write", "an", "unserialized", "message", "with", "a", "known", "length", "uncompressed", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/core/src/main/java/io/grpc/internal/MessageFramer.java#L212-L230
wildfly/wildfly-maven-plugin
plugin/src/main/java/org/wildfly/plugin/common/ServerOperations.java
ServerOperations.createRemoveOperation
public static ModelNode createRemoveOperation(final ModelNode address, final boolean recursive) { """ Creates a remove operation. @param address the address for the operation @param recursive {@code true} if the remove should be recursive, otherwise {@code false} @return the operation """ fina...
java
public static ModelNode createRemoveOperation(final ModelNode address, final boolean recursive) { final ModelNode op = createRemoveOperation(address); op.get(RECURSIVE).set(recursive); return op; }
[ "public", "static", "ModelNode", "createRemoveOperation", "(", "final", "ModelNode", "address", ",", "final", "boolean", "recursive", ")", "{", "final", "ModelNode", "op", "=", "createRemoveOperation", "(", "address", ")", ";", "op", ".", "get", "(", "RECURSIVE"...
Creates a remove operation. @param address the address for the operation @param recursive {@code true} if the remove should be recursive, otherwise {@code false} @return the operation
[ "Creates", "a", "remove", "operation", "." ]
train
https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/common/ServerOperations.java#L101-L105
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/index/Index.java
Index.getSearch
public static ISearch getSearch() throws EFapsException { """ Gets the directory. @return the directory @throws EFapsException on error """ ISearch ret = null; if (EFapsSystemConfiguration.get().containsAttributeValue(KernelSettings.INDEXSEARCHCLASS)) { final String claz...
java
public static ISearch getSearch() throws EFapsException { ISearch ret = null; if (EFapsSystemConfiguration.get().containsAttributeValue(KernelSettings.INDEXSEARCHCLASS)) { final String clazzname = EFapsSystemConfiguration.get().getAttributeValue( Kerne...
[ "public", "static", "ISearch", "getSearch", "(", ")", "throws", "EFapsException", "{", "ISearch", "ret", "=", "null", ";", "if", "(", "EFapsSystemConfiguration", ".", "get", "(", ")", ".", "containsAttributeValue", "(", "KernelSettings", ".", "INDEXSEARCHCLASS", ...
Gets the directory. @return the directory @throws EFapsException on error
[ "Gets", "the", "directory", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/index/Index.java#L177-L213
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/audio/AudioFactory.java
AudioFactory.loadAudio
public static synchronized Audio loadAudio(Media media) { """ Load an audio file and prepare it to be played. @param media The audio media (must not be <code>null</code>). @return The loaded audio. @throws LionEngineException If invalid audio. """ Check.notNull(media); final String extens...
java
public static synchronized Audio loadAudio(Media media) { Check.notNull(media); final String extension = UtilFile.getExtension(media.getPath()); return Optional.ofNullable(FACTORIES.get(extension)) .orElseThrow(() -> new LionEngineException(media, ERROR_FORMAT)) ...
[ "public", "static", "synchronized", "Audio", "loadAudio", "(", "Media", "media", ")", "{", "Check", ".", "notNull", "(", "media", ")", ";", "final", "String", "extension", "=", "UtilFile", ".", "getExtension", "(", "media", ".", "getPath", "(", ")", ")", ...
Load an audio file and prepare it to be played. @param media The audio media (must not be <code>null</code>). @return The loaded audio. @throws LionEngineException If invalid audio.
[ "Load", "an", "audio", "file", "and", "prepare", "it", "to", "be", "played", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/audio/AudioFactory.java#L51-L59
prestodb/presto
presto-main/src/main/java/com/facebook/presto/server/smile/SmileCodec.java
SmileCodec.toBytes
@Override public byte[] toBytes(T instance) throws IllegalArgumentException { """ Converts the specified instance to smile encoded bytes. @param instance the instance to convert to smile encoded bytes @return smile encoded bytes (UTF-8) @throws IllegalArgumentException if the specified instanc...
java
@Override public byte[] toBytes(T instance) throws IllegalArgumentException { try { return mapper.writeValueAsBytes(instance); } catch (IOException e) { throw new IllegalArgumentException(format("%s could not be converted to SMILE", instance.getClass()...
[ "@", "Override", "public", "byte", "[", "]", "toBytes", "(", "T", "instance", ")", "throws", "IllegalArgumentException", "{", "try", "{", "return", "mapper", ".", "writeValueAsBytes", "(", "instance", ")", ";", "}", "catch", "(", "IOException", "e", ")", "...
Converts the specified instance to smile encoded bytes. @param instance the instance to convert to smile encoded bytes @return smile encoded bytes (UTF-8) @throws IllegalArgumentException if the specified instance can not be converted to smile
[ "Converts", "the", "specified", "instance", "to", "smile", "encoded", "bytes", "." ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-main/src/main/java/com/facebook/presto/server/smile/SmileCodec.java#L145-L155
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/model/trace/Node.java
Node.addInteractionCorrelationId
public Node addInteractionCorrelationId(String id) { """ This method adds an interaction scoped correlation id. @param id The id @return The node """ this.correlationIds.add(new CorrelationIdentifier(Scope.Interaction, id)); return this; }
java
public Node addInteractionCorrelationId(String id) { this.correlationIds.add(new CorrelationIdentifier(Scope.Interaction, id)); return this; }
[ "public", "Node", "addInteractionCorrelationId", "(", "String", "id", ")", "{", "this", ".", "correlationIds", ".", "add", "(", "new", "CorrelationIdentifier", "(", "Scope", ".", "Interaction", ",", "id", ")", ")", ";", "return", "this", ";", "}" ]
This method adds an interaction scoped correlation id. @param id The id @return The node
[ "This", "method", "adds", "an", "interaction", "scoped", "correlation", "id", "." ]
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/model/trace/Node.java#L255-L258
samskivert/samskivert
src/main/java/com/samskivert/servlet/util/ParameterUtil.java
ParameterUtil.getIntParameter
public static int getIntParameter ( HttpServletRequest req, String name, int defval, String invalidDataMessage) throws DataValidationException { """ Fetches the supplied parameter from the request and converts it to an integer. If the parameter does not exist, <code>defval</code> is returned. If t...
java
public static int getIntParameter ( HttpServletRequest req, String name, int defval, String invalidDataMessage) throws DataValidationException { String value = getParameter(req, name, false); if (StringUtil.isBlank(value)) { return defval; } return parseIn...
[ "public", "static", "int", "getIntParameter", "(", "HttpServletRequest", "req", ",", "String", "name", ",", "int", "defval", ",", "String", "invalidDataMessage", ")", "throws", "DataValidationException", "{", "String", "value", "=", "getParameter", "(", "req", ","...
Fetches the supplied parameter from the request and converts it to an integer. If the parameter does not exist, <code>defval</code> is returned. If the parameter is not a well-formed integer, a data validation exception is thrown with the supplied message.
[ "Fetches", "the", "supplied", "parameter", "from", "the", "request", "and", "converts", "it", "to", "an", "integer", ".", "If", "the", "parameter", "does", "not", "exist", "<code", ">", "defval<", "/", "code", ">", "is", "returned", ".", "If", "the", "pa...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/servlet/util/ParameterUtil.java#L173-L182