query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
@JmxOperation(description = "swapFiles changes this store to use the new data directory")
public void swapFiles(String newStoreDirectory) {
logger.info("Swapping files for store '" + getName() + "' to " + newStoreDirectory);
File newVersionDir = new File(newStoreDirectory);
if(!newVersionDir.exists())
throw new VoldemortException("File " + newVersionDir.getAbsolutePath()
+ " does not exist.");
if(!(newVersionDir.getParentFile().compareTo(storeDir.getAbsoluteFile()) == 0 && ReadOnlyUtils.checkVersionDirName(newVersionDir)))
throw new VoldemortException("Invalid version folder name '"
+ newVersionDir
+ "'. Either parent directory is incorrect or format(version-n) is incorrect");
// retrieve previous version for (a) check if last write is winning
// (b) if failure, rollback use
File previousVersionDir = ReadOnlyUtils.getCurrentVersion(storeDir);
if(previousVersionDir == null)
throw new VoldemortException("Could not find any latest directory to swap with in store '"
+ getName() + "'");
long newVersionId = ReadOnlyUtils.getVersionId(newVersionDir);
long previousVersionId = ReadOnlyUtils.getVersionId(previousVersionDir);
if(newVersionId == -1 || previousVersionId == -1)
throw new VoldemortException("Unable to parse folder names (" + newVersionDir.getName()
+ "," + previousVersionDir.getName()
+ ") since format(version-n) is incorrect");
// check if we're greater than latest since we want last write to win
if(previousVersionId > newVersionId) {
logger.info("No swap required since current latest version " + previousVersionId
+ " is greater than swap version " + newVersionId);
deleteBackups();
return;
}
logger.info("Acquiring write lock on '" + getName() + "':");
fileModificationLock.writeLock().lock();
boolean success = false;
try {
close();
logger.info("Opening primary files for store '" + getName() + "' at "
+ newStoreDirectory);
// open the latest store
open(newVersionDir);
success = true;
} finally {
try {
// we failed to do the swap, attempt a rollback to last version
if(!success)
rollback(previousVersionDir);
} finally {
fileModificationLock.writeLock().unlock();
if(success)
logger.info("Swap operation completed successfully on store " + getName()
+ ", releasing lock.");
else
logger.error("Swap operation failed.");
}
}
// okay we have released the lock and the store is now open again, it is
// safe to do a potentially slow delete if we have one too many backups
deleteBackups();
} | [
"Swap the current version folder for a new one\n\n@param newStoreDirectory The path to the new version directory"
] | [
"Returns the service id with the propertype.\n\n@param serviceReference\n@return long value for the service id",
"This method is called to format a priority.\n\n@param value priority instance\n@return formatted priority value",
"Provisions a new app user in an enterprise using Box Developer Edition.\n@param api the API connection to be used by the created user.\n@param name the name of the user.\n@return the created user's info.",
"Check if the given color string can be parsed.\n\n@param colorString The color to parse.",
"Create and return a SelectIterator for the class using the default mapped query for all statement.",
"Create a transactional protocol client.\n\n@param channelAssociation the channel handler\n@return the transactional protocol client",
"Deletes the schema of an existing metadata template.\n\n@param api the API connection to be used\n@param scope the scope of the object\n@param template Unique identifier of the template",
"Open the connection to the server.\n\n@param url the url to connect to\n@return returns the input stream for the connection\n@throws IOException cannot get result",
"returns position of xpath element which match the expression xpath in the String dom.\n\n@param dom the Document to search in\n@param xpath the xpath query\n@return position of xpath element, if fails returns -1"
] |
protected final boolean isPatternValid() {
switch (getPatternType()) {
case DAILY:
return isEveryWorkingDay() || isIntervalValid();
case WEEKLY:
return isIntervalValid() && isWeekDaySet();
case MONTHLY:
return isIntervalValid() && isWeekDaySet() ? isWeekOfMonthSet() : isDayOfMonthValid();
case YEARLY:
return isMonthSet() && isWeekDaySet() ? isWeekOfMonthSet() : isDayOfMonthValid();
case INDIVIDUAL:
case NONE:
return true;
default:
return false;
}
} | [
"Checks, if all values necessary for a specific pattern are valid.\n@return a flag, indicating if all values required for the pattern are valid."
] | [
"Find container env.\n\n@param ctx the container context\n@param dump the exception dump\n@return valid container or null",
"To use main report datasource. There should be nothing else in the detail band\n@param preSorted\n@return",
"Capture stdout and route them through Redwood\n@return this",
"find all accessibility object and set active true for enable talk back.",
"Checks length and compare order of field names with declared PK fields in metadata.",
"Calculate the duration percent complete.\n\n@param row task data\n@return percent complete",
"Mojos perform different dependency resolution, so we add dependencies for each mojo.",
"Resolve a path from the rootPath checking that it doesn't go out of the rootPath.\n@param rootPath the starting point for resolution.\n@param path the path we want to resolve.\n@return the resolved path.\n@throws IllegalArgumentException if the resolved path is out of the rootPath or if the resolution failed.",
"Creates the operation to add a resource.\n\n@param address the address of the operation to add.\n@param properties the properties to set for the resource.\n\n@return the operation."
] |
public static int cudnnLRNCrossChannelBackward(
cudnnHandle handle,
cudnnLRNDescriptor normDesc,
int lrnMode,
Pointer alpha,
cudnnTensorDescriptor yDesc,
Pointer y,
cudnnTensorDescriptor dyDesc,
Pointer dy,
cudnnTensorDescriptor xDesc,
Pointer x,
Pointer beta,
cudnnTensorDescriptor dxDesc,
Pointer dx)
{
return checkResult(cudnnLRNCrossChannelBackwardNative(handle, normDesc, lrnMode, alpha, yDesc, y, dyDesc, dy, xDesc, x, beta, dxDesc, dx));
} | [
"LRN cross-channel backward computation. Double parameters cast to tensor data type"
] | [
"Casts a ray into the scene graph, and returns the objects it intersects.\n\nThe ray is defined by its origin {@code [ox, oy, oz]} and its direction\n{@code [dx, dy, dz]}.\n\n<p>\nThe ray origin may be [0, 0, 0] and the direction components should be\nnormalized from -1 to 1: Note that the y direction runs from -1 at the\nbottom to 1 at the top. To construct a picking ray originating at the\nuser's head and pointing into the scene along the camera lookat vector,\npass in 0, 0, 0 for the origin and 0, 0, -1 for the direction.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is doing a ray cast into a particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n<p>\nDepending on the type of collider, that the hit location may not be exactly\nwhere the ray would intersect the scene object itself. Rather, it is\nwhere the ray intersects the collision geometry associated with the collider.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@param ox\nThe x coordinate of the ray origin.\n\n@param oy\nThe y coordinate of the ray origin.\n\n@param oz\nThe z coordinate of the ray origin.\n\n@param dx\nThe x vector of the ray direction.\n\n@param dy\nThe y vector of the ray direction.\n\n@param dz\nThe z vector of the ray direction.\n@return A list of {@link GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6",
"why isn't this functionality in enum?",
"Insert an entity into the datastore.\n\nThe entity must have no ids.\n\n@return The key for the inserted entity.\n@throws DatastoreException on error",
"Resolve a resource transformer for a given address.\n\n@param address the address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the resource transformer",
"Utility method to retrieve the next working date start time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of next work start",
"Given a class node, if this class node implements a trait, then generate all the appropriate\ncode which delegates calls to the trait. It is safe to call this method on a class node which\ndoes not implement a trait.\n@param cNode a class node\n@param unit the source unit",
"Associate the batched Children with their owner object.\nLoop over owners",
"Returns the list of atlas information necessary to map\nthe texture atlas to each scene object.\n\n@return List of atlas information.",
"Go through the property name to see if it is a complex one. If it is, aliases must be declared.\n\n@param orgPropertyName\nThe propertyName. Can be complex.\n@param userData\nThe userData object that is passed in each method of the FilterVisitor. Should always be of the info\n\"Criteria\".\n@return property name"
] |
public void reportCompletion(NodeT completed) {
completed.setPreparer(true);
String dependency = completed.key();
for (String dependentKey : nodeTable.get(dependency).dependentKeys()) {
DAGNode<DataT, NodeT> dependent = nodeTable.get(dependentKey);
dependent.lock().lock();
try {
dependent.onSuccessfulResolution(dependency);
if (dependent.hasAllResolved()) {
queue.add(dependent.key());
}
} finally {
dependent.lock().unlock();
}
}
} | [
"Reports that a node is resolved hence other nodes depends on it can consume it.\n\n@param completed the node ready to be consumed"
] | [
"mark a node as blacklisted\n\n@param nodeId Integer node id of the node to be blacklisted",
"Adds the position.\n\n@param position the position",
"Reads input data from a JSON file in the output directory.",
"Gets the value for the key.\n\n@param key the key to check for the value\n\n@return the value or an empty collection if no values were set",
"Returns the getter method associated with the object's field.\n\n@param object\nthe object\n@param fieldName\nthe name of the field\n@return the getter method\n@throws NullPointerException\nif object or fieldName is null\n@throws SuperCsvReflectionException\nif the getter doesn't exist or is not visible",
"Goes through the first buckets, picking out candidate records and\ntallying up their scores.\n@return the index of the first bucket we did not process",
"Sends this request while monitoring its progress and returns a BoxAPIResponse containing the server's response.\n\n<p>A ProgressListener is generally only useful when the size of the request is known beforehand. If the size is\nunknown, then the ProgressListener will be updated for each byte sent, but the total number of bytes will be\nreported as 0.</p>\n\n<p> See {@link #send} for more information on sending requests.</p>\n\n@param listener a listener for monitoring the progress of the request.\n@throws BoxAPIException if the server returns an error code or if a network error occurs.\n@return a {@link BoxAPIResponse} containing the server's response.",
"Invokes the exit logger if and only if no ExitLogger was previously invoked.\n@param logger the logger. Cannot be {@code null}",
"Retrieve the set of start dates represented by this recurrence data.\n\n@return array of start dates"
] |
public List<DbLicense> getArtifactLicenses(final String gavc, final FiltersHolder filters) {
final DbArtifact artifact = getArtifact(gavc);
final List<DbLicense> licenses = new ArrayList<>();
for(final String name: artifact.getLicenses()){
final Set<DbLicense> matchingLicenses = licenseMatcher.getMatchingLicenses(name);
// Here is a license to identify
if(matchingLicenses.isEmpty()){
final DbLicense notIdentifiedLicense = new DbLicense();
notIdentifiedLicense.setName(name);
licenses.add(notIdentifiedLicense);
} else {
matchingLicenses.stream()
.filter(filters::shouldBeInReport)
.forEach(licenses::add);
}
}
return licenses;
} | [
"Return the list of licenses attached to an artifact\n\n@param gavc String\n@param filters FiltersHolder\n@return List<DbLicense>"
] | [
"DISPATCHING - COMMANDS",
"Function to perform backward pooling",
"Perform a normal scan",
"Answer the SQL-Clause for a BetweenCriteria\n\n@param alias\n@param pathInfo\n@param c BetweenCriteria\n@param buf",
"Deletes a FilePath file.\n\n@param workspace The build workspace.\n@param path The path in the workspace.\n@throws IOException In case of missing file.",
"Use this API to sync gslbconfig.",
"Gets the flags associated with this attribute.\n@return the flags. Will not return {@code null}",
"Creates an element that represents a rectangle drawn at the specified coordinates in the page.\n@param x the X coordinate of the rectangle\n@param y the Y coordinate of the rectangle\n@param width the width of the rectangle\n@param height the height of the rectangle\n@param stroke should there be a stroke around?\n@param fill should the rectangle be filled?\n@return the resulting DOM element",
"Returns the 'Up' - vector of the camera coordinate system.\n\nThe returned vector is relative to the coordinate space defined by the\ncorresponding node.<p>\n\nThe 'right' vector of the camera coordinate system is the cross product\nof the up and lookAt vectors. The default value is 0|1|0. The vector\nmay be normalized, but it needn't.<p>\n\nThis method is part of the wrapped API (see {@link AiWrapperProvider}\nfor details on wrappers).<p>\n\nThe built-in behavior is to return a {@link AiVector}.\n\n@param wrapperProvider the wrapper provider (used for type inference)\n@return the 'Up' vector"
] |
public URI withEmptyAuthority(final URI uri) {
URI _xifexpression = null;
if ((uri.isFile() && (uri.authority() == null))) {
_xifexpression = URI.createHierarchicalURI(uri.scheme(), "", uri.device(), uri.segments(), uri.query(), uri.fragment());
} else {
_xifexpression = uri;
}
return _xifexpression;
} | [
"converts the file URIs with an absent authority to one with an empty"
] | [
"Write an attribute name.\n\n@param name attribute name",
"Returns iterable containing assignments for this single legal hold policy.\nParameters can be used to filter retrieved assignments.\n@param type filter assignments of this type only.\nCan be \"file_version\", \"file\", \"folder\", \"user\" or null if no type filter is necessary.\n@param id filter assignments to this ID only. Can be null if no id filter is necessary.\n@param limit the limit of entries per page. Default limit is 100.\n@param fields the fields to retrieve.\n@return an iterable containing assignments for this single legal hold policy.",
"Compute Cholesky decomposition of A\n\n@param A symmetric, positive definite matrix (only upper half is used)\n@return upper triangular matrix U such that A = U' * U",
"Find and validate manifest.json file in Artifactory for the current image.\nSince provided imageTag differs between reverse-proxy and proxy-less configuration, try to build the correct manifest path.\n@param server\n@param dependenciesClient\n@param listener\n@return\n@throws IOException",
"makes object obj persistent to the Objectcache under the key oid.",
"Retrieve timephased baseline cost. Note that index 0 represents \"Baseline\",\nindex 1 represents \"Baseline1\" and so on.\n\n@param index baseline index\n@return timephased work, or null if no baseline is present",
"Find the length of the block starting from 'start'.",
"Unmark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to unmark",
"Creates a color item that represents a color field fond for a track.\n\n@param colorId the key of the color as found in the database\n@param label the corresponding color label as found in the database (or sent in the dbserver message)\n\n@return the color metadata field"
] |
String getUriStringForRank(StatementRank rank) {
switch (rank) {
case NORMAL:
return Vocabulary.WB_NORMAL_RANK;
case PREFERRED:
return Vocabulary.WB_PREFERRED_RANK;
case DEPRECATED:
return Vocabulary.WB_DEPRECATED_RANK;
default:
throw new IllegalArgumentException();
}
} | [
"Returns an URI which represents the statement rank in a triple.\n\n@param rank\n@return"
] | [
"Creates a cube with each face as a separate mesh using a different texture.\nThe meshes will share a common vertex array but will have separate index buffers.\n@param gvrContext context to use for creating cube\n@param facingOut true for outward normals, false for inward normals\n@param vertexDesc string describing which vertex components are desired\n@param textureList list of 6 textures, one for each face",
"Here the search query is composed and executed.\nThe result is wrapped in an easily usable form.\nIt is exposed to the JSP via the tag's \"var\" attribute.\n@return The result object exposed via the tag's attribute \"var\".",
"Use this API to clear nspbr6.",
"This method prints plan information of an agent through its external\naccess. It can be used to check the correct behaviour of the agent.\n\n@param agent_name\nThe name of the agent\n@param connector\nThe connector to get the external access\n@return plans the IPlan[] with all the information, so the tester can\nlook for information",
"Set the attributes for this template.\n\n@param attributes the attribute map",
"Gets the value of the task property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the task property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetTask().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link GanttDesignerRemark.Task }",
"Internal function that uses recursion to create the list",
"use parseJsonResponse instead",
"Inserts the result of the migration into the migration table\n\n@param migration the migration that was executed\n@param wasSuccessful indicates if the migration was successful or not"
] |
public static void hideOnlyChannels(Object... channels){
for(LogRecordHandler handler : handlers){
if(handler instanceof VisibilityHandler){
VisibilityHandler visHandler = (VisibilityHandler) handler;
visHandler.showAll();
for (Object channel : channels) {
visHandler.alsoHide(channel);
}
}
}
} | [
"Hide multiple channels. All other channels will be shown.\n@param channels The channels to hide"
] | [
"A method for determining from and to information when using this IntRange to index an aggregate object of the specified size.\nNormally only used internally within Groovy but useful if adding range indexing support for your own aggregates.\n\n@param size the size of the aggregate being indexed\n@return the calculated range information (with 1 added to the to value, ready for providing to subList",
"Processes an index descriptor tag.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the index\"\[email protected] name=\"fields\" optional=\"false\" description=\"The fields making up the index separated by commas\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the index descriptor\"\[email protected] name=\"unique\" optional=\"true\" description=\"Whether the index descriptor is unique\" values=\"true,false\"",
"Addes the current member as a nested object.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"",
"refresh all deliveries dependencies for a particular product",
"Print channels to the left of log messages\n@param width The width (in characters) to print the channels\n@return this",
"Returns the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.\n\n@param namespace the namespace referring to the undo collection.\n@return the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.",
"Use this API to unset the properties of responderparam resource.\nProperties that need to be unset are specified in args array.",
"Send parallel task to execution manager.\n\n@param task\nthe parallel task\n@return the batch response from manager",
"Prepare a parallel HTTP HEAD Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder"
] |
public static base_response disable(nitro_service client, String name) throws Exception {
vserver disableresource = new vserver();
disableresource.name = name;
return disableresource.perform_operation(client,"disable");
} | [
"Use this API to disable vserver of given name."
] | [
"Remove pairs with the given keys from the map.\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param keysToRemove the keys of the pairs to remove.\n@since 2.15",
"Access all currencies known.\n\n@param providers the (optional) specification of providers to consider.\n@return the list of known currencies, never null.",
"Notification that a state transition failed.\n\n@param state the failed transition",
"Converts an MPXJ Duration instance into the string representation\nof a Planner duration.\n\nPlanner represents durations as a number of seconds in its\nfile format, however it displays durations as days and hours,\nand seems to assume that a working day is 8 hours.\n\n@param value string representation of a duration\n@return Duration instance",
"Gets the boxed type of a class\n\n@param type The type\n@return The boxed type",
"Sets the global. Does not add the global to the ExecutionResults.\n\n@param identifier\nThe identifier of the global\n@param object\nThe instance to be set as the global.\n@return",
"Sets the search scope.\n\n@param cms The current CmsObject object.",
"Sets all padding to the same value.\n@param padding new padding for top, bottom, left, and right, ignored if smaller than 0\n@return this to allow chaining",
"Captures System.out and System.err and redirects them\nto Redwood logging.\n@param captureOut True is System.out should be captured\n@param captureErr True if System.err should be captured"
] |
private Observable<Indexable> invokeReadyTasksAsync(final InvocationContext context) {
TaskGroupEntry<TaskItem> readyTaskEntry = super.getNext();
final List<Observable<Indexable>> observables = new ArrayList<>();
// Enumerate the ready tasks (those with dependencies resolved) and kickoff them concurrently
//
while (readyTaskEntry != null) {
final TaskGroupEntry<TaskItem> currentEntry = readyTaskEntry;
final TaskItem currentTaskItem = currentEntry.data();
if (currentTaskItem instanceof ProxyTaskItem) {
observables.add(invokeAfterPostRunAsync(currentEntry, context));
} else {
observables.add(invokeTaskAsync(currentEntry, context));
}
readyTaskEntry = super.getNext();
}
return Observable.mergeDelayError(observables);
} | [
"Invokes the ready tasks.\n\n@param context group level shared context that need be passed to\n{@link TaskGroupEntry#invokeTaskAsync(boolean, InvocationContext)}\nmethod of each entry in the group when it is selected for execution\n\n@return an observable that emits the result of tasks in the order they finishes."
] | [
"Populates a relation list.\n\n@param task parent task\n@param field target task field\n@param data MPX relation list data",
"Takes a list of Strings and combines them into a single comma-separated\nString.\n@param strings The Strings to combine.\n@return The combined, comma-separated, String.",
"Get the size of the painting area required to draw the scalebar with labels.\n\n@param scalebarParams Parameters for the scalebar.\n@param settings Parameters for rendering the scalebar.\n@param maxLabelSize The max. size of the labels.",
"Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by applying a key function to each element which yields a comparable criteria.\n\n@param iterable\nthe elements to be sorted. May not be <code>null</code>.\n@param key\nthe key function to-be-used. May not be <code>null</code>.\n@return a sorted list as a shallow copy of the given iterable.\n@see #sort(Iterable)\n@see #sort(Iterable, Comparator)\n@see ListExtensions#sortInplaceBy(List, org.eclipse.xtext.xbase.lib.Functions.Function1)",
"Await service container stability ignoring thread interruption.\n\n@param timeout maximum period to wait for service container stability\n@param timeUnit unit in which {@code timeout} is expressed\n\n@throws java.util.concurrent.TimeoutException if service container stability is not reached before the specified timeout",
"Return a long value which is the number of rows in the table.",
"Fetches a list of available photo licenses for Flickr.\n\nThis method does not require authentication.\n\n@return A collection of License objects\n@throws FlickrException",
"Extract where the destination is reshaped to match the extracted region\n@param src The original matrix which is to be copied. Not modified.\n@param srcX0 Start column.\n@param srcX1 Stop column+1.\n@param srcY0 Start row.\n@param srcY1 Stop row+1.\n@param dst Where the submatrix are stored. Modified.",
"Ensures that the given collection descriptor has a valid element-class-ref property.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If element-class-ref could not be determined or is invalid"
] |
public static final Bytes of(CharSequence cs) {
if (cs instanceof String) {
return of((String) cs);
}
Objects.requireNonNull(cs);
if (cs.length() == 0) {
return EMPTY;
}
ByteBuffer bb = StandardCharsets.UTF_8.encode(CharBuffer.wrap(cs));
if (bb.hasArray()) {
// this byte buffer has never escaped so can use its byte array directly
return new Bytes(bb.array(), bb.position() + bb.arrayOffset(), bb.limit());
} else {
byte[] data = new byte[bb.remaining()];
bb.get(data);
return new Bytes(data);
}
} | [
"Creates a Bytes object by copying the data of the CharSequence and encoding it using UTF-8."
] | [
"Searches the model for all variable assignments and makes a default map of those variables, setting them to \"\"\n\n@return the default variable assignment map",
"Only return tools with a name matching this partial string\n@param searchTerm Tool name to search for\n@return This object to allow adding more options",
"We try to convert an Object to an Array and this is not easy in Java so we need a little bit of nasty magic.\n\n@param <T> Type of elements\n@param clazz Clazz of the Objct elements\n@param obj Object\n@return Array",
"Adds a materialization listener.\n\n@param listener\nThe listener to add",
"Answer the SQL-Clause for a FieldCriteria\n\n@param c FieldCriteria\n@param cld ClassDescriptor",
"Analyzes a failure thrown connecting to the master for causes that indicate\nsome problem not likely to be resolved by immediately retrying. If found,\nthrows an exception highlighting the underlying cause. If the cause is not\none of the ones understood by this method, the method returns normally.\n\n@throws org.jboss.as.domain.controller.SlaveRegistrationException if the remote HC rejected the request\n@throws IllegalStateException for other failures understood by this method",
"Extract data for a single calendar.\n\n@param row calendar data",
"Get the sub registry for the hosts.\n\n@param range the version range\n@return the sub registry",
"Finds an ancestor of a specific type, if possible.\n\n<p>Example: (New York city target, {@link Type#COUNTRY}) returns (US country target)"
] |
public static tmglobal_binding get(nitro_service service) throws Exception{
tmglobal_binding obj = new tmglobal_binding();
tmglobal_binding response = (tmglobal_binding) obj.get_resource(service);
return response;
} | [
"Use this API to fetch a tmglobal_binding resource ."
] | [
"Convenience method to determine if a character is special to the regex system.\n\n@param chr\nthe character to test\n\n@return is the character a special character.",
"Performs the transformation.\n\n@return True if the file was modified.",
"Determine whether the given method is a \"readString\" method.\n\n@see Object#toString()",
"Invokes the setter on the bean with the supplied value.\n\n@param bean\nthe bean\n@param setMethod\nthe setter method for the field\n@param fieldValue\nthe field value to set\n@throws SuperCsvException\nif there was an exception invoking the setter",
"Converts plan text into anonymous text. Preserves upper case, lower case,\npunctuation, whitespace and digits while making the text unreadable.\n\n@param oldText text to replace\n@param replacements map of find/replace pairs",
"Get a string property, or, if no such property is defined, return\nthe given default value\n\n@param props the properties\n@param name the key in the properties\n@param defaultValue the default value if the key not exists\n@return value in the props or defaultValue while name not exist",
"Register the given Converter objects with the given target ConverterRegistry.\n@param converters the converter objects: implementing {@link Converter},\n{@link ConverterFactory}, or {@link GenericConverter}\n@param registry the target registry",
"Start a managed server.\n\n@param factory the boot command factory",
"Generates a vector clock with the provided values\n\n@param serverIds servers in the clock\n@param clockValue value of the clock for each server entry\n@param timestamp ts value to be set for the clock\n@return"
] |
public static base_response delete(nitro_service client, sslcertkey resource) throws Exception {
sslcertkey deleteresource = new sslcertkey();
deleteresource.certkey = resource.certkey;
return deleteresource.delete_resource(client);
} | [
"Use this API to delete sslcertkey."
] | [
"Use this API to fetch cachepolicylabel_policybinding_binding resources of given name .",
"Determines the component type for a given array type.\n\n@param type the given array type\n@return the component type of a given array type",
"Perform the merge\n\n@param stereotypeAnnotations The stereotype annotations",
"Checks a returned Javascript value where we expect a boolean but could\nget null.\n\n@param val The value from Javascript to be checked.\n@param def The default return value, which can be null.\n@return The actual value, or if null, returns false.",
"Parses the provided file, using the given libraryPaths and sourcePaths as context. The libraries may be either\njar files or references to directories containing class files.\n\nThe sourcePaths must be a reference to the top level directory for sources (eg, for a file\nsrc/main/java/org/example/Foo.java, the source path would be src/main/java).\n\nThe wildcard resolver provides a fallback for processing wildcard imports that the underlying parser was unable\nto resolve.",
"Given a Task instance, this task determines if it should be written to the\nPM XML file as an activity or as a WBS item, and calls the appropriate\nmethod.\n\n@param task Task instance",
"Start timing an operation with the given identifier.",
"Restores the dropout descriptor to a previously saved-off state",
"Move the animation frame counter forward.\n\n@return boolean specifying if animation should continue or if loopCount has been fulfilled."
] |
private void postProcessTasks() throws MPXJException
{
//
// Renumber ID values using a large increment to allow
// space for later inserts.
//
TreeMap<Integer, Integer> taskMap = new TreeMap<Integer, Integer>();
// I've found a pathological case of an MPP file with around 102k blank tasks...
int nextIDIncrement = 102000;
int nextID = (m_file.getTaskByUniqueID(Integer.valueOf(0)) == null ? nextIDIncrement : 0);
for (Map.Entry<Long, Integer> entry : m_taskOrder.entrySet())
{
taskMap.put(Integer.valueOf(nextID), entry.getValue());
nextID += nextIDIncrement;
}
//
// Insert any null tasks into the correct location
//
int insertionCount = 0;
Map<Integer, Integer> offsetMap = new HashMap<Integer, Integer>();
for (Map.Entry<Integer, Integer> entry : m_nullTaskOrder.entrySet())
{
int idValue = entry.getKey().intValue();
int baseTargetIdValue = (idValue - insertionCount) * nextIDIncrement;
int targetIDValue = baseTargetIdValue;
Integer previousOffsetKey = Integer.valueOf(baseTargetIdValue);
Integer previousOffset = offsetMap.get(previousOffsetKey);
int offset = previousOffset == null ? 0 : previousOffset.intValue() + 1;
++insertionCount;
while (taskMap.containsKey(Integer.valueOf(targetIDValue)))
{
++offset;
if (offset == nextIDIncrement)
{
throw new MPXJException("Unable to fix task order");
}
targetIDValue = baseTargetIdValue - (nextIDIncrement - offset);
}
offsetMap.put(previousOffsetKey, Integer.valueOf(offset));
taskMap.put(Integer.valueOf(targetIDValue), entry.getValue());
}
//
// Finally, we can renumber the tasks
//
nextID = (m_file.getTaskByUniqueID(Integer.valueOf(0)) == null ? 1 : 0);
for (Map.Entry<Integer, Integer> entry : taskMap.entrySet())
{
Task task = m_file.getTaskByUniqueID(entry.getValue());
if (task != null)
{
task.setID(Integer.valueOf(nextID));
}
nextID++;
}
} | [
"MPP14 files seem to exhibit some occasional weirdness\nwith duplicate ID values which leads to the task structure\nbeing reported incorrectly. The following method attempts to correct this.\nThe method uses ordering data embedded in the file to reconstruct\nthe correct ID order of the tasks."
] | [
"Returns all keys of all rows contained within this association.\n\n@return all keys of all rows contained within this association",
"Execute a redirected request\n\n@param stringStatusCode\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@throws Exception",
"Parses an RgbaColor from a hexadecimal value.\n\n@return returns the parsed color",
"Logs binary string as hexadecimal",
"a useless object at the top level of the response JSON for no reason at all.",
"Examins the structure of A for QR decomposition\n@param A matrix which is to be decomposed\n@return true if the solution is valid or false if the decomposition can't be performed (i.e. requires column pivots)",
"Extract the DatabaseTableConfig for a particular class by looking for class and field annotations. This is used\nby internal classes to configure a class.",
"Transits a float property from the start value to the end value.\n\n@param propertyId\n@param vals\n@return self",
"Publish the bundle resources directly."
] |
public static Class getClass(String className, boolean initialize) throws ClassNotFoundException
{
return Class.forName(className, initialize, getClassLoader());
} | [
"Retrieves the class object for the given qualified class name.\n\n@param className The qualified name of the class\n@param initialize Whether the class shall be initialized\n@return The class object"
] | [
"Get the sub registry for the hosts.\n\n@param range the version range\n@return the sub registry",
"get the key name to use in log from the logging keys map",
"Apply filter to an image.\n\n@param source FastBitmap",
"Provides the results of a QR decomposition. These will be modified by adding or removing\nrows from the original 'A' matrix.\n\n@param Q The Q matrix which is to be modified. Is modified later and reference saved.\n@param R The R matrix which is to be modified. Is modified later and reference saved.",
"Set the options based on the tag elements of the ClassDoc parameter",
"Set a knot color.\n@param n the knot index\n@param color the color",
"Construct new path by replacing file directory part. No\nfiles are actually modified.\n@param file path to move\n@param target new path directory",
"Returns a new created connection\n\n@param jcd the connection descriptor\n@return an instance of Connection from the drivermanager",
"Gets the index of the specified value.\n\n@param value the value of the item to be found\n@return the index of the value"
] |
public static void parse(Reader src, StatementHandler handler)
throws IOException {
new NTriplesParser(src, handler).parse();
} | [
"Reads the NTriples file from the reader, pushing statements into\nthe handler."
] | [
"Use this API to unset the properties of nsconfig resource.\nProperties that need to be unset are specified in args array.",
"Gets a list of any comments on this file.\n\n@return a list of comments on this file.",
"Returns the data sources belonging to a particular group of data\nsources. Data sources are grouped in record linkage mode, but not\nin deduplication mode, so only use this method in record linkage\nmode.",
"Parse parameters from this request using HTTP.\n\n@param req The ServletRequest containing all request parameters.\n@param cms The OpenCms object.\n@return CmsSpellcheckingRequest object that contains parsed parameters.",
"Construct an InterestRateSwapProductDescriptor from a node in a FpML file.\n\n@param trade The node containing the swap.\n@return Descriptor of the swap.",
"Update the underlying buffer using the integer\n\n@param number number to be stored in checksum buffer",
"Parse a string representation of password spec.\n\nA password spec string should be `<trait spec><length spec>`.\n\nWhere \"trait spec\" should be a composition of\n\n* `a` - indicate lowercase letter required\n* `A` - indicate uppercase letter required\n* `0` - indicate digit letter required\n* `#` - indicate special character required\n\n\"length spec\" should be `[min,max]` where `max` can be omitted.\n\nHere are examples of valid \"length spec\":\n\n* `[6,20]` // min length: 6, max length: 20\n* `[8,]` // min length: 8, max length: unlimited\n\nAnd examples of invalid \"length spec\":\n\n* `[8]` // \",\" required after min part\n* `[a,f]` // min and max part needs to be decimal digit(s)\n* `[3,9)` // length spec must be started with `[` and end with `]`\n\n@param spec a string representation of password spec\n@return a {@link PasswordSpec} instance",
"Returns the value stored for the given key at the point of call.\n@param key a non null key\n@return the value stored in the map for the given key",
"Adjusts beforeIndex to account for the possibility that the given widget is\nalready a child of this panel.\n\n@param child the widget that might be an existing child\n@param beforeIndex the index at which it will be added to this panel\n@return the modified index"
] |
private void checkOrMarkPrivateAccess(Expression source, FieldNode fn) {
if (fn!=null && Modifier.isPrivate(fn.getModifiers()) &&
(fn.getDeclaringClass() != typeCheckingContext.getEnclosingClassNode() || typeCheckingContext.getEnclosingClosure()!=null) &&
fn.getDeclaringClass().getModule() == typeCheckingContext.getEnclosingClassNode().getModule()) {
addPrivateFieldOrMethodAccess(source, fn.getDeclaringClass(), StaticTypesMarker.PV_FIELDS_ACCESS, fn);
}
} | [
"Given a field node, checks if we are calling a private field from an inner class."
] | [
"Specifies the container object class to be instantiated\n\n@param containerObjectClass\ncontainer object class to be instantiated\n\n@return the current builder instance",
"Returns an HTML table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns.",
"Call this method to initialize the Fluo connection props\n\n@param conf Job configuration\n@param props Use {@link org.apache.fluo.api.config.FluoConfiguration} to set props\nprogrammatically",
"Execute a redirected request\n\n@param stringStatusCode\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@throws Exception",
"Retrieves the amount of time represented by a calendar exception\nbefore or after an intersection point.\n\n@param exception calendar exception\n@param date intersection time\n@param after true to report time after intersection, false to report time before\n@return length of time in milliseconds",
"Adds OPT_U | OPT_URL option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Returns the time elapsed by the user on the app\n@return Time elapsed by user on the app in int",
"Handle a whole day change event.\n@param event the change event.",
"A safe wrapper to destroy the given resource request."
] |
private List<TimephasedCost> getTimephasedActualCostFixedAmount()
{
List<TimephasedCost> result = new LinkedList<TimephasedCost>();
double actualCost = getActualCost().doubleValue();
if (actualCost > 0)
{
AccrueType accrueAt = getResource().getAccrueAt();
if (accrueAt == AccrueType.START)
{
result.add(splitCostStart(getCalendar(), actualCost, getActualStart()));
}
else
if (accrueAt == AccrueType.END)
{
result.add(splitCostEnd(getCalendar(), actualCost, getActualFinish()));
}
else
{
//for prorated, we have to deal with it differently; have to 'fill up' each
//day with the standard amount before going to the next one
double numWorkingDays = getCalendar().getWork(getStart(), getFinish(), TimeUnit.DAYS).getDuration();
double standardAmountPerDay = getCost().doubleValue() / numWorkingDays;
result.addAll(splitCostProrated(getCalendar(), actualCost, standardAmountPerDay, getActualStart()));
}
}
return result;
} | [
"Generates timephased actual costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost"
] | [
"Select item by it's position\n\n@param position int value of item position to select\n@param invokeListeners boolean value for invoking listeners",
"Deletes the first element from the receiver that matches the specified element.\nDoes nothing, if no such matching element is contained.\n\nTests elements for equality or identity as specified by <tt>testForEquality</tt>.\nWhen testing for equality, two elements <tt>e1</tt> and\n<tt>e2</tt> are <i>equal</i> if <tt>(e1==null ? e2==null :\ne1.equals(e2))</tt>.)\n\n@param testForEquality if true -> tests for equality, otherwise for identity.\n@param element the element to be deleted.",
"Merges individual days together into time spans where the\nsame work is undertaken each day.\n\n@param list assignment data",
"For a particular stealer node find all the primary partitions tuples it\nwill steal.\n\n@param currentCluster The cluster definition of the existing cluster\n@param finalCluster The final cluster definition\n@param stealNodeId Node id of the stealer node\n@return Returns a list of primary partitions which this stealer node will\nget",
"Paint a check pattern, used for a background to indicate image transparency.\n@param c the component to draw into\n@param g the Graphics objects\n@param x the x position\n@param y the y position\n@param width the width\n@param height the height",
"Replace the last element of an address with a static path element.\n\n@param element the path element\n@return the operation address transformer",
"Read filename from spec.",
"Gets an item that was shared with a shared link.\n@param api the API connection to be used by the shared item.\n@param sharedLink the shared link to the item.\n@return info about the shared item.",
"Returns the value of the identified field as a String.\n@param fieldName the name of the field\n@return the value of the field as a String"
] |
public static base_response expire(nitro_service client, cacheobject resource) throws Exception {
cacheobject expireresource = new cacheobject();
expireresource.locator = resource.locator;
expireresource.url = resource.url;
expireresource.host = resource.host;
expireresource.port = resource.port;
expireresource.groupname = resource.groupname;
expireresource.httpmethod = resource.httpmethod;
return expireresource.perform_operation(client,"expire");
} | [
"Use this API to expire cacheobject."
] | [
"Delegates file rolling to composed objects.\n\n@see FileRollable#roll(org.apache.log4j.spi.LoggingEvent)",
"returns an Array with an Objects CURRENT locking VALUES , BRJ\n@throws PersistenceBrokerException if there is an erros accessing o field values",
"Convert an MPXJ Duration instance into an integer duration in minutes\nready to be written to an MPX file.\n\n@param properties project properties, used for duration units conversion\n@param duration Duration instance\n@return integer duration in minutes",
"Replaces sequences of whitespaces with tabs.\n\n@param self A CharSequence to unexpand\n@param tabStop The number of spaces a tab represents\n@return an unexpanded String\n@since 1.8.2",
"Performs MAC signing of the SMB. This is done as follows.\nThe signature field of the SMB is overwritted with the sequence number;\nThe MD5 digest of the MAC signing key + the entire SMB is taken;\nThe first 8 bytes of this are placed in the signature field.\n\n@param data The data.\n@param offset The starting offset at which the SMB header begins.\n@param length The length of the SMB data starting at offset.",
"Returns the getter method associated with the object's field.\n\n@param object\nthe object\n@param fieldName\nthe name of the field\n@return the getter method\n@throws NullPointerException\nif object or fieldName is null\n@throws SuperCsvReflectionException\nif the getter doesn't exist or is not visible",
"Create an MD5 hash of a string.\n\n@param input Input string.\n@return Hash of input.\n@throws IllegalArgumentException if {@code input} is blank.",
"Finish initializing the service.",
"Log error information"
] |
public Object putNodeMetaData(Object key, Object value) {
if (key == null) throw new GroovyBugError("Tried to set meta data with null key on " + this + ".");
if (metaDataMap == null) {
metaDataMap = new ListHashMap();
}
return metaDataMap.put(key, value);
} | [
"Sets the node meta data but allows overwriting values.\n\n@param key - the meta data key\n@param value - the meta data value\n@return the old node meta data value for this key\n@throws GroovyBugError if key is null"
] | [
"Clean wait task queue.",
"Assigns the provided square matrix to be a random Hermitian matrix with elements from min to max value.\n\n@param A The matrix that is to be modified. Must be square. Modified.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.",
"the 1st request from the manager.",
"Sets up and declares internal data structures.\n\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagonal elements from tridiagonal matrix. Modified.\n@param numCols number of columns (and rows) in the matrix.",
"convenience factory method for the most usual case.",
"refresh the most recent history entries\n\n@param limit number of entries to populate\n@param offset number of most recent entries to skip\n@return populated history entries\n@throws Exception exception",
"Reads the bundle descriptor, sets m_desc and m_descContent.\n@throws CmsXmlException thrown when unmarshalling fails.\n@throws CmsException thrown when reading the resource fails or several bundle descriptors for the bundle exist.",
"Get the JSON representation of the metadata field filter.\n@return the JSON object representing the filter.",
"Writes one or more String columns as a line to the CsvWriter.\n\n@param columns\nthe columns to write\n@throws IllegalArgumentException\nif columns.length == 0\n@throws IOException\nIf an I/O error occurs\n@throws NullPointerException\nif columns is null"
] |
public void close()
{
inputManager.unregisterInputDeviceListener(inputDeviceListener);
mouseDeviceManager.forceStopThread();
gamepadDeviceManager.forceStopThread();
controllerIds.clear();
cache.clear();
controllers.clear();
} | [
"Shut down the input manager.\n\nAfter this call, GearVRf will not be able to access IO devices."
] | [
"creates option map for remoting connections\n@param resolver\n@param model\n@param defaults\n@return\n@throws OperationFailedException\n@deprecated configuring xnio worker options is no longer supported and should be replaced for referencing IO subsystem",
"Formats a vertex using it's properties. Debugging purposes.",
"Returns a source excerpt of the type parameters of this type, including angle brackets.\nAlways an empty string if the type class is not generic.\n\n<p>e.g. {@code <N, C>}",
"Adds OPT_J | OPT_JSON option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Create and get actor system.\n\n@return the actor system",
"Returns the directory of the URL.\n\n@param urlString URL of the file.\n@return The directory string.\n@throws IllegalArgumentException if URL is malformed",
"Processes one dump file with the given dump file processor, handling\nexceptions appropriately.\n\n@param dumpFile\nthe dump file to process\n@param dumpFileProcessor\nthe dump file processor to use",
"Retrieve a work week which applies to this date.\n\n@param date target date\n@return work week, or null if none match this date",
"Remove the realm name block.\n\n@see PropertiesFileLoader#addLineContent(java.io.BufferedReader, java.util.List, String)"
] |
public final Jar setAttribute(String name, String value) {
verifyNotSealed();
if (jos != null)
throw new IllegalStateException("Manifest cannot be modified after entries are added.");
getManifest().getMainAttributes().putValue(name, value);
return this;
} | [
"Sets an attribute in the main section of the manifest.\n\n@param name the attribute's name\n@param value the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods."
] | [
"Returns all the retention policies with specified filters.\n@param name a name to filter the retention policies by. A trailing partial match search is performed.\nSet to null if no name filtering is required.\n@param type a policy type to filter the retention policies by. Set to null if no type filtering is required.\n@param userID a user id to filter the retention policies by. Set to null if no type filtering is required.\n@param limit the limit of items per single response. The default value is 100.\n@param api the API connection to be used by the resource.\n@param fields the fields to retrieve.\n@return an iterable with all the retention policies met search conditions.",
"Send a metadata cache update announcement to all registered listeners.\n\n@param slot the media slot whose cache status has changed\n@param cache the cache which has been attached, or, if {@code null}, the previous cache has been detached",
"Returns the ARGB components for the pixel at the given coordinates\n\n@param x the x coordinate of the pixel component to grab\n@param y the y coordinate of the pixel component to grab\n@return an array containing ARGB components in that order.",
"Processes the template for all index columns for the current index descriptor.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Return a list of 'Files' of downloaded or uploaded files. Filters build files without local and remote paths.\n\n@param buildFilesStream - Stream of build Artifacts or Dependencies.\n@return - List of build files.",
"Compute 1-dimensional Perlin noise.\n@param x the x value\n@return noise value at x in the range -1..1",
"MPP14 files seem to exhibit some occasional weirdness\nwith duplicate ID values which leads to the task structure\nbeing reported incorrectly. The following method attempts to correct this.\nThe method uses ordering data embedded in the file to reconstruct\nthe correct ID order of the tasks.",
"This method allows a pre-existing resource calendar to be attached to a\nresource.\n\n@param calendar resource calendar",
"Given a date represented by a Date instance, set the time\ncomponent of the date based on the hours and minutes of the\ntime supplied by the Date instance.\n\n@param date Date instance representing the date\n@param canonicalTime Date instance representing the time of day\n@return new Date instance with the required time set"
] |
public void takeNoteOfGradient(IntDoubleVector gradient) {
gradient.iterate(new FnIntDoubleToVoid() {
@Override
public void call(int index, double value) {
gradSumSquares[index] += value * value;
assert !Double.isNaN(gradSumSquares[index]);
}
});
} | [
"A tie-in for subclasses such as AdaGrad."
] | [
"Creates the stats type.\n\n@param statsItems\nthe stats items\n@param sortType\nthe sort type\n@param functionParser\nthe function parser\n@return the string",
"Read the set of property files. Keys and Values are automatically validated and converted.\n\n@param resourceLoader\n@return all the properties from the weld.properties file",
"Starts a background thread which calls the controller every\ncheck_interval milliseconds. Returns immediately, leaving the\nbackground thread running.",
"Return a licenses view of the targeted module\n\n@param moduleId String\n@return List<DbLicense>",
"Write a new line and indent.",
"returns an Array with an Objects PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values",
"Creates updateable version of capability registry that on publish pushes all changes to main registry\nthis is used to create context local registry that only on completion commits changes to main registry\n\n@return writable registry",
"Find a toBuilder method, if the user has provided one.",
"Run a query on the datastore.\n\n@return The entities returned by the query.\n@throws DatastoreException on error"
] |
public void setEnd(Date endDate) {
if ((null == endDate) || getStart().after(endDate)) {
m_explicitEnd = null;
} else {
m_explicitEnd = endDate;
}
} | [
"Explicitly set the end time of the event.\n\nIf the provided date is <code>null</code> or a date before the start date, the end date defaults to the start date.\n\n@param endDate the end time of the event."
] | [
"Returns the probability that the records v1 and v2 came from\nrepresent the same entity, based on high and low probability\nsettings etc.",
"Finds all nWise combinations of a set of variables, each with a given domain of values\n\n@param nWise the number of variables in each combination\n@param coVariables the varisbles\n@param variableDomains the domains\n@return all nWise combinations of the set of variables",
"Adds OPT_J | OPT_JSON option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Returns the title according to the given locale.\n@param locale the locale for which the title should be read.\n@return the title according to the given locale",
"Returns a predicate that takes no parameters. The given SQL expression is\nused directly.\n\n@param sql\nSQL text of the expression",
"Try to obtain the value that is cached for the given key in the given resource.\nIf no value is cached, the provider is used to compute it and store it afterwards.\n@param resource the resource. If it is <code>null</code>, the provider will be used to compute the value.\n@param key the cache key. May not be <code>null</code>.\n@param provider the strategy to compute the value if necessary. May not be <code>null</code>.",
"gets a class from the class cache. This cache contains only classes loaded through\nthis class loader or an InnerLoader instance. If no class is stored for a\nspecific name, then the method should return null.\n\n@param name of the class\n@return the class stored for the given name\n@see #removeClassCacheEntry(String)\n@see #setClassCacheEntry(Class)\n@see #clearCache()",
"Parses and adds dictionaries to the Solr index.\n\n@param cms the OpenCms object.\n\n@throws CmsRoleViolationException in case the user does not have the required role ROOT_ADMIN",
"Use this API to add vlan."
] |
private void populateCalendar(Record record, ProjectCalendar calendar, boolean isBaseCalendar)
{
if (isBaseCalendar == true)
{
calendar.setName(record.getString(0));
}
else
{
calendar.setParent(m_projectFile.getCalendarByName(record.getString(0)));
}
calendar.setWorkingDay(Day.SUNDAY, DayType.getInstance(record.getInteger(1)));
calendar.setWorkingDay(Day.MONDAY, DayType.getInstance(record.getInteger(2)));
calendar.setWorkingDay(Day.TUESDAY, DayType.getInstance(record.getInteger(3)));
calendar.setWorkingDay(Day.WEDNESDAY, DayType.getInstance(record.getInteger(4)));
calendar.setWorkingDay(Day.THURSDAY, DayType.getInstance(record.getInteger(5)));
calendar.setWorkingDay(Day.FRIDAY, DayType.getInstance(record.getInteger(6)));
calendar.setWorkingDay(Day.SATURDAY, DayType.getInstance(record.getInteger(7)));
m_eventManager.fireCalendarReadEvent(calendar);
} | [
"Populates a calendar instance.\n\n@param record MPX record\n@param calendar calendar instance\n@param isBaseCalendar true if this is a base calendar"
] | [
"Returns the compact project records for all projects in the team.\n\n@param team The team to find projects in.\n@return Request object",
"Sets the current class definition derived from the current class, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"accept-locks\" optional=\"true\" description=\"The accept locks setting\" values=\"true,false\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the class as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"determine-extents\" optional=\"true\" description=\"Whether to determine\npersistent direct sub types automatically\" values=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the class\"\[email protected] name=\"factory-method\" optional=\"true\" description=\"Specifies a no-argument factory method that is\nused to create instances (not yet implemented !)\"\[email protected] name=\"factory-class\" optional=\"true\" description=\"Specifies a factory class to be used for creating\nobjects of this class\"\[email protected] name=\"factory-method\" optional=\"true\" description=\"Specifies a static no-argument method in the factory class\"\[email protected] name=\"generate-repository-info\" optional=\"true\" description=\"Whether repository data should be\ngenerated for the class\" values=\"true,false\"\[email protected] name=\"generate-table-info\" optional=\"true\" description=\"Whether table data should be\ngenerated for the class\" values=\"true,false\"\[email protected] name=\"include-inherited\" optional=\"true\" description=\"Whether to include\nfields/references/collections of supertypes\" values=\"true,false\"\[email protected] name=\"initialization-method\" optional=\"true\" description=\"Specifies a no-argument instance method that is\ncalled right after an instance has been read from the database\"\[email protected] name=\"isolation-level\" optional=\"true\" description=\"The isolation level setting\"\[email protected] name=\"proxy\" optional=\"true\" description=\"The proxy setting for this class\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects of\nobjects of this class to prefetch in collections\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Can be set to force OJB to refresh instances when\nloaded from the cache\" values=\"true,false\"\[email protected] name=\"row-reader\" optional=\"true\" description=\"The row reader for the class\"\[email protected] name=\"schema\" optional=\"true\" description=\"The schema for the type\"\[email protected] name=\"table\" optional=\"true\" description=\"The table for the class\"\[email protected] name=\"table-documentation\" optional=\"true\" description=\"Documentation on the table\"",
"Look up record by identity.",
"Create a FreeMarkerOperation with the provided furnace instance template path, and varNames.\n\nThe variables in varNames will be provided to the template, and a new ReportModel will be created with these variables attached.",
"Checks that the data starting at startLocRecord looks like a local file record header.\n\n@param channel the channel\n@param startLocRecord offset into channel of the start of the local record\n@param compressedSize expected compressed size of the file, or -1 to indicate this isn't known",
"Creates a new tag in a workspace or organization.\n\nEvery tag is required to be created in a specific workspace or\norganization, and this cannot be changed once set. Note that you can use\nthe `workspace` parameter regardless of whether or not it is an\norganization.\n\nReturns the full record of the newly created tag.\n\n@param workspace The workspace or organization to create the tag in.\n@return Request object",
"Performs a HTTP DELETE request.\n\n@return {@link Response}",
"when divisionPrefixLen is null, isAutoSubnets has no effect",
"Check config.\n\n@param context the context\n@return true, if successful\n@throws Exception the exception"
] |
@Override
protected void stopInner() throws VoldemortException {
List<VoldemortException> exceptions = new ArrayList<VoldemortException>();
logger.info("Stopping services:" + getIdentityNode().getId());
/* Stop in reverse order */
exceptions.addAll(stopOnlineServices());
for(VoldemortService service: Utils.reversed(basicServices)) {
try {
service.stop();
} catch(VoldemortException e) {
exceptions.add(e);
logger.error(e);
}
}
logger.info("All services stopped for Node:" + getIdentityNode().getId());
if(exceptions.size() > 0)
throw exceptions.get(0);
// release lock of jvm heap
JNAUtils.tryMunlockall();
} | [
"Attempt to shutdown the server. As much shutdown as possible will be\ncompleted, even if intermediate errors are encountered.\n\n@throws VoldemortException"
] | [
"Returns code number of Task field supplied.\n\n@param field - name\n@return - code no",
"Get the multicast socket address.\n\n@return the multicast address",
"Retrieves a timestamp from the property data.\n\n@param type Type identifier\n@return timestamp",
"Get the element at the index as a json array.\n\n@param i the index of the element to access",
"Notifies that multiple header items are changed.\n\n@param positionStart the position.\n@param itemCount the item count.",
"Creates a descriptor for the currently edited message bundle.\n@return <code>true</code> if the descriptor could be created, <code>false</code> otherwise.",
"Initializes data structures",
"Creates a Bytes object by copying the data of the given byte array",
"This method must be called on the stop of the component. Stop the directory monitor and unregister all the\ndeclarations."
] |
private int countHours(Integer hours)
{
int value = hours.intValue();
int hoursPerDay = 0;
int hour = 0;
while (value > 0)
{
// Move forward until we find a working hour
while (hour < 24)
{
if ((value & 0x1) != 0)
{
++hoursPerDay;
}
value = value >> 1;
++hour;
}
}
return hoursPerDay;
} | [
"Count the number of working hours in a day, based in the\ninteger representation of the working hours.\n\n@param hours working hours\n@return number of hours"
] | [
"Finds the first Field with given field name in the Class and in its super classes.\n\n@param type The Class type\n@param fieldName The field name to get\n@return an {@code Optional}. Use isPresent() to find out if the field name was found.",
"Clones the given field.\n\n@param fieldDef The field descriptor\n@param prefix A prefix for the name\n@return The cloned field",
"Visits a parameter of this method.\n\n@param name\nparameter name or null if none is provided.\n@param access\nthe parameter's access flags, only <tt>ACC_FINAL</tt>,\n<tt>ACC_SYNTHETIC</tt> or/and <tt>ACC_MANDATED</tt> are\nallowed (see {@link Opcodes}).",
"Computes the p=2 norm. If A is a matrix then the induced norm is computed. This\nimplementation is faster, but more prone to buffer overflow or underflow problems.\n\n@param A Matrix or vector.\n@return The norm.",
"Delete the proxy history for the active profile\n\n@throws Exception exception",
"Recursively read the WBS structure from a PEP file.\n\n@param parent parent container for tasks\n@param id initial WBS ID",
"Get a bean from the application context. Returns null if the bean does not exist.\n@param name name of bean\n@param requiredType type of bean\n@return the bean or null",
"Add network interceptor to httpClient to track download progress for\nasync requests.",
"Check config.\n\n@param context the context\n@return true, if successful\n@throws Exception the exception"
] |
protected List<Object> executeProcessors(final List<Object> processedColumns, final CellProcessor[] processors) {
Util.executeCellProcessors(processedColumns, getColumns(), processors, getLineNumber(), getRowNumber());
return processedColumns;
} | [
"Executes the supplied cell processors on the last row of CSV that was read and populates the supplied List of\nprocessed columns.\n\n@param processedColumns\nthe List to populate with processed columns\n@param processors\nthe cell processors\n@return the updated List\n@throws NullPointerException\nif processedColumns or processors is null\n@throws SuperCsvConstraintViolationException\nif a CellProcessor constraint failed\n@throws SuperCsvException\nif the wrong number of processors are supplied, or CellProcessor execution failed"
] | [
"Use this API to update clusternodegroup.",
"Converts the suggestions from the Solrj format to JSON format.\n\n@param response The SpellCheckResponse object containing the spellcheck results.\n@return The spellcheck suggestions as JSON object or null if something goes wrong.",
"changes the color of the image - more red and less blue\n\n@return new pixel array",
"Send a media details response to all registered listeners.\n\n@param details the response that has just arrived",
"Formats a logging event to a writer.\n\n@param event\nlogging event to be formatted.",
"Updates the text style according to a new text position\n@param bstyle the style to be updated\n@param text the text position",
"Find and unmarshal all test suite files in given directories.\n\n@throws IOException if any occurs.\n@see #unmarshal(File)",
"Update artifact provider\n\n@param gavc String\n@param provider String",
"Returns the ViewGroup used as a parent for the content view.\n\n@return The content view's parent."
] |
void saveAction() {
Map<Object, Object> filters = getFilters();
m_table.clearFilters();
try {
m_model.save();
disableSaveButtons();
} catch (CmsException e) {
LOG.error(m_messages.key(Messages.ERR_SAVING_CHANGES_0), e);
CmsErrorDialog.showErrorDialog(m_messages.key(Messages.ERR_SAVING_CHANGES_0), e);
}
setFilters(filters);
} | [
"Save the changes."
] | [
"Read pattern information from the provided JSON object.\n@param patternJson the JSON object containing the pattern information.",
"Loads configuration from File. Later loads have lower priority.\n\n@param file File to load from\n@since 1.2.0",
"Creates a metadata cache archive file of all tracks in the specified slot on the specified player. Any\nprevious contents of the specified file will be replaced.\n\n@param slot the slot in which the media to be cached can be found\n@param playlistId the id of playlist to be cached, or 0 of all tracks should be cached\n@param cache the file into which the metadata cache should be written\n\n@throws Exception if there is a problem communicating with the player or writing the cache file.",
"Downloads this version of the file to a given OutputStream while reporting the progress to a ProgressListener.\n@param output the stream to where the file will be written.\n@param listener a listener for monitoring the download's progress.",
"Retrieve the finish slack.\n\n@return finish slack",
"Add a line symbolizer definition to the rule.\n\n@param styleJson The old style.",
"Compares this value with the specified object for order. Returns a negative\ninteger, zero, or a positive integer as this value is less than, equal to, or\ngreater than the specified value.\n@param other Another Rational value.\n@return A negative integer, zero, or a positive integer as this value is less\nthan, equal to, or greater than the specified value.",
"Returns any events for the given resource ID since the last sync token\n\n@param resource Globally unique identifier for the resource.\n@param sync Sync token provided by a previous call to the events API\n@return Request object",
"Read resource data from a PEP file."
] |
public static int lengthOfCodePoint(int codePoint)
{
if (codePoint < 0) {
throw new InvalidCodePointException(codePoint);
}
if (codePoint < 0x80) {
// normal ASCII
// 0xxx_xxxx
return 1;
}
if (codePoint < 0x800) {
return 2;
}
if (codePoint < 0x1_0000) {
return 3;
}
if (codePoint < 0x11_0000) {
return 4;
}
// Per RFC3629, UTF-8 is limited to 4 bytes, so more bytes are illegal
throw new InvalidCodePointException(codePoint);
} | [
"Gets the UTF-8 sequence length of the code point.\n\n@throws InvalidCodePointException if code point is not within a valid range"
] | [
"Unlock all edited resources.",
"Send an album art update announcement to all registered listeners.",
"Exit the Application",
"Generates a download id for the request and adds the download request to the download request queue for the dispatchers pool to act on immediately.\n\n@param request\n@return downloadId",
"Unlock all files opened for writing.",
"Schedule at most one task.\n\nThe scheduled task *must* invoke 'doneTask()' upon\ncompletion/termination.\n\n@param executeService flag to control execution of the service, some tests pass\nin value 'false'\n@return The task scheduled or null if not possible to schedule a task at\nthis time.",
"Convenience method for retrieving an Integer resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value",
"Assign float value within allowed range of [0,infinity) to initializeOnly SFFloat field named spacing.\n@param newValue",
"Save the values to the bundle descriptor.\n@throws CmsException thrown if saving fails."
] |
public static cachepolicylabel_policybinding_binding[] get(nitro_service service, String labelname) throws Exception{
cachepolicylabel_policybinding_binding obj = new cachepolicylabel_policybinding_binding();
obj.set_labelname(labelname);
cachepolicylabel_policybinding_binding response[] = (cachepolicylabel_policybinding_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch cachepolicylabel_policybinding_binding resources of given name ."
] | [
"Get's the user's current upload limits, User object only contains user_id\n\n@return Media Limits",
"The main method called from the command line.\n\n@param args the command line arguments",
"Get bean for given name in the \"thread\" scope.\n\n@param name name of bean\n@param factory factory for new instances\n@return bean for this scope",
"Get the items for the key.\n\n@param key\n@return the items for the given key",
"Loads the favorite list.\n\n@return the list of favorites\n\n@throws CmsException if something goes wrong",
"Turn given source String array into sorted array.\n\n@param array the source array\n@return the sorted array (never <code>null</code>)",
"Reorder the objects in the table to resolve referential integrity dependencies.",
"Retrieve a string value.\n\n@param data byte array\n@param offset offset into byte array\n@return string value",
"Retrieves the members of the type and of its super types.\n\n@param memberNames Will receive the names of the members (for sorting)\n@param members Will receive the members\n@param type The type to process\n@param tagName An optional tag for filtering the types\n@param paramName The feature to be added to the MembersInclSupertypes attribute\n@param paramValue The feature to be added to the MembersInclSupertypes attribute\n@throws XDocletException If an error occurs"
] |
protected void importUserFromFile() {
CmsImportUserThread thread = new CmsImportUserThread(
m_cms,
m_ou,
m_userImportList,
getGroupsList(m_importGroups, true),
getRolesList(m_importRoles, true),
m_sendMail.getValue().booleanValue());
thread.start();
CmsShowReportDialog dialog = new CmsShowReportDialog(thread, new Runnable() {
public void run() {
m_window.close();
}
});
m_window.setContent(dialog);
} | [
"Import user from file."
] | [
"2-D Complex Gabor function.\n\n@param x X axis coordinate.\n@param y Y axis coordinate.\n@param wavelength Wavelength.\n@param orientation Orientation.\n@param phaseOffset Phase offset.\n@param gaussVariance Gaussian variance.\n@param aspectRatio Aspect ratio.\n@return Gabor response.",
"Deserialize an `AppDescriptor` from byte array\n\n@param bytes\nthe byte array\n@return\nan `AppDescriptor` instance",
"Return a html view that contains the targeted license\n\n@param name String\n@return DbLicense",
"Parse the given projection.\n\n@param projection The projection string.\n@param longitudeFirst longitudeFirst",
"this method looks up the appropriate JDOClass for a given persistent Class.\nIt uses the JDOModel to perfom this lookup.\n@param c the persistent Class\n@return the JDOCLass object",
"Assign target number of partitions per node to specific node IDs. Then,\nseparates Nodes into donorNodes and stealerNodes based on whether the\nnode needs to donate or steal primary partitions.\n\n@param nextCandidateCluster\n@param numPartitionsPerNodePerZone\n@return a Pair. First element is donorNodes, second element is\nstealerNodes. Each element in the pair is a HashMap of Node to\nInteger where the integer value is the number of partitions to\nstore.",
"Used to determine if the current method should be ignored.\n\n@param name method name\n@return true if the method should be ignored",
"Restore the recorded state from the rollback xml.\n\n@param target the patchable target\n@param rollbackPatchId the rollback patch id\n@param patchType the the current patch type\n@param history the recorded history\n@throws PatchingException",
"Maps a story if it is allowed by the meta filter\n\n@param story\nthe Story\n@param metaFilter\nthe meta filter"
] |
private static Interval parseEndDateTime(Instant start, ZoneOffset offset, CharSequence endStr) {
try {
TemporalAccessor temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest(endStr, OffsetDateTime::from, LocalDateTime::from);
if (temporal instanceof OffsetDateTime) {
OffsetDateTime odt = (OffsetDateTime) temporal;
return Interval.of(start, odt.toInstant());
} else {
// infer offset from start if not specified by end
LocalDateTime ldt = (LocalDateTime) temporal;
return Interval.of(start, ldt.toInstant(offset));
}
} catch (DateTimeParseException ex) {
Instant end = Instant.parse(endStr);
return Interval.of(start, end);
}
} | [
"parse when there are two date-times"
] | [
"Polls from the URL provided.\n\n@param url the URL to poll from.\n@return the raw response.",
"Construct an InterestRateSwapProductDescriptor from a node in a FpML file.\n\n@param trade The node containing the swap.\n@return Descriptor of the swap.",
"Called when the layout is applied to the data\n@param container WidgetContainer to access the org.gearvrf.org.gearvrf.widgetlib in the layout\n@param viewPortSize View port for data set",
"Returns the expression string required\n\n@param ds\n@return",
"This adds database table configurations to the internal cache which can be used to speed up DAO construction.\nThis is especially true of Android and other mobile platforms.",
"Creates a Document that can be passed to the MongoDB batch insert function",
"Recovers the state of synchronization for a namespace in case a system failure happened.\nThe goal is to revert the namespace to a known, good state. This method itself is resilient\nto failures, since it doesn't delete any documents from the undo collection until the\ncollection is in the desired state with respect to those documents.",
"Determine if a CharSequence can be parsed as a Float.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isFloat(String)\n@since 1.8.2",
"Additional bean deployment archives are used for extentions, synthetic annotated types and beans which do not come from a bean archive.\n\n@param beanClass\n@return the additional bean deployment archive"
] |
private void handleApplicationUpdateRequest(SerialMessage incomingMessage) {
logger.trace("Handle Message Application Update Request");
int nodeId = incomingMessage.getMessagePayloadByte(1);
logger.trace("Application Update Request from Node " + nodeId);
UpdateState updateState = UpdateState.getUpdateState(incomingMessage.getMessagePayloadByte(0));
switch (updateState) {
case NODE_INFO_RECEIVED:
logger.debug("Application update request, node information received.");
int length = incomingMessage.getMessagePayloadByte(2);
ZWaveNode node = getNode(nodeId);
node.resetResendCount();
for (int i = 6; i < length + 3; i++) {
int data = incomingMessage.getMessagePayloadByte(i);
if(data == 0xef ) {
// TODO: Implement control command classes
break;
}
logger.debug(String.format("Adding command class 0x%02X to the list of supported command classes.", data));
ZWaveCommandClass commandClass = ZWaveCommandClass.getInstance(data, node, this);
if (commandClass != null)
node.addCommandClass(commandClass);
}
// advance node stage.
node.advanceNodeStage();
if (incomingMessage.getMessageClass() == this.lastSentMessage.getExpectedReply() && !incomingMessage.isTransActionCanceled()) {
notifyEventListeners(new ZWaveEvent(ZWaveEventType.TRANSACTION_COMPLETED_EVENT, this.lastSentMessage.getMessageNode(), 1, this.lastSentMessage));
transactionCompleted.release();
logger.trace("Released. Transaction completed permit count -> {}", transactionCompleted.availablePermits());
}
break;
case NODE_INFO_REQ_FAILED:
logger.debug("Application update request, Node Info Request Failed, re-request node info.");
SerialMessage requestInfoMessage = this.lastSentMessage;
if (requestInfoMessage.getMessageClass() != SerialMessage.SerialMessageClass.RequestNodeInfo) {
logger.warn("Got application update request without node info request, ignoring.");
return;
}
if (--requestInfoMessage.attempts >= 0) {
logger.error("Got Node Info Request Failed while sending this serial message. Requeueing");
this.enqueue(requestInfoMessage);
} else
{
logger.warn("Node Info Request Failed 3x. Discarding message: {}", lastSentMessage.toString());
}
transactionCompleted.release();
break;
default:
logger.warn(String.format("TODO: Implement Application Update Request Handling of %s (0x%02X).", updateState.getLabel(), updateState.getKey()));
}
} | [
"Handles incoming Application Update Request.\n@param incomingMessage the request message to process."
] | [
"Delivers the correct JSON Object for outgoings\n\n@param outgoings\n@throws org.json.JSONException",
"Use this API to add dnspolicylabel resources.",
"Get the JSON string representation of the selector configured for this index.\n\n@return selector JSON as string",
"Convert raw data into Java types.\n\n@param type data type\n@param data raw data\n@return list of Java object",
"Returns the start position of the indicator.\n\n@return The start position of the indicator.",
"Removes a value from the list.\n\n@param list the list\n@param value value to remove",
"Parses and adds dictionaries to the Solr index.\n\n@param cms the OpenCms object.\n\n@throws CmsRoleViolationException in case the user does not have the required role ROOT_ADMIN",
"Read a text file resource into a single string\n\n@param context\nA non-null Android Context\n@param resourceId\nAn Android resource id\n@return The contents, or null on error.",
"Allows testsuites to shorten the domain timeout adder"
] |
private static int abs(int a) {
if(a >= 0)
return a;
else if(a != Integer.MIN_VALUE)
return -a;
return Integer.MAX_VALUE;
} | [
"A modified version of abs that always returns a non-negative value.\nMath.abs returns Integer.MIN_VALUE if a == Integer.MIN_VALUE and this\nmethod returns Integer.MAX_VALUE in that case."
] | [
"Shutdown the connection manager.",
"Convert element to another object given a parameterized type signature\n\n@param context\n@param destinationType\nthe destination type\n@param source\nthe source object\n\n@return the converted object\n@throws ConverterException\nif conversion failed",
"Returns all tags that designate this tag. E.g., for \"tesla-model3\", this would return \"car\", \"vehicle\", \"vendor-tesla\" etc.",
"Use this API to update snmpmanager resources.",
"Returns true if the specified class node is a trait.\n@param cNode a class node to test\n@return true if the classnode represents a trait",
"Starts advertising on Hyperbahn at a fixed interval.\n\n@return a future that resolves to the response of the first advertise request",
"Checks if the provided organization is valid and could be stored into the database\n\n@param organization Organization\n@throws WebApplicationException if the data is corrupted",
"Gets the progress.\n\n@return the progress",
"Add image with a exception message in the PDF document.\n\n@param context\nPDF context\n@param e\nexception to put in image"
] |
public ItemRequest<Webhook> getById(String webhook) {
String path = String.format("/webhooks/%s", webhook);
return new ItemRequest<Webhook>(this, Webhook.class, path, "GET");
} | [
"Returns the full record for the given webhook.\n\n@param webhook The webhook to get.\n@return Request object"
] | [
"Gets an iterable of all the groups in the enterprise that are starting with the given name string.\n@param api the API connection to be used when retrieving the groups.\n@param name the name prefix of the groups. If the groups need to searched by full name that has spaces,\nthen the parameter string should have been wrapped with \"\".\n@return an iterable containing info about all the groups.",
"Add statistics about sent emails.\n\n@param recipients The list of recipients.\n@param storageUsed If a remote storage was used.",
"Print the class's constructors m",
"Set the background color.\n\nIf you don't set the background color, the default is an opaque black:\n{@link Color#BLACK}, 0xff000000.\n\n@param color\nAn Android 32-bit (ARGB) {@link Color}, such as you get from\n{@link Resources#getColor(int)}",
"Use this API to fetch Interface resource of given name .",
"Gets the metadata on this folder associated with a specified template.\n\n@param templateName the metadata template type name.\n@return the metadata returned from the server.",
"returns IsolationLevel literal as matching\nto the corresponding id\n@return the IsolationLevel literal",
"add a FK column pointing to This Class",
"Checks if two claims are equivalent in the sense that they have the same\nmain snak and the same qualifiers, but possibly in a different order.\n\n@param claim1\n@param claim2\n@return true if claims are equivalent"
] |
public double areaSquared(HalfEdge hedge0, HalfEdge hedge1) {
Point3d p0 = hedge0.tail().pnt;
Point3d p1 = hedge0.head().pnt;
Point3d p2 = hedge1.head().pnt;
double dx1 = p1.x - p0.x;
double dy1 = p1.y - p0.y;
double dz1 = p1.z - p0.z;
double dx2 = p2.x - p0.x;
double dy2 = p2.y - p0.y;
double dz2 = p2.z - p0.z;
double x = dy1 * dz2 - dz1 * dy2;
double y = dz1 * dx2 - dx1 * dz2;
double z = dx1 * dy2 - dy1 * dx2;
return x * x + y * y + z * z;
} | [
"return the squared area of the triangle defined by the half edge hedge0\nand the point at the head of hedge1.\n\n@param hedge0\n@param hedge1\n@return"
] | [
"remove files from directory. All-or-nothing operation - if any of the files fails to be removed, all deleted files are restored.\n\nThe operation is performed in two steps - first all the files are moved to a backup folder, and afterwards backup folder is removed.\nIf an error occurs in the first step of the operation, all files are restored and the operation ends with status {@code false}.\nIf an error occurs in the second step, the operation ends with status {@code false}, but the files are not rolled back.\n\n@throws IOException if an error occurred",
"Returns a Pair constructed from X and Y. Convenience method; the\ncompiler will disambiguate the classes used for you so that you\ndon't have to write out potentially long class names.",
"We have identified that we have a SQLite file. This could be a Primavera Project database\nor an Asta database. Open the database and use the table names present to determine\nwhich type this is.\n\n@param stream schedule data\n@return ProjectFile instance",
"Resizes an image to the specified height, changing width in the same proportion\n@param originalImage Image in memory\n@param heightOut The height to resize\n@return New Image in memory",
"Use this API to fetch all the sslaction resources that are configured on netscaler.",
"Ensures that the primary keys required by the given reference are present in the referenced class.\n\n@param modelDef The model\n@param refDef The reference\n@throws ConstraintException If there is a conflict between the primary keys",
"Creates an attachment from a binary input stream.\nThe content of the stream will be transformed into a Base64 encoded string\n@throws IOException if an I/O error occurs\n@throws java.lang.IllegalArgumentException if mediaType is not binary",
"Returns true if the given dump file type contains page revisions and\nfalse if it does not. Dumps that do not contain pages are for auxiliary\ninformation such as linked sites.\n\n@param dumpContentType\nthe type of dump\n@return true if the dumpfile contains revisions\n@throws IllegalArgumentException\nif the given dump file type is not known",
"Gen job id.\n\n@return the string"
] |
private int getCostRateTableEntryIndex(Date date)
{
int result = -1;
CostRateTable table = getCostRateTable();
if (table != null)
{
if (table.size() == 1)
{
result = 0;
}
else
{
result = table.getIndexByDate(date);
}
}
return result;
} | [
"Retrieves the index of a cost rate table entry active on a given date.\n\n@param date target date\n@return cost rate table entry index"
] | [
"Returns the resource bundle for current Locale, i.e. locale set in the PageComponent.\nAlways create a new instance, this avoids getting the incorrect locale information.\n\n@return resourcebundle for internationalized messages",
"Do some magic to turn request parameters into a context object",
"Retrieves child nodes from a directory entry.\n\n@param parent parent directory entry\n@return list of child nodes",
"Flips the output buffer, and lets the Selector know we're ready to write.\n\n@param selectionKey",
"Assign FK value of main object with PK values of the reference object.\n\n@param obj real object with reference (proxy) object (or real object with set FK values on insert)\n@param cld {@link ClassDescriptor} of the real object\n@param rds An {@link ObjectReferenceDescriptor} of real object.\n@param insert Show if \"linking\" is done while insert or update.",
"Alias accessor provided for JSON serialization only",
"Selects a specific vertex and fragment shader to use for rendering.\n\nIf a shader template has been specified, it is used to generate\na vertex and fragment shader based on mesh attributes, bound textures\nand light sources. If the textures bound to the material are changed\nor a new light source is added, this function must be called again\nto select the appropriate shaders. This function may cause recompilation\nof shaders which is quite slow.\n\n@param scene scene being rendered\n@see GVRShaderTemplate GVRMaterialShader.getShaderType",
"convert a param object to a multimap.\n\n@param objectParams the parameters to convert.\n@return the corresponding Multimap.",
"Renames the current base log file to the roll file name.\n\n@param from\nThe current base log file.\n@param to\nThe backup file."
] |
public void setKnots(int[] x, int[] rgb, byte[] types) {
numKnots = rgb.length+2;
xKnots = new int[numKnots];
yKnots = new int[numKnots];
knotTypes = new byte[numKnots];
if (x != null)
System.arraycopy(x, 0, xKnots, 1, numKnots-2);
else
for (int i = 1; i > numKnots-1; i++)
xKnots[i] = 255*i/(numKnots-2);
System.arraycopy(rgb, 0, yKnots, 1, numKnots-2);
if (types != null)
System.arraycopy(types, 0, knotTypes, 1, numKnots-2);
else
for (int i = 0; i > numKnots; i++)
knotTypes[i] = RGB|SPLINE;
sortKnots();
rebuildGradient();
} | [
"Set the values of all the knots.\nThis version does not require the \"extra\" knots at -1 and 256\n@param x the knot positions\n@param rgb the knot colors\n@param types the knot types"
] | [
"Add a dependency task item for this model.\n\n@param dependency the dependency task item.\n@return key to be used as parameter to taskResult(string) method to retrieve result the task item",
"Use this API to fetch authenticationvserver_binding resource of given name .",
"Populates a resource availability table.\n\n@param table resource availability table\n@param data file data",
"Returns a fine-grained word shape classifier, that equivalence classes\nlower and upper case and digits, and collapses sequences of the\nsame type, but keeps all punctuation. This adds an extra recognizer\nfor a greek letter embedded in the String, which is useful for bio.",
"Handles retrieval of primitive char type.\n\n@param field required field\n@param defaultValue default value if field is missing\n@return char value",
"1-D Forward Discrete Hartley Transform.\n\n@param data Data.",
"Set a bean in the context.\n\n@param name bean name\n@param object bean value",
"Starts a background thread which calls the controller every\ncheck_interval milliseconds. Returns immediately, leaving the\nbackground thread running.",
"Processes the template for all foreignkeys of the current table.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\""
] |
public BufferedImage getNewImageInstance() {
BufferedImage buf = new BufferedImage(image.getWidth(), image.getHeight(), image.getType());
buf.setData(image.getData());
return buf;
} | [
"Return a new instance of the BufferedImage\n\n@return BufferedImage"
] | [
"Creates a clone using java serialization\n\n@param from Object to be cloned\n@param <T> type of the cloned object\n@return Clone of the object",
"Use this API to fetch aaagroup_aaauser_binding resources of given name .",
"The metadata cache can become huge over time. This simply flushes it periodically.",
"Returns PatternParser used to parse the conversion string. Subclasses may\noverride this to return a subclass of PatternParser which recognize\ncustom conversion characters.\n\n@since 0.9.0",
"Validates operation model against the definition and its parameters\n\n@param operation model node of type {@link ModelType#OBJECT}, representing an operation request\n@throws OperationFailedException if the value is not valid\n\n@deprecated Not used by the WildFly management kernel; will be removed in a future release",
"If the workspace for your project _is_ an organization, you must also\nsupply a `team` to share the project with.\n\nReturns the full record of the newly created project.\n\n@param workspace The workspace or organization to create the project in.\n@return Request object",
"Skip to the next matching short value.\n\n@param buffer input data array\n@param offset start offset into the input array\n@param value value to match\n@return offset of matching pattern",
"Use this API to rename a cmppolicylabel resource.",
"Renders in LI tags, Wraps with UL tags optionally."
] |
static void logConnectionException(URI uri, DiscoveryOption discoveryOption, boolean moreOptions, Exception e) {
if (uri == null) {
HostControllerLogger.ROOT_LOGGER.failedDiscoveringMaster(discoveryOption, e);
} else {
HostControllerLogger.ROOT_LOGGER.cannotConnect(uri, e);
}
if (!moreOptions) {
// All discovery options have been exhausted
HostControllerLogger.ROOT_LOGGER.noDiscoveryOptionsLeft();
}
} | [
"Handles logging tasks related to a failure to connect to a remote HC.\n@param uri the URI at which the connection attempt was made. Can be {@code null} indicating a failure to discover the HC\n@param discoveryOption the {@code DiscoveryOption} used to determine {@code uri}\n@param moreOptions {@code true} if there are more untried discovery options\n@param e the exception"
] | [
"decides which icon to apply or hide this view\n\n@param imageHolder\n@param imageView\n@param iconColor\n@param tint",
"Given a list of store definitions return a set of store names\n\n@param storeDefList The list of store definitions\n@return Returns a set of store names",
"Check whether the patch can be applied to a given target.\n\n@param condition the conditions\n@param target the target\n@throws PatchingException",
"build the Join-Information for Subclasses having a super reference to this class\n\n@param left\n@param cld\n@param name",
"Add a raw statement as part of the where that can be anything that the database supports. Using more structured\nmethods is recommended but this gives more control over the query and allows you to utilize database specific\nfeatures.\n\n@param rawStatement\nThe statement that we should insert into the WHERE.\n\n@param args\nOptional arguments that correspond to any ? specified in the rawStatement. Each of the arguments must\nhave either the corresponding columnName or the sql-type set. <b>WARNING,</b> you cannot use the\n{@code SelectArg(\"columnName\")} constructor since that sets the _value_, not the name. Use\n{@code new SelectArg(\"column-name\", null);}.",
"Checks whether the given field definition is used as the primary key of a class referenced by\na reference.\n\n@param modelDef The model\n@param fieldDef The current field descriptor def\n@return The reference that uses the field or <code>null</code> if the field is not used in this way",
"Checks that arguments and parameter types match.\n@param params method parameters\n@param args type arguments\n@return -1 if arguments do not match, 0 if arguments are of the exact type and >0 when one or more argument is\nnot of the exact type but still match",
"Returns the name of the class to be instantiated.\n@param rs the Resultset\n@return null if the column is not available",
"Takes a string of the form \"x1=y1,x2=y2,...\" and returns Map\n@param map A string of the form \"x1=y1,x2=y2,...\"\n@return A Map m is returned such that m.get(xn) = yn"
] |
public boolean isConnectionHandleAlive(ConnectionHandle connection) {
Statement stmt = null;
boolean result = false;
boolean logicallyClosed = connection.logicallyClosed.get();
try {
connection.logicallyClosed.compareAndSet(true, false); // avoid checks later on if it's marked as closed.
String testStatement = this.config.getConnectionTestStatement();
ResultSet rs = null;
if (testStatement == null) {
// Make a call to fetch the metadata instead of a dummy query.
rs = connection.getMetaData().getTables( null, null, KEEPALIVEMETADATA, METADATATABLE );
} else {
stmt = connection.createStatement();
stmt.execute(testStatement);
}
if (rs != null) {
rs.close();
}
result = true;
} catch (SQLException e) {
// connection must be broken!
result = false;
} finally {
connection.logicallyClosed.set(logicallyClosed);
connection.setConnectionLastResetInMs(System.currentTimeMillis());
result = closeStatement(stmt, result);
}
return result;
} | [
"Sends a dummy statement to the server to keep the connection alive\n@param connection Connection handle to perform activity on\n@return true if test query worked, false otherwise"
] | [
"Find and unmarshal all test suite files in given directories.\n\n@throws IOException if any occurs.\n@see #unmarshal(File)",
"2-D Forward Discrete Cosine Transform.\n\n@param data Data.",
"Extract definition records from the table and divide into groups.",
"Resolve the disposal method for the given producer method. Any resolved\nbeans will be marked as such for the purpose of validating that all\ndisposal methods are used. For internal use.\n\n@param types the types\n@param qualifiers The binding types to match\n@param declaringBean declaring bean\n@return The set of matching disposal methods",
"Gets Widget bounds height\n@return height",
"Calculates the LatLong position of the end point of a line the specified\ndistance from this LatLong, along the provided bearing, where North is 0,\nEast is 90 etc.\n\n@param bearing The bearing, in degrees, with North as 0, East as 90 etc.\n@param distance The distance in metres.\n@return A new LatLong indicating the end point.",
"Sets the occurence.\n\n@param min the min\n@param max the max\n@throws ParseException the parse exception",
"Runs the print.\n\n@param args the cli arguments\n@throws Exception",
"Append field with quotes and escape characters added in the key, if required.\nThe value is added without quotes and any escape characters.\n\n@return this"
] |
public static ModelNode createBootUpdates(final String serverName, final ModelNode domainModel, final ModelNode hostModel,
final DomainController domainController, final ExpressionResolver expressionResolver) {
final ManagedServerOperationsFactory factory = new ManagedServerOperationsFactory(serverName, domainModel,
hostModel, domainController, expressionResolver);
return factory.getBootUpdates();
} | [
"Create a list of operations required to a boot a managed server.\n\n@param serverName the server name\n@param domainModel the complete domain model\n@param hostModel the local host model\n@param domainController the domain controller\n@return the list of boot operations"
] | [
"Read resource assignment data from a PEP file.",
"Create the index file that sets up the frameset.\n@param outputDirectory The target directory for the generated file(s).",
"Returns values aggregated from all the delegates, without overriding\nvalues that already exist.\n\n@return The Map of aggregated values",
"Returns a string representation of map of chunk id to number of chunks\n\n@return String of map of chunk id to number of chunks",
"Introspect the given object.\n\n@param obj object for introspection.\n\n@return a map containing object's field values.\n\n@throws IntrospectionException if an exception occurs during introspection\n@throws InvocationTargetException if property getter throws an exception\n@throws IllegalAccessException if property getter is inaccessible",
"Specifies convergence criteria\n\n@param maxIterations Maximum number of iterations\n@param ftol convergence based on change in function value. try 1e-12\n@param gtol convergence based on residual magnitude. Try 1e-12",
"Set the value of a field using its alias.\n\n@param alias field alias\n@param value field value",
"Adds a \"Post Run\" task to the collection.\n\n@param taskItem the \"Post Run\" task",
"Check the variable name and if not set, set it with the singleton variable name being on the top of the stack."
] |
void gc() {
if (stopped) {
return;
}
long expirationTime = System.currentTimeMillis() - timeout;
for (Iterator<Map.Entry<InputStreamKey, TimedStreamEntry>> iter = streamMap.entrySet().iterator(); iter.hasNext();) {
if (stopped) {
return;
}
Map.Entry<InputStreamKey, TimedStreamEntry> entry = iter.next();
TimedStreamEntry timedStreamEntry = entry.getValue();
if (timedStreamEntry.timestamp.get() <= expirationTime) {
iter.remove();
InputStreamKey key = entry.getKey();
//noinspection SynchronizationOnLocalVariableOrMethodParameter
synchronized (timedStreamEntry) { // ensure there's no race with a request that got a ref before we removed it
closeStreamEntry(timedStreamEntry, key.requestId, key.index);
}
}
}
} | [
"Close and remove expired streams. Package protected to allow unit tests to invoke it."
] | [
"Use this API to fetch nslimitselector resource of given name .",
"Store the given data and return a uuid for later retrieval of the data\n\n@param data\n@return unique id for the stored data",
"Returns a PreparedStatementCreator that returns a count of the rows that\nthis creator would return.\n\n@param dialect\nDatabase dialect.",
"Process an update packet from one of the CDJs. See if it has a valid track loaded; if not, clear any\nmetadata we had stored for that player. If so, see if it is the same track we already know about; if not,\nrequest the metadata associated with that track.\n\nAlso clears out any metadata caches that were attached for slots that no longer have media mounted in them,\nand updates the sets of which players have media mounted in which slots.\n\nIf any of these reflect a change in state, any registered listeners will be informed.\n\n@param update an update packet we received from a CDJ",
"Expensive. Creates the plan for the specific settings.",
"Return an artifact regarding its gavc\n\n@param gavc String\n@return DbArtifact",
"Overridden method always creating a new instance\n\n@param contextual The bean to create\n@param creationalContext The creation context",
"Use this API to update lbsipparameters.",
"Get the spin scripting environment\n\n@param language the language name\n@return the environment script as string or null if the language is\nnot in the set of languages supported by spin."
] |
public void updateMetadataVersions() {
Properties versionProps = MetadataVersionStoreUtils.getProperties(this.systemStoreRepository.getMetadataVersionStore());
Long newVersion = fetchNewVersion(SystemStoreConstants.CLUSTER_VERSION_KEY,
null,
versionProps);
if(newVersion != null) {
this.currentClusterVersion = newVersion;
}
} | [
"Fetch the latest versions for cluster metadata"
] | [
"Use this API to convert sslpkcs8.",
"Obtain collection of Parameters from request\n\n@param dataArray request parameters\n@return Map of parameters\n@throws Exception exception",
"This method retrieves an integer of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required integer data",
"Create a random permutation of the numbers 0, ..., size - 1.\n\nsee Algorithm P, D.E. Knuth: The Art of Computer Programming, Vol. 2, p. 145",
"width of input section",
"I pulled this out of internal store so that when doing multiple table\ninheritance, i can recurse this function.\n\n@param obj\n@param cld\n@param oid BRJ: what is it good for ???\n@param insert\n@param ignoreReferences",
"Checks if a parameter exists. If it exists, it is updated. If it doesn't, it is created. Only works for parameters which key is\nunique. Will create a transaction on the given entity manager.",
"Checks whether two internet addresses are on the same subnet.\n\n@param prefixLength the number of bits within an address that identify the network\n@param address1 the first address to be compared\n@param address2 the second address to be compared\n\n@return true if both addresses share the same network bits",
"Roll back to the previous configuration.\n\n@throws GeomajasException\nindicates an unlikely problem with the rollback (see cause)"
] |
private String getRelativePomPath(MavenModule mavenModule, MavenModuleSetBuild mavenBuild) {
String relativePath = mavenModule.getRelativePath();
if (StringUtils.isBlank(relativePath)) {
return POM_NAME;
}
// If this is the root module, return the root pom path.
if (mavenModule.getModuleName().toString().
equals(mavenBuild.getProject().getRootModule().getModuleName().toString())) {
return mavenBuild.getProject().getRootPOM(null);
}
// to remove the project folder name if exists
// keeps only the name of the module
String modulePath = relativePath.substring(relativePath.indexOf("/") + 1);
for (String moduleName : mavenModules) {
if (moduleName.contains(modulePath)) {
return createPomPath(relativePath, moduleName);
}
}
// In case this module is not in the parent pom
return relativePath + "/" + POM_NAME;
} | [
"Retrieve the relative path to the pom of the module"
] | [
"Calculate start dates for a yearly absolute recurrence.\n\n@param calendar current date\n@param dates array of start dates",
"Use this API to update Interface resources.",
"Use this API to unset the properties of filterhtmlinjectionparameter resource.\nProperties that need to be unset are specified in args array.",
"Read JdbcConnectionDescriptors from the given repository file.\n\n@see #mergeConnectionRepository",
"Bessel function of order n.\n\n@param n Order.\n@param x Value.\n@return J value.",
"Returns true if required properties for FluoClient are set",
"Determines if this connection's access token has expired and needs to be refreshed.\n@return true if the access token needs to be refreshed; otherwise false.",
"Returns the screen height in pixels\n\n@param context is the context to get the resources\n@return the screen height in pixels",
"Resolves the configuration.\n\n@param config The specified configuration.\n@return The resolved configuration."
] |
private boolean setAvailable(NodeStatus nodeStatus, boolean isAvailable) {
synchronized(nodeStatus) {
boolean previous = nodeStatus.isAvailable();
nodeStatus.setAvailable(isAvailable);
nodeStatus.setLastChecked(getConfig().getTime().getMilliseconds());
return previous;
}
} | [
"We need to distinguish the case where we're newly available and the case\nwhere we're already available. So we check the node status before we\nupdate it and return it to the caller.\n\n@param isAvailable True to set to available, false to make unavailable\n\n@return Previous value of isAvailable"
] | [
"Returns s if it's at most maxWidth chars, otherwise chops right side to fit.",
"Check if new license pattern is valid and doesn't match any existing one\n@param newComer License being added or edited\n@throws WebApplicationException if conflicts involving the newComer are detected",
"Use this API to add dnsaaaarec.",
"Derives the OJB platform to use for a database that is connected via a url using the specified\nsubprotocol, and where the specified jdbc driver is used.\n\n@param jdbcSubProtocol The JDBC subprotocol used to connect to the database\n@param jdbcDriver The JDBC driver used to connect to the database\n@return The platform identifier or <code>null</code> if no platform could be found",
"Check from another ConcurrentGroupServerUpdatePolicy whose plans are meant to\nexecute once this policy's plans are successfully completed.\n\n@return <code>true</code> if the successor can proceed",
"Given the histogram of columns compute the col_idx for the matrix. nz_length is automatically set and\nnz_values will grow if needed.\n@param histogram histogram of column values in the sparse matrix. modified, see above.",
"Get the list of active tasks from the server.\n\n@return List of tasks\n@see <a href=\"https://console.bluemix.net/docs/services/Cloudant/api/active_tasks.html\">\nActive tasks</a>",
"Read all task relationships from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file",
"Flushes all changes to disk."
] |
public static vridparam get(nitro_service service) throws Exception{
vridparam obj = new vridparam();
vridparam[] response = (vridparam[])obj.get_resources(service);
return response[0];
} | [
"Use this API to fetch all the vridparam resources that are configured on netscaler."
] | [
"state chain management ops below",
"Remove a tag from a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param tagId\nThe tag ID\n@throws FlickrException",
"Send ourselves \"updates\" about any tracks that were loaded before we started, since we missed them.",
"This method extracts data for a single calendar from a Phoenix file.\n\n@param calendar calendar data",
"Convert the Phoenix representation of a duration into a Duration instance.\n\n@param value Phoenix duration\n@return Duration instance",
"Convert Day instance to MPX day index.\n\n@param day Day instance\n@return day index",
"Use this API to fetch authenticationradiuspolicy_vpnvserver_binding resources of given name .",
"Use this API to add transformpolicy.",
"Remove any protocol-level headers from the clients request that\ndo not apply to the new request we are sending to the remote server.\n\n@param request\n@param destination"
] |
List<MwDumpFile> findDumpsOnline(DumpContentType dumpContentType) {
List<String> dumpFileDates = findDumpDatesOnline(dumpContentType);
List<MwDumpFile> result = new ArrayList<>();
for (String dateStamp : dumpFileDates) {
if (dumpContentType == DumpContentType.DAILY) {
result.add(new WmfOnlineDailyDumpFile(dateStamp,
this.projectName, this.webResourceFetcher,
this.dumpfileDirectoryManager));
} else if (dumpContentType == DumpContentType.JSON) {
result.add(new JsonOnlineDumpFile(dateStamp, this.projectName,
this.webResourceFetcher, this.dumpfileDirectoryManager));
} else {
result.add(new WmfOnlineStandardDumpFile(dateStamp,
this.projectName, this.webResourceFetcher,
this.dumpfileDirectoryManager, dumpContentType));
}
}
logger.info("Found " + result.size() + " online dumps of type "
+ dumpContentType + ": " + result);
return result;
} | [
"Finds out which dump files of the given type are available for download.\nThe result is a list of objects that describe the available dump files,\nin descending order by their date. Not all of the dumps included might be\nactually available.\n\n@return list of objects that provide information on available full dumps"
] | [
"Convert the integer representation of a duration value and duration units\ninto an MPXJ Duration instance.\n\n@param properties project properties, used for duration units conversion\n@param durationValue integer duration value\n@param unitsValue integer units value\n@return Duration instance",
"Retrieve the state object associated with the specified interceptor instance and property\nname on this request context.\n\n@param interceptor the interceptor instance\n@param stateName the name key that the state object was stored under\n@param stateType class of the type the stored state should be returned as\n@param <T> the type the stored state should be returned as\n@return the stored state object\n@see #setState(HttpConnectionInterceptor, String, Object)\n@since 2.6.0",
"Returns with a view of all scopes known by this manager.",
"Returns the value of the primitive type from the given string value.\n\n@param value the value to parse\n@param cls the primitive type class\n@return the boxed type value or {@code null} if the given class is not a primitive type",
"If the Authtoken was already created in a separate program but not saved to file.\n\n@param authToken\n@param tokenSecret\n@param username\n@return\n@throws IOException",
"Use this API to fetch vlan_interface_binding resources of given name .",
"Sets the ssh priv key relative path.\nNote that must be relative path for now.\nThis default to no need of passphrase for the private key.\nWill also auto set the login type to key based.\n\n@param privKeyRelativePath\nthe priv key relative path\n@return the parallel task builder",
"Generates a change event for a local update of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@param update the update specifier.\n@return a change event for a local update of a document in the given namespace referring\nto the given document _id.",
"Tests if this enumeration contains more elements.\n@return <code>true</code> if and only if this enumeration object\ncontains at least one more element to provide;\n<code>false</code> otherwise."
] |
private void maybeUpdateScrollbarPositions() {
if (!isAttached()) {
return;
}
if (m_scrollbar != null) {
int vPos = getVerticalScrollPosition();
if (m_scrollbar.getVerticalScrollPosition() != vPos) {
m_scrollbar.setVerticalScrollPosition(vPos);
}
}
} | [
"Synchronize the scroll positions of the scrollbars with the actual scroll\nposition of the content."
] | [
"Decomposes the matrix using the QR algorithm. Care was taken to minimize unnecessary memory copying\nand cache skipping.\n\n@param orig The matrix which is being decomposed. Not modified.\n@return true if it decomposed the matrix or false if an error was detected. This will not catch all errors.",
"Convert this lattice to store data in the given convention.\nConversion involving receiver premium assumes zero wide collar.\n\n@param targetConvention The convention to store the data in.\n@param displacement The displacement to use, if applicable.\n@param model The model for context.\n\n@return The converted lattice.",
"Sets the current collection definition derived from the current member, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the collection as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\ncollection on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe collection\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\ncollection\"\[email protected] name=\"collection-class\" optional=\"true\" description=\"The type of the collection if not a\njava.util type or an array\"\[email protected] name=\"database-foreignkey\" optional=\"true\" description=\"Whether a database foreignkey shall be created\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the collection\"\[email protected] name=\"element-class-ref\" optional=\"true\" description=\"The fully qualified name of\nthe element type\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The name of the\nforeign keys (columns when an indirection table is given)\"\[email protected] name=\"foreignkey-documentation\" optional=\"true\" description=\"Documentation\non the foreign keys as a comma-separated list if using an indirection table\"\[email protected] name=\"indirection-table\" optional=\"true\" description=\"The name of the indirection\ntable for m:n associations\"\[email protected] name=\"indirection-table-documentation\" optional=\"true\" description=\"Documentation\non the indirection table\"\[email protected] name=\"indirection-table-primarykeys\" optional=\"true\" description=\"Whether the\nfields referencing the collection and element classes, should also be primarykeys\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the collection is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the collection\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"query-customizer\" optional=\"true\" description=\"The query customizer for this collection\"\[email protected] name=\"query-customizer-attributes\" optional=\"true\" description=\"Attributes for the query customizer\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\ncollection\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The name of the\nforeign key columns pointing to the elements if using an indirection table\"\[email protected] name=\"remote-foreignkey-documentation\" optional=\"true\" description=\"Documentation\non the remote foreign keys as a comma-separated list if using an indirection table\"",
"Remove the realm name block.\n\n@see PropertiesFileLoader#addLineContent(java.io.BufferedReader, java.util.List, String)",
"Writes the timephased data for a resource assignment.\n\n@param mpx MPXJ assignment\n@param xml MSDPI assignment",
"Returns the name under which this dump file. This is the name used online\nand also locally when downloading the file.\n\n@param dumpContentType\nthe type of the dump\n@param projectName\nthe project name, e.g. \"wikidatawiki\"\n@param dateStamp\nthe date of the dump in format YYYYMMDD\n@return file name string",
"Deletes a user from an enterprise account.\n@param notifyUser whether or not to send an email notification to the user that their account has been deleted.\n@param force whether or not this user should be deleted even if they still own files.",
"Finds the last entry of the address list and returns it as a property.\n\n@param address the address to get the last part of\n\n@return the last part of the address\n\n@throws IllegalArgumentException if the address is not of type {@link ModelType#LIST} or is empty",
"legacy helper for setting background"
] |
protected Iterable<URI> getTargetURIs(final EObject primaryTarget) {
final TargetURIs result = targetURIsProvider.get();
uriCollector.add(primaryTarget, result);
return result;
} | [
"Returns with an iterable of URIs that points to all elements that are\nreferenced by the argument or vice-versa.\n\n@return an iterable of URIs that are referenced by the argument or the\nother way around."
] | [
"This may cost twice what it would in the original Map.\n\n@param key key whose associated value is to be returned.\n@return the value to which this map maps the specified key, or\n<tt>null</tt> if the map contains no mapping for this key.",
"Checks whether the compilation has been canceled and reports the given progress to the compiler progress.",
"Read multiple columns from a block.\n\n@param startIndex start of the block\n@param blockLength length of the block",
"Register the given callback as to be executed after request completion.\n\n@param name The name of the bean.\n@param callback The callback of the bean to be executed for destruction.",
"Recovers the state of synchronization in case a system failure happened. The goal is to revert\nto a known, good state.",
"Use this API to fetch appqoepolicy resource of given name .",
"Returns the project membership record.\n\n@param projectMembership Globally unique identifier for the project membership.\n@return Request object",
"Use this API to fetch a responderglobal_responderpolicy_binding resources.",
"Validates a space separated list of emails.\n\n@param emails Space separated list of emails\n@return {@link hudson.util.FormValidation.ok()} if valid or empty, error otherwise"
] |
public static final FieldType getInstance(int fieldID)
{
FieldType result;
int prefix = fieldID & 0xFFFF0000;
int index = fieldID & 0x0000FFFF;
switch (prefix)
{
case MPPTaskField.TASK_FIELD_BASE:
{
result = MPPTaskField.getInstance(index);
if (result == null)
{
result = getPlaceholder(TaskField.class, index);
}
break;
}
case MPPResourceField.RESOURCE_FIELD_BASE:
{
result = MPPResourceField.getInstance(index);
if (result == null)
{
result = getPlaceholder(ResourceField.class, index);
}
break;
}
case MPPAssignmentField.ASSIGNMENT_FIELD_BASE:
{
result = MPPAssignmentField.getInstance(index);
if (result == null)
{
result = getPlaceholder(AssignmentField.class, index);
}
break;
}
case MPPConstraintField.CONSTRAINT_FIELD_BASE:
{
result = MPPConstraintField.getInstance(index);
if (result == null)
{
result = getPlaceholder(ConstraintField.class, index);
}
break;
}
default:
{
result = getPlaceholder(null, index);
break;
}
}
return result;
} | [
"Retrieve a FieldType instance based on an ID value from\nan MPP9 or MPP12 file.\n\n@param fieldID field ID\n@return FieldType instance"
] | [
"Remove the report directory.",
"Throws one RendererException if the viewType, layoutInflater or parent are null.",
"Creates a scheduled thread pool where each thread has the daemon\nproperty set to true. This allows the program to quit without\nexplicitly calling shutdown on the pool\n\n@param corePoolSize the number of threads to keep in the pool,\neven if they are idle\n\n@return a newly created scheduled thread pool",
"create partitions in the broker\n\n@param topic topic name\n@param partitionNum partition numbers\n@param enlarge enlarge partition number if broker configuration has\nsetted\n@return partition number in the broker\n@throws IOException if an I/O error occurs",
"A loop driver for applying operations to all primary ClassNodes in\nour AST. Automatically skips units that have already been processed\nthrough the current phase.",
"Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,\nunless we have a metadata cache available for the specified media slot, in which case that will be used instead.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n\n@return the metadata, if any",
"Adds a file to your assembly but automatically genarates the name of the file.\n\n@param inputStream {@link InputStream} the file to be uploaded.",
"Convert a url to a file object. No checks are made to see if file exists but there are some hacks that\nare needed to convert uris to files across platforms.\n\n@param fileURI the uri to convert",
"Updates the value in HashMap and writeBack as Atomic step"
] |
public static Artifact withArtifactId(String artifactId)
{
Artifact artifact = new Artifact();
artifact.artifactId = new RegexParameterizedPatternParser(artifactId);
return artifact;
} | [
"Start with specifying the artifactId"
] | [
"Generates a file of random data in a format suitable for the DIEHARD test.\nDIEHARD requires 3 million 32-bit integers.\n@param rng The random number generator to use to generate the data.\n@param outputFile The file that the random data is written to.\n@throws IOException If there is a problem writing to the file.",
"Adds one or several attributes to facet on for the next queries.\n\n@param attributes one or more attribute names.\n@return this {@link Searcher} for chaining.",
"Sets the replacement var map.\n\n@param replacementVarMap\nthe replacement var map\n@return the parallel task builder",
"All the sub-level attributes.\n\n@param name the attribute name.\n@param attribute the attribute.",
"Sends out the SQL as defined in the config upon first init of the connection.\n@param connection\n@param initSQL\n@throws SQLException",
"Return the IP address as text such as \"192.168.1.15\".",
"Returns a string array of the methods loaded for a class\n\n@param pluginClass name of class\n@return string array of the methods loaded for the class\n@throws Exception exception",
"Used by TracedParallelBatch where its used to wrap a TraceContext and puts it in the\nregistry for the forked execution. This is marked deprecated as we prefer not to\nexpose details of the RatpackCurrentTraceContext implementation.\n\n@param traceContext a trace context.\n@return a holder for the trace context, which can be put into the registry.",
"Perform the merge\n\n@param stereotypeAnnotations The stereotype annotations"
] |
public AsciiTable setCharTranslator(CharacterTranslator charTranslator) {
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setCharTranslator(charTranslator);
}
}
return this;
} | [
"Sets the character translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTranslator translator\n@return this to allow chaining"
] | [
"Given a resource field name, this method returns the resource field number.\n\n@param field resource field name\n@return resource field number",
"Finds the file at the provided path within the archive.\n\nEg, getChildFile(ArchiveModel, \"/META-INF/MANIFEST.MF\") will return a {@link FileModel} if a file named\n/META-INF/MANIFEST.MF exists within the archive\n\n@return Returns the located {@link FileModel} or null if no file with this path could be located",
"Gets an overrideID for a class name, method name\n\n@param className name of class\n@param methodName name of method\n@return override ID of method",
"Handles the cases in which we can use longs rather than BigInteger\n\n@param section\n@param increment\n@param addrCreator\n@param lowerProducer\n@param upperProducer\n@param prefixLength\n@return",
"Use this API to add nssimpleacl.",
"Use this API to add sslocspresponder.",
"Fills the Boyer Moore \"bad character array\" for the given pattern",
"Loads the columns for this table into the alChildren list.",
"Fetch JSON from RAW resource\n\n@param context Context\n@param resource Resource int of the RAW file\n@return JSON"
] |
private String generateAbbreviatedExceptionMessage(final Throwable throwable) {
final StringBuilder builder = new StringBuilder();
builder.append(": ");
builder.append(throwable.getClass().getCanonicalName());
builder.append(": ");
builder.append(throwable.getMessage());
Throwable cause = throwable.getCause();
while (cause != null) {
builder.append('\n');
builder.append("Caused by: ");
builder.append(cause.getClass().getCanonicalName());
builder.append(": ");
builder.append(cause.getMessage());
// make sure the exception cause is not itself to prevent infinite
// looping
assert (cause != cause.getCause());
cause = (cause == cause.getCause() ? null : cause.getCause());
}
return builder.toString();
} | [
"Method generates abbreviated exception message.\n\n@param message\nOriginal log message\n@param throwable\nThe attached throwable\n@return Abbreviated exception message"
] | [
"Generate the next permutation and return a list containing\nthe elements in the appropriate order.\n@see #nextPermutationAsList(java.util.List)\n@see #nextPermutationAsArray()\n@return The next permutation as a list.",
"Formats the supplied value using the specified DateTimeFormat.\n\n@return \"\" if the value is null",
"Expects a height mat as input\n\n@param input - A grayscale height map\n@return edges",
"Returns the link for the given workplace resource.\n\nThis should only be used for resources under /system or /shared.<p<\n\n@param cms the current OpenCms user context\n@param resourceName the resource to generate the online link for\n@param forceSecure forces the secure server prefix\n\n@return the link for the given resource",
"Reads a nested table. Uses the supplied reader class instance.\n\n@param readerClass reader class instance\n@return table rows",
"Return a licenses view of the targeted module\n\n@param moduleId String\n@return List<DbLicense>",
"Add a single exception to a calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param date calendar exception",
"Return true if the connection being released is the one that has been saved.",
"Restores a trashed file to a new location with a new name.\n@param fileID the ID of the trashed file.\n@param newName an optional new name to give the file. This can be null to use the file's original name.\n@param newParentID an optional new parent ID for the file. This can be null to use the file's original\nparent.\n@return info about the restored file."
] |
public AT_Row setPaddingTopChar(Character paddingTopChar) {
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setPaddingTopChar(paddingTopChar);
}
}
return this;
} | [
"Sets the top padding character for all cells in the row.\n@param paddingTopChar new padding character, ignored if null\n@return this to allow chaining"
] | [
"Send message to all connections of a certain user\n\n@param message the message to be sent\n@param username the username\n@return this context",
"20130512 Converts the sdsm string generated above to Date format.\n\n@param str\nthe str\n@return the date from concise str",
"This is pretty ugly. We end up mimicking the request logic here, so this\nneeds to stay in sync with handleRequest.",
"Initialize new instance\n@param instance\n@param logger\n@param auditor",
"Send a media details response to all registered listeners.\n\n@param details the response that has just arrived",
"Set the degrees of rotation. Value will be set to -1, if not available.\n\n@param rotation",
"Get the named method from the class\n\n@param c The class to get the method from\n@param name The method name\n@param argTypes The argument types\n@return The method",
"Consumer is required to do any privilege checks before getting here\n\n@param request a {@link HttpServletRequest} which may contain forced groups parameters from URL, Header or Cookie.\n@return a map of test names to bucket values specified by the request. Returns an empty {@link Map} if nothing was specified",
"Gets the actual type arguments of a class\n\n@param clazz The class to examine\n@return The type arguments"
] |
public <T> Map<String, List<T>> queryGroups(String query, Class<T> classOfT) {
InputStream instream = null;
try {
Reader reader = new InputStreamReader(instream = queryForStream(query), "UTF-8");
JsonObject json = new JsonParser().parse(reader).getAsJsonObject();
Map<String, List<T>> result = new LinkedHashMap<String, List<T>>();
if (json.has("groups")) {
for (JsonElement e : json.getAsJsonArray("groups")) {
String groupName = e.getAsJsonObject().get("by").getAsString();
List<T> orows = new ArrayList<T>();
if (!includeDocs) {
log.warning("includeDocs set to false and attempting to retrieve doc. " +
"null object will be returned");
}
for (JsonElement rows : e.getAsJsonObject().getAsJsonArray("rows")) {
orows.add(jsonToObject(client.getGson(), rows, "doc", classOfT));
}
result.put(groupName, orows);
}// end for(groups)
}// end hasgroups
else {
log.warning("No grouped results available. Use query() if non grouped query");
}
return result;
} catch (UnsupportedEncodingException e1) {
// This should never happen as every implementation of the java platform is required
// to support UTF-8.
throw new RuntimeException(e1);
} finally {
close(instream);
}
} | [
"Queries a Search Index and returns grouped results in a map where key\nof the map is the groupName. In case the query didnt use grouping,\nan empty map is returned\n\n@param <T> Object type T\n@param query the Lucene query to be passed to the Search index\n@param classOfT The class of type T\n@return The result of the grouped search query as a ordered {@code Map<String,T> }"
] | [
"Returns the full record for a single team.\n\n@param team Globally unique identifier for the team.\n@return Request object",
"Copied from original SeleniumProxyHandler\nChanged SslRelay to SslListener and getSslRelayOrCreateNew to getSslRelayOrCreateNewOdo\nNo other changes to the function\n\n@param pathInContext\n@param pathParams\n@param request\n@param response\n@throws HttpException\n@throws IOException",
"Adds any listeners attached to this reader to the reader created internally.\n\n@param reader internal project reader",
"Turn json string into map\n\n@param json\n@return",
"Get a property as a string or defaultValue.\n\n@param key the property name\n@param defaultValue the default value",
"Find documents using an index\n\n@param selectorJson String representation of a JSON object describing criteria used to\nselect documents. For example:\n{@code \"{ \\\"selector\\\": {<your data here>} }\"}.\n@param classOfT The class of Java objects to be returned\n@param <T> the type of the Java object to be returned\n@return List of classOfT objects\n@see #findByIndex(String, Class, FindByIndexOptions)\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/cloudant_query.html#selector-syntax\"\ntarget=\"_blank\">selector syntax</a>\n@deprecated Use {@link #query(String, Class)} instead",
"Determines whether the given type is an array type.\n\n@param type the given type\n@return true if the given type is a subclass of java.lang.Class or implements GenericArrayType",
"Generate the specified output file by merging the specified\nVelocity template with the supplied context.",
"Get a list of comments made for a particular entity\n\n@param entityId - id of the commented entity\n@param entityType - type of the entity\n@return list of comments"
] |
public static cachepolicylabel[] get(nitro_service service) throws Exception{
cachepolicylabel obj = new cachepolicylabel();
cachepolicylabel[] response = (cachepolicylabel[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the cachepolicylabel resources that are configured on netscaler."
] | [
"Read relationship data from a PEP file.",
"Converts an image to a RGBA direct color model using a workaround via buffered image directly calling the\nColorConvert operation fails for unknown reasons ?!\n\n@param img image to convert\n@return converted image",
"ceiling for clipped RELU, alpha for ELU",
"Writes the object to the specified document, optionally creating a child\nelement. The object in this case should be a point.\n\n@param o the object (of type Point).\n@param document the document to write to.\n@param asChild create child element if true.\n@throws RenderException",
"Returns true if this instance has the same config as a given config.\n@param that\n@return true if the instance has the same config, false otherwise.",
"Writes batch of data to the source\n@param batch\n@throws InterruptedException",
"Returns the field descriptors given in the the field names list.\n\n@param fieldNames The field names, separated by commas\n@return The field descriptors in the order given by the field names\n@throws NoSuchFieldException If a field hasn't been found",
"I KNOW WHAT I AM DOING",
"Convert a given date to a floating point date using a given reference date.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param date The given date to be associated with the return value \\( T \\).\n@return The value T measuring the distance of reference date and date by ACT/365 with SECONDS_PER_DAY seconds used as the smallest time unit and SECONDS_PER_DAY is a constant 365*24*60*60."
] |
@PostConstruct
public final void init() throws URISyntaxException {
final String address = getConfig(ADDRESS, null);
if (address != null) {
final URI uri = new URI("udp://" + address);
final String prefix = getConfig(PREFIX, "mapfish-print").replace("%h", getHostname());
final int period = Integer.parseInt(getConfig(PERIOD, "10"));
LOGGER.info("Starting a StatsD reporter targeting {} with prefix {} and period {}s",
uri, prefix, period);
this.reporter = StatsDReporter.forRegistry(this.metricRegistry)
.prefixedWith(prefix)
.build(uri.getHost(), uri.getPort());
this.reporter.start(period, TimeUnit.SECONDS);
}
} | [
"Start the StatsD reporter, if configured.\n\n@throws URISyntaxException"
] | [
"Process the deployment root for the manifest.\n\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException",
"This method tells you if a ClassNode implements or extends a certain class.\n@param node\nthe node\n@param target\nthe class\n@return\ntrue if the class node 'is a' target",
"Populates a calendar exception instance.\n\n@param record MPX record\n@param calendar calendar to which the exception will be added\n@throws MPXJException",
"Use this API to add autoscaleaction resources.",
"Places a disabled marker file in the directory of the specified version.\n\n@param version to disable\n@throws PersistenceFailureException if the marker file could not be created (can happen if\nthe storage system has become read-only or is otherwise\ninaccessible).",
"Gets the host-ignore data for a slave host running the given version.\n\n@param major the kernel management API major version\n@param minor the kernel management API minor version\n@param micro the kernel management API micro version\n\n@return the host-ignore data, or {@code null} if there is no matching registration",
"Parse the given projection.\n\n@param projection The projection string.\n@param longitudeFirst longitudeFirst",
"Convert an Object to a Time.",
"Use this API to fetch lbvserver_servicegroupmember_binding resources of given name ."
] |
private void reply(final String response, final boolean error,
final String errorMessage, final String stackTrace,
final String statusCode, final int statusCodeInt) {
if (!sentReply) {
//must update sentReply first to avoid duplicated msg.
sentReply = true;
// Close the connection. Make sure the close operation ends because
// all I/O operations are asynchronous in Netty.
if(channel!=null && channel.isOpen())
channel.close().awaitUninterruptibly();
final ResponseOnSingeRequest res = new ResponseOnSingeRequest(
response, error, errorMessage, stackTrace, statusCode,
statusCodeInt, PcDateUtils.getNowDateTimeStrStandard(), null);
if (!getContext().system().deadLetters().equals(sender)) {
sender.tell(res, getSelf());
}
if (getContext() != null) {
getContext().stop(getSelf());
}
}
} | [
"First close the connection. Then reply.\n\n@param response\nthe response\n@param error\nthe error\n@param errorMessage\nthe error message\n@param stackTrace\nthe stack trace\n@param statusCode\nthe status code\n@param statusCodeInt\nthe status code int"
] | [
"Drops a driver from the DriverManager's list.",
"Retrieve a number of rows matching the supplied query.\n\n@param sql query statement\n@return result set\n@throws SQLException",
"Use this API to fetch vpnvserver_aaapreauthenticationpolicy_binding resources of given name .",
"Unmark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to unmark",
"Adds position noise to the trajectories\n@param t\n@param sd\n@return trajectory with position noise",
"This method is used to calculate the duration of work between two fixed\ndates according to the work schedule defined in the named calendar. The\ncalendar used is the \"Standard\" calendar. If this calendar does not exist,\nand exception will be thrown.\n\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object\n@throws MPXJException normally when no Standard calendar is available\n@deprecated use calendar.getDuration(startDate, endDate)",
"Updates the information about this collaboration with any info fields that have been modified locally.\n\n@param info the updated info.",
"Builds a batch-fetch capable loader based on the given persister, lock-mode, etc.\n\n@param persister The entity persister\n@param batchSize The maximum number of ids to batch-fetch at once\n@param lockMode The lock mode\n@param factory The SessionFactory\n@param influencers Any influencers that should affect the built query\n@param innerEntityLoaderBuilder Builder of the entity loader receiving the subset of batches\n\n@return The loader.",
"Returns a client object for a clientId\n\n@param clientId ID of client to return\n@return Client or null\n@throws Exception exception"
] |
protected Class getClassCacheEntry(String name) {
if (name == null) return null;
synchronized (classCache) {
return classCache.get(name);
}
} | [
"gets a class from the class cache. This cache contains only classes loaded through\nthis class loader or an InnerLoader instance. If no class is stored for a\nspecific name, then the method should return null.\n\n@param name of the class\n@return the class stored for the given name\n@see #removeClassCacheEntry(String)\n@see #setClassCacheEntry(Class)\n@see #clearCache()"
] | [
"Adjusts the site root and returns a cloned CmsObject, iff the module has set an import site that differs\nfrom the site root of the CmsObject provided as argument. Otherwise returns the provided CmsObject unchanged.\n@param cms The original CmsObject.\n@param module The module where the import site is read from.\n@return The original CmsObject, or, if necessary, a clone with adjusted site root\n@throws CmsException see {@link OpenCms#initCmsObject(CmsObject)}",
"Given a RendererViewHolder passed as argument and a position renders the view using the\nRenderer previously stored into the RendererViewHolder.\n\n@param viewHolder with a Renderer class inside.\n@param position to render.",
"Get a writer implementation to push data into Canvas.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param <T> A writer implementation\n@return A writer implementation class",
"Use this API to Reboot reboot.",
"generate a message for loglevel ERROR\n\n@param pObject the message Object",
"Implement this to do your drawing.\n\n@param canvas the canvas on which the background will be drawn",
"Builds a instance of the class for a map containing the values\n\n@param clazz Class to build\n@param values Values map\n@param differenceHandler The difference handler\n@return The created instance\n@throws InstantiationException Error instantiating\n@throws IllegalAccessException Access error\n@throws IntrospectionException Introspection error\n@throws IllegalArgumentException Argument invalid\n@throws InvocationTargetException Invalid target",
"Notify all WorkerListeners currently registered for the given WorkerEvent.\n@param event the WorkerEvent that occurred\n@param worker the Worker that the event occurred in\n@param queue the queue the Worker is processing\n@param job the Job related to the event (only supply for JOB_PROCESS, JOB_EXECUTE, JOB_SUCCESS, and\nJOB_FAILURE events)\n@param runner the materialized object that the Job specified (only supply for JOB_EXECUTE and\nJOB_SUCCESS events)\n@param result the result of the successful execution of the Job (only set for JOB_SUCCESS and if the Job was\na Callable that returned a value)\n@param t the Throwable that caused the event (only supply for JOB_FAILURE and ERROR events)",
"Called by spring on initialization."
] |
public void push( Token token ) {
size++;
if( first == null ) {
first = token;
last = token;
token.previous = null;
token.next = null;
} else {
last.next = token;
token.previous = last;
token.next = null;
last = token;
}
} | [
"Adds a new Token to the end of the linked list"
] | [
"Returns if a MongoDB document is a todo item.",
"Read pattern information from the provided JSON object.\n@param patternJson the JSON object containing the pattern information.",
"Performs a standard QR decomposition on the specified submatrix that is one block wide.\n\n@param blockLength\n@param Y\n@param gamma",
"Gets the positive integer.\n\n@param number the number\n@return the positive integer",
"Initializes the type and validates it",
"Registers an event handler in the repository shared between Javascript\nand Java.\n\n@param h Event handler to be registered.\n@return Callback key that Javascript will use to find this handler.",
"Generates new individual particle radius based on min and max radius setting.\n\n@return new particle radius",
"Moves the given row down.\n\n@param row the row to move",
"Adds new connections to the partition.\n@param connectionsToCreate number of connections to create\n@throws InterruptedException"
] |
public UriComponentsBuilder uri(URI uri) {
Assert.notNull(uri, "'uri' must not be null");
this.scheme = uri.getScheme();
if (uri.isOpaque()) {
this.ssp = uri.getRawSchemeSpecificPart();
resetHierarchicalComponents();
}
else {
if (uri.getRawUserInfo() != null) {
this.userInfo = uri.getRawUserInfo();
}
if (uri.getHost() != null) {
this.host = uri.getHost();
}
if (uri.getPort() != -1) {
this.port = String.valueOf(uri.getPort());
}
if (StringUtils.hasLength(uri.getRawPath())) {
this.pathBuilder = new CompositePathComponentBuilder(uri.getRawPath());
}
if (StringUtils.hasLength(uri.getRawQuery())) {
this.queryParams.clear();
query(uri.getRawQuery());
}
resetSchemeSpecificPart();
}
if (uri.getRawFragment() != null) {
this.fragment = uri.getRawFragment();
}
return this;
} | [
"Initialize all components of this URI builder with the components of the given URI.\n@param uri the URI\n@return this UriComponentsBuilder"
] | [
"Reads a stringtemplate group from a stream.\n\nThis will always return a group (empty if necessary), even if reading it from the stream fails.\n\n@param stream the stream to read from\n@return the string template group",
"Use this API to update clusterinstance.",
"Read an optional boolean value form a JSON Object.\n@param json the JSON object to read from.\n@param key the key for the boolean value in the provided JSON object.\n@return the boolean or null if reading the boolean fails.",
"This function looks for files with the \"wrong\" replica type in their name, and\nif it finds any, renames them.\n\nThose files may have ended up on this server either because:\n- 1. We restored them from another server, where they were named according to\nanother replica type. Or,\n- 2. The {@link voldemort.store.readonly.mr.azkaban.VoldemortBuildAndPushJob}\nand the {@link voldemort.store.readonly.fetcher.HdfsFetcher} are\noperating in 'build.primary.replicas.only' mode, so they only ever built\nand fetched replica 0 of any given file.\n\nNote: This is an implementation detail of the READONLY_V2 naming scheme, and should\nnot be used outside of that scope.\n\n@param masterPartitionId partition ID of the \"primary replica\"\n@param correctReplicaType replica number which should be found on the current\nnode for the provided masterPartitionId.",
"Return whether or not the data object has a default value passed for this field of this type.",
"Returns an java object read from the specified ResultSet column.",
"Use this API to add transformpolicy.",
"Set the host running the Odo instance to configure\n\n@param hostName name of host",
"Returns whether this is a valid address string format.\n\nThe accepted IP address formats are:\nan IPv4 address, an IPv6 address, a network prefix alone, the address representing all addresses of all types, or an empty string.\nIf this method returns false, and you want more details, call validate() and examine the thrown exception.\n\n@return whether this is a valid address string format"
] |
@SuppressWarnings("unused")
public void selectItem(int position, boolean invokeListeners) {
IOperationItem item = mOuterAdapter.getItem(position);
IOperationItem oldHidedItem = mOuterAdapter.getItem(mRealHidedPosition);
int realPosition = mOuterAdapter.normalizePosition(position);
//do nothing if position not changed
if (realPosition == mCurrentItemPosition) {
return;
}
int itemToShowAdapterPosition = position - realPosition + mRealHidedPosition;
item.setVisible(false);
startSelectedViewOutAnimation(position);
mOuterAdapter.notifyRealItemChanged(position);
mRealHidedPosition = realPosition;
oldHidedItem.setVisible(true);
mFlContainerSelected.requestLayout();
mOuterAdapter.notifyRealItemChanged(itemToShowAdapterPosition);
mCurrentItemPosition = realPosition;
if (invokeListeners) {
notifyItemClickListeners(realPosition);
}
if (BuildConfig.DEBUG) {
Log.i(TAG, "clicked on position =" + position);
}
} | [
"Select item by it's position\n\n@param position int value of item position to select\n@param invokeListeners boolean value for invoking listeners"
] | [
"This method extracts calendar data from a Planner file.\n\n@param project Root node of the Planner file",
"Assemble and send a packet that performs sync control, turning a device's sync mode on or off, or telling it\nto become the tempo master.\n\n@param target an update from the device whose sync state is to be set\n@param command the byte identifying the specific sync command to be sent\n\n@throws IOException if there is a problem sending the command to the device",
"Returns true if the given candidate is a group that is filtered due to rule parameters in the current call graph.",
"Use this API to delete nssimpleacl.",
"Read calendar data.",
"Write back to hints file.",
"Configs created by this ConfigBuilder will use the given Redis sentinels.\n\n@param sentinels the Redis set of sentinels\n@return this ConfigBuilder",
"Tries to close off all the unused assigned connections back to the pool. Assumes that\nthe strategy mode has already been flipped prior to calling this routine.\nCalled whenever our no of connection requests > no of threads.",
"Add a range to an exception, ensure that we don't try to add null ranges.\n\n@param exception target exception\n@param start exception start\n@param finish exception finish"
] |
public static boolean isPrimitiveArray(Class<?> clazz) {
Assert.notNull(clazz, "Class must not be null");
return (clazz.isArray() && clazz.getComponentType().isPrimitive());
} | [
"Check if the given class represents an array of primitives,\ni.e. boolean, byte, char, short, int, long, float, or double.\n@param clazz the class to check\n@return whether the given class is a primitive array class"
] | [
"Removes double-quotes from around a string\n@param str\n@return",
"Updates the indices in the index buffer from a Java CharBuffer.\nAll of the entries of the input buffer are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data CharBuffer containing the new values\n@throws IllegalArgumentException if char array is wrong size",
"Use this API to delete ntpserver of given name.",
"Shuts down a managed domain container. The servers are first stopped, then the host controller is shutdown.\n\n@param client the client used to communicate with the server\n@param timeout the graceful shutdown timeout, a value of {@code -1} will wait indefinitely and a value of\n{@code 0} will not attempt a graceful shutdown\n\n@throws IOException if an error occurs communicating with the server\n@throws OperationExecutionException if the operation used to shutdown the managed domain failed",
"Get a TokenizerFactory that does Penn Treebank tokenization.\nThis is now the recommended factory method to use.\n\n@param factory A TokenFactory that determines what form of token is returned by the Tokenizer\n@param options A String specifying options (see the class javadoc for details)\n@param <T> The type of the tokens built by the LexedTokenFactory\n@return A TokenizerFactory that does Penn Treebank tokenization",
"Resolves line alpha based on distance comparing to max distance.\nWhere alpha is close to 0 for maxDistance, and close to 1 to 0 distance.\n\n@param distance line length\n@param maxDistance max line length\n@return line alpha",
"Registers a new site for specific data collection. If null is used as a\nsite key, then all data is collected.\n\n@param siteKey\nthe site to collect geo data for",
"This method is used to calculate the duration of work between two fixed\ndates according to the work schedule defined in the named calendar. The\ncalendar used is the \"Standard\" calendar. If this calendar does not exist,\nand exception will be thrown.\n\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object\n@throws MPXJException normally when no Standard calendar is available\n@deprecated use calendar.getDuration(startDate, endDate)",
"To store an object in a quick & dirty way."
] |
private void loadCadidateString() {
volumeUp = mGvrContext.getActivity().getResources().getString(R.string.volume_up);
volumeDown = mGvrContext.getActivity().getResources().getString(R.string.volume_down);
zoomIn = mGvrContext.getActivity().getResources().getString(R.string.zoom_in);
zoomOut = mGvrContext.getActivity().getResources().getString(R.string.zoom_out);
invertedColors = mGvrContext.getActivity().getResources().getString(R.string.inverted_colors);
talkBack = mGvrContext.getActivity().getResources().getString(R.string.talk_back);
disableTalkBack = mGvrContext.getActivity().getResources().getString(R.string.disable_talk_back);
} | [
"Load all string recognize."
] | [
"Extracts a numeric id from a string, which can be either a Wikidata\nentity URI or a short entity or property id.\n\n@param idString\n@param isUri\n@return numeric id, or 0 if there was an error",
"Retrieve a UUID field.\n\n@param type field type\n@return UUID instance",
"Return the value from the field in the object that is defined by this FieldType.",
"Take a stab at fixing validation problems ?\n\n@param object",
"Sets the top padding for all cells in the row.\n@param paddingTop new padding, ignored if smaller than 0\n@return this to allow chaining",
"Use this API to delete nsip6 of given name.",
"Finds and sets up the Listeners in the given rootView.\n\n@param rootView a View to traverse looking for listeners.\n@return the list of refinement attributes found on listeners.",
"Get a property as a json array or default.\n\n@param key the property name\n@param defaultValue default",
"Return true only if the MethodCallExpression represents a method call for the specified method name\n@param methodCall - the AST MethodCallExpression\n@param methodNamePattern - the expected name of the method being called\n@param numArguments - The number of expected arguments\n@return true only if the method call name matches"
] |
public void createPdfLayout(Dimension dim)
{
if (pdfdocument != null) //processing a PDF document
{
try {
if (createImage)
img = new BufferedImage(dim.width, dim.height, BufferedImage.TYPE_INT_RGB);
Graphics2D ig = img.createGraphics();
log.info("Creating PDF boxes");
VisualContext ctx = new VisualContext(null, null);
boxtree = new CSSBoxTree(ig, ctx, dim, baseurl);
boxtree.setConfig(config);
boxtree.processDocument(pdfdocument, startPage, endPage);
viewport = boxtree.getViewport();
root = boxtree.getDocument().getDocumentElement();
log.info("We have " + boxtree.getLastId() + " boxes");
viewport.initSubtree();
log.info("Layout for "+dim.width+"px");
viewport.doLayout(dim.width, true, true);
log.info("Resulting size: " + viewport.getWidth() + "x" + viewport.getHeight() + " (" + viewport + ")");
log.info("Updating viewport size");
viewport.updateBounds(dim);
log.info("Resulting size: " + viewport.getWidth() + "x" + viewport.getHeight() + " (" + viewport + ")");
if (createImage && (viewport.getWidth() > dim.width || viewport.getHeight() > dim.height))
{
img = new BufferedImage(Math.max(viewport.getWidth(), dim.width),
Math.max(viewport.getHeight(), dim.height),
BufferedImage.TYPE_INT_RGB);
ig = img.createGraphics();
}
log.info("Positioning for "+img.getWidth()+"x"+img.getHeight()+"px");
viewport.absolutePositions();
clearCanvas();
viewport.draw(new GraphicsRenderer(ig));
setPreferredSize(new Dimension(img.getWidth(), img.getHeight()));
revalidate();
} catch (ParserConfigurationException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
else if (root != null) //processing a DOM tree
{
super.createLayout(dim);
}
} | [
"Creates the box tree for the PDF file.\n@param dim"
] | [
"Reconstructs a number that is represented by more than one byte in a network packet in little-endian order, for\nthe very few protocol values that are sent in this quirky way.\n\n@param buffer the byte array containing the packet data\n@param start the index of the first byte containing a numeric value\n@param length the number of bytes making up the value\n@return the reconstructed number",
"Runs calls in a background thread so that the results will actually be asynchronous.\n\n@see com.google.appengine.tools.cloudstorage.RawGcsService#continueObjectCreationAsync(\ncom.google.appengine.tools.cloudstorage.RawGcsService.RawGcsCreationToken,\njava.nio.ByteBuffer, long)",
"Add BoxMetaDataFilter to the JsonArray boxMetadataFilterRequestArray.\n@param @param bmf accepts a filter that has templateKey, scope, and filters populated.\n@return JsonArray that is formated Json request",
"Make sure we don't attempt to recover inline; if the parser\nsuccessfully recovers, it won't throw an exception.",
"Create a new service activator for the domain server communication services.\n\n@param endpointConfig the endpoint configuration\n@param managementURI the management connection URI\n@param serverName the server name\n@param serverProcessName the server process name\n@param authKey the authentication key\n@param managementSubsystemEndpoint whether to use the mgmt subsystem endpoint or not\n@return the service activator",
"Print the class's constructors m",
"Computes the mean or average of all the elements.\n\n@return mean",
"Set the header names to forward from the request. Should not be defined if all is set to true\n\n@param names the header names.",
"Process the given batch of files and pass the results back to the listener as each file is processed."
] |
public void set(Object receiver, String fieldName, /* @Nullable */ Object value) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
Preconditions.checkNotNull(receiver,"receiver");
Preconditions.checkNotNull(fieldName,"fieldName");
Class<? extends Object> clazz = receiver.getClass();
Field f = getDeclaredField(clazz, fieldName);
if (!f.isAccessible())
f.setAccessible(true);
f.set(receiver, value);
} | [
"Sets the given value on an the receivers's accessible field with the given name.\n\n@param receiver the receiver, never <code>null</code>\n@param fieldName the field's name, never <code>null</code>\n@param value the value to set\n\n@throws NoSuchFieldException see {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#set(Object, Object)}\n@throws IllegalArgumentException see {@link Field#set(Object, Object)}"
] | [
"Formats a double value.\n\n@param number numeric value\n@return Double instance",
"Adds labels to the item\n\n@param labels\nthe labels to add",
"For every String key, it registers the object as a parameter to make it available\nin the report.\n\n@param jd\n@param _parameters",
"This internal method is used to convert from a Date instance to an\ninteger representing the number of minutes past midnight.\n\n@param date date instance\n@return minutes past midnight as an integer",
"Use this API to delete ntpserver.",
"Merges information from the resource root into this resource root\n\n@param additionalResourceRoot The root to merge",
"Create an MD5 hash of a string.\n\n@param input Input string.\n@return Hash of input.\n@throws IllegalArgumentException if {@code input} is blank.",
"Initialize the domain registry.\n\n@param registry the domain registry",
"Build and return a foreign collection based on the field settings that matches the id argument. This can return\nnull in certain circumstances.\n\n@param parent\nThe parent object that we will set on each item in the collection.\n@param id\nThe id of the foreign object we will look for. This can be null if we are creating an empty\ncollection."
] |
public static Predicate is(final String sql) {
return new Predicate() {
public String toSql() {
return sql;
}
public void init(AbstractSqlCreator creator) {
}
};
} | [
"Returns a predicate that takes no parameters. The given SQL expression is\nused directly.\n\n@param sql\nSQL text of the expression"
] | [
"Subtracts vector v1 from v2 and places the result in this vector.\n\n@param v1\nleft-hand vector\n@param v2\nright-hand vector",
"Convert from an internal Spring bean definition to a DTO.\n\n@param beanDefinition The internal Spring bean definition.\n@return Returns a DTO representation.",
"Generates a sub-trajectory",
"Creates the event type.\n\n@param type the EventEnumType\n@return the event type",
"To be used with AutoText class constants ALIGMENT_LEFT, ALIGMENT_CENTER and ALIGMENT_RIGHT\n@param aligment\n@return",
"Returns the error correction codewords for the specified data codewords.\n\n@param codewords the codewords that we need error correction codewords for\n@param ecclen the number of error correction codewords needed\n@return the error correction codewords for the specified data codewords",
"Determine which field the Activity ID has been mapped to.\n\n@param map field map\n@return field",
"Try to link the declaration with the importerService referenced by the ServiceReference,.\nreturn true if they have been link together, false otherwise.\n\n@param declaration The Declaration\n@param declarationBinderRef The ServiceReference<S> of S\n@return true if they have been link together, false otherwise.",
"Build the tree of joins for the given criteria"
] |
public Request header(String key, String value) {
this.headers.put(key, value);
return this;
} | [
"Sets a header per-request\n\n@param key Header key\n@param value Header value\n@return The request itself"
] | [
"Two stage distribution, dry run and actual promotion to verify correctness.\n\n@param distributionBuilder\n@param client\n@param listener\n@param buildName\n@param buildNumber\n@throws IOException",
"Add an object into cache by key with expiration time specified\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached\n@param expiration\nthe seconds after which the object will be evicted from the cache",
"Normalizes the name so it can be used as Maven artifactId or groupId.",
"Return true only if the specified object responds to the named method\n@param object - the object to check\n@param methodName - the name of the method\n@return true if the object responds to the named method",
"Use this API to fetch nsrpcnode resources of given names .",
"This method is called when the locale of the parent file is updated.\nIt resets the locale specific currency attributes to the default values\nfor the new locale.\n\n@param properties project properties\n@param locale new locale",
"Converts this update description to its document representation as it would appear in a\nMongoDB Change Event.\n\n@return the update description document as it would appear in a change event",
"Decode long from byte array at offset\n\n@param ba byte array\n@param offset Offset\n@return long value",
"Use this API to delete dnsview of given name."
] |
public List<Message> requestFolderMenuFrom(final SlotReference slotReference, final int sortOrder, final int folderId)
throws Exception {
ConnectionManager.ClientTask<List<Message>> task = new ConnectionManager.ClientTask<List<Message>>() {
@Override
public List<Message> useClient(Client client) throws Exception {
if (client.tryLockingForMenuOperations(MetadataFinder.MENU_TIMEOUT, TimeUnit.SECONDS)) {
try {
logger.debug("Requesting Key menu.");
Message response = client.menuRequestTyped(Message.KnownType.FOLDER_MENU_REQ, Message.MenuIdentifier.MAIN_MENU, slotReference.slot,
CdjStatus.TrackType.UNANALYZED, new NumberField(sortOrder), new NumberField(folderId), new NumberField(0xffffff));
return client.renderMenuItems(Message.MenuIdentifier.MAIN_MENU, slotReference.slot, CdjStatus.TrackType.UNANALYZED, response);
} finally {
client.unlockForMenuOperations();
}
} else {
throw new TimeoutException("Unable to lock player for menu operations.");
}
}
};
return ConnectionManager.getInstance().invokeWithClientSession(slotReference.player, task, "requesting folder menu");
} | [
"Ask the specified player for a Folder menu for exploring its raw filesystem.\nThis is a request for unanalyzed items, so we do a typed menu request.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n@param folderId identifies the folder whose contents should be listed, use -1 to get the root folder\n\n@return the entries in the folder menu\n\n@throws Exception if there is a problem obtaining the menu"
] | [
"parse the target resource and add it to the current shape\n@param shapes\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Return a public static method of a class.\n@param methodName the static method name\n@param clazz the class which defines the method\n@param args the parameter types to the method\n@return the static method, or {@code null} if no static method was found\n@throws IllegalArgumentException if the method name is blank or the clazz is null",
"Create a new path address by appending more elements to the end of this address.\n\n@param additionalElements the elements to append\n@return the new path address",
"Get the size of the painting area required to draw the scalebar with labels.\n\n@param scalebarParams Parameters for the scalebar.\n@param settings Parameters for rendering the scalebar.\n@param maxLabelSize The max. size of the labels.",
"Subtracts v1 from this vector and places the result in this vector.\n\n@param v1\nright-hand vector",
"The selectionStrategy given as String argument is selected as locatorSelectionStrategy.\nIf selectionStrategy is null, the defaultLocatorSelectionStrategy is used instead.\nThen the new locatorSelectionStrategy is connected to the locatorClient and the matcher.\nA new LocatorTargetSelector is created, set to the locatorSelectionStrategy and then set\nas selector in the conduitSelectorHolder.\n\n@param conduitSelectorHolder\n@param matcher\n@param selectionStrategy",
"Copy the given Collection into a Class array.\nThe Collection must contain Class elements only.\n@param collection the Collection to copy\n@return the Class array ({@code null} if the passed-in\nCollection was {@code null})",
"Get a list of referrers from a given domain to a photo.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param domain\n(Required) The domain to return referrers for. This should be a hostname (eg: \"flickr.com\") with no protocol or pathname.\n@param photoId\n(Optional) The id of the photo to get stats for. If not provided, stats for all photos will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotoReferrers.html\"",
"Create a new server group for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception"
] |
protected String getQueryParam() {
String param = parseOptionalStringValue(m_configObject, JSON_KEY_QUERYPARAM);
if (param == null) {
return null != m_baseConfig ? m_baseConfig.getGeneralConfig().getQueryParam() : DEFAULT_QUERY_PARAM;
} else {
return param;
}
} | [
"Returns the configured request parameter for the query string, or the default parameter if no core is configured.\n@return The configured request parameter for the query string, or the default parameter if no core is configured."
] | [
"Returns a string that should be used as a label for the given item. The\nmethod also ensures that each label is used for only one class. Other\nclasses with the same label will have their QID added for disambiguation.\n\n@param entityIdValue\nthe item to label\n@return the label",
"Specify the string and the int identifying which word shaper to\nuse and this returns the result of using that wordshaper on the String.\n\n@param inStr String to calculate word shape of\n@param wordShaper Constant for which shaping formula to use\n@param knownLCWords A Collection of known lowercase words, which some shapers use\nto decide the class of capitalized words.\n<i>Note: while this code works with any Collection, you should\nprovide a Set for decent performance.</i> If this parameter is\nnull or empty, then this option is not used (capitalized words\nare treated the same, regardless of whether the lowercased\nversion of the String has been seen).\n@return The wordshape String",
"Resize the mesh to given size for each axis.\n\n@param mesh Mesh to be resized.\n@param xsize Size for x-axis.\n@param ysize Size for y-axis.\n@param zsize Size fof z-axis.",
"Set the background color.\n\nIf you don't set the background color, the default is an opaque black:\n{@link Color#BLACK}, 0xff000000.\n\n@param color\nAn Android 32-bit (ARGB) {@link Color}, such as you get from\n{@link Resources#getColor(int)}",
"Calculates the distance between two points\n\n@return distance between two points",
"Uploads files from the given file input fields.<p<\n\n@param fields the set of names of fields containing the files to upload\n@param filenameCallback the callback to call with the resulting map from field names to file paths\n@param errorCallback the callback to call with an error message",
"Convert from Hadoop Text to Bytes",
"Sets the character translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTranslator translator\n@return this to allow chaining",
"Show only the following channels.\n@param channels The names of the channels to show.\n@return this"
] |
public static StatisticsMatrix wrap( DMatrixRMaj m ) {
StatisticsMatrix ret = new StatisticsMatrix();
ret.setMatrix( m );
return ret;
} | [
"Wraps a StatisticsMatrix around 'm'. Does NOT create a copy of 'm' but saves a reference\nto it."
] | [
"Creates an element that represents a single page.\n@return the resulting DOM element",
"Awaits at most 5 minutes until all pods meets the given predicate.\n\n@param filter used to wait to detect that a pod is up and running.",
"Convert an ObjectBank to arrays of data features and labels.\n\n@return A Pair, where the first element is an int[][][][] representing the\ndata and the second element is an int[][] representing the labels.",
"Returns the latest change events for a given namespace.\n\n@param namespace the namespace to get events for.\n@return the latest change events for a given namespace.",
"Check that a list allowing null and empty item contains at least one element that is\nnot blank.\n@param list can't be null\n@return",
"Adds search fields from elements on a container page to a container page's document.\n@param document The document for the container page\n@param cms The current CmsObject\n@param resource The resource of the container page\n@param systemFields The list of field names for fields where mappings to should be discarded, since these fields are used system internally.\n@return the manipulated document",
"Set a Java classname path to ignore when printing stack traces\n@param classToIgnoreInTraces The class name (with packages, etc) to ignore.\n@return this",
"Convert a Java date into a Planner time.\n\n0800\n\n@param value Java Date instance\n@return Planner time value",
"Gets the list of failed invocations that has been collected by this collector.\n\n@return The failed invocations."
] |
public synchronized int skip(int count) {
if (count > available) {
count = available;
}
idxGet = (idxGet + count) % capacity;
available -= count;
return count;
} | [
"Skips the given count of bytes, but at most the currently available count.\n\n@return number of bytes actually skipped from this buffer (0 if no bytes are available)"
] | [
"Returns the proxies real subject. The subject will be materialized if\nnecessary.\n\n@return The subject",
"Retrieve the number of minutes per month for this calendar.\n\n@return minutes per month",
"Get a message bundle of the given type.\n\n@param type the bundle type class\n\n@return the bundle",
"Gets the metadata on this folder associated with a specified template.\n\n@param templateName the metadata template type name.\n@return the metadata returned from the server.",
"Joins the given ints using the given separator into a single string.\n\n@return the joined string or an empty string if the int array is null",
"Add a Opacity bar to the color wheel.\n\n@param bar The instance of the Opacity bar.",
"iteration not synchronized",
"Normalizes the name so it can be used as Maven artifactId or groupId.",
"generate random velocities in the given range\n@return"
] |
public int getChunkForKey(byte[] key) throws IllegalStateException {
if(numChunks == 0) {
throw new IllegalStateException("The ChunkedFileSet is closed.");
}
switch(storageFormat) {
case READONLY_V0: {
return ReadOnlyUtils.chunk(ByteUtils.md5(key), numChunks);
}
case READONLY_V1: {
if(nodePartitionIds == null) {
throw new IllegalStateException("nodePartitionIds is null.");
}
List<Integer> routingPartitionList = routingStrategy.getPartitionList(key);
routingPartitionList.retainAll(nodePartitionIds);
if(routingPartitionList.size() != 1) {
throw new IllegalStateException("The key does not belong on this node.");
}
return chunkIdToChunkStart.get(routingPartitionList.get(0))
+ ReadOnlyUtils.chunk(ByteUtils.md5(key),
chunkIdToNumChunks.get(routingPartitionList.get(0)));
}
case READONLY_V2: {
List<Integer> routingPartitionList = routingStrategy.getPartitionList(key);
Pair<Integer, Integer> bucket = null;
for(int replicaType = 0; replicaType < routingPartitionList.size(); replicaType++) {
if(nodePartitionIds == null) {
throw new IllegalStateException("nodePartitionIds is null.");
}
if(nodePartitionIds.contains(routingPartitionList.get(replicaType))) {
if(bucket == null) {
bucket = Pair.create(routingPartitionList.get(0), replicaType);
} else {
throw new IllegalStateException("Found more than one replica for a given partition on the current node!");
}
}
}
if(bucket == null) {
throw new IllegalStateException("The key does not belong on this node.");
}
Integer chunkStart = chunkIdToChunkStart.get(bucket);
if (chunkStart == null) {
throw new IllegalStateException("chunkStart is null.");
}
return chunkStart + ReadOnlyUtils.chunk(ByteUtils.md5(key), chunkIdToNumChunks.get(bucket));
}
default: {
throw new IllegalStateException("Unsupported storageFormat: " + storageFormat);
}
}
} | [
"Given a particular key, first converts its to the storage format and then\ndetermines which chunk it belongs to\n\n@param key Byte array of keys\n@return Chunk id\n@throws IllegalStateException if unable to find the chunk id for the given key"
] | [
"Retrieves the amount of time between two date time values. Note that\nthese values are converted into canonical values to remove the\ndate component.\n\n@param start start time\n@param end end time\n@return length of time",
"Returns the given collection persister for the inverse side in case the given persister represents the main side\nof a bi-directional many-to-many association.\n\n@param mainSidePersister the collection persister on the main side of a bi-directional many-to-many association\n@return the collection persister for the inverse side of the given persister or {@code null} in case it\nrepresents the inverse side itself or the association is uni-directional",
"Initializes the queue that tracks the next set of nodes with no dependencies or\nwhose dependencies are resolved.",
"Return a collection of Photo objects not in part of any sets.\n\nThis method requires authentication with 'read' permission.\n\n@param perPage\nThe per page\n@param page\nThe page\n@return The collection of Photo objects\n@throws FlickrException",
"Moves a calendar to the nth named day of the month.\n\n@param calendar current date\n@param dayNumber nth day",
"Upgrades a read transaction to a write transaction, executes the work then downgrades to a read transaction\nagain.\n\n@since 2.4\n@noreference",
"Use this API to fetch sslciphersuite resource of given name .",
"Checks, if all values necessary for a specific pattern are valid.\n@return a flag, indicating if all values required for the pattern are valid.",
"Builds the data structures that show the effects of the plan by server group"
] |
public void setTimewarpInt(String timewarp) {
try {
m_userSettings.setTimeWarp(Long.valueOf(timewarp).longValue());
} catch (Exception e) {
m_userSettings.setTimeWarp(-1);
}
} | [
"Sets the timewarp setting from a numeric string\n\n@param timewarp a numeric string containing the number of milliseconds since the epoch"
] | [
"Use this API to fetch statistics of spilloverpolicy_stats resource of given name .",
"look for zero after country code, and remove if present",
"Recursively read the WBS structure from a PEP file.\n\n@param parent parent container for tasks\n@param id initial WBS ID",
"Obtains a local date in Pax calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Pax local date, not null\n@throws DateTimeException if unable to create the date",
"Fires the event and waits for a specified time.\n\n@param webElement the element to fire event on.\n@param eventable The HTML event type (onclick, onmouseover, ...).\n@return true if firing event is successful.\n@throws InterruptedException when interrupted during the wait.",
"Computes the null space using QR decomposition. This is much faster than using SVD\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space",
"Support the subscript operator for CharSequence.\n\n@param text a CharSequence\n@param index the index of the Character to get\n@return the Character at the given index\n@since 1.0",
"Exit reporting up to distributor, using information gained from status reports to the LineCountManager\n\n@return a boolean of whether this consumer should immediately exit",
"A convenience method for creating an immutable list\n\n@param self a List\n@return an immutable List\n@see java.util.Collections#unmodifiableList(java.util.List)\n@since 1.0"
] |
public static Set<String> getRoundingNames(String... providers) {
return Optional.ofNullable(monetaryRoundingsSingletonSpi()).orElseThrow(
() -> new MonetaryException("No MonetaryRoundingsSpi loaded, query functionality is not available."))
.getRoundingNames(providers);
} | [
"Allows to access the names of the current defined roundings.\n\n@param providers the providers and ordering to be used. By default providers and ordering as defined in\n#getDefaultProviders is used.\n@return the set of custom rounding ids, never {@code null}."
] | [
"Output the SQL type for the default value for the type.",
"Configure if you want this collapsible container to\naccordion its child elements or use expandable.",
"Helper to read an optional String value list.\n@param path The XML path of the element to read.\n@return The String list stored in the XML, or <code>null</code> if the value could not be read.",
"gets the first non annotation line number of a node, taking into account annotations.",
"retrieve an Object by query\nI.e perform a SELECT ... FROM ... WHERE ... in an RDBMS",
"Adds an ORDER BY item with a direction indicator.\n\n@param name\nName of the column by which to sort.\n@param ascending\nIf true, specifies the direction \"asc\", otherwise, specifies\nthe direction \"desc\".",
"Retrieve a Double from an input stream.\n\n@param is input stream\n@return Double instance",
"Adds a variable to the end of the token list\n@param variable Variable which is to be added\n@return The new Token created around variable",
"Returns the link for the given workplace resource.\n\nThis should only be used for resources under /system or /shared.<p<\n\n@param cms the current OpenCms user context\n@param resourceName the resource to generate the online link for\n@param forceSecure forces the secure server prefix\n\n@return the link for the given resource"
] |
protected final void sendObjectToSocket(Object objectToSend, WriteCallback cb) {
Session sess = this.getSession();
if (sess != null) {
String json;
try {
json = this.mapper.writeValueAsString(objectToSend);
} catch (JsonProcessingException e) {
throw new RuntimeException("Failed to serialize object", e);
}
sess.getRemote().sendString(json, cb);
}
} | [
"send object to client and serialize it using JSON\n\n@param objectToSend the object to send\n@param cb the callback after sending the message"
] | [
"Destroys an instance of the bean\n\n@param instance The instance",
"Sets the Red, Green, and Blue color variables. This will automatically populate the Hue, Saturation and Brightness and Hexadecimal fields, too.\n\nThe RGB color model is an additive color model in which red, green, and blue light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials of the three additive primary colors, red, green, and blue.\n@param red strength - valid range is 0-255\n@param green strength - valid range is 0-255\n@param blue strength - valid range is 0-255\n@throws java.lang.Exception Exception if the Red, Green or Blue variables are out of range.",
"The test that checks if clipping is needed.\n\n@param f\nfeature to test\n@param scale\nscale\n@return true if clipping is needed",
"Executes a query using the given parameters. The query results will be added to the\nExecutionResults using the given identifier.\n\n@param identifier\nThe identifier to be used for the results when added to the ExecutionResults\n@param name\nThe name of the query to execute\n@param arguments\nThe arguments to be used for the query parameters\n@return",
"Returns an iterator that iterates over all elements greater or equal to key in ascending order\n\n@param key key\n@return iterator",
"Increment the version info associated with the given node\n\n@param node The node",
"Add a \"post-run\" dependent for this model.\n\n@param dependent the \"post-run\" dependent.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependent task group",
"Function to clear all the metadata related to the given store\ndefinitions. This is needed when a put on 'stores.xml' is called, thus\nreplacing the existing state.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will handle concurrency related issues.\n\n@param storeNamesToDelete",
"Finds a child resource with the given key.\n\n@param key the child resource key\n@return null if no child resource exists with the given name else the child resource"
] |
public List<String> getListAttribute(String section, String name) {
return split(getAttribute(section, name));
} | [
"Returns an attribute's list value from a non-main section of this JAR's manifest.\nThe attributes string value will be split on whitespace into the returned list.\nThe returned list may be safely modified.\n\n@param section the manifest's section\n@param name the attribute's name"
] | [
"Lift a Java Func2 to a Scala Function2\n\n@param f the function to lift\n\n@returns the Scala function",
"Returns the primary port of the server.\n\n@return the primary {@link ServerPort} if the server is started. {@link Optional#empty()} otherwise.",
"This will check to see if certain configuration values exist from the ConfigurationService\nIf not then it redirects to the configuration screen",
"Creates a new resource.\n@param cmsObject The CmsObject of the current request context.\n@param newLink A string, specifying where which new content should be created.\n@param locale The locale for which the\n@param sitePath site path of the currently edited content.\n@param modelFileName not used.\n@param mode optional creation mode\n@param postCreateHandler optional class name of an {@link I_CmsCollectorPostCreateHandler} which is invoked after the content has been created.\nThe fully qualified class name can be followed by a \"|\" symbol and a handler specific configuration string.\n@return The site-path of the newly created resource.",
"This method inserts a name value pair into internal storage.\n\n@param field task field\n@param value attribute value",
"Set virtual host so the server can direct the request. Value is the host header if it is set, otherwise\nuse the hostname from the original request.\n\n@param httpMethodProxyRequest\n@param httpServletRequest",
"Applies the matrices computed from the scene object's\nlinked to the skeleton bones to the current pose.\n@see #applyPose(GVRPose, int)\n@see #setPose(GVRPose)",
"Creates a list of placeholders for use in a PreparedStatement\n\n@param length number of placeholders\n@return String of placeholders, seperated by comma",
"Select the specific vertex and fragment shader to use with this material.\n\nThe shader template is used to generate the sources for the vertex and\nfragment shader based on the material properties only.\nIt will ignore the mesh attributes and all lights.\n\n@param context\nGVRContext\n@param material\nmaterial to use with the shader\n@return ID of vertex/fragment shader set"
] |
private static void checkPreconditions(List<String> requiredSubStrings) {
if( requiredSubStrings == null ) {
throw new NullPointerException("requiredSubStrings List should not be null");
} else if( requiredSubStrings.isEmpty() ) {
throw new IllegalArgumentException("requiredSubStrings List should not be empty");
}
} | [
"Checks the preconditions for creating a new RequireSubStr processor with a List of Strings.\n\n@param requiredSubStrings\nthe required substrings\n@throws NullPointerException\nif requiredSubStrings or one of its elements is null\n@throws IllegalArgumentException\nif requiredSubStrings is empty"
] | [
"Adds a measure to the crosstab. A crosstab can have many measures. DJ will lay out one measure above\nthe other.\n\nA measure is what is shown on each intersection of a column and a row. A calculation is performed to\nall occurrences in the datasource where the column and row values matches (between elements)\n\nThe only difference between the prior methods is that this method sets \"visible\" to false\n\n@param property\n@param className\n@param title\n@return",
"Converts an absolute rectangle to a relative one wrt to the current coordinate system.\n\n@param rect absolute rectangle\n@return relative rectangle",
"Reads and sets the next feed in the stream.",
"Read calendar hours and exception data.\n\n@param calendar parent calendar\n@param row calendar hours and exception data",
"Get the authentication method to use.\n\n@return authentication method",
"Use this API to add responderpolicy.",
"Downloads a part of this file's contents, starting at rangeStart and stopping at rangeEnd.\n\n@param output the stream to where the file will be written.\n@param rangeStart the byte offset at which to start the download.\n@param rangeEnd the byte offset at which to stop the download.",
"Bessel function of order 0.\n\n@param x Value.\n@return J0 value.",
"Pops resource requests off the queue until queue is empty or an unexpired\nresource request is found. Invokes .handleTimeout on all expired resource\nrequests popped off the queue.\n\n@return null or a valid ResourceRequest"
] |
@ArgumentsChecked
@Throws(IllegalNullArgumentException.class)
public static int checkInteger(@Nonnull final Number number) {
Check.notNull(number, "number");
if (!isInIntegerRange(number)) {
throw new IllegalNumberRangeException(number.toString(), INTEGER_MIN, INTEGER_MAX);
}
return number.intValue();
} | [
"Checks if a given number is in the range of an integer.\n\n@param number\na number which should be in the range of an integer (positive or negative)\n\n@see java.lang.Integer#MIN_VALUE\n@see java.lang.Integer#MAX_VALUE\n\n@return number as an integer (rounding might occur)"
] | [
"Add a 'IS NULL' clause so the column must be null. '=' NULL does not work.",
"Switches to the next tab.",
"Adds the HIBC prefix and check digit to the specified data, returning the resultant data string.\n\n@see <a href=\"https://sourceforge.net/p/zint/code/ci/master/tree/backend/library.c\">Corresponding Zint code</a>",
"Add another store destination to an existing streaming session\n\n\n@param store the name of the store to stream to",
"A write through put to inner-store.\n\n@param keyBytes : keyName strings serialized as bytes eg. 'cluster.xml'\n@param valueBytes : versioned byte[] eg. UTF bytes for cluster xml\ndefinitions\n@throws VoldemortException",
"Fills the week panel with checkboxes.",
"Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,\nunless we have a metadata cache available for the specified media slot, in which case that will be used instead.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n\n@return the metadata, if any",
"FOR internal use. This method was called before the external transaction was completed.\n\nThis method was called by the JTA-TxManager before the JTA-tx prepare call. Within this method\nwe prepare odmg for commit and pass all modified persistent objects to DB and release/close the used\nconnection. We have to close the connection in this method, because the TxManager does prepare for commit\nafter this method and all used DataSource-connections have to be closed before.\n\n@see javax.transaction.Synchronization",
"Create and add model controller handler to an existing management channel handler.\n\n@param handler the channel handler\n@return the created client"
] |
private Optional<String> getXsrfFromHtmlBody(HttpResponse loginResponse) throws IOException {
Optional<Cookie> gerritAccountCookie = findGerritAccountCookie();
if (gerritAccountCookie.isPresent()) {
Matcher matcher = GERRIT_AUTH_PATTERN.matcher(EntityUtils.toString(loginResponse.getEntity(), Consts.UTF_8));
if (matcher.find()) {
return Optional.of(matcher.group(1));
}
}
return Optional.absent();
} | [
"In Gerrit < 2.12 the XSRF token was included in the start page HTML."
] | [
"Create and serialize a WorkerStatus.\n\n@param queue the queue the Job came from\n@param job the Job currently being processed\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus",
"Produces a new ConditionalCounter.\n\n@return a new ConditionalCounter, where order of indices is reversed",
"Calculates the tiles width and height.\n\n@param code\nThe unique tile code. Determines what tile we're talking about.\n@param maxExtent\nThe maximum extent of the grid to which this tile belongs.\n@param scale\nThe current client side scale.\n@return Returns an array of double values where the first value is the tile width and the second value is the\ntile height.",
"Use this API to fetch statistics of rnatip_stats resource of given name .",
"Given an AVRO serializer definition, validates if all the avro schemas\nare valid i.e parseable.\n\n@param avroSerDef",
"Transforms an input String into HTML using the given Configuration.\n\n@param input\nThe String to process.\n@param configuration\nThe Configuration.\n@return The processed String.\n@since 0.7\n@see Configuration",
"Adds one or several attributes to facet on for the next queries.\n\n@param attributes one or more attribute names.\n@return this {@link Searcher} for chaining.",
"Creates a new block box from the given element with the given parent. No style is assigned to the resulting box.\n@param parent The parent box in the tree of boxes.\n@param n The element that this box belongs to.\n@param replaced When set to <code>true</code>, a replaced block box will be created. Otherwise, a normal non-replaced block will be created.\n@return The new block box.",
"Retrieve an enterprise field value.\n\n@param index field index\n@return field value"
] |
public void generateTracedFile(final IFileSystemAccess2 fsa, final String path, final CompositeGeneratorNode rootNode) {
final GeneratorNodeProcessor.Result result = this.processor.process(rootNode);
fsa.generateFile(path, result);
} | [
"Use to generate a file based on generator node."
] | [
"Adds a new Pie Slice to the PieChart. After inserting and calculation of the highlighting color\na complete recalculation is initiated.\n\n@param _Slice The newly added PieSlice.",
"Check all abstract methods are declared by the decorated types.\n\n@param type\n@param beanManager\n@param delegateType\n@throws DefinitionException If any of the abstract methods is not declared by the decorated types",
"Create a standalone target.\n\n@param controllerClient the connected controller client to a standalone instance.\n@return the remote target",
"Handle http worker response.\n\n@param respOnSingleReq\nthe my response\n@throws Exception\nthe exception",
"Adds the specified list of users as followers to the project. Followers are a subset of members, therefore if\nthe users are not already members of the project they will also become members as a result of this operation.\nReturns the updated project record.\n\n@param project The project to add followers to.\n@return Request object",
"Determine the relevant pieces of configuration which need to be included when processing the domain model.\n\n@param root the resource root\n@param requiredConfigurationHolder the resolution context\n@param serverConfig the server config\n@param extensionRegistry the extension registry",
"1.0 version of parser is different at simple mapperParser",
"Binds a script bundle to a scene.\n@param scriptBundle\nThe {@code GVRScriptBundle} object containing script binding information.\n@param scene\nThe scene to bind to.\n@throws IOException if script bundle file cannot be read.\n@throws GVRScriptException if script processing error occurs.",
"Read FTS file data from the configured source and return a populated ProjectFile instance.\n\n@return ProjectFile instance"
] |
public void addAll(OptionsContainerBuilder container) {
for ( Entry<Class<? extends Option<?, ?>>, ValueContainerBuilder<?, ?>> entry : container.optionValues.entrySet() ) {
addAll( entry.getKey(), entry.getValue().build() );
}
} | [
"Adds all options from the passed container to this container.\n\n@param container a container with options to add"
] | [
"Updates the story and returns the full record for the updated story.\nOnly comment stories can have their text updated, and only comment stories and\nattachment stories can be pinned. Only one of `text` and `html_text` can be specified.\n\n@param story Globally unique identifier for the story.\n@return Request object",
"Release all memory addresses taken by this allocator.\nBe careful in using this method, since all of the memory addresses become invalid.",
"Calls a method from editService to update the repeat number for a path\n\n@param model\n@param newNum\n@param path_id\n@param clientUUID\n@return\n@throws Exception",
"Use this API to link sslcertkey resources.",
"Obtains a local date in Symmetry454 calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Symmetry454 local date, not null\n@throws DateTimeException if unable to create the date",
"returns an Enumeration of PrimaryKey Objects for objects of class DataClass.\nThe Elements returned come from a SELECT ... WHERE Statement\nthat is defined by the fields and their coresponding values of listFields\nand listValues.\nUseful for EJB Finder Methods...\n@param primaryKeyClass the pk class for the searched objects\n@param query the query",
"Return true only if the specified object responds to the named method\n@param object - the object to check\n@param methodName - the name of the method\n@return true if the object responds to the named method",
"Writes long strings to output stream as several chunks.\n\n@param stream stream to write to.\n@param str string to be written.\n@throws IOException if something went wrong",
"Main method of this class related to ListView widget. This method is the responsible of\nrecycle or create a new Renderer instance with all the needed information to implement the\nrendering. This method will validate all the attributes passed in the builder constructor and\nwill check if can recycle or has to create a new Renderer instance.\n\nThis method is used with ListView because the view recycling mechanism is implemented in this\nclass. RecyclerView widget will use buildRendererViewHolder method.\n\n@return ready to use Renderer instance."
] |
private void countCooccurringProperties(
StatementDocument statementDocument, UsageRecord usageRecord,
PropertyIdValue thisPropertyIdValue) {
for (StatementGroup sg : statementDocument.getStatementGroups()) {
if (!sg.getProperty().equals(thisPropertyIdValue)) {
Integer propertyId = getNumId(sg.getProperty().getId(), false);
if (!usageRecord.propertyCoCounts.containsKey(propertyId)) {
usageRecord.propertyCoCounts.put(propertyId, 1);
} else {
usageRecord.propertyCoCounts.put(propertyId,
usageRecord.propertyCoCounts.get(propertyId) + 1);
}
}
}
} | [
"Counts each property for which there is a statement in the given item\ndocument, ignoring the property thisPropertyIdValue to avoid properties\ncounting themselves.\n\n@param statementDocument\n@param usageRecord\n@param thisPropertyIdValue"
] | [
"given the groupName, it returns the groupId\n\n@param groupName name of group\n@return ID of group",
"Replace a single value at the appropriate location in the existing value array.\n@param index - location in the array list\n@param newValue - the new String",
"Retrieve the ordinal text for a given integer.\n\n@param value integer value\n@return ordinal text",
"Reads a row of a CSV file and populates the bean, using the supplied name mapping to map column values to the\nappropriate fields. If processors are supplied then they are used, otherwise the raw String values will be used.\n\n@param bean\nthe bean to populate\n@param nameMapping\nthe name mapping array\n@param processors\nthe (optional) cell processors\n@return the populated bean, or null if EOF was reached\n@throws IllegalArgumentException\nif nameMapping.length != number of CSV columns read\n@throws IOException\nif an I/O error occurred\n@throws NullPointerException\nif bean or nameMapping are null\n@throws SuperCsvConstraintViolationException\nif a CellProcessor constraint failed\n@throws SuperCsvException\nif there was a general exception while reading/processing\n@throws SuperCsvReflectionException\nif there was an reflection exception while mapping the values to the bean",
"Handles a faulted task.\n\n@param faultedEntry the entry holding faulted task\n@param throwable the reason for fault\n@param context the context object shared across all the task entries in this group during execution\n\n@return an observable represents asynchronous operation in the next stage",
"Method used to read the sub project details from a byte array.\n\n@param data byte array\n@param uniqueIDOffset offset of unique ID\n@param filePathOffset offset of file path\n@param fileNameOffset offset of file name\n@param subprojectIndex index of the subproject, used to calculate unique id offset\n@return new SubProject instance",
"This method is called when the locale of the parent file is updated.\nIt resets the locale specific currency attributes to the default values\nfor the new locale.\n\n@param properties project properties\n@param locale new locale",
"Do the set-up that's needed to access Amazon S3.",
"Parse the URI and get all the parameters in map form. Query name -> List of Query values.\n\n@param rawQuery query portion of the uri to analyze."
] |
public static Span prefix(Bytes rowPrefix) {
Objects.requireNonNull(rowPrefix);
Bytes fp = followingPrefix(rowPrefix);
return new Span(rowPrefix, true, fp == null ? Bytes.EMPTY : fp, false);
} | [
"Returns a Span that covers all rows beginning with a prefix."
] | [
"Convert an operation for deployment overlays to be executed on local servers.\nSince this might be called in the case of redeployment of affected deployments, we need to take into account\nthe composite op resulting from such a transformation\n@see AffectedDeploymentOverlay#redeployLinksAndTransformOperationForDomain\n@param operation\n@param host\n@return",
"Copies entries in the source map to target map.\n\n@param source source map\n@param target target map",
"exposed only for tests",
"Returns the complete definition of a custom field's metadata.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object",
"Prepare the options by adding additional information to them.\n@see <a href=\"https://docs.mongodb.com/manual/core/index-ttl/\">TTL Indexes</a>",
"Mark the given child resource as the post run dependent of the parent of this collection.\n\n@param childResource the child resource",
"Gets the argument names of a method call. If the arguments are not VariableExpressions then a null\nwill be returned.\n@param methodCall\nthe method call to search\n@return\na list of strings, never null, but some elements may be null",
"Create an `AppDescriptor` with appName and package name specified\n\nIf `appName` is `null` or blank, it will try the following\napproach to get app name:\n\n1. check the {@link Version#getArtifactId() artifact id} and use it unless\n2. if artifact id is null or empty, then infer app name using {@link AppNameInferer}\n\n@param appName\nthe app name\n@param packageName\nthe package name of the app\n@return\nan `AppDescriptor` instance",
"Removes a corporate groupId from an Organisation\n\n@param organizationId String\n@param corporateGroupId String"
] |
public static boolean hasValidContentAdditionParameterDefined(ModelNode operation) {
for (String s : DeploymentAttributes.MANAGED_CONTENT_ATTRIBUTES.keySet()) {
if (operation.hasDefined(s)) {
return true;
}
}
return false;
} | [
"Checks to see if a valid deployment parameter has been defined.\n\n@param operation the operation to check.\n\n@return {@code true} of the parameter is valid, otherwise {@code false}."
] | [
"Load assertion from the provided json or throw exception if not possible.\n\n@param encodedAssertion the assertion as it was encoded in JSON.",
"Sets the occurence.\n\n@param min the min\n@param max the max\n@throws ParseException the parse exception",
"Removes the given row.\n\n@param row the row to remove",
"The full path of a jrxml file, or the path in the classpath of a jrxml\nresource.\n\n@param path\n@return",
"Returns the 'Up' - vector of the camera coordinate system.\n\nThe returned vector is relative to the coordinate space defined by the\ncorresponding node.<p>\n\nThe 'right' vector of the camera coordinate system is the cross product\nof the up and lookAt vectors. The default value is 0|1|0. The vector\nmay be normalized, but it needn't.<p>\n\nThis method is part of the wrapped API (see {@link AiWrapperProvider}\nfor details on wrappers).<p>\n\nThe built-in behavior is to return a {@link AiVector}.\n\n@param wrapperProvider the wrapper provider (used for type inference)\n@return the 'Up' vector",
"Sets the target directory.",
"Use this API to fetch dbdbprofile resource of given name .",
"Send JSON representation of a data object to all connections of a certain user\n\n@param data the data to be sent\n@param username the username\n@return this context",
"Retrieves all Metadata Cascade Policies on a folder.\n\n@param fields optional fields to retrieve for cascade policies.\n@return the Iterable of Box Metadata Cascade Policies in your enterprise."
] |
@Override
public <VALUEBASE, VALUE extends VALUEBASE, KEY extends Key<CoreMap, VALUEBASE>>
VALUE set(Class<KEY> key, VALUE value) {
if (immutableKeys.contains(key)) {
throw new HashableCoreMapException("Attempt to change value " +
"of immutable field "+key.getSimpleName());
}
return super.set(key, value);
} | [
"Sets the value associated with the given key; if the the key is one\nof the hashable keys, throws an exception.\n\n@throws HashableCoreMapException Attempting to set the value for an\nimmutable, hashable key."
] | [
"Use this API to fetch cachepolicylabel_policybinding_binding resources of given name .",
"Sets the value of the given variable\n\n@param name the name of the variable to set\n@param value the new value for the given variable",
"Executes an operation on the controller latching onto an existing transaction\n\n@param operation the operation\n@param handler the handler\n@param control the transaction control\n@param prepareStep the prepare step to be executed before any other steps\n@param operationId the id of the current transaction\n@return the result of the operation",
"Send an error to the client with an exception.\n\n@param httpServletResponse the http response to send the error to\n@param e the error that occurred",
"Sets the highlight strength for the InnerPaddingOutline.\n\n@param _highlightStrength The highlighting value for the outline.",
"Retrieves the timephased breakdown of cost.\n\n@return timephased cost",
"Checks to see if matrix 'a' is the same as this matrix within the specified\ntolerance.\n\n@param a The matrix it is being compared against.\n@param tol How similar they must be to be equals.\n@return If they are equal within tolerance of each other.",
"Adds all rows from the file specified, using the provided parser.\n\n@param file File to read the data from.\n@param fileParser Parser to be used to parse the file.\n@return {@code this}",
"Deletes all steps of scenario cases where a data table\nis generated to reduce the size of the data file.\nIn this case only the steps of the first scenario case are actually needed."
] |
public static <K, V> Map<K, V> immutableMapView(Map<K, V> map) {
if (map instanceof ImmutableMap<?, ?>) {
return map;
}
return Collections.unmodifiableMap(map);
} | [
"Returns an immutable view of a given map."
] | [
"Evalutes AND and OR operators.\n\n@param container data context\n@param promptValues responses to prompts\n@return operator result",
"Maps a field index to an AssignmentField instance.\n\n@param fields array of fields used as the basis for the mapping.\n@param index required field index\n@return AssignmnetField instance",
"Core write attribute implementation.\n\n@param name attribute name\n@param value attribute value",
"Apply a filter to the list of all resources, and show the results.\n\n@param project project file\n@param filter filter",
"Computes the null space using SVD. Slowest bust most stable way to find the solution\n\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space",
"Stop listening for beats.",
"retrieve a collection of type collectionClass matching the Query query\nif lazy = true return a CollectionProxy\n\n@param collectionClass\n@param query\n@param lazy\n@return ManageableCollection\n@throws PersistenceBrokerException",
"Set the order in which sets are returned for the user.\n\nThis method requires authentication with 'write' permission.\n\n@param photosetIds\nAn array of Ids\n@throws FlickrException",
"returns all methods not in the group\n\n@param groupId Id of group\n@return List of Methods for a group\n@throws Exception exception"
] |
public static int getScreenWidth(Context context) {
DisplayMetrics metrics = context.getResources().getDisplayMetrics();
return metrics.widthPixels;
} | [
"Returns the screen width in pixels\n\n@param context is the context to get the resources\n@return the screen width in pixels"
] | [
"Delete an index with the specified name and type in the given design document.\n\n@param indexName name of the index\n@param designDocId ID of the design doc (the _design prefix will be added if not present)\n@param type type of the index, valid values or \"text\" or \"json\"",
"Sends the collected dependencies over to the master and record them.",
"Print a duration value.\n\n@param value Duration instance\n@return string representation of a duration",
"Creates a temporary folder using the given prefix to generate its name.\n@param prefix the prefix string to be used in generating the directory's name; may be <i>null</i>\n@return the <code>File</code> to the newly created folder\n@throws IOException",
"Sets left and right padding for all cells in the table.\n@param padding new padding for left and right, ignored if smaller than 0\n@return this to allow chaining",
"Changes the vertex buffer associated with this mesh.\n@param vbuf new vertex buffer to use\n@see #setVertices(float[])\n@see #getVertexBuffer()\n@see #getVertices()",
"Gets the invalid message.\n\n@param key the key\n@return the invalid message",
"Sets the duration for the animations in this animator.\n\n@param start the animation will start playing from the specified time\n@param end the animation will stop playing at the specified time\n\n@see GVRAnimation#setDuration(float, float)",
"Gets all pending collaboration invites for the current user.\n\n@param api the API connection to use.\n@return a collection of pending collaboration infos."
] |
@Override
public boolean addAll(Collection<? extends T> collection) {
boolean changed = false;
for (T data : collection) {
try {
if (addElement(data)) {
changed = true;
}
} catch (SQLException e) {
throw new IllegalStateException("Could not create data elements in dao", e);
}
}
return changed;
} | [
"Add the collection of elements to this collection. This will also them to the associated database table.\n\n@return Returns true if any of the items did not already exist in the collection otherwise false."
] | [
"Invokes the exit logger if and only if no ExitLogger was previously invoked.\n@param logger the logger. Cannot be {@code null}",
"Expand a macro.\n\nThis will look up the macro definition from {@link #macros} map.\nIf not found then return passed in `macro` itself, otherwise return\nthe macro definition found.\n\n**note** if macro definition is not found and the string\n{@link #isMacro(String) comply to macro name convention}, then a\nwarn level message will be logged.\n\n@param macro the macro name\n@return macro definition or macro itself if no definition found.",
"Parses a string that contains single fat client config string in avro\nformat\n\n@param configAvro Input string of avro format, that contains config for\nmultiple stores\n@return Properties of single fat client config",
"Create a new AwsServiceClient instance with a different codec registry.\n\n@param codecRegistry the new {@link CodecRegistry} for the client.\n@return a new AwsServiceClient instance with the different codec registry",
"Filter everything until we found the first NL character.",
"Use this API to fetch statistics of nsacl6_stats resource of given name .",
"Backup the current configuration as part of the patch history.\n\n@throws IOException for any error",
"Removes all items from the list box.",
"Returns true if the specified name is NOT allowed. It isn't allowed if it matches a built in operator\nor if it contains a restricted character."
] |
public static GregorianCalendar millisToCalendar(long millis) {
GregorianCalendar result = new GregorianCalendar();
result.setTimeZone(TimeZone.getTimeZone("GMT"));
result.setTimeInMillis((long)(Math.ceil(millis / 1000) * 1000));
return result;
} | [
"Converts milliseconds into a calendar object.\n\n@param millis a time given in milliseconds after epoch\n@return the calendar object for the given time"
] | [
"Reset the combination generator.",
"Checks the preconditions for creating a new RequireSubStr processor with a List of Strings.\n\n@param requiredSubStrings\nthe required substrings\n@throws NullPointerException\nif requiredSubStrings or one of its elements is null\n@throws IllegalArgumentException\nif requiredSubStrings is empty",
"Adds the supplied marker to the map.\n\n@param marker",
"Find and return the appropriate getter method for field.\n\n@return Get method or null (or throws IllegalArgumentException) if none found.",
"Unlock all files opened for writing.",
"Discards any tracks from the hot cache that were loaded from a now-unmounted media slot, because they are no\nlonger valid.",
"Checks that index is valid an throw an exception if not.\n\n@param type the type\n@param index the index to check",
"check max size of each message\n@param maxMessageSize the max size for each message",
"Calculate start dates for a yearly relative recurrence.\n\n@param calendar current date\n@param dates array of start dates"
] |
public void setBorderWidth(int borderWidth) {
this.borderWidth = borderWidth;
if(paintBorder != null)
paintBorder.setStrokeWidth(borderWidth);
requestLayout();
invalidate();
} | [
"Sets the CircularImageView's border width in pixels.\n@param borderWidth Width in pixels for the border."
] | [
"Classify the tokens in a String. Each sentence becomes a separate document.\nDoesn't override default readerAndWriter.\n\n@param str\nA String with tokens in one or more sentences of text to be\nclassified.\n@return {@link List} of classified sentences (each a List of something that\nextends {@link CoreMap}).",
"Compiles and performs the provided equation.\n\n@param equation String in simple equation format",
"Returns first resolver that accepts the given resolverId.\nIn case none is found null is returned.\n@param resolverId identifier of the resolver\n@return found resolver or null otherwise",
"Returns a lazily generated map from site paths of resources to the available locales for the resource.\n\n@return a lazily generated map from site paths of resources to the available locales for the resource.",
"Wrapped version of standard jdbc executeUpdate Pays attention to DB\nlocked exception and waits up to 1s\n\n@param query SQL query to execute\n@throws Exception - will throw an exception if we can never get a lock",
"Dumps the contents of a structured block made up from a header\nand fixed sized records.\n\n@param headerSize header zie\n@param blockSize block size\n@param data data block",
"Returns a source excerpt of the type parameters of this type, including angle brackets.\nAlways an empty string if the type class is not generic.\n\n<p>e.g. {@code <N, C>}",
"Render json.\n\n@param o\nthe o\n@return the string",
"Process an individual UDF.\n\n@param udf UDF definition"
] |
public static void registerAgent(Agent agent, String serviceName, String serviceType) throws FIPAException{
DFAgentDescription dfd = new DFAgentDescription();
ServiceDescription sd = new ServiceDescription();
sd.setType(serviceType);
sd.setName(serviceName);
//NOTE El serviceType es un string que define el tipo de servicio publicado en el DF por el Agente X.
// He escogido crear nombres en clave en jade.common.Definitions para este campo.
//NOTE El serviceName es el nombre efectivo del servicio.
// Esto es lo que el usuario va a definir en MockConfiguration.DFNameService y no el tipo como estaba puesto.
// sd.setType(agentType);
// sd.setName(agent.getLocalName());
//Add services??
// Sets the agent description
dfd.setName(agent.getAID());
dfd.addServices(sd);
// Register the agent
DFService.register(agent, dfd);
} | [
"Register the agent in the platform\n\n@param agent_name\nThe name of the agent to be registered\n@param agent\nThe agent to register.\n@throws FIPAException"
] | [
"After cluster management operations, i.e. reset quota and recover quota\nenforcement settings",
"Parses a reflection modifier to a list of string\n\n@param modifiers The modifier to parse\n@return The resulting string list",
"Queries a Search Index and returns grouped results in a map where key\nof the map is the groupName. In case the query didnt use grouping,\nan empty map is returned\n\n@param <T> Object type T\n@param query the Lucene query to be passed to the Search index\n@param classOfT The class of type T\n@return The result of the grouped search query as a ordered {@code Map<String,T> }",
"Sets the alias using a userAlias object.\n@param userAlias The alias to set",
"Close all JDBC objects related to this connection.",
"Resolves current full path with .yml and .yaml extensions\n\n@param fullpath\nwithout extension.\n\n@return Path of existing definition or null",
"Remove a management request handler factory from this context.\n\n@param instance the request handler factory\n@return {@code true} if the instance was removed, {@code false} otherwise",
"Get the output mapper from processor.",
"Sets the resource to which this calendar is linked. Note that this\nmethod updates the calendar's name to be the same as the resource name.\nIf the resource does not yet have a name, then the calendar is given\na default name.\n\n@param resource resource instance"
] |
private static void attachToContent(Activity activity, MenuDrawer menuDrawer) {
/**
* Do not call mActivity#setContentView.
* E.g. if using with a ListActivity, Activity#setContentView is overridden and dispatched to
* MenuDrawer#setContentView, which then again would call Activity#setContentView.
*/
ViewGroup content = (ViewGroup) activity.findViewById(android.R.id.content);
content.removeAllViews();
content.addView(menuDrawer, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
} | [
"Attaches the menu drawer to the content view."
] | [
"check if MessageID exists in the message, if not, only generate new MessageID for outbound message.\n@param message",
"a small helper to set the text color to a textView null save\n\n@param textView\n@param colorDefault",
"Set RGB output range.\n\n@param outRGB Range.",
"Get the primitive attributes for the associated object.\n\n@return attributes for associated objects\n@deprecated replaced by {@link #getAllAttributes()} after introduction of nested associations",
"Must be called before any other functions. Declares and sets up internal data structures.\n\n@param numSamples Number of samples that will be processed.\n@param sampleSize Number of elements in each sample.",
"Read a task relationship.\n\n@param link ConceptDraw PROJECT task link",
"Log a trace message with a throwable.",
"First reduce the Criteria to the normal disjunctive form, then\ncalculate the necessary tree of joined tables for each item, then group\nitems with the same tree of joined tables.",
"gets the count of addresses that this address division grouping may represent\n\nIf this address division grouping is not a subnet block of multiple addresses or has no range of values, then there is only one such address.\n\n@return"
] |
public int getTotalCreatedConnections(){
int total=0;
for (int i=0; i < this.partitionCount && this.partitions[i] != null; i++){
total+=this.partitions[i].getCreatedConnections();
}
return total;
} | [
"Return total number of connections created in all partitions.\n\n@return number of created connections"
] | [
"Processes the template for the object cache of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"backing bootstrap method with all parameters",
"Removes the row with the specified key from this association.\n\n@param key the key of the association row to remove",
"Retrieve an activity status.\n\n@param mpxj MPXJ Task instance\n@return activity status",
"Remove a tag from a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param tagId\nThe tag ID\n@throws FlickrException",
"host.xml",
"Returns screen height and width\n\n@param context\nAny non-null Android Context\n@param p\nOptional Point to reuse. If null, a new Point will be created.\n@return .x is screen width; .y is screen height.",
"Validates an operation against its description provider\n\n@param operation The operation to validate\n@throws IllegalArgumentException if the operation is not valid",
"Given an array of variable names, returns a JsonObject\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@return a json object of values"
] |
private ColorItem buildColorItem(Message menuItem) {
final int colorId = (int) ((NumberField) menuItem.arguments.get(1)).getValue();
final String label = ((StringField) menuItem.arguments.get(3)).getValue();
return buildColorItem(colorId, label);
} | [
"Creates a color item that represents a color field found for a track based on a dbserver message.\n\n@param menuItem the rendered menu item containing the color metadata field\n\n@return the color metadata field"
] | [
"Set the TableAlias for ClassDescriptor",
"Use this API to fetch authenticationldappolicy_authenticationvserver_binding resources of given name .",
"Notifies that multiple footer items are inserted.\n\n@param positionStart the position.\n@param itemCount the item count.",
"Processes one dump file with the given dump file processor, handling\nexceptions appropriately.\n\n@param dumpFile\nthe dump file to process\n@param dumpFileProcessor\nthe dump file processor to use",
"Deletes any empty directories under the output directory. These\ndirectories are created by TestNG for its own reports regardless\nof whether those reports are generated. If you are using the\ndefault TestNG reports as well as ReportNG, these directories will\nnot be empty and will be retained. Otherwise they will be removed.\n@param outputDirectory The directory to search for empty directories.",
"Print an extended attribute date value.\n\n@param value date value\n@return string representation",
"See also JLS8, 4.12.5 Initial Values of Variables.\n\n@param type\n@return the default value for the given type as defined by JLS",
"Read string from url generic.\n\n@param url\nthe url\n@return the string\n@throws IOException\nSignals that an I/O exception has occurred.",
"Construct a new instance.\n\n@return the new instance"
] |
protected final StringBuilder getBaseUrl(final HttpServletRequest httpServletRequest) {
StringBuilder baseURL = new StringBuilder();
if (httpServletRequest.getContextPath() != null && !httpServletRequest.getContextPath().isEmpty()) {
baseURL.append(httpServletRequest.getContextPath());
}
if (httpServletRequest.getServletPath() != null && !httpServletRequest.getServletPath().isEmpty()) {
baseURL.append(httpServletRequest.getServletPath());
}
return baseURL;
} | [
"Returns the base URL of the print servlet.\n\n@param httpServletRequest the request"
] | [
"Sets page shift orientation. The pages might be shifted horizontally or vertically relative\nto each other to make the content of each page on the screen at least partially visible\n@param orientation",
"Sets the proxy class to be used.\n@param newProxyClass java.lang.Class",
"Constructs a relative path between this path and a given path.\n\n<p> Relativization is the inverse of {@link #getAbsolutePath(Path) resolution}.\nThis method attempts to construct a {@link #isAbsolute relative} path\nthat when {@link #getAbsolutePath(Path) resolved} against this path, yields a\npath that locates the same file as the given path. For example, on UNIX,\nif this path is {@code \"/a/b\"} and the given path is {@code \"/a/b/c/d\"}\nthen the resulting relative path would be {@code \"c/d\"}.\nBoth paths must be absolute and and either this path or the given path must be a\n{@link #startsWith(Path) prefix} of the other.\n\n@param other\nthe path to relativize against this path\n\n@return the resulting relative path or null if neither of the given paths is a prefix of the other\n\n@throws IllegalArgumentException\nif this path and {@code other} are not both absolute or relative",
"Sets the value for the API's \"languages\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters",
"Retrieves a list of Terms of Service that belong to your Enterprise as an Iterable.\n@param api api the API connection to be used by the resource.\n@param termsOfServiceType the type of terms of service to be retrieved. Can be set to \"managed\" or \"external\"\n@return the Iterable of Terms of Service in an Enterprise that match the filter parameters.",
"Get top deployment unit.\n\n@param unit the current deployment unit\n@return top deployment unit",
"Answer the TableAlias for aPath or aUserAlias\n@param aPath\n@param aUserAlias\n@param hintClasses\n@return TableAlias, null if none",
"Returns the connection count in this registry.\n\nNote it might count connections that are closed but not removed from registry yet\n\n@return the connection count",
"Create a directory at the given path if it does not exist yet.\n\n@param path\nthe path to the directory\n@throws IOException\nif it was not possible to create a directory at the given\npath"
] |
public Topic getTopicInfo(String topicId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_TOPICS_GET_INFO);
parameters.put("topic_id", topicId);
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element topicElement = response.getPayload();
return parseTopic(topicElement);
} | [
"Get info for a given topic\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@return A group topic\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.topics.getInfo.html\">API Documentation</a>"
] | [
"Determine which field the Activity ID has been mapped to.\n\n@param map field map\n@return field",
"Called when app's singleton registry has been initialized",
"Modies the matrix to make sure that at least one element in each column has a value",
"Retrieves a byte value from the property data.\n\n@param type Type identifier\n@return byte value",
"Collect the URIs of resources, that are referenced by the given description.\n@return the list of referenced URIs. Never <code>null</code>.",
"Will prompt a user the \"Add to Homescreen\" feature\n\n@param callback A callback function after the method has been executed.",
"Adds a step to the steps.\n\n@param name {@link String} name of the step\n@param robot {@link String} name of the robot used by the step.\n@param options {@link Map} extra options required for the step.",
"Rollback an app to a specific release.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param releaseUuid Release UUID. See {@link #listReleases} for a list of the app's releases.\n@return the release object",
"Overrides the superclass implementation to allow the AttributeDefinition for each field in the\nobject to in turn resolve that field.\n\n{@inheritDoc}"
] |
public JSONObject getPathFromEndpoint(String pathValue, String requestType) throws Exception {
int type = getRequestTypeFromString(requestType);
String url = BASE_PATH;
JSONObject response = new JSONObject(doGet(url, null));
JSONArray paths = response.getJSONArray("paths");
for (int i = 0; i < paths.length(); i++) {
JSONObject path = paths.getJSONObject(i);
if (path.getString("path").equals(pathValue) && path.getInt("requestType") == type) {
return path;
}
}
return null;
} | [
"Retrieves the path using the endpoint value\n\n@param pathValue - path (endpoint) value\n@param requestType - \"GET\", \"POST\", etc\n@return Path or null\n@throws Exception exception"
] | [
"Removes a node meta data entry.\n\n@param key - the meta data key\n@throws GroovyBugError if the key is null",
"Use this API to fetch all the responderhtmlpage resources that are configured on netscaler.",
"Gets whether this registration has an alternative wildcard registration",
"Try to extract a numeric version from a collection of strings.\n\n@param versionStrings Collection of string properties.\n@return The version string if exists in the collection.",
"Find any standard methods the user has 'underridden' in their type.",
"Add a range to an exception, ensure that we don't try to add null ranges.\n\n@param exception target exception\n@param start exception start\n@param finish exception finish",
"Send ourselves \"updates\" about any tracks that were loaded before we started, since we missed them.",
"Internal method that adds a metadata provider to the set associated with a particular hash key, creating the\nset if needed.\n\n@param key the hashKey identifying the media for which this provider can offer metadata (or the empty string if\nit can offer metadata for all media)\n@param provider the metadata provider to be added to the active set",
"Returns the type discriminator value for given Frames model class, extracted from the @TypeValue annotation."
] |
Subsets and Splits