query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public Map<BsonValue, ChangeEvent<BsonDocument>> getEventsForNamespace(
final MongoNamespace namespace
) {
this.instanceLock.readLock().lock();
final NamespaceChangeStreamListener streamer;
try {
streamer = nsStreamers.get(namespace);
} finally {
this.instanceLock.readLock().unlock();
}
if (streamer == null) {
return new HashMap<>();
}
return streamer.getEvents();
} | [
"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."
] | [
"Use this API to fetch ipset_nsip6_binding resources of given name .",
"Determine the common ancestor of the given classes, if any.\n@param clazz1 the class to introspect\n@param clazz2 the other class to introspect\n@return the common ancestor (i.e. common superclass, one interface\nextending the other), or {@code null} if none found. If any of the\ngiven classes is {@code null}, the other class will be returned.\n@since 2.0",
"adds all json extension to an diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Get the real Object for already materialized Handler\n\n@param objectOrProxy\n@return Object or null if the Handel is not materialized",
"Draw text in the center of the specified box.\n\n@param text text\n@param font font\n@param box box to put text int\n@param fontColor colour",
"Use this API to update nsrpcnode.",
"Get a property as a boolean or throw exception.\n\n@param key the property name",
"Attaches a morph to scene object with a base mesh\n@param sceneObj is the base mesh.\n@throws IllegalStateException if component is null\n@throws IllegalStateException if mesh is null\n@throws IllegalStateException if material is null",
"Add an additional SSExtension\n@param ssExt the ssextension to set"
] |
public OAuth1RequestToken getRequestToken(String callbackUrl) {
String callback = (callbackUrl != null) ? callbackUrl : OUT_OF_BOUND_AUTH_METHOD;
OAuth10aService service = new ServiceBuilder(apiKey)
.apiSecret(sharedSecret)
.callback(callback)
.build(FlickrApi.instance());
try {
return service.getRequestToken();
} catch (IOException | InterruptedException | ExecutionException e) {
throw new FlickrRuntimeException(e);
}
} | [
"Get the OAuth request token - this is step one of authorization.\n\n@param callbackUrl\noptional callback URL - required for web auth flow, will be set to \"oob\" if not specified.\n@return the {@link OAuth1RequestToken}, store this for when the user returns from the Flickr website."
] | [
"Populate a resource assignment.\n\n@param record MPX record\n@param assignment resource assignment\n@throws MPXJException",
"Remove a custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object",
"Adjusts the day in the provided month, that it fits the specified week day.\nIf there's no match for that provided month, the next possible month is checked.\n\n@param date the date to adjust, with the correct year and month already set.",
"Gets next node in the DAG which has no dependency or all of it's dependencies are resolved and\nready to be consumed.\n\n@return next node or null if all the nodes have been explored or no node is available at this moment.",
"Uses data from a bar to populate a task.\n\n@param row bar data\n@param task task to populate",
"Determine if a job name and job type are valid.\n@param jobName the name of the job\n@param jobType the class of the job\n@throws IllegalArgumentException if the name or type are invalid",
"When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command returns the number of elements in the sorted set with a value in the given range.\n@param lexRange\n@return the number of elements in the specified range.",
"Appends the query part for the facet to the query string.\n@param query The current query string.\n@param name The name of the facet parameter, e.g. \"limit\", \"order\", ....\n@param value The value to set for the parameter specified by name.",
"Process the hours and exceptions for an individual calendar.\n\n@param calendar project calendar\n@param calendarData hours and exception rows for this calendar"
] |
public static vlan get(nitro_service service, Long id) throws Exception{
vlan obj = new vlan();
obj.set_id(id);
vlan response = (vlan) obj.get_resource(service);
return response;
} | [
"Use this API to fetch vlan resource of given name ."
] | [
"Count the number of queued resource requests for a specific pool.\n\n@param key The key\n@return The count of queued resource requests. Returns 0 if no queue\nexists for given key.",
"Use this API to convert sslpkcs8.",
"Sets the value if the date only should be shown.\n@param dateOnly if the date only should be shown",
"Cache key calculation.\n@param sql\n@param resultSetType\n@param resultSetConcurrency\n@return cache key",
"Deletes an object from the database.\nIt must be executed in the context of an open transaction.\nIf the object is not persistent, then ObjectNotPersistent is thrown.\nIf the transaction in which this method is executed commits,\nthen the object is removed from the database.\nIf the transaction aborts,\nthen the deletePersistent operation is considered not to have been executed,\nand the target object is again in the database.\n@param\tobject\tThe object to delete.",
"This method writes task data to a JSON file.\nNote that we write the task hierarchy in order to make rebuilding the hierarchy easier.",
"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",
"Use this API to fetch all the configstatus resources that are configured on netscaler.",
"We have more input since wait started"
] |
public static String strMapToStr(Map<String, String> map) {
StringBuilder sb = new StringBuilder();
if (map == null || map.isEmpty())
return sb.toString();
for (Entry<String, String> entry : map.entrySet()) {
sb.append("< " + entry.getKey() + ", " + entry.getValue() + "> ");
}
return sb.toString();
} | [
"Str map to str.\n\n@param map\nthe map\n@return the string"
] | [
"Clear any custom configurations to Redwood\n@return this",
"Use this API to clear nspbr6.",
"Transforms each character from this reader by passing it to the given\nclosure. The Closure should return each transformed character, which\nwill be passed to the Writer. The reader and writer will be both be\nclosed before this method returns.\n\n@param self a Reader object\n@param writer a Writer to receive the transformed characters\n@param closure a closure that performs the required transformation\n@throws IOException if an IOException occurs.\n@since 1.5.0",
"It is possible for the QR algorithm to get stuck in a loop because of symmetries. This happens\nmore often with larger matrices. By taking a random step it can break the symmetry and finish.",
"Calculates a column title using camel humps to separate words.\n@param _property the property descriptor.\n@return the column title for the given property.",
"Remove the given pair from a given map for obtaining a new map.\n\n<p>\nIf the given key is inside the map, but is not mapped to the given value, the\nmap will not be changed.\n</p>\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the map to consider.\n@param right the entry (key, value) to remove from the map.\n@return an immutable map with the content of the map and with the given entry.\n@throws IllegalArgumentException - when the right operand key exists in the left operand.\n@since 2.15",
"It's enough to just set the disabled attribute on the\nelement, but we want to also add a \"disabled\" class so that we can\nstyle it.\n\nAt some point we'll just be able to use .button:disabled,\nbut that doesn't work in IE8-",
"Returns formatted version of Iban.\n\n@return A string representing formatted Iban for printing.",
"Uncompresses the textual contents in the given map and and writes them to the files\ndenoted by the keys of the map.\n\n@param dir The base directory into which the files will be written\n@param contents The map containing the contents indexed by the filename\n@throws IOException If an error occurred"
] |
public static Thumbor create(String host, String key) {
if (key == null || key.length() == 0) {
throw new IllegalArgumentException("Key must not be blank.");
}
return new Thumbor(host, key);
} | [
"Create a new instance for the specified host and encryption key.\n\n@see #create(String)"
] | [
"Remove the corresponding object from session AND application cache.",
"Fill queue.\n\n@param item the item\n@param minStartPosition the min start position\n@param maxStartPosition the max start position\n@param minEndPosition the min end position\n@throws IOException Signals that an I/O exception has occurred.",
"Search for the second entry in the second database. Use this method for databases configured with no duplicates.\n\n@param second second key (value for first).\n@return null if no entry found, otherwise the value.",
"Calculate the layout container size along the axis\n@param axis {@link Axis}\n@return size",
"Add a range to this LOD group. Specify the scene object that should be displayed in this\nrange. Add the LOG group as a component to the parent scene object. The scene objects\nassociated with each range will automatically be added as children to the parent.\n@param range show the scene object if the camera distance is greater than this value\n@param sceneObject scene object that should be rendered when in this range\n@throws IllegalArgumentException if range is negative or sceneObject null",
"Await the completion of all currently active operations.\n\n@param timeout the timeout\n@param unit the time unit\n@return {@code } false if the timeout was reached and there were still active operations\n@throws InterruptedException",
"Use this API to fetch auditnslogpolicy_systemglobal_binding resources of given name .",
"add trace information for received frame",
"Generates a JSON patch for transforming the source node into the target node.\n\n@param source the node to be patched\n@param target the expected result after applying the patch\n@param replaceMode the replace mode to be used\n@return the patch as a {@link JsonPatch}"
] |
private boolean renameKeyForAllLanguages(String oldKey, String newKey) {
try {
loadAllRemainingLocalizations();
lockAllLocalizations(oldKey);
if (hasDescriptor()) {
lockDescriptor();
}
} catch (CmsException | IOException e) {
LOG.error(e.getLocalizedMessage(), e);
return false;
}
for (Entry<Locale, SortedProperties> entry : m_localizations.entrySet()) {
SortedProperties localization = entry.getValue();
if (localization.containsKey(oldKey)) {
String value = localization.getProperty(oldKey);
localization.remove(oldKey);
localization.put(newKey, value);
m_changedTranslations.add(entry.getKey());
}
}
if (hasDescriptor()) {
CmsXmlContentValueSequence messages = m_descContent.getValueSequence(
Descriptor.N_MESSAGE,
Descriptor.LOCALE);
for (int i = 0; i < messages.getElementCount(); i++) {
String prefix = messages.getValue(i).getPath() + "/";
String key = m_descContent.getValue(prefix + Descriptor.N_KEY, Descriptor.LOCALE).getStringValue(m_cms);
if (key == oldKey) {
m_descContent.getValue(prefix + Descriptor.N_KEY, Descriptor.LOCALE).setStringValue(m_cms, newKey);
break;
}
}
m_descriptorHasChanges = true;
}
m_keyset.renameKey(oldKey, newKey);
return true;
} | [
"Rename a key for all languages.\n@param oldKey the key to rename\n@param newKey the new key name\n@return <code>true</code> if renaming was successful, <code>false</code> otherwise."
] | [
"Use this API to delete sslcertkey.",
"Parses a raw WBS value from the database and breaks it into\ncomponent parts ready for formatting.\n\n@param value raw WBS value",
"Get a timer of the given string name and todos for the current thread. If\nno such timer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@return timer",
"Marks a given list of statements for insertion into the current document.\nInserted statements can have an id if they should update an existing\nstatement, or use an empty string as id if they should be added. The\nmethod removes duplicates and avoids unnecessary modifications by\nchecking the current content of the given document before marking\nstatements for being written.\n\n@param currentDocument\nthe document with the current statements\n@param addStatements\nthe list of new statements to be added",
"Calls the httpHandler method.",
"Sets the the time of day\n\n@param hours the hours to set. Must be guaranteed to parse as an\ninteger between 0 and 23\n\n@param minutes the minutes to set. Must be guaranteed to parse as\nan integer between 0 and 59\n\n@param seconds the optional seconds to set. Must be guaranteed to parse as\nan integer between 0 and 59\n\n@param amPm the meridian indicator to use. Must be either 'am' or 'pm'\n\n@param zoneString the time zone to use in one of two formats:\n- zoneinfo format (America/New_York, America/Los_Angeles, etc)\n- GMT offset (+05:00, -0500, +5, etc)",
"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.",
"Creates a Profile object from a SQL resultset\n\n@param result resultset containing the profile\n@return Profile\n@throws Exception exception",
"Request metadata for a specific track ID, given a dbserver connection to a player that has already been set up.\nSeparated into its own method so it could be used multiple times with the same connection when gathering\nall track metadata.\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@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved metadata, or {@code null} if there is no such track\n\n@throws IOException if there is a communication problem\n@throws InterruptedException if the thread is interrupted while trying to lock the client for menu operations\n@throws TimeoutException if we are unable to lock the client for menu operations"
] |
public static <T> ManagedBean<T> of(BeanAttributes<T> attributes, EnhancedAnnotatedType<T> clazz, BeanManagerImpl beanManager) {
return new ManagedBean<T>(attributes, clazz, createId(attributes, clazz), beanManager);
} | [
"Creates a simple, annotation defined Web Bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return A Web Bean"
] | [
"Removes file from your assembly.\n\n@param name field name of the file to remove.",
"Gets the health memory.\n\n@return the health memory",
"This method is called to alert project listeners to the fact that\na resource assignment has been read from a project file.\n\n@param resourceAssignment resourceAssignment instance",
"Return true if the expression is a constructor call on a class that matches the supplied.\n@param expression - the expression\n@param classNamePattern - the possible List of class names\n@return as described",
"A helper - in Java 9, the extension CL was renamed to platform CL and hosts all the JDK classes. Before 9, it was useless and we used\nbootstrap CL instead.\n\n@return the base CL to use.",
"Log column data.\n\n@param column column data",
"Create an error image should an error occur while fetching a WMS map.\n\n@param width image width\n@param height image height\n@param e exception\n@return error image\n@throws java.io.IOException oops",
"Turn this profile on or off\n\n@param enabled true or false\n@return true on success, false otherwise",
"Add raw SQL \"ORDER BY\" clause to the SQL query statement.\n\n@param rawSql\nThe raw SQL order by clause. This should not include the \"ORDER BY\"."
] |
private static void bodyWithConcatenation(
SourceBuilder code,
Map<Property, PropertyCodeGenerator> generatorsByProperty,
String typename) {
code.add(" return \"%s{", typename);
String prefix = "";
for (Property property : generatorsByProperty.keySet()) {
PropertyCodeGenerator generator = generatorsByProperty.get(property);
code.add("%s%s=\" + %s + \"",
prefix, property.getName(), (Excerpt) generator::addToStringValue);
prefix = ", ";
}
code.add("}\";%n");
} | [
"Generate the body of a toString method that uses plain concatenation.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\nalways present, this can be done with a long block of unconditional code. We could use a\nStringBuilder for this, but in fact the Java compiler will do this for us under the hood\nif we use simple string concatenation, so we use the more readable approach."
] | [
"Returns the number of days from the given weekday to the next weekday the event should occur.\n@param weekDay the current weekday.\n@return the number of days to the next weekday an event could occur.",
"Get the log if exists or return null\n\n@param topic topic name\n@param partition partition index\n@return a log for the topic or null if not exist",
"Returns the temporary directory used by java.\n\n@return The temporary directory\n@throws IOException If an io error occurred",
"Sends out the SQL as defined in the config upon first init of the connection.\n@param connection\n@param initSQL\n@throws SQLException",
"Gets a SerialMessage with the BASIC SET command\n@param the level to set.\n@return the serial message",
"Returns the primary message codewords for mode 2.\n\n@param postcode the postal code\n@param country the country code\n@param service the service code\n@return the primary message, as codewords",
"Retrieves the timephased breakdown of cost.\n\n@return timephased cost",
"Copies file from a resource to a local temp file\n\n@param sourceResource\n@return Absolute filename of the temp file\n@throws Exception",
"Obtain newline-delimited headers from response\n\n@param response HttpServletResponse to scan\n@return newline-delimited headers"
] |
public static String determineFieldName(@Nonnull final String methodName) {
Check.notEmpty(methodName, "methodName");
final Matcher m = PATTERN.matcher(methodName);
Check.stateIsTrue(m.find(), "passed method name '%s' is not applicable", methodName);
return m.group(2).substring(0, 1).toLowerCase() + m.group(2).substring(1);
} | [
"Determines the field name based on an accessor method name.\n\n@param methodName\nan accessor method name\n@return the resulting field name"
] | [
"Get the scale at the given index.\n\n@param index the index of the zoom level to access.\n@param unit the unit.",
"Called by implementation class once websocket connection established\nat networking layer.\n@param context the websocket context",
"Add a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param newHash the new hash of the added content\n@return the builder",
"Called on mouse up in the caption area, ends dragging by ending event\ncapture.\n\n@param event the mouse up event that ended dragging\n\n@see DOM#releaseCapture\n@see #beginDragging\n@see #endDragging",
"Check whether we have diverged from what we would predict from the last update that was sent to a particular\ntrack position listener.\n\n@param lastUpdate the last update that was sent to the listener\n@param currentUpdate the latest update available for the same player\n\n@return {@code true }if the listener will have diverged by more than our permitted amount of slack, and so\nshould be updated",
"Mark objects no longer available in collection for delete and new objects for insert.\n\n@param broker the PB to persist all objects",
"Returns the vertex points in this hull.\n\n@return array of vertex points\n@see QuickHull3D#getVertices(double[])\n@see QuickHull3D#getFaces()",
"This method decodes a byte array with the given encryption code\nusing XOR encryption.\n\n@param data Source data\n@param encryptionCode Encryption code",
"Removes a corporate groupId from an Organisation\n\n@param organizationId String\n@param corporateGroupId String"
] |
@Override public void setID(Integer val)
{
ProjectFile parent = getParentFile();
Integer previous = getID();
if (previous != null)
{
parent.getResources().unmapID(previous);
}
parent.getResources().mapID(val, this);
set(ResourceField.ID, val);
} | [
"Sets ID field value.\n\n@param val value"
] | [
"In the 2.0 xsd the vault is in an external file, which has no namespace, using the output of the vault tool.\n\n@param f the file containing the external vault configuration as generated by the vault tool\n@return the vault config",
"Retrieves the task mode.\n\n@return task mode",
"Returns an empty map with expected size matching the iterable size if\nit's of type Collection. Otherwise, an empty map with the default size is\nreturned.",
"Return configuration tweaks in a format appropriate for ness-jdbc DatabaseModule.",
"Private helper method which decodes the Stitch error from the body of an HTTP `Response`\nobject. If the error is successfully decoded, this function will throw the error for the end\nuser to eventually consume. If the error cannot be decoded, this is likely not an error from\nthe Stitch server, and this function will return an error message that the calling function\nshould use as the message of a StitchServiceException with an unknown code.",
"Initializes the external child resource collection.",
"Adds the given reference to the list of references that should still be\nserialized, and returns the RDF resource that will be used as a subject.\n\n@param reference\nthe reference to be serialized\n@return RDF resource that represents this reference",
"Closes off this connection\n@param connection to close",
"Flushes all changes to disk."
] |
private Double getDouble(Number number)
{
Double result = null;
if (number != null)
{
result = Double.valueOf(number.doubleValue());
}
return result;
} | [
"Formats a double value.\n\n@param number numeric value\n@return Double instance"
] | [
"Sets the offset for the animation.\n\n@param startOffset animation will start at the specified offset value\n\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code startOffset} is either negative or greater than\nthe animation duration",
"Give an embedded association, creates all the nodes and relationships required to represent it.\nIt assumes that the entity node containing the association already exists in the db.\n\n@param executionEngine the {@link GraphDatabaseService} to run the query\n@param associationKey the {@link AssociationKey} identifying the association\n@param embeddedKey the {@link EntityKey} identifying the embedded component\n@return the created {@link Relationship} that represents the association",
"Emit a event object with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(EventObject, Object...)",
"Print duration in tenths of minutes.\n\n@param duration Duration instance\n@return duration in tenths of minutes",
"Takes a matrix and splits it into a set of row or column vectors.\n\n@param A original matrix.\n@param column If true then column vectors will be created.\n@return Set of vectors.",
"Set up server for report directory.",
"Replace full request content.\n\n@param requestContentTemplate\nthe request content template\n@param replacementString\nthe replacement string\n@return the string",
"Searches for brackets which are only used to construct new matrices by concatenating\n1 or more matrices together",
"return a prepared Update Statement fitting to the given ClassDescriptor"
] |
@SuppressWarnings("WeakerAccess")
protected boolean isJettyWithJMX(ClassLoaderLeakPreventor preventor) {
final ClassLoader classLoader = preventor.getClassLoader();
try {
// If package org.eclipse.jetty is found, we may be running under jetty
if (classLoader.getResource("org/eclipse/jetty") == null) {
return false;
}
Class.forName("org.eclipse.jetty.jmx.MBeanContainer", false, classLoader.getParent()); // JMX enabled?
Class.forName("org.eclipse.jetty.webapp.WebAppContext", false, classLoader.getParent());
}
catch(Exception ex) { // For example ClassNotFoundException
return false;
}
// Seems we are running in Jetty with JMX enabled
return true;
} | [
"Are we running in Jetty with JMX enabled?"
] | [
"Unregister all MBeans",
"Sets the request body to the contents of a String.\n\n<p>If the contents of the body are large, then it may be more efficient to use an {@link InputStream} instead of\na String. Using a String requires that the entire body be in memory before sending the request.</p>\n\n@param body a String containing the contents of the body.",
"Get transformer to use.\n\n@return transformation to apply",
"Remove any device announcements that are so old that the device seems to have gone away.",
"Converts a tab delimited string into an object with given fields\nRequires the object has setXxx functions for the specified fields\n\n@param objClass Class of object to be created\n@param str string to convert\n@param delimiterRegex delimiter regular expression\n@param fieldNames fieldnames\n@param <T> type to return\n@return Object created from string",
"Read a single duration field extended attribute.\n\n@param row field data",
"Checks if the date is a holiday\n\n@param dateString the date\n@return true if it is a holiday, false otherwise",
"Reads the given text stream and compressed its content.\n\n@param stream The input stream\n@return A byte array containing the GZIP-compressed content of the stream\n@throws IOException If an error ocurred",
"Convert the continuous values into discrete values by chopping up\nthe distribution into several equally-sized intervals."
] |
protected void deleteConflictingResources(CmsObject cms, CmsModule module, Map<CmsUUID, CmsUUID> conflictingIds)
throws CmsException, Exception {
CmsProject conflictProject = cms.createProject(
"Deletion of conflicting resources for " + module.getName(),
"Deletion of conflicting resources for " + module.getName(),
OpenCms.getDefaultUsers().getGroupAdministrators(),
OpenCms.getDefaultUsers().getGroupAdministrators(),
CmsProject.PROJECT_TYPE_TEMPORARY);
CmsObject deleteCms = OpenCms.initCmsObject(cms);
deleteCms.getRequestContext().setCurrentProject(conflictProject);
for (CmsUUID vfsId : conflictingIds.values()) {
CmsResource toDelete = deleteCms.readResource(vfsId, CmsResourceFilter.ALL);
lock(deleteCms, toDelete);
deleteCms.deleteResource(toDelete, CmsResource.DELETE_PRESERVE_SIBLINGS);
}
OpenCms.getPublishManager().publishProject(deleteCms);
OpenCms.getPublishManager().waitWhileRunning();
} | [
"Deletes and publishes resources with ID conflicts.\n\n@param cms the CMS context to use\n@param module the module\n@param conflictingIds the conflicting ids\n@throws CmsException if something goes wrong\n@throws Exception if something goes wrong"
] | [
"Emit a string event with parameters.\n\nThis will invoke all {@link SimpleEventListener} bound to the specified\nstring value given the listeners has the matching argument list.\n\nFor example, suppose we have the following simple event listener methods:\n\n```java\n{@literal @}On(\"USER-LOGIN\")\npublic void logUserLogin(User user, long timestamp) {...}\n\n{@literal @}On(\"USER-LOGIN\")\npublic void checkDuplicateLoginAttempts(User user, Object... args) {...}\n\n{@literal @}On(\"USER-LOGIN\")\npublic void foo(User user) {...}\n```\n\nThe following code will invoke `logUserLogin` and `checkDuplicateLoginAttempts` methods:\n\n```java\nUser user = ...;\neventBus.emit(\"USER-LOGIN\", user, System.currentTimeMills());\n```\n\nThe `foo(User)` will not invoked because:\n\n* The parameter list `(User, long)` does not match the declared argument list `(User)`.\nHere the `String` in the parameter list is taken out because it is used to indicate\nthe event, instead of being passing through to the event handler method.\n* The method `checkDuplicateLoginAttempts(User, Object ...)` will be invoked because\nit declares a varargs typed arguments, meaning it matches any parameters passed in.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener",
"Set an enterprise text value.\n\n@param index text index (1-40)\n@param value text value",
"Serialize specified object to directory with specified name.\n\n@param directory write to\n@param name serialize object with specified name\n@param obj object to serialize\n@return number of bytes written to directory",
"Retrieves a field type from a location in a data block.\n\n@param data data block\n@param offset offset into data block\n@return field type",
"Load the given class using a specific class loader.\n\n@param className The name of the class\n@param cl The Class Loader to be used for finding the class.\n@return The class object",
"This is the probability density function for the Gaussian\ndistribution.",
"Attempt to send the specified field to the dbserver.\nThis low-level function is available only to the package itself for use in setting up the connection. It was\npreviously also used for sending parts of larger-scale messages, but because that sometimes led to them being\nfragmented into multiple network packets, and Windows rekordbox cannot handle that, full message sending no\nlonger uses this method.\n\n@param field the field to be sent\n\n@throws IOException if the field cannot be sent",
"Checks all data sets in a given record for constraint violations.\n\n@param record\nIIM record (1,2,3, ...) to check\n\n@return list of constraint violations, empty set if IIM file is valid",
"Obtains a local date in Coptic calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Coptic era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Coptic local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code CopticEra}"
] |
protected int complete(CommandContext ctx, ParsedCommandLine parsedCmd, OperationCandidatesProvider candidatesProvider, final String buffer, int cursor, List<String> candidates) {
if(parsedCmd.isRequestComplete()) {
return -1;
}
// Headers completion
if(parsedCmd.endsOnHeaderListStart() || parsedCmd.hasHeaders()) {
return completeHeaders(ctx, parsedCmd, candidatesProvider, buffer, cursor, candidates);
}
// Completed.
if(parsedCmd.endsOnPropertyListEnd()) {
return buffer.length();
}
// Complete properties
if (parsedCmd.hasProperties() || parsedCmd.endsOnPropertyListStart()
|| parsedCmd.endsOnNotOperator()) {
return completeProperties(ctx, parsedCmd, candidatesProvider, buffer, candidates);
}
// Complete Operation name
if (parsedCmd.hasOperationName() || parsedCmd.endsOnAddressOperationNameSeparator()) {
return completeOperationName(ctx, parsedCmd, candidatesProvider, buffer, candidates);
}
// Finally Complete address
return completeAddress(ctx, parsedCmd, candidatesProvider, buffer, candidates);
} | [
"Complete both operations and commands."
] | [
"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",
"multi-field string",
"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",
"Used by dataformats if they need to load a class\n\n@param classname the name of the\n@param dataFormat\n@return",
"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",
"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",
"Determine if a CharSequence can be parsed as an Integer.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isInteger(String)\n@since 1.8.2",
"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",
"Log a message at the provided level."
] |
public PhotoList<Photo> getPopularPhotos(Date date, StatsSort sort, int perPage, int page) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_POPULAR_PHOTOS);
if (date != null) {
parameters.put("date", String.valueOf(date.getTime() / 1000L));
}
if (sort != null) {
parameters.put("sort", sort.name());
}
addPaginationParameters(parameters, perPage, page);
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
return parsePopularPhotos(response);
} | [
"List the photos with the most views, comments or favorites.\n\n@param date\n(Optional) 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. If no date is provided, all time view counts will be returned.\n@param sort\n(Optional) The order in which to sort returned photos. Defaults to views. The possible values are views, comments and favorites. Other sort\noptions are available through flickr.photos.search.\n@param perPage\n(Optional) Number of referrers 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@throws FlickrException\n@see \"http://www.flickr.com/services/api/flickr.stats.getPopularPhotos.html\""
] | [
"Gathers the pk fields from the hierarchy of the given class, and copies them into the class.\n\n@param classDef The root of the hierarchy\n@throws ConstraintException If there is a conflict between the pk fields",
"Returns the item at the specified position.\n\n@param position index of the item to return\n@return the item at the specified position or {@code null} when not found",
"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.",
"Removes an Object from the cache.",
"Computes the distance from a point p to the plane of this face.\n\n@param p\nthe point\n@return distance from the point to the plane",
"Utility function that constructs AdminClient.\n\n@param url URL pointing to the bootstrap node\n@return Newly constructed AdminClient",
"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.",
"Sets the options contained in the DJCrosstab to the JRDesignCrosstab.\nAlso fits the correct width",
"Use this API to update bridgetable."
] |
private void writeCustomField(CustomField field) throws IOException
{
if (field.getAlias() != null)
{
m_writer.writeStartObject(null);
m_writer.writeNameValuePair("field_type_class", field.getFieldType().getFieldTypeClass().name().toLowerCase());
m_writer.writeNameValuePair("field_type", field.getFieldType().name().toLowerCase());
m_writer.writeNameValuePair("field_alias", field.getAlias());
m_writer.writeEndObject();
}
} | [
"Write attributes for an individual custom field.\nNote that at present we are only writing a subset of the\navailable data... in this instance the field alias.\nIf the field does not have an alias we won't write an\nentry.\n\n@param field custom field to write\n@throws IOException"
] | [
"Returns the value of the sum of discounted cash flows of the bond where\nthe discounting is done with the given reference curve and an additional spread.\nThis method can be used for optimizer.\n\n@param evaluationTime The evaluation time as double. Cash flows prior and including this time are not considered.\n@param referenceCurve The reference curve used for discounting the coupon payments.\n@param spread The spread which should be added to the discount curve.\n@param model The model under which the product is valued.\n@return The value of the bond for the given curve and spread.",
"Process the scheduling project property from PROJPROP. This table only seems to exist\nin P6 databases, not XER files.\n\n@throws SQLException",
"Removing surrounding space in image. Get trim color from specified pixel.\n@param value orientation from where to get the pixel color.\n@param colorTolerance 0 - 442. This is the euclidian distance\nbetween the colors of the reference pixel and the surrounding pixels is used.\nIf the distance is within the tolerance they'll get trimmed.",
"Use this API to unset the properties of sslocspresponder resource.\nProperties that need to be unset are specified in args array.",
"Clean up the environment object for the given storage engine",
"Groups the current element according to the value\n\n@param answer the map containing the results\n@param element the element to be placed\n@param value the value according to which the element will be placed\n@since 1.5.0",
"Calculates Sine value of the complex number.\n\n@param z1 A Complex Number instance.\n@return Returns new ComplexNumber instance containing the Sine value of the specified complex number.",
"Determine the size of a field in a fixed data block.\n\n@param type field data type\n@return field size in bytes",
"Computes the QR decomposition of A and store the results in A.\n\n@param A The A matrix in the linear equation. Modified. Reference saved.\n@return true if the decomposition was successful."
] |
public DiscreteInterval plus(DiscreteInterval other) {
return new DiscreteInterval(this.min + other.min, this.max + other.max);
} | [
"Returns an interval representing the addition of the\ngiven interval with this one.\n@param other interval to add to this one\n@return interval sum"
] | [
"Restores a trashed file back to its original location.\n@param fileID the ID of the trashed file.\n@return info about the restored file.",
"Replaces the model used to depict the controller in the scene.\n\n@param controllerModel root of hierarchy to use for controller model\n@see #getControllerModel()\n@see #showControllerModel(boolean)",
"Set the attributes of a feature.\n\n@param feature the feature\n@param attributes the attributes\n@throws LayerException oops",
"Appends formatted text to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).\n<li> {@link Class}, {@link TypeElement}, {@link DeclaredType} and {@link QualifiedName}\ninstances use their qualified names where necessary, or shorter versions if a suitable\nimport line can be added.\n<li> {@link Excerpt} instances have {@link Excerpt#addTo(SourceBuilder)} called.\n</ul>",
"Use this API to fetch nsacl6 resource of given name .",
"Gets the uuid from response.\n\n@param myResponse\nthe my response\n@return the uuid from response",
"Confirms that both clusters have the same number of nodes by comparing\nset of node Ids between clusters.\n\n@param lhs\n@param rhs",
"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\"",
"Checks if this service implementation accepts the given resource path.\n@param resourcePath Resource path\n@return true if the implementation matches and the configuration is not invalid."
] |
protected ValueContainer[] getAllValues(ClassDescriptor cld, Object obj) throws PersistenceBrokerException
{
return m_broker.serviceBrokerHelper().getAllRwValues(cld, obj);
} | [
"returns an array containing values for all the Objects attribute\n@throws PersistenceBrokerException if there is an erros accessing obj field values"
] | [
"Set an enterprise text value.\n\n@param index text index (1-40)\n@param value text value",
"Read the values from the output object and write them to the values object.\n\n@param output the output object from a processor\n@param processor the processor the output if from\n@param values the object for sharing values between processors",
"This is pretty ugly. We end up mimicking the request logic here, so this\nneeds to stay in sync with handleRequest.",
"Use this API to fetch vpntrafficpolicy_aaagroup_binding resources of given name .",
"Get a collection of public groups for the user.\n\nThe groups will contain only the members nsid, name, admin and eighteenplus. If you want the whole group-information, you have to call\n{@link com.flickr4java.flickr.groups.GroupsInterface#getInfo(String)}.\n\nThis method does not require authentication.\n\n@param userId\nThe user ID\n@return The public groups\n@throws FlickrException",
"Find the current active layout.\n\n@param phoenixProject phoenix project data\n@return current active layout",
"Read filename from spec.",
"Convert a Identification to a By used in WebDriver Drivers.\n\n@return the correct By specification of the current Identification.",
"Get the DMR path for this node. For leaves, the DMR path is the path of its parent.\n@return The DMR path for this node."
] |
public ItemRequest<Task> addFollowers(String task) {
String path = String.format("/tasks/%s/addFollowers", task);
return new ItemRequest<Task>(this, Task.class, path, "POST");
} | [
"Adds each of the specified followers to the task, if they are not already\nfollowing. Returns the complete, updated record for the affected task.\n\n@param task The task to add followers to.\n@return Request object"
] | [
"Ask the specified player for the beat grid of the track in the specified slot with the specified rekordbox ID,\nfirst checking if we have a cache we can use instead.\n\n@param track uniquely identifies the track whose beat grid is desired\n\n@return the beat grid, if any",
"Use this API to fetch all the vpath resources that are configured on netscaler.",
"Matches an array value if it contains all the elements of the argument array\n@param rhs The arguments\n@return PredicateExpression: $all rhs",
"Deletes the concrete representation of the specified object in the underlying\npersistence system. This method is intended for use in top-level api or\nby internal calls.\n\n@param obj The object to delete.\n@param ignoreReferences With this flag the automatic deletion/unlinking\nof references can be suppressed (independent of the used auto-delete setting in metadata),\nexcept {@link org.apache.ojb.broker.metadata.SuperReferenceDescriptor}\nthese kind of reference (descriptor) will always be performed. If <em>true</em>\nall \"normal\" referenced objects will be ignored, only the specified object is handled.\n@throws PersistenceBrokerException",
"Inserts a String value into the mapping of the underlying Bundle, replacing any existing value\nfor the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a String, or null\n@return this bundler instance to chain method calls",
"This produces the dotted hexadecimal format aaaa.bbbb.cccc",
"Adds an index to the table for the given index descriptor.\n\n@param indexDescDef The index descriptor\n@param tableDef The table",
"Complete timing the operation with the given identifier. If you had not previously started a timing operation with this identifier, then this\nwill effectively be a noop.",
"Convert MPX day index to Day instance.\n\n@param day day index\n@return Day instance"
] |
private double getExpectedProbability(double x)
{
double y = 1 / (standardDeviation * Math.sqrt(Math.PI * 2));
double z = -(Math.pow(x - mean, 2) / (2 * Math.pow(standardDeviation, 2)));
return y * Math.exp(z);
} | [
"This is the probability density function for the Gaussian\ndistribution."
] | [
"Only call async",
"Removes a child task.\n\n@param child child task instance",
"Retrieve the Activity ID value for this task.\n@param task Task instance\n@return Activity ID value",
"Tries to guess the packaging of the archive - whether it's an EAR, WAR, JAR.\nMaybe not needed as we can rely on the suffix?",
"Use this API to fetch all the vrid6 resources that are configured on netscaler.",
"Retrieve the default number of minutes per month.\n\n@return minutes per month",
"close the AdminPool, if no long required.\nAfter closed, all public methods will throw IllegalStateException",
"Adds JAXB WSDL extensions to allow work with custom\nWSDL elements such as \\\"partner-link\\\"\n\n@param bus CXF bus",
"Transform the root bone of the pose by the given matrix.\n@param trans matrix to transform the pose by."
] |
public static linkset_interface_binding[] get(nitro_service service, String id) throws Exception{
linkset_interface_binding obj = new linkset_interface_binding();
obj.set_id(id);
linkset_interface_binding response[] = (linkset_interface_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch linkset_interface_binding resources of given name ."
] | [
"Migrate to Jenkins \"Credentials\" plugin from the old credential implementation",
"FOR internal use. This method was called after the external transaction was completed.\n\n@see javax.transaction.Synchronization",
"Gets a color formatted as an integer with ARGB ordering.\n\n@param json {@link JSONObject} to get the color from\n@param elementName Name of the color element\n@return An ARGB formatted integer\n@throws JSONException",
"Performs a HTTP GET request.\n\n@return Class type of object T (i.e. {@link Response}",
"Resamples a trajectory\n@param t Trajectory to resample\n@param n Resample rate\n@return Returns a resampled trajectory which contains every n'th position of t",
"Returns the deployment names with the specified runtime names at the specified deploymentRootAddress.\n\n@param deploymentRootResource\n@param runtimeNames\n@return the deployment names with the specified runtime names at the specified deploymentRootAddress.",
"Use this API to fetch wisite_binding resource of given name .",
"If the DefaultActionInvocation has been executed before and the Result is\nan instance of ActionChainResult, this method will walk down the chain of\nActionChainResults until it finds a non-chain result, which will be\nreturned. If the DefaultActionInvocation's result has not been executed\nbefore, the Result instance will be created and populated with the result\nparams.\n\n@return a Result instance\n@throws Exception",
"Generate and return the list of statements to drop a database table."
] |
public List<Ticket> checkTickets(Set<String> tickets) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_CHECK_TICKETS);
StringBuffer sb = new StringBuffer();
Iterator<String> it = tickets.iterator();
while (it.hasNext()) {
if (sb.length() > 0) {
sb.append(",");
}
Object obj = it.next();
if (obj instanceof Ticket) {
sb.append(((Ticket) obj).getTicketId());
} else {
sb.append(obj);
}
}
parameters.put("tickets", sb.toString());
Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
// <uploader>
// <ticket id="128" complete="1" photoid="2995" />
// <ticket id="129" complete="0" />
// <ticket id="130" complete="2" />
// <ticket id="131" invalid="1" />
// </uploader>
List<Ticket> list = new ArrayList<Ticket>();
Element uploaderElement = response.getPayload();
NodeList ticketNodes = uploaderElement.getElementsByTagName("ticket");
int n = ticketNodes.getLength();
for (int i = 0; i < n; i++) {
Element ticketElement = (Element) ticketNodes.item(i);
String id = ticketElement.getAttribute("id");
String complete = ticketElement.getAttribute("complete");
boolean invalid = "1".equals(ticketElement.getAttribute("invalid"));
String photoId = ticketElement.getAttribute("photoid");
Ticket info = new Ticket();
info.setTicketId(id);
info.setInvalid(invalid);
info.setStatus(Integer.parseInt(complete));
info.setPhotoId(photoId);
list.add(info);
}
return list;
} | [
"Checks the status of one or more asynchronous photo upload tickets. This method does not require authentication.\n\n@param tickets\na set of ticket ids (Strings) or {@link Ticket} objects containing ids\n@return a list of {@link Ticket} objects.\n@throws FlickrException"
] | [
"Returns the first product found in the vector of calibration products\nwhich matches the given symbol, where symbol is the String set in\nthe calibrationSpecs.\n\n@param symbol A given symbol string.\n@return The product associated with that symbol.",
"The length of the region left to the completion offset that is part of the\nreplace region.",
"This method returns the length of overlapping time between two time\nranges.\n\n@param start1 start of first range\n@param end1 end of first range\n@param start2 start start of second range\n@param end2 end of second range\n@return overlapping time in milliseconds",
"Signal that all threads have run to completion, and the multithreaded\nenvironment is over.\n@param check The name of the thread group passed to startThreads()",
"Use this API to fetch filtered set of gslbservice resources.\nset the filter parameter values in filtervalue object.",
"Provides a method that compares two comparables using Groovy's\ndefault number aware comparator.\n\n@param self a Comparable\n@param other another Comparable\n@return a -ve number, 0 or a +ve number according to Groovy's compareTo contract\n@since 1.6.0",
"Use this API to fetch all the sslfipskey resources that are configured on netscaler.",
"Search for the second entry in the second database. Use this method for databases configured with no duplicates.\n\n@param second second key (value for first).\n@return null if no entry found, otherwise the value.",
"Use this API to delete systementitydata."
] |
public RgbaColor adjustHue(float degrees) {
float[] HSL = convertToHsl();
HSL[0] = hueCheck(HSL[0] + degrees); // ensure [0-360)
return RgbaColor.fromHsl(HSL);
} | [
"Returns a new color that has the hue adjusted by the specified\namount."
] | [
"called periodically to check that the heartbeat has been received\n\n@return {@code true} if we have received a heartbeat recently",
"A helper - in Java 9, the extension CL was renamed to platform CL and hosts all the JDK classes. Before 9, it was useless and we used\nbootstrap CL instead.\n\n@return the base CL to use.",
"Gets the '.disabled' file for a given version of this store. That file may or may not\nexist.\n\n@param version of the store for which to get the '.disabled' file.\n@return an instance of {@link File} pointing to the '.disabled' file.\n@throws PersistenceFailureException if the requested version cannot be found.",
"Detach a scope from its parent, this will trigger the garbage collection of this scope and it's\nsub-scopes\nif they are not referenced outside of Toothpick.\n\n@param name the name of the scope to close.",
"Sets the value for the API's \"sitefilter\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters",
"Adds the specified class to the internal class graph along with its\nrelations and dependencies, eventually inferring them, according to the\nOptions specified for this matcher\n@param cd",
"Returns a single parent of the given tag. If there are multiple parents, throws a WindupException.",
"Resets the state of the scope.\nUseful for automation testing when we want to reset the scope used to install test modules.",
"Add a given factory to the list of factories at the BEGINNING.\n\n@param factory The factory to be added.\n@return Cascade with amended factory list."
] |
private void addException(ProjectCalendar mpxjCalendar, net.sf.mpxj.ganttproject.schema.Date date)
{
String year = date.getYear();
if (year == null || year.isEmpty())
{
// In order to process recurring exceptions using MPXJ, we need a start and end date
// to constrain the number of dates we generate.
// May need to pre-process the tasks in order to calculate a start and finish date.
// TODO: handle recurring exceptions
}
else
{
Calendar calendar = DateHelper.popCalendar();
calendar.set(Calendar.YEAR, Integer.parseInt(year));
calendar.set(Calendar.MONTH, NumberHelper.getInt(date.getMonth()));
calendar.set(Calendar.DAY_OF_MONTH, NumberHelper.getInt(date.getDate()));
Date exceptionDate = calendar.getTime();
DateHelper.pushCalendar(calendar);
ProjectCalendarException exception = mpxjCalendar.addCalendarException(exceptionDate, exceptionDate);
// TODO: not sure how NEUTRAL should be handled
if ("WORKING_DAY".equals(date.getType()))
{
exception.addRange(ProjectCalendarWeek.DEFAULT_WORKING_MORNING);
exception.addRange(ProjectCalendarWeek.DEFAULT_WORKING_AFTERNOON);
}
}
} | [
"Add a single exception to a calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param date calendar exception"
] | [
"Wait and retry.",
"End building the prepared script\n@param config the configuration for the script to build\n@return the new {@link LuaPreparedScript} instance",
"Specifies the base URI of this conversion server.\n\n@param baseUri The URI under which this remote conversion server is reachable.\n@return This builder instance.",
"Checks the given reference descriptor.\n\n@param refDef The reference descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"Updates the information about this collaboration with any info fields that have been modified locally.\n\n@param info the updated info.",
"Reinitializes the shader texture used to fill in\nthe Circle upon drawing.",
"Creates the DAO if we have config information cached and caches the DAO.",
"Returns a flag indicating if also unreleased resources should be found.\n@return A flag indicating if also unreleased resources should be found.",
"Use this API to fetch dnssuffix resources of given names ."
] |
public static List<String> asListLines(String content) {
List<String> retorno = new ArrayList<String>();
content = content.replace(CARRIAGE_RETURN, RETURN);
content = content.replace(RETURN, CARRIAGE_RETURN);
for (String str : content.split(CARRIAGE_RETURN)) {
retorno.add(str);
}
return retorno;
} | [
"Split string content into list\n@param content String content\n@return list"
] | [
"Copied from AbstractEntityPersister",
"Checks if the given AnnotatedType is sensible, otherwise provides warnings.",
"A specific, existing tag can be deleted by making a DELETE request\non the URL for that tag.\n\nReturns an empty data record.\n\n@param tag The tag to delete.\n@return Request object",
"Copy the contents of the given String to the given output Writer.\nCloses the writer when done.\n@param in the String to copy from\n@param out the Writer to copy to\n@throws IOException in case of I/O errors",
"Add a new check box.\n@param date the date for the check box\n@param checkState the initial check state.",
"Set the model used by the right table.\n\n@param model table model",
"Rotate list of String. Used for randomize selection of received endpoints\n\n@param strings\nlist of Strings\n@return the same list in random order",
"Set text parameters from properties\n@param context Valid Android {@link Context}\n@param properties JSON text properties",
"Returns the z-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the z coordinate"
] |
public void addExtraInfo(String key, Object value) {
// Turn extraInfo into map
Map<String, Object> infoMap = (HashMap<String, Object>)getMapFromJSON(extraInfo);
// Add value
infoMap.put(key, value);
// Turn back into string
extraInfo = getJSONFromMap(infoMap);
} | [
"Add key value pair to extra info\n\n@param key Key of new item\n@param value New value to add"
] | [
"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",
"Initialization necessary for editing a property bundle.\n\n@throws CmsLoaderException thrown if loading a bundle file fails.\n@throws CmsException thrown if loading a bundle file fails.\n@throws IOException thrown if loading a bundle file fails.",
"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",
"find the middle point of two intersect points in circle,only one point will be correct\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return",
"Returns the name of the class to be instantiated.\n@param rs the Resultset\n@return null if the column is not available",
"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",
"Utility function that fetches system store definitions\n\n@return The map container that maps store names to store definitions",
"Gets a byte within this sequence of bytes\n\n@param i index into sequence\n@return byte\n@throws IllegalArgumentException if i is out of range",
"Load the available layers.\n\n@param image the installed image\n@param productConfig the product config to establish the identity\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the layers\n@throws IOException"
] |
public synchronized void start() {
if ((todoFlags & RECORD_CPUTIME) != 0) {
currentStartCpuTime = getThreadCpuTime(threadId);
} else {
currentStartCpuTime = -1;
}
if ((todoFlags & RECORD_WALLTIME) != 0) {
currentStartWallTime = System.nanoTime();
} else {
currentStartWallTime = -1;
}
isRunning = true;
} | [
"Start the timer."
] | [
"Process the start of this element.\n\n@param attributes The attribute list for this element\n@param namespace the namespace URI of the matching element, or an empty string if the parser is not namespace\naware or the element has no namespace\n@param name the local name if the parser is namespace aware, or just the element name otherwise\n@throws Exception if something goes wrong",
"Use this API to fetch all the lbvserver resources that are configured on netscaler.",
"Append the given String to the given String array, returning a new array\nconsisting of the input array contents plus the given String.\n\n@param array the array to append to (can be <code>null</code>)\n@param str the String to append\n@return the new array (never <code>null</code>)",
"as we know nothing has changed.",
"Return all server groups for a profile\n\n@param profileId ID of profile\n@return collection of ServerGroups for a profile",
"Use this API to unset the properties of csparameter resource.\nProperties that need to be unset are specified in args array.",
"Returns the WDTK datatype IRI for the property datatype as represented by\nthe given JSON datatype string.\n\n@param jsonDatatype\nthe JSON datatype string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known",
"Write the config to the writer.",
"Inject members into this instance and register the services afterwards.\n@see #getGuiceModule()\n@see #registerInRegistry(boolean)\n@since 2.1"
] |
public void start(String name)
{
GVRAnimator anim = findAnimation(name);
if (name.equals(anim.getName()))
{
start(anim);
return;
}
} | [
"Starts the named animation.\n@see GVRAvatar#stop(String)\n@see GVRAnimationEngine#start(GVRAnimation)"
] | [
"Applies the > operator to each element in A. Results are stored in a boolean matrix.\n\n@param A Input matrx\n@param value value each element is compared against\n@param output (Optional) Storage for results. Can be null. Is reshaped.\n@return Boolean matrix with results",
"Add a channel to the animation to animate the named bone.\n@param boneName name of bone to animate.\n@param channel The animation channel.",
"Load assertion from the provided json or throw exception if not possible.\n\n@param encodedAssertion the assertion as it was encoded in JSON.",
"Adds all items from the iterator to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed",
"Calculate start dates for a weekly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Attaches meta info about the current state of the device to an event.\nTypically, this meta is added only to the ping event.",
"URL-Decodes a given string using ISO-8859-1. No UnsupportedEncodingException to handle as it is dealt with in\nthis method.",
"Assign FK value to target object by reading PK values of referenced object.\n\n@param targetObject real (non-proxy) target object\n@param cld {@link ClassDescriptor} of the real target object\n@param rds An {@link ObjectReferenceDescriptor} or {@link CollectionDescriptor}\nassociated with the real object.\n@param referencedObject referenced object or proxy\n@param insert Show if \"linking\" is done while insert or update.",
"There appear to be two ways of representing task notes in an MPP8 file.\nThis method tries to determine which has been used.\n\n@param task task\n@param data task data\n@param taskExtData extended task data\n@param taskVarData task var data"
] |
protected boolean isFiltered(AbstractElement canddiate, Param param) {
if (canddiate instanceof Group) {
Group group = (Group) canddiate;
if (group.getGuardCondition() != null) {
Set<Parameter> context = param.getAssignedParametes();
ConditionEvaluator evaluator = new ConditionEvaluator(context);
if (!evaluator.evaluate(group.getGuardCondition())) {
return true;
}
}
}
return false;
} | [
"Returns true if the given candidate is a group that is filtered due to rule parameters in the current call graph."
] | [
"Delete a comment as the currently authenticated user.\n\nThis method requires authentication with 'write' permission.\n\n@param commentId\nThe id of the comment to delete.\n@throws FlickrException",
"Curries a procedure that takes two arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes one argument. Never <code>null</code>.",
"Count the statements and property uses of an item or property document.\n\n@param usageStatistics\nstatistics object to store counters in\n@param statementDocument\ndocument to count the statements of",
"Adds descriptions to the item.\n\n@param descriptions\nthe descriptions to add",
"Writes references that have been added recently. Auxiliary triples that\nare generated for serializing snaks in references will be written right\nafterwards. This will also trigger any other auxiliary triples to be\nwritten that the snak converter object may have buffered.\n\n@throws RDFHandlerException\nif there was a problem writing the restrictions",
"Gets the actual type arguments of a class\n\n@param clazz The class to examine\n@return The type arguments",
"Use this API to unset the properties of bridgetable resource.\nProperties that need to be unset are specified in args array.",
"Use this API to rename a nsacl6 resource.",
"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"
] |
private List<DumpProcessingAction> handleArguments(String[] args) {
CommandLine cmd;
CommandLineParser parser = new GnuParser();
try {
cmd = parser.parse(options, args);
} catch (ParseException e) {
logger.error("Failed to parse arguments: " + e.getMessage());
return Collections.emptyList();
}
// Stop processing if a help text is to be printed:
if ((cmd.hasOption(CMD_OPTION_HELP)) || (args.length == 0)) {
return Collections.emptyList();
}
List<DumpProcessingAction> configuration = new ArrayList<>();
handleGlobalArguments(cmd);
if (cmd.hasOption(CMD_OPTION_ACTION)) {
DumpProcessingAction action = handleActionArguments(cmd);
if (action != null) {
configuration.add(action);
}
}
if (cmd.hasOption(CMD_OPTION_CONFIG_FILE)) {
try {
List<DumpProcessingAction> configFile = readConfigFile(cmd
.getOptionValue(CMD_OPTION_CONFIG_FILE));
configuration.addAll(configFile);
} catch (IOException e) {
logger.error("Failed to read configuration file \""
+ cmd.getOptionValue(CMD_OPTION_CONFIG_FILE) + "\": "
+ e.toString());
}
}
return configuration;
} | [
"This function interprets the arguments of the main function. By doing\nthis it will set flags for the dump generation. See in the help text for\nmore specific information about the options.\n\n@param args\narray of arguments from the main function.\n@return list of {@link DumpProcessingOutputAction}"
] | [
"Retrieve the Charset used to read the file.\n\n@return Charset instance",
"Save an HTTP response to a file\n@param response the response to save\n@param destFile the destination file\n@throws IOException if the response could not be downloaded",
"Gets the current Stack. If the stack is not set, a new empty instance is created and set.\n@return",
"Restores a trashed folder to a new location with a new name.\n@param folderID the ID of the trashed folder.\n@param newName an optional new name to give the folder. This can be null to use the folder's original name.\n@param newParentID an optional new parent ID for the folder. This can be null to use the folder's original\nparent.\n@return info about the restored folder.",
"Write a comma to the output stream if required.",
"Use this API to add transformpolicy.",
"Create a single node representing an embedded element.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values in {@link org.hibernate.ogm.model.key.spi.EntityKey#getColumnValues()}\n@return the corresponding node;",
"Store an Object.\n@see org.apache.ojb.broker.PersistenceBroker#store(Object)",
"Validates the producer method"
] |
public String addComment(String photosetId, String commentText) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_ADD_COMMENT);
parameters.put("photoset_id", photosetId);
parameters.put("comment_text", commentText);
// Note: This method requires an HTTP POST request.
Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
// response:
// <comment id="97777-12492-72057594037942601" />
Element commentElement = response.getPayload();
return commentElement.getAttribute("id");
} | [
"Add a comment to a photoset. This method requires authentication with 'write' permission.\n\n@param photosetId\nThe id of the photoset to add a comment to.\n@param commentText\nText of the comment\n@return the comment id\n@throws FlickrException"
] | [
"Seeks to the given day within the current year\n@param dayOfYear the day of the year to seek to, represented as an integer\nfrom 1 to 366. Must be guaranteed to parse as an Integer. If this day is\nbeyond the last day of the current year, the actual last day of the year\nwill be used.",
"Get a message bundle of the given type.\n\n@param type the bundle type class\n\n@return the bundle",
"Process normal calendar working and non-working days.\n\n@param calendar parent calendar",
"Determine which unit to use when creating grid labels.\n\n@param mapCrs the crs of the map, used if the {@link #labelProjection} is not defined.",
"Create a new instance of a two input function from an operator character\n@param op Which operation\n@param left Input variable on left\n@param right Input variable on right\n@return Resulting operation",
"The main entry point for processing graphical indicator definitions.\n\n@param indicators graphical indicators container\n@param properties project properties\n@param props properties data",
"Determine the raw type for the given generic parameter type.\n@param genericType the generic type to resolve\n@param typeVariableMap the TypeVariable Map to resolved against\n@return the resolved raw type",
"Given counters of true positives, false positives, and false\nnegatives, prints out precision, recall, and f1 for each key.",
"Return the entity of a resource\n\n@param resource the resource\n@param <T> the type of the resource's entity\n@param <R> the resource type\n@return the resource's entity"
] |
@Modified(id = "importerServices")
void modifiedImporterService(ServiceReference<ImporterService> serviceReference) {
try {
importersManager.modified(serviceReference);
} catch (InvalidFilterException invalidFilterException) {
LOG.error("The ServiceProperty \"" + TARGET_FILTER_PROPERTY + "\" of the ImporterService "
+ bundleContext.getService(serviceReference) + " doesn't provides a valid Filter."
+ " To be used, it must provides a correct \"" + TARGET_FILTER_PROPERTY + "\" ServiceProperty.",
invalidFilterException
);
importersManager.removeLinks(serviceReference);
return;
}
if (importersManager.matched(serviceReference)) {
importersManager.updateLinks(serviceReference);
} else {
importersManager.removeLinks(serviceReference);
}
} | [
"Update the Target Filter of the ImporterService.\nApply the induce modifications on the links of the ImporterService\n\n@param serviceReference"
] | [
"Gets a SerialMessage with the MULTI INSTANCE GET command.\nReturns the number of instances for this command class.\n@param the command class to return the number of instances for.\n@return the serial message.",
"Gets a collection of photo counts for the given date ranges for the calling user.\n\nThis method requires authentication with 'read' permission.\n\n@param dates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@param takenDates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@return A Collection of Photocount objects",
"Record a prepare operation.\n\n@param preparedOperation the prepared operation",
"Record a content loader for a given patch id.\n\n@param patchID the patch id\n@param contentLoader the content loader",
"Gets the current user.\n@param api the API connection of the current user.\n@return the current user.",
"If the variable is a local temporary variable it will be resized so that the operation can complete. If not\ntemporary then it will not be reshaped\n@param mat Variable containing the matrix\n@param numRows Desired number of rows\n@param numCols Desired number of columns",
"Cut the message content to the configured length.\n\n@param event the event",
"Extract child task data.\n\n@param task MPXJ task\n@param row Synchro task data",
"Return the NTSC gray level of an RGB value.\n@param rgb1 the input pixel\n@return the gray level (0-255)"
] |
public static appqoepolicy[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
appqoepolicy obj = new appqoepolicy();
options option = new options();
option.set_filter(filter);
appqoepolicy[] response = (appqoepolicy[]) obj.getfiltered(service, option);
return response;
} | [
"Use this API to fetch filtered set of appqoepolicy resources.\nset the filter parameter values in filtervalue object."
] | [
"Send message to all connections connected to the same URL of this context\n\n@param message the message to be sent\n@param excludeSelf whether the connection of this context should be sent to\n@return this context",
"get the TypeArgSignature corresponding to given type\n\n@param type\n@return",
"Convert a URL Encoded name back to the original form.\n@param name the name to URL urlDecode.\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the name in original form.\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Returns a string representation of the receiver, containing\nthe String representation of each key-value pair, sorted ascending by value.",
"Returns the number of vertex indices for a single face.\n\n@param face the face\n@return the number of indices",
"Uses the iterator to run through the dao and retain only the items that are in the passed in collection. This\nwill remove the items from the associated database table as well.\n\n@return Returns true of the collection was changed at all otherwise false.",
"Signal that we are about to close the channel. This will not have any affect on the underlying channel, however\nprevent setting a new channel.\n\n@return whether the closing state was set successfully",
"Function to add a new Store to the Metadata store. This involves\n\n1. Create a new entry in the ConfigurationStorageEngine for STORES.\n\n2. Update the metadata cache.\n\n3. Re-create the 'stores.xml' key\n\n@param storeDef defines the new store to be created",
"Call with pathEntries lock taken"
] |
private void toNextDate(Calendar date, int interval) {
long previousDate = date.getTimeInMillis();
if (!m_weekOfMonthIterator.hasNext()) {
date.add(Calendar.MONTH, interval);
m_weekOfMonthIterator = m_weeksOfMonth.iterator();
}
toCorrectDateWithDay(date, m_weekOfMonthIterator.next());
if (previousDate == date.getTimeInMillis()) { // this can happen if the fourth and the last week are checked.
toNextDate(date);
}
} | [
"Calculates the next date, starting from the provided date.\n\n@param date the current date.\n@param interval the number of month to add when moving to the next month."
] | [
"Trim the trailing spaces.\n\n@param line",
"Changes the volume of an existing sound.\n@param volume volume value. Should range from 0 (mute) to 1 (max)",
"The timeout which we block for when a resource is not available\n\n@param timeout The timeout\n@param unit The units of the timeout",
"Constraint that ensures that the field has a column property. If none is specified, then\nthe name of the field is used.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)",
"Obtain the path ID for a profile\n\n@param identifier Can be the path ID, or friendly name\n@param profileId\n@return\n@throws Exception",
"Recursively inspects the given objects and returns a node representing their differences. Both objects\nhave be have the same type.\n\n@param working This object will be treated as the successor of the `base` object.\n@param base This object will be treated as the predecessor of the <code>working</code> object.\n@return A node representing the differences between the given objects.",
"Sets the alias. By default the entire attribute path participates in the alias\n@param alias The name of the alias to set",
"Determines the encoding block groups for the specified data.",
"seeks to a particular month\n\n@param direction the direction to seek: two possibilities\n'<' go backward\n'>' go forward\n\n@param seekAmount the amount to seek. Must be guaranteed to parse as an integer\n\n@param month the month to seek to. Must be guaranteed to parse as an integer\nbetween 1 and 12"
] |
public void handleStateEvent(String callbackKey) {
if (handlers.containsKey(callbackKey) && handlers.get(callbackKey) instanceof StateEventHandler) {
((StateEventHandler) handlers.get(callbackKey)).handle();
} else {
System.err.println("Error in handle: " + callbackKey + " for state handler ");
}
} | [
"This method is called from Javascript, passing in the previously created\ncallback key. It uses that to find the correct handler and then passes on\nthe call. State events in the Google Maps API don't pass any parameters.\n\n@param callbackKey Key generated by the call to registerHandler."
] | [
"Returns the number of key-value mappings in this map for the third key.\n\n@param firstKey\nthe first key\n@param secondKey\nthe second key\n@return Returns the number of key-value mappings in this map for the third key.",
"Read data for a single table and store it.\n\n@param is input stream\n@param table table header",
"Produces a string identifying this half-edge by the point index values of\nits tail and head vertices.\n\n@return identifying string",
"Tests correctness. Try\nfrom=1000, to=10000\nfrom=200, to=1000\nfrom=16, to=1000\nfrom=1000, to=Integer.MAX_VALUE",
"Generates a toString method using concatenation or a StringBuilder.",
"Add the string representation of the given object to this sequence immediately. That is, all the trailing\nwhitespace of this sequence will be ignored and the string is appended directly after the last segment that\ncontains something besides whitespace. The given indentation will be prepended to each line except the first one\nif the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.",
"Finish the oauth flow after the user was redirected back.\n\n@param code\nCode returned by the Eve Online SSO\n@param state\nThis should be some secret to prevent XRSF see\ngetAuthorizationUri\n@throws net.troja.eve.esi.ApiException",
"Register capabilities associated with this resource.\n\n<p>Classes that overrides this method <em>MUST</em> call {@code super.registerCapabilities(resourceRegistration)}.</p>\n\n@param resourceRegistration a {@link ManagementResourceRegistration} created from this definition",
"Permanently deletes a trashed folder.\n@param folderID the ID of the trashed folder to permanently delete."
] |
public List<List<IN>> classifyRaw(String str,
DocumentReaderAndWriter<IN> readerAndWriter) {
ObjectBank<List<IN>> documents =
makeObjectBankFromString(str, readerAndWriter);
List<List<IN>> result = new ArrayList<List<IN>>();
for (List<IN> document : documents) {
classify(document);
List<IN> sentence = new ArrayList<IN>();
for (IN wi : document) {
// TaggedWord word = new TaggedWord(wi.word(), wi.answer());
// sentence.add(word);
sentence.add(wi);
}
result.add(sentence);
}
return result;
} | [
"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})."
] | [
"Generates a set of excluded method names.\n\n@param methodNames method names\n@return set of method names",
"Parses the given XML doc to extract the properties and return them into a java.util.Properties.\n@param doc to parse\n@param sectionName which section to extract\n@return Properties map",
"Log block data.\n\n@param blockIndex current block index\n@param startIndex start index\n@param blockLength length",
"In the 2.0 xsd the vault is in an external file, which has no namespace, using the output of the vault tool.\n\n@param f the file containing the external vault configuration as generated by the vault tool\n@return the vault config",
"Write a long attribute.\n\n@param name attribute name\n@param value attribute value",
"2-D Forward Discrete Cosine Transform.\n\n@param data Data.",
"This method extracts task data from an MSPDI file.\n\n@param project Root node of the MSPDI file",
"This method is used by non-blocking code to determine if the give buffer\nrepresents a complete request. Because the non-blocking code can by\ndefinition not just block waiting for more data, it's possible to get\npartial reads, and this identifies that case.\n\n@param buffer Buffer to check; the buffer is reset to position 0 before\ncalling this method and the caller must reset it after the call\nreturns\n@return True if the buffer holds a complete request, false otherwise",
"Extracts the zip file to the output folder\n\n@param zipFile ZIP File to extract\n@param outputFolder Output Folder\n@return A Collection with the extracted files\n@throws IOException I/O Error"
] |
private static CmsObject adjustSiteRootIfNecessary(final CmsObject cms, final CmsModule module)
throws CmsException {
CmsObject cmsClone;
if ((null == module.getSite()) || cms.getRequestContext().getSiteRoot().equals(module.getSite())) {
cmsClone = cms;
} else {
cmsClone = OpenCms.initCmsObject(cms);
cmsClone.getRequestContext().setSiteRoot(module.getSite());
}
return cmsClone;
} | [
"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)}"
] | [
"Sets the Calendar used. 'Standard' if no value is set.\n\n@param calendarName Calendar name",
"Determines storage overhead and returns pretty printed summary.\n\n@param finalNodeToOverhead Map of node IDs from final cluster to number\nof partition-stores to be moved to the node.\n@return pretty printed string summary of storage overhead.",
"Find and select the next searchable matching text.\n\n@param reverse look forwards or backwards\n@param pos the starting index to start finding from\n@return the location of the next selected, or -1 if not found",
"Use this API to export application.",
"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 fetch spilloverpolicy resource of given name .",
"validates operation against the definition and sets model for the parameters passed.\n\n@param operationObject model node of type {@link ModelType#OBJECT}, typically representing an operation request\n@param model model node in which the value should be stored\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",
"Filters attributes from the HTML string.\n\n@param html The HTML to filter.\n@return The filtered HTML string.",
"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"
] |
public void setWeekDay(String weekDayStr) {
final WeekDay weekDay = WeekDay.valueOf(weekDayStr);
if ((m_model.getWeekDay() != null) || !m_model.getWeekDay().equals(weekDay)) {
removeExceptionsOnChange(new Command() {
public void execute() {
m_model.setWeekDay(weekDay);
onValueChange();
}
});
}
} | [
"Set the week day.\n@param weekDayStr the week day to set."
] | [
"Helper to read an optional Boolean value.\n@param path The XML path of the element to read.\n@return The Boolean value stored in the XML, or <code>null</code> if the value could not be read.",
"Request the list of all tracks in the specified slot, given a dbserver connection to a player that has already\nbeen set up.\n\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved track list entry items\n\n@throws IOException if there is a communication problem\n@throws InterruptedException if the thread is interrupted while trying to lock the client for menu operations\n@throws TimeoutException if we are unable to lock the client for menu operations",
"Use this API to fetch policydataset_value_binding resources of given name .",
"Log a free-form warning\n@param message the warning message. Cannot be {@code null}",
"Check for exceptions.\n\n@return the list",
"Returns the real key object.",
"Log error information",
"this method is not intended to be called by clients\n@since 2.12",
"Checks if the duration option is valid.\n\nNOTE: This does NOT check, if too many events are specified.\n\n@return a flag, indicating if the duration option is valid."
] |
public boolean setCurrentConfiguration(CmsGitConfiguration configuration) {
if ((null != configuration) && configuration.isValid()) {
m_currentConfiguration = configuration;
return true;
}
return false;
} | [
"Sets the current configuration if it is a valid configuration. Otherwise the configuration is not set.\n@param configuration the configuration to set.\n@return flag, indicating if the configuration is set."
] | [
"Processes the template if the current object on the specified level has a non-empty name.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"",
"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",
"Set the attributes for the associated object.\n\n@param attributes attributes for associated objects\n@deprecated replaced by {@link #setAllAttributes(Map)} after introduction of nested associations",
"Overloads the left shift operator to provide syntactic sugar for appending to a StringBuilder.\n\n@param self a StringBuilder\n@param value an Object\n@return the original StringBuilder\n@since 1.8.2",
"Sets the target hosts from line by line text.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the parallel task builder\n@throws TargetHostsLoadException\nthe target hosts load exception",
"Sets a client option per-request\n\n@param key Option name\n@param value Option 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",
"Creates an upload session to create a new version of a file in chunks.\nThis will first verify that the version can be created and then open a session for uploading pieces of the file.\n@param fileSize the size of the file that will be uploaded.\n@return the created upload session instance.",
"Fetch the given image from the web.\n\n@param request The request\n@param transformer The transformer\n@return The image"
] |
public String get(final long index) {
return doWithJedis(new JedisCallable<String>() {
@Override
public String call(Jedis jedis) {
return jedis.lindex(getKey(), index);
}
});
} | [
"Get the element value in the list by index\n@param index the position in the list from which to get the element\n@return the element value"
] | [
"Converts from partitionId to nodeId. The list of partition IDs,\npartitionIds, is expected to be a \"replicating partition list\", i.e., the\nmapping from partition ID to node ID should be one to one.\n\n@param partitionIds List of partition IDs for which to find the Node ID\nfor the Node that owns the partition.\n@return List of node ids, one for each partition ID in partitionIds\n@throws VoldemortException If multiple partition IDs in partitionIds map\nto the same Node ID.",
"Put a new resource description into the index, or remove one if the delta has no new description. A delta for a\nparticular URI may be registered more than once; overwriting any earlier registration.\n\n@param delta\nThe resource change.\n@since 2.9",
"Prints a currency symbol position value.\n\n@param value CurrencySymbolPosition instance\n@return currency symbol position",
"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.",
"Get a list of tags for the specified photo.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param photoId\nThe photo ID\n@return The collection of Tag objects",
"Inserts the provided document. If the document is missing an identifier, the client should\ngenerate one.\n\n@param document the document to insert\n@return a task containing the result of the insert one operation",
"This method extracts assignment data from an MSPDI file.\n\n@param project Root node of the MSPDI file",
"The sniffing Loggers are some special Loggers, whose level will be set to TRACE forcedly.\n@param logger",
"Retrieves state and metrics information for all channels across the cluster.\n\n@return list of channels across the cluster"
] |
public void addBeanToBeanMapping(BeanToBeanMapping beanToBeanMapping) {
beanToBeanMappings.put(ClassPair.get(beanToBeanMapping
.getSourceClass(), beanToBeanMapping.getDestinationClass()),
beanToBeanMapping);
} | [
"Add a mapping of properties between two beans\n\n@param beanToBeanMapping"
] | [
"Fires an event on an element using its identification.\n\n@param eventable The eventable.\n@return true if it is able to fire the event successfully on the element.\n@throws InterruptedException when interrupted during the wait.",
"Gets the type to use for the Vaadin table column corresponding to the c-th column in this result.\n\n@param c the column index\n@return the class to use for the c-th Vaadin table column",
"Use this API to clear bridgetable.",
"Counts the packages prefixes appearing in this project and if some of them make more than half of the total of existing packages, this prefix\nis returned. Otherwise, returns null.\n\nThis is just a helper, it isn't something really hard-setting the package. It's something to use if the user didn't specify using\n--mavenize.groupId, and the archive or project name is something insane, like few sencences paragraph (a description) or a number or such.",
"Creates a Bytes object by copying the data of the CharSequence and encoding it using UTF-8.",
"Checks the given field descriptor.\n\n@param fieldDef The field descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"Performs a HTTP PUT request, saves an attachment.\n\n@return {@link Response}",
"Get the target entry for a given patch element.\n\n@param element the patch element\n@return the patch entry\n@throws PatchingException",
"Set default values for the TimeAndSizeRollingAppender appender\n\n@param appender"
] |
public void process(SearchDistributor distributor) {
List<PossibleState> bootStrap;
try {
bootStrap = bfs(bootStrapMin);
} catch (ModelException e) {
bootStrap = new LinkedList<>();
}
List<Frontier> frontiers = new LinkedList<>();
for (PossibleState p : bootStrap) {
SCXMLFrontier dge = new SCXMLFrontier(p, model, tagExtensionList);
frontiers.add(dge);
}
distributor.distribute(frontiers);
} | [
"Performs the BFS and gives the results to a distributor to distribute\n\n@param distributor the distributor"
] | [
"Returns the ViewGroup used as a parent for the content view.\n\n@return The content view's parent.",
"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.",
"Calculate the file to compile a jasper report template to.\n\n@param configuration the configuration for the current app.\n@param jasperFileXml the jasper report template in xml format.\n@param extension the extension of the compiled report template.\n@param logger the logger to log errors to if an occur.",
"All the sub-level attributes.\n\n@param name the attribute name.\n@param attribute the attribute.",
"Adds columns for the specified properties.\n@param _properties the array of <code>PropertyDescriptor</code>s to be added.\n@throws ColumnBuilderException if an error occurs.\n@throws ClassNotFoundException if an error occurs.",
"Set day.\n\n@param d day instance",
"Set the week days the events should occur.\n@param weekDays the week days to set.",
"Ensure that the nodeList is either null or empty.\n\n@param nodeList the nodeList to ensure to be either null or empty\n@param expression the expression was used to fine the nodeList\n@throws SpinXPathException if the nodeList is either null or empty",
"Set a status message in the JTextComponent passed to this\nmodel.\n@param message The message that should be displayed."
] |
private void
executeSubBatch(final int batchId,
RebalanceBatchPlanProgressBar progressBar,
final Cluster batchRollbackCluster,
final List<StoreDefinition> batchRollbackStoreDefs,
final List<RebalanceTaskInfo> rebalanceTaskPlanList,
boolean hasReadOnlyStores,
boolean hasReadWriteStores,
boolean finishedReadOnlyStores) {
RebalanceUtils.printBatchLog(batchId,
logger,
"Submitting rebalance tasks ");
// Get an ExecutorService in place used for submitting our tasks
ExecutorService service = RebalanceUtils.createExecutors(maxParallelRebalancing);
// Sub-list of the above list
final List<RebalanceTask> failedTasks = Lists.newArrayList();
final List<RebalanceTask> incompleteTasks = Lists.newArrayList();
// Semaphores for donor nodes - To avoid multiple disk sweeps
Map<Integer, Semaphore> donorPermits = new HashMap<Integer, Semaphore>();
for(Node node: batchRollbackCluster.getNodes()) {
donorPermits.put(node.getId(), new Semaphore(1));
}
try {
// List of tasks which will run asynchronously
List<RebalanceTask> allTasks = executeTasks(batchId,
progressBar,
service,
rebalanceTaskPlanList,
donorPermits);
RebalanceUtils.printBatchLog(batchId,
logger,
"All rebalance tasks submitted");
// Wait and shutdown after (infinite) timeout
RebalanceUtils.executorShutDown(service, Long.MAX_VALUE);
RebalanceUtils.printBatchLog(batchId,
logger,
"Finished waiting for executors");
// Collects all failures + incomplete tasks from the rebalance
// tasks.
List<Exception> failures = Lists.newArrayList();
for(RebalanceTask task: allTasks) {
if(task.hasException()) {
failedTasks.add(task);
failures.add(task.getError());
} else if(!task.isComplete()) {
incompleteTasks.add(task);
}
}
if(failedTasks.size() > 0) {
throw new VoldemortRebalancingException("Rebalance task terminated unsuccessfully on tasks "
+ failedTasks,
failures);
}
// If there were no failures, then we could have had a genuine
// timeout ( Rebalancing took longer than the operator expected ).
// We should throw a VoldemortException and not a
// VoldemortRebalancingException ( which will start reverting
// metadata ). The operator may want to manually then resume the
// process.
if(incompleteTasks.size() > 0) {
throw new VoldemortException("Rebalance tasks are still incomplete / running "
+ incompleteTasks);
}
} catch(VoldemortRebalancingException e) {
logger.error("Failure while migrating partitions for rebalance task "
+ batchId);
if(hasReadOnlyStores && hasReadWriteStores
&& finishedReadOnlyStores) {
// Case 0
adminClient.rebalanceOps.rebalanceStateChange(null,
batchRollbackCluster,
null,
batchRollbackStoreDefs,
null,
true,
true,
false,
false,
false);
} else if(hasReadWriteStores && finishedReadOnlyStores) {
// Case 4
adminClient.rebalanceOps.rebalanceStateChange(null,
batchRollbackCluster,
null,
batchRollbackStoreDefs,
null,
false,
true,
false,
false,
false);
}
throw e;
} finally {
if(!service.isShutdown()) {
RebalanceUtils.printErrorLog(batchId,
logger,
"Could not shutdown service cleanly for rebalance task "
+ batchId,
null);
service.shutdownNow();
}
}
} | [
"The smallest granularity of rebalancing where-in we move partitions for a\nsub-set of stores. Finally at the end of the movement, the node is\nremoved out of rebalance state\n\n<br>\n\nAlso any errors + rollback procedures are performed at this level itself.\n\n<pre>\n| Case | hasRO | hasRW | finishedRO | Action |\n| 0 | t | t | t | rollback cluster change + swap |\n| 1 | t | t | f | nothing to do since \"rebalance state change\" should have removed everything |\n| 2 | t | f | t | won't be triggered since hasRW is false |\n| 3 | t | f | f | nothing to do since \"rebalance state change\" should have removed everything |\n| 4 | f | t | t | rollback cluster change |\n| 5 | f | t | f | won't be triggered |\n| 6 | f | f | t | won't be triggered |\n| 7 | f | f | f | won't be triggered |\n</pre>\n\n@param batchId Rebalance batch id\n@param batchRollbackCluster Cluster to rollback to if we have a problem\n@param rebalanceTaskPlanList The list of rebalance partition plans\n@param hasReadOnlyStores Are we rebalancing any read-only stores?\n@param hasReadWriteStores Are we rebalancing any read-write stores?\n@param finishedReadOnlyStores Have we finished rebalancing of read-only\nstores?"
] | [
"Clear all beans and call the destruction callback.",
"Parse an extended attribute date value.\n\n@param value string representation\n@return date value",
"Remove the report directory.",
"Put the given value to the appropriate id in the stack, using the version\nof the current list node identified by that id.\n\n@param id\n@param element element to set\n@return element that was replaced by the new element\n@throws ObsoleteVersionException when an update fails",
"Add a listener to be invoked when the checked button changes in this group.\n@param listener\n@param <T>\n@return",
"Retrieve the number of minutes per week for this calendar.\n\n@return minutes per week",
"Creates a random symmetric matrix. The entire matrix will be filled in, not just a triangular\nportion.\n\n@param N Number of rows and columns\n@param nz_total Number of nonzero elements in the triangular portion of the matrix\n@param min Minimum element value, inclusive\n@param max Maximum element value, inclusive\n@param rand Random number generator\n@return Randomly generated matrix",
"Return the next word of the string, in other words it stops when a space is encountered.",
"This method maps the resource unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param rscFixedMeta resource fixed meta data\n@param rscFixedData resource fixed data\n@return map of resource IDs to resource data"
] |
public float getTexCoordU(int vertex, int coords) {
if (!hasTexCoords(coords)) {
throw new IllegalStateException(
"mesh has no texture coordinate set " + coords);
}
checkVertexIndexBounds(vertex);
/* bound checks for coords are done by java for us */
return m_texcoords[coords].getFloat(
vertex * m_numUVComponents[coords] * SIZEOF_FLOAT);
} | [
"Returns the u component of a coordinate from a texture coordinate set.\n\n@param vertex the vertex index\n@param coords the texture coordinate set\n@return the u component"
] | [
"Publish finish events for each of the specified query labels\n\n<pre>\n{@code\nLabelledEvents.start(\"get\", 1l, bus, \"typeA\", \"custom\");\ntry {\nreturn \"ok\";\n} finally {\nRequestEvents.finish(\"get\", 1l, bus, \"typeA\", \"custom\");\n}\n\n}\n</pre>\n\n\n@param query Completed query\n@param correlationId Identifier\n@param bus EventBus to post events to\n@param labels Query types to post to event bus",
"Get the photo or ticket id from the response.\n\n@param async\n@param response\n@return",
"Processes a runtime procedure argument 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=\"attributes\" optional=\"true\" description=\"Attributes of the procedure as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the procedure\"\[email protected] name=\"field-ref\" optional=\"true\" description=\"Identifies the field that provides the value\nif a runtime argument; if not set, then null is used\"\[email protected] name=\"name\" optional=\"false\" description=\"The identifier of the argument tag\"\[email protected] name=\"return\" optional=\"true\" description=\"Whether this is a return value (if a runtime argument)\"\nvalues=\"true,false\"\[email protected] name=\"value\" optional=\"false\" description=\"The value if a constant argument\"",
"Allocate a timestamp",
"Use this API to update cacheselector.",
"Appends formatted text to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).\n<li> {@link Class}, {@link TypeElement}, {@link DeclaredType} and {@link QualifiedName}\ninstances use their qualified names where necessary, or shorter versions if a suitable\nimport line can be added.\n<li> {@link Excerpt} instances have {@link Excerpt#addTo(SourceBuilder)} called.\n</ul>",
"Deletes the inbox message for given messageId\n@param messageId String messageId\n@return boolean value based on success of operation",
"Add a IN clause so the column must be equal-to one of the objects from the list passed in.",
"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"
] |
private void processOutlineCodeValues() throws IOException
{
DirectoryEntry outlineCodeDir = (DirectoryEntry) m_projectDir.getEntry("TBkndOutlCode");
FixedMeta fm = new FixedMeta(new DocumentInputStream(((DocumentEntry) outlineCodeDir.getEntry("FixedMeta"))), 10);
FixedData fd = new FixedData(fm, new DocumentInputStream(((DocumentEntry) outlineCodeDir.getEntry("FixedData"))));
Map<Integer, FieldType> map = new HashMap<Integer, FieldType>();
int items = fm.getItemCount();
for (int loop = 0; loop < items; loop++)
{
byte[] data = fd.getByteArrayValue(loop);
if (data.length < 18)
{
continue;
}
int index = MPPUtility.getShort(data, 0);
int fieldID = MPPUtility.getInt(data, 12);
FieldType fieldType = FieldTypeHelper.getInstance(fieldID);
if (fieldType.getFieldTypeClass() != FieldTypeClass.UNKNOWN)
{
map.put(Integer.valueOf(index), fieldType);
}
}
VarMeta outlineCodeVarMeta = new VarMeta9(new DocumentInputStream(((DocumentEntry) outlineCodeDir.getEntry("VarMeta"))));
Var2Data outlineCodeVarData = new Var2Data(outlineCodeVarMeta, new DocumentInputStream(((DocumentEntry) outlineCodeDir.getEntry("Var2Data"))));
Map<FieldType, List<Pair<String, String>>> valueMap = new HashMap<FieldType, List<Pair<String, String>>>();
for (Integer id : outlineCodeVarMeta.getUniqueIdentifierArray())
{
FieldType fieldType = map.get(id);
String value = outlineCodeVarData.getUnicodeString(id, VALUE);
String description = outlineCodeVarData.getUnicodeString(id, DESCRIPTION);
List<Pair<String, String>> list = valueMap.get(fieldType);
if (list == null)
{
list = new ArrayList<Pair<String, String>>();
valueMap.put(fieldType, list);
}
list.add(new Pair<String, String>(value, description));
}
for (Entry<FieldType, List<Pair<String, String>>> entry : valueMap.entrySet())
{
populateContainer(entry.getKey(), entry.getValue());
}
} | [
"Reads outline code custom field values and populates container."
] | [
"Renders in LI tags, Wraps with UL tags optionally.",
"Returns a list of files in given addon passing given filter.",
"Request to join a group.\n\nNote: if a group has rules, the client must display the rules to the user and the user must accept them (which is indicated by passing a true value to\nacceptRules) prior to making the join request.\n\n@param groupId\n- groupId parameter\n@param message\n- (required) message to group administrator\n@param acceptRules\n- (required) parameter indicating user has accepted groups rules",
"Return a list of unique namespace and predicate pairs, optionally limited by predicate or namespace, in alphabetical order.\n\nThis method does not require authentication.\n\n@param namespace\noptional, can be null\n@param predicate\noptional, can be null\n@param perPage\nThe number of photos to show per page\n@param page\nThe page offset\n@return NamespacesList containing Pair-objects\n@throws FlickrException",
"Retrieves the calendar used for this resource assignment.\n\n@return ProjectCalendar instance",
"Handles week day changes.\n@param event the change event.",
"Describes the scenario. Must be called before any step invocation.\n@param description the description\n@return this for a fluent interface",
"Use this API to fetch statistics of nsacl6_stats resource of given name .",
"This method retrieves a double 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 double data"
] |
public void postProcess() {
if (foreignColumnName != null) {
foreignAutoRefresh = true;
}
if (foreignAutoRefresh && maxForeignAutoRefreshLevel == NO_MAX_FOREIGN_AUTO_REFRESH_LEVEL_SPECIFIED) {
maxForeignAutoRefreshLevel = DatabaseField.DEFAULT_MAX_FOREIGN_AUTO_REFRESH_LEVEL;
}
} | [
"Process the settings when we are going to consume them."
] | [
"Converts a submatrix into an extract matrix operation.\n@param variableTarget The variable in which the submatrix is extracted from",
"Adds the given value to the list of values that should still be\nserialized. The given RDF resource will be used as a subject.\n\n@param value\nthe value to be serialized\n@param resource\nthe RDF resource that is used as a subject for serialization",
"make a copy of the criteria\n@param includeGroupBy if true\n@param includeOrderBy if ture\n@param includePrefetchedRelationships if true\n@return a copy of the criteria",
"Update max.\n\n@param n the n\n@param c the c",
"Get a list of referring domains for a photostream.\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 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.getPhotostreamDomains.html\"",
"Read a long int from a byte array.\n\n@param data byte array\n@param offset start offset\n@return long value",
"Initialize the service with a context\n@param context the servlet context to initialize the profile.",
"Return the association as cached in the entry state.\n\n@param collectionRole the role of the association\n@return the cached association",
"Return configuration tweaks in a format appropriate for ness-jdbc DatabaseModule."
] |
private synchronized void setFactoryMethod(Method newMethod)
{
if (newMethod != null)
{
// make sure it's a no argument method
if (newMethod.getParameterTypes().length > 0)
{
throw new MetadataException(
"Factory methods must be zero argument methods: "
+ newMethod.getClass().getName()
+ "."
+ newMethod.getName());
}
// make it accessible if it's not already
if (!newMethod.isAccessible())
{
newMethod.setAccessible(true);
}
}
this.factoryMethod = newMethod;
} | [
"Specify the method to instantiate objects\nrepresented by this descriptor.\n@see #setFactoryClass"
] | [
"Returns a list of the compact representation of all of the custom fields in a workspace.\n\n@param workspace The workspace or organization to find custom field definitions in.\n@return Request object",
"Returns the response error stream, handling the case when it contains gzipped data.\n@return gzip decoded (if needed) error stream or null",
"Creates a general purpose solver. Use this if you are not sure what you need.\n\n@param numRows The number of rows that the decomposition is optimized for.\n@param numCols The number of columns that the decomposition is optimized for.",
"Indicates whether or not an event ID is a duplicate.\n\n<p>This method can be overridden by a subclass in order to provide custom de-duping logic.</p>\n\n@param eventID the event ID.\n@return true if the event is a duplicate; otherwise false.",
"Use this API to fetch a appfwglobal_auditsyslogpolicy_binding resources.",
"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",
"Figures out the correct class loader to use for a proxy for a given bean",
"blocks until there is a connection",
"Use this API to unset the properties of cmpparameter resource.\nProperties that need to be unset are specified in args array."
] |
public static BufferedImage convertImageToARGB( Image image ) {
if ( image instanceof BufferedImage && ((BufferedImage)image).getType() == BufferedImage.TYPE_INT_ARGB )
return (BufferedImage)image;
BufferedImage p = new BufferedImage( image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_INT_ARGB);
Graphics2D g = p.createGraphics();
g.drawImage( image, 0, 0, null );
g.dispose();
return p;
} | [
"Convert an Image into a TYPE_INT_ARGB BufferedImage. If the image is already of this type, the original image is returned unchanged.\n@param image the image to convert\n@return the converted image"
] | [
"Create a rollback patch based on the recorded actions.\n\n@param patchId the new patch id, depending on release or one-off\n@param patchType the current patch identity\n@return the rollback patch",
"Delete the given file in a separate thread\n\n@param file The file to delete",
"Generate the body of a toString method that uses plain concatenation.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\nalways present, this can be done with a long block of unconditional code. We could use a\nStringBuilder for this, but in fact the Java compiler will do this for us under the hood\nif we use simple string concatenation, so we use the more readable approach.",
"Add a '<' clause so the column must be less-than the value.",
"Get the class name without the package\n\n@param c The class name with package\n@return the class name without the package",
"Generate heroku-like random names\n\n@return String",
"Add a range to this LOD group. Specify the scene object that should be displayed in this\nrange. Add the LOG group as a component to the parent scene object. The scene objects\nassociated with each range will automatically be added as children to the parent.\n@param range show the scene object if the camera distance is greater than this value\n@param sceneObject scene object that should be rendered when in this range\n@throws IllegalArgumentException if range is negative or sceneObject null",
"Checks whether the specified event name is restricted. If it is,\nthen create a pending error, and abort.\n\n@param name The event name\n@return Boolean indication whether the event name is restricted",
"returns a sorted array of nested classes and interfaces"
] |
public boolean canUploadVersion(String name, long fileSize) {
URL url = CONTENT_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "OPTIONS");
JsonObject preflightInfo = new JsonObject();
if (name != null) {
preflightInfo.add("name", name);
}
preflightInfo.add("size", fileSize);
request.setBody(preflightInfo.toString());
try {
BoxAPIResponse response = request.send();
return response.getResponseCode() == 200;
} catch (BoxAPIException ex) {
if (ex.getResponseCode() >= 400 && ex.getResponseCode() < 500) {
// This looks like an error response, menaing the upload would fail
return false;
} else {
// This looks like a network error or server error, rethrow exception
throw ex;
}
}
} | [
"Checks if a new version of the file can be uploaded with the specified name and size.\n@param name the new name for the file.\n@param fileSize the size of the new version content in bytes.\n@return whether or not the file version can be uploaded."
] | [
"Prints a stores xml to a file.\n\n@param outputDirName\n@param fileName\n@param list of storeDefs",
"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",
"Add a rollback loader for a give patch.\n\n@param patchId the patch id.\n@param target the patchable target\n@throws XMLStreamException\n@throws IOException",
"Collapse repeated records, using exact string match on the record.\nThis is generally useful for making very verbose logs more readable.\n@return this",
"Creates the parents of nested XML elements if necessary.\n@param xmlContent the XML content that is edited.\n@param xmlPath the path of the (nested) element, for which the parents should be created\n@param l the locale for which the XML content is edited.",
"Execute for result.\n\n@param executionContext the execution context\n@return the result\n@throws IOException for any error",
"Retrieves a constant value.\n\n@param type field type\n@param block criteria data block\n@return constant value",
"Renders in LI tags, Wraps with UL tags optionally.",
"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"
] |
private void prefetchRelationships(Query query)
{
List prefetchedRel;
Collection owners;
String relName;
RelationshipPrefetcher[] prefetchers;
if (query == null || query.getPrefetchedRelationships() == null || query.getPrefetchedRelationships().isEmpty())
{
return;
}
if (!supportsAdvancedJDBCCursorControl())
{
logger.info("prefetching relationships requires JDBC level 2.0");
return;
}
// prevent releasing of DBResources
setInBatchedMode(true);
prefetchedRel = query.getPrefetchedRelationships();
prefetchers = new RelationshipPrefetcher[prefetchedRel.size()];
// disable auto retrieve for all prefetched relationships
for (int i = 0; i < prefetchedRel.size(); i++)
{
relName = (String) prefetchedRel.get(i);
prefetchers[i] = getBroker().getRelationshipPrefetcherFactory()
.createRelationshipPrefetcher(getQueryObject().getClassDescriptor(), relName);
prefetchers[i].prepareRelationshipSettings();
}
// materialize ALL owners of this Iterator
owners = getOwnerObjects();
// prefetch relationships and associate with owners
for (int i = 0; i < prefetchedRel.size(); i++)
{
prefetchers[i].prefetchRelationship(owners);
}
// reset auto retrieve for all prefetched relationships
for (int i = 0; i < prefetchedRel.size(); i++)
{
prefetchers[i].restoreRelationshipSettings();
}
try
{
getRsAndStmt().m_rs.beforeFirst(); // reposition resultset jdbc 2.0
}
catch (SQLException e)
{
logger.error("beforeFirst failed !", e);
}
setInBatchedMode(false);
setHasCalledCheck(false);
} | [
"prefetch defined relationships requires JDBC level 2.0, does not work\nwith Arrays"
] | [
"Returns an interval representing the addition of the\ngiven interval with this one.\n@param other interval to add to this one\n@return interval sum",
"Use this API to fetch all the onlinkipv6prefix resources that are configured on netscaler.",
"Validates that this string is a valid host name or IP address, and if not, throws an exception with a descriptive message indicating why it is not.\n@throws HostNameException",
"Add the string representation of the given object to this sequence. The given indentation will be prepended to\neach line except the first one if the object has a multi-line string representation.\n\n@param object\nthe appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.",
"Processes and computes column counts of A\n\n@param A (Input) Upper triangular matrix\n@param parent (Input) Elimination tree.\n@param post (Input) Post order permutation of elimination tree. See {@link TriangularSolver_DSCC#postorder}\n@param counts (Output) Storage for column counts.",
"This is an assertion method that can be used by a thread to confirm that\nthe thread isn't already holding lock for an object, before acquiring a\nlock\n\n@param object\nobject to test for lock\n@param name\ntag associated with the lock",
"Load a table configuration in from a text-file reader.\n\n@return A config if any of the fields were set otherwise null if we reach EOF.",
"Returns a new intern odmg-transaction for the current database.",
"Indicate to the RecyclerView the type of Renderer used to one position using a numeric value.\n\n@param position to analyze.\n@return the id associated to the Renderer used to render the content given a position."
] |
public void awaitPodReadinessOrFail(Predicate<Pod> filter) {
await().atMost(5, TimeUnit.MINUTES).until(() -> {
List<Pod> list = client.pods().inNamespace(namespace).list().getItems();
return list.stream()
.filter(filter)
.filter(Readiness::isPodReady)
.collect(Collectors.toList()).size() >= 1;
}
);
} | [
"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."
] | [
"Update all the links of the DeclarationBinder.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder",
"Return a new File object based on the baseDir and the segments.\n\nThis method does not perform any operation on the file system.",
"Returns a string that should be used as a label for the given property.\n\n@param propertyIdValue\nthe property to label\n@return the label",
"Converts a row major block matrix into a row major matrix.\n\n@param src Original DMatrixRBlock.. Not modified.\n@param dst Equivalent DMatrixRMaj. Modified.",
"Verify store definitions are congruent with cluster definition.\n\n@param cluster\n@param storeDefs",
"Returns all the URL that should be inside the classpath. This includes the jar itself if any.\n\n@throws JqmPayloadException",
"Checks to see if the two matrices are inverses of each other.\n\n@param a A matrix. Not modified.\n@param b A matrix. Not modified.",
"Sets either the upper or low triangle of a matrix to zero",
"Return a copy of the result as a String.\n\n<p>The default version of this method copies the result into a temporary byte array and then\ntries to decode it using the configured encoding.\n\n@return string version of the result.\n@throws IOException if the data cannot be produced or could not be decoded to a String."
] |
private String convertOutputToHtml(String content) {
if (content.length() == 0) {
return "";
}
StringBuilder buffer = new StringBuilder();
for (String line : content.split("\n")) {
buffer.append(CmsEncoder.escapeXml(line) + "<br>");
}
return buffer.toString();
} | [
"Converts the text stream data to HTML form.\n\n@param content the content to convert\n@return the HTML version of the content"
] | [
"generates a Meta Object Protocol method, that is used to call a non public\nmethod, or to make a call to super.\n\n@param mopCalls list of methods a mop call method should be generated for\n@param useThis true if \"this\" should be used for the naming",
"Propagate onTouchStart events to listeners\n@param hit collision object",
"Iterates through the range of prefixes in this range instance using the given prefix length.\n\n@param prefixLength\n@return",
"Return the NTSC gray level of an RGB value.\n@param rgb1 the input pixel\n@return the gray level (0-255)",
"Utility function that fetches system store definitions\n\n@return The map container that maps store names to store definitions",
"Get a random pod that provides the specified service in the specified namespace.\n\n@param client\nThe client instance to use.\n@param name\nThe name of the service.\n@param namespace\nThe namespace of the service.\n\n@return The pod or null if no pod matches.",
"Validates the wrapped value and returns a localized error message in case of invalid values.\n@return <code>null</code> if the value is valid, a suitable localized error message otherwise.",
"Copy a patch element\n\n@param entry the patch entry\n@param patchId the patch id for the element\n@param modifications the element modifications\n@return the new patch element",
"Insert a new value prior to the index location in the existing value array,\nincreasing the field length accordingly.\n@param index - where the new values in an SFVec2f object will be placed in the array list\n@param newValue - the new x, y value for the array list"
] |
public void setCurrencyDigits(Integer currDigs)
{
if (currDigs == null)
{
currDigs = DEFAULT_CURRENCY_DIGITS;
}
set(ProjectField.CURRENCY_DIGITS, currDigs);
} | [
"Sets no of currency digits.\n\n@param currDigs Available values, 0,1,2"
] | [
"Gets the Correlation distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Correlation distance between x and y.",
"Creates an element that represents an image drawn at the specified coordinates in the page.\n@param x the X coordinate of the image\n@param y the Y coordinate of the image\n@param width the width coordinate of the image\n@param height the height coordinate of the image\n@param type the image type: <code>\"png\"</code> or <code>\"jpeg\"</code>\n@param resource the image data depending on the specified type\n@return",
"Convert a string to a URL and fallback to classpath resource, if not convertible.\n\n@param s\nThe string to convert.\n\n@return The URL.",
"generate a select-Statement according to query\n\n@param query the Query\n@param cld the ClassDescriptor",
"Summarizes balance for the given nodeId to PartitionCount.\n\n@param nodeIdToPartitionCount\n@param title for use in pretty string\n@return Pair: getFirst() is utility value to be minimized, getSecond() is\npretty summary string of balance",
"Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for",
"This method takes an integer enumeration of a priority\nand returns an appropriate instance of this class. Note that unrecognised\nvalues are treated as medium priority.\n\n@param priority int version of the priority\n@return Priority class instance",
"Serialize a content into a targeted file, checking that the parent directory exists.\n\n@param folder File\n@param content String\n@param fileName String",
"Use this API to fetch the statistics of all gslbservice_stats resources that are configured on netscaler."
] |
public static ModelNode determineHostAddress(final ModelControllerClient client) throws IOException, OperationExecutionException {
final ModelNode op = Operations.createReadAttributeOperation(EMPTY_ADDRESS, "local-host-name");
ModelNode response = client.execute(op);
if (Operations.isSuccessfulOutcome(response)) {
return DeploymentOperations.createAddress("host", Operations.readResult(response).asString());
}
throw new OperationExecutionException(op, response);
} | [
"Determines the address for the host being used.\n\n@param client the client used to communicate with the server\n\n@return the address of the host\n\n@throws IOException if an error occurs communicating with the server\n@throws OperationExecutionException if the operation used to determine the host name fails"
] | [
"Seeks forward or backwards to a particular holiday based on the current date\n\n@param holidayString The holiday to seek to\n@param direction The direction to seek\n@param seekAmount The number of years to seek",
"Calcs the bonding size of given mesh.\n\n@param mesh Mesh to calc its bouding size.\n@return The bounding size for x, y and z axis.",
"Attempts to revert the working copy. In case of failure it just logs the error.",
"Use this API to disable Interface of given name.",
"Fetch all relevant attributes from the backing store and copy instances which are not present in the local bean store.",
"Try to build an default PBKey for convenience PB create method.\n\n@return PBKey or <code>null</code> if default key was not declared in\nmetadata",
"Enable or disable the default blank validator.",
"This method retrieves a double 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 double data",
"Creates an element that represents a single page.\n@return the resulting DOM element"
] |
protected synchronized Object materializeSubject() throws PersistenceBrokerException
{
TemporaryBrokerWrapper tmp = getBroker();
try
{
Object realSubject = tmp.broker.getObjectByIdentity(_id);
if (realSubject == null)
{
LoggerFactory.getLogger(IndirectionHandler.class).warn(
"Can not materialize object for Identity " + _id + " - using PBKey " + getBrokerKey());
}
return realSubject;
} catch (Exception ex)
{
throw new PersistenceBrokerException(ex);
} finally
{
tmp.close();
}
} | [
"Retrieves the real subject from the underlying RDBMS. Override this\nmethod if the object is to be materialized in a specific way.\n\n@return The real subject of the proxy"
] | [
"The only properties added to a relationship are the columns representing the index of the association.",
"Color waveforms are represented by a series of sixteen bit integers into which color and height information are\npacked. This function returns the integer corresponding to a particular half-frame in the waveform.\n\n@param waveBytes the raw data making up the waveform\n@param segment the index of hte half-frame of interest\n\n@return the sixteen-bit number encoding the height and RGB values of that segment",
"Create a ModelNode representing the JVM the instance is running on.\n\n@return a ModelNode representing the JVM the instance is running on.\n@throws OperationFailedException",
"Read resource data from a PEP file.",
"Invokes the method on the class of the passed instance, not the declaring\nclass. Useful with proxies\n\n@param instance The instance to invoke\n@param manager The Bean manager\n@return A reference to the instance",
"Checks if a key already exists.\n@param newKey the key to check for.\n@return <code>true</code> if the key already exists, <code>false</code> otherwise.",
"Delivers the correct JSON Object for the target\n\n@param target\n@throws org.json.JSONException",
"Get the real Class\n\n@param objectOrProxy\n@return Class",
"Asynchronously put the work into the pending map so we can work on submitting it to the worker\nif we wanted. Could possibly cause duplicate work if we execute the work, then add to the map.\n@param task\n@return"
] |
private void countEntity() {
if (!this.timer.isRunning()) {
startTimer();
}
this.entityCount++;
if (this.entityCount % 100 == 0) {
timer.stop();
int seconds = (int) (timer.getTotalWallTime() / 1000000000);
if (seconds >= this.lastSeconds + this.reportInterval) {
this.lastSeconds = seconds;
printStatus();
if (this.timeout > 0 && seconds > this.timeout) {
logger.info("Timeout. Aborting processing.");
throw new TimeoutException();
}
}
timer.start();
}
} | [
"Counts one entity. Every once in a while, the current time is checked so\nas to print an intermediate report roughly every ten seconds."
] | [
"Returns all the version directories present in the root directory\nspecified\n\n@param rootDir The parent directory\n@param maxId The\n@return An array of version directories",
"Split string of comma-delimited ints into an a int array\n\n@param str\n@return\n@throws IllegalArgumentException",
"Parse priority.\n\n\n@param priority priority value\n@return Priority instance",
"Returns the corresponding mac section, or null if this address section does not correspond to a mac section.\nIf this address section has a prefix length it is ignored.\n\n@param extended\n@return",
"Compute the repair set from the given values and nodes\n\n@param nodeValues The value found on each node\n@return A set of repairs to perform",
"Write flow id to message.\n\n@param message the message\n@param flowId the flow id",
"Prioritises the list of step candidates that match a given step.\n\n@param stepAsText\nthe textual step to match\n@param candidates\nthe List of StepCandidate\n@return The prioritised list according to the\n{@link PrioritisingStrategy}.",
"Apply filter to an image.\n\n@param source FastBitmap",
"add a foreign key field"
] |
protected void appendWhereClause(StringBuffer where, Criteria crit, StringBuffer stmt)
{
if (where.length() == 0)
{
where = null;
}
if (where != null || (crit != null && !crit.isEmpty()))
{
stmt.append(" WHERE ");
appendClause(where, crit, stmt);
}
} | [
"appends a WHERE-clause to the Statement\n@param where\n@param crit\n@param stmt"
] | [
"GetJob helper - String predicates are all created the same way, so this factors some code.",
"This method lists all resource assignments defined in the file.\n\n@param file MPX file",
"Returns the expression string required\n\n@param ds\n@return",
"Reads the configuration of a range facet.\n@param pathPrefix The XML Path that leads to the range facet configuration, or <code>null</code> if the XML was not correctly structured.\n@return The read configuration, or <code>null</code> if the XML was not correctly structured.",
"Log warning for the resource at the provided address and single attribute, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param message custom error message to append\n@param attribute attribute we are warning about",
"Get HttpResourceModel which matches the HttpMethod of the request.\n\n@param routableDestinations List of ResourceModels.\n@param targetHttpMethod HttpMethod.\n@param requestUri request URI.\n@return RoutableDestination that matches httpMethod that needs to be handled. null if there are no matches.",
"fetch correct array index if index is less than 0\n\nArrayNode will convert all negative integers into 0...\n\n@param index wanted index\n@return {@link Integer} new index",
"Returns the precedence of the specified operator. Non-operator's will\nreceive -1 or a GroovyBugError, depending on your preference.",
"Return SELECT clause for object existence call"
] |
public final PJsonObject getJSONObject(final int i) {
JSONObject val = this.array.optJSONObject(i);
final String context = "[" + i + "]";
if (val == null) {
throw new ObjectMissingException(this, context);
}
return new PJsonObject(this, val, context);
} | [
"Get the element at the index as a json object.\n\n@param i the index of the object to access"
] | [
"Writes the entire remaining contents of the buffer to the channel. May complete in one operation, but the\ndocumentation is vague, so this keeps going until we are sure.\n\n@param buffer the data to be written\n@param channel the channel to which we want to write data\n\n@throws IOException if there is a problem writing to the channel",
"Use this API to fetch all the ci resources that are configured on netscaler.",
"Parse the json string to the diagram model, assumes that the json is\nhierarchical ordered\n@param json\n@return Model with all shapes defined in JSON\n@throws org.json.JSONException",
"Disable all overrides for a specified path\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client",
"create a HTTP POST request.\n\n@return {@link HttpConnection}",
"Here we specify the configuration, starting from default MostUsefulConfiguration, and changing only what is needed",
"Check that the scope type is allowed by the stereotypes on the bean and\nthe bean type",
"Returns the type of the current member which is the type in the case of a field, the return type for a getter\nmethod, or the type of the parameter for a setter method.\n\n@return The member type\n@exception XDocletException if an error occurs",
"Record operation for async ops time\n\n@param dest Destination of the socket to connect to. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param opTimeUs The number of us for the op to finish"
] |
public Weld addPackages(boolean scanRecursively, Class<?>... packageClasses) {
for (Class<?> packageClass : packageClasses) {
addPackage(scanRecursively, packageClass);
}
return this;
} | [
"Packages of the specified classes will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClasses\n@return self"
] | [
"This method log given exception in specified listener",
"Singleton of MetaClassRegistry.\n\n@param includeExtension\n@return the registry",
"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",
"Sets the number of views for this Photo. For un-authenticated calls this value is not available and will be set to -1.\n\n@param views\n@deprecated attribute no longer available",
"Adds a directory to the collection of module paths.\n\n@param moduleDir the module directory to add\n\n@throws java.lang.IllegalArgumentException if the path is {@code null}",
"Returns the orthogonal U matrix.\n\n@param U If not null then the results will be stored here. Otherwise a new matrix will be created.\n@return The extracted Q matrix.",
"Add a new download. The download will start automatically once the download manager is\nready to execute it and connectivity is available.\n\n@param request the parameters specifying this download\n@return an ID for the download, unique across the application. This ID is used to make future\ncalls related to this download.\n@throws IllegalArgumentException",
"Retrieves the amount of work on a given day, and\nreturns it in the specified format.\n\n@param date target date\n@param format required format\n@return work duration",
"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."
] |
private Widget setStyle(Widget widget) {
widget.setWidth(m_width);
widget.getElement().getStyle().setDisplay(Display.INLINE_BLOCK);
return widget;
} | [
"Set the style for the widgets in the panel according to the chosen style option.\n@param widget the widget that should be styled.\n@return the styled widget."
] | [
"Returns an iterator equivalent to this iterator with all duplicated items removed\nby using the default comparator. The original iterator will become\nexhausted of elements after determining the unique values. A new iterator\nfor the unique values will be returned.\n\n@param self an Iterator\n@return the modified Iterator\n@since 1.5.5",
"converts the file URIs with an absent authority to one with an empty",
"Tell a device to become tempo master.\n\n@param deviceNumber the device we want to take over the role of tempo master\n\n@throws IOException if there is a problem sending the command to the device\n@throws IllegalStateException if the {@code VirtualCdj} is not active\n@throws IllegalArgumentException if {@code deviceNumber} is not found on the network",
"Visit the implicit first frame of this method.",
"Implement this to do your drawing.\n\n@param canvas the canvas on which the background will be drawn",
"Translate the operation address.\n\n@param op the operation\n@return the new operation",
"Retrieve the finish slack.\n\n@return finish slack",
"Read custom property definitions for resources.\n\n@param gpResources GanttProject resources",
"Append data to JSON response.\n@param param\n@param value"
] |
@SuppressWarnings("unchecked")
public <T extends ReportModel> T getReportByName(String name, Class<T> clazz)
{
WindupVertexFrame model = this.getUniqueByProperty(ReportModel.REPORT_NAME, name);
try
{
return (T) model;
}
catch (ClassCastException ex)
{
throw new WindupException("The vertex is not of expected frame type " + clazz.getName() + ": " + model.toPrettyString());
}
} | [
"Returns the ReportModel with given name."
] | [
"Sets the left padding character for all cells in the row.\n@param paddingLeftChar new padding character, ignored if null\n@return this to allow chaining",
"Initializes the alarm sensor command class. Requests the supported alarm types.",
"Get the parameters of determining this parametric\ncovariance model. The parameters are usually free parameters\nwhich may be used in calibration.\n\n@return Parameter vector.",
"Samples without replacement from a collection.\n\n@param c\nThe collection to be sampled from\n@param n\nThe number of samples to take\n@return a new collection with the sample",
"Use this API to unset the properties of snmpoption resource.\nProperties that need to be unset are specified in args array.",
"Constructs and sets the layout parameters to have some gravity.\n\n@param gravity the gravity of the Crouton\n@return <code>this</code>, for chaining.\n@see android.view.Gravity",
"Give an embedded association, creates all the nodes and relationships required to represent it.\nIt assumes that the entity node containing the association already exists in the db.\n\n@param executionEngine the {@link GraphDatabaseService} to run the query\n@param associationKey the {@link AssociationKey} identifying the association\n@param embeddedKey the {@link EntityKey} identifying the embedded component\n@return the created {@link Relationship} that represents the association",
"Use this API to reset appfwlearningdata resources.",
"Use this API to update snmpalarm."
] |
public static String pennPOSToWordnetPOS(String s) {
if (s.matches("NN|NNP|NNS|NNPS")) {
return "noun";
}
if (s.matches("VB|VBD|VBG|VBN|VBZ|VBP|MD")) {
return "verb";
}
if (s.matches("JJ|JJR|JJS|CD")) {
return "adjective";
}
if (s.matches("RB|RBR|RBS|RP|WRB")) {
return "adverb";
}
return null;
} | [
"Computes the WordNet 2.0 POS tag corresponding to the PTB POS tag s.\n\n@param s a Penn TreeBank POS tag."
] | [
"Find the current layout and extract the activity code order and visibility.\n\n@param phoenixProject phoenix project data",
"Returns iban's country code and check digit.\n\n@param iban String\n@return countryCodeAndCheckDigit String",
"We have received an update that invalidates the beat grid for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no beat grid for the associated player",
"Use this API to update lbsipparameters.",
"Adds an array of groupby fieldNames for ReportQueries.\n@param fieldNames The groupby to set\n@deprecated use QueryByCriteria#addGroupBy",
"Use this API to update inat.",
"Returns an array of all endpoints\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param filters filters to apply to endpoints\n@return Collection of endpoints\n@throws Exception exception",
"Changes the message of this comment.\n@param newMessage the new message for this comment.\n@return updated info about this comment.",
"scans right to left until max to maintain latest max values for the multi-value property specified by key.\n\n@param key the property key\n@param left original list\n@param right new list\n@param remove if remove new list from original\n@param vr ValidationResult for error and merged list return"
] |
public void removeMarker(Marker marker) {
if (markers != null && markers.contains(marker)) {
markers.remove(marker);
}
marker.setMap(null);
} | [
"Removes the supplied marker from the map.\n\n@param marker"
] | [
"To be called at node startup - it purges all job instances associated to this node.\n\n@param cnx\n@param node",
"Get a property as a json object or null.\n\n@param key the property name",
"Get the service implementations for a given type name.\n\n@param serviceTypeName the type name\n@return the possibly empty list of services",
"Adds a data set with date-time value to IIM file.\n\n@param ds\ndata set id (see constants in IIM class)\n@param date\ndate to set. Null values are silently ignored.\n@throws SerializationException\nif value can't be serialized by data set's serializer\n@throws InvalidDataSetException\nif data set isn't defined",
"This method extracts data for an exception day from an MSPDI file.\n\n@param calendar Calendar data\n@param day Day data",
"Build the tree of joins for the given criteria",
"Use this API to fetch a responderglobal_responderpolicy_binding resources.",
"Sets a single element of this vector. Elements 0, 1, and 2 correspond to\nx, y, and z.\n\n@param i\nelement index\n@param value\nelement value\n@return element value throws ArrayIndexOutOfBoundsException if i is not\nin the range 0 to 2.",
"Read the header from the Phoenix file.\n\n@param stream input stream\n@return raw header data"
] |
public static final BigDecimal printDurationInDecimalThousandthsOfMinutes(Duration duration)
{
BigDecimal result = null;
if (duration != null && duration.getDuration() != 0)
{
result = BigDecimal.valueOf(printDurationFractionsOfMinutes(duration, 1000));
}
return result;
} | [
"Print duration in thousandths of minutes.\n\n@param duration Duration instance\n@return duration in thousandths of minutes"
] | [
"Find out which field in the incoming message contains the payload that is.\ndelivered to the service method.",
"Sets all padding for all cells in the row 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",
"Use this API to add vpnclientlessaccesspolicy.",
"Writes image files for all data that was collected and the statistics\nfile for all sites.",
"Returns the total count of the specified event\n@param event The event for which you want to get the total count\n@return Total count in int",
"Helper method for formatting connection termination messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@param terminationReason\nThe reason for terminating the connection\n@return A formatted message in the format:\n\"[<connectionName>] remote host[<host>] <connectionReason> - <terminationReason>\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG -\nterminated by remote host.",
"This will create a line in the SDEF file for each calendar\nif there are more than 9 calendars, you'll have a big error,\nas USACE numbers them 0-9.\n\n@param records list of ProjectCalendar instances",
"Removes the specified type from the frame.",
"Use this API to fetch dnszone_domain_binding resources of given name ."
] |
public static String serialize(final Object obj) throws IOException {
final ObjectMapper mapper = new ObjectMapper();
mapper.disable(MapperFeature.USE_GETTERS_AS_SETTERS);
return mapper.writeValueAsString(obj);
} | [
"Serialize an object with Json\n@param obj Object\n@return String\n@throws IOException"
] | [
"Use this API to fetch all the appfwsignatures resources that are configured on netscaler.",
"Writes the message to the specified channel, for example when creating metadata cache files.\n\n@param channel the channel to which it should be written\n\n@throws IOException if there is a problem writing to the channel",
"Resets the resend counter and possibly resets the\nnode stage to DONE when previous initialization was\ncomplete.",
"Set the payload to the fileModel of the given instance even though the variable is not directly referencing it. This is mainly to simplify the\ncreation of the rule, when the FileModel itself is not being iterated but just a model referencing it.",
"A connection to the database. Should be short-lived. No transaction active by default.\n\n@return a new open connection.",
"Get the unique set of declared methods on the leaf class and all superclasses. Leaf\nclass methods are included first and while traversing the superclass hierarchy any methods found\nwith signatures matching a method already included are filtered out.",
"Check whether vector addition works. This is pure Java code and should work.",
"Creates a converter function that converts value into primitive type.\n\n@return A converter function or {@code null} if the given type is not primitive type or boxed type",
"Removes and returns a random element from the set.\n@return the removed element, or <code>null</code> when the key does not exist."
] |
public ServerGroup addServerGroup(String groupName) {
ServerGroup group = new ServerGroup();
BasicNameValuePair[] params = {
new BasicNameValuePair("name", groupName),
new BasicNameValuePair("profileIdentifier", this._profileName)
};
try {
JSONObject response = new JSONObject(doPost(BASE_SERVERGROUP, params));
group = getServerGroupFromJSON(response);
} catch (Exception e) {
e.printStackTrace();
return null;
}
return group;
} | [
"Create a new server group\n\n@param groupName name of server group\n@return Created ServerGroup"
] | [
"The normalized string returned by this method is consistent with java.net.Inet6address.\nIPs are not compressed nor mixed in this representation.",
"Adds a file with the provided description.",
"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",
"Get the filters ExporterServiceFilter and ExportDeclarationFilter from the properties, stop the instance if one of.\nthem is invalid.",
"Checks if template mapper is configured in modules.\n\n@return true if the template mapper is configured in modules",
"Use this API to update sslparameter.",
"Adds, eventually merging, a direction for the specified relation type\n@param relationType\n@param direction",
"IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery",
"Given a field node, checks if we are calling a private field from an inner class."
] |
public static String termPrefix(String term) {
int i = term.indexOf(MtasToken.DELIMITER);
String prefix = term;
if (i >= 0) {
prefix = term.substring(0, i);
}
return prefix.replace("\u0000", "");
} | [
"Term prefix.\n\n@param term\nthe term\n@return the string"
] | [
"Randomly shuffle partitions between nodes within every zone.\n\n@param nextCandidateCluster cluster object.\n@param randomSwapAttempts See RebalanceCLI.\n@param randomSwapSuccesses See RebalanceCLI.\n@param randomSwapZoneIds The set of zoneIds to consider. Each zone is done\nindependently.\n@param storeDefs List of store definitions\n@return updated cluster",
"Gets value of this function at the current point, computed on the given batch of examples.\n@param batch A set of indices indicating the examples over which the gradient should be computed.\n@return The value of the function at the point.",
"Migrate to Jenkins \"Credentials\" plugin from the old credential implementation",
"Build the Criteria using multiple ORs\n@param ids collection of identities\n@param fields\n@return Criteria",
"Whether the given value generation strategy requires to read the value from the database or not.",
"To sql pattern.\n\n@param attribute the attribute\n@return the string",
"Render a zero Double as null.\n\n@param value double value\n@return null if the double value is zero",
"Reopen the associated static logging stream. Set to null to redirect to System.out.",
"Use this API to fetch all the cacheobject resources that are configured on netscaler."
] |
public String getRemoteUrl(String defaultRemoteUrl) {
if (StringUtils.isBlank(defaultRemoteUrl)) {
RemoteConfig remoteConfig = getJenkinsScm().getRepositories().get(0);
URIish uri = remoteConfig.getURIs().get(0);
return uri.toPrivateString();
}
return defaultRemoteUrl;
} | [
"This method is currently in use only by the SvnCoordinator"
] | [
"Sets the scale vector of the keyframe.",
"Sets the currently edited locale.\n@param locale the locale to set.",
"Updates the font table by adding new fonts used at the current page.",
"Last caller of this method will unregister the Mbean. All callers\ndecrement the counter.",
"Write an unsigned short to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The short to write\n@param offset The offset to begin writing at",
"Creates a window visually showing the matrix's state. Block means an element is zero.\nRed positive and blue negative. More intense the color larger the element's absolute value\nis.\n\n@param A A matrix.\n@param title Name of the window.",
"Assign float value within allowed range of [0,infinity) to initializeOnly SFFloat field named spacing.\n@param newValue",
"Updates the text style according to a new text position\n@param bstyle the style to be updated\n@param text the text position",
"Establish a new tempo master, and if it is a change from the existing one, report it to the listeners.\n\n@param newMaster the packet which caused the change of masters, or {@code null} if there is now no master."
] |
public static <T extends Comparable<? super T>> List<T> sortInplace(List<T> list) {
Collections.sort(list);
return list;
} | [
"Sorts the specified list itself into ascending order, according to the natural ordering of its elements.\n\n@param list\nthe list to be sorted. May not be <code>null</code>.\n@return the sorted list itself.\n@see Collections#sort(List)"
] | [
"Add a post-effect to this camera's render chain.\n\nPost-effects are GL shaders, applied to the texture (hardware bitmap)\ncontaining the rendered scene graph. Each post-effect combines a shader\nselector with a set of parameters: This lets you pass different\nparameters to the shaders for each eye.\n\n@param postEffectData\nPost-effect to append to this camera's render chain",
"Log a message at the provided level.",
"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",
"Get replication document state for a given replication document ID.\n\n@param docId The replication document ID\n@return Replication document for {@code docId}",
"True if deleted, false if not found.",
"Writes the JavaScript code describing the tags as Tag classes to given writer.",
"Adds a Statement.\n\n@param rank\nrank of the statement\n@param subject\nrdf resource that refers to the statement",
"format with lazy-eval",
"Adds a new Matrix variable. If one already has the same name it is written over.\n\nWhile more verbose for multiple variables, this function doesn't require new memory be declared\neach time it's called.\n\n@param variable Matrix which is to be assigned to name\n@param name The name of the variable"
] |
public static String fillLogParams(String sql, Map<Object, Object> logParams) {
StringBuilder result = new StringBuilder();
Map<Object, Object> tmpLogParam = (logParams == null ? new HashMap<Object, Object>() : logParams);
Iterator<Object> it = tmpLogParam.values().iterator();
boolean inQuote = false;
boolean inQuote2 = false;
char[] sqlChar = sql != null ? sql.toCharArray() : new char[]{};
for (int i=0; i < sqlChar.length; i++){
if (sqlChar[i] == '\''){
inQuote = !inQuote;
}
if (sqlChar[i] == '"'){
inQuote2 = !inQuote2;
}
if (sqlChar[i] == '?' && !(inQuote || inQuote2)){
if (it.hasNext()){
result.append(prettyPrint(it.next()));
} else {
result.append('?');
}
} else {
result.append(sqlChar[i]);
}
}
return result.toString();
} | [
"Returns sql statement used in this prepared statement together with the parameters.\n@param sql base sql statement\n@param logParams parameters to print out\n@return returns printable statement"
] | [
"Returns true if conversion between the sourceType and targetType can be bypassed.\nMore precisely this method will return true if objects of sourceType can be\nconverted to the targetType by returning the source object unchanged.\n@param sourceType context about the source type to convert from (may be null if source is null)\n@param targetType context about the target type to convert to (required)\n@return true if conversion can be bypassed\n@throws IllegalArgumentException if targetType is null",
"Initialize. create the httpClientStore, tcpClientStore",
"Adjusts the day in the provided month, that it fits the specified week day.\nIf there's no match for that provided month, the next possible month is checked.\n\n@param date the date to adjust, with the correct year and month already set.",
"This is more expensive.\n\n@param key key whose presence in this map is to be tested.\n@return <tt>true</tt> if this map contains a mapping for the specified\nkey.",
"Use this API to delete systementitydata.",
"Adds a new gender item and an initial name.\n\n@param entityIdValue\nthe item representing the gender\n@param name\nthe label to use for representing the gender",
"Returns a single template.\n\n@param id id of the template to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"Check if the gravity and orientation are not in conflict one with other.\n@param gravity\n@param orientation\n@return true if orientation and gravity can be applied together, false - otherwise",
"The parameter must never be null\n\n@param queryParameters"
] |
private void writePriorityField(String fieldName, Object value) throws IOException
{
m_writer.writeNameValuePair(fieldName, ((Priority) value).getValue());
} | [
"Write a priority field to the JSON file.\n\n@param fieldName field name\n@param value field value"
] | [
"Writes task baseline data.\n\n@param xmlTask MSPDI task\n@param mpxjTask MPXJ task",
"Packages of the specified classes will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClasses\n@return self",
"Checks whether every property except 'preferred' is satisfied\n\n@return",
"Split a span into two by adding a knot in the middle.\n@param n the span index",
"Returns string content of blob identified by specified blob handle. String contents cache is used.\n\n@param blobHandle blob handle\n@param txn {@linkplain Transaction} instance\n@return string content of blob identified by specified blob handle\n@throws IOException if something went wrong",
"Returns a presentable version of the given PTB-tokenized text.\nPTB tokenization splits up punctuation and does various other things\nthat makes simply joining the tokens with spaces look bad. So join\nthe tokens with space and run it through this method to produce nice\nlooking text. It's not perfect, but it works pretty well.\n\n@param ptbText A String in PTB3-escaped form\n@return An approximation to the original String",
"Returns the value of the identified field as a Float.\n@param fieldName the name of the field\n@return the value of the field as a Float\n@throws FqlException if the field cannot be expressed as an Float",
"Use this API to fetch the statistics of all scpolicy_stats resources that are configured on netscaler.",
"Use this API to fetch a sslglobal_sslpolicy_binding resources."
] |
private String getResourceType(Resource resource)
{
String result;
net.sf.mpxj.ResourceType type = resource.getType();
if (type == null)
{
type = net.sf.mpxj.ResourceType.WORK;
}
switch (type)
{
case MATERIAL:
{
result = "Material";
break;
}
case COST:
{
result = "Nonlabor";
break;
}
default:
{
result = "Labor";
break;
}
}
return result;
} | [
"Formats a resource type.\n\n@param resource MPXJ resource\n@return Primavera resource type"
] | [
"Create a container in the platform\n\n@param container\nThe name of the container",
"This procedure is invoked to process the \"subst\" Tcl command.\nSee the user documentation for details on what it does.\n\n@param interp the current interpreter.\n@param argv command arguments.\n@exception TclException if wrong # of args or invalid argument(s).",
"Changes the image data associated with a GVRTexture.\nThis can be a simple bitmap, a compressed bitmap,\na cubemap or a compressed cubemap.\n@param imageData data for the texture as a GVRImate",
"This method reads an eight byte integer from the input array.\n\n@param data the input array\n@param offset offset of integer data in the array\n@return integer value",
"Returns the steps instances associated to CandidateSteps\n\n@param candidateSteps\nthe List of CandidateSteps\n@return The List of steps instances",
"Computes the square root of the complex number.\n\n@param input Input complex number.\n@param root Output. The square root of the input",
"Sets the time warp.\n\n@param l the new time warp",
"Load the given metadata profile for the current thread.",
"Pushes the Notification Viewed event to CleverTap.\n\n@param extras The {@link Bundle} object that contains the\nnotification details"
] |
private String getDynamicAttributeValue(
CmsFile file,
I_CmsXmlContentValue value,
String attributeName,
CmsEntity editedLocalEntity) {
if ((null != editedLocalEntity) && (editedLocalEntity.getAttribute(attributeName) != null)) {
getSessionCache().setDynamicValue(
attributeName,
editedLocalEntity.getAttribute(attributeName).getSimpleValue());
}
String currentValue = getSessionCache().getDynamicValue(attributeName);
if (null != currentValue) {
return currentValue;
}
if (null != file) {
if (value.getTypeName().equals(CmsXmlDynamicCategoryValue.TYPE_NAME)) {
List<CmsCategory> categories = new ArrayList<CmsCategory>(0);
try {
categories = CmsCategoryService.getInstance().readResourceCategories(getCmsObject(), file);
} catch (CmsException e) {
LOG.error(Messages.get().getBundle().key(Messages.ERROR_FAILED_READING_CATEGORIES_1), e);
}
I_CmsWidget widget = null;
widget = CmsWidgetUtil.collectWidgetInfo(value).getWidget();
if ((null != widget) && (widget instanceof CmsCategoryWidget)) {
String mainCategoryPath = ((CmsCategoryWidget)widget).getStartingCategory(
getCmsObject(),
getCmsObject().getSitePath(file));
StringBuffer pathes = new StringBuffer();
for (CmsCategory category : categories) {
if (category.getPath().startsWith(mainCategoryPath)) {
String path = category.getBasePath() + category.getPath();
path = getCmsObject().getRequestContext().removeSiteRoot(path);
pathes.append(path).append(',');
}
}
String dynamicConfigString = pathes.length() > 0 ? pathes.substring(0, pathes.length() - 1) : "";
getSessionCache().setDynamicValue(attributeName, dynamicConfigString);
return dynamicConfigString;
}
}
}
return "";
} | [
"Returns the value that has to be set for the dynamic attribute.\n\n@param file the file where the current content is stored\n@param value the content value that is represented by the attribute\n@param attributeName the attribute's name\n@param editedLocalEntity the entities that where edited last\n@return the value that has to be set for the dynamic attribute."
] | [
"Read task data from a PEP file.",
"This methods enhances the objects loaded by a broker query\nwith a JDO StateManager an brings them under JDO control.\n@param pojos the OJB pojos as obtained by the broker\n@return the collection of JDO PersistenceCapable instances",
"Generate the next permutation and return an array containing\nthe elements in the appropriate order.\n@see #nextPermutationAsArray(Object[])\n@see #nextPermutationAsList()\n@return The next permutation as an array.",
"Sets up internal data structures and creates a copy of the input matrix.\n\n@param A The input matrix. Not modified.",
"Read a single calendar exception.\n\n@param bc parent calendar\n@param exception exception data",
"Set the value of the underlying component. Note that this will\nnot work for ListEditor components. Also, note that for a JComboBox,\nThe value object must have the same identity as an object in the drop-down.\n\n@param propName The DMR property name to set.\n@param value The value.",
"Fetch a value from the Hashmap .\n\n@param firstKey\nfirst key\n@param secondKey\nsecond key\n@return the element or null.",
"Use this API to update sslocspresponder.",
"Adds the given value to the list of values that should still be\nserialized. The given RDF resource will be used as a subject.\n\n@param value\nthe value to be serialized\n@param resource\nthe RDF resource that is used as a subject for serialization"
] |
@SuppressWarnings("rawtypes")
private MailInboundChannelAdapterSpec getImapFlowBuilder(URLName urlName) {
return Mail.imapInboundAdapter(urlName.toString())
.shouldMarkMessagesAsRead(this.properties.isMarkAsRead());
} | [
"Method to build Mail Channel Adapter for IMAP.\n@param urlName Mail source URL.\n@return Mail Channel for IMAP"
] | [
"Returns tag formatted as an HTTP tag string.\n\n@return The formatted HTTP tag string.\n\n@see <a\nhref=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11\">HTTP\nEntity Tags</a>",
"Remove a part of a CharSequence. This replaces the first occurrence\nof the pattern within self with '' and returns the result.\n\n@param self a String\n@param pattern a Pattern representing the part to remove\n@return a String minus the part to be removed\n@since 2.2.0",
"Process schedule options from SCHEDOPTIONS. This table only seems to exist\nin XER files, not P6 databases.",
"Total count of partition-stores moved in this task.\n\n@return number of partition stores moved in this task.",
"Input method, called by a Subscriber indicating its intent into receive notification about a given topic.\n\n@param sr DTO containing the info given by the protocol",
"Log a message with a throwable at the provided level.",
"Appends a String to the string representation of this number.\n\n@param value a Number\n@param right a String\n@return a String\n@since 1.0",
"Returns the name from the inverse side if the given property de-notes a one-to-one association.",
"Returns a String summarizing overall accuracy that will print nicely."
] |
synchronized void removeServerProcess() {
this.requiredState = InternalState.STOPPED;
internalSetState(new ProcessRemoveTask(), InternalState.STOPPED, InternalState.PROCESS_REMOVING);
} | [
"On host controller reload, remove a not running server registered in the process controller declared as down."
] | [
"Get a new token.\n\n@return 14 character String",
"Use this API to fetch dnsnsecrec resources of given names .",
"This method extracts data for a single day from an MSPDI file.\n\n@param calendar Calendar data\n@param day Day data\n@param readExceptionsFromDays read exceptions form day definitions",
"Dump an array of bytes in hexadecimal.\n\n@param displayOffset the display offset (left column)\n@param data the byte array of data\n@param offset the offset to start dumping in the byte array\n@param len the length of data to dump\n@return the dump string",
"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.",
"Fetches the current online data for the given item, and adds numerical\nlabels if necessary.\n\n@param itemIdValue\nthe id of the document to inspect",
"Check if a module can be promoted in the Grapes server\n\n@param name\n@param version\n@return a boolean which is true only if the module can be promoted\n@throws GrapesCommunicationException",
"Return the discount factor within a given model context for a given maturity.\n@param model The model used as a context (not required for this class).\n@param maturity The maturity in terms of ACT/365 daycount form this curve reference date. Note that this parameter might get rescaled to a different time parameter.\n@see net.finmath.marketdata.model.curves.DiscountCurveInterface#getDiscountFactor(net.finmath.marketdata.model.AnalyticModelInterface, double)",
"Creates a Bytes object by copying the data of the CharSequence and encoding it using UTF-8."
] |
private FieldDescriptor getFldFromJoin(TableAlias aTableAlias, String aColName)
{
FieldDescriptor fld = null;
// Search Join Structure for attribute
if (aTableAlias.joins != null)
{
Iterator itr = aTableAlias.joins.iterator();
while (itr.hasNext())
{
Join join = (Join) itr.next();
ClassDescriptor cld = join.right.cld;
if (cld != null)
{
fld = cld.getFieldDescriptorByName(aColName);
if (fld != null)
{
break;
}
}
}
}
return fld;
} | [
"Get FieldDescriptor from joined superclass."
] | [
"This method allows us to peek into the OLE compound document to extract the file format.\nThis allows the UniversalProjectReader to determine if this is an MPP file, or if\nit is another type of OLE compound document.\n\n@param fs POIFSFileSystem instance\n@return file format name\n@throws IOException",
"Fetches the HttpMethod from annotations and returns String representation of HttpMethod.\nReturn emptyString if not present.\n\n@param method Method handling the http request.\n@return String representation of HttpMethod from annotations or emptyString as a default.",
"Gets the list of failed invocations that has been collected by this collector.\n\n@return The failed invocations.",
"Return a set of all the Declaration matching the DeclarationFilter of the.\nLinker.\n\n@return a set of all the Declaration matching the DeclarationFilter of the\nLinker.",
"Put the core auto-code algorithm here so an external class can call it",
"Use this API to create ssldhparam.",
"Login for a specific authentication, creating a new token.\n\n@param authentication authentication to assign to token\n@return token",
"Sends a multipart response. Each body part represents a versioned value\nof the given key.\n\n@throws IOException\n@throws MessagingException",
"Initialises JMX stuff.\n@param doRegister if true, perform registration, if false unregister"
] |
public synchronized String requestBlock(String name) {
if (blocks.isEmpty()) {
return "exit";
}
remainingBlocks.decrementAndGet();
return blocks.poll().createResponse();
} | [
"Returns a description a block of work, or \"exit\" if no more blocks exist\n\n@param name the assigned name of the consumer requesting a block of work\n@return a description a block of work, or \"exit\" if no more blocks exist"
] | [
"Creates a new Terms of Services.\n@param api the API connection to be used by the resource.\n@param termsOfServiceStatus the current status of the terms of services. Set to \"enabled\" or \"disabled\".\n@param termsOfServiceType the scope of terms of service. Set to \"external\" or \"managed\".\n@param text the text field of terms of service containing terms of service agreement info.\n@return information about the Terms of Service created.",
"This method removes trailing delimiter characters.\n\n@param buffer input sring buffer",
"Get the element at the index as a json object.\n\n@param i the index of the object to access",
"Begin writing a named object attribute.\n\n@param name attribute name",
"Create a Vendor from a Func0",
"Adds any listeners attached to this reader to the reader created internally.\n\n@param reader internal project reader",
"Reads the integer representation of calendar hours for a given\nday and populates the calendar.\n\n@param calendar parent calendar\n@param day target day\n@param hours working hours",
"Compares two avro strings which contains single store configs\n\n@param configAvro1\n@param configAvro2\n@return true if two config avro strings have same content",
"add an Extent class to the current descriptor\n@param newExtentClassName name of the class to add"
] |
public static RgbaColor from(String color) {
if (color.startsWith("#")) {
return fromHex(color);
}
else if (color.startsWith("rgba")) {
return fromRgba(color);
}
else if (color.startsWith("rgb")) {
return fromRgb(color);
}
else if (color.startsWith("hsla")) {
return fromHsla(color);
}
else if (color.startsWith("hsl")) {
return fromHsl(color);
}
else {
return getDefaultColor();
}
} | [
"Parses an RgbaColor from a hexadecimal, rgb, rgba, hsl, or hsla\nvalue.\n\n@return returns the parsed color"
] | [
"We have obtained album art for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this art\n@param art the album art which we retrieved",
"Determines the field via reflection look-up.\n\n@param clazz The java class to search in\n@param fieldName The field's name\n@return The field object or <code>null</code> if no matching field was found",
"Map the Primavera UDF to a custom field.\n\n@param fieldType parent object type\n@param dataType UDF data type\n@param name UDF name\n@return FieldType instance",
"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",
"A property tied to the map, updated when the idle state event is fired.\n\n@return",
"Use this API to fetch all the sslparameter resources that are configured on netscaler.",
"Gets the declared bean type\n\n@return The bean type",
"Waits for the timeout duration until the url responds with correct status code\n\n@param routeUrl URL to check (usually a route one)\n@param timeout Max timeout value to await for route readiness.\nIf not set, default timeout value is set to 5.\n@param timeoutUnit TimeUnit used for timeout duration.\nIf not set, Minutes is used as default TimeUnit.\n@param repetitions How many times in a row the route must respond successfully to be considered available.\n@param statusCodes list of status code that might return that service is up and running.\nIt is used as OR, so if one returns true, then the route is considered valid.\nIf not set, then only 200 status code is used.",
"Adds a redeploy step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment being redeployed"
] |
public static aaaparameter get(nitro_service service) throws Exception{
aaaparameter obj = new aaaparameter();
aaaparameter[] response = (aaaparameter[])obj.get_resources(service);
return response[0];
} | [
"Use this API to fetch all the aaaparameter resources that are configured on netscaler."
] | [
"Read the given number of bytes into a long\n\n@param bytes The byte array to read from\n@param offset The offset at which to begin reading\n@param numBytes The number of bytes to read\n@return The long value read",
"Returns all methods for a specific group\n\n@param groupId group ID to remove methods from\n@param filters array of method types to filter by, null means no filter\n@return Collection of methods found\n@throws Exception exception",
"Obtains a string from a PDF value\n@param value the PDF value of the String, Integer or Float type\n@return the corresponging string value",
"Returns a ReportWriter that which will use memory or a file depending on the parameter PAGES_THRESHOLD\n@param _jasperPrint\n@param _format\n@param _parameters\n@return",
"Indicates if this file represents a file on the underlying file system.\n\n@param filePath\n@return",
"End building the script\n@param config the configuration for the script to build\n@return the new {@link LuaScript} instance",
"Used to add exceptions to the calendar. The MPX standard defines\na limit of 250 exceptions per calendar.\n\n@param fromDate exception start date\n@param toDate exception end date\n@return ProjectCalendarException instance",
"Sets the text alignment for all cells in the row.\n@param textAlignment new text alignment\n@throws NullPointerException if the argument was null\n@return this to allow chaining\n@throws {@link NullPointerException} if the argument was null",
"Computes the longest common contiguous substring of s and t.\nThe LCCS is the longest run of characters that appear consecutively in\nboth s and t. For instance, the LCCS of \"color\" and \"colour\" is 4, because\nof \"colo\"."
] |
public static ComplexNumber Sin(ComplexNumber z1) {
ComplexNumber result = new ComplexNumber();
if (z1.imaginary == 0.0) {
result.real = Math.sin(z1.real);
result.imaginary = 0.0;
} else {
result.real = Math.sin(z1.real) * Math.cosh(z1.imaginary);
result.imaginary = Math.cos(z1.real) * Math.sinh(z1.imaginary);
}
return result;
} | [
"Calculates Sine value of the complex number.\n\n@param z1 A Complex Number instance.\n@return Returns new ComplexNumber instance containing the Sine value of the specified complex number."
] | [
"Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory",
"Given a parameter, builds a new parameter for which the known generics placeholders are resolved.\n@param genericFromReceiver resolved generics from the receiver of the message\n@param placeholdersFromContext, resolved generics from the method context\n@param methodParameter the method parameter for which we want to resolve generic types\n@param paramType the (unresolved) type of the method parameter\n@return a new parameter with the same name and type as the original one, but with resolved generic types",
"Returns the ending used by the Wikimedia-provided dumpfile names of the\ngiven type.\n\n@param dumpContentType\nthe type of dump\n@return postfix of the dumpfile name\n@throws IllegalArgumentException\nif the given dump file type is not known",
"Prints the plan to a file.\n\n@param outputDirName\n@param plan",
"Append a Handler to a portion of the handler tree\n@param parent The parent to add the child to\n@param child The Handler to add.",
"Adds a data set with date-time value to IIM file.\n\n@param ds\ndata set id (see constants in IIM class)\n@param date\ndate to set. Null values are silently ignored.\n@throws SerializationException\nif value can't be serialized by data set's serializer\n@throws InvalidDataSetException\nif data set isn't defined",
"Parse priority.\n\n\n@param priority priority value\n@return Priority instance",
"Use this API to update dbdbprofile resources.",
"Use this API to fetch authenticationldappolicy_vpnglobal_binding resources of given name ."
] |
public Object getBeliefValue(String agent_name, final String belief_name,
Connector connector) {
((IExternalAccess) connector.getAgentsExternalAccess(agent_name))
.scheduleStep(new IComponentStep<Integer>() {
public IFuture<Integer> execute(IInternalAccess ia) {
IBDIInternalAccess bia = (IBDIInternalAccess) ia;
belief_value = bia.getBeliefbase()
.getBelief(belief_name).getFact();
return null;
}
}).get(new ThreadSuspendable());
return belief_value;
} | [
"This method takes the value of an agent's belief through its external\naccess\n\n@param agent_name\nThe name of the agent\n@param belief_name\nThe name of the belief inside agent's adf\n@param connector\nThe connector to get the external access\n@return belief_value The value of the requested belief"
] | [
"Use this API to fetch all the configstatus resources that are configured on netscaler.",
"Read one collection element from the current row of the JDBC result set\n\n@param optionalOwner the collection owner\n@param optionalKey the collection key\n@param persister the collection persister\n@param descriptor the collection aliases\n@param rs the result set\n@param session the session\n@throws HibernateException if an error occurs\n@throws SQLException if an error occurs during the query execution",
"Use this API to fetch authenticationradiusaction resource of given name .",
"Calculates how much of a time range is before or after a\ntarget intersection point.\n\n@param start time range start\n@param end time range end\n@param target target intersection point\n@param after true if time after target required, false for time before\n@return length of time in milliseconds",
"If the DefaultActionInvocation has been executed before and the Result is\nan instance of ActionChainResult, this method will walk down the chain of\nActionChainResults until it finds a non-chain result, which will be\nreturned. If the DefaultActionInvocation's result has not been executed\nbefore, the Result instance will be created and populated with the result\nparams.\n\n@return a Result instance\n@throws Exception",
"Confirms that both clusters have the same number of total partitions.\n\n@param lhs\n@param rhs",
"Renames this file.\n\n@param newName the new name of the file.",
"Capture stdout and route them through Redwood\n@return this",
"If you want to stop recorded events from being sent to the server, use this method to set the SDK instance to offline.\nOnce offline, events will be recorded and queued locally but will not be sent to the server until offline is disabled.\nCalling this method again with offline set to false will allow events to be sent to server and the SDK instance will immediately attempt to send events that have been queued while offline.\n\n@param value boolean, true sets the sdk offline, false sets the sdk back online"
] |
static public String bb2hex(byte[] bb) {
String result = "";
for (int i=0; i<bb.length; i++) {
result = result + String.format("%02X ", bb[i]);
}
return result;
} | [
"Converts a byte array to a hexadecimal string representation\n@param bb the byte array to convert\n@return string the string representation"
] | [
"Retrieve a UUID field.\n\n@param type field type\n@return UUID instance",
"Return the numeraire at a given time.\nThe numeraire is provided for interpolated points. If requested on points which are not\npart of the tenor discretization, the numeraire uses a linear interpolation of the reciprocal\nvalue. See ISBN 0470047224 for details.\n\n@param time Time time <i>t</i> for which the numeraire should be returned <i>N(t)</i>.\n@return The numeraire at the specified time as <code>RandomVariableFromDoubleArray</code>\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Converts the Conditionals into real headers.\n@return real headers.",
"Create a document that parses the tile's labelFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@param labelStyleInfo\nlabel style info\n@return graphics document\n@throws RenderException\ncannot render",
"Runs a Story with the given configuration and steps.\n\n@param configuration the Configuration used to run story\n@param candidateSteps the List of CandidateSteps containing the candidate\nsteps methods\n@param story the Story to run\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.",
"Set the week of the month the events should occur.\n@param weekOfMonth the week of month to set (first to fifth, where fifth means last).",
"Returns the next index of the argument by decrementing 1 from the possibly parsed number\n\n@param description this String will be searched from the start for a number\n@param defaultIndex this will be returned if the match does not succeed\n@return the parsed index or the defaultIndex",
"Calculate delta with another vector\n@param v another vector\n@return delta vector",
"Use this API to fetch sslcertkey_sslocspresponder_binding resources of given name ."
] |
private SortedSet<Date> filterExceptions(SortedSet<Date> dates) {
SortedSet<Date> result = new TreeSet<Date>();
for (Date d : dates) {
if (!m_exceptions.contains(d)) {
result.add(d);
}
}
return result;
} | [
"Filters all exceptions from the provided dates.\n@param dates the dates to filter.\n@return the provided dates, except the ones that match some exception."
] | [
"Select calendar data from the database.\n\n@throws SQLException",
"Save page to log\n\n@return address of this page after save",
"Maps all views that don't start with \"android\" namespace.\n\n@param names All shared element names.\n@return The obsolete shared element names.",
"Deals with the case where we have had to map a task ID to a new value.\n\n@param id task ID from database\n@return mapped task ID",
"Ask the specified player for the specified waveform detail from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform detail\n\n@return the waveform detail, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running",
"Returns all visble sets and pools the photo belongs to.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo to return information for.\n@return a list of {@link PhotoContext} objects\n@throws FlickrException",
"Get a setted section knowing his title\n\nN.B. this search only into section list and bottom section list.\n@param title is the title of the section\n@return the section with title or null if the section is not founded",
"Indicates if this file represents a directory on the underlying file system.\n\n@param directoryPath\n@return",
"Removes old entries in the history table for the given profile and client UUID\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param limit Maximum number of history entries to remove\n@throws Exception exception"
] |
public static auditnslogpolicy_vpnvserver_binding[] get(nitro_service service, String name) throws Exception{
auditnslogpolicy_vpnvserver_binding obj = new auditnslogpolicy_vpnvserver_binding();
obj.set_name(name);
auditnslogpolicy_vpnvserver_binding response[] = (auditnslogpolicy_vpnvserver_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch auditnslogpolicy_vpnvserver_binding resources of given name ."
] | [
"Accesses a property from the DB configuration for the selected DB.\n\n@param name the name of the property\n@return the value of the property",
"Creates a field map for assignments.\n\n@param props props data",
"Here we start a intern odmg-Transaction to hide transaction demarcation\nThis method could be invoked several times within a transaction, but only\nthe first call begin a intern odmg transaction",
"A smoothed pulse function. A cubic function is used to smooth the step between two thresholds.\n@param a1 the lower threshold position for the start of the pulse\n@param a2 the upper threshold position for the start of the pulse\n@param b1 the lower threshold position for the end of the pulse\n@param b2 the upper threshold position for the end of the pulse\n@param x the input parameter\n@return the output value",
"After obtaining a connection, perform additional tasks.\n@param handle\n@param statsObtainTime",
"Detects if the current device is a mobile device.\nThis method catches most of the popular modern devices.\nExcludes Apple iPads and other modern tablets.\n@return detection of any mobile device using the quicker method",
"Tells you if the expression is a null safe dereference.\n@param expression\nexpression\n@return\ntrue if is null safe dereference.",
"Invoked when an action occurs.",
"Set the dates for the specified photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param datePosted\nThe date the photo was posted or null\n@param dateTaken\nThe date the photo was taken or null\n@param dateTakenGranularity\nThe granularity of the taken date or null\n@throws FlickrException"
] |
public void loadClassifier(String loadPath, Properties props) throws ClassCastException, IOException, ClassNotFoundException {
InputStream is;
// ms, 10-04-2010: check first is this path exists in our CLASSPATH. This
// takes priority over the file system.
if ((is = loadStreamFromClasspath(loadPath)) != null) {
Timing.startDoing("Loading classifier from " + loadPath);
loadClassifier(is);
is.close();
Timing.endDoing();
} else {
loadClassifier(new File(loadPath), props);
}
} | [
"Loads a classifier from the file specified by loadPath. If loadPath ends in\n.gz, uses a GZIPInputStream, else uses a regular FileInputStream."
] | [
"Return the parent outline number, or an empty string if\nwe have a root task.\n\n@param outlineNumber child outline number\n@return parent outline number",
"This is private. It is a helper function for the utils.",
"Sets the database dialect.\n\n@param dialect\nthe database dialect",
"Use this API to fetch sslaction resource of given name .",
"Sets the left padding for all cells in the row.\n@param paddingLeft new padding, ignored if smaller than 0\n@return this to allow chaining",
"Add an executable \"post-run\" dependent for this model.\n\n@param executable the executable \"post-run\" dependent\n@return the key to be used as parameter to taskResult(string) method to retrieve result of executing\nthe executable \"post-run\" dependent",
"Returns true if the predicate is true for all pixels in the image.\n\n@param predicate a predicate function that accepts 3 parameters - the x,y coordinate and the pixel at that coordinate\n@return true if f holds for at least one pixel",
"Generate random time stamps from the current time upto the next one second.\nPassed as texture coordinates to the vertex shader; an unused field is present\nwith every pair passed.\n\n@param totalTime\n@return",
"Ensures that the foreign keys required by the given collection are present in the element class.\n\n@param modelDef The model\n@param collDef The collection\n@throws ConstraintException If there is a problem with the foreign keys"
] |
public Map<String, Object> getArtifactFieldsFilters() {
final Map<String, Object> params = new HashMap<String, Object>();
for(final Filter filter: filters){
params.putAll(filter.artifactFilterFields());
}
return params;
} | [
"Generates a Map of query parameters for Artifact regarding the filters\n\n@return Map<String, Object>"
] | [
"Parses a PDF document and serializes the resulting DOM tree to an output. This requires\na DOM Level 3 capable implementation to be available.",
"Reads the table data from an input stream and breaks\nit down into rows.\n\n@param is input stream",
"Deletes a template.\n\n@param id id of the template to delete.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"Use this API to update responderpolicy.",
"Parses the dictionary from an InputStream.\n\n@param client The SolrClient instance object.\n@param lang The language of the dictionary.\n@param is The InputStream object.\n@param documents List to put the assembled SolrInputObjects into.\n@param closeStream boolean flag that determines whether to close the inputstream\nor not.",
"Use this API to fetch all the aaaparameter resources that are configured on netscaler.",
"Gets the estimated time remaining in milliseconds based upon the total number of work units, the start time, and how many units have been done\nso far.\n\nThis should not be called before any work units have been done.",
"Returns new instance of OptionalString with given key and value\n@param key key of the returned OptionalString\n@param value wrapped string\n@return given object wrapped in OptionalString with given key",
"Returns the specified element, or null."
] |
protected static boolean numericEquals(Field vector1, Field vector2) {
if (vector1.size() != vector2.size())
return false;
if (vector1.isEmpty())
return true;
Iterator<Object> it1 = vector1.iterator();
Iterator<Object> it2 = vector2.iterator();
while (it1.hasNext()) {
Object obj1 = it1.next();
Object obj2 = it2.next();
if (!(obj1 instanceof Number && obj2 instanceof Number))
return false;
if (((Number) obj1).doubleValue() != ((Number) obj2).doubleValue())
return false;
}
return true;
} | [
"Compares two vectors and determines if they are numeric equals,\nindependent of its type.\n\n@param vector1\nthe first vector\n@param vector2\nthe second vector\n@return true if the vectors are numeric equals"
] | [
"Specifies the timeout for a network request.\n\n@param timeout The timeout for a network request.\n@param unit The time unit of the specified timeout.\n@return This builder instance.",
"Should the URI be cached?\n\n@param requestUri request URI\n@return true when caching is needed",
"Use this API to update snmpmanager.",
"Returns the average event value in the current interval",
"Adds OPT_P | OPT_PARTITION option to OptionParser, with multiple\narguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Converts a date to an instance date bean.\n@return the instance date bean.",
"Description accessor provided for JSON serialization only.",
"Performs a similar transform on A-pI",
"Creates a decorator bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return a Bean"
] |
private void computeCosts() {
cost = Long.MAX_VALUE;
for (QueueItem item : queueSpans) {
cost = Math.min(cost, item.sequenceSpans.spans.cost());
}
} | [
"Compute costs."
] | [
"Indicates if this file represents a directory on the underlying file system.\n\n@param directoryPath\n@return",
"Inserts a single document locally and being to synchronize it based on its _id. Inserting\na document with the same _id twice will result in a duplicate key exception.\n\n@param namespace the namespace to put the document in.\n@param document the document to insert.",
"Returns the export format indicated in the result-type parameter \"layoutManager\"\n@param _invocation\n@return",
"Returns iterable with all enterprise assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all enterprise assignments.",
"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",
"Removes bean from scope.\n\n@param name bean name\n@return previous value",
"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",
"Checks whether a built of the indices is necessary.\n@param cms The appropriate CmsObject instance.\n@return true, if the spellcheck indices have to be rebuilt, otherwise false",
"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"
] |
private void doDelete(Object obj, boolean ignoreReferences) throws PersistenceBrokerException
{
//logger.info("DELETING " + obj);
// object is not null
if (obj != null)
{
obj = getProxyFactory().getRealObject(obj);
/**
* Kuali Foundation modification -- 8/24/2007
*/
if ( obj == null ) return;
/**
* End of Kuali Foundation modification
*/
/**
* MBAIRD
* 1. if we are marked for delete already, avoid recursing on this object
*
* arminw:
* use object instead Identity object in markedForDelete List,
* because using objects we get a better performance. I can't find
* side-effects in doing so.
*/
if (markedForDelete.contains(obj))
{
return;
}
ClassDescriptor cld = getClassDescriptor(obj.getClass());
//BRJ: check for valid pk
if (!serviceBrokerHelper().assertValidPkForDelete(cld, obj))
{
String msg = "Cannot delete object without valid PKs. " + obj;
logger.error(msg);
return;
}
/**
* MBAIRD
* 2. register object in markedForDelete map.
*/
markedForDelete.add(obj);
Identity oid = serviceIdentity().buildIdentity(cld, obj);
// Invoke events on PersistenceBrokerAware instances and listeners
BEFORE_DELETE_EVENT.setTarget(obj);
fireBrokerEvent(BEFORE_DELETE_EVENT);
BEFORE_DELETE_EVENT.setTarget(null);
// now perform deletion
performDeletion(cld, obj, oid, ignoreReferences);
// Invoke events on PersistenceBrokerAware instances and listeners
AFTER_DELETE_EVENT.setTarget(obj);
fireBrokerEvent(AFTER_DELETE_EVENT);
AFTER_DELETE_EVENT.setTarget(null);
// let the connection manager to execute batch
connectionManager.executeBatchIfNecessary();
}
} | [
"do delete given object. Should be used by all intern classes to delete\nobjects."
] | [
"Adds another condition for an element within this annotation.",
"Sets the target translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator",
"Updates the terms and statements of the item document identified by the\ngiven item id. The updates are computed with respect to the current data\nfound online, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged. The labels\nand aliases in a given language are kept distinct.\n\n@param itemIdValue\nid of the document to be updated\n@param addLabels\nlabels to be set on the item. They will overwrite existing values\nin the same language.\n@param addDescriptions\ndescription to be set on the item. They will overwrite existing values\nin the same language.\n@param addAliases\naliases to be added. Existing aliases will be kept.\n@param deleteAliases\naliases to be deleted.\n@param addStatements\nthe list of statements to be added or updated; statements with\nempty statement id will be added; statements with non-empty\nstatement id will be updated (if such a statement exists)\n@param deleteStatements\nthe list of statements to be deleted; statements will only be\ndeleted if they are present in the current document (in\nexactly the same form, with the same id)\n@param summary\nshort edit summary\n@return the updated document\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection",
"Returns all factory instances that match the query.\n\n@param query the factory query, not null.\n@return the instances found, never null.",
"Given a interim cluster with a previously vacated zone, constructs a new\ncluster object with the drop zone completely removed\n\n@param intermediateCluster\n@param dropZoneId\n@return adjusted cluster with the zone dropped",
"Adds an EJB descriptor to the maps\n\n@param ejbDescriptor The EJB descriptor to add",
"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",
"Given a symmetric matrix which is represented by a lower triangular matrix convert it back into\na full symmetric matrix.\n\n@param A (Input) Lower triangular matrix (Output) symmetric matrix",
"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"
] |
private SearchableItem buildSearchableItem(Message menuItem) {
return new SearchableItem((int) ((NumberField) menuItem.arguments.get(1)).getValue(),
((StringField) menuItem.arguments.get(3)).getValue());
} | [
"Creates a searchable item that represents a metadata field found for a track.\n\n@param menuItem the rendered menu item containing the searchable metadata field\n@return the searchable metadata field"
] | [
"Reload a managed server.\n\n@param permit the controller permit\n@return whether the state was changed successfully or not",
"Replaces current Collection mapped to key with the specified Collection.\nUse carefully!",
"Retrieve a table by name.\n\n@param name table name\n@return Table instance",
"Returns a canonical type for a given class.\n\nIf the class is a raw type of a parameterized class, the matching {@link ParameterizedType} (with unresolved type\nvariables) is resolved.\n\nIf the class is an array then the component type of the array is canonicalized\n\nOtherwise, the class is returned.\n\n@return",
"Perform a post-boot scan to remove any deployments added during boot that failed to deploy properly.\nThis method isn't private solely to allow a unit test in the same package to call it.",
"Returns the field definition with the specified name.\n\n@param name The name of the desired field\n@return The field definition or <code>null</code> if there is no such field",
"Sets the initial MoificationState of the wrapped object myObj. The initial state will be StateNewDirty if myObj\nis not persisten already. The state will be set to StateOldClean if the object is already persistent.",
"Encodes the given URI user info with the given encoding.\n@param userInfo the user info to be encoded\n@param encoding the character encoding to encode to\n@return the encoded user info\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Determines the constraints relating to a task.\n\n@param row row data\n@param task Task instance"
] |
@Override
public String getName() {
CommonProfile profile = this.getProfile();
if(null == principalNameAttribute) {
return profile.getId();
}
Object attrValue = profile.getAttribute(principalNameAttribute);
return (null == attrValue) ? null : String.valueOf(attrValue);
} | [
"Returns a name for the principal based upon one of the attributes\nof the main CommonProfile. The attribute name used to query the CommonProfile\nis specified in the constructor.\n\n@return a name for the Principal or null if the attribute is not populated."
] | [
"Use this API to fetch crvserver_policymap_binding resources of given name .",
"Use this API to update nd6ravariables.",
"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\"",
"Use this API to fetch all the sslservice resources that are configured on netscaler.\nThis uses sslservice_args which is a way to provide additional arguments while fetching the resources.",
"This method retrieves all security permissions contained within the specified node.\n\n@param context the {@link OperationContext} used to resolve the permission attributes.\n@param node the {@link ModelNode} that might contain security permissions metadata.\n@return a {@link List} containing the retrieved permissions. They are wrapped as {@link PermissionFactory} instances.\n@throws OperationFailedException if an error occurs while retrieving the security permissions.",
"Gets the Jensen Shannon divergence.\n\n@param p U vector.\n@param q V vector.\n@return The Jensen Shannon divergence between u and v.",
"Removes 'original' and places 'target' at the same location",
"Makes the scene object pickable by eyes. However, the object has to be touchable to process\nthe touch events.\n\n@param sceneObject",
"Replace known tags in the current data values with actual values as appropriate\n\n@param cr a reference to DataPipe from which to read the current map"
] |
public static JRDesignGroup getJRDesignGroup(DynamicJasperDesign jd, LayoutManager layoutManager, DJGroup group) {
Map references = layoutManager.getReferencesMap();
for (Object o : references.keySet()) {
String groupName = (String) o;
DJGroup djGroup = (DJGroup) references.get(groupName);
if (group == djGroup) {
return (JRDesignGroup) jd.getGroupsMap().get(groupName);
}
}
return null;
} | [
"Returns the JRDesignGroup for the DJGroup passed\n@param jd\n@param layoutManager\n@param group\n@return"
] | [
"Remove the listener active in this session.\n\n@param listenerId the id of the listener to remove",
"Deletes a specific, existing project status update.\n\nReturns an empty data record.\n\n@param projectStatus The project status update to delete.\n@return Request object",
"Get the unique set of declared methods on the leaf class and all superclasses. Leaf\nclass methods are included first and while traversing the superclass hierarchy any methods found\nwith signatures matching a method already included are filtered out.",
"Set the duration option.\n@param value the duration option to set ({@link EndType} as string).",
"Try to build an default PBKey for convenience PB create method.\n\n@return PBKey or <code>null</code> if default key was not declared in\nmetadata",
"Updates the internal list of dates and fires a value change if necessary.\n\n@param dates the dates to set.",
"Parses the resource String id and get back the int res id\n@param context\n@param id String resource id\n@return int resource id",
"Sets the HTML entity translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator",
"Use this API to fetch vpnvserver_authenticationradiuspolicy_binding resources of given name ."
] |
private String storageOverhead(Map<Integer, Integer> finalNodeToOverhead) {
double maxOverhead = Double.MIN_VALUE;
PartitionBalance pb = new PartitionBalance(currentCluster, currentStoreDefs);
StringBuilder sb = new StringBuilder();
sb.append("Per-node store-overhead:").append(Utils.NEWLINE);
DecimalFormat doubleDf = new DecimalFormat("####.##");
for(int nodeId: finalCluster.getNodeIds()) {
Node node = finalCluster.getNodeById(nodeId);
String nodeTag = "Node " + String.format("%4d", nodeId) + " (" + node.getHost() + ")";
int initialLoad = 0;
if(currentCluster.getNodeIds().contains(nodeId)) {
initialLoad = pb.getNaryPartitionCount(nodeId);
}
int toLoad = 0;
if(finalNodeToOverhead.containsKey(nodeId)) {
toLoad = finalNodeToOverhead.get(nodeId);
}
double overhead = (initialLoad + toLoad) / (double) initialLoad;
if(initialLoad > 0 && maxOverhead < overhead) {
maxOverhead = overhead;
}
String loadTag = String.format("%6d", initialLoad) + " + "
+ String.format("%6d", toLoad) + " -> "
+ String.format("%6d", initialLoad + toLoad) + " ("
+ doubleDf.format(overhead) + " X)";
sb.append(nodeTag + " : " + loadTag).append(Utils.NEWLINE);
}
sb.append(Utils.NEWLINE)
.append("**** Max per-node storage overhead: " + doubleDf.format(maxOverhead) + " X.")
.append(Utils.NEWLINE);
return (sb.toString());
} | [
"Determines storage overhead and returns pretty printed summary.\n\n@param finalNodeToOverhead Map of node IDs from final cluster to number\nof partition-stores to be moved to the node.\n@return pretty printed string summary of storage overhead."
] | [
"Modify a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder",
"Rotate list of String. Used for randomize selection of received endpoints\n\n@param strings\nlist of Strings\n@return the same list in random order",
"Creates an upload session to create a new version of a file in chunks.\nThis will first verify that the version can be created and then open a session for uploading pieces of the file.\n@param fileSize the size of the file that will be uploaded.\n@return the created upload session instance.",
"Sets the origin and direction of the pick ray.\n\n@param ox X coordinate of origin.\n@param oy Y coordinate of origin.\n@param oz Z coordinate of origin.\n@param dx X coordinate of ray direction.\n@param dy Y coordinate of ray direction.\n@param dz Z coordinate of ray direction.\n\nThe coordinate system of the ray depends on the whether the\npicker is attached to a scene object or not. When attached\nto a scene object, the ray is in the coordinate system of\nthat object where (0, 0, 0) is the center of the scene object\nand (0, 0, 1) is it's positive Z axis. If not attached to an\nobject, the ray is in the coordinate system of the scene's\nmain camera with (0, 0, 0) at the viewer and (0, 0, -1)\nwhere the viewer is looking.\n@see #doPick()\n@see #getPickRay()\n@see #getWorldPickRay(Vector3f, Vector3f)",
"Counts the number of elements in A which are not zero.\n@param A A matrix\n@return number of non-zero elements",
"Gets an iterator to the EJB descriptors for an EJB implementation class\n\n@param beanClass The EJB class\n@return An iterator",
"Use this API to fetch all the systemcollectionparam resources that are configured on netscaler.",
"Gets fully-qualified name of a table or sequence.\n\n@param localName local table name.\n@param params params.\n@return fully-qualified table name.",
"Create a collection object of the given collection type. If none has been given,\nOJB uses RemovalAwareList, RemovalAwareSet, or RemovalAwareCollection depending\non the field type.\n\n@param desc The collection descriptor\n@param collectionClass The collection class specified in the collection-descriptor\n@return The collection object"
] |
static void addOperationAddress(final ModelNode operation, final PathAddress base, final String key, final String value) {
operation.get(OP_ADDR).set(base.append(key, value).toModelNode());
} | [
"Appends the key and value to the address and sets the address on the operation.\n\n@param operation the operation to set the address on\n@param base the base address\n@param key the key for the new address\n@param value the value for the new address"
] | [
"Copies the given container page to the provided root path.\n@param originalPage the page to copy\n@param targetPageRootPath the root path of the copy target.\n@throws CmsException thrown if something goes wrong.\n@throws NoCustomReplacementException if a custom replacement is not found for a type which requires it.",
"Sets the day of the month.\n@param day the day to set.",
"Checks for duplicate elements. A is sorted\n@param A Matrix to be tested.\n@return true if duplicates or false if false duplicates",
"Gets a static resource from a plugin\n\n@param pluginName - Name of the plugin(defined in the plugin manifest)\n@param fileName - Filename to fetch\n@return byte array of the resource\n@throws Exception exception",
"add a new producer, either synchronous or asynchronous, connecting\nto the specified broker\n\n@param broker broker to producer",
"Use this API to disable snmpalarm resources of given names.",
"Returns the context menu for the table item.\n@param itemId the table item.\n@return the context menu for the given item.",
"Use this API to fetch dnstxtrec resource of given name .",
"Set the pattern scheme to either \"by weekday\" or \"by day of month\".\n@param isByWeekDay flag, indicating if the pattern \"by weekday\" should be set.\n@param fireChange flag, indicating if a value change event should be fired."
] |
private Number calculateUnitsPercentComplete(Row row)
{
double result = 0;
double actualWorkQuantity = NumberHelper.getDouble(row.getDouble("act_work_qty"));
double actualEquipmentQuantity = NumberHelper.getDouble(row.getDouble("act_equip_qty"));
double numerator = actualWorkQuantity + actualEquipmentQuantity;
if (numerator != 0)
{
double remainingWorkQuantity = NumberHelper.getDouble(row.getDouble("remain_work_qty"));
double remainingEquipmentQuantity = NumberHelper.getDouble(row.getDouble("remain_equip_qty"));
double denominator = remainingWorkQuantity + actualWorkQuantity + remainingEquipmentQuantity + actualEquipmentQuantity;
result = denominator == 0 ? 0 : ((numerator * 100) / denominator);
}
return NumberHelper.getDouble(result);
} | [
"Calculate the units percent complete.\n\n@param row task data\n@return percent complete"
] | [
"Return all levels of moneyness for which data exists.\nMoneyness is returned as actual difference strike - par swap rate.\n\n@return The levels of moneyness as difference of strike to par swap rate.",
"Convert a floating point date to a LocalDateTime.\n\nNote: This method currently performs a rounding to the next second.\n\nIf referenceDate is null, the method returns null.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param floatingPointDate The value to the time offset \\( t \\).\n@return The date resulting from adding Math.round(fixingTime*SECONDS_PER_DAY) seconds to referenceDate, where one day has SECONDS_PER_DAY seconds and SECONDS_PER_DAY is a constant 365*24*60*60",
"Logs the current user out.\n\n@throws IOException",
"Add the set with given bundles to the \"Export-Package\" main attribute.\n\n@param exportedPackages The set of all packages to add.",
"Checks if this has the passed suffix\n\n@param suffix is a Bytes object to compare to this\n@return true or false\n@since 1.1.0",
"Sets the ProjectCalendar instance from which this calendar is derived.\n\n@param calendar base calendar instance",
"This method retrieves an int value from a String instance.\nIt returns zero by default if a null value or an empty string is supplied.\n\n@param value string representation of an integer\n@return int value",
"Bean types of a session bean.",
"Sets the HTML entity translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator"
] |
public static base_response update(nitro_service client, dospolicy resource) throws Exception {
dospolicy updateresource = new dospolicy();
updateresource.name = resource.name;
updateresource.qdepth = resource.qdepth;
updateresource.cltdetectrate = resource.cltdetectrate;
return updateresource.update_resource(client);
} | [
"Use this API to update dospolicy."
] | [
"Get a bean value from the context.\n\n@param name bean name\n@return bean value or null",
"Counts the number of elements in A which are not zero.\n@param A A matrix\n@return number of non-zero elements",
"Use this API to add route6 resources.",
"Use this API to Import sslfipskey.",
"read a producer request from buffer\n\n@param buffer data buffer\n@return parsed producer request",
"Calculate start dates for a yearly absolute recurrence.\n\n@param calendar current date\n@param dates array of start dates",
"Used to get the complex value of a matrix element.\n@param row The row of the element.\n@param col The column of the element.\n@param output Storage for the value",
"Remove all non replica clock entries from the list of versioned values\nprovided\n\n@param vals list of versioned values to prune replicas from\n@param keyReplicas list of current replicas for the given key\n@param didPrune flag to mark if we did actually prune something\n@return pruned list",
"Commit the contents of the given temp file to either the main file, or, if we are not persisting\nto the main file, to the .last file in the configuration history\n@param temp temp file containing the latest configuration. Will not be {@code null}\n@throws ConfigurationPersistenceException"
] |
public static base_responses expire(nitro_service client, cachecontentgroup resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
cachecontentgroup expireresources[] = new cachecontentgroup[resources.length];
for (int i=0;i<resources.length;i++){
expireresources[i] = new cachecontentgroup();
expireresources[i].name = resources[i].name;
}
result = perform_operation_bulk_request(client, expireresources,"expire");
}
return result;
} | [
"Use this API to expire cachecontentgroup resources."
] | [
"List the photos with the most views, comments or favorites.\n\n@param date\n(Optional) 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. If no date is provided, all time view counts will be returned.\n@param sort\n(Optional) The order in which to sort returned photos. Defaults to views. The possible values are views, comments and favorites. Other sort\noptions are available through flickr.photos.search.\n@param perPage\n(Optional) Number of referrers 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@throws FlickrException\n@see \"http://www.flickr.com/services/api/flickr.stats.getPopularPhotos.html\"",
"Assigns this retention policy to a metadata template, optionally with certain field values.\n@param templateID the ID of the metadata template to apply to.\n@param fieldFilters optional field value filters.\n@return info about the created assignment.",
"Given a filesystem and path to a node, gets all the files which belong to\na partition and replica type\n\nWorks only for {@link ReadOnlyStorageFormat.READONLY_V2}\n\n@param fs Underlying filesystem\n@param path The node directory path\n@param partitionId The partition id for which we get the files\n@param replicaType The replica type\n@return Returns list of files of this partition, replicaType\n@throws IOException",
"Retrieve a Synchro Duration from an input stream.\n\n@param is input stream\n@return Duration instance",
"Set trimmed value.\n\n@param t Trimmed value.",
"Get an active operation.\n\n@param header the request header\n@return the active operation, {@code null} if if there is no registered operation",
"Use this API to fetch all the csparameter resources that are configured on netscaler.",
"Convert an object to a list.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target list element type\n@return list",
"Create a forward curve from given times and discount factors.\n\nThe forward curve will have times.length-1 fixing times from times[0] to times[times.length-2]\n<code>\nforward[timeIndex] = (givenDiscountFactors[timeIndex]/givenDiscountFactors[timeIndex+1]-1.0) / (times[timeIndex+1] - times[timeIndex]);\n</code>\nNote: If time[0] > 0, then the discount factor 1.0 will inserted at time 0.0\n\n@param name The name of this curve.\n@param times A vector of given time points.\n@param givenDiscountFactors A vector of given discount factors (corresponding to the given time points).\n@param paymentOffset The maturity of the underlying index modeled by this curve.\n@return A new ForwardCurve object."
] |
protected ClassDescriptor getClassDescriptor()
{
ClassDescriptor cld = (ClassDescriptor) m_classDescriptor.get();
if(cld == null)
{
throw new OJBRuntimeException("Requested ClassDescriptor instance was already GC by JVM");
}
return cld;
} | [
"Returns the classDescriptor.\n\n@return ClassDescriptor"
] | [
"Logs all the canidate elements so that the plugin knows which elements were the candidate\nelements.",
"Gets JmsDestinationType from java class name\n\nReturns null for unrecognized class",
"Generates a change event for a local replacement 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 document the replacement document.\n@return a change event for a local replacement of a document in the given namespace referring\nto the given document _id.",
"Use this API to fetch statistics of spilloverpolicy_stats resource of given name .",
"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 descriptions to the item.\n\n@param descriptions\nthe descriptions to add",
"Use this API to delete gslbsite resources of given names.",
"Determine if a CharSequence can be parsed as a Long.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isLong(String)\n@since 1.8.2",
"Extracts a house holder vector from the rows of A and stores it in u\n@param A Complex matrix with householder vectors stored in the upper right triangle\n@param row Row in A\n@param col0 first row in A (implicitly assumed to be r + i0)\n@param col1 last row +1 in A\n@param u Output array storage\n@param offsetU first index in U"
] |
public long addAll(final Map<String, Double> scoredMember) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.zadd(getKey(), scoredMember);
}
});
} | [
"Adds to this set all of the elements in the specified map of members and their score.\n@param scoredMember the members to add together with their scores\n@return the number of members actually added"
] | [
"Process the host info and determine which configuration elements are required on the slave host.\n\n@param hostInfo the host info\n@param root the model root\n@param extensionRegistry the extension registry\n@return",
"Gets a list of AssignmentRows based on the current Assignments\n@return",
"Processes the template for all columns of the current table index.\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\"",
"Returns the parent of this path or null if this path is the root path.\n\n@return the parent of this path or null if this path is the root path.",
"Extract resource group from a resource ID string.\n@param id the resource ID string\n@return the resource group name",
"We have obtained metadata for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this metadata\n@param data the metadata which we received",
"For each node, checks if the store exists and then verifies that the remote schema\nmatches the new one. If the remote store doesn't exist, it creates it.",
"Use this API to fetch all the sslservice resources that are configured on netscaler.\nThis uses sslservice_args which is a way to provide additional arguments while fetching the resources.",
"Set work connection.\n\n@param db the db setup bean"
] |
public boolean hasUser(String userId) {
String normalized = normalizerUserName(userId);
return loginToUser.containsKey(normalized) || emailToUser.containsKey(normalized);
} | [
"Checks if user exists.\n\n@param userId the user id, which can be an email or the login.\n@return true, if user exists."
] | [
"Calculates the next date, starting from the provided date.\n\n@param date the current date.\n@param interval the number of month to add when moving to the next month.",
"Get a random pod that provides the specified service in the specified namespace.\n\n@param client\nThe client instance to use.\n@param name\nThe name of the service.\n@param namespace\nThe namespace of the service.\n\n@return The pod or null if no pod matches.",
"Attempt to shutdown the server. As much shutdown as possible will be\ncompleted, even if intermediate errors are encountered.\n\n@throws VoldemortException",
"Use this API to add nsacl6.",
"Get log file\n\n@return log file",
"Set a knot type.\n@param n the knot index\n@param type the type\n@see #getKnotType",
"associate the batched Children with their owner object loop over children",
"Increment the version info associated with the given node\n\n@param node The node",
"Converts a collection of dates to a JSON array with the long representation of the dates as strings.\n@param dates the list to convert.\n@return JSON array with long values of dates as string"
] |
Subsets and Splits