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
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java
ContextXmlReader.readContext
public JournalEntryContext readContext(XMLEventReader reader) throws JournalException, XMLStreamException { """ Read the context tax and populate a JournalEntryContext object. """ JournalEntryContext context = new JournalEntryContext(); XMLEvent event = reader.nextTag(); if...
java
public JournalEntryContext readContext(XMLEventReader reader) throws JournalException, XMLStreamException { JournalEntryContext context = new JournalEntryContext(); XMLEvent event = reader.nextTag(); if (!isStartTagEvent(event, QNAME_TAG_CONTEXT)) { throw getNotStartTagE...
[ "public", "JournalEntryContext", "readContext", "(", "XMLEventReader", "reader", ")", "throws", "JournalException", ",", "XMLStreamException", "{", "JournalEntryContext", "context", "=", "new", "JournalEntryContext", "(", ")", ";", "XMLEvent", "event", "=", "reader", ...
Read the context tax and populate a JournalEntryContext object.
[ "Read", "the", "context", "tax", "and", "populate", "a", "JournalEntryContext", "object", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/ContextXmlReader.java#L38-L71
soi-toolkit/soi-toolkit-mule
commons/components/commons-xml/src/main/java/org/soitoolkit/commons/xml/XPathUtil.java
XPathUtil.lookupParameterValue
public static String lookupParameterValue(String key, String string) { """ Search for patterns [key=value] and returns the value given the key. @param key @param string @return """ Pattern p = Pattern.compile("\\[" + key + "=[^\\]]*\\]"); Matcher m = p.matcher(string); m.find(); String f = m.gr...
java
public static String lookupParameterValue(String key, String string) { Pattern p = Pattern.compile("\\[" + key + "=[^\\]]*\\]"); Matcher m = p.matcher(string); m.find(); String f = m.group(); int p1 = f.indexOf('='); int p2 = f.indexOf(']'); return f.substring(p1+1, p2); }
[ "public", "static", "String", "lookupParameterValue", "(", "String", "key", ",", "String", "string", ")", "{", "Pattern", "p", "=", "Pattern", ".", "compile", "(", "\"\\\\[\"", "+", "key", "+", "\"=[^\\\\]]*\\\\]\"", ")", ";", "Matcher", "m", "=", "p", "."...
Search for patterns [key=value] and returns the value given the key. @param key @param string @return
[ "Search", "for", "patterns", "[", "key", "=", "value", "]", "and", "returns", "the", "value", "given", "the", "key", "." ]
train
https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/commons/components/commons-xml/src/main/java/org/soitoolkit/commons/xml/XPathUtil.java#L255-L263
JodaOrg/joda-time
src/main/java/org/joda/time/LocalDateTime.java
LocalDateTime.toDate
public Date toDate(final TimeZone timeZone) { """ Get the date time as a <code>java.util.Date</code> using the specified time zone. <p> The <code>Date</code> object created has exactly the same fields as this date-time, except when the time would be invalid due to a daylight savings gap. In that case, the time...
java
public Date toDate(final TimeZone timeZone) { final Calendar calendar = Calendar.getInstance(timeZone); calendar.clear(); calendar.set(getYear(), getMonthOfYear() - 1, getDayOfMonth(), getHourOfDay(), getMinuteOfHour(), getSecondOfMinute()); Date date = calendar.getTi...
[ "public", "Date", "toDate", "(", "final", "TimeZone", "timeZone", ")", "{", "final", "Calendar", "calendar", "=", "Calendar", ".", "getInstance", "(", "timeZone", ")", ";", "calendar", ".", "clear", "(", ")", ";", "calendar", ".", "set", "(", "getYear", ...
Get the date time as a <code>java.util.Date</code> using the specified time zone. <p> The <code>Date</code> object created has exactly the same fields as this date-time, except when the time would be invalid due to a daylight savings gap. In that case, the time will be set to the earliest valid time after the gap. <p> ...
[ "Get", "the", "date", "time", "as", "a", "<code", ">", "java", ".", "util", ".", "Date<", "/", "code", ">", "using", "the", "specified", "time", "zone", ".", "<p", ">", "The", "<code", ">", "Date<", "/", "code", ">", "object", "created", "has", "ex...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/LocalDateTime.java#L823-L831
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/fdt/FdtSketch.java
FdtSketch.getUpperBound
public double getUpperBound(final int numStdDev, final int numSubsetEntries) { """ Gets the estimate of the upper bound of the true distinct population represented by the count of entries in a group. @param numStdDev <a href="{@docRoot}/resources/dictionary.html#numStdDev">See Number of Standard Deviations</a> ...
java
public double getUpperBound(final int numStdDev, final int numSubsetEntries) { if (!isEstimationMode()) { return numSubsetEntries; } return BinomialBoundsN.getUpperBound(numSubsetEntries, getTheta(), numStdDev, isEmpty()); }
[ "public", "double", "getUpperBound", "(", "final", "int", "numStdDev", ",", "final", "int", "numSubsetEntries", ")", "{", "if", "(", "!", "isEstimationMode", "(", ")", ")", "{", "return", "numSubsetEntries", ";", "}", "return", "BinomialBoundsN", ".", "getUppe...
Gets the estimate of the upper bound of the true distinct population represented by the count of entries in a group. @param numStdDev <a href="{@docRoot}/resources/dictionary.html#numStdDev">See Number of Standard Deviations</a> @param numSubsetEntries number of entries for a chosen subset of the sketch. @return the es...
[ "Gets", "the", "estimate", "of", "the", "upper", "bound", "of", "the", "true", "distinct", "population", "represented", "by", "the", "count", "of", "entries", "in", "a", "group", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/fdt/FdtSketch.java#L149-L152
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListUserSegmentEntryRelPersistenceImpl.java
CommercePriceListUserSegmentEntryRelPersistenceImpl.fetchByUUID_G
@Override public CommercePriceListUserSegmentEntryRel fetchByUUID_G(String uuid, long groupId) { """ Returns the commerce price list user segment entry rel where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId...
java
@Override public CommercePriceListUserSegmentEntryRel fetchByUUID_G(String uuid, long groupId) { return fetchByUUID_G(uuid, groupId, true); }
[ "@", "Override", "public", "CommercePriceListUserSegmentEntryRel", "fetchByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "{", "return", "fetchByUUID_G", "(", "uuid", ",", "groupId", ",", "true", ")", ";", "}" ]
Returns the commerce price list user segment entry rel where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return the matching commerce price list user segment entry rel, or <code>null</code> if a matchin...
[ "Returns", "the", "commerce", "price", "list", "user", "segment", "entry", "rel", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found"...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListUserSegmentEntryRelPersistenceImpl.java#L717-L721
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/fastoptics/RandomProjectedNeighborsAndDensities.java
RandomProjectedNeighborsAndDensities.splitupNoSort
public void splitupNoSort(ArrayModifiableDBIDs ind, int begin, int end, int dim, Random rand) { """ Recursively splits entire point set until the set is below a threshold @param ind points that are in the current set @param begin Interval begin in the ind array @param end Interval end in the ind array @param...
java
public void splitupNoSort(ArrayModifiableDBIDs ind, int begin, int end, int dim, Random rand) { final int nele = end - begin; dim = dim % projectedPoints.length;// choose a projection of points DoubleDataStore tpro = projectedPoints[dim]; // save set such that used for density or neighborhood computati...
[ "public", "void", "splitupNoSort", "(", "ArrayModifiableDBIDs", "ind", ",", "int", "begin", ",", "int", "end", ",", "int", "dim", ",", "Random", "rand", ")", "{", "final", "int", "nele", "=", "end", "-", "begin", ";", "dim", "=", "dim", "%", "projected...
Recursively splits entire point set until the set is below a threshold @param ind points that are in the current set @param begin Interval begin in the ind array @param end Interval end in the ind array @param dim depth of projection (how many times point set has been split already) @param rand Random generator
[ "Recursively", "splits", "entire", "point", "set", "until", "the", "set", "is", "below", "a", "threshold" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/fastoptics/RandomProjectedNeighborsAndDensities.java#L246-L276
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackTable.java
FastTrackTable.getRow
private MapRow getRow(int index) { """ Retrieve a specific row by index number, creating a blank row if this row does not exist. @param index index number @return MapRow instance """ MapRow result; if (index == m_rows.size()) { result = new MapRow(this, new HashMap<FastTrackFiel...
java
private MapRow getRow(int index) { MapRow result; if (index == m_rows.size()) { result = new MapRow(this, new HashMap<FastTrackField, Object>()); m_rows.add(result); } else { result = m_rows.get(index); } return result; }
[ "private", "MapRow", "getRow", "(", "int", "index", ")", "{", "MapRow", "result", ";", "if", "(", "index", "==", "m_rows", ".", "size", "(", ")", ")", "{", "result", "=", "new", "MapRow", "(", "this", ",", "new", "HashMap", "<", "FastTrackField", ","...
Retrieve a specific row by index number, creating a blank row if this row does not exist. @param index index number @return MapRow instance
[ "Retrieve", "a", "specific", "row", "by", "index", "number", "creating", "a", "blank", "row", "if", "this", "row", "does", "not", "exist", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackTable.java#L108-L123
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/ResourceHealthMetadatasInner.java
ResourceHealthMetadatasInner.listBySiteSlotAsync
public Observable<Page<ResourceHealthMetadataInner>> listBySiteSlotAsync(final String resourceGroupName, final String name, final String slot) { """ Gets the category of ResourceHealthMetadata to use for the given site as a collection. Gets the category of ResourceHealthMetadata to use for the given site as a col...
java
public Observable<Page<ResourceHealthMetadataInner>> listBySiteSlotAsync(final String resourceGroupName, final String name, final String slot) { return listBySiteSlotWithServiceResponseAsync(resourceGroupName, name, slot) .map(new Func1<ServiceResponse<Page<ResourceHealthMetadataInner>>, Page<Resour...
[ "public", "Observable", "<", "Page", "<", "ResourceHealthMetadataInner", ">", ">", "listBySiteSlotAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ",", "final", "String", "slot", ")", "{", "return", "listBySiteSlotWithServiceRespons...
Gets the category of ResourceHealthMetadata to use for the given site as a collection. Gets the category of ResourceHealthMetadata to use for the given site as a collection. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of web app. @param slot Name of web app slot....
[ "Gets", "the", "category", "of", "ResourceHealthMetadata", "to", "use", "for", "the", "given", "site", "as", "a", "collection", ".", "Gets", "the", "category", "of", "ResourceHealthMetadata", "to", "use", "for", "the", "given", "site", "as", "a", "collection",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/ResourceHealthMetadatasInner.java#L608-L616
GII/broccoli
broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owl/OWLValueObject.java
OWLValueObject.buildFromObject
public static OWLValueObject buildFromObject(OWLModel model, Object object) throws NotYetImplementedException, OWLTranslationException { """ Builds an instance, from a given object @param model @param object @return @throws NotYetImplementedException @throws OWLTranslationException """ return buil...
java
public static OWLValueObject buildFromObject(OWLModel model, Object object) throws NotYetImplementedException, OWLTranslationException { return buildFromClasAndObject(model, OWLURIClass.from(object), object); }
[ "public", "static", "OWLValueObject", "buildFromObject", "(", "OWLModel", "model", ",", "Object", "object", ")", "throws", "NotYetImplementedException", ",", "OWLTranslationException", "{", "return", "buildFromClasAndObject", "(", "model", ",", "OWLURIClass", ".", "from...
Builds an instance, from a given object @param model @param object @return @throws NotYetImplementedException @throws OWLTranslationException
[ "Builds", "an", "instance", "from", "a", "given", "object" ]
train
https://github.com/GII/broccoli/blob/a3033a90322cbcee4dc0f1719143b84b822bc4ba/broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owl/OWLValueObject.java#L146-L148
landawn/AbacusUtil
src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java
PoolablePreparedStatement.setBinaryStream
@Override public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException { """ Method setBinaryStream. @param parameterIndex @param x @throws SQLException @see java.sql.PreparedStatement#setBinaryStream(int, InputStream) """ internalStmt.setBinaryStream(parameterIndex, x...
java
@Override public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException { internalStmt.setBinaryStream(parameterIndex, x); }
[ "@", "Override", "public", "void", "setBinaryStream", "(", "int", "parameterIndex", ",", "InputStream", "x", ")", "throws", "SQLException", "{", "internalStmt", ".", "setBinaryStream", "(", "parameterIndex", ",", "x", ")", ";", "}" ]
Method setBinaryStream. @param parameterIndex @param x @throws SQLException @see java.sql.PreparedStatement#setBinaryStream(int, InputStream)
[ "Method", "setBinaryStream", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java#L510-L513
ehcache/ehcache3
transactions/src/main/java/org/ehcache/transactions/xa/txmgr/btm/BitronixXAResourceRegistry.java
BitronixXAResourceRegistry.unregisterXAResource
@Override public void unregisterXAResource(String uniqueName, XAResource xaResource) { """ Unregister an XAResource of a cache from BTM. @param uniqueName the uniqueName of this XAResourceProducer, usually the cache's name @param xaResource the XAResource to be registered """ Ehcache3XAResourceProducer...
java
@Override public void unregisterXAResource(String uniqueName, XAResource xaResource) { Ehcache3XAResourceProducer xaResourceProducer = producers.get(uniqueName); if (xaResourceProducer != null) { boolean found = xaResourceProducer.removeXAResource(xaResource); if (!found) { throw new Ille...
[ "@", "Override", "public", "void", "unregisterXAResource", "(", "String", "uniqueName", ",", "XAResource", "xaResource", ")", "{", "Ehcache3XAResourceProducer", "xaResourceProducer", "=", "producers", ".", "get", "(", "uniqueName", ")", ";", "if", "(", "xaResourcePr...
Unregister an XAResource of a cache from BTM. @param uniqueName the uniqueName of this XAResourceProducer, usually the cache's name @param xaResource the XAResource to be registered
[ "Unregister", "an", "XAResource", "of", "a", "cache", "from", "BTM", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/transactions/src/main/java/org/ehcache/transactions/xa/txmgr/btm/BitronixXAResourceRegistry.java#L66-L82
jhalterman/failsafe
src/main/java/net/jodah/failsafe/FailsafeExecutor.java
FailsafeExecutor.callAsync
@SuppressWarnings("unchecked") private <T> CompletableFuture<T> callAsync( Function<AsyncExecution, Supplier<CompletableFuture<ExecutionResult>>> supplierFn, boolean asyncExecution) { """ Calls the asynchronous {@code supplier} via the configured Scheduler, handling results according to the configured pol...
java
@SuppressWarnings("unchecked") private <T> CompletableFuture<T> callAsync( Function<AsyncExecution, Supplier<CompletableFuture<ExecutionResult>>> supplierFn, boolean asyncExecution) { FailsafeFuture<T> future = new FailsafeFuture(this); AsyncExecution execution = new AsyncExecution(scheduler, future, th...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "<", "T", ">", "CompletableFuture", "<", "T", ">", "callAsync", "(", "Function", "<", "AsyncExecution", ",", "Supplier", "<", "CompletableFuture", "<", "ExecutionResult", ">", ">", ">", "supplierFn",...
Calls the asynchronous {@code supplier} via the configured Scheduler, handling results according to the configured policies. <p> If a configured circuit breaker is open, the resulting future is completed with {@link CircuitBreakerOpenException}. @param asyncExecution whether this is a detached, async execution that mu...
[ "Calls", "the", "asynchronous", "{", "@code", "supplier", "}", "via", "the", "configured", "Scheduler", "handling", "results", "according", "to", "the", "configured", "policies", ".", "<p", ">", "If", "a", "configured", "circuit", "breaker", "is", "open", "the...
train
https://github.com/jhalterman/failsafe/blob/65fcd3a82f7b232d2ff59bc525a59d693dd8e223/src/main/java/net/jodah/failsafe/FailsafeExecutor.java#L336-L345
gresrun/jesque
src/main/java/net/greghaines/jesque/utils/JedisUtils.java
JedisUtils.canUseAsDelayedQueue
public static boolean canUseAsDelayedQueue(final Jedis jedis, final String key) { """ Determines if the queue identified by the given key can be used as a delayed queue. @param jedis connection to Redis @param key the key that identifies a queue @return true if the key already is a delayed queue or is not c...
java
public static boolean canUseAsDelayedQueue(final Jedis jedis, final String key) { final String type = jedis.type(key); return (ZSET.equalsIgnoreCase(type) || NONE.equalsIgnoreCase(type)); }
[ "public", "static", "boolean", "canUseAsDelayedQueue", "(", "final", "Jedis", "jedis", ",", "final", "String", "key", ")", "{", "final", "String", "type", "=", "jedis", ".", "type", "(", "key", ")", ";", "return", "(", "ZSET", ".", "equalsIgnoreCase", "(",...
Determines if the queue identified by the given key can be used as a delayed queue. @param jedis connection to Redis @param key the key that identifies a queue @return true if the key already is a delayed queue or is not currently used, false otherwise
[ "Determines", "if", "the", "queue", "identified", "by", "the", "given", "key", "can", "be", "used", "as", "a", "delayed", "queue", "." ]
train
https://github.com/gresrun/jesque/blob/44749183dccc40962a94c2af547ea7d0d880b5d1/src/main/java/net/greghaines/jesque/utils/JedisUtils.java#L163-L166
osmdroid/osmdroid
osmdroid-android/src/main/java/org/osmdroid/tileprovider/modules/TileWriter.java
TileWriter.cutCurrentCache
private void cutCurrentCache() { """ If the cache size is greater than the max then trim it down to the trim level. This method is synchronized so that only one thread can run it at a time. """ final File lock=Configuration.getInstance().getOsmdroidTileCache(); synchronized (lock) { if (mUsedCacheSpa...
java
private void cutCurrentCache() { final File lock=Configuration.getInstance().getOsmdroidTileCache(); synchronized (lock) { if (mUsedCacheSpace > Configuration.getInstance().getTileFileSystemCacheTrimBytes()) { Log.d(IMapView.LOGTAG,"Trimming tile cache from " + mUsedCacheSpace + " to " + Configurati...
[ "private", "void", "cutCurrentCache", "(", ")", "{", "final", "File", "lock", "=", "Configuration", ".", "getInstance", "(", ")", ".", "getOsmdroidTileCache", "(", ")", ";", "synchronized", "(", "lock", ")", "{", "if", "(", "mUsedCacheSpace", ">", "Configura...
If the cache size is greater than the max then trim it down to the trim level. This method is synchronized so that only one thread can run it at a time.
[ "If", "the", "cache", "size", "is", "greater", "than", "the", "max", "then", "trim", "it", "down", "to", "the", "trim", "level", ".", "This", "method", "is", "synchronized", "so", "that", "only", "one", "thread", "can", "run", "it", "at", "a", "time", ...
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/tileprovider/modules/TileWriter.java#L266-L304
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_alerting_id_GET
public OvhAlerting project_serviceName_alerting_id_GET(String serviceName, String id) throws IOException { """ Get this object properties REST: GET /cloud/project/{serviceName}/alerting/{id} @param serviceName [required] The project id @param id [required] Alerting unique UUID """ String qPath = "/cloud...
java
public OvhAlerting project_serviceName_alerting_id_GET(String serviceName, String id) throws IOException { String qPath = "/cloud/project/{serviceName}/alerting/{id}"; StringBuilder sb = path(qPath, serviceName, id); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhAlerting.class...
[ "public", "OvhAlerting", "project_serviceName_alerting_id_GET", "(", "String", "serviceName", ",", "String", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/alerting/{id}\"", ";", "StringBuilder", "sb", "=", "path", "(", ...
Get this object properties REST: GET /cloud/project/{serviceName}/alerting/{id} @param serviceName [required] The project id @param id [required] Alerting unique UUID
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L2210-L2215
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.createProjectAsync
public Observable<Project> createProjectAsync(String name, CreateProjectOptionalParameter createProjectOptionalParameter) { """ Create a project. @param name Name of the project @param createProjectOptionalParameter the object representing the optional parameters to be set before calling this API @throws Ille...
java
public Observable<Project> createProjectAsync(String name, CreateProjectOptionalParameter createProjectOptionalParameter) { return createProjectWithServiceResponseAsync(name, createProjectOptionalParameter).map(new Func1<ServiceResponse<Project>, Project>() { @Override public Project cal...
[ "public", "Observable", "<", "Project", ">", "createProjectAsync", "(", "String", "name", ",", "CreateProjectOptionalParameter", "createProjectOptionalParameter", ")", "{", "return", "createProjectWithServiceResponseAsync", "(", "name", ",", "createProjectOptionalParameter", ...
Create a project. @param name Name of the project @param createProjectOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the Project object
[ "Create", "a", "project", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L2384-L2391
code4everything/util
src/main/java/com/zhazhapan/util/Checker.java
Checker.checkNull
public static Double checkNull(Double value, double elseValue) { """ 检查Double是否为null @param value 值 @param elseValue 为null返回的值 @return {@link Double} @since 1.0.8 """ return checkNull(value, Double.valueOf(elseValue)); }
java
public static Double checkNull(Double value, double elseValue) { return checkNull(value, Double.valueOf(elseValue)); }
[ "public", "static", "Double", "checkNull", "(", "Double", "value", ",", "double", "elseValue", ")", "{", "return", "checkNull", "(", "value", ",", "Double", ".", "valueOf", "(", "elseValue", ")", ")", ";", "}" ]
检查Double是否为null @param value 值 @param elseValue 为null返回的值 @return {@link Double} @since 1.0.8
[ "检查Double是否为null" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/Checker.java#L1185-L1187
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/spider/SpiderTransaction.java
SpiderTransaction.deleteLinkValue
public void deleteLinkValue(String ownerObjID, FieldDefinition linkDef, String targetObjID) { """ Delete a link value column in the object table of the given owning object. @param ownerObjID Object ID of object that owns the link field. @param linkDef {@link FieldDefinition} of the link field. @param...
java
public void deleteLinkValue(String ownerObjID, FieldDefinition linkDef, String targetObjID) { deleteColumn(SpiderService.objectsStoreName(linkDef.getTableDef()), ownerObjID, SpiderService.linkColumnName(linkDef, targetObjID)); }
[ "public", "void", "deleteLinkValue", "(", "String", "ownerObjID", ",", "FieldDefinition", "linkDef", ",", "String", "targetObjID", ")", "{", "deleteColumn", "(", "SpiderService", ".", "objectsStoreName", "(", "linkDef", ".", "getTableDef", "(", ")", ")", ",", "o...
Delete a link value column in the object table of the given owning object. @param ownerObjID Object ID of object that owns the link field. @param linkDef {@link FieldDefinition} of the link field. @param targetObjID Referenced (target) object ID.
[ "Delete", "a", "link", "value", "column", "in", "the", "object", "table", "of", "the", "given", "owning", "object", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/SpiderTransaction.java#L434-L438
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getFromFirstIncl
@Nullable public static String getFromFirstIncl (@Nullable final String sStr, @Nullable final String sSearch) { """ Get everything from the string from and including the passed string. @param sStr The source string. May be <code>null</code>. @param sSearch The string to search. May be <code>null</code>. @...
java
@Nullable public static String getFromFirstIncl (@Nullable final String sStr, @Nullable final String sSearch) { return _getFromFirst (sStr, sSearch, true); }
[ "@", "Nullable", "public", "static", "String", "getFromFirstIncl", "(", "@", "Nullable", "final", "String", "sStr", ",", "@", "Nullable", "final", "String", "sSearch", ")", "{", "return", "_getFromFirst", "(", "sStr", ",", "sSearch", ",", "true", ")", ";", ...
Get everything from the string from and including the passed string. @param sStr The source string. May be <code>null</code>. @param sSearch The string to search. May be <code>null</code>. @return <code>null</code> if the passed string does not contain the search string. If the search string is empty, the input string...
[ "Get", "everything", "from", "the", "string", "from", "and", "including", "the", "passed", "string", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L4981-L4985
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.toSorted
public static <T> T[] toSorted(T[] self, @ClosureParams(value=FromString.class, options= { """ Sorts the elements from this array into a newly created array using the Closure to determine the correct ordering. <p> If the closure has two parameters it is used like a traditional Comparator. I.e. it should compare...
java
public static <T> T[] toSorted(T[] self, @ClosureParams(value=FromString.class, options={"T","T,T"}) Closure condition) { Comparator<T> comparator = (condition.getMaximumNumberOfParameters() == 1) ? new OrderBy<T>(condition) : new ClosureComparator<T>(condition); return toSorted(self, comparator); }
[ "public", "static", "<", "T", ">", "T", "[", "]", "toSorted", "(", "T", "[", "]", "self", ",", "@", "ClosureParams", "(", "value", "=", "FromString", ".", "class", ",", "options", "=", "{", "\"T\"", ",", "\"T,T\"", "}", ")", "Closure", "condition", ...
Sorts the elements from this array into a newly created array using the Closure to determine the correct ordering. <p> If the closure has two parameters it is used like a traditional Comparator. I.e. it should compare its two parameters for order, returning a negative integer, zero, or a positive integer when the first...
[ "Sorts", "the", "elements", "from", "this", "array", "into", "a", "newly", "created", "array", "using", "the", "Closure", "to", "determine", "the", "correct", "ordering", ".", "<p", ">", "If", "the", "closure", "has", "two", "parameters", "it", "is", "used...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L9544-L9547
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/BundlesHandlerFactory.java
BundlesHandlerFactory.buildCompositeResourcebundle
private JoinableResourceBundle buildCompositeResourcebundle(ResourceBundleDefinition def) throws BundleDependencyException { """ Build a Composite resource bundle using a ResourceBundleDefinition @param def the bundle definition @param childBundles the list of child bundles @return a Composite resource b...
java
private JoinableResourceBundle buildCompositeResourcebundle(ResourceBundleDefinition def) throws BundleDependencyException { List<JoinableResourceBundle> childBundles = new ArrayList<>(); for (ResourceBundleDefinition child : def.getChildren()) { JoinableResourceBundle childBundle = null; if (child.isComp...
[ "private", "JoinableResourceBundle", "buildCompositeResourcebundle", "(", "ResourceBundleDefinition", "def", ")", "throws", "BundleDependencyException", "{", "List", "<", "JoinableResourceBundle", ">", "childBundles", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", ...
Build a Composite resource bundle using a ResourceBundleDefinition @param def the bundle definition @param childBundles the list of child bundles @return a Composite resource bundle @throws BundleDependencyException if a bundle dependency excption occurs
[ "Build", "a", "Composite", "resource", "bundle", "using", "a", "ResourceBundleDefinition" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/BundlesHandlerFactory.java#L477-L491
otto-de/edison-microservice
edison-core/src/main/java/de/otto/edison/status/domain/ServiceType.java
ServiceType.serviceType
public static ServiceType serviceType(final String type, final Criticality criticality, final String disasterImpact) { """ Creates a ServiceType. @param type The type of the service dependency. @param criticality The criticality of the required service for the operation of this service. @param disasterImpact ...
java
public static ServiceType serviceType(final String type, final Criticality criticality, final String disasterImpact) { return new ServiceType(type, criticality, disasterImpact); }
[ "public", "static", "ServiceType", "serviceType", "(", "final", "String", "type", ",", "final", "Criticality", "criticality", ",", "final", "String", "disasterImpact", ")", "{", "return", "new", "ServiceType", "(", "type", ",", "criticality", ",", "disasterImpact"...
Creates a ServiceType. @param type The type of the service dependency. @param criticality The criticality of the required service for the operation of this service. @param disasterImpact Short description of the impact of outages: what would happen if the system is not operational? @return ServiceType
[ "Creates", "a", "ServiceType", "." ]
train
https://github.com/otto-de/edison-microservice/blob/89ecf0a0dee40977f004370b0b474a36c699e8a2/edison-core/src/main/java/de/otto/edison/status/domain/ServiceType.java#L35-L37
Alexey1Gavrilov/ExpectIt
expectit-ant/src/main/java/net/sf/expectit/ant/matcher/AbstractMatcherElement.java
AbstractMatcherElement.exportSuccessfulResult
protected void exportSuccessfulResult(String prefix, R result) { """ Exports the successful result of the match as a set of properties with the given prefix. The properties key/value format is as follows: <ul> <li>{@code prefix + ".before" = result.getBefore()}</li> <li>{@code prefix + ".group" = result.group...
java
protected void exportSuccessfulResult(String prefix, R result) { if (prefix == null) { return; } setPropertyIfNoNull(prefix, "input", result.getInput()); if (!result.isSuccessful()) { return; } setPropertyIfNoNull(prefix, "input", result.getInput()...
[ "protected", "void", "exportSuccessfulResult", "(", "String", "prefix", ",", "R", "result", ")", "{", "if", "(", "prefix", "==", "null", ")", "{", "return", ";", "}", "setPropertyIfNoNull", "(", "prefix", ",", "\"input\"", ",", "result", ".", "getInput", "...
Exports the successful result of the match as a set of properties with the given prefix. The properties key/value format is as follows: <ul> <li>{@code prefix + ".before" = result.getBefore()}</li> <li>{@code prefix + ".group" = result.group()}</li> <li>{@code prefix + ".success" = true}</li> <li>{@code prefix + ".grou...
[ "Exports", "the", "successful", "result", "of", "the", "match", "as", "a", "set", "of", "properties", "with", "the", "given", "prefix", ".", "The", "properties", "key", "/", "value", "format", "is", "as", "follows", ":", "<ul", ">", "<li", ">", "{", "@...
train
https://github.com/Alexey1Gavrilov/ExpectIt/blob/5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3/expectit-ant/src/main/java/net/sf/expectit/ant/matcher/AbstractMatcherElement.java#L85-L100
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java
ValueNumberFrameModelingVisitor.popInputValues
private ValueNumber[] popInputValues(int numWordsConsumed) { """ Pop the input values for the given instruction from the current frame. """ ValueNumberFrame frame = getFrame(); ValueNumber[] inputValueList = allocateValueNumberArray(numWordsConsumed); // Pop off the input operands. ...
java
private ValueNumber[] popInputValues(int numWordsConsumed) { ValueNumberFrame frame = getFrame(); ValueNumber[] inputValueList = allocateValueNumberArray(numWordsConsumed); // Pop off the input operands. try { frame.getTopStackWords(inputValueList); while (numWor...
[ "private", "ValueNumber", "[", "]", "popInputValues", "(", "int", "numWordsConsumed", ")", "{", "ValueNumberFrame", "frame", "=", "getFrame", "(", ")", ";", "ValueNumber", "[", "]", "inputValueList", "=", "allocateValueNumberArray", "(", "numWordsConsumed", ")", "...
Pop the input values for the given instruction from the current frame.
[ "Pop", "the", "input", "values", "for", "the", "given", "instruction", "from", "the", "current", "frame", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java#L595-L610
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java
ToStringStyle.appendSummary
protected void appendSummary(final StringBuffer buffer, final String fieldName, final Object value) { """ <p>Append to the <code>toString</code> an <code>Object</code> value, printing a summary of the <code>Object</code>.</P> @param buffer the <code>StringBuffer</code> to populate @param fieldName the field...
java
protected void appendSummary(final StringBuffer buffer, final String fieldName, final Object value) { buffer.append(summaryObjectStartText); buffer.append(getShortClassName(value.getClass())); buffer.append(summaryObjectEndText); }
[ "protected", "void", "appendSummary", "(", "final", "StringBuffer", "buffer", ",", "final", "String", "fieldName", ",", "final", "Object", "value", ")", "{", "buffer", ".", "append", "(", "summaryObjectStartText", ")", ";", "buffer", ".", "append", "(", "getSh...
<p>Append to the <code>toString</code> an <code>Object</code> value, printing a summary of the <code>Object</code>.</P> @param buffer the <code>StringBuffer</code> to populate @param fieldName the field name, typically not used as already appended @param value the value to add to the <code>toString</code>, not <cod...
[ "<p", ">", "Append", "to", "the", "<code", ">", "toString<", "/", "code", ">", "an", "<code", ">", "Object<", "/", "code", ">", "value", "printing", "a", "summary", "of", "the", "<code", ">", "Object<", "/", "code", ">", ".", "<", "/", "P", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java#L662-L666
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/JoinableResourceBundlePropertySerializer.java
JoinableResourceBundlePropertySerializer.serializeVariantSets
private static String serializeVariantSets(Map<String, VariantSet> map) { """ Serialize the variant sets. @param map the map to serialize @return the serialized variant sets """ StringBuilder result = new StringBuilder(); for (Entry<String, VariantSet> entry : map.entrySet()) { result.append(entry...
java
private static String serializeVariantSets(Map<String, VariantSet> map) { StringBuilder result = new StringBuilder(); for (Entry<String, VariantSet> entry : map.entrySet()) { result.append(entry.getKey()).append(":"); VariantSet variantSet = (VariantSet) entry.getValue(); result.append(variantSet.getDefau...
[ "private", "static", "String", "serializeVariantSets", "(", "Map", "<", "String", ",", "VariantSet", ">", "map", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Entry", "<", "String", ",", "VariantSet", ">", "e...
Serialize the variant sets. @param map the map to serialize @return the serialized variant sets
[ "Serialize", "the", "variant", "sets", "." ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/JoinableResourceBundlePropertySerializer.java#L198-L210
sporniket/core
sporniket-core-ml/src/main/java/com/sporniket/libre/lang/xml/XmlStringTools.java
XmlStringTools.doAppendTextInsideTag
private static StringBuffer doAppendTextInsideTag(StringBuffer buffer, String text, String tag, Map<String, String> attributes) { """ Wrap a text inside a tag with attributes. @param buffer StringBuffer to fill @param text the text to wrap @param tag the tag to use @param attributes the attribute map @r...
java
private static StringBuffer doAppendTextInsideTag(StringBuffer buffer, String text, String tag, Map<String, String> attributes) { return appendClosingTag(appendOpeningTag(buffer, tag, attributes).append(text), tag); }
[ "private", "static", "StringBuffer", "doAppendTextInsideTag", "(", "StringBuffer", "buffer", ",", "String", "text", ",", "String", "tag", ",", "Map", "<", "String", ",", "String", ">", "attributes", ")", "{", "return", "appendClosingTag", "(", "appendOpeningTag", ...
Wrap a text inside a tag with attributes. @param buffer StringBuffer to fill @param text the text to wrap @param tag the tag to use @param attributes the attribute map @return the buffer
[ "Wrap", "a", "text", "inside", "a", "tag", "with", "attributes", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-ml/src/main/java/com/sporniket/libre/lang/xml/XmlStringTools.java#L514-L517
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/MapHelper.java
MapHelper.copyValuesFromTo
public void copyValuesFromTo(Map<String, Object> otherMap, Map<String, Object> map) { """ Adds all values in the otherMap to map. @param otherMap to obtain values from. @param map map to store value in. """ map.putAll(otherMap); }
java
public void copyValuesFromTo(Map<String, Object> otherMap, Map<String, Object> map) { map.putAll(otherMap); }
[ "public", "void", "copyValuesFromTo", "(", "Map", "<", "String", ",", "Object", ">", "otherMap", ",", "Map", "<", "String", ",", "Object", ">", "map", ")", "{", "map", ".", "putAll", "(", "otherMap", ")", ";", "}" ]
Adds all values in the otherMap to map. @param otherMap to obtain values from. @param map map to store value in.
[ "Adds", "all", "values", "in", "the", "otherMap", "to", "map", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/MapHelper.java#L124-L126
baasbox/Android-SDK
library/src/main/java/com/baasbox/android/json/JsonArray.java
JsonArray.getString
public String getString(int index, String otherwise) { """ Returns the String at index or otherwise if not found @param index @param otherwise @return the value at index or otherwise @throws java.lang.IndexOutOfBoundsException if the index is out of the array bounds """ Object o = list.get(index)...
java
public String getString(int index, String otherwise) { Object o = list.get(index); if (o == null) return otherwise; if (o instanceof String) return (String) o; if (o instanceof byte[]) return encodeBinary((byte[])o); throw new JsonException("not a string"); }
[ "public", "String", "getString", "(", "int", "index", ",", "String", "otherwise", ")", "{", "Object", "o", "=", "list", ".", "get", "(", "index", ")", ";", "if", "(", "o", "==", "null", ")", "return", "otherwise", ";", "if", "(", "o", "instanceof", ...
Returns the String at index or otherwise if not found @param index @param otherwise @return the value at index or otherwise @throws java.lang.IndexOutOfBoundsException if the index is out of the array bounds
[ "Returns", "the", "String", "at", "index", "or", "otherwise", "if", "not", "found" ]
train
https://github.com/baasbox/Android-SDK/blob/6bb2203246b885b2ad63a7bfaf37c83caf15e0d8/library/src/main/java/com/baasbox/android/json/JsonArray.java#L575-L581
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_line_serviceName_phone_functionKey_keyNum_GET
public OvhFunctionKey billingAccount_line_serviceName_phone_functionKey_keyNum_GET(String billingAccount, String serviceName, Long keyNum) throws IOException { """ Get this object properties REST: GET /telephony/{billingAccount}/line/{serviceName}/phone/functionKey/{keyNum} @param billingAccount [required] The...
java
public OvhFunctionKey billingAccount_line_serviceName_phone_functionKey_keyNum_GET(String billingAccount, String serviceName, Long keyNum) throws IOException { String qPath = "/telephony/{billingAccount}/line/{serviceName}/phone/functionKey/{keyNum}"; StringBuilder sb = path(qPath, billingAccount, serviceName, keyN...
[ "public", "OvhFunctionKey", "billingAccount_line_serviceName_phone_functionKey_keyNum_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "keyNum", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/line/{serv...
Get this object properties REST: GET /telephony/{billingAccount}/line/{serviceName}/phone/functionKey/{keyNum} @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param keyNum [required] The number of the function key
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L1148-L1153
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WRepeaterRenderer.java
WRepeaterRenderer.paintRows
protected void paintRows(final WRepeater repeater, final WebXmlRenderContext renderContext) { """ Paints the rows. @param repeater the repeater to paint the rows for. @param renderContext the RenderContext to paint to. """ List<?> beanList = repeater.getBeanList(); WComponent row = repeater.getRepeated...
java
protected void paintRows(final WRepeater repeater, final WebXmlRenderContext renderContext) { List<?> beanList = repeater.getBeanList(); WComponent row = repeater.getRepeatedComponent(); for (int i = 0; i < beanList.size(); i++) { Object rowData = beanList.get(i); // Each row has its own context. This is ...
[ "protected", "void", "paintRows", "(", "final", "WRepeater", "repeater", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "List", "<", "?", ">", "beanList", "=", "repeater", ".", "getBeanList", "(", ")", ";", "WComponent", "row", "=", "repeater"...
Paints the rows. @param repeater the repeater to paint the rows for. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "rows", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WRepeaterRenderer.java#L49-L67
datasalt/pangool
core/src/main/java/com/datasalt/pangool/tuplemr/mapred/lib/output/PangoolMultipleOutputs.java
PangoolMultipleOutputs.addNamedOutputContext
public static void addNamedOutputContext(Job job, String namedOutput, String key, String value) { """ Added this method for allowing specific (key, value) configurations for each Output. Some Output Formats read specific configuration values and act based on them. @param namedOutput @param key @param value ...
java
public static void addNamedOutputContext(Job job, String namedOutput, String key, String value) { // Check that this named output has been configured before Configuration conf = job.getConfiguration(); // Add specific configuration conf.set(MO_PREFIX + namedOutput + CONF + "." + key, value); }
[ "public", "static", "void", "addNamedOutputContext", "(", "Job", "job", ",", "String", "namedOutput", ",", "String", "key", ",", "String", "value", ")", "{", "// Check that this named output has been configured before", "Configuration", "conf", "=", "job", ".", "getCo...
Added this method for allowing specific (key, value) configurations for each Output. Some Output Formats read specific configuration values and act based on them. @param namedOutput @param key @param value
[ "Added", "this", "method", "for", "allowing", "specific", "(", "key", "value", ")", "configurations", "for", "each", "Output", ".", "Some", "Output", "Formats", "read", "specific", "configuration", "values", "and", "act", "based", "on", "them", "." ]
train
https://github.com/datasalt/pangool/blob/bfd312dd78cba03febaf7988ae96a3d4bc585408/core/src/main/java/com/datasalt/pangool/tuplemr/mapred/lib/output/PangoolMultipleOutputs.java#L236-L241
alkacon/opencms-core
src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java
CmsDefaultXmlContentHandler.initSynchronizations
protected void initSynchronizations(Element root, CmsXmlContentDefinition contentDefinition) { """ Initializes the locale synchronizations elements.<p> @param root the synchronizations element of the content schema appinfo. @param contentDefinition the content definition """ List<Element> elements...
java
protected void initSynchronizations(Element root, CmsXmlContentDefinition contentDefinition) { List<Element> elements = new ArrayList<Element>(CmsXmlGenericWrapper.elements(root, APPINFO_SYNCHRONIZATION)); for (Element element : elements) { String elementName = element.attributeValue(APPINF...
[ "protected", "void", "initSynchronizations", "(", "Element", "root", ",", "CmsXmlContentDefinition", "contentDefinition", ")", "{", "List", "<", "Element", ">", "elements", "=", "new", "ArrayList", "<", "Element", ">", "(", "CmsXmlGenericWrapper", ".", "elements", ...
Initializes the locale synchronizations elements.<p> @param root the synchronizations element of the content schema appinfo. @param contentDefinition the content definition
[ "Initializes", "the", "locale", "synchronizations", "elements", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java#L3101-L3108
michael-rapp/AndroidBottomSheet
library/src/main/java/de/mrapp/android/bottomsheet/BottomSheet.java
BottomSheet.setDivider
public final void setDivider(final int index, @StringRes final int titleId) { """ Replaces the item at a specific index with a divider. @param index The index of the item, which should be replaced, as an {@link Integer} value @param titleId The resource id of the title of the divider, which should be added, ...
java
public final void setDivider(final int index, @StringRes final int titleId) { Divider divider = new Divider(); divider.setTitle(getContext(), titleId); adapter.set(index, divider); adaptGridViewHeight(); }
[ "public", "final", "void", "setDivider", "(", "final", "int", "index", ",", "@", "StringRes", "final", "int", "titleId", ")", "{", "Divider", "divider", "=", "new", "Divider", "(", ")", ";", "divider", ".", "setTitle", "(", "getContext", "(", ")", ",", ...
Replaces the item at a specific index with a divider. @param index The index of the item, which should be replaced, as an {@link Integer} value @param titleId The resource id of the title of the divider, which should be added, as an {@link Integer} value. The resource id must correspond to a valid string resource
[ "Replaces", "the", "item", "at", "a", "specific", "index", "with", "a", "divider", "." ]
train
https://github.com/michael-rapp/AndroidBottomSheet/blob/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/library/src/main/java/de/mrapp/android/bottomsheet/BottomSheet.java#L2201-L2206
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/URIUtilities.java
URIUtilities.getConcatenatedParameters
public static String getConcatenatedParameters(Map<String, String> parameters, String... keys) { """ Create the Query part of an URI @param parameters Parameters to read @param keys map property to read @return Query part of an URI """ StringBuilder keyValues = new StringBuilder(); for(S...
java
public static String getConcatenatedParameters(Map<String, String> parameters, String... keys) { StringBuilder keyValues = new StringBuilder(); for(String key : keys) { String value = parameters.get(key.toLowerCase().trim()); if(value!=null) { if(keyValues.length(...
[ "public", "static", "String", "getConcatenatedParameters", "(", "Map", "<", "String", ",", "String", ">", "parameters", ",", "String", "...", "keys", ")", "{", "StringBuilder", "keyValues", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "String", "k...
Create the Query part of an URI @param parameters Parameters to read @param keys map property to read @return Query part of an URI
[ "Create", "the", "Query", "part", "of", "an", "URI" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/URIUtilities.java#L93-L107
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/segmentation/slic/SegmentSlic.java
SegmentSlic.perturbCenter
protected void perturbCenter( Cluster c , int x , int y ) { """ Set the cluster's center to be the pixel in a 3x3 neighborhood with the smallest gradient """ float best = Float.MAX_VALUE; int bestX=0,bestY=0; for( int dy = -1; dy <= 1; dy++ ) { for( int dx = -1; dx <= 1; dx++ ) { float d = gradie...
java
protected void perturbCenter( Cluster c , int x , int y ) { float best = Float.MAX_VALUE; int bestX=0,bestY=0; for( int dy = -1; dy <= 1; dy++ ) { for( int dx = -1; dx <= 1; dx++ ) { float d = gradient(x + dx, y + dy); if( d < best ) { best = d; bestX = dx; bestY = dy; } } } ...
[ "protected", "void", "perturbCenter", "(", "Cluster", "c", ",", "int", "x", ",", "int", "y", ")", "{", "float", "best", "=", "Float", ".", "MAX_VALUE", ";", "int", "bestX", "=", "0", ",", "bestY", "=", "0", ";", "for", "(", "int", "dy", "=", "-",...
Set the cluster's center to be the pixel in a 3x3 neighborhood with the smallest gradient
[ "Set", "the", "cluster", "s", "center", "to", "be", "the", "pixel", "in", "a", "3x3", "neighborhood", "with", "the", "smallest", "gradient" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/segmentation/slic/SegmentSlic.java#L220-L238
voldemort/voldemort
src/java/voldemort/tools/admin/AdminToolUtils.java
AdminToolUtils.askConfirm
public static Boolean askConfirm(Boolean confirm, String opDesc) throws IOException { """ Utility function that pauses and asks for confirmation on dangerous operations. @param confirm User has already confirmed in command-line input @param opDesc Description of the dangerous operation @throws IOException @...
java
public static Boolean askConfirm(Boolean confirm, String opDesc) throws IOException { if(confirm) { System.out.println("Confirmed " + opDesc + " in command-line."); return true; } else { System.out.println("Are you sure you want to " + opDesc + "? (yes/no)"); ...
[ "public", "static", "Boolean", "askConfirm", "(", "Boolean", "confirm", ",", "String", "opDesc", ")", "throws", "IOException", "{", "if", "(", "confirm", ")", "{", "System", ".", "out", ".", "println", "(", "\"Confirmed \"", "+", "opDesc", "+", "\" in comman...
Utility function that pauses and asks for confirmation on dangerous operations. @param confirm User has already confirmed in command-line input @param opDesc Description of the dangerous operation @throws IOException @return True if user confirms the operation in either command-line input or here.
[ "Utility", "function", "that", "pauses", "and", "asks", "for", "confirmation", "on", "dangerous", "operations", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/tools/admin/AdminToolUtils.java#L99-L113
Alluxio/alluxio
integration/yarn/src/main/java/alluxio/yarn/YarnUtils.java
YarnUtils.buildCommand
public static String buildCommand(YarnContainerType containerType, Map<String, String> args) { """ Creates a command string for running the Alluxio yarn setup script for the given type of yarn container. @param containerType the type of container to build the command for @param args arguments to pass to to th...
java
public static String buildCommand(YarnContainerType containerType, Map<String, String> args) { CommandBuilder commandBuilder = new CommandBuilder("./" + ALLUXIO_SETUP_SCRIPT).addArg(containerType.getName()); for (Entry<String, String> argsEntry : args.entrySet()) { commandBuilder.addArg(argsEntry....
[ "public", "static", "String", "buildCommand", "(", "YarnContainerType", "containerType", ",", "Map", "<", "String", ",", "String", ">", "args", ")", "{", "CommandBuilder", "commandBuilder", "=", "new", "CommandBuilder", "(", "\"./\"", "+", "ALLUXIO_SETUP_SCRIPT", ...
Creates a command string for running the Alluxio yarn setup script for the given type of yarn container. @param containerType the type of container to build the command for @param args arguments to pass to to the setup script @return the built command string
[ "Creates", "a", "command", "string", "for", "running", "the", "Alluxio", "yarn", "setup", "script", "for", "the", "given", "type", "of", "yarn", "container", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/integration/yarn/src/main/java/alluxio/yarn/YarnUtils.java#L139-L149
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CurrencyDisplayNames.java
CurrencyDisplayNames.getInstance
public static CurrencyDisplayNames getInstance(Locale locale, boolean noSubstitute) { """ Return an instance of CurrencyDisplayNames that provides information localized for display in the provided locale. If noSubstitute is false, this behaves like {@link #getInstance(Locale)}. Otherwise, 1) if there is no su...
java
public static CurrencyDisplayNames getInstance(Locale locale, boolean noSubstitute) { return getInstance(ULocale.forLocale(locale), noSubstitute); }
[ "public", "static", "CurrencyDisplayNames", "getInstance", "(", "Locale", "locale", ",", "boolean", "noSubstitute", ")", "{", "return", "getInstance", "(", "ULocale", ".", "forLocale", "(", "locale", ")", ",", "noSubstitute", ")", ";", "}" ]
Return an instance of CurrencyDisplayNames that provides information localized for display in the provided locale. If noSubstitute is false, this behaves like {@link #getInstance(Locale)}. Otherwise, 1) if there is no supporting data for the locale at all, there is no fallback through the default locale or root, and ...
[ "Return", "an", "instance", "of", "CurrencyDisplayNames", "that", "provides", "information", "localized", "for", "display", "in", "the", "provided", "locale", ".", "If", "noSubstitute", "is", "false", "this", "behaves", "like", "{", "@link", "#getInstance", "(", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CurrencyDisplayNames.java#L86-L88
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java
FeatureOverlayQuery.buildMapClickTableDataWithMapBounds
public FeatureTableData buildMapClickTableDataWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, double tolerance, Projection projection) { """ Perform a query based upon the map click location and build feature table data @param latLng location @param zoom current zoom level @param ma...
java
public FeatureTableData buildMapClickTableDataWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, double tolerance, Projection projection) { // Build a bounding box to represent the click location BoundingBox boundingBox = buildClickBoundingBox(latLng, mapBounds); FeatureTableData...
[ "public", "FeatureTableData", "buildMapClickTableDataWithMapBounds", "(", "LatLng", "latLng", ",", "double", "zoom", ",", "BoundingBox", "mapBounds", ",", "double", "tolerance", ",", "Projection", "projection", ")", "{", "// Build a bounding box to represent the click locatio...
Perform a query based upon the map click location and build feature table data @param latLng location @param zoom current zoom level @param mapBounds map view bounds @param tolerance distance tolerance @param projection desired geometry projection @return table data on what was clicked, or null @since 2.0....
[ "Perform", "a", "query", "based", "upon", "the", "map", "click", "location", "and", "build", "feature", "table", "data" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java#L516-L524
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/ServerInstanceLogRecordListImpl.java
ServerInstanceLogRecordListImpl.getCache
public RemoteListCache getCache() { """ returns this result cache usable for remote transport @return cache instance used in remote log reading """ RemoteRepositoryCache logCache = getLogResult()==null ? null : getLogResult().getCache(); RemoteRepositoryCache traceCache = getTraceResult()==null ? null :...
java
public RemoteListCache getCache() { RemoteRepositoryCache logCache = getLogResult()==null ? null : getLogResult().getCache(); RemoteRepositoryCache traceCache = getTraceResult()==null ? null : getTraceResult().getCache(); return switched ? new RemoteListCacheImpl(traceCache, logCache) : new RemoteListCacheImpl(lo...
[ "public", "RemoteListCache", "getCache", "(", ")", "{", "RemoteRepositoryCache", "logCache", "=", "getLogResult", "(", ")", "==", "null", "?", "null", ":", "getLogResult", "(", ")", ".", "getCache", "(", ")", ";", "RemoteRepositoryCache", "traceCache", "=", "g...
returns this result cache usable for remote transport @return cache instance used in remote log reading
[ "returns", "this", "result", "cache", "usable", "for", "remote", "transport" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/ServerInstanceLogRecordListImpl.java#L75-L79
sagiegurari/fax4j
src/main/java/org/fax4j/common/AbstractLogger.java
AbstractLogger.logInfo
public void logInfo(Object[] message,Throwable throwable) { """ Logs the provided data at the info level. @param message The message parts (may be null) @param throwable The error (may be null) """ this.log(LogLevel.INFO,message,throwable); }
java
public void logInfo(Object[] message,Throwable throwable) { this.log(LogLevel.INFO,message,throwable); }
[ "public", "void", "logInfo", "(", "Object", "[", "]", "message", ",", "Throwable", "throwable", ")", "{", "this", ".", "log", "(", "LogLevel", ".", "INFO", ",", "message", ",", "throwable", ")", ";", "}" ]
Logs the provided data at the info level. @param message The message parts (may be null) @param throwable The error (may be null)
[ "Logs", "the", "provided", "data", "at", "the", "info", "level", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/common/AbstractLogger.java#L183-L186
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/lang/BooleanHelper.java
BooleanHelper.getBooleanValue
public static boolean getBooleanValue (@Nullable final Boolean aObj, final boolean bDefault) { """ Get the primitive value of the passed object value. @param aObj The Boolean value to be converted @param bDefault The default value to be returned, if the passed obj is <code>null</code>. @return Either the p...
java
public static boolean getBooleanValue (@Nullable final Boolean aObj, final boolean bDefault) { return aObj == null ? bDefault : aObj.booleanValue (); }
[ "public", "static", "boolean", "getBooleanValue", "(", "@", "Nullable", "final", "Boolean", "aObj", ",", "final", "boolean", "bDefault", ")", "{", "return", "aObj", "==", "null", "?", "bDefault", ":", "aObj", ".", "booleanValue", "(", ")", ";", "}" ]
Get the primitive value of the passed object value. @param aObj The Boolean value to be converted @param bDefault The default value to be returned, if the passed obj is <code>null</code>. @return Either the primitive boolean value or the default value
[ "Get", "the", "primitive", "value", "of", "the", "passed", "object", "value", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/lang/BooleanHelper.java#L48-L51
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/string/Strs.java
Strs.isEmpty
public static boolean isEmpty(String target, String... specialValueAsEmpty) { """ Checks if a String is empty ("") or null or special value. @param target @param specialValueAsEmpty @return """ if (isEmpty(target)) { return true; } return matcher(target).isEmpty(specialValueAsEmpty); }
java
public static boolean isEmpty(String target, String... specialValueAsEmpty) { if (isEmpty(target)) { return true; } return matcher(target).isEmpty(specialValueAsEmpty); }
[ "public", "static", "boolean", "isEmpty", "(", "String", "target", ",", "String", "...", "specialValueAsEmpty", ")", "{", "if", "(", "isEmpty", "(", "target", ")", ")", "{", "return", "true", ";", "}", "return", "matcher", "(", "target", ")", ".", "isEmp...
Checks if a String is empty ("") or null or special value. @param target @param specialValueAsEmpty @return
[ "Checks", "if", "a", "String", "is", "empty", "(", ")", "or", "null", "or", "special", "value", "." ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/string/Strs.java#L150-L156
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/failover/AbstractMastersListener.java
AbstractMastersListener.isQueryRelaunchable
public boolean isQueryRelaunchable(Method method, Object[] args) { """ Check if query can be re-executed. @param method invoke method @param args invoke arguments @return true if can be re-executed """ if (method != null) { switch (method.getName()) { case "executeQuery": if ...
java
public boolean isQueryRelaunchable(Method method, Object[] args) { if (method != null) { switch (method.getName()) { case "executeQuery": if (!((Boolean) args[0])) { return true; //launched on slave connection } if (args[2] instanceof String) { ret...
[ "public", "boolean", "isQueryRelaunchable", "(", "Method", "method", ",", "Object", "[", "]", "args", ")", "{", "if", "(", "method", "!=", "null", ")", "{", "switch", "(", "method", ".", "getName", "(", ")", ")", "{", "case", "\"executeQuery\"", ":", "...
Check if query can be re-executed. @param method invoke method @param args invoke arguments @return true if can be re-executed
[ "Check", "if", "query", "can", "be", "re", "-", "executed", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/failover/AbstractMastersListener.java#L360-L391
Azure/autorest-clientruntime-for-java
client-runtime/src/main/java/com/microsoft/rest/interceptors/CustomHeadersInterceptor.java
CustomHeadersInterceptor.addHeader
public CustomHeadersInterceptor addHeader(String name, String value) { """ Add a single header key-value pair. If one with the name already exists, both stay in the header map. @param name the name of the header. @param value the value of the header. @return the interceptor instance itself. """ i...
java
public CustomHeadersInterceptor addHeader(String name, String value) { if (!this.headers.containsKey(name)) { this.headers.put(name, new ArrayList<String>()); } this.headers.get(name).add(value); return this; }
[ "public", "CustomHeadersInterceptor", "addHeader", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "!", "this", ".", "headers", ".", "containsKey", "(", "name", ")", ")", "{", "this", ".", "headers", ".", "put", "(", "name", ",", "n...
Add a single header key-value pair. If one with the name already exists, both stay in the header map. @param name the name of the header. @param value the value of the header. @return the interceptor instance itself.
[ "Add", "a", "single", "header", "key", "-", "value", "pair", ".", "If", "one", "with", "the", "name", "already", "exists", "both", "stay", "in", "the", "header", "map", "." ]
train
https://github.com/Azure/autorest-clientruntime-for-java/blob/04621e07dbb0456dd5459dd641f06a9fd4f3abad/client-runtime/src/main/java/com/microsoft/rest/interceptors/CustomHeadersInterceptor.java#L78-L84
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/RunContainer.java
RunContainer.copyToOffset
private void copyToOffset(int offset) { """ Push all values length to the end of the array (resize array if needed) """ final int minCapacity = 2 * (offset + nbrruns); if (valueslength.length < minCapacity) { // expensive case where we need to reallocate int newCapacity = valueslength.lengt...
java
private void copyToOffset(int offset) { final int minCapacity = 2 * (offset + nbrruns); if (valueslength.length < minCapacity) { // expensive case where we need to reallocate int newCapacity = valueslength.length; while (newCapacity < minCapacity) { newCapacity = (newCapacity == 0) ? D...
[ "private", "void", "copyToOffset", "(", "int", "offset", ")", "{", "final", "int", "minCapacity", "=", "2", "*", "(", "offset", "+", "nbrruns", ")", ";", "if", "(", "valueslength", ".", "length", "<", "minCapacity", ")", "{", "// expensive case where we need...
Push all values length to the end of the array (resize array if needed)
[ "Push", "all", "values", "length", "to", "the", "end", "of", "the", "array", "(", "resize", "array", "if", "needed", ")" ]
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/RunContainer.java#L889-L906
janus-project/guava.janusproject.io
guava/src/com/google/common/math/BigIntegerMath.java
BigIntegerMath.divide
@GwtIncompatible("TODO") public static BigInteger divide(BigInteger p, BigInteger q, RoundingMode mode) { """ Returns the result of dividing {@code p} by {@code q}, rounding using the specified {@code RoundingMode}. @throws ArithmeticException if {@code q == 0}, or if {@code mode == UNNECESSARY} and {@code a...
java
@GwtIncompatible("TODO") public static BigInteger divide(BigInteger p, BigInteger q, RoundingMode mode) { BigDecimal pDec = new BigDecimal(p); BigDecimal qDec = new BigDecimal(q); return pDec.divide(qDec, 0, mode).toBigIntegerExact(); }
[ "@", "GwtIncompatible", "(", "\"TODO\"", ")", "public", "static", "BigInteger", "divide", "(", "BigInteger", "p", ",", "BigInteger", "q", ",", "RoundingMode", "mode", ")", "{", "BigDecimal", "pDec", "=", "new", "BigDecimal", "(", "p", ")", ";", "BigDecimal",...
Returns the result of dividing {@code p} by {@code q}, rounding using the specified {@code RoundingMode}. @throws ArithmeticException if {@code q == 0}, or if {@code mode == UNNECESSARY} and {@code a} is not an integer multiple of {@code b}
[ "Returns", "the", "result", "of", "dividing", "{", "@code", "p", "}", "by", "{", "@code", "q", "}", "rounding", "using", "the", "specified", "{", "@code", "RoundingMode", "}", "." ]
train
https://github.com/janus-project/guava.janusproject.io/blob/1c48fb672c9fdfddf276970570f703fa1115f588/guava/src/com/google/common/math/BigIntegerMath.java#L297-L302
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WLink.java
WLink.setText
public void setText(final String text, final Serializable... args) { """ Sets the text displayed on the link. @param text the text to set, using {@link MessageFormat} syntax. @param args optional arguments for the message format string. """ getOrCreateComponentModel().text = I18nUtilities.asMessage(text,...
java
public void setText(final String text, final Serializable... args) { getOrCreateComponentModel().text = I18nUtilities.asMessage(text, args); }
[ "public", "void", "setText", "(", "final", "String", "text", ",", "final", "Serializable", "...", "args", ")", "{", "getOrCreateComponentModel", "(", ")", ".", "text", "=", "I18nUtilities", ".", "asMessage", "(", "text", ",", "args", ")", ";", "}" ]
Sets the text displayed on the link. @param text the text to set, using {@link MessageFormat} syntax. @param args optional arguments for the message format string.
[ "Sets", "the", "text", "displayed", "on", "the", "link", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WLink.java#L140-L142
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpProcedureTask.java
MpProcedureTask.doRestart
public void doRestart(List<Long> masters, Map<Integer, Long> partitionMasters) { """ Update the list of partition masters to be used when this transaction is restarted. Currently thread-safe because we call this before poisoning the MP Transaction to restart it, and only do this sequentially from the repairing ...
java
public void doRestart(List<Long> masters, Map<Integer, Long> partitionMasters) { List<Long> copy = new ArrayList<Long>(masters); m_restartMasters.set(copy); m_restartMastersMap.set(Maps.newHashMap(partitionMasters)); }
[ "public", "void", "doRestart", "(", "List", "<", "Long", ">", "masters", ",", "Map", "<", "Integer", ",", "Long", ">", "partitionMasters", ")", "{", "List", "<", "Long", ">", "copy", "=", "new", "ArrayList", "<", "Long", ">", "(", "masters", ")", ";"...
Update the list of partition masters to be used when this transaction is restarted. Currently thread-safe because we call this before poisoning the MP Transaction to restart it, and only do this sequentially from the repairing thread.
[ "Update", "the", "list", "of", "partition", "masters", "to", "be", "used", "when", "this", "transaction", "is", "restarted", ".", "Currently", "thread", "-", "safe", "because", "we", "call", "this", "before", "poisoning", "the", "MP", "Transaction", "to", "r...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpProcedureTask.java#L98-L104
voldemort/voldemort
src/java/voldemort/utils/pool/QueuedKeyedResourcePool.java
QueuedKeyedResourcePool.checkin
@Override public void checkin(K key, V resource) { """ Check the given resource back into the pool @param key The key for the resource @param resource The resource """ super.checkin(key, resource); // NB: Blocking checkout calls for synchronous requests get the resource // check...
java
@Override public void checkin(K key, V resource) { super.checkin(key, resource); // NB: Blocking checkout calls for synchronous requests get the resource // checked in above before processQueueLoop() attempts checkout below. // There is therefore a risk that asynchronous requests wil...
[ "@", "Override", "public", "void", "checkin", "(", "K", "key", ",", "V", "resource", ")", "{", "super", ".", "checkin", "(", "key", ",", "resource", ")", ";", "// NB: Blocking checkout calls for synchronous requests get the resource", "// checked in above before process...
Check the given resource back into the pool @param key The key for the resource @param resource The resource
[ "Check", "the", "given", "resource", "back", "into", "the", "pool" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/pool/QueuedKeyedResourcePool.java#L248-L255
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster.toComment
public static Comment toComment(Document doc, Object o) throws PageException { """ casts a value to a XML Comment Object @param doc XML Document @param o Object to cast @return XML Comment Object @throws PageException """ if (o instanceof Comment) return (Comment) o; else if (o instanceof CharacterData...
java
public static Comment toComment(Document doc, Object o) throws PageException { if (o instanceof Comment) return (Comment) o; else if (o instanceof CharacterData) return doc.createComment(((CharacterData) o).getData()); return doc.createComment(Caster.toString(o)); }
[ "public", "static", "Comment", "toComment", "(", "Document", "doc", ",", "Object", "o", ")", "throws", "PageException", "{", "if", "(", "o", "instanceof", "Comment", ")", "return", "(", "Comment", ")", "o", ";", "else", "if", "(", "o", "instanceof", "Cha...
casts a value to a XML Comment Object @param doc XML Document @param o Object to cast @return XML Comment Object @throws PageException
[ "casts", "a", "value", "to", "a", "XML", "Comment", "Object" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L218-L222
kefirfromperm/kefirbb
src/org/kefirsf/bb/proc/ProcBol.java
ProcBol.skipLineBreak
private int skipLineBreak(Source source, final int offset) { """ Skip line break characters. '\r\n' for example @param source text source @param offset current index @return new index """ char p; char c; int index = offset; p = source.charAt(index); index++; ...
java
private int skipLineBreak(Source source, final int offset) { char p; char c; int index = offset; p = source.charAt(index); index++; if (index < source.length()) { c = source.charAt(index); if ((c == '\n' || c == '\r') && c != p) { i...
[ "private", "int", "skipLineBreak", "(", "Source", "source", ",", "final", "int", "offset", ")", "{", "char", "p", ";", "char", "c", ";", "int", "index", "=", "offset", ";", "p", "=", "source", ".", "charAt", "(", "index", ")", ";", "index", "++", "...
Skip line break characters. '\r\n' for example @param source text source @param offset current index @return new index
[ "Skip", "line", "break", "characters", ".", "\\", "r", "\\", "n", "for", "example" ]
train
https://github.com/kefirfromperm/kefirbb/blob/8c36fc3d3dc27459b0cdc179b87582df30420856/src/org/kefirsf/bb/proc/ProcBol.java#L94-L107
google/error-prone-javac
make/tools/propertiesparser/gen/ClassGenerator.java
ClassGenerator.generateFactory
public void generateFactory(MessageFile messageFile, File outDir) { """ Main entry-point: generate a Java enum-like set of nested factory classes into given output folder. The factories are populated as mandated by the comments in the input resource file. """ Map<FactoryKind, List<Map.Entry<String, Me...
java
public void generateFactory(MessageFile messageFile, File outDir) { Map<FactoryKind, List<Map.Entry<String, Message>>> groupedEntries = messageFile.messages.entrySet().stream() .collect(Collectors.groupingBy(e -> FactoryKind.parseFrom(e.getKey().split("\\.")[1]))); ...
[ "public", "void", "generateFactory", "(", "MessageFile", "messageFile", ",", "File", "outDir", ")", "{", "Map", "<", "FactoryKind", ",", "List", "<", "Map", ".", "Entry", "<", "String", ",", "Message", ">", ">", ">", "groupedEntries", "=", "messageFile", "...
Main entry-point: generate a Java enum-like set of nested factory classes into given output folder. The factories are populated as mandated by the comments in the input resource file.
[ "Main", "entry", "-", "point", ":", "generate", "a", "Java", "enum", "-", "like", "set", "of", "nested", "factory", "classes", "into", "given", "output", "folder", ".", "The", "factories", "are", "populated", "as", "mandated", "by", "the", "comments", "in"...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/make/tools/propertiesparser/gen/ClassGenerator.java#L148-L179
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesManagementApi.java
DevicesManagementApi.getAllByDid
public TaskByDidListEnvelope getAllByDid(String did, Integer count, Integer offset, String status, String order, String sort) throws ApiException { """ Returns the list of tasks for a particular device id with optional status filter. Returns the list of tasks for a particular device id with optional status filter...
java
public TaskByDidListEnvelope getAllByDid(String did, Integer count, Integer offset, String status, String order, String sort) throws ApiException { ApiResponse<TaskByDidListEnvelope> resp = getAllByDidWithHttpInfo(did, count, offset, status, order, sort); return resp.getData(); }
[ "public", "TaskByDidListEnvelope", "getAllByDid", "(", "String", "did", ",", "Integer", "count", ",", "Integer", "offset", ",", "String", "status", ",", "String", "order", ",", "String", "sort", ")", "throws", "ApiException", "{", "ApiResponse", "<", "TaskByDidL...
Returns the list of tasks for a particular device id with optional status filter. Returns the list of tasks for a particular device id with optional status filter. @param did Device ID. (required) @param count Max results count. (optional) @param offset Result starting offset. (optional) @param status Status filter. Co...
[ "Returns", "the", "list", "of", "tasks", "for", "a", "particular", "device", "id", "with", "optional", "status", "filter", ".", "Returns", "the", "list", "of", "tasks", "for", "a", "particular", "device", "id", "with", "optional", "status", "filter", "." ]
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesManagementApi.java#L390-L393
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/PresizeCollections.java
PresizeCollections.visitCode
@Override public void visitCode(Code obj) { """ implements the visitor to reset the opcode stack @param obj the context object of the currently parsed code block """ stack.resetForMethodEntry(this); nextAllocNumber = 1; storeToUserValue.clear(); allocLocation.clear(); ...
java
@Override public void visitCode(Code obj) { stack.resetForMethodEntry(this); nextAllocNumber = 1; storeToUserValue.clear(); allocLocation.clear(); allocToAddPCs.clear(); optionalRanges.clear(); addExceptionRanges(obj); super.visitCode(obj); ...
[ "@", "Override", "public", "void", "visitCode", "(", "Code", "obj", ")", "{", "stack", ".", "resetForMethodEntry", "(", "this", ")", ";", "nextAllocNumber", "=", "1", ";", "storeToUserValue", ".", "clear", "(", ")", ";", "allocLocation", ".", "clear", "(",...
implements the visitor to reset the opcode stack @param obj the context object of the currently parsed code block
[ "implements", "the", "visitor", "to", "reset", "the", "opcode", "stack" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/PresizeCollections.java#L148-L167
apache/spark
sql/catalyst/src/main/java/org/apache/spark/sql/catalog/v2/Catalogs.java
Catalogs.catalogOptions
private static CaseInsensitiveStringMap catalogOptions(String name, SQLConf conf) { """ Extracts a named catalog's configuration from a SQLConf. @param name a catalog name @param conf a SQLConf @return a case insensitive string map of options starting with spark.sql.catalog.(name). """ Map<String, Str...
java
private static CaseInsensitiveStringMap catalogOptions(String name, SQLConf conf) { Map<String, String> allConfs = mapAsJavaMapConverter(conf.getAllConfs()).asJava(); Pattern prefix = Pattern.compile("^spark\\.sql\\.catalog\\." + name + "\\.(.+)"); HashMap<String, String> options = new HashMap<>(); for...
[ "private", "static", "CaseInsensitiveStringMap", "catalogOptions", "(", "String", "name", ",", "SQLConf", "conf", ")", "{", "Map", "<", "String", ",", "String", ">", "allConfs", "=", "mapAsJavaMapConverter", "(", "conf", ".", "getAllConfs", "(", ")", ")", ".",...
Extracts a named catalog's configuration from a SQLConf. @param name a catalog name @param conf a SQLConf @return a case insensitive string map of options starting with spark.sql.catalog.(name).
[ "Extracts", "a", "named", "catalog", "s", "configuration", "from", "a", "SQLConf", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/catalyst/src/main/java/org/apache/spark/sql/catalog/v2/Catalogs.java#L98-L111
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PermissionsImpl.java
PermissionsImpl.updateWithServiceResponseAsync
public Observable<ServiceResponse<OperationStatus>> updateWithServiceResponseAsync(UUID appId, UpdatePermissionsOptionalParameter updateOptionalParameter) { """ Replaces the current users access list with the one sent in the body. If an empty list is sent, all access to other users will be removed. @param appId...
java
public Observable<ServiceResponse<OperationStatus>> updateWithServiceResponseAsync(UUID appId, UpdatePermissionsOptionalParameter updateOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); ...
[ "public", "Observable", "<", "ServiceResponse", "<", "OperationStatus", ">", ">", "updateWithServiceResponseAsync", "(", "UUID", "appId", ",", "UpdatePermissionsOptionalParameter", "updateOptionalParameter", ")", "{", "if", "(", "this", ".", "client", ".", "endpoint", ...
Replaces the current users access list with the one sent in the body. If an empty list is sent, all access to other users will be removed. @param appId The application ID. @param updateOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException t...
[ "Replaces", "the", "current", "users", "access", "list", "with", "the", "one", "sent", "in", "the", "body", ".", "If", "an", "empty", "list", "is", "sent", "all", "access", "to", "other", "users", "will", "be", "removed", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PermissionsImpl.java#L523-L533
spring-projects/spring-ldap
core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConverterManagerImpl.java
ConverterManagerImpl.makeConverterKey
private String makeConverterKey(Class<?> fromClass, String syntax, Class<?> toClass) { """ Make a key into the converters map - the keys is formed from the <code>fromClass</code>, syntax and <code>toClass</code> @param fromClass The class to convert from. @param syntax The LDAP syntax. @param toClass The clas...
java
private String makeConverterKey(Class<?> fromClass, String syntax, Class<?> toClass) { StringBuilder key = new StringBuilder(); if (syntax==null) { syntax=""; } key.append(fromClass.getName()).append(KEY_SEP).append(syntax).append(KEY_SEP).append(toClass.getName()); ...
[ "private", "String", "makeConverterKey", "(", "Class", "<", "?", ">", "fromClass", ",", "String", "syntax", ",", "Class", "<", "?", ">", "toClass", ")", "{", "StringBuilder", "key", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "syntax", "==", ...
Make a key into the converters map - the keys is formed from the <code>fromClass</code>, syntax and <code>toClass</code> @param fromClass The class to convert from. @param syntax The LDAP syntax. @param toClass The class to convert to. @return key
[ "Make", "a", "key", "into", "the", "converters", "map", "-", "the", "keys", "is", "formed", "from", "the", "<code", ">", "fromClass<", "/", "code", ">", "syntax", "and", "<code", ">", "toClass<", "/", "code", ">" ]
train
https://github.com/spring-projects/spring-ldap/blob/15142d4ae18a9dc6b363a1ebf085e2bda9d9a4c0/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConverterManagerImpl.java#L60-L67
threerings/gwt-utils
src/main/java/com/threerings/gwt/tools/I18nTool.java
I18nTool.process
public void process (File sourceDir, File propsFile) throws IOException { """ Converts a single i18n properties file to its corresponding source file. @param sourceDir the root of the source directory. Used to infer the package for the generated source given the path to the properties file and the root...
java
public void process (File sourceDir, File propsFile) throws IOException { String fileName = propsFile.getName(); if (!fileName.endsWith(".properties")) { System.err.println("Ignoring non-properties file: " + propsFile); return; } fileName = fileName.su...
[ "public", "void", "process", "(", "File", "sourceDir", ",", "File", "propsFile", ")", "throws", "IOException", "{", "String", "fileName", "=", "propsFile", ".", "getName", "(", ")", ";", "if", "(", "!", "fileName", ".", "endsWith", "(", "\".properties\"", ...
Converts a single i18n properties file to its corresponding source file. @param sourceDir the root of the source directory. Used to infer the package for the generated source given the path to the properties file and the root of the source directory. @param propsFile the properties file from which to generate a source...
[ "Converts", "a", "single", "i18n", "properties", "file", "to", "its", "corresponding", "source", "file", "." ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/tools/I18nTool.java#L46-L84
VueGWT/vue-gwt
core/src/main/java/com/axellience/vuegwt/core/client/component/options/VueComponentOptions.java
VueComponentOptions.addJavaPropDefaultValue
@JsOverlay public final void addJavaPropDefaultValue(Function javaMethod, String propertyName) { """ Add a custom prop validator to validate a property @param javaMethod Function pointer to the method in the {@link IsVueComponent} @param propertyName The name of the property to validate """ PropOptio...
java
@JsOverlay public final void addJavaPropDefaultValue(Function javaMethod, String propertyName) { PropOptions propDefinition = getProps().get(propertyName); propDefinition.defaultValue = javaMethod; }
[ "@", "JsOverlay", "public", "final", "void", "addJavaPropDefaultValue", "(", "Function", "javaMethod", ",", "String", "propertyName", ")", "{", "PropOptions", "propDefinition", "=", "getProps", "(", ")", ".", "get", "(", "propertyName", ")", ";", "propDefinition",...
Add a custom prop validator to validate a property @param javaMethod Function pointer to the method in the {@link IsVueComponent} @param propertyName The name of the property to validate
[ "Add", "a", "custom", "prop", "validator", "to", "validate", "a", "property" ]
train
https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/core/src/main/java/com/axellience/vuegwt/core/client/component/options/VueComponentOptions.java#L207-L211
googleapis/google-cloud-java
google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ContextsClient.java
ContextsClient.createContext
public final Context createContext(String parent, Context context) { """ Creates a context. <p>If the specified context already exists, overrides the context. <p>Sample code: <pre><code> try (ContextsClient contextsClient = ContextsClient.create()) { SessionName parent = SessionName.of("[PROJECT]", "[SE...
java
public final Context createContext(String parent, Context context) { CreateContextRequest request = CreateContextRequest.newBuilder().setParent(parent).setContext(context).build(); return createContext(request); }
[ "public", "final", "Context", "createContext", "(", "String", "parent", ",", "Context", "context", ")", "{", "CreateContextRequest", "request", "=", "CreateContextRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", ")", ".", "setContext", "("...
Creates a context. <p>If the specified context already exists, overrides the context. <p>Sample code: <pre><code> try (ContextsClient contextsClient = ContextsClient.create()) { SessionName parent = SessionName.of("[PROJECT]", "[SESSION]"); Context context = Context.newBuilder().build(); Context response = contextsC...
[ "Creates", "a", "context", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ContextsClient.java#L465-L470
GoogleCloudPlatform/bigdata-interop
gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageFileSystem.java
GoogleCloudStorageFileSystem.renameInternal
private void renameInternal(FileInfo srcInfo, URI dst) throws IOException { """ Renames the given path without checking any parameters. <p>GCS does not support atomic renames therefore a rename is implemented as copying source metadata to destination and then deleting source metadata. Note that only the metada...
java
private void renameInternal(FileInfo srcInfo, URI dst) throws IOException { if (srcInfo.isDirectory()) { renameDirectoryInternal(srcInfo, dst); } else { URI src = srcInfo.getPath(); StorageResourceId srcResourceId = pathCodec.validatePathAndGetId(src, true); StorageResourceId dstResource...
[ "private", "void", "renameInternal", "(", "FileInfo", "srcInfo", ",", "URI", "dst", ")", "throws", "IOException", "{", "if", "(", "srcInfo", ".", "isDirectory", "(", ")", ")", "{", "renameDirectoryInternal", "(", "srcInfo", ",", "dst", ")", ";", "}", "else...
Renames the given path without checking any parameters. <p>GCS does not support atomic renames therefore a rename is implemented as copying source metadata to destination and then deleting source metadata. Note that only the metadata is copied and not the content of any file.
[ "Renames", "the", "given", "path", "without", "checking", "any", "parameters", "." ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageFileSystem.java#L732-L757
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/SyncErrorResponseDeserializer.java
SyncErrorResponseDeserializer.getSyncError
private SyncError getSyncError(JsonNode jsonNode) throws IOException { """ Method to deserialize the SyncError object @param jsonNode @return QueryResponse """ ObjectMapper mapper = new ObjectMapper(); SimpleModule simpleModule = new SimpleModule("SyncErrorDeserializer", new Version(1, 0, 0, null)); ...
java
private SyncError getSyncError(JsonNode jsonNode) throws IOException { ObjectMapper mapper = new ObjectMapper(); SimpleModule simpleModule = new SimpleModule("SyncErrorDeserializer", new Version(1, 0, 0, null)); simpleModule.addDeserializer(SyncError.class, new SyncErrorDeserializer()); mapper.registerModule(...
[ "private", "SyncError", "getSyncError", "(", "JsonNode", "jsonNode", ")", "throws", "IOException", "{", "ObjectMapper", "mapper", "=", "new", "ObjectMapper", "(", ")", ";", "SimpleModule", "simpleModule", "=", "new", "SimpleModule", "(", "\"SyncErrorDeserializer\"", ...
Method to deserialize the SyncError object @param jsonNode @return QueryResponse
[ "Method", "to", "deserialize", "the", "SyncError", "object" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/SyncErrorResponseDeserializer.java#L145-L154
liferay/com-liferay-commerce
commerce-notification-api/src/main/java/com/liferay/commerce/notification/model/CommerceNotificationTemplateWrapper.java
CommerceNotificationTemplateWrapper.setBodyMap
@Override public void setBodyMap(Map<java.util.Locale, String> bodyMap) { """ Sets the localized bodies of this commerce notification template from the map of locales and localized bodies. @param bodyMap the locales and localized bodies of this commerce notification template """ _commerceNotificationTemp...
java
@Override public void setBodyMap(Map<java.util.Locale, String> bodyMap) { _commerceNotificationTemplate.setBodyMap(bodyMap); }
[ "@", "Override", "public", "void", "setBodyMap", "(", "Map", "<", "java", ".", "util", ".", "Locale", ",", "String", ">", "bodyMap", ")", "{", "_commerceNotificationTemplate", ".", "setBodyMap", "(", "bodyMap", ")", ";", "}" ]
Sets the localized bodies of this commerce notification template from the map of locales and localized bodies. @param bodyMap the locales and localized bodies of this commerce notification template
[ "Sets", "the", "localized", "bodies", "of", "this", "commerce", "notification", "template", "from", "the", "map", "of", "locales", "and", "localized", "bodies", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-api/src/main/java/com/liferay/commerce/notification/model/CommerceNotificationTemplateWrapper.java#L731-L734
RKumsher/utils
src/main/java/com/github/rkumsher/collection/ArrayUtils.java
ArrayUtils.randomFrom
public static <T> T randomFrom(T[] array, Collection<T> excludes) { """ Returns a random element from the given array that's not in the values to exclude. @param array array to return random element from @param excludes values to exclude @param <T> the type of elements in the given array @return random eleme...
java
public static <T> T randomFrom(T[] array, Collection<T> excludes) { checkArgument(isNotEmpty(array), "Array cannot be empty"); List<T> list = Arrays.asList(array); Iterable<T> copy = Lists.newArrayList(list); Iterables.removeAll(copy, excludes); checkArgument(!Iterables.isEmpty(copy), "Array only co...
[ "public", "static", "<", "T", ">", "T", "randomFrom", "(", "T", "[", "]", "array", ",", "Collection", "<", "T", ">", "excludes", ")", "{", "checkArgument", "(", "isNotEmpty", "(", "array", ")", ",", "\"Array cannot be empty\"", ")", ";", "List", "<", "...
Returns a random element from the given array that's not in the values to exclude. @param array array to return random element from @param excludes values to exclude @param <T> the type of elements in the given array @return random element from the given array that's not in the values to exclude @throws IllegalArgumen...
[ "Returns", "a", "random", "element", "from", "the", "given", "array", "that", "s", "not", "in", "the", "values", "to", "exclude", "." ]
train
https://github.com/RKumsher/utils/blob/fcdb190569cd0288249bf4b46fd418f8c01d1caf/src/main/java/com/github/rkumsher/collection/ArrayUtils.java#L54-L61
mozilla/rhino
src/org/mozilla/javascript/ScriptableObject.java
ScriptableObject.deleteProperty
public static boolean deleteProperty(Scriptable obj, int index) { """ Removes the property from an object or its prototype chain. <p> Searches for a property with <code>index</code> in obj or its prototype chain. If it is found, the object's delete method is called. @param obj a JavaScript object @param inde...
java
public static boolean deleteProperty(Scriptable obj, int index) { Scriptable base = getBase(obj, index); if (base == null) return true; base.delete(index); return !base.has(index, obj); }
[ "public", "static", "boolean", "deleteProperty", "(", "Scriptable", "obj", ",", "int", "index", ")", "{", "Scriptable", "base", "=", "getBase", "(", "obj", ",", "index", ")", ";", "if", "(", "base", "==", "null", ")", "return", "true", ";", "base", "."...
Removes the property from an object or its prototype chain. <p> Searches for a property with <code>index</code> in obj or its prototype chain. If it is found, the object's delete method is called. @param obj a JavaScript object @param index a property index @return true if the property doesn't exist or was successfully...
[ "Removes", "the", "property", "from", "an", "object", "or", "its", "prototype", "chain", ".", "<p", ">", "Searches", "for", "a", "property", "with", "<code", ">", "index<", "/", "code", ">", "in", "obj", "or", "its", "prototype", "chain", ".", "If", "i...
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptableObject.java#L2599-L2606
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Math.java
Math.subtractExact
public static int subtractExact(int x, int y) { """ Returns the difference of the arguments, throwing an exception if the result overflows an {@code int}. @param x the first value @param y the second value to subtract from the first @return the result @throws ArithmeticException if the result overflows an i...
java
public static int subtractExact(int x, int y) { int r = x - y; // HD 2-12 Overflow iff the arguments have different signs and // the sign of the result is different than the sign of x if (((x ^ y) & (x ^ r)) < 0) { throw new ArithmeticException("integer overflow"); } ...
[ "public", "static", "int", "subtractExact", "(", "int", "x", ",", "int", "y", ")", "{", "int", "r", "=", "x", "-", "y", ";", "// HD 2-12 Overflow iff the arguments have different signs and", "// the sign of the result is different than the sign of x", "if", "(", "(", ...
Returns the difference of the arguments, throwing an exception if the result overflows an {@code int}. @param x the first value @param y the second value to subtract from the first @return the result @throws ArithmeticException if the result overflows an int @since 1.8
[ "Returns", "the", "difference", "of", "the", "arguments", "throwing", "an", "exception", "if", "the", "result", "overflows", "an", "{", "@code", "int", "}", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Math.java#L829-L837
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java
TreeScanner.visitPackage
@Override public R visitPackage(PackageTree node, P p) { """ {@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning """ R r = scan(node.getAnnotations(), p); r = scanAndReduce(node.g...
java
@Override public R visitPackage(PackageTree node, P p) { R r = scan(node.getAnnotations(), p); r = scanAndReduce(node.getPackageName(), p, r); return r; }
[ "@", "Override", "public", "R", "visitPackage", "(", "PackageTree", "node", ",", "P", "p", ")", "{", "R", "r", "=", "scan", "(", "node", ".", "getAnnotations", "(", ")", ",", "p", ")", ";", "r", "=", "scanAndReduce", "(", "node", ".", "getPackageName...
{@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning
[ "{", "@inheritDoc", "}", "This", "implementation", "scans", "the", "children", "in", "left", "to", "right", "order", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java#L155-L160
pmlopes/yoke
framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Static.java
Static.writeHeaders
private void writeHeaders(final YokeRequest request, final FileProps props) { """ Create all required header so content can be cache by Caching servers or Browsers @param request @param props """ MultiMap headers = request.response().headers(); if (!headers.contains("etag")) { ...
java
private void writeHeaders(final YokeRequest request, final FileProps props) { MultiMap headers = request.response().headers(); if (!headers.contains("etag")) { headers.set("etag", "\"" + props.size() + "-" + props.lastModifiedTime() + "\""); } if (!headers.contains("date")...
[ "private", "void", "writeHeaders", "(", "final", "YokeRequest", "request", ",", "final", "FileProps", "props", ")", "{", "MultiMap", "headers", "=", "request", ".", "response", "(", ")", ".", "headers", "(", ")", ";", "if", "(", "!", "headers", ".", "con...
Create all required header so content can be cache by Caching servers or Browsers @param request @param props
[ "Create", "all", "required", "header", "so", "content", "can", "be", "cache", "by", "Caching", "servers", "or", "Browsers" ]
train
https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Static.java#L125-L144
feedzai/pdb
src/main/java/com/feedzai/commons/sql/abstraction/engine/DatabaseFactory.java
DatabaseFactory.getConnection
public static DatabaseEngine getConnection(Properties p) throws DatabaseFactoryException { """ Gets a database connection from the specified properties. @param p The database properties. @return A reference of the specified database engine. @throws DatabaseFactoryException If the class specified does not exis...
java
public static DatabaseEngine getConnection(Properties p) throws DatabaseFactoryException { PdbProperties pdbProperties = new PdbProperties(p, true); final String engine = pdbProperties.getEngine(); if (StringUtils.isBlank(engine)) { throw new DatabaseFactoryException("pdb.engine pro...
[ "public", "static", "DatabaseEngine", "getConnection", "(", "Properties", "p", ")", "throws", "DatabaseFactoryException", "{", "PdbProperties", "pdbProperties", "=", "new", "PdbProperties", "(", "p", ",", "true", ")", ";", "final", "String", "engine", "=", "pdbPro...
Gets a database connection from the specified properties. @param p The database properties. @return A reference of the specified database engine. @throws DatabaseFactoryException If the class specified does not exist or its not well implemented.
[ "Gets", "a", "database", "connection", "from", "the", "specified", "properties", "." ]
train
https://github.com/feedzai/pdb/blob/fe07ca08417e0ddcd620a36aa1fdbca7f338be98/src/main/java/com/feedzai/commons/sql/abstraction/engine/DatabaseFactory.java#L50-L89
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MessagePredicates.java
MessagePredicates.forRecipient
public static Predicate<Message> forRecipient(final String recipient) { """ Creates a {@link Predicate} for matching a mail recipient. This Predicate returns true if at least one recipient matches the given value. @param recipient the recipient to match @return the predicate """ return new Predicate<Me...
java
public static Predicate<Message> forRecipient(final String recipient) { return new Predicate<Message>() { @Override public boolean apply(final Message input) { Address[] addresses; try { addresses = input.getAllRecipients(); if (addresses == null) { return false; } for (Address...
[ "public", "static", "Predicate", "<", "Message", ">", "forRecipient", "(", "final", "String", "recipient", ")", "{", "return", "new", "Predicate", "<", "Message", ">", "(", ")", "{", "@", "Override", "public", "boolean", "apply", "(", "final", "Message", "...
Creates a {@link Predicate} for matching a mail recipient. This Predicate returns true if at least one recipient matches the given value. @param recipient the recipient to match @return the predicate
[ "Creates", "a", "{", "@link", "Predicate", "}", "for", "matching", "a", "mail", "recipient", ".", "This", "Predicate", "returns", "true", "if", "at", "least", "one", "recipient", "matches", "the", "given", "value", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MessagePredicates.java#L78-L104
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/UrlParser.java
UrlParser.parseInternal
private static void parseInternal(UrlParser urlParser, String url, Properties properties) throws SQLException { """ Parses the connection URL in order to set the UrlParser instance with all the information provided through the URL. @param urlParser object instance in which all data from the connection u...
java
private static void parseInternal(UrlParser urlParser, String url, Properties properties) throws SQLException { try { urlParser.initialUrl = url; int separator = url.indexOf("//"); if (separator == -1) { throw new IllegalArgumentException( "url parsing error : '//' is not...
[ "private", "static", "void", "parseInternal", "(", "UrlParser", "urlParser", ",", "String", "url", ",", "Properties", "properties", ")", "throws", "SQLException", "{", "try", "{", "urlParser", ".", "initialUrl", "=", "url", ";", "int", "separator", "=", "url",...
Parses the connection URL in order to set the UrlParser instance with all the information provided through the URL. @param urlParser object instance in which all data from the connection url is stored @param url connection URL @param properties properties @throws SQLException if format is incorrect
[ "Parses", "the", "connection", "URL", "in", "order", "to", "set", "the", "UrlParser", "instance", "with", "all", "the", "information", "provided", "through", "the", "URL", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/UrlParser.java#L175-L211
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bcc/BccClient.java
BccClient.getImage
public GetImageResponse getImage(GetImageRequest request) { """ Get the detail information of specified image. @param request The request containing all options for getting the detail information of specified image. @return The response with the image detail information. """ checkNotNull(request, "...
java
public GetImageResponse getImage(GetImageRequest request) { checkNotNull(request, "request should not be null."); checkStringNotEmpty(request.getImageId(), "request imageId should not be empty."); InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, I...
[ "public", "GetImageResponse", "getImage", "(", "GetImageRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"request should not be null.\"", ")", ";", "checkStringNotEmpty", "(", "request", ".", "getImageId", "(", ")", ",", "\"request imageId should no...
Get the detail information of specified image. @param request The request containing all options for getting the detail information of specified image. @return The response with the image detail information.
[ "Get", "the", "detail", "information", "of", "specified", "image", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bcc/BccClient.java#L1312-L1318
google/closure-compiler
src/com/google/javascript/jscomp/ClosureRewriteModule.java
ClosureRewriteModule.isCallTo
private static boolean isCallTo(Node n, Node targetMethod) { """ A faster version of NodeUtil.isCallTo() for methods in the GETPROP form. @param n The CALL node to be checked. @param targetMethod A prebuilt GETPROP node representing a target method. @return Whether n is a call to the target method. """ ...
java
private static boolean isCallTo(Node n, Node targetMethod) { if (!n.isCall()) { return false; } Node method = n.getFirstChild(); return method.isGetProp() && method.matchesQualifiedName(targetMethod); }
[ "private", "static", "boolean", "isCallTo", "(", "Node", "n", ",", "Node", "targetMethod", ")", "{", "if", "(", "!", "n", ".", "isCall", "(", ")", ")", "{", "return", "false", ";", "}", "Node", "method", "=", "n", ".", "getFirstChild", "(", ")", ";...
A faster version of NodeUtil.isCallTo() for methods in the GETPROP form. @param n The CALL node to be checked. @param targetMethod A prebuilt GETPROP node representing a target method. @return Whether n is a call to the target method.
[ "A", "faster", "version", "of", "NodeUtil", ".", "isCallTo", "()", "for", "methods", "in", "the", "GETPROP", "form", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/ClosureRewriteModule.java#L1844-L1850
mozilla/rhino
src/org/mozilla/javascript/WrapFactory.java
WrapFactory.wrapJavaClass
public Scriptable wrapJavaClass(Context cx, Scriptable scope, Class<?> javaClass) { """ Wrap a Java class as Scriptable instance to allow access to its static members and fields and use as constructor from JavaScript. <p> Subclasses can override this method to provide custom ...
java
public Scriptable wrapJavaClass(Context cx, Scriptable scope, Class<?> javaClass) { return new NativeJavaClass(scope, javaClass); }
[ "public", "Scriptable", "wrapJavaClass", "(", "Context", "cx", ",", "Scriptable", "scope", ",", "Class", "<", "?", ">", "javaClass", ")", "{", "return", "new", "NativeJavaClass", "(", "scope", ",", "javaClass", ")", ";", "}" ]
Wrap a Java class as Scriptable instance to allow access to its static members and fields and use as constructor from JavaScript. <p> Subclasses can override this method to provide custom wrappers for Java classes. @param cx the current Context for this thread @param scope the scope of the executing script @param java...
[ "Wrap", "a", "Java", "class", "as", "Scriptable", "instance", "to", "allow", "access", "to", "its", "static", "members", "and", "fields", "and", "use", "as", "constructor", "from", "JavaScript", ".", "<p", ">", "Subclasses", "can", "override", "this", "metho...
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/WrapFactory.java#L136-L140
alkacon/opencms-core
src/org/opencms/i18n/CmsLocaleGroupService.java
CmsLocaleGroupService.attachLocaleGroup
public void attachLocaleGroup(CmsResource secondaryPage, CmsResource primaryPage) throws CmsException { """ Adds a resource to a locale group.<p> Note: This is a low level method that is hard to use correctly. Please use attachLocaleGroupIndirect if at all possible. @param secondaryPage the page to add @par...
java
public void attachLocaleGroup(CmsResource secondaryPage, CmsResource primaryPage) throws CmsException { if (secondaryPage.getStructureId().equals(primaryPage.getStructureId())) { throw new IllegalArgumentException( "A page can not be linked with itself as a locale variant: " + secon...
[ "public", "void", "attachLocaleGroup", "(", "CmsResource", "secondaryPage", ",", "CmsResource", "primaryPage", ")", "throws", "CmsException", "{", "if", "(", "secondaryPage", ".", "getStructureId", "(", ")", ".", "equals", "(", "primaryPage", ".", "getStructureId", ...
Adds a resource to a locale group.<p> Note: This is a low level method that is hard to use correctly. Please use attachLocaleGroupIndirect if at all possible. @param secondaryPage the page to add @param primaryPage the primary resource of the locale group which the resource should be added to @throws CmsException if ...
[ "Adds", "a", "resource", "to", "a", "locale", "group", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/i18n/CmsLocaleGroupService.java#L177-L206
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java
StorageAccountsInner.listKeysAsync
public Observable<StorageAccountListKeysResultInner> listKeysAsync(String resourceGroupName, String accountName) { """ Lists the access keys for the specified storage account. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. @param accountNam...
java
public Observable<StorageAccountListKeysResultInner> listKeysAsync(String resourceGroupName, String accountName) { return listKeysWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<StorageAccountListKeysResultInner>, StorageAccountListKeysResultInner>() { @Overrid...
[ "public", "Observable", "<", "StorageAccountListKeysResultInner", ">", "listKeysAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ")", "{", "return", "listKeysWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ")", ".", "map",...
Lists the access keys for the specified storage account. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 character...
[ "Lists", "the", "access", "keys", "for", "the", "specified", "storage", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java#L858-L865
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
StringGroovyMethods.dropWhile
public static CharSequence dropWhile(CharSequence self, @ClosureParams(value=SimpleType.class, options="char") Closure condition) { """ Create a suffix of the given CharSequence by dropping as many characters as possible from the front of the original CharSequence such that calling the given closure condition eva...
java
public static CharSequence dropWhile(CharSequence self, @ClosureParams(value=SimpleType.class, options="char") Closure condition) { int num = 0; BooleanClosureWrapper bcw = new BooleanClosureWrapper(condition); while (num < self.length()) { char value = self.charAt(num); ...
[ "public", "static", "CharSequence", "dropWhile", "(", "CharSequence", "self", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"char\"", ")", "Closure", "condition", ")", "{", "int", "num", "=", "0", ";", "Bo...
Create a suffix of the given CharSequence by dropping as many characters as possible from the front of the original CharSequence such that calling the given closure condition evaluates to true when passed each of the dropped characters. <p> <pre class="groovyTestCase"> def text = "Groovy" assert text.dropWhile{ false }...
[ "Create", "a", "suffix", "of", "the", "given", "CharSequence", "by", "dropping", "as", "many", "characters", "as", "possible", "from", "the", "front", "of", "the", "original", "CharSequence", "such", "that", "calling", "the", "given", "closure", "condition", "...
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java#L553-L565
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Solo.java
Solo.setDatePicker
public void setDatePicker(DatePicker datePicker, int year, int monthOfYear, int dayOfMonth) { """ Sets the date in the specified DatePicker. @param datePicker the {@link DatePicker} object @param year the year e.g. 2011 @param monthOfYear the month which starts from zero e.g. 03 for April @param dayOfMonth t...
java
public void setDatePicker(DatePicker datePicker, int year, int monthOfYear, int dayOfMonth) { if(config.commandLogging){ Log.d(config.commandLoggingTag, "setDatePicker("+datePicker+", "+year+", "+monthOfYear+", "+dayOfMonth+")"); } datePicker = (DatePicker) waiter.waitForView(datePicker, Timeout.getSmallTim...
[ "public", "void", "setDatePicker", "(", "DatePicker", "datePicker", ",", "int", "year", ",", "int", "monthOfYear", ",", "int", "dayOfMonth", ")", "{", "if", "(", "config", ".", "commandLogging", ")", "{", "Log", ".", "d", "(", "config", ".", "commandLoggin...
Sets the date in the specified DatePicker. @param datePicker the {@link DatePicker} object @param year the year e.g. 2011 @param monthOfYear the month which starts from zero e.g. 03 for April @param dayOfMonth the day e.g. 10
[ "Sets", "the", "date", "in", "the", "specified", "DatePicker", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L2538-L2545
HadoopGenomics/Hadoop-BAM
src/main/java/org/seqdoop/hadoop_bam/util/SAMFileMerger.java
SAMFileMerger.writeTerminatorBlock
private static void writeTerminatorBlock(final OutputStream out, final SAMFormat samOutputFormat) throws IOException { """ Terminate the aggregated output stream with an appropriate SAMOutputFormat-dependent terminator block """ if (SAMFormat.CRAM == samOutputFormat) { CramIO.issueEOF(CramVersions.DE...
java
private static void writeTerminatorBlock(final OutputStream out, final SAMFormat samOutputFormat) throws IOException { if (SAMFormat.CRAM == samOutputFormat) { CramIO.issueEOF(CramVersions.DEFAULT_CRAM_VERSION, out); // terminate with CRAM EOF container } else if (SAMFormat.BAM == samOutputFormat) { ...
[ "private", "static", "void", "writeTerminatorBlock", "(", "final", "OutputStream", "out", ",", "final", "SAMFormat", "samOutputFormat", ")", "throws", "IOException", "{", "if", "(", "SAMFormat", ".", "CRAM", "==", "samOutputFormat", ")", "{", "CramIO", ".", "iss...
Terminate the aggregated output stream with an appropriate SAMOutputFormat-dependent terminator block
[ "Terminate", "the", "aggregated", "output", "stream", "with", "an", "appropriate", "SAMOutputFormat", "-", "dependent", "terminator", "block" ]
train
https://github.com/HadoopGenomics/Hadoop-BAM/blob/9f974cf635a8d72f69604021cc3d5f3469d38d2f/src/main/java/org/seqdoop/hadoop_bam/util/SAMFileMerger.java#L96-L103
riversun/d6
src/main/java/org/riversun/d6/core/D6Crud.java
D6Crud.execInsert
public boolean execInsert(D6Model[] modelObjects) { """ Insert the specified model object into the DB @param modelObjects @return true:DB operation success false:failure """ final D6Inex includeExcludeColumnNames = null; return execInsert(modelObjects, includeExcludeColumnNames, false); }
java
public boolean execInsert(D6Model[] modelObjects) { final D6Inex includeExcludeColumnNames = null; return execInsert(modelObjects, includeExcludeColumnNames, false); }
[ "public", "boolean", "execInsert", "(", "D6Model", "[", "]", "modelObjects", ")", "{", "final", "D6Inex", "includeExcludeColumnNames", "=", "null", ";", "return", "execInsert", "(", "modelObjects", ",", "includeExcludeColumnNames", ",", "false", ")", ";", "}" ]
Insert the specified model object into the DB @param modelObjects @return true:DB operation success false:failure
[ "Insert", "the", "specified", "model", "object", "into", "the", "DB" ]
train
https://github.com/riversun/d6/blob/2798bd876b9380dbfea8182d11ad306cb1b0e114/src/main/java/org/riversun/d6/core/D6Crud.java#L478-L481
joniles/mpxj
src/main/java/net/sf/mpxj/Task.java
Task.setEnterpriseText
public void setEnterpriseText(int index, String value) { """ Set an enterprise field value. @param index field index @param value field value """ set(selectField(TaskFieldLists.ENTERPRISE_TEXT, index), value); }
java
public void setEnterpriseText(int index, String value) { set(selectField(TaskFieldLists.ENTERPRISE_TEXT, index), value); }
[ "public", "void", "setEnterpriseText", "(", "int", "index", ",", "String", "value", ")", "{", "set", "(", "selectField", "(", "TaskFieldLists", ".", "ENTERPRISE_TEXT", ",", "index", ")", ",", "value", ")", ";", "}" ]
Set an enterprise field value. @param index field index @param value field value
[ "Set", "an", "enterprise", "field", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L3947-L3950
52inc/android-52Kit
library/src/main/java/com/ftinc/kit/util/IntentUtils.java
IntentUtils.showLocation
public static Intent showLocation(float latitude, float longitude, Integer zoomLevel) { """ Opens the Maps application to the given location. @param latitude Latitude @param longitude Longitude @param zoomLevel A zoom level of 1 shows the whole Earth, centered at the given lat,lng. A zoom level of 2 shows a...
java
public static Intent showLocation(float latitude, float longitude, Integer zoomLevel) { Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); String data = String.format("geo:%s,%s", latitude, longitude); if (zoomLevel != null) { data = String.format("%s?z=%s", ...
[ "public", "static", "Intent", "showLocation", "(", "float", "latitude", ",", "float", "longitude", ",", "Integer", "zoomLevel", ")", "{", "Intent", "intent", "=", "new", "Intent", "(", ")", ";", "intent", ".", "setAction", "(", "Intent", ".", "ACTION_VIEW", ...
Opens the Maps application to the given location. @param latitude Latitude @param longitude Longitude @param zoomLevel A zoom level of 1 shows the whole Earth, centered at the given lat,lng. A zoom level of 2 shows a quarter of the Earth, and so on. The highest zoom level is 23. A larger zoom level will be clamped to...
[ "Opens", "the", "Maps", "application", "to", "the", "given", "location", "." ]
train
https://github.com/52inc/android-52Kit/blob/8644fab0f633477b1bb1dddd8147a9ef8bc03516/library/src/main/java/com/ftinc/kit/util/IntentUtils.java#L177-L186
lessthanoptimal/ejml
main/ejml-zdense/src/org/ejml/dense/row/decompose/TriangularSolver_ZDRM.java
TriangularSolver_ZDRM.solveL_diagReal
public static void solveL_diagReal(double L[], double[] b, int n) { """ <p> Solves for non-singular lower triangular matrices with real valued diagonal elements using forward substitution. <br> b = L<sup>-1</sup>b<br> <br> where b is a vector, L is an n by n matrix.<br> </p> @param L An n by n non-singul...
java
public static void solveL_diagReal(double L[], double[] b, int n) { // for( int i = 0; i < n; i++ ) { // double sum = b[i]; // for( int k=0; k<i; k++ ) { // sum -= L[i*n+k]* b[k]; // } // b[i] = sum / L[i*n+i]; // } int stride = n*2; ...
[ "public", "static", "void", "solveL_diagReal", "(", "double", "L", "[", "]", ",", "double", "[", "]", "b", ",", "int", "n", ")", "{", "// for( int i = 0; i < n; i++ ) {", "// double sum = b[i];", "// for( int k=0; k<i; k++ ) {", "// ...
<p> Solves for non-singular lower triangular matrices with real valued diagonal elements using forward substitution. <br> b = L<sup>-1</sup>b<br> <br> where b is a vector, L is an n by n matrix.<br> </p> @param L An n by n non-singular lower triangular matrix. Not modified. @param b A vector of length n. Modified. @pa...
[ "<p", ">", "Solves", "for", "non", "-", "singular", "lower", "triangular", "matrices", "with", "real", "valued", "diagonal", "elements", "using", "forward", "substitution", ".", "<br", ">", "b", "=", "L<sup", ">", "-", "1<", "/", "sup", ">", "b<br", ">",...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/decompose/TriangularSolver_ZDRM.java#L100-L133
infinispan/infinispan
server/integration/commons/src/main/java/org/infinispan/server/commons/dmr/ModelNodes.java
ModelNodes.asFloat
public static float asFloat(ModelNode value, float defaultValue) { """ Returns the value of the node as a string, or the specified default value if the node is undefined. @param value a model node @return the value of the node as a string, or the specified default value if the node is undefined. """ ...
java
public static float asFloat(ModelNode value, float defaultValue) { return Double.valueOf(value.asDouble(defaultValue)).floatValue(); }
[ "public", "static", "float", "asFloat", "(", "ModelNode", "value", ",", "float", "defaultValue", ")", "{", "return", "Double", ".", "valueOf", "(", "value", ".", "asDouble", "(", "defaultValue", ")", ")", ".", "floatValue", "(", ")", ";", "}" ]
Returns the value of the node as a string, or the specified default value if the node is undefined. @param value a model node @return the value of the node as a string, or the specified default value if the node is undefined.
[ "Returns", "the", "value", "of", "the", "node", "as", "a", "string", "or", "the", "specified", "default", "value", "if", "the", "node", "is", "undefined", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/integration/commons/src/main/java/org/infinispan/server/commons/dmr/ModelNodes.java#L66-L68
j256/ormlite-android
src/main/java/com/j256/ormlite/android/apptools/OrmLiteConfigUtil.java
OrmLiteConfigUtil.writeConfigFile
public static void writeConfigFile(OutputStream outputStream, File searchDir) throws SQLException, IOException { """ Write a configuration file to an output stream with the configuration for classes. """ writeConfigFile(outputStream, searchDir, false); }
java
public static void writeConfigFile(OutputStream outputStream, File searchDir) throws SQLException, IOException { writeConfigFile(outputStream, searchDir, false); }
[ "public", "static", "void", "writeConfigFile", "(", "OutputStream", "outputStream", ",", "File", "searchDir", ")", "throws", "SQLException", ",", "IOException", "{", "writeConfigFile", "(", "outputStream", ",", "searchDir", ",", "false", ")", ";", "}" ]
Write a configuration file to an output stream with the configuration for classes.
[ "Write", "a", "configuration", "file", "to", "an", "output", "stream", "with", "the", "configuration", "for", "classes", "." ]
train
https://github.com/j256/ormlite-android/blob/e82327a868ae242f994730fe2389f79684d7bcab/src/main/java/com/j256/ormlite/android/apptools/OrmLiteConfigUtil.java#L205-L207
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_userLogsToken_GET
public String serviceName_userLogsToken_GET(String serviceName, String attachedDomain, Boolean remoteCheck, Long ttl) throws IOException { """ Get a temporary token to access the your web hosting logs interface REST: GET /hosting/web/{serviceName}/userLogsToken @param attachedDomain [required] Specific attache...
java
public String serviceName_userLogsToken_GET(String serviceName, String attachedDomain, Boolean remoteCheck, Long ttl) throws IOException { String qPath = "/hosting/web/{serviceName}/userLogsToken"; StringBuilder sb = path(qPath, serviceName); query(sb, "attachedDomain", attachedDomain); query(sb, "remoteCheck",...
[ "public", "String", "serviceName_userLogsToken_GET", "(", "String", "serviceName", ",", "String", "attachedDomain", ",", "Boolean", "remoteCheck", ",", "Long", "ttl", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/{serviceName}/userLogsToken\""...
Get a temporary token to access the your web hosting logs interface REST: GET /hosting/web/{serviceName}/userLogsToken @param attachedDomain [required] Specific attached domain to be included in the scope of your token @param ttl [required] [default=3600] Expiration of your token (in seconds) @param remoteCheck [requi...
[ "Get", "a", "temporary", "token", "to", "access", "the", "your", "web", "hosting", "logs", "interface" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L278-L286
tempodb/tempodb-java
src/main/java/com/tempodb/Client.java
Client.readMultiRollupDataPoints
public Cursor<MultiDataPoint> readMultiRollupDataPoints(Series series, Interval interval, MultiRollup rollup) { """ Returns a cursor of datapoints specified by series with multiple rollups. <p>The system default timezone is used for the returned DateTimes. @param series The series @param interval An interval ...
java
public Cursor<MultiDataPoint> readMultiRollupDataPoints(Series series, Interval interval, MultiRollup rollup) { return readMultiRollupDataPoints(series, interval, DateTimeZone.getDefault(), rollup, null); }
[ "public", "Cursor", "<", "MultiDataPoint", ">", "readMultiRollupDataPoints", "(", "Series", "series", ",", "Interval", "interval", ",", "MultiRollup", "rollup", ")", "{", "return", "readMultiRollupDataPoints", "(", "series", ",", "interval", ",", "DateTimeZone", "."...
Returns a cursor of datapoints specified by series with multiple rollups. <p>The system default timezone is used for the returned DateTimes. @param series The series @param interval An interval of time for the query (start/end datetimes) @param rollup The MultiRollup for the read query. @return A Cursor of DataPoints....
[ "Returns", "a", "cursor", "of", "datapoints", "specified", "by", "series", "with", "multiple", "rollups", ".", "<p", ">", "The", "system", "default", "timezone", "is", "used", "for", "the", "returned", "DateTimes", "." ]
train
https://github.com/tempodb/tempodb-java/blob/5733f204fe4c8dda48916ba1f67cf44f5a3f9c69/src/main/java/com/tempodb/Client.java#L690-L692
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLChecker.java
JQLChecker.analyzeInternal
protected <L extends JqlBaseListener> void analyzeInternal(JQLContext jqlContext, final String jql, L listener) { """ Analyze internal. @param <L> the generic type @param jqlContext the jql context @param jql the jql @param listener the listener """ walker.walk(listener, prepareParser(jqlContext, j...
java
protected <L extends JqlBaseListener> void analyzeInternal(JQLContext jqlContext, final String jql, L listener) { walker.walk(listener, prepareParser(jqlContext, jql).value0); }
[ "protected", "<", "L", "extends", "JqlBaseListener", ">", "void", "analyzeInternal", "(", "JQLContext", "jqlContext", ",", "final", "String", "jql", ",", "L", "listener", ")", "{", "walker", ".", "walk", "(", "listener", ",", "prepareParser", "(", "jqlContext"...
Analyze internal. @param <L> the generic type @param jqlContext the jql context @param jql the jql @param listener the listener
[ "Analyze", "internal", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLChecker.java#L115-L117
wildfly-extras/wildfly-camel
common/src/main/java/org/wildfly/camel/utils/IllegalStateAssertion.java
IllegalStateAssertion.assertNull
public static <T> T assertNull(T value, String message) { """ Throws an IllegalStateException when the given value is not null. @return the value """ if (value != null) throw new IllegalStateException(message); return value; }
java
public static <T> T assertNull(T value, String message) { if (value != null) throw new IllegalStateException(message); return value; }
[ "public", "static", "<", "T", ">", "T", "assertNull", "(", "T", "value", ",", "String", "message", ")", "{", "if", "(", "value", "!=", "null", ")", "throw", "new", "IllegalStateException", "(", "message", ")", ";", "return", "value", ";", "}" ]
Throws an IllegalStateException when the given value is not null. @return the value
[ "Throws", "an", "IllegalStateException", "when", "the", "given", "value", "is", "not", "null", "." ]
train
https://github.com/wildfly-extras/wildfly-camel/blob/9ebd7e28574f277a6d5b583e8a4c357e1538c370/common/src/main/java/org/wildfly/camel/utils/IllegalStateAssertion.java#L38-L42
belaban/JGroups
src/org/jgroups/stack/Configurator.java
Configurator.addPropertyToDependencyList
static void addPropertyToDependencyList(List<AccessibleObject> orderedList, Map<String, AccessibleObject> props, Stack<AccessibleObject> stack, AccessibleObject obj) { """ DFS of dependency graph formed by Property annotations and dependsUpon parameter This is used to create a list of Properties in dependency ord...
java
static void addPropertyToDependencyList(List<AccessibleObject> orderedList, Map<String, AccessibleObject> props, Stack<AccessibleObject> stack, AccessibleObject obj) { if (orderedList.contains(obj)) return ; if (stack.search(obj) > 0) { throw new RuntimeException("Deadlock in @Property ...
[ "static", "void", "addPropertyToDependencyList", "(", "List", "<", "AccessibleObject", ">", "orderedList", ",", "Map", "<", "String", ",", "AccessibleObject", ">", "props", ",", "Stack", "<", "AccessibleObject", ">", "stack", ",", "AccessibleObject", "obj", ")", ...
DFS of dependency graph formed by Property annotations and dependsUpon parameter This is used to create a list of Properties in dependency order
[ "DFS", "of", "dependency", "graph", "formed", "by", "Property", "annotations", "and", "dependsUpon", "parameter", "This", "is", "used", "to", "create", "a", "list", "of", "Properties", "in", "dependency", "order" ]
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/stack/Configurator.java#L803-L827
kaazing/java.client
ws/ws/src/main/java/org/kaazing/gateway/client/util/WrappedByteBuffer.java
WrappedByteBuffer.putPrefixedString
public WrappedByteBuffer putPrefixedString(int fieldSize, String v, Charset cs) { """ Puts a string into the buffer at the specified index, using the character set to encode the string as bytes. @param fieldSize the width in bytes of the prefixed length field @param v the string @param cs the character set...
java
public WrappedByteBuffer putPrefixedString(int fieldSize, String v, Charset cs) { if (fieldSize == 0) { return this; } boolean utf16 = cs.name().startsWith("UTF-16"); if (utf16 && (fieldSize == 1)) { throw new IllegalArgumentException("fieldSize is not even for U...
[ "public", "WrappedByteBuffer", "putPrefixedString", "(", "int", "fieldSize", ",", "String", "v", ",", "Charset", "cs", ")", "{", "if", "(", "fieldSize", "==", "0", ")", "{", "return", "this", ";", "}", "boolean", "utf16", "=", "cs", ".", "name", "(", "...
Puts a string into the buffer at the specified index, using the character set to encode the string as bytes. @param fieldSize the width in bytes of the prefixed length field @param v the string @param cs the character set @return the buffer
[ "Puts", "a", "string", "into", "the", "buffer", "at", "the", "specified", "index", "using", "the", "character", "set", "to", "encode", "the", "string", "as", "bytes", "." ]
train
https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/ws/ws/src/main/java/org/kaazing/gateway/client/util/WrappedByteBuffer.java#L581-L611
javagl/CommonUI
src/main/java/de/javagl/common/ui/GuiUtils.java
GuiUtils.wrapFlow
public static JPanel wrapFlow(JComponent component) { """ Wrap the given component into a panel with flow layout @param component The component @return The panel """ JPanel p = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0)); p.add(component); return p; }
java
public static JPanel wrapFlow(JComponent component) { JPanel p = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0)); p.add(component); return p; }
[ "public", "static", "JPanel", "wrapFlow", "(", "JComponent", "component", ")", "{", "JPanel", "p", "=", "new", "JPanel", "(", "new", "FlowLayout", "(", "FlowLayout", ".", "CENTER", ",", "0", ",", "0", ")", ")", ";", "p", ".", "add", "(", "component", ...
Wrap the given component into a panel with flow layout @param component The component @return The panel
[ "Wrap", "the", "given", "component", "into", "a", "panel", "with", "flow", "layout" ]
train
https://github.com/javagl/CommonUI/blob/b2c7a7637d4e288271392ba148dc17e4c9780255/src/main/java/de/javagl/common/ui/GuiUtils.java#L86-L91
Azure/azure-sdk-for-java
containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ManagedClustersInner.java
ManagedClustersInner.resetServicePrincipalProfileAsync
public Observable<Void> resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { """ Reset Service Principal Profile of a managed cluster. Update the service principal Profile for a managed cluster. @param resourceGroupName The name of...
java
public Observable<Void> resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { return resetServicePrincipalProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1<ServiceResponse<Void>, Void>() { ...
[ "public", "Observable", "<", "Void", ">", "resetServicePrincipalProfileAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "ManagedClusterServicePrincipalProfile", "parameters", ")", "{", "return", "resetServicePrincipalProfileWithServiceResponseAsync"...
Reset Service Principal Profile of a managed cluster. Update the service principal Profile for a managed cluster. @param resourceGroupName The name of the resource group. @param resourceName The name of the managed cluster resource. @param parameters Parameters supplied to the Reset Service Principal Profile operation...
[ "Reset", "Service", "Principal", "Profile", "of", "a", "managed", "cluster", ".", "Update", "the", "service", "principal", "Profile", "for", "a", "managed", "cluster", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ManagedClustersInner.java#L1530-L1537
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Math.java
Math.nextAfter
public static double nextAfter(double start, double direction) { """ Returns the floating-point number adjacent to the first argument in the direction of the second argument. If both arguments compare as equal the second argument is returned. <p> Special cases: <ul> <li> If either argument is a NaN, then ...
java
public static double nextAfter(double start, double direction) { /* * The cases: * * nextAfter(+infinity, 0) == MAX_VALUE * nextAfter(+infinity, +infinity) == +infinity * nextAfter(-infinity, 0) == -MAX_VALUE * nextAfter(-infinity, -infinity) == -infinit...
[ "public", "static", "double", "nextAfter", "(", "double", "start", ",", "double", "direction", ")", "{", "/*\n * The cases:\n *\n * nextAfter(+infinity, 0) == MAX_VALUE\n * nextAfter(+infinity, +infinity) == +infinity\n * nextAfter(-infinity, 0) == ...
Returns the floating-point number adjacent to the first argument in the direction of the second argument. If both arguments compare as equal the second argument is returned. <p> Special cases: <ul> <li> If either argument is a NaN, then NaN is returned. <li> If both arguments are signed zeros, {@code direction} is r...
[ "Returns", "the", "floating", "-", "point", "number", "adjacent", "to", "the", "first", "argument", "in", "the", "direction", "of", "the", "second", "argument", ".", "If", "both", "arguments", "compare", "as", "equal", "the", "second", "argument", "is", "ret...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Math.java#L1889-L1947
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java
MethodBuilder.buildDeprecationInfo
public void buildDeprecationInfo(XMLNode node, Content methodDocTree) { """ Build the deprecation information. @param node the XML element that specifies which components to document @param methodDocTree the content tree to which the documentation will be added """ writer.addDeprecated( ...
java
public void buildDeprecationInfo(XMLNode node, Content methodDocTree) { writer.addDeprecated( (MethodDoc) methods.get(currentMethodIndex), methodDocTree); }
[ "public", "void", "buildDeprecationInfo", "(", "XMLNode", "node", ",", "Content", "methodDocTree", ")", "{", "writer", ".", "addDeprecated", "(", "(", "MethodDoc", ")", "methods", ".", "get", "(", "currentMethodIndex", ")", ",", "methodDocTree", ")", ";", "}" ...
Build the deprecation information. @param node the XML element that specifies which components to document @param methodDocTree the content tree to which the documentation will be added
[ "Build", "the", "deprecation", "information", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java#L194-L197
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/dynamic/support/ResolvableType.java
ResolvableType.forType
public static ResolvableType forType(Type type, ResolvableType owner) { """ Return a {@link ResolvableType} for the specified {@link Type} backed by the given owner type. Note: The resulting {@link ResolvableType} may not be {@link Serializable}. @param type the source type or {@code null} @param owner the ow...
java
public static ResolvableType forType(Type type, ResolvableType owner) { VariableResolver variableResolver = null; if (owner != null) { variableResolver = owner.asVariableResolver(); } return forType(type, variableResolver); }
[ "public", "static", "ResolvableType", "forType", "(", "Type", "type", ",", "ResolvableType", "owner", ")", "{", "VariableResolver", "variableResolver", "=", "null", ";", "if", "(", "owner", "!=", "null", ")", "{", "variableResolver", "=", "owner", ".", "asVari...
Return a {@link ResolvableType} for the specified {@link Type} backed by the given owner type. Note: The resulting {@link ResolvableType} may not be {@link Serializable}. @param type the source type or {@code null} @param owner the owner type used to resolve variables @return a {@link ResolvableType} for the specified...
[ "Return", "a", "{", "@link", "ResolvableType", "}", "for", "the", "specified", "{", "@link", "Type", "}", "backed", "by", "the", "given", "owner", "type", ".", "Note", ":", "The", "resulting", "{", "@link", "ResolvableType", "}", "may", "not", "be", "{",...
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/dynamic/support/ResolvableType.java#L1072-L1078
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/workspace/WorkspaceUtils.java
WorkspaceUtils.assertOpenAndActive
public static void assertOpenAndActive(@NonNull String ws, @NonNull String errorMsg) throws ND4JWorkspaceException { """ Assert that the specified workspace is open and active @param ws Name of the workspace to assert open and active @param errorMsg Message to include in the exception, if required ""...
java
public static void assertOpenAndActive(@NonNull String ws, @NonNull String errorMsg) throws ND4JWorkspaceException { if (!Nd4j.getWorkspaceManager().checkIfWorkspaceExistsAndActive(ws)) { throw new ND4JWorkspaceException(errorMsg); } }
[ "public", "static", "void", "assertOpenAndActive", "(", "@", "NonNull", "String", "ws", ",", "@", "NonNull", "String", "errorMsg", ")", "throws", "ND4JWorkspaceException", "{", "if", "(", "!", "Nd4j", ".", "getWorkspaceManager", "(", ")", ".", "checkIfWorkspaceE...
Assert that the specified workspace is open and active @param ws Name of the workspace to assert open and active @param errorMsg Message to include in the exception, if required
[ "Assert", "that", "the", "specified", "workspace", "is", "open", "and", "active" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/workspace/WorkspaceUtils.java#L80-L84
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java
DBService.getRow
public DRow getRow(String storeName, String rowKey) { """ Get iterator for rows with a specific set of keys. Results are returned as an Iterator of {@link DRow} objects. If any given row is not found, no entry with its key will be returned. @param storeName Name of store to query. @param rowKeys Collection...
java
public DRow getRow(String storeName, String rowKey) { return new DRow(m_tenant, storeName, rowKey); }
[ "public", "DRow", "getRow", "(", "String", "storeName", ",", "String", "rowKey", ")", "{", "return", "new", "DRow", "(", "m_tenant", ",", "storeName", ",", "rowKey", ")", ";", "}" ]
Get iterator for rows with a specific set of keys. Results are returned as an Iterator of {@link DRow} objects. If any given row is not found, no entry with its key will be returned. @param storeName Name of store to query. @param rowKeys Collection of row keys to read. @return Iterator of {@link DRow} obje...
[ "Get", "iterator", "for", "rows", "with", "a", "specific", "set", "of", "keys", ".", "Results", "are", "returned", "as", "an", "Iterator", "of", "{", "@link", "DRow", "}", "objects", ".", "If", "any", "given", "row", "is", "not", "found", "no", "entry"...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java#L311-L313