query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
void gc() {
if (stopped) {
return;
}
long expirationTime = System.currentTimeMillis() - timeout;
for (Iterator<Map.Entry<InputStreamKey, TimedStreamEntry>> iter = streamMap.entrySet().iterator(); iter.hasNext();) {
if (stopped) {
return;
}
Map.Entry<InputStreamKey, TimedStreamEntry> entry = iter.next();
TimedStreamEntry timedStreamEntry = entry.getValue();
if (timedStreamEntry.timestamp.get() <= expirationTime) {
iter.remove();
InputStreamKey key = entry.getKey();
//noinspection SynchronizationOnLocalVariableOrMethodParameter
synchronized (timedStreamEntry) { // ensure there's no race with a request that got a ref before we removed it
closeStreamEntry(timedStreamEntry, key.requestId, key.index);
}
}
}
} | [
"Close and remove expired streams. Package protected to allow unit tests to invoke it."
] | [
"Collect the URIs of resources, that are referenced by the given description.\n@return the list of referenced URIs. Never <code>null</code>.",
"Use this API to fetch aaagroup_aaauser_binding resources of given name .",
"Reads all text of the XML tag and returns it as a String.\nAssumes that a '<' character has already been read.\n\n@param r The reader to read from\n@return The String representing the tag, or null if one couldn't be read\n(i.e., EOF). The returned item is a complete tag including angle\nbrackets, such as <code><TXT></code>",
"Convert a Identification to a By used in WebDriver Drivers.\n\n@return the correct By specification of the current Identification.",
"Write the management protocol header.\n\n@param header the mgmt protocol header\n@param os the output stream\n@throws IOException",
"This method retrieves the UID for a calendar associated with a task.\n\n@param mpx MPX Task instance\n@return calendar UID",
"Unescape and unquote the path. Ready for translation.",
"Here the lambda in the implicit step is determined dynamically. At first\nit selects zeros to quickly reveal singular values that are zero or close to zero.\nThen it computes it using a Wilkinson shift.",
"Read, validate, and discard a single message, returning the next valid offset, and the\nmessage being validated\n\n@throws IOException any exception"
] |
private static BufferedImage scale(BufferedImage imageToScale, int dWidth, int dHeight, double fWidth, double fHeight) {
BufferedImage dbi = null;
// Needed to create a new BufferedImage object
int imageType = imageToScale.getType();
if (imageToScale != null) {
dbi = new BufferedImage(dWidth, dHeight, imageType);
Graphics2D g = dbi.createGraphics();
AffineTransform at = AffineTransform.getScaleInstance(fWidth, fHeight);
g.drawRenderedImage(imageToScale, at);
}
return dbi;
} | [
"Image scale method\n@param imageToScale The image to be scaled\n@param dWidth Desired width, the new image object is created to this size\n@param dHeight Desired height, the new image object is created to this size\n@param fWidth What to multiply the width by. value < 1 scales down, and value > one scales up\n@param fHeight What to multiply the height by. value < 1 scales down, and value > one scales up\n@return A scaled image"
] | [
"Use this API to fetch all the inat resources that are configured on netscaler.",
"request token from GCM",
"Initial random seed used for shuffling test suites and other sources\nof pseudo-randomness. If not set, any random value is set.\n\n<p>The seed's format is compatible with {@link RandomizedRunner} so that\nseed can be fixed for suites and methods alike.",
"Writes task predecessor links to a PM XML file.\n\n@param task MPXJ Task instance",
"Determines the component type for a given array type.\n\n@param type the given array type\n@return the component type of a given array type",
"This function wires up a SSL Listener with the cyber villians root CA and cert with the correct CNAME for the request\n\n@param host\n@param listener",
"Edit the text of 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 edit.\n@param commentText\nUpdate the comment to this text.\n@throws FlickrException",
"Retrieves all of the headers from the servlet request and sets them on\nthe proxy request\n\n@param httpServletRequest The request object representing the client's request to the\nservlet engine\n@param httpMethodProxyRequest The request that we are about to send to the proxy host",
"Read project calendars."
] |
public static <IN extends CoreMap> CRFClassifier<IN> getJarClassifier(String resourceName, Properties props) {
CRFClassifier<IN> crf = new CRFClassifier<IN>();
crf.loadJarClassifier(resourceName, props);
return crf;
} | [
"Used to load a classifier stored as a resource inside a jar file. THIS\nFUNCTION WILL ONLY WORK IF THE CODE WAS LOADED FROM A JAR FILE WHICH HAS A\nSERIALIZED CLASSIFIER STORED INSIDE IT.\n\n@param resourceName\nName of clasifier resource inside the jar file.\n@return A CRFClassifier stored in the jar file"
] | [
"This ensures that we are able to use the default preference from JSDK, to check basically if we are in Android or Not\n@param preference\n@throws BackingStoreException",
"Create the work pattern assignment map.\n\n@param rows calendar rows\n@return work pattern assignment map",
"Function to compute the bias gradient for batch convolution",
"Calls a method from editService to update the repeat number for a path\n\n@param model\n@param newNum\n@param path_id\n@param clientUUID\n@return\n@throws Exception",
"Hide multiple channels. All other channels will be shown.\n@param channels The channels to hide",
"Remove duplicate Strings from the given array. Also sorts the array, as\nit uses a TreeSet.\n\n@param array the String array\n@return an array without duplicates, in natural sort order",
"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",
"Get a property as a int or null.\n\n@param key the property name",
"Returns the Set of entities recognized by this Classifier.\n\n@return The Set of entities recognized by this Classifier."
] |
private void addContentInfo() {
if (!m_cms.getRequestContext().getCurrentProject().isOnlineProject()
&& (null == m_searchController.getCommon().getConfig().getSolrIndex())
&& (null != m_addContentInfoForEntries)) {
CmsSolrQuery query = new CmsSolrQuery();
m_searchController.addQueryParts(query, m_cms);
query.setStart(Integer.valueOf(0));
query.setRows(m_addContentInfoForEntries);
CmsContentLoadCollectorInfo info = new CmsContentLoadCollectorInfo();
info.setCollectorClass(this.getClass().getName());
info.setCollectorParams(query.getQuery());
info.setId((new CmsUUID()).getStringValue());
if (CmsJspTagEditable.getDirectEditProvider(pageContext) != null) {
try {
CmsJspTagEditable.getDirectEditProvider(pageContext).insertDirectEditListMetadata(
pageContext,
info);
} catch (JspException e) {
LOG.error("Could not write content info.", e);
}
}
}
} | [
"Adds the content info for the collected resources used in the \"This page\" publish dialog."
] | [
"Get a list of referrers from a given domain to a photo.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param domain\n(Required) The domain to return referrers for. This should be a hostname (eg: \"flickr.com\") with no protocol or pathname.\n@param photoId\n(Optional) The id of the photo to get stats for. If not provided, stats for all photos will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotoReferrers.html\"",
"Get all categories\nGet all tags marked as categories\n@return ApiResponse<TagsEnvelope>\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Retrieve a string value.\n\n@param data byte array\n@param offset offset into byte array\n@return string value",
"Obtains a Coptic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Coptic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Use this API to fetch the statistics of all authenticationvserver_stats resources that are configured on netscaler.",
"Flips the output buffer, and lets the Selector know we're ready to write.\n\n@param selectionKey",
"Get a collection of Photo objects for the specified Photoset.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@param photosetId\nThe photoset ID\n@param extras\nSet of extra-fields\n@param privacy_filter\nfilter value for authenticated calls\n@param perPage\nThe number of photos per page\n@param page\nThe page offset\n@return PhotoList The Collection of Photo objects\n@throws FlickrException",
"Adds, eventually merging, a direction for the specified relation type\n@param relationType\n@param direction",
"Gets the first row for a query\n\n@param query query to execute\n@return result or NULL"
] |
private boolean isBundleProperty(Object property) {
return (property.equals(TableProperty.KEY) || property.equals(TableProperty.TRANSLATION));
} | [
"Check if values in the column \"property\" are written to the bundle files.\n@param property the property id of the table column.\n@return a flag, indicating if values of the table column are stored to the bundle files."
] | [
"<<<<<< measureUntilFull helper methods",
"return a generic Statement for the given ClassDescriptor",
"Updates the model. Ensures that we reset the columns widths.\n\n@param model table model",
"the 1st request from the manager.",
"Computes the mean or average of all the elements.\n\n@return mean",
"Retrieve and validate the key from the REST request.\n\n@return true if present, false if missing",
"Returns the text value of all of the elements in the collection.\n\n@return the text value of all the elements in the collection or null",
"Set source url for a server\n\n@param newUrl new URL\n@param id Server ID",
"A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged\n\nWhen using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field.\n\nA custom field's `type` cannot be updated.\n\nAn enum custom field's `enum_options` cannot be updated with this endpoint. Instead see \"Work With Enum Options\" for information on how to update `enum_options`.\n\nReturns the complete updated custom field record.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object"
] |
protected long getRevisionIdFromResponse(JsonNode response) throws JsonMappingException {
if(response == null) {
throw new JsonMappingException("API response is null");
}
JsonNode entity = null;
if(response.has("entity")) {
entity = response.path("entity");
} else if(response.has("pageinfo")) {
entity = response.path("pageinfo");
}
if(entity != null && entity.has("lastrevid")) {
return entity.path("lastrevid").asLong();
}
throw new JsonMappingException("The last revision id could not be found in API response");
} | [
"Extracts the last revision id from the JSON response returned\nby the API after an edit\n\n@param response\nthe response as returned by Mediawiki\n@return\nthe new revision id of the edited entity\n@throws JsonMappingException"
] | [
"Creates a new broker instance.\n\n@param jcdAlias The jdbc connection descriptor name as defined in the repository\n@param user The user name to be used for connecting to the database\n@param password The password to be used for connecting to the database\n@return The persistence broker\n@see org.apache.ojb.broker.core.PersistenceBrokerFactoryIF#createPersistenceBroker(java.lang.String, java.lang.String, java.lang.String)",
"Takes the specified object and converts the argument to a String.\n\n@param arg The object to convert\n@return A String representation of the argument.",
"Creates a span that covers an exact row",
"Removes metadata related to rebalancing.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeIds Node ids to clear metadata after rebalancing",
"Returns a configured transformer to write XML.\n\n@return the XML configured transformer\n@throws SpinXmlElementException if no new transformer can be created",
"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.",
"We try to convert an Object to an Array and this is not easy in Java so we need a little bit of nasty magic.\n\n@param <T> Type of elements\n@param clazz Clazz of the Objct elements\n@param obj Object\n@return Array",
"Starts the one and only job instance in a separate Thread. Should be called exactly one time before\nthe operation is stopped.\n\n@param arguments {@inheritDoc}",
"set the property destination type for given property\n\n@param propertyName\n@param destinationType"
] |
public static Logger getLogger(String className) {
if (logType == null) {
logType = findLogType();
}
return new Logger(logType.createLog(className));
} | [
"Return a logger associated with a particular class name."
] | [
"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.",
"Handles the file deletions.\n\n@param cms the CMS context to use\n@param toDelete the resources to delete\n\n@throws CmsException if something goes wrong",
"Retrieve the default mapping between MPXJ task fields and Primavera wbs field names.\n\n@return mapping",
"Get an SQL condition to match this address section representation\n\n@param builder\n@param columnName\n@return the condition",
"Convert a drawable object into a Bitmap.\n@param drawable Drawable to extract a Bitmap from.\n@return A Bitmap created from the drawable parameter.",
"Log block data.\n\n@param blockIndex current block index\n@param startIndex start index\n@param blockLength length",
"Produces or returns the existing proxy class. The operation is thread-safe.\n\n@return always the class of the proxy",
"This method is called to format a units value.\n\n@param value numeric value\n@return currency value",
"Specifies the object id associated with a user assigned managed service identity\nresource that should be used to retrieve the access token.\n\n@param objectId Object ID of the identity to use when authenticating to Azure AD.\n@return MSICredentials"
] |
private void processResources() throws SQLException
{
List<Row> rows = getRows("select * from zresource where zproject=? order by zorderinproject", m_projectID);
for (Row row : rows)
{
Resource resource = m_project.addResource();
resource.setUniqueID(row.getInteger("Z_PK"));
resource.setEmailAddress(row.getString("ZEMAIL"));
resource.setInitials(row.getString("ZINITIALS"));
resource.setName(row.getString("ZTITLE_"));
resource.setGUID(row.getUUID("ZUNIQUEID"));
resource.setType(row.getResourceType("ZTYPE"));
resource.setMaterialLabel(row.getString("ZMATERIALUNIT"));
if (resource.getType() == ResourceType.WORK)
{
resource.setMaxUnits(Double.valueOf(NumberHelper.getDouble(row.getDouble("ZAVAILABLEUNITS_")) * 100.0));
}
Integer calendarID = row.getInteger("ZRESOURCECALENDAR");
if (calendarID != null)
{
ProjectCalendar calendar = m_project.getCalendarByUniqueID(calendarID);
if (calendar != null)
{
calendar.setName(resource.getName());
resource.setResourceCalendar(calendar);
}
}
m_eventManager.fireResourceReadEvent(resource);
}
} | [
"Read resource data."
] | [
"Returns a Client object for a clientUUID and profileId\n\n@param clientUUID UUID or friendlyName of client\n@param profileId - can be null, safer if it is not null\n@return Client object or null\n@throws Exception exception",
"Utility method used to convert a Number into a BigInteger.\n\n@param value Number instance\n@return BigInteger instance",
"to check availability, then class name is truncated to bundle id",
"Creates a new ongoing Legal Hold Policy.\n@param api the API connection to be used by the resource.\n@param name the name of Legal Hold Policy.\n@param description the description of Legal Hold Policy.\n@return information about the Legal Hold Policy created.",
"Retrieve a UUID field.\n\n@param type field type\n@return UUID instance",
"Returns a factory that vends DelimitRegExIterators that reads the contents of the\ngiven Reader, splits on the specified delimiter, applies op, then returns the result.",
"Returns the list view of corporate groupIds of an organization\n\n@param organizationId String\n@return ListView",
"Create a local target.\n\n@param jbossHome the jboss home\n@param moduleRoots the module roots\n@param bundlesRoots the bundle roots\n@return the local target\n@throws IOException",
"Checks whether every property except 'preferred' is satisfied\n\n@return"
] |
public static sslcipher[] get(nitro_service service) throws Exception{
sslcipher obj = new sslcipher();
sslcipher[] response = (sslcipher[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the sslcipher resources that are configured on netscaler."
] | [
"Constructs a list of items with given separators.\n\n@param sql\nStringBuilder to which the constructed string will be\nappended.\n@param list\nList of objects (usually strings) to join.\n@param init\nString to be added to the start of the list, before any of the\nitems.\n@param sep\nSeparator string to be added between items in the list.",
"Undo changes for a single patch entry.\n\n@param entry the patch entry\n@param loader the content loader",
"Given the current cluster and a zone id that needs to be dropped, this\nmethod will remove all partitions from the zone that is being dropped and\nmove it to the existing zones. The partitions are moved intelligently so\nas not to avoid any data movement in the existing zones.\n\nThis is achieved by moving the partitions to nodes in the surviving zones\nthat is zone-nry to that partition in the surviving zone.\n\n@param currentCluster Current cluster metadata\n@return Returns an interim cluster with empty partition lists on the\nnodes from the zone being dropped",
"Sets the Calendar used. 'Standard' if no value is set.\n\n@param calendarName Calendar name",
"Added in Gerrit 2.11.",
"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",
"Extract the parent WBS from a WBS.\n\n@param wbs current WBS\n@return parent WBS",
"Checks whether a String satisfies the number range selection filter.\nThe test is evaluated based on the rightmost natural number found in\nthe String. Note that this is just evaluated on the String as given.\nIt is not trying to interpret it as a filename and to decide whether\nthe file exists, is a directory or anything like that.\n\n@param str The String to check for a number in\n@return true If the String is within the ranges filtered for",
"Implement the persistence handler for storing the group properties."
] |
public static List<File> listFiles(File[] directories, IOFileFilter fileFilter, IOFileFilter dirFilter) {
List<File> files = new ArrayList<>();
for (File directory : directories) {
if (!directory.isDirectory()) {
continue;
}
Collection<File> filesInDirectory = FileUtils.listFiles(directory,
fileFilter,
dirFilter);
files.addAll(filesInDirectory);
}
return files;
} | [
"Returns list of files matches filters in specified directories\n\n@param directories which will using to find files\n@param fileFilter file filter\n@param dirFilter directory filter\n@return list of files matches filters in specified directories"
] | [
"get all consumers for the group\n\n@param zkClient the zookeeper client\n@param group the group name\n@return topic->(consumerIdStringA-0,consumerIdStringA-1...consumerIdStringB-0,consumerIdStringB-1)",
"Create a clone of the Renderer. This method is the base of the prototype mechanism implemented\nto avoid create new objects from RendererBuilder. Pay an special attention implementing clone\nmethod in Renderer subtypes.\n\n@return a copy of the current renderer.",
"initializer to setup JSAdapter prototype in the given scope",
"Ensures that the start and end dates for ranges fit within the\nworking times for a given day.\n\n@param calendar current calendar\n@param list assignment data",
"Sets the initial pivot ordering and compute the F-norm squared for each column",
"This method is called to format a duration.\n\n@param value duration value\n@return formatted duration value",
"Exception handler if we are unable to parse a json value into a java representation\n\n@param expectedType Name of the expected Type\n@param type Type of the json node\n@return SpinJsonDataFormatException",
"Sets the body filter for this ID\n\n@param pathId ID of path\n@param bodyFilter Body filter to set",
"Read an array of bytes of a specified size.\n\n@param size number of bytes to read\n@return ByteArray instance"
] |
public void forAllIndexDescriptorColumns(String template, Properties attributes) throws XDocletException
{
String fields = _curIndexDescriptorDef.getProperty(PropertyHelper.OJB_PROPERTY_FIELDS);
FieldDescriptorDef fieldDef;
String name;
for (CommaListIterator it = new CommaListIterator(fields); it.hasNext();)
{
name = it.getNext();
fieldDef = _curClassDef.getField(name);
if (fieldDef == null)
{
throw new XDocletException(Translator.getString(XDocletModulesOjbMessages.class,
XDocletModulesOjbMessages.INDEX_FIELD_MISSING,
new String[]{name, _curIndexDescriptorDef.getName(), _curClassDef.getName()}));
}
_curIndexColumn = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_COLUMN);
generate(template);
}
_curIndexColumn = null;
} | [
"Processes the template for all index columns for the current index descriptor.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\""
] | [
"Legacy conversion.\n@param map\n@return Properties",
"Converts SMatrixTriplet_64 into a SMatrixCC_64.\n\n@param src Original matrix which is to be copied. Not modified.\n@param dst Destination. Will be a copy. Modified.\n@param hist Workspace. Should be at least as long as the number of columns. Can be null.",
"Sets a property on this Javascript object for which the value is a\nJavascriptEnum\n\nThe value is set to what is returned by the getEnumValue() method on the JavascriptEnum\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property.",
"Check if the given class represents an array of primitives,\ni.e. boolean, byte, char, short, int, long, float, or double.\n@param clazz the class to check\n@return whether the given class is a primitive array class",
"Retrieve the details of a single project from the database.\n\n@param result Map instance containing the results\n@param row result set row read from the database",
"Use this API to delete nsacl6 resources of given names.",
"2-D Integer array to float array.\n\n@param array Integer array.\n@return Float array.",
"Writes the content of an input stream to an output stream\n\n@throws IOException",
"Produces a string identifying this half-edge by the point index values of\nits tail and head vertices.\n\n@return identifying string"
] |
private void addDependent(String pathName, String relativeTo) {
if (relativeTo != null) {
Set<String> dependents = dependenctRelativePaths.get(relativeTo);
if (dependents == null) {
dependents = new HashSet<String>();
dependenctRelativePaths.put(relativeTo, dependents);
}
dependents.add(pathName);
}
} | [
"Must be called with pathEntries lock taken"
] | [
"Set the specular intensity of the light.\n\nThis designates the color of the specular reflection.\nIt is multiplied by the material specular color to derive\nthe hue of the specular reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code specular_intensity} to control the specular intensity.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)",
"Returns the output directory for reporting.",
"Utility function that creates directory.\n\n@param dir Directory path\n@return File object of directory.",
"Returns a string representation of the receiver, containing\nthe String representation of each key-value pair, sorted ascending by value.",
"performs a primary key lookup operation against RDBMS and materializes\nan object from the resulting row. Only skalar attributes are filled from\nthe row, references are not resolved.\n@param oid contains the primary key info.\n@param cld ClassDescriptor providing mapping information.\n@return the materialized object, null if no matching row was found or if\nany error occured.",
"Print a work contour.\n\n@param value WorkContour instance\n@return work contour value",
"Process each regex group matched substring of the given string. If the closure\nparameter takes one argument, an array with all match groups is passed to it.\nIf the closure takes as many arguments as there are match groups, then each\nparameter will be one match group.\n\n@param self the source string\n@param regex a Regex string\n@param closure a closure with one parameter or as much parameters as groups\n@return the source string\n@since 1.6.0",
"Use this API to fetch lbvserver_servicegroupmember_binding resources of given name .",
"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."
] |
public static <T extends CharSequence> T eachMatch(T self, CharSequence regex, @ClosureParams(value=FromString.class, options={"List<String>","String[]"}) Closure closure) {
eachMatch(self.toString(), regex.toString(), closure);
return self;
} | [
"Process each regex group matched substring of the given CharSequence. If the closure\nparameter takes one argument, an array with all match groups is passed to it.\nIf the closure takes as many arguments as there are match groups, then each\nparameter will be one match group.\n\n@param self the source CharSequence\n@param regex a Regex CharSequence\n@param closure a closure with one parameter or as much parameters as groups\n@return the source CharSequence\n@see #eachMatch(String, String, groovy.lang.Closure)\n@since 1.8.2"
] | [
"This method is called to format a percentage value.\n\n@param value numeric value\n@return percentage value",
"Makes it possible to uniquify a collection of objects which are normally\nnon-hashable. Alternatively, it lets you define an alternate hash function\nfor them for limited-use hashing.",
"Registers the deployment resources needed.\n\n@param deploymentResourceSupport the deployment resource support\n@param service the service, which may be {@code null}, used to find the resource names that need to be registered",
"Prints and stores final result of the processing. This should be called\nafter finishing the processing of a dump. It will print the statistics\ngathered during processing and it will write a CSV file with usage counts\nfor every property.",
"Calculate the pointer's coordinates on the color wheel using the supplied\nangle.\n\n@param angle The position of the pointer expressed as angle (in rad).\n\n@return The coordinates of the pointer's center in our internal\ncoordinate system.",
"Record the duration of a put operation, along with the size of the values\nreturned.",
"Creates a random diagonal matrix where the diagonal elements are selected from a uniform\ndistribution that goes from min to max.\n\n@param N Dimension of the matrix.\n@param min Minimum value of a diagonal element.\n@param max Maximum value of a diagonal element.\n@param rand Random number generator.\n@return A random diagonal matrix.",
"Overwrites the underlying WebSocket session.\n\n@param newSession new session",
"Converts a sequence of unicode code points to a sequence of Java characters.\n\n@return the number of chars written to the destination buffer"
] |
public static long convertBytesToLong(byte[] bytes, int offset)
{
long value = 0;
for (int i = offset; i < offset + 8; i++)
{
byte b = bytes[i];
value <<= 8;
value |= b;
}
return value;
} | [
"Utility method to convert an array of bytes into a long. Byte ordered is\nassumed to be big-endian.\n@param bytes The data to read from.\n@param offset The position to start reading the 8-byte long from.\n@return The 64-bit integer represented by the eight bytes.\n@since 1.1"
] | [
"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)",
"Persists the current set of versions buffered for the current key into\nstorage, using the multiVersionPut api\n\nNOTE: Now, it could be that the stream broke off and has more pending\nversions. For now, we simply commit what we have to disk. A better design\nwould rely on in-stream markers to do the flushing to storage.",
"Read exceptions for a calendar.\n\n@param table calendar exception data\n@param calendar calendar\n@param exceptionID first exception ID",
"Cut the message content to the configured length.\n\n@param event the event",
"Change the currentState to the nextState if possible. The next state should already be\npresent in the graph.\n\n@param nextState the next state.\n@return true if currentState is successfully changed.",
"Returns an entry with the given proposal and prefix, or null if the proposal is not valid.\nIf it is valid, the initializer function is applied to it.",
"Use this API to clear bridgetable.",
"Called internally to actually process the Iteration.",
"Returns a vector from the PCA's basis.\n\n@param which Which component's vector is to be returned.\n@return Vector from the PCA basis."
] |
public static final String printBookingType(BookingType value)
{
return (Integer.toString(value == null ? BookingType.COMMITTED.getValue() : value.getValue()));
} | [
"Print a booking type.\n\n@param value BookingType instance\n@return booking type value"
] | [
"Select the default currency properties from the database.\n\n@param currencyID default currency ID",
"Deletes the given directory.\n\n@param directory The directory to delete.",
"Parser for forecast\n\n@param feed\n@return",
"Use this API to add sslcertkey resources.",
"Feeds input stream to data consumer using metadata from tar entry.\n@param consumer the consumer\n@param inputStream the stream to feed\n@param entry the entry to use for metadata\n@throws IOException on consume error",
"Look for the closing parenthesis corresponding to the one at position\nrepresented by the opening index.\n\n@param text input expression\n@param opening opening parenthesis index\n@return closing parenthesis index",
"One of the two main methods in this class. Creates a RendererViewHolder instance with a\nRenderer inside ready to be used. The RendererBuilder to create a RendererViewHolder using the\ninformation given as parameter.\n\n@param viewGroup used to create the ViewHolder.\n@param viewType associated to the renderer.\n@return ViewHolder extension with the Renderer it has to use inside.",
"Sets the replacement var map node specific.\n\n@param replacementVarMapNodeSpecific\nthe replacement var map node specific\n@return the parallel task builder",
"Sends the events to monitoring service client.\n\n@param events the events"
] |
private void removeFromInverseAssociations(
Tuple resultset,
int tableIndex,
Serializable id,
SharedSessionContractImplementor session) {
new EntityAssociationUpdater( this )
.id( id )
.resultset( resultset )
.session( session )
.tableIndex( tableIndex )
.propertyMightRequireInverseAssociationManagement( propertyMightBeMainSideOfBidirectionalAssociation )
.removeNavigationalInformationFromInverseSide();
} | [
"Removes the given entity from the inverse associations it manages."
] | [
"Merges the immutable container types of this Configuration with the given\nConfiguration.\n\nThe resultant immutable container types results will be the union of the two sets of\nimmutable container types. Where the type is found in both\nConfigurations, the result from otherConfiguration will replace the\nexisting result in this Configuration. This replacement behaviour will\noccur for subsequent calls to\n{@link #mergeImmutableContainerTypesFrom(Configuration)} .\n\n@param otherConfiguration - Configuration to merge immutable container types with.",
"Str map to str.\n\n@param map\nthe map\n@return the string",
"Do the set-up that's needed to access Amazon S3.",
"Return the BundleCapability of a bundle exporting the package packageName.\n\n@param context The BundleContext\n@param packageName The package name\n@return the BundleCapability of a bundle exporting the package packageName",
"Reads the categories for the given resource.\n\n@param cms the {@link CmsObject} used for reading the categories.\n@param resource the resource for which the categories should be read.\n@return the categories assigned to the given resource.",
"Get the rate types set.\n\n@return the rate types set, or an empty array, but never null.",
"Start component timer for current instance\n@param type - of component",
"If supported by the WMS server, a parameter \"angle\" can be set on \"customParams\" or \"mergeableParams\".\nIn this case the rotation will be done natively by the WMS.",
"Returns true if this instance has the same config as a given config.\n@param that\n@return true if the instance has the same config, false otherwise."
] |
public static String buildDynamicCapabilityName(String baseName, String dynamicNameElement) {
return buildDynamicCapabilityName(baseName, new String[]{dynamicNameElement});
} | [
"todo remove, here only for binary compatibility of elytron subsystem, drop once it is in."
] | [
"Remember the order of execution",
"This method is called to format a rate.\n\n@param value rate value\n@return formatted rate",
"Adds a basic LHS OPERATOR RHS block.\n\n@param list parent criteria list\n@param block current block",
"mark a node as blacklisted\n\n@param nodeId Integer node id of the node to be blacklisted",
"Whether the given value generation strategy requires to read the value from the database or not.",
"Retrieves the time at which work finishes on the given date, or returns\nnull if this is a non-working day.\n\n@param date Date instance\n@return finish time, or null for non-working day",
"Add filters to the tree.\n\n@param parentNode parent tree node\n@param filters list of filters",
"Updates the options panel for a special configuration.\n@param gitConfig the git configuration.",
"Adds an HTTP header to this request.\n@param key the header key.\n@param value the header value."
] |
private Map<Set<ServerIdentity>, ModelNode> getDeploymentOverlayOperations(ModelNode operation,
ModelNode host) {
final PathAddress realAddress = PathAddress.pathAddress(operation.get(OP_ADDR));
if (realAddress.size() == 0 && COMPOSITE.equals(operation.get(OP).asString())) {
//We have a composite operation resulting from a transformation to redeploy affected deployments
//See redeploying deployments affected by an overlay.
ModelNode serverOp = operation.clone();
Map<ServerIdentity, Operations.CompositeOperationBuilder> composite = new HashMap<>();
for (ModelNode step : serverOp.get(STEPS).asList()) {
ModelNode newStep = step.clone();
String groupName = PathAddress.pathAddress(step.get(OP_ADDR)).getElement(0).getValue();
newStep.get(OP_ADDR).set(PathAddress.pathAddress(step.get(OP_ADDR)).subAddress(1).toModelNode());
Set<ServerIdentity> servers = getServersForGroup(groupName, host, localHostName, serverProxies);
for(ServerIdentity server : servers) {
if(!composite.containsKey(server)) {
composite.put(server, Operations.CompositeOperationBuilder.create());
}
composite.get(server).addStep(newStep);
}
if(!servers.isEmpty()) {
newStep.get(OP_ADDR).set(PathAddress.pathAddress(step.get(OP_ADDR)).subAddress(1).toModelNode());
}
}
if(!composite.isEmpty()) {
Map<Set<ServerIdentity>, ModelNode> result = new HashMap<>();
for(Entry<ServerIdentity, Operations.CompositeOperationBuilder> entry : composite.entrySet()) {
result.put(Collections.singleton(entry.getKey()), entry.getValue().build().getOperation());
}
return result;
}
return Collections.emptyMap();
}
final Set<ServerIdentity> allServers = getAllRunningServers(host, localHostName, serverProxies);
return Collections.singletonMap(allServers, operation.clone());
} | [
"Convert an operation for deployment overlays to be executed on local servers.\nSince this might be called in the case of redeployment of affected deployments, we need to take into account\nthe composite op resulting from such a transformation\n@see AffectedDeploymentOverlay#redeployLinksAndTransformOperationForDomain\n@param operation\n@param host\n@return"
] | [
"Returns s if it's at most maxWidth chars, otherwise chops right side to fit.",
"Convert this path address to its model node representation.\n\n@return the model node list of properties",
"Use this API to fetch tmtrafficpolicy_lbvserver_binding resources of given name .",
"Remove all children that have been added to the owner object of this camera rig; except the\ncamera objects.",
"Authenticates the API connection by obtaining access and refresh tokens using the auth code that was obtained\nfrom the first half of OAuth.\n@param authCode the auth code obtained from the first half of the OAuth process.",
"Format the label text.\n\n@param scaleUnit The unit used for the scalebar.\n@param value The scale value.\n@param intervalUnit The scaled unit for the intervals.",
"Searches for brackets which are only used to construct new matrices by concatenating\n1 or more matrices together",
"Sums up the square of each element in the matrix. This is equivalent to the\nFrobenius norm squared.\n\n@param m Matrix.\n@return Sum of elements squared.",
"Sets the drawable used as the drawer indicator.\n\n@param drawable The drawable used as the drawer indicator."
] |
@Override
public ArtifactoryResponse restCall(ArtifactoryRequest artifactoryRequest) throws IOException {
HttpRequestBase httpRequest;
String requestPath = "/" + artifactoryRequest.getApiUrl();
ContentType contentType = Util.getContentType(artifactoryRequest.getRequestType());
String queryPath = "";
if (!artifactoryRequest.getQueryParams().isEmpty()) {
queryPath = Util.getQueryPath("?", artifactoryRequest.getQueryParams());
}
switch (artifactoryRequest.getMethod()) {
case GET:
httpRequest = new HttpGet();
break;
case POST:
httpRequest = new HttpPost();
setEntity((HttpPost)httpRequest, artifactoryRequest.getBody(), contentType);
break;
case PUT:
httpRequest = new HttpPut();
setEntity((HttpPut)httpRequest, artifactoryRequest.getBody(), contentType);
break;
case DELETE:
httpRequest = new HttpDelete();
break;
case PATCH:
httpRequest = new HttpPatch();
setEntity((HttpPatch)httpRequest, artifactoryRequest.getBody(), contentType);
break;
case OPTIONS:
httpRequest = new HttpOptions();
break;
default:
throw new IllegalArgumentException("Unsupported request method.");
}
httpRequest.setURI(URI.create(url + requestPath + queryPath));
addAccessTokenHeaderIfNeeded(httpRequest);
if (contentType != null) {
httpRequest.setHeader("Content-type", contentType.getMimeType());
}
Map<String, String> headers = artifactoryRequest.getHeaders();
for (String key : headers.keySet()) {
httpRequest.setHeader(key, headers.get(key));
}
HttpResponse httpResponse = httpClient.execute(httpRequest);
return new ArtifactoryResponseImpl(httpResponse);
} | [
"Create a REST call to artifactory with a generic request\n\n@param artifactoryRequest that should be sent to artifactory\n@return {@link ArtifactoryResponse} artifactory response as per to the request sent"
] | [
"convert object into another class using the JSON mapper\n\n@param <C> the generic target type\n@param object the object to convert\n@param targetClass the class of the target object\n@return the converted object\n@throws IllegalArgumentException if conversion fails",
"Return the key if there is one else return -1",
"Computes execution time\n@param extra",
"Add an entry to the cache.\n@param key key to use.\n@param value access token information to store.",
"Convenience method to convert a CSV string list to a set. Note that this\nwill suppress duplicates.\n\n@param str the input String\n@return a Set of String entries in the list",
"Use this API to unset the properties of ipv6 resource.\nProperties that need to be unset are specified in args array.",
"Add a cause to the backtrace.\n\n@param cause\nthe cause\n@param bTrace\nthe backtrace list",
"Write a calendar.\n\n@param record calendar instance\n@throws IOException",
"Generates a HashMap used to store expanded state for items in the list\non configuration change or whenever onResume is called.\n\n@return A HashMap containing the expanded state of all parents"
] |
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"
] | [
"Determines whether or not a given feature matches this pattern.\n\n@param feature\nSpecified feature to examine.\n\n@return Flag confirming whether or not this feature is inside the filter.",
"Resize the mesh to given size for each axis.\n\n@param mesh Mesh to be resized.\n@param xsize Size for x-axis.\n@param ysize Size for y-axis.\n@param zsize Size fof z-axis.",
"Check if the right-hand side type may be assigned to the left-hand side\ntype following the Java generics rules.\n@param lhsType the target type\n@param rhsType the value type that should be assigned to the target type\n@return true if rhs is assignable to lhs",
"Creates a favorite widget for a favorite entry.\n\n@param entry the favorite entry\n@return the favorite widget\n\n@throws CmsException if something goes wrong",
"Creates the graphic element to be shown when the datasource is empty",
"Inserts a Serializable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Serializable object, or null\n@return this bundler instance to chain method calls",
"Tries to load a property file with the specified name.\n\n@param localizedName the name\n@return the resource bundle if it was loaded, otherwise the backup",
"Creates a real agent in the platform\n\n@param agent_name\nThe name that the agent is gonna have in the platform\n@param path\nThe path of the description (xml) of the agent",
"Returns true if this instance has the same config as a given config.\n@param that\n@return true if the instance has the same config, false otherwise."
] |
public CollectionRequest<Task> tags(String task) {
String path = String.format("/tasks/%s/tags", task);
return new CollectionRequest<Task>(this, Task.class, path, "GET");
} | [
"Returns a compact representation of all of the tags the task has.\n\n@param task The task to get tags on.\n@return Request object"
] | [
"Read pattern information from the provided JSON object.\n@param patternJson the JSON object containing the pattern information.",
"Initialize the field factories for the messages table.",
"A convenience method for creating an immutable list\n\n@param self a List\n@return an immutable List\n@see java.util.Collections#unmodifiableList(java.util.List)\n@since 1.0",
"Simple context menu handler for multi-select tables.\n\n@param table the table\n@param menu the table's context menu\n@param event the click event\n@param entries the context menu entries",
"Handle a \"current till end\" change event.\n@param event the change event.",
"Retrieve a UUID field.\n\n@param type field type\n@return UUID instance",
"This method retrieves a double 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 a double\n@return double value",
"Read the domain controller data from an S3 file.\n\n@param directoryName the name of the directory in the bucket that contains the S3 file\n@return the domain controller data",
"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"
] |
protected void updateRotator(DMatrixRMaj Q , int m, int n, double c, double s) {
int rowA = m*Q.numCols;
int rowB = n*Q.numCols;
// for( int i = 0; i < Q.numCols; i++ ) {
// double a = Q.get(rowA+i);
// double b = Q.get(rowB+i);
// Q.set( rowA+i, c*a + s*b);
// Q.set( rowB+i, -s*a + c*b);
// }
// System.out.println("------ AFter Update Rotator "+m+" "+n);
// Q.print();
// System.out.println();
int endA = rowA + Q.numCols;
for( ; rowA != endA; rowA++ , rowB++ ) {
double a = Q.get(rowA);
double b = Q.get(rowB);
Q.set(rowA, c*a + s*b);
Q.set(rowB, -s*a + c*b);
}
} | [
"Multiplied a transpose orthogonal matrix Q by the specified rotator. This is used\nto update the U and V matrices. Updating the transpose of the matrix is faster\nsince it only modifies the rows.\n\n\n@param Q Orthogonal matrix\n@param m Coordinate of rotator.\n@param n Coordinate of rotator.\n@param c cosine of rotator.\n@param s sine of rotator."
] | [
"Returns a flag indicating if also expired resources should be found.\n@return A flag indicating if also expired resources should be found.",
"adds the qualified names to the export-package attribute, if not already\npresent.\n\n@param packages - passing parameterized packages is not supported",
"Render json.\n\n@param o\nthe o\n@return the string",
"Defines how messages should be logged. This method can be modified to\nrestrict the logging messages that are shown on the console or to change\ntheir formatting. See the documentation of Log4J for details on how to do\nthis.",
"Returns a new AWT BufferedImage from this image.\n\n@param type the type of buffered image to create, if not specified then defaults to the current image type\n@return a new, non-shared, BufferedImage with the same data as this Image.",
"Read the domain controller's data from an input stream.\n\n@param instream the input stream\n@throws Exception",
"Handles a failed SendData request. This can either be because of the stick actively reporting it\nor because of a time-out of the transaction in the send thread.\n@param originalMessage the original message that was sent",
"Transits a float propertyId from the start value to the end value.\n\n@param propertyId\n@param vals\n@return self",
"Ask the specified player for an Artist menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n\n@return the entries in the artist menu\n\n@throws Exception if there is a problem obtaining the menu"
] |
public void setDuration(float start, float end)
{
for (GVRAnimation anim : mAnimations)
{
anim.setDuration(start,end);
}
} | [
"Sets the duration for the animations in this animator.\n\n@param start the animation will start playing from the specified time\n@param end the animation will stop playing at the specified time\n\n@see GVRAnimation#setDuration(float, float)"
] | [
"A map of the header key value pairs. Keys are strings and values are either list of strings or a\nstring.\n\n@param headers the header map",
"Retrieve an enterprise field value.\n\n@param index field index\n@return field value",
"Select which view to display based on the state of the promotion. Will return the form if user selects to perform\npromotion. Progress will be returned if the promotion is currently in progress.",
"Checks the preconditions for creating a new ForbidSubStr processor with a List of forbidden substrings.\n\n@param forbiddenSubStrings\nthe forbidden substrings\n@throws NullPointerException\nif forbiddenSubStrings is null\n@throws IllegalArgumentException\nif forbiddenSubStrings is empty",
"Use this API to fetch spilloverpolicy_lbvserver_binding resources of given name .",
"Used by the slave host when creating the host info dmr sent across to the DC during the registration process\n\n@param ignoreUnaffectedServerGroups whether the slave host is set up to ignore config for server groups it does not have servers for\n@param hostModel the resource containing the host model\n@param model the dmr sent across to theDC\n@return the modified dmr",
"Use this API to delete nssimpleacl.",
"Reads the next \"word from the request, comprising all characters up to the next SPACE.\nCharacters are tested by the supplied CharacterValidator, and an exception is thrown\nif invalid characters are encountered.",
"Sets the current switch index based on object name.\nThis function finds the child of the scene object\nthis component is attached to and sets the switch\nindex to reference it so this is the object that\nwill be displayed.\n\nIf it is out of range, none of the children will be shown.\n@param childName name of child to select\n@see GVRSceneObject#getChildByIndex(int)"
] |
private void firstInnerTableStart(Options opt) {
w.print(linePrefix + linePrefix + "<tr>" + opt.shape.extraColumn() +
"<td><table border=\"0\" cellspacing=\"0\" " +
"cellpadding=\"1\">" + linePostfix);
} | [
"Start the first inner table of a class."
] | [
"Get the target file for misc items.\n\n@param item the misc item\n@return the target location",
"Gets an iterable of all the collections for the given user.\n@param api the API connection to be used when retrieving the collections.\n@return an iterable containing info about all the collections.",
"Adds an access constraint to the set used with the attribute\n@param accessConstraint the constraint\n@return a builder that can be used to continue building the attribute definition",
"Helper method for variance calculations.\n@return The sum of the squares of the differences between\neach value and the arithmetic mean.\n@throws EmptyDataSetException If the data set is empty.",
"Saves the list of currently displayed favorites.",
"Multiple of gradient windwos per masc relation of x y\n\n@return int[]",
"Returns a BoxStoragePolicyAssignment information.\n@param api the API connection to be used by the resource.\n@param resolvedForType the assigned entity type for the storage policy.\n@param resolvedForID the assigned entity id for the storage policy.\n@return information about this {@link BoxStoragePolicyAssignment}.",
"Set the diffuse light intensity.\n\nThis designates the color of the diffuse reflection.\nIt is multiplied by the material diffuse color to derive\nthe hue of the diffuse reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code diffuse_intensity} to control the intensity of diffuse light reflected.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)",
"Access all currencies known.\n\n@param providers the (optional) specification of providers to consider.\n@return the list of known currencies, never null."
] |
public static int cudnnGetReductionIndicesSize(
cudnnHandle handle,
cudnnReduceTensorDescriptor reduceTensorDesc,
cudnnTensorDescriptor aDesc,
cudnnTensorDescriptor cDesc,
long[] sizeInBytes)
{
return checkResult(cudnnGetReductionIndicesSizeNative(handle, reduceTensorDesc, aDesc, cDesc, sizeInBytes));
} | [
"Helper function to return the minimum size of the index space to be passed to the reduction given the input and\noutput tensors"
] | [
"Create the grid feature type.\n\n@param mapContext the map context containing the information about the map the grid will be\nadded to.\n@param geomClass the geometry type",
"Populates a resource.\n\n@param resource resource instance\n@param record MPX record\n@throws MPXJException",
"Use this API to fetch vpnsessionpolicy_aaauser_binding resources of given name .",
"helper to calculate the navigationBar height\n\n@param context\n@return",
"Called when a ParentViewHolder has triggered an expansion for it's parent\n\n@param flatParentPosition the position of the parent that is calling to be expanded",
"get the result speech recognize and find match in strings file.\n\n@param speechResult",
"sets the row reader class name for thie class descriptor",
"Parses a single query item for the query facet.\n@param item JSON object of the query item.\n@return the parsed query item, or <code>null</code> if parsing failed.",
"Get the TagsInterface for working with Flickr Tags.\n\n@return The TagsInterface"
] |
public static dnsnsecrec[] get(nitro_service service, String hostname[]) throws Exception{
if (hostname !=null && hostname.length>0) {
dnsnsecrec response[] = new dnsnsecrec[hostname.length];
dnsnsecrec obj[] = new dnsnsecrec[hostname.length];
for (int i=0;i<hostname.length;i++) {
obj[i] = new dnsnsecrec();
obj[i].set_hostname(hostname[i]);
response[i] = (dnsnsecrec) obj[i].get_resource(service);
}
return response;
}
return null;
} | [
"Use this API to fetch dnsnsecrec resources of given names ."
] | [
"Use this API to fetch all the sslcipher resources that are configured on netscaler.",
"Get history for a specific database ID\n\n@param id ID of history entry\n@return History entry",
"Creates a file logger in the current thread. The file is in XML format, suitable for interpretation by Eclipse's Drools Audit View\nor other tools. Note that while events are written as they happen, the file will not be flushed until it is closed or the underlying\nfile buffer is filled. If you need real time logging then use a Console Logger or a Threaded File Logger.\n\n@param session\n@param fileName - .log is appended to this.\n@return",
"Use this API to add cmppolicylabel resources.",
"Checks that given directory if readable & writable and prints a warning if the check fails. Warning is only\nprinted once and is not repeated until the condition is fixed and broken again.\n\n@param directory deployment directory\n@return does given directory exist and is readable and writable?",
"Retrieves an object that has been attached to this context.\n\n@param key the key to the attachment.\n@param <V> the value type of the attachment.\n\n@return the attachment if found otherwise {@code null}.",
"We have a non-null date, try each format in turn to see if it can be parsed.\n\n@param str date to parse\n@param pos position at which to start parsing\n@return Date instance",
"Inserts a marshalled endpoint reference to a given DOM tree rooted by parent.\n@param wsAddr\n@param parent\n@throws ServiceLocatorException",
"Use this API to fetch auditnslogpolicy_systemglobal_binding resources of given name ."
] |
protected static String getTimePrecisionString(byte precision) {
switch (precision) {
case TimeValue.PREC_SECOND:
return "sec";
case TimeValue.PREC_MINUTE:
return "min";
case TimeValue.PREC_HOUR:
return "hour";
case TimeValue.PREC_DAY:
return "day";
case TimeValue.PREC_MONTH:
return "month";
case TimeValue.PREC_YEAR:
return "year";
case TimeValue.PREC_DECADE:
return "decade";
case TimeValue.PREC_100Y:
return "100 years";
case TimeValue.PREC_1KY:
return "1000 years";
case TimeValue.PREC_10KY:
return "10K years";
case TimeValue.PREC_100KY:
return "100K years";
case TimeValue.PREC_1MY:
return "1 million years";
case TimeValue.PREC_10MY:
return "10 million years";
case TimeValue.PREC_100MY:
return "100 million years";
case TimeValue.PREC_1GY:
return "1000 million years";
default:
return "Unsupported precision " + precision;
}
} | [
"Returns a human-readable string representation of a reference to a\nprecision that is used for a time value.\n\n@param precision\nthe numeric precision\n@return a string representation of the precision"
] | [
"Handles a faulted task.\n\n@param faultedEntry the entry holding faulted task\n@param throwable the reason for fault\n@param context the context object shared across all the task entries in this group during execution\n\n@return an observable represents asynchronous operation in the next stage",
"Returns an integer array that contains the default values for all the\ntexture parameters.\n\n@return an integer array that contains the default values for all the\ntexture parameters.",
"Returns the value of a property of the current object on the specified level.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the property\"\[email protected] name=\"default\" optional=\"true\" description=\"A default value to use if the property\nis not defined\"",
"Returns the full user record for the single user with the provided ID.\n\n@param user An identifier for the user. Can be one of an email address,\nthe globally unique identifier for the user, or the keyword `me`\nto indicate the current user making the request.\n@return Request object",
"Schedules the task with a fixed delay period and an initialDelay period. This functions\nlike the normal java Timer.\n@param task\n@param initialDelay\n@param fixedDelay",
"Register the agent in the platform\n\n@param agent_name\nThe name of the agent to be registered\n@param agent\nThe agent to register.\n@throws FIPAException",
"Creates the project used to import module resources and sets it on the CmsObject.\n\n@param cms the CmsObject to set the project on\n@param module the module\n@return the created project\n@throws CmsException if something goes wrong",
"Unkink FK fields of target 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.",
"Close the open stream.\n\nClose the stream if it was opened before"
] |
@Deprecated
public static <T> T buildJsonResponse(Response response, Class<T> clazz) throws IOException, SlackApiException {
if (response.code() == 200) {
String body = response.body().string();
DETAILED_LOGGER.accept(new HttpResponseListener.State(SlackConfig.DEFAULT, response, body));
return GsonFactory.createSnakeCase().fromJson(body, clazz);
} else {
String body = response.body().string();
throw new SlackApiException(response, body);
}
} | [
"use parseJsonResponse instead"
] | [
"Validates specialization if this bean specializes another bean.",
"Use this API to update dbdbprofile resources.",
"A Maven stub is a Maven Project for which we have found information, but the project has not yet been located\nwithin the input application. If we have found an application of the same GAV within the input app, we should\nfill out this stub instead of creating a new one.",
"Process the response by reporting proper log and feeding failure\ndetectors\n\n@param response\n@param pipeline",
"Puts as many of the given bytes as possible into this buffer.\n\n@return number of bytes actually put into this buffer (0 if the buffer is full)",
"Release a connection by placing the connection back in the pool.\n@param connectionHandle Connection being released.\n@throws SQLException",
"Set the timeout for idle connections. Voldemort client caches all\nconnections to the Voldemort server. This setting allows the a connection\nto be dropped, if it is idle for more than this time.\n\nThis could be useful in the following cases 1) Voldemort client is not\ndirectly connected to the server and is connected via a proxy or\nfirewall. The Proxy or firewall could drop the connection silently. If\nthe connection is dropped, then client will see operations fail with a\ntimeout. Setting this property enables the Voldemort client to tear down\nthe connection before a firewall could drop it. 2) Voldemort server\ncaches the connection and each connection has an associated memory cost.\nSetting this property on all clients, enable the clients to prune the\nconnections and there by freeing up the server connections.\n\nthrows IllegalArgumentException if the timeout is less than 10 minutes.\n\nCurrently it can't be set below 10 minutes to avoid the racing risk of\ncontention between connection checkout and selector trying to close it.\nThis is intended for low throughput scenarios.\n\n@param idleConnectionTimeout\nzero or negative number to disable the feature ( default -1)\ntimeout\n@param unit {@link TimeUnit}\n@return ClientConfig object for chained set\n\nthrows {@link IllegalArgumentException} if the timeout is greater\nthan 0, but less than 10 minutes.",
"Generate Allure report data from directories with allure report results.\n\n@param args a list of directory paths. First (args.length - 1) arguments -\nresults directories, last argument - the folder to generated data",
"Returns the log message id used by this checker. This is used to group it so that all attributes failing a type of rejction\nend up in the same error message. This default implementation uses the formatted log message with an empty attribute map as the id.\n\n@return the log message id"
] |
public String objectToString(T object) {
StringBuilder sb = new StringBuilder(64);
sb.append(object.getClass().getSimpleName());
for (FieldType fieldType : fieldTypes) {
sb.append(' ').append(fieldType.getColumnName()).append('=');
try {
sb.append(fieldType.extractJavaFieldValue(object));
} catch (Exception e) {
throw new IllegalStateException("Could not generate toString of field " + fieldType, e);
}
}
return sb.toString();
} | [
"Return a string representation of the object."
] | [
"Send a failed operation response.\n\n@param context the request context\n@param errorCode the error code\n@param message the operation message\n@throws IOException for any error",
"Performs the filtering of the expired entries based on retention time.\nOptionally, deletes them also\n\n@param key the key whose value is to be deleted if needed\n@param vals set of values to be filtered out\n@return filtered list of values which are currently valid",
"Return the name of the current conf set\n@return the conf set name",
"Given a list of keys and a number of splits find the keys to split on.\n\n@param keys the list of keys.\n@param numSplits the number of splits.",
"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",
"Load the entity activating the persistence context execution boundaries\n\n@param session the session\n@param qp the query parameters\n@param ogmLoadingContext the loading context\n@param returnProxies when {@code true}, get an existing proxy for each collection element (if there is one)\n@return the result of the query",
"Create a MfClientHttpRequestFactory for adding the specified headers.\n\n@param requestFactory the basic request factory. It should be unmodified and just wrapped with\na proxy class.\n@param matchers The matchers.\n@param headers The headers.\n@return",
"Writes the JavaScript code describing the tags as Tag classes to given writer.",
"Create a discount curve from given times and given discount factors using default interpolation and extrapolation methods.\n\n@param name The name of this discount curve.\n@param times Array of times as doubles.\n@param givenDiscountFactors Array of corresponding discount factors.\n@return A new discount factor object."
] |
public static void copyThenClose(InputStream input, OutputStream output)
throws IOException {
copy(input, output);
input.close();
output.close();
} | [
"Copies information between specified streams and then closes\nboth of the streams.\n@throws java.io.IOException"
] | [
"Creates a text box with the given parent and text node assigned.\n@param contblock The parent node (and the containing block in the same time)\n@param n The corresponding text node in the DOM tree.\n@return The new text box.",
"Adds a filter definition to this project file.\n\n@param filter filter definition",
"slave=true",
"Given a list of store definitions, makes sure that rebalance supports all\nof them. If not it throws an error.\n\n@param storeDefList List of store definitions\n@return Filtered list of store definitions which rebalancing supports",
"Wrap an operation's parameters in a simple encapsulating object\n@param operation the operation\n@param messageHandler the message handler\n@param attachments the attachments\n@return the encapsulating object",
"Get a fallback handler.\n\n@param header the protocol header\n@return the fallback handler",
"Assign FK value to all n-side objects referenced by given object.\n\n@param obj real object with 1:n reference\n@param cod {@link CollectionDescriptor} of referenced 1:n objects\n@param insert flag signal insert operation, false signals update operation",
"Create a BoxStoragePolicyAssignment for a BoxStoragePolicy.\n@param api the API connection to be used by the resource.\n@param policyID the policy ID of the BoxStoragePolicy.\n@param userID the user ID of the to assign the BoxStoragePolicy to.\n@return the information about the BoxStoragePolicyAssignment created.",
"Returns true if all pixels in the array have the same color"
] |
public Object getJavaDefaultValueDefault() {
if (field.getType() == boolean.class) {
return DEFAULT_VALUE_BOOLEAN;
} else if (field.getType() == byte.class || field.getType() == Byte.class) {
return DEFAULT_VALUE_BYTE;
} else if (field.getType() == char.class || field.getType() == Character.class) {
return DEFAULT_VALUE_CHAR;
} else if (field.getType() == short.class || field.getType() == Short.class) {
return DEFAULT_VALUE_SHORT;
} else if (field.getType() == int.class || field.getType() == Integer.class) {
return DEFAULT_VALUE_INT;
} else if (field.getType() == long.class || field.getType() == Long.class) {
return DEFAULT_VALUE_LONG;
} else if (field.getType() == float.class || field.getType() == Float.class) {
return DEFAULT_VALUE_FLOAT;
} else if (field.getType() == double.class || field.getType() == Double.class) {
return DEFAULT_VALUE_DOUBLE;
} else {
return null;
}
} | [
"Return whether or not the field value passed in is the default value for the type of the field. Null will return\ntrue."
] | [
"Selects the specified value in the list.\n\n@param value the new value\n@param fireEvents if true, a ValueChangeEvent event will be fired\n@see #setAddMissingValue",
"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",
"Get a property of type java.util.Properties or return the default if\nno such property is defined\n@param props properties\n@param name the key\n@param defaultProperties default property if empty\n@return value from the property",
"Return the version string of this instance of finmath-lib.\n\n@return The version string of this instance of finmath-lib.",
"Set the view frustum to pick against from the minimum and maximum corners.\nThe viewpoint of the frustum is the center of the scene object\nthe picker is attached to. The view direction is the forward\ndirection of that scene object. The frustum will pick what a camera\nattached to the scene object with that view frustum would see.\nIf the frustum is not attached to a scene object, it defaults to\nthe view frustum of the main camera of the scene.\n\n@param frustum array of 6 floats as follows:\nfrustum[0] = left corner of frustum\nfrustum[1] = bottom corner of frustum\nfrustum[2] = front corner of frustum (near plane)\nfrustum[3] = right corner of frustum\nfrustum[4] = top corner of frustum\nfrustum[5 = back corner of frustum (far plane)",
"Log column data.\n\n@param column column data",
"Add a polygon symbolizer definition to the rule.\n\n@param styleJson The old style.",
"sorts are a bit more awkward and need a helper...",
"Constructs a valid request and passes it on to the next handler. It also\ncreates the 'StoreClient' object corresponding to the store name\nspecified in the REST request.\n\n@param requestValidator The Validator object used to construct the\nrequest object\n@param ctx Context of the Netty channel\n@param messageEvent Message Event used to write the response / exception"
] |
protected void consumeChar(ImapRequestLineReader request, char expected)
throws ProtocolException {
char consumed = request.consume();
if (consumed != expected) {
throw new ProtocolException("Expected:'" + expected + "' found:'" + consumed + '\'');
}
} | [
"Consumes the next character in the request, checking that it matches the\nexpected one. This method should be used when the"
] | [
"Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by the specified comparator.\n\n@param iterable\nthe items to be sorted. May not be <code>null</code>.\n@param comparator\nthe comparator to be used. May be <code>null</code> to indicate that the natural ordering of the\nelements should be used.\n@return a sorted list as a shallow copy of the given iterable.\n@see Collections#sort(List, Comparator)\n@see #sort(Iterable)\n@see #sortBy(Iterable, org.eclipse.xtext.xbase.lib.Functions.Function1)\n@see ListExtensions#sortInplace(List, Comparator)\n@since 2.7",
"Transforms an input String into HTML using the given Configuration.\n\n@param input\nThe String to process.\n@param configuration\nThe Configuration.\n@return The processed String.\n@since 0.7\n@see Configuration",
"add various getAt and setAt methods for primitive arrays\n@param receiver the receiver class\n@param name the name of the method\n@param args the argument classes",
"Creates the stats items.\n\n@param statsType\nthe stats type\n@return the sorted set\n@throws IOException\nSignals that an I/O exception has occurred.",
"Stops all streams.",
"Helper method that encapsulates the minimum logic for adding a high\npriority job to a queue.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param queue\nthe Resque queue name\n@param jobJson\nthe job serialized as JSON",
"Use this API to Shutdown shutdown.",
"Append Join for SQL92 Syntax",
"Creates metadata on this folder using a specified scope and template.\n\n@param templateName the name of the metadata template.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").\n@param metadata the new metadata values.\n@return the metadata returned from the server."
] |
public static Cluster
repeatedlyBalanceContiguousPartitionsPerZone(final Cluster nextCandidateCluster,
final int maxContiguousPartitionsPerZone) {
System.out.println("Looping to evenly balance partitions across zones while limiting contiguous partitions");
// This loop is hard to make definitive. I.e., there are corner cases
// for small clusters and/or clusters with few partitions for which it
// may be impossible to achieve tight limits on contiguous run lenghts.
// Therefore, a constant number of loops are run. Note that once the
// goal is reached, the loop becomes a no-op.
int repeatContigBalance = 10;
Cluster returnCluster = nextCandidateCluster;
for(int i = 0; i < repeatContigBalance; i++) {
returnCluster = balanceContiguousPartitionsPerZone(returnCluster,
maxContiguousPartitionsPerZone);
returnCluster = balancePrimaryPartitions(returnCluster, false);
System.out.println("Completed round of balancing contiguous partitions: round "
+ (i + 1) + " of " + repeatContigBalance);
}
return returnCluster;
} | [
"Loops over cluster and repeatedly tries to break up contiguous runs of\npartitions. After each phase of breaking up contiguous partitions, random\npartitions are selected to move between zones to balance the number of\npartitions in each zone. The second phase may re-introduce contiguous\npartition runs in another zone. Therefore, this overall process is\nrepeated multiple times.\n\n@param nextCandidateCluster\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return updated cluster"
] | [
"Registers Jersey HeaderDelegateProviders for the specified TinyTypes.\n\n@param head a TinyType\n@param tail other TinyTypes\n@throws IllegalArgumentException when a non-TinyType is given",
"Calculate start dates for a yearly recurrence.\n\n@param calendar current date\n@param dates array of start dates",
"Boot with the given operations, performing full model and capability registry validation.\n\n@param bootOperations the operations. Cannot be {@code null}\n@param rollbackOnRuntimeFailure {@code true} if the boot should fail if operations fail in the runtime stage\n@return {@code true} if boot was successful\n@throws ConfigurationPersistenceException",
"Searches the variables layers, top to bottom, for given name, and returns if found; null otherwise.\n\nIf maxDepth is set to {@link Variables#SEARCH_ALL_LAYERS}, then search all layers.",
"Return an artifact regarding its gavc\n\n@param gavc String\n@return DbArtifact",
"if |a11-a22| >> |a12+a21| there might be a better way. see pg371",
"Ask the specified player for the album art in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param artReference uniquely identifies the desired album art\n@param trackType the kind of track that owns the art\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nartwork updates will use available caches only\n\n@return the album art found, if any",
"Creates and caches dataset info object. Subsequent invocations will\nreturn same instance.\n\n@see IIM#DS(int, int)\n@param dataSet\ndataset record number\n@return dataset info instace",
"Return the count of all objects found\nfor given class, using the PB-api within\nODMG - this may change in further versions."
] |
@UiThread
private int getFlatParentPosition(int parentPosition) {
int parentCount = 0;
int listItemCount = mFlatItemList.size();
for (int i = 0; i < listItemCount; i++) {
if (mFlatItemList.get(i).isParent()) {
parentCount++;
if (parentCount > parentPosition) {
return i;
}
}
}
return INVALID_FLAT_POSITION;
} | [
"Gets the index of a ExpandableWrapper within the helper item list based on\nthe index of the ExpandableWrapper.\n\n@param parentPosition The index of the parent in the list of parents\n@return The index of the parent in the merged list of children and parents"
] | [
"remove drag support from the given Component.\n@param c the Component to remove",
"once animation is setup, start the animation record the beginning and\nending time for the animation",
"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",
"Put a spatial object in the cache and index it.\n\n@param key key for object\n@param object object itself\n@param envelope envelope for object",
"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",
"Gets an item that was shared with a password-protected shared link.\n@param api the API connection to be used by the shared item.\n@param sharedLink the shared link to the item.\n@param password the password for the shared link.\n@return info about the shared item.",
"Returns the version of Jenkins Artifactory Plugin or empty string if not found\n\n@return the version of Jenkins Artifactory Plugin or empty string if not found",
"Write objects to data store, but don't release the locks.\nI don't know what we should do if we are in a checkpoint and\nwe need to abort.",
"cleanup tx and prepare for reuse"
] |
private void readWorkWeeks(Project.Calendars.Calendar xmlCalendar, ProjectCalendar mpxjCalendar)
{
WorkWeeks ww = xmlCalendar.getWorkWeeks();
if (ww != null)
{
for (WorkWeek xmlWeek : ww.getWorkWeek())
{
ProjectCalendarWeek week = mpxjCalendar.addWorkWeek();
week.setName(xmlWeek.getName());
Date startTime = xmlWeek.getTimePeriod().getFromDate();
Date endTime = xmlWeek.getTimePeriod().getToDate();
week.setDateRange(new DateRange(startTime, endTime));
WeekDays xmlWeekDays = xmlWeek.getWeekDays();
if (xmlWeekDays != null)
{
for (WeekDay xmlWeekDay : xmlWeekDays.getWeekDay())
{
int dayNumber = xmlWeekDay.getDayType().intValue();
Day day = Day.getInstance(dayNumber);
week.setWorkingDay(day, BooleanHelper.getBoolean(xmlWeekDay.isDayWorking()));
ProjectCalendarHours hours = week.addCalendarHours(day);
Project.Calendars.Calendar.WorkWeeks.WorkWeek.WeekDays.WeekDay.WorkingTimes times = xmlWeekDay.getWorkingTimes();
if (times != null)
{
for (Project.Calendars.Calendar.WorkWeeks.WorkWeek.WeekDays.WeekDay.WorkingTimes.WorkingTime period : times.getWorkingTime())
{
startTime = period.getFromTime();
endTime = period.getToTime();
if (startTime != null && endTime != null)
{
if (startTime.getTime() >= endTime.getTime())
{
endTime = DateHelper.addDays(endTime, 1);
}
hours.addRange(new DateRange(startTime, endTime));
}
}
}
}
}
}
}
} | [
"Read the work weeks associated with this calendar.\n\n@param xmlCalendar XML calendar object\n@param mpxjCalendar MPXJ calendar object"
] | [
"Remove a list of stores from the session\n\nFirst commit all entries for these stores and then cleanup resources\n\n@param storeNameToRemove List of stores to be removed from the current\nstreaming session",
"Undo a prior removal using the supplied undo key.\n\n@param removalKey - The key returned from the call to removeRoleMapping.\n@return true if the undo was successful, false otherwise.",
"Extract resource group from a resource ID string.\n@param id the resource ID string\n@return the resource group 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",
"List details of all calendars in the file.\n\n@param file ProjectFile instance",
"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",
"Retrieve a list of the available P3 project names from a directory.\n\n@param directory directory containing P3 files\n@return list of project names",
"Use this API to fetch tmtrafficpolicy_tmglobal_binding resources of given name .",
"Returns an iterator of all direct and indirect extents of this class.\n\n@return The extents iterator"
] |
public void validateInjectionPoint(InjectionPoint ij, BeanManagerImpl beanManager) {
validateInjectionPointForDefinitionErrors(ij, ij.getBean(), beanManager);
validateMetadataInjectionPoint(ij, ij.getBean(), ValidatorLogger.INJECTION_INTO_NON_BEAN);
validateEventMetadataInjectionPoint(ij);
validateInjectionPointForDeploymentProblems(ij, ij.getBean(), beanManager);
} | [
"Validate an injection point\n\n@param ij the injection point to validate\n@param beanManager the bean manager"
] | [
"Returns a new instance of the class with the given qualified name using the constructor with\nthe specified signature.\n\n@param className The qualified name of the class to instantiate\n@param types The parameter types\n@param args The arguments\n@return The instance",
"Fixed length fancy formatting for doubles. If possible decimal notation is used. If all the significant digits\ncan't be shown then it will switch to exponential notation. If not all the space is needed then it will\nbe filled in to ensure it has the specified length.\n\n@param value value being formatted\n@param format default format before exponential\n@param length Maximum number of characters it can take.\n@param significant Number of significant decimal digits to show at a minimum.\n@return formatted string",
"Use this API to disable nsacl6 resources of given names.",
"If first and second are Strings, then this returns an MutableInternedPair\nwhere the Strings have been interned, and if this Pair is serialized\nand then deserialized, first and second are interned upon\ndeserialization.\n\n@param p A pair of Strings\n@return MutableInternedPair, with same first and second as this.",
"Extract resource provider from a resource ID string.\n@param id the resource ID string\n@return the resource group name",
"Adds a module to the modules that should be exported.\nIf called at least once, the explicitly added modules will be exported\ninstead of the default modules.\n\n@param moduleName the name of the module to export.",
"Sets the day of the month that matches the condition, i.e., the day of month of the 2nd Saturday.\nIf the day does not exist in the current month, the last possible date is set, i.e.,\ninstead of the fifth Saturday, the fourth is chosen.\n\n@param date date that has the correct year and month already set.\n@param week the number of the week to choose.",
"Build a new WebDriver based EmbeddedBrowser.\n\n@return the new build WebDriver based embeddedBrowser",
"Use this API to fetch auditnslogpolicy_authenticationvserver_binding resources of given name ."
] |
public static java.sql.Date toDate(Object value) throws ParseException {
if (value == null) {
return null;
}
if (value instanceof java.sql.Date) {
return (java.sql.Date) value;
}
if (value instanceof String) {
if ("".equals((String) value)) {
return null;
}
return new java.sql.Date(IN_DATE_FORMAT.parse((String) value).getTime());
}
return new java.sql.Date(IN_DATE_FORMAT.parse(value.toString()).getTime());
} | [
"Convert an Object to a Date."
] | [
"Get the Avro Schema of the input path, assuming the path contains just one\nschema version in all files under that path.",
"Returns an array of the enabled endpoints as Integer IDs\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@param filters If supplied, only endpoints ending with values in filters are returned\n@return Collection of endpoints\n@throws Exception exception",
"Start export and check in of the selected modules.\n@return The exit code of the check in procedure (like a script's exit code).",
"once animation is setup, start the animation record the beginning and\nending time for the animation",
"Use this API to add appfwjsoncontenttype.",
"Send a master changed announcement to all registered master listeners.\n\n@param update the message announcing the new tempo master",
"Parses the result and returns the failure description.\n\n@param result the result of executing an operation\n\n@return the failure description if defined, otherwise a new undefined model node\n\n@throws IllegalArgumentException if the outcome of the operation was successful",
"Transform the given bytes into an object.\n\n@param bytes The bytes to construct the object from\n@return The object constructed",
"Parse a map of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token."
] |
public String getModuleJenkinsJobInfo(final DbArtifact dbArtifact) {
final DbModule module = getModule(dbArtifact);
if(module == null){
return "";
}
final String jenkinsJobUrl = module.getBuildInfo().get("jenkins-job-url");
if(jenkinsJobUrl == null){
return "";
}
return jenkinsJobUrl;
} | [
"k\nReturns a list of artifact regarding the filters\n\n@return List<DbArtifact>"
] | [
"Write an int to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The int to write\n@param offset The offset to begin writing at",
"Return a licenses view of the targeted module\n\n@param moduleId String\n@return List<DbLicense>",
"Checks if a newly created action wants to write output to stdout, and\nlogs a warning if other actions are doing the same.\n\n@param newAction\nthe new action to be checked",
"Performs the filtering of the expired entries based on retention time.\nOptionally, deletes them also\n\n@param key the key whose value is to be deleted if needed\n@param vals set of values to be filtered out\n@return filtered list of values which are currently valid",
"Should be called each frame.",
"Creates a field map for tasks.\n\n@param props props data",
"Returns a new index creation statement using the session's keyspace.\n\n@param keyspace the keyspace name\n@param table the table name\n@param name the index name\n@return a new index creation statement",
"Shutdown the socket server",
"Delete a file ignoring failures.\n\n@param file file to delete"
] |
static Style get(final GridParam params) {
final StyleBuilder builder = new StyleBuilder();
final Symbolizer pointSymbolizer = crossSymbolizer("shape://plus", builder, CROSS_SIZE,
params.gridColor);
final Style style = builder.createStyle(pointSymbolizer);
final List<Symbolizer> symbolizers = style.featureTypeStyles().get(0).rules().get(0).symbolizers();
if (params.haloRadius > 0.0) {
Symbolizer halo = crossSymbolizer("cross", builder, CROSS_SIZE + params.haloRadius * 2.0,
params.haloColor);
symbolizers.add(0, halo);
}
return style;
} | [
"Create the Grid Point style."
] | [
"Similar to masking, checks that the range resulting from the bitwise or is contiguous.\n\n@param maskValue\n@param segmentPrefixLength\n@return\n@throws PrefixLenException",
"Check if the current version match the last release or the last snapshot one\n\n@param artifact\n@return boolean",
"get the ArrayTypeSignature corresponding to given generic array type\n\n@param genericArrayType\n@return",
"Try to provide an escaped, ready-to-use shell line to repeat a given command line.",
"Generates a change event for a local deletion 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@return a change event for a local deletion of a document in the given namespace referring\nto the given document _id.",
"Returns the orthogonal V matrix.\n\n@param V If not null then the results will be stored here. Otherwise a new matrix will be created.\n@return The extracted Q matrix.",
"Use this API to fetch lbvserver_servicegroupmember_binding resources of given name .",
"Process the standard working hours for a given day.\n\n@param mpxjCalendar MPXJ Calendar instance\n@param uniqueID unique ID sequence generation\n@param day Day instance\n@param typeList Planner list of days",
"Deregister shutdown hook and execute it immediately"
] |
public static String getParentIdFromAgent(Launcher launcher, final String imageID, final String host) throws IOException, InterruptedException {
return launcher.getChannel().call(new MasterToSlaveCallable<String, IOException>() {
public String call() throws IOException {
return DockerUtils.getParentId(imageID, host);
}
});
} | [
"Get image parent ID from imageID on the current agent.\n\n@param imageID\n@return"
] | [
"Gets the JsonObject representation of the given field object.\n@param field represents a template field\n@return the json object",
"Use this API to fetch the statistics of all gslbservice_stats resources that are configured on netscaler.",
"Appends a line separator node that will only be effective if the current line contains non-whitespace text.\n\n@return the given parent node",
"Set an enterprise text value.\n\n@param index text index (1-40)\n@param value text value",
"Get a collection of methods declared on this object by method name.\n\n@param name the name of the method\n@return the (possibly empty) collection of methods with the given name",
"Use this API to fetch sslservicegroup_sslcertkey_binding resources of given name .",
"Get the upload parameters.\n@return",
"check max size of each message\n@param maxMessageSize the max size for each message",
"Stops the background stream thread."
] |
public static Iterable<BoxCollection.Info> getAllCollections(final BoxAPIConnection api) {
return new Iterable<BoxCollection.Info>() {
public Iterator<BoxCollection.Info> iterator() {
URL url = GET_COLLECTIONS_URL_TEMPLATE.build(api.getBaseURL());
return new BoxCollectionIterator(api, url);
}
};
} | [
"Gets an iterable of all the collections for the given user.\n@param api the API connection to be used when retrieving the collections.\n@return an iterable containing info about all the collections."
] | [
"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.",
"Removes a value from the list.\n\n@param list the list\n@param value value to remove",
"Returns the vertex with given ID framed into given interface.",
"Sort MapRows based on a named attribute.\n\n@param rows map rows to sort\n@param attribute attribute to sort on\n@return list argument (allows method chaining)",
"Clones the cluster by constructing a new one with same name, partition\nlayout, and nodes.\n\n@param cluster\n@return clone of Cluster cluster.",
"Adjusts all links in the target folder that point to the source folder\nso that they are kept \"relative\" in the target folder where possible.\n\nIf a link is found from the target folder to the source folder,\nthen the target folder is checked if a target of the same name\nis found also \"relative\" inside the target Folder, and if so,\nthe link is changed to that \"relative\" target. This is mainly used to keep\nrelative links inside a copied folder structure intact.\n\nExample: Image we have folder /folderA/ that contains files\n/folderA/x1 and /folderA/y1. x1 has a link to y1 and y1 to x1.\nNow someone copies /folderA/ to /folderB/. So we end up with\n/folderB/x2 and /folderB/y2. Because of the link mechanism in OpenCms,\nx2 will have a link to y1 and y2 to x1. By using this method,\nthe links from x2 to y1 will be replaced by a link x2 to y2,\nand y2 to x1 with y2 to x2.\n\nLink replacement works for links in XML files as well as relation only\ntype links.\n\n@param sourceFolder the source folder\n@param targetFolder the target folder\n\n@throws CmsException if something goes wrong",
"Utility function to get the current value.",
"Get the time zone for a specific stock or index.\nFor stocks, the exchange suffix is extracted from the stock symbol to retrieve the time zone.\n\n@param symbol stock symbol in YahooFinance\n@return time zone of the exchange on which this stock is traded",
"Sets the distance from the origin to the near clipping plane for the\nwhole camera rig.\n\n@param near\nDistance to the near clipping plane."
] |
public void setSize(ButtonSize size) {
if (this.size != null) {
removeStyleName(this.size.getCssName());
}
this.size = size;
if (size != null) {
addStyleName(size.getCssName());
}
} | [
"Set the buttons size."
] | [
"Returns the intersection of this range with the given range, a range which includes those addresses in both this and the given rqnge.\n@param other\n@return",
"Convert this object to a json array.",
"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",
"Returns the key of the entity targeted by the represented association, retrieved from the given tuple.\n\n@param tuple the tuple from which to retrieve the referenced entity key\n@return the key of the entity targeted by the represented association",
"Send a failed operation response.\n\n@param context the request context\n@param errorCode the error code\n@param message the operation message\n@throws IOException for any error",
"create a HashMap form the json properties and add it to the shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"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",
"Check that the parameter array has exactly the right number of elements.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param actualLength\nThe actual array length\n@param expectedLength\nThe expected array length",
"Emit an enum event with parameters and force all listener to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(Enum, Object...)"
] |
@JmxOperation(description = "Forcefully invoke the log cleaning")
public void cleanLogs() {
synchronized(lock) {
try {
for(Environment environment: environments.values()) {
environment.cleanLog();
}
} catch(DatabaseException e) {
throw new VoldemortException(e);
}
}
} | [
"Forceful cleanup the logs"
] | [
"Special-purpose version for hashing a single int value. Value is treated as little-endian",
"Generate JSON format as result of the scan.\n\n@since 1.2",
"Validations specific to PUT",
"Function to perform forward activation",
"Process normal calendar working and non-working days.\n\n@param calendar parent calendar",
"Return the lines of a CharSequence as a List of String.\n\n@param self a CharSequence object\n@return a list of lines\n@throws java.io.IOException if an error occurs\n@since 1.8.2",
"select a use case.",
"capture center eye",
"Returns the name from the inverse side if the given property de-notes a one-to-one association."
] |
@Nullable public GeoTarget getCanonAncestor(GeoTarget.Type type) {
for (GeoTarget target = this; target != null; target = target.canonParent()) {
if (target.key.type == type) {
return target;
}
}
return null;
} | [
"Finds an ancestor of a specific type, if possible.\n\n<p>Example: (New York city target, {@link Type#COUNTRY}) returns (US country target)"
] | [
"Adds the parent package to the java.protocol.handler.pkgs system property.",
"Adds a String timestamp representing uninstall flag to the DB.",
"Return the serialized form of this Identity.\n\n@return The serialized representation\n@see #fromByteArray\n@deprecated",
"Set the \"everyWorkingDay\" flag.\n@param isEveryWorkingDay flag, indicating if the event should take place every working day.",
"Geta the specified metadata template by its ID.\n@param api the API connection to be used.\n@param templateID the ID of the template to get.\n@return the metadata template object.",
"Return true if c has a @hidden tag associated with it",
"Attempts to add classification to a file. If classification already exists then do update.\n\n@param classificationType the metadata classification type.\n@return the metadata classification type on the file.",
"Use this API to fetch aaauser_auditsyslogpolicy_binding resources of given name .",
"Get a random sample of k out of n elements.\n\nSee Algorithm S, D. E. Knuth, The Art of Computer Programming, Vol. 2, p.142."
] |
public Result cmd(String cliCommand) {
try {
// The intent here is to return a Response when this is doable.
if (ctx.isWorkflowMode() || ctx.isBatchMode()) {
ctx.handle(cliCommand);
return new Result(cliCommand, ctx.getExitCode());
}
handler.parse(ctx.getCurrentNodePath(), cliCommand, ctx);
if (handler.getFormat() == OperationFormat.INSTANCE) {
ModelNode request = ctx.buildRequest(cliCommand);
ModelNode response = ctx.execute(request, cliCommand);
return new Result(cliCommand, request, response);
} else {
ctx.handle(cliCommand);
return new Result(cliCommand, ctx.getExitCode());
}
} catch (CommandLineException cfe) {
throw new IllegalArgumentException("Error handling command: "
+ cliCommand, cfe);
} catch (IOException ioe) {
throw new IllegalStateException("Unable to send command "
+ cliCommand + " to server.", ioe);
}
} | [
"Execute a CLI command. This can be any command that you might execute on\nthe CLI command line, including both server-side operations and local\ncommands such as 'cd' or 'cn'.\n\n@param cliCommand A CLI command.\n@return A result object that provides all information about the execution\nof the command."
] | [
"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.",
"This method is called to format a rate.\n\n@param value rate value\n@return formatted rate",
"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.",
"Whether the specified JavaBeans property exists on the given type or not.\n\n@param clazz the type of interest\n@param property the JavaBeans property name\n@param elementType the element type to check, must be either {@link ElementType#FIELD} or\n{@link ElementType#METHOD}.\n@return {@code true} if the specified property exists, {@code false} otherwise",
"Finish initialization of state object.\n\n@param geoService geo service\n@param converterService converter service\n@throws GeomajasException oops",
"Renders the given FreeMarker template to given directory, using given variables.",
"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",
"Returns a compact representation of all of the subtasks of a task.\n\n@param task The task to get the subtasks of.\n@return Request object",
"Generates the InputValue for the form input by inspecting the current\nvalue of the corresponding WebElement on the DOM.\n\n@return The current InputValue for the element on the DOM."
] |
public static Message create( String text, Object data, ProcessingUnit owner )
{
return new SimpleMessage( text, data, owner);
} | [
"Creates a new Message from the specified text."
] | [
"This method lists any notes attached to resources.\n\n@param file MPX file",
"Use this API to fetch cachepolicylabel_binding resource of given name .",
"Use this API to fetch authenticationvserver_auditnslogpolicy_binding resources of given name .",
"Record the checkout wait time in us\n\n@param dest Destination of the socket to checkout. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param checkoutTimeUs The number of us to wait before getting a socket",
"Find a statement group by its property id, without checking for\nequality with the site IRI. More efficient implementation than\nthe default one.",
"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",
"Create the image elements for the banners tha goes into the\ntitle and header bands depending on the case",
"Returns an attribute's map value from this JAR's manifest's main section.\nThe attributes string value will be split on whitespace into map entries, and each entry will be split on '=' to get the key-value pair.\nThe returned map may be safely modified.\n\n@param name the attribute's name",
"Reads and sets the next feed in the stream."
] |
private void writeAssignment(ResourceAssignment mpxj)
{
ResourceAssignmentType xml = m_factory.createResourceAssignmentType();
m_project.getResourceAssignment().add(xml);
Task task = mpxj.getTask();
Task parentTask = task.getParentTask();
Integer parentTaskUniqueID = parentTask == null ? null : parentTask.getUniqueID();
xml.setActivityObjectId(mpxj.getTaskUniqueID());
xml.setActualCost(getDouble(mpxj.getActualCost()));
xml.setActualFinishDate(mpxj.getActualFinish());
xml.setActualOvertimeUnits(getDuration(mpxj.getActualOvertimeWork()));
xml.setActualRegularUnits(getDuration(mpxj.getActualWork()));
xml.setActualStartDate(mpxj.getActualStart());
xml.setActualUnits(getDuration(mpxj.getActualWork()));
xml.setAtCompletionUnits(getDuration(mpxj.getRemainingWork()));
xml.setPlannedCost(getDouble(mpxj.getActualCost()));
xml.setFinishDate(mpxj.getFinish());
xml.setGUID(DatatypeConverter.printUUID(mpxj.getGUID()));
xml.setObjectId(mpxj.getUniqueID());
xml.setPlannedDuration(getDuration(mpxj.getWork()));
xml.setPlannedFinishDate(mpxj.getFinish());
xml.setPlannedStartDate(mpxj.getStart());
xml.setPlannedUnits(getDuration(mpxj.getWork()));
xml.setPlannedUnitsPerTime(getPercentage(mpxj.getUnits()));
xml.setProjectObjectId(PROJECT_OBJECT_ID);
xml.setRateSource("Resource");
xml.setRemainingCost(getDouble(mpxj.getActualCost()));
xml.setRemainingDuration(getDuration(mpxj.getRemainingWork()));
xml.setRemainingFinishDate(mpxj.getFinish());
xml.setRemainingStartDate(mpxj.getStart());
xml.setRemainingUnits(getDuration(mpxj.getRemainingWork()));
xml.setRemainingUnitsPerTime(getPercentage(mpxj.getUnits()));
xml.setResourceObjectId(mpxj.getResourceUniqueID());
xml.setStartDate(mpxj.getStart());
xml.setWBSObjectId(parentTaskUniqueID);
xml.getUDF().addAll(writeUDFType(FieldTypeClass.ASSIGNMENT, mpxj));
} | [
"Writes a resource assignment to a PM XML file.\n\n@param mpxj MPXJ ResourceAssignment instance"
] | [
"Read file content to string.\n\n@param filePath\nthe file path\n@return the string\n@throws IOException\nSignals that an I/O exception has occurred.",
"Searches for pairs of parentheses and processes blocks inside of them. Embedded parentheses are handled\nwith no problem. On output only a single token should be in tokens.\n@param tokens List of parsed tokens\n@param sequence Sequence of operators",
"Begin a \"track;\" that is, begin logging at one level deeper.\nChannels other than the FORCE channel are ignored.\n@param args The title of the track to begin, with an optional FORCE flag.",
"Get ComponentsMultiThread of current instance\n@return componentsMultiThread",
"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",
"helper method to activate or deactivate a specific flag\n\n@param bits\n@param on",
"Starts the animation with the given index.\n@param animIndex 0-based index of {@link GVRAnimator} to start;\n@see GVRAvatar#stop()\n@see #start(String)",
"Retrieve the configuration of the named template.\n\n@param name the template name;",
"Reads filter parameters.\n\n@param params the params\n@return the criterias"
] |
private void processActivityCodes(Storepoint storepoint)
{
for (Code code : storepoint.getActivityCodes().getCode())
{
int sequence = 0;
for (Value value : code.getValue())
{
UUID uuid = getUUID(value.getUuid(), value.getName());
m_activityCodeValues.put(uuid, value.getName());
m_activityCodeSequence.put(uuid, Integer.valueOf(++sequence));
}
}
} | [
"Map from an activity code value UUID to the actual value itself, and its\nsequence number.\n\n@param storepoint storepoint containing current project data"
] | [
"List all apps for the current user's account.\n@param range The range of apps provided by {@link Range#getNextRange()}\n@return a list of apps",
"Retrieve any task field value lists defined in the MPP file.",
"XER files can contain multiple projects when there are cross-project dependencies.\nAs the UniversalProjectReader is designed just to read a single project, we need\nto select one project from those available in the XER file.\nThe original project selected for export by the user will have its \"export flag\"\nset to true. We'll return the first project we find where the export flag is\nset to true, otherwise we'll just return the first project we find in the file.\n\n@param stream schedule data\n@return ProjectFile instance",
"Returns the y-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the y coordinate",
"Method to service public recording APIs\n\n@param op Operation being tracked\n@param timeNS Duration of operation\n@param numEmptyResponses Number of empty responses being sent back,\ni.e.: requested keys for which there were no values (GET and GET_ALL only)\n@param valueSize Size in bytes of the value\n@param keySize Size in bytes of the key\n@param getAllAggregateRequests Total of amount of keys requested in the operation (GET_ALL only)",
"Does the server support log downloads?\n\n@param cliGuiCtx The context.\n@return <code>true</code> if the server supports log downloads,\n<code>false</code> otherwise.",
"if you have a default, it's automatically optional",
"Determines if we need to calculate more dates.\nIf we do not have a finish date, this method falls back on using the\noccurrences attribute. If we have a finish date, we'll use that instead.\nWe're assuming that the recurring data has one or other of those values.\n\n@param calendar current date\n@param dates dates generated so far\n@return true if we should calculate another date",
"This should be called from a subclass constructor, if offset or length\nare unknown at a time when SubIIMInputStream constructor is called. This\nmethod shouldn't be called more than once.\n\n@param offset\nbyte offset\n@param length\nbyte length\n@throws IOException\nif underlying stream can't be read"
] |
public static base_responses link(nitro_service client, sslcertkey resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslcertkey linkresources[] = new sslcertkey[resources.length];
for (int i=0;i<resources.length;i++){
linkresources[i] = new sslcertkey();
linkresources[i].certkey = resources[i].certkey;
linkresources[i].linkcertkeyname = resources[i].linkcertkeyname;
}
result = perform_operation_bulk_request(client, linkresources,"link");
}
return result;
} | [
"Use this API to link sslcertkey resources."
] | [
"Use this API to update transformpolicy.",
"gets the count of addresses that this address division grouping may represent\n\nIf this address division grouping is not a subnet block of multiple addresses or has no range of values, then there is only one such address.\n\n@return",
"Parse duration represented in thousandths of minutes.\n\n@param properties project properties\n@param value duration value\n@param targetTimeUnit required output time units\n@return Duration instance",
"Adds a step to the steps.\n\n@param name {@link String} name of the step\n@param robot {@link String} name of the robot used by the step.\n@param options {@link Map} extra options required for the step.",
"Read leaf tasks attached to the WBS.\n\n@param id initial WBS ID",
"Returns the z-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the z coordinate",
"Called from the native side\n@param eye",
"Add some of the release build properties to a map.",
"Returns the value of the sum of discounted cash flows of the bond where\nthe discounting is done with the given yield curve.\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 rate The yield which is used for discounted the coupon payments.\n@param model The model under which the product is valued.\n@return The value of the bond for the given yield."
] |
protected String escapeApostrophes(String text) {
String resultString;
if (text.contains("'")) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("concat('");
stringBuilder.append(text.replace("'", "',\"'\",'"));
stringBuilder.append("')");
resultString = stringBuilder.toString();
} else {
resultString = "'" + text + "'";
}
return resultString;
} | [
"Returns a string to resolve apostrophe issue in xpath\n\n@param text\n@return the apostrophe resolved xpath value string"
] | [
"Determines the accessor method name based on a field name.\n\n@param fieldName\na field name\n@return the resulting method name",
"One of the two main methods in this class. Creates a RendererViewHolder instance with a\nRenderer inside ready to be used. The RendererBuilder to create a RendererViewHolder using the\ninformation given as parameter.\n\n@param viewGroup used to create the ViewHolder.\n@param viewType associated to the renderer.\n@return ViewHolder extension with the Renderer it has to use inside.",
"Print a date time value.\n\n@param value date time value\n@return string representation",
"Appends the given string encoding special HTML characters.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nInput String starting position.\n@param end\nInput String end position.",
"Set the named arguments.\n\n@param vars\nthe new named arguments",
"Parse a string representation of an Integer value.\n\n@param value string representation\n@return Integer value",
"This method removes all RTF formatting from a given piece of text.\n\n@param text Text from which the RTF formatting is to be removed.\n@return Plain text",
"Attach a component to this scene object.\n\nEach scene object has a list of components that may\nbe attached to it. Only one component of a particular type\ncan be attached. Components are retrieved based on their type.\n\n@return true if component is attached, false if a component of that class is already attached.\n@param component component to attach.\n@see GVRSceneObject#detachComponent(long)\n@see GVRSceneObject#getComponent(long)",
"Constructs a triangule Face from vertices v0, v1, and v2.\n\n@param v0\nfirst vertex\n@param v1\nsecond vertex\n@param v2\nthird vertex"
] |
@SuppressWarnings("WeakerAccess")
public synchronized void stop() {
if (isRunning()) {
MetadataFinder.getInstance().removeTrackMetadataListener(metadataListener);
running.set(false);
pendingUpdates.clear();
queueHandler.interrupt();
queueHandler = null;
// Report the loss of our waveforms, on the proper thread, outside our lock
final Set<DeckReference> dyingPreviewCache = new HashSet<DeckReference>(previewHotCache.keySet());
previewHotCache.clear();
final Set<DeckReference> dyingDetailCache = new HashSet<DeckReference>(detailHotCache.keySet());
detailHotCache.clear();
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
for (DeckReference deck : dyingPreviewCache) { // Report the loss of our previews.
if (deck.hotCue == 0) {
deliverWaveformPreviewUpdate(deck.player, null);
}
}
for (DeckReference deck : dyingDetailCache) { // Report the loss of our details.
if (deck.hotCue == 0) {
deliverWaveformDetailUpdate(deck.player, null);
}
}
}
});
deliverLifecycleAnnouncement(logger, false);
}
} | [
"Stop finding waveforms for all active players."
] | [
"Add the final assignment of the property to the partial value object's source code.",
"Change the currentState to the nextState if possible. The next state should already be\npresent in the graph.\n\n@param nextState the next state.\n@return true if currentState is successfully changed.",
"Use this API to count nstrafficdomain_bridgegroup_binding resources configued on NetScaler.",
"Get a bean from the application context. Returns null if the bean does not exist.\n@param name name of bean\n@param requiredType type of bean\n@return the bean or null",
"Multiply scalar value to a complex number.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the multiply of specified complex number with the scalar value.",
"This is a service method that takes care of putting al the target values in a single array.\n@return",
"Checks the given class descriptor for correct object cache setting.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated",
"Returns with a view of all scopes known by this manager.",
"Recursively builds the VFS entry bean for the quick filtering function in the folder tab.<p<\n\n@param resource the resource\n@param childMap map from parent to child resources\n@param filterMatches the resources matching the filter\n@param parentPaths root paths of resources which are not leaves\n@param isRoot true if this the root node\n\n@return the VFS entry bean for the client\n\n@throws CmsException if something goes wrong"
] |
public static Cluster getCluster(ZkClient zkClient) {
Cluster cluster = new Cluster();
List<String> nodes = getChildrenParentMayNotExist(zkClient, BrokerIdsPath);
for (String node : nodes) {
final String brokerInfoString = readData(zkClient, BrokerIdsPath + "/" + node);
cluster.add(Broker.createBroker(Integer.valueOf(node), brokerInfoString));
}
return cluster;
} | [
"read all brokers in the zookeeper\n\n@param zkClient zookeeper client\n@return all brokers"
] | [
"Convert raw data into Java types.\n\n@param type data type\n@param data raw data\n@return list of Java object",
"Use this API to clear configuration on netscaler.\n@param force clear confirmation without prompting.\n@param level clear config according to the level. eg: basic, extended, full\n@return status of the operation performed.\n@throws Exception Nitro exception is thrown.",
"Copy new grayscale data to the GPU texture. This one is also safe even\nin a non-GL thread. An updateGPU request on a non-GL thread will\nbe forwarded to the GL thread and be executed before main rendering happens.\n\nBe aware that updating a texture will affect any and all\n{@linkplain GVRMaterial materials} and/or post effects that use the texture!\n@param width width of grayscale image\n@param height height of grayscale image\n@param grayscaleData A byte array containing grayscale data\n\n@since 1.6.3",
"Delivers the correct JSON Object for the target\n\n@param target\n@throws org.json.JSONException",
"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",
"A simple helper method that creates a pool of connections to Redis using\nthe supplied configurations.\n\n@param jesqueConfig the config used to create the pooled Jedis connections\n@param poolConfig the config used to create the pool\n@return a configured Pool of Jedis connections",
"Log original response\n\n@param httpServletResponse\n@param history\n@throws URIException",
"Returns the real value object.",
"This method is provided to allow an absolute period of time\nrepresented by start and end dates into a duration in working\ndays based on this calendar instance. This method takes account\nof any exceptions defined for this calendar.\n\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object"
] |
public T build() throws IllegalAccessException, IOException, InvocationTargetException {
generatedConfigutation = new CubeContainer();
findContainerName();
// if needed, prepare prepare resources required to build a docker image
prepareImageBuild();
// instantiate container object
instantiateContainerObject();
// enrich container object (without cube instance)
enrichContainerObjectBeforeCube();
// extract configuration from container object class
extractConfigurationFromContainerObject();
// merge received configuration with extracted configuration
mergeContainerObjectConfiguration();
// create/start/register associated cube
initializeCube();
// enrich container object (with cube instance)
enrichContainerObjectWithCube();
// return created container object
return containerObjectInstance;
} | [
"Triggers the building process, builds, creates and starts the docker container associated with the requested\ncontainer object, creates the container object and returns it\n\n@return the created container object\n\n@throws IllegalAccessException\nif there is an error accessing the container object fields\n@throws IOException\nif there is an I/O error while preparing the docker build\n@throws InvocationTargetException\nif there is an error while calling the DockerFile archive creation"
] | [
"Throws one RendererException if the viewType, layoutInflater or parent are null.",
"Finds to a given point p the point on the spline with minimum distance.\n@param p Point where the nearest distance is searched for\n@param nPointsPerSegment Number of interpolation points between two support points\n@return Point spline which has the minimum distance to p",
"Pre API 11, this does an alpha animation.\n\n@param progress",
"Get a property as a int or null.\n\n@param key the property name",
"Suite prologue.",
"Given the comma separated list of properties as a string, splits it\nmultiple strings\n\n@param paramValue Concatenated string\n@param type Type of parameter ( to throw exception )\n@return List of string properties",
"Retrieves all file version retentions.\n@param api the API connection to be used by the resource.\n@param fields the fields to retrieve.\n@return an iterable contains information about all file version retentions.",
"Initialize the random generator with a seed.",
"Adds JAXB WSDL extensions to allow work with custom\nWSDL elements such as \\\"partner-link\\\"\n\n@param bus CXF bus"
] |
public static void writeDocumentToFile(Document document,
String filePathname, String method, int indent)
throws TransformerException, IOException {
Transformer transformer = TransformerFactory.newInstance()
.newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
transformer.setOutputProperty(OutputKeys.METHOD, method);
transformer.transform(new DOMSource(document), new StreamResult(
new FileOutputStream(filePathname)));
} | [
"Write the document object to a file.\n\n@param document the document object.\n@param filePathname the path name of the file to be written to.\n@param method the output method: for instance html, xml, text\n@param indent amount of indentation. -1 to use the default.\n@throws TransformerException if an exception occurs.\n@throws IOException if an IO exception occurs."
] | [
"Gets the visibility modifiers for the property as defined by the getter and setter methods.\n\n@return the visibility modifer of the getter, the setter, or both depending on which exist",
"Method to build Mail Channel Adapter for IMAP.\n@param urlName Mail source URL.\n@return Mail Channel for IMAP",
"Performs a get all operation with the specified composite request object\n\n@param requestWrapper Composite request object containing a reference to\nthe Iterable keys\n\n@return Map of the keys to the corresponding versioned values",
"Write the classifications of the Sequence classifier out to a writer in a\nformat determined by the DocumentReaderAndWriter used.\n\n@param doc Documents to write out\n@param printWriter Writer to use for output\n@throws IOException If an IO problem",
"Checks for duplicate elements. A is sorted\n@param A Matrix to be tested.\n@return true if duplicates or false if false duplicates",
"Returns the specified range of elements in the sorted set.\nThe elements are considered to be ordered from the highest to the lowest score.\nDescending lexicographical order is used for elements with equal score.\nBoth start and stop are zero-based inclusive indexes. They can also be negative numbers indicating offsets from\nthe end of the sorted set, with -1 being the last element of the sorted set.\n@param start\n@param end\n@return the range of elements",
"Copies the non-zero structure of orig into \"this\"\n@param orig Matrix who's structure is to be copied",
"Build list of style filters from style definitions.\n\n@param styleDefinitions\nlist of style definitions\n@return list of style filters\n@throws GeomajasException",
"Extracts a house holder vector from the column of A and stores it in u\n@param A Complex matrix with householder vectors stored in the lower left triangle\n@param row0 first row in A (implicitly assumed to be r + i0)\n@param row1 last row + 1 in A\n@param col Column in A\n@param u Output array storage\n@param offsetU first index in U"
] |
private void writeCalendars() throws JAXBException
{
//
// Create the new Planner calendar list
//
Calendars calendars = m_factory.createCalendars();
m_plannerProject.setCalendars(calendars);
writeDayTypes(calendars);
List<net.sf.mpxj.planner.schema.Calendar> calendar = calendars.getCalendar();
//
// Process each calendar in turn
//
for (ProjectCalendar mpxjCalendar : m_projectFile.getCalendars())
{
net.sf.mpxj.planner.schema.Calendar plannerCalendar = m_factory.createCalendar();
calendar.add(plannerCalendar);
writeCalendar(mpxjCalendar, plannerCalendar);
}
} | [
"This method writes calendar data to a Planner file.\n\n@throws JAXBException on xml creation errors"
] | [
"remove files from directory. All-or-nothing operation - if any of the files fails to be removed, all deleted files are restored.\n\nThe operation is performed in two steps - first all the files are moved to a backup folder, and afterwards backup folder is removed.\nIf an error occurs in the first step of the operation, all files are restored and the operation ends with status {@code false}.\nIf an error occurs in the second step, the operation ends with status {@code false}, but the files are not rolled back.\n\n@throws IOException if an error occurred",
"Lift a Java Func2 to a Scala Function2\n\n@param f the function to lift\n\n@returns the Scala function",
"Get history for a specific database ID\n\n@param id ID of history entry\n@return History entry",
"Compares two avro strings which contains multiple store configs\n\n@param configAvro1\n@param configAvro2\n@return true if two config avro strings have same content",
"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",
"Get PhoneNumber object\n\n@return PhonenUmber | null on error",
"Retrieve the dir pointed to by 'latest' symbolic-link or the current\nversion dir\n\n@return Current version directory, else null",
"Use this API to fetch all the appfwsignatures resources that are configured on netscaler.",
"Create a new server group\n\n@param groupName name of server group\n@return Created ServerGroup"
] |
public InsertIntoTable addRowsFromDelimited(File file, String delimiter, Object nullValue) {
builder.addRowsFromDelimited(file, delimiter, nullValue);
return this;
} | [
"Adds all rows from the TSV file specified, using the provided delimiter and null value.\n\n@param file The file to read the data from.\n@param delimiter A column delimiter.\n@param nullValue Value to be treated as null in the source data.\n@return {@code this}"
] | [
"Invalidate the item in layout\n@param dataIndex data index",
"Reorder the objects in the table to resolve referential integrity dependencies.",
"Returns the command to run by the shell to normally run the checkin script.\n@return the command to run by the shell to normally run the checkin script.",
"Handle the given response, return the deserialized object when the response is successful.\n\n@param <T> Type\n@param response Response\n@param returnType Return type\n@throws ApiException If the response has a unsuccessful status code or\nfail to deserialize the response body\n@return Type",
"Compares two annotated parameters and returns true if they are equal",
"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",
"Returns the list of colliders attached to scene objects that are\nvisible from the viewpoint of the camera.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is picking against particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n\nThe hit location returned is the world position of the scene object center.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@return A list of {@link org.gearvrf.GVRPicker.GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link org.gearvrf.GVRPicker.GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6",
"Generates a schedule based on some meta data. The schedule generation\nconsiders short periods. Date rolling is ignored.\n\n@param referenceDate The date which is used in the schedule to internally convert dates to doubles, i.e., the date where t=0.\n@param startDate The start date of the first period.\n@param frequency The frequency.\n@param maturity The end date of the last period.\n@param daycountConvention The daycount convention.\n@param shortPeriodConvention If short period exists, have it first or last.\n@return The corresponding schedule\n@deprecated Will be removed in version 2.3",
"Adds the position range.\n\n@param start the start\n@param end the end"
] |
public static final String printDate(Date value)
{
return (value == null ? null : DATE_FORMAT.get().format(value));
} | [
"Print a date.\n\n@param value Date instance\n@return string representation of a date"
] | [
"Use this API to fetch all the appfwwsdl resources that are configured on netscaler.",
"This is a convenience method to add a default derived\ncalendar to the project.\n\n@return new ProjectCalendar instance",
"Add sub-deployment units to the container\n\n@param bdaMapping",
"Get the bytes which represent the payload of this field, without the leading type tag and length header, as\na newly-allocated byte array.\n\n@return a new byte array containing a copy of the bytes this field contains",
"Downloads a part of this file's contents, starting at rangeStart and stopping at rangeEnd, while reporting the\nprogress to a ProgressListener.\n\n@param output the stream to where the file will be written.\n@param rangeStart the byte offset at which to start the download.\n@param rangeEnd the byte offset at which to stop the download.\n@param listener a listener for monitoring the download's progress.",
"read all brokers in the zookeeper\n\n@param zkClient zookeeper client\n@return all brokers",
"Use this API to fetch cacheselector resource of given name .",
"Adds a type to collection with inheriting base type properties.\n\n@param type the type definition to add\n\n@return true if the type definition was added",
"Callback when each frame in the indicator animation should be drawn."
] |
public static base_responses enable(nitro_service client, String trapname[]) throws Exception {
base_responses result = null;
if (trapname != null && trapname.length > 0) {
snmpalarm enableresources[] = new snmpalarm[trapname.length];
for (int i=0;i<trapname.length;i++){
enableresources[i] = new snmpalarm();
enableresources[i].trapname = trapname[i];
}
result = perform_operation_bulk_request(client, enableresources,"enable");
}
return result;
} | [
"Use this API to enable snmpalarm resources of given names."
] | [
"Helper method to create a string template source for a given formatter and content.\n\n@param formatter the formatter\n@param contentSupplier the content supplier\n\n@return the string template provider",
"Send post request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws IOException the io exception",
"Get the first controller of a specified type\n@param type controller type to search for\n@return controller found or null if no controllers of the given type",
"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",
"Inject external stylesheets.",
"Handle interval change.\n@param event the change event.",
"Create an `AppDescriptor` with appName and entry class specified.\n\nIf `appName` is `null` or blank, it will try the following\napproach to get app name:\n\n1. check the {@link Version#getArtifactId() artifact id} and use it unless\n2. if artifact id is null or empty, then infer app name using {@link AppNameInferer}\n\n@param appName\nthe app name\n@param entryClass\nthe entry class\n@return\nan `AppDescriptor` instance",
"Retrieve the default mapping between MPXJ task fields and Primavera task field names.\n\n@return mapping",
"Replace default values will null, allowing them to be ignored.\n\n@param value value to test\n@return filtered value"
] |
public static base_responses add(nitro_service client, clusterinstance resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
clusterinstance addresources[] = new clusterinstance[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new clusterinstance();
addresources[i].clid = resources[i].clid;
addresources[i].deadinterval = resources[i].deadinterval;
addresources[i].hellointerval = resources[i].hellointerval;
addresources[i].preemption = resources[i].preemption;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"Use this API to add clusterinstance resources."
] | [
"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",
"build the Join-Information if a super reference exists\n\n@param left\n@param cld\n@param name",
"Extract resource assignments for a task.\n\n@param task parent task\n@param assignments list of Synchro resource assignment data",
"Get a patch entry for either a layer or add-on.\n\n@param name the layer name\n@param addOn whether the target is an add-on\n@return the patch entry, {@code null} if it there is no such layer",
"Parse rate.\n\n@param value rate value\n@return Rate instance",
"Get the object responsible for printing to the correct output format.\n\n@param specJson the request json from the client",
"Get the relative path.\n\n@return the relative path",
"Reads all text up to next XML tag and returns it as a String.\n\n@return the String of the text read, which may be empty.",
"Clear the connection that was previously saved.\n\n@return True if the connection argument had been saved."
] |
public static int wavelengthToRGB(float wavelength) {
float gamma = 0.80f;
float r, g, b, factor;
int w = (int)wavelength;
if (w < 380) {
r = 0.0f;
g = 0.0f;
b = 0.0f;
} else if (w < 440) {
r = -(wavelength - 440) / (440 - 380);
g = 0.0f;
b = 1.0f;
} else if (w < 490) {
r = 0.0f;
g = (wavelength - 440) / (490 - 440);
b = 1.0f;
} else if (w < 510) {
r = 0.0f;
g = 1.0f;
b = -(wavelength - 510) / (510 - 490);
} else if (w < 580) {
r = (wavelength - 510) / (580 - 510);
g = 1.0f;
b = 0.0f;
} else if (w < 645) {
r = 1.0f;
g = -(wavelength - 645) / (645 - 580);
b = 0.0f;
} else if (w <= 780) {
r = 1.0f;
g = 0.0f;
b = 0.0f;
} else {
r = 0.0f;
g = 0.0f;
b = 0.0f;
}
// Let the intensity fall off near the vision limits
if (380 <= w && w <= 419)
factor = 0.3f + 0.7f*(wavelength - 380) / (420 - 380);
else if (420 <= w && w <= 700)
factor = 1.0f;
else if (701 <= w && w <= 780)
factor = 0.3f + 0.7f*(780 - wavelength) / (780 - 700);
else
factor = 0.0f;
int ir = adjust(r, factor, gamma);
int ig = adjust(g, factor, gamma);
int ib = adjust(b, factor, gamma);
return 0xff000000 | (ir << 16) | (ig << 8) | ib;
} | [
"Convert a wavelength to an RGB value.\n@param wavelength wavelength in nanometres\n@return the RGB value"
] | [
"Before cluster management operations, i.e. remember and disable quota\nenforcement settings",
"Read a text file resource into a single string\n\n@param context\nA non-null Android Context\n@param resourceId\nAn Android resource id\n@return The contents, or null on error.",
"Check, if the resource should be exported with minimal meta-data.\nThis holds for resources that are not part of the export, but must be\nexported as super-folders.\n\n@param path export-site relative path of the resource to check.\n\n@return flag, indicating if the resource should be exported with minimal meta data.",
"Opens a file from the volume. The filePath is relative to the\ndefaultPath.\n\n@param filePath\nFile path of the resource to open.\n\n@throws IOException",
"Use this API to fetch snmpalarm resource of given name .",
"Checks if the categoryfolder setting needs to be updated.\n\n@return true if the categoryfolder setting needs to be updated",
"Reconstructs a number that is represented by more than one byte in a network packet in little-endian order, for\nthe very few protocol values that are sent in this quirky way.\n\n@param buffer the byte array containing the packet data\n@param start the index of the first byte containing a numeric value\n@param length the number of bytes making up the value\n@return the reconstructed number",
"Creates a ProjectCalendar instance from the Asta data.\n\n@param calendarRow basic calendar data\n@param workPatternMap work pattern map\n@param workPatternAssignmentMap work pattern assignment map\n@param exceptionAssignmentMap exception assignment map\n@param timeEntryMap time entry map\n@param exceptionTypeMap exception type map",
"Attach a component to this scene object.\n\nEach scene object has a list of components that may\nbe attached to it. Only one component of a particular type\ncan be attached. Components are retrieved based on their type.\n\n@return true if component is attached, false if a component of that class is already attached.\n@param component component to attach.\n@see GVRSceneObject#detachComponent(long)\n@see GVRSceneObject#getComponent(long)"
] |
@Deprecated
public static <T> ServiceBuilder<T> addServerExecutorDependency(ServiceBuilder<T> builder, Injector<ExecutorService> injector) {
return builder.addDependency(ServerService.MANAGEMENT_EXECUTOR, ExecutorService.class, injector);
} | [
"Creates dependency on management executor.\n\n@param builder the builder\n@param injector the injector\n@param <T> the parameter type\n@return service builder instance\n@deprecated Use {@link #requireServerExecutor(ServiceBuilder)} instead. This method will be removed in the future."
] | [
"Dumps all properties of a material to stdout.\n\n@param material the material",
"Writes a buffered some-value restriction.\n\n@param propertyUri\nURI of the property to which the restriction applies\n@param rangeUri\nURI of the class or datatype to which the restriction applies\n@param bnode\nblank node representing the restriction\n@throws RDFHandlerException\nif there was a problem writing the RDF triples",
"Returns a row matrix which contains all the elements in A which are flagged as true in 'marked'\n\n@param A Input matrix\n@param marked Input matrix marking elements in A\n@param output Storage for output row vector. Can be null. Will be reshaped.\n@return Row vector with marked elements",
"Use this API to add inat resources.",
"Returns a representation of the date from the value attributes as ISO\n8601 encoding.\n\n@param value\n@return ISO 8601 value (String)",
"Apply the necessary rotation to the transform so that it is in front of\nthe camera.\n\n@param transform The transform to modify.",
"Copy the contents of the given byte array to the given OutputStream.\nLeaves the stream open when done.\n@param in the byte array to copy from\n@param out the OutputStream to copy to\n@throws IOException in case of I/O errors",
"Create a text message that will be stored in the database. Must be called inside a transaction.",
"Unzip a file or a folder\n@param zipFile\n@param unzippedFolder optional, if null the file/folder will be extracted in the same folder as zipFile\n@return"
] |
private ProjectFile handleZipFile(InputStream stream) throws Exception
{
File dir = null;
try
{
dir = InputStreamHelper.writeZipStreamToTempDir(stream);
ProjectFile result = handleDirectory(dir);
if (result != null)
{
return result;
}
}
finally
{
FileHelper.deleteQuietly(dir);
}
return null;
} | [
"We have identified that we have a zip file. Extract the contents into\na temporary directory and process.\n\n@param stream schedule data\n@return ProjectFile instance"
] | [
"Set the channel. This will return whether the channel could be set successfully or not.\n\n@param newChannel the channel\n@return whether the operation succeeded or not",
"This method performs database modification at the very and of transaction.",
"Cuts the string at the end if it's longer than maxLength and appends the given end string to it. The length of\nthe resulting string is always less or equal to the given maxLength. It's valid to pass a null text; in this\ncase null is returned.",
"Adds a redirect URL to the specified profile ID\n\n@param model\n@param profileId\n@param srcUrl\n@param destUrl\n@param hostHeader\n@return\n@throws Exception",
"Generated the report.",
"Release all memory addresses taken by this allocator.\nBe careful in using this method, since all of the memory addresses become invalid.",
"Writes a WBS entity to the PM XML file.\n\n@param mpxj MPXJ Task entity",
"Use this API to unset the properties of csparameter resource.\nProperties that need to be unset are specified in args array.",
"Validates a String to be a valid name to be used in MongoDB for a field name.\n\n@param fieldName"
] |
@Deprecated
private BufferedImage getOriginalImage(String suffix) throws IOException, FlickrException {
StringBuffer buffer = getOriginalBaseImageUrl();
buffer.append(suffix);
return _getImage(buffer.toString());
} | [
"Get the original-image using the specified URL suffix.\n\n@deprecated\n@see PhotosInterface#getImage(Photo, int)\n@param suffix\nThe URL suffix, including the .extension\n@return The BufferedImage object\n@throws IOException\n@throws FlickrException"
] | [
"You should call this method from your activity onRequestPermissionsResult.\n\n@param requestCode The request code passed in requestPermissions(android.app.Activity, String[], int)\n@param permissions The requested permissions. Never null.\n@param grantResults The grant results for the corresponding permissions which is either\nPERMISSION_GRANTED or PERMISSION_DENIED. Never null.",
"Get the collection of configured blogs for the calling user.\n\n@return The Collection of configured blogs",
"Get info about the shards in the database.\n\n@return List of shards\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-database-_shards-\"\ntarget=\"_blank\">_shards</a>",
"We are adding a redeploy operation step for each specified deployment runtime name.\n\n@param context\n@param deploymentsRootAddress\n@param deploymentNames\n@throws OperationFailedException",
"Checks to see if the submatrix has its boundaries along inner blocks.\n\n@param blockLength Size of an inner block.\n@param A Submatrix.\n@return If it is block aligned or not.",
"Gets the gradient 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@param gradient The output gradient, a vector of partial derivatives.",
"Returns a SimpleConfiguration clientConfig with properties set from this configuration\n\n@return SimpleConfiguration",
"Returns true if the given dump file type contains page revisions and\nfalse if it does not. Dumps that do not contain pages are for auxiliary\ninformation such as linked sites.\n\n@param dumpContentType\nthe type of dump\n@return true if the dumpfile contains revisions\n@throws IllegalArgumentException\nif the given dump file type is not known",
"Loads the script from a text string.\n@param scriptText text string containing script to execute.\n@param language language (\"js\" or \"lua\")"
] |
private static int getContainerPort(Service service, Annotation... qualifiers) {
for (Annotation q : qualifiers) {
if (q instanceof Port) {
Port port = (Port) q;
if (port.value() > 0) {
return port.value();
}
}
}
ServicePort servicePort = findQualifiedServicePort(service, qualifiers);
if (servicePort != null) {
return servicePort.getTargetPort().getIntVal();
}
return 0;
} | [
"Find the the qualfied container port of the target service\nUses java annotations first or returns the container port.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved containerPort of '0' as a fallback."
] | [
"Makes an spatial shape representing the time range defined by the two specified dates.\n\n@param from the start {@link Date}\n@param to the end {@link Date}\n@return a shape",
"Notifies that a content item is changed.\n\n@param position the position.",
"Adds all pairs from 'fromMap' to 'toMap' excluding once that matching the pattern",
"Runs a query that returns a single int.",
"Obtain the profile identifier.\n\n@param profileIdentifier Can be profile ID, or friendly name\n@return\n@throws Exception",
"Add a property with the given name and the given list of values to this Properties object. Name\nand values are trimmed before the property is added.\n\n@param name the name of the property, must not be <code>null</code>.\n@param values the values of the property, must no be <code>null</code>,\nnone of the values must be <code>null</code>",
"Set new particle coordinates somewhere off screen and apply new direction towards the screen\n\n@param position the particle position to apply new values to",
"Check given class modifiers. Plugin with resources plugin should not be private or abstract\nor interface.",
"Get a property as a json array or default.\n\n@param key the property name\n@param defaultValue default"
] |
private String getProjectName() {
String pName = Strings.emptyToNull(projectName);
if (pName == null) {
pName = Strings.emptyToNull(junit4.getProject().getName());
}
if (pName == null) {
pName = "(unnamed project)";
}
return pName;
} | [
"Return the project name or the default project name."
] | [
"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",
"Returns an instance of the CleverTap SDK.\n\n@param context The Android context\n@return The {@link CleverTapAPI} object\n@deprecated use {@link CleverTapAPI#getDefaultInstance(Context context)}",
"Populate a task from a Row instance.\n\n@param row Row instance\n@param task Task instance",
"Use this API to fetch onlinkipv6prefix resources of given names .",
"Print units.\n\n@param value units value\n@return units value",
"Look for the specified album art in both the hot cache of loaded tracks and the longer-lived LRU cache.\n\n@param artReference uniquely identifies the desired album art\n\n@return the art, if it was found in one of our caches, or {@code null}",
"Returns a correlation matrix which has rank < n and for which the first n factors agree with the factors of correlationMatrix.\n\n@param correlationMatrix The given correlation matrix.\n@param numberOfFactors The requested number of factors (Eigenvectors).\n@return Factor reduced correlation matrix.",
"Sorts the given array into sorted order using the given comparator.\n\n@param self the array to be sorted\n@param comparator a Comparator used for the comparison\n@return the sorted array\n@since 1.5.5",
"Returns the rank of the decomposed matrix.\n\n@see SingularOps_DDRM#rank(SingularValueDecomposition_F64, double)\n\n@return The matrix's rank"
] |
public static lbvserver_scpolicy_binding[] get(nitro_service service, String name) throws Exception{
lbvserver_scpolicy_binding obj = new lbvserver_scpolicy_binding();
obj.set_name(name);
lbvserver_scpolicy_binding response[] = (lbvserver_scpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch lbvserver_scpolicy_binding resources of given name ."
] | [
"RReturns the entity type of the id like \"item\" or \"property\"\n\n@param id\nthe identifier of the entity, such as \"Q42\"\n@throws IllegalArgumentException\nif the id is invalid",
"Get the Operation metadata for a single operation on an MBean by name.\n@param operationName the Operation name (can be URL-encoded).\n@return the {@link MBeanOperationInfo} for the operation.\n@throws OperationNotFoundException Method was not found\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Runs through the log removing segments until the size of the log is at least\nlogRetentionSize bytes in size\n\n@throws IOException",
"Removes the specified list of users from following the project, this will not affect project membership status.\nReturns the updated project record.\n\n@param project The project to remove followers from.\n@return Request object",
"Picks out a File from `thriftFiles` corresponding to a given artifact ID\nand file name. Returns null if `artifactId` and `fileName` do not map to a\nthrift file path.\n\n@parameter artifactId The artifact ID of which to look up the path\n@parameter fileName the name of the thrift file for which to extract a path\n@parameter thriftFiles The set of Thrift files in which to lookup the\nartifact ID.\n@return The path of the directory containing Thrift files for the given\nartifact ID. null if artifact ID not found.",
"Returns the data about all of the plugins that are set\n\n@param onlyValid True to get only valid plugins, False for all\n@return array of Plugins set",
"Handles the cases in which we can use longs rather than BigInteger\n\n@param section\n@param increment\n@param addrCreator\n@param lowerProducer\n@param upperProducer\n@param prefixLength\n@return",
"This method extracts data for an exception day from an MSPDI file.\n\n@param calendar Calendar data\n@param day Day data",
"Use this API to fetch sslciphersuite resources of given names ."
] |
private static String guessPackaging(ProjectModel projectModel)
{
String projectType = projectModel.getProjectType();
if (projectType != null)
return projectType;
LOG.warning("WINDUP-983 getProjectType() returned null for: " + projectModel.getRootFileModel().getPrettyPath());
String suffix = StringUtils.substringAfterLast(projectModel.getRootFileModel().getFileName(), ".");
if ("jar war ear sar har ".contains(suffix+" ")){
projectModel.setProjectType(suffix); // FIXME: Remove when WINDUP-983 is fixed.
return suffix;
}
// Should we try something more? Used APIs? What if it's a source?
return "unknown";
} | [
"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 systemsession resources of given names .",
"Remove a list of stores from the session\n\nFirst commit all entries for these stores and then cleanup resources\n\n@param storeNameToRemove List of stores to be removed from the current\nstreaming session",
"Output method responsible for sending the updated content to the Subscribers.\n\n@param cn",
"Use this API to update nstimeout.",
"Set the scrollbar used for vertical scrolling.\n\n@param scrollbar the scrollbar, or null to clear it\n@param width the width of the scrollbar in pixels",
"Sets the specified integer attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Loads the asset referenced by the file name\nunder the owner of this component.\nIf this component was constructed to replace the scene with\nthe asset, the main scene of the current context\nwill contain only the owner of this\ncomponent upon return. Otherwise, the loaded asset is a\nchild of this component's owner.\n\nLoading the asset is performed in a separate thread.\nThis function returns before the asset has finished loading.\nIAssetEvents are emitted to the input event handler and\nto any event listener on the context.\n\n@param handler\nIAssetEvents handler to process asset loading events",
"Creates an temporary directory. The created directory will be deleted when\ncommand will ended.",
"Returns the compact records for all attachments on the task.\n\n@param task Globally unique identifier for the task.\n@return Request object"
] |
public static base_responses add(nitro_service client, autoscaleprofile resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
autoscaleprofile addresources[] = new autoscaleprofile[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new autoscaleprofile();
addresources[i].name = resources[i].name;
addresources[i].type = resources[i].type;
addresources[i].url = resources[i].url;
addresources[i].apikey = resources[i].apikey;
addresources[i].sharedsecret = resources[i].sharedsecret;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"Use this API to add autoscaleprofile resources."
] | [
"Standard doclet entry point\n@param root\n@return",
"Unchecks the widget by index\n@param checkableIndex The index is in the range from 0 to size -1, where size is the number of\nCheckable widgets in the group. It does not take into account any\nnon-Checkable widgets added to the group widget.\n@return {@code True} if {@code checkableWidget} is a child of this {@code CheckableGroup} and\nwas not already unchecked; {@code false} otherwise.",
"backing bootstrap method with all parameters",
"Unzip a file or a folder\n@param zipFile\n@param unzippedFolder optional, if null the file/folder will be extracted in the same folder as zipFile\n@return",
"Gets the node meta data.\n\n@param key - the meta data key\n@return the node meta data value for this key",
"Convert an Object to a DateTime.",
"Use this API to Force hafailover.",
"Main method to start reading the plain text given by the client\n\n@param args\n, where arg[0] is Beast configuration file (beast.properties)\nand arg[1] is Logger configuration file (logger.properties)\n@throws Exception",
"Map the EventType.\n\n@param eventType the event type\n@return the event"
] |
public void updateGroupName(String newGroupName, int id) {
PreparedStatement statement = null;
try (Connection sqlConnection = sqlService.getConnection()) {
statement = sqlConnection.prepareStatement(
"UPDATE " + Constants.DB_TABLE_GROUPS +
" SET " + Constants.GROUPS_GROUP_NAME + " = ? " +
" WHERE " + Constants.GENERIC_ID + " = ?"
);
statement.setString(1, newGroupName);
statement.setInt(2, id);
statement.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
if (statement != null) {
statement.close();
}
} catch (Exception e) {
}
}
} | [
"updates the groupname in the table given the id\n\n@param newGroupName new group name\n@param id ID of group"
] | [
"Create a standalone target.\n\n@param controllerClient the connected controller client to a standalone instance.\n@return the remote target",
"Scans a set of classes for both ReaderListeners and Swagger annotations. All found listeners will\nbe instantiated before any of the classes are scanned for Swagger annotations - so they can be invoked\naccordingly.\n\n@param classes a set of classes to scan\n@return the generated Swagger definition",
"Gathers information, that couldn't be collected while tree traversal.",
"Determine the target type for the generic return type of the given method,\nwhere formal type variables are declared on the given class.\n@param method the method to introspect\n@param clazz the class to resolve type variables against\n@return the corresponding generic parameter or return type\n@see #resolveReturnTypeForGenericMethod",
"Validates the data for correct annotation",
"Resolves the configuration.\n\n@param config The specified configuration.\n@return The resolved configuration.",
"Select this tab item.",
"Creates a slice for directly a raw memory address. This is\ninherently unsafe as it may be used to access arbitrary memory.\nThe slice will hold the specified object reference to prevent the\ngarbage collector from freeing it while it is in use by the slice.\n\n@param address the raw memory address base\n@param size the size of the slice\n@param reference the object reference\n@return the unsafe slice",
"Return a list of contacts for a user who have recently uploaded photos along with the total count of photos uploaded.\n\n@param lastUpload\nLimits the resultset to contacts that have uploaded photos since this date. The date should be in the form of a Unix timestamp. The default,\nand maximum, offset is (1) hour. (Optional, can be null)\n@param filter\nLimit the result set to all contacts or only those who are friends or family.<br/>\nValid options are: <b>ff</b> -> friends and family, <b>all</b> -> all your contacts. (Optional, can be null)\n\n@return List of Contacts\n@throws FlickrException"
] |
public static base_response add(nitro_service client, sslcipher resource) throws Exception {
sslcipher addresource = new sslcipher();
addresource.ciphergroupname = resource.ciphergroupname;
addresource.ciphgrpalias = resource.ciphgrpalias;
return addresource.add_resource(client);
} | [
"Use this API to add sslcipher."
] | [
"See also JLS8, 4.12.5 Initial Values of Variables.\n\n@param type\n@return the default value for the given type as defined by JLS",
"Parse units.\n\n@param value units value\n@return units value",
"Active inverter colors",
"Will scale the image down before processing for\nperformance enhancement and less memory usage\nsacrificing image quality.\n\n@param scaleInSample value greater than 1 will scale the image width/height, so 2 will getFromDiskCache you 1/4\nof the original size and 4 will getFromDiskCache you 1/16 of the original size - this just sets\nthe inSample size in {@link android.graphics.BitmapFactory.Options#inSampleSize } and\nbehaves exactly the same, so keep the value 2^n for least scaling artifacts",
"Use this API to flush cachecontentgroup resources.",
"Use this API to fetch wisite_binding resources of given names .",
"Returns the dimensions for the video\n@param videoFile Video file\n@return the dimensions\n@throws IOException",
"Determines how many primary partitions each node within each zone should\nhave. The list of integers returned per zone is the same length as the\nnumber of nodes in that zone.\n\n@param nextCandidateCluster\n@param targetPartitionsPerZone\n@return A map of zoneId to list of target number of partitions per node\nwithin zone.",
"Converters the diffusion coefficient to hydrodynamic diameter and vice versa\n@param value Diffusion coefficient in [m^2 s^-1] or hydrodynamic diameter in [m]\n@param temperatur Temperatur in [Kelvin]\n@param viscosity Viscosity in [kg m^-1 s^-1]\n@return Hydrodynmaic diameter [m] / diffusion coefficient [m^2 s^-1]"
] |
public Where<T, ID> gt(String columnName, Object value) throws SQLException {
addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value,
SimpleComparison.GREATER_THAN_OPERATION));
return this;
} | [
"Add a '>' clause so the column must be greater-than the value."
] | [
"Initializes OJB for the purposes of this task.\n\n@return The metadata manager used by OJB",
"Retrieves the path using the endpoint value\n\n@param pathValue - path (endpoint) value\n@param requestType - \"GET\", \"POST\", etc\n@return Path or null\n@throws Exception exception",
"Select which view to display based on the state of the promotion. Will return the form if user selects to perform\npromotion. Progress will be returned if the promotion is currently in progress.",
"Returns a pretty printed string of nodes that host specific \"hot\"\npartitions, where hot is defined as following a contiguous run of\npartitions of some length in another zone.\n\n@param cluster The cluster to analyze\n@param hotContiguityCutoff cutoff below which a contiguous run is not\nhot.\n@return pretty string of hot partitions",
"A variant of the gamma function.\n@param a the number to apply gain to\n@param b the gain parameter. 0.5 means no change, smaller values reduce gain, larger values increase gain.\n@return the output value",
"Extract Primavera project data and export in another format.\n\n@param driverClass JDBC driver class name\n@param connectionString JDBC connection string\n@param projectID project ID\n@param outputFile output file\n@throws Exception",
"Returns an unmodifiable set containing the given elements.\n\n@param ts the elements from which to create a set\n@param <T> the type of the element in the set\n@return an unmodifiable set containing the given elements or {@code null} in case the given element array is\n{@code null}.",
"Sets an error message that will be displayed in a popup when the EditText has focus along\nwith an icon displayed at the right-hand side.\n\n@param error error message to show",
"Optional operations to do before the multiple-threads start indexing\n\n@param backend"
] |
public Record getChild(String key)
{
Record result = null;
if (key != null)
{
for (Record record : m_records)
{
if (key.equals(record.getField()))
{
result = record;
break;
}
}
}
return result;
} | [
"Retrieve a child record by name.\n\n@param key child record name\n@return child record"
] | [
"Calculate the signature by which we can reliably recognize a loaded track.\n\n@param title the track title\n@param artist the track artist, or {@code null} if there is no artist\n@param duration the duration of the track in seconds\n@param waveformDetail the monochrome waveform detail of the track\n@param beatGrid the beat grid of the track\n\n@return the SHA-1 hash of all the arguments supplied, or {@code null} if any either {@code waveFormDetail} or {@code beatGrid} were {@code null}",
"Convert Collection to Set\n@param collection Collection\n@return Set",
"Utility function that fetches all stores on a node.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch stores from\n@return List of all store names",
"Validates an operation against its description provider\n\n@param operation The operation to validate\n@throws IllegalArgumentException if the operation is not valid",
"Evaluates the body if current member has no tag with the specified name.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException Description of Exception\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" description=\"The parameter name. If not specified, then the raw\ncontent of the tag is returned.\"\[email protected] name=\"paramNum\" description=\"The zero-based parameter number. It's used if the user\nused the space-separated format for specifying parameters.\"\[email protected] name=\"error\" description=\"Show this error message if no tag found.\"",
"Use this API to fetch cachepolicylabel resource of given name .",
"Handles the response of the Request node request.\n@param incomingMessage the response message to process.",
"Calling this twice will not actually overwrite the gauge\n\n@param collectionSizeGauge",
"Sets the Base Calendar field indicates which calendar is the base calendar\nfor a resource calendar. The list includes the three built-in calendars,\nas well as any new base calendars you have created in the Change Working\nTime dialog box.\n\n@param val calendar name"
] |
public static LayersConfig getLayersConfig(final File repoRoot) throws IOException {
final File layersList = new File(repoRoot, LAYERS_CONF);
if (!layersList.exists()) {
return new LayersConfig();
}
final Properties properties = PatchUtils.loadProperties(layersList);
return new LayersConfig(properties);
} | [
"Process the layers.conf file.\n\n@param repoRoot the root\n@return the layers conf\n@throws java.io.IOException"
] | [
"Return cached object by key. The key will be concatenated with\ncurrent session id when fetching the cached object\n\n@param key\n@param <T>\nthe object type\n@return the cached object",
"Gets existing config files.\n\n@return the existing config files",
"Returns the Class object of the Event implementation.",
"Use this API to fetch the statistics of all dos_stats resources that are configured on netscaler.",
"Calculates the tiles width and height.\n\n@param code\nThe unique tile code. Determines what tile we're talking about.\n@param maxExtent\nThe maximum extent of the grid to which this tile belongs.\n@param scale\nThe current client side scale.\n@return Returns an array of double values where the first value is the tile width and the second value is the\ntile height.",
"Call this method to initialize the Fluo connection props\n\n@param conf Job configuration\n@param props Use {@link org.apache.fluo.api.config.FluoConfiguration} to set props\nprogrammatically",
"The selectionStrategy given as String argument is selected as locatorSelectionStrategy.\nIf selectionStrategy is null, the defaultLocatorSelectionStrategy is used instead.\nThen the new locatorSelectionStrategy is connected to the locatorClient and the matcher.\nA new LocatorTargetSelector is created, set to the locatorSelectionStrategy and then set\nas selector in the conduitSelectorHolder.\n\n@param conduitSelectorHolder\n@param matcher\n@param selectionStrategy",
"Update the content of the tables.",
"Assigns retention policy with givenID to folder or enterprise.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param assignTo object representing folder or enterprise to assign policy to.\n@return info about created assignment."
] |
public static snmpmanager[] get(nitro_service service) throws Exception{
snmpmanager obj = new snmpmanager();
snmpmanager[] response = (snmpmanager[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the snmpmanager resources that are configured on netscaler."
] | [
"Gets an expiring URL for downloading a file directly from Box. This can be user,\nfor example, for sending as a redirect to a browser to cause the browser\nto download the file directly from Box.\n\n@return the temporary download URL",
"Called on mouse down in the caption area, begins the dragging loop by\nturning on event capture.\n\n@see DOM#setCapture\n@see #continueDragging\n@param event the mouse down event that triggered dragging",
"Used by Pipeline jobs only",
"Compute the proportional padding for all items in the cache\n@param cache Cache data set\n@return the uniform padding amount",
"Sends a multipart response. Each body part represents a versioned value\nof the given key.\n\n@throws IOException\n@throws MessagingException",
"Sets the class loader to be used on serialization operations, for data\nstored in the specified fqn and child nodes. Note that if another class\nloader is set for a specific child node tree, the cache will use instead\nthat class loader.\n\n@param regionFqn\n@param classLoader",
"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",
"Checks the foreignkeys of all collections in the model.\n\n@param modelDef The model\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for foreignkey is invalid",
"Gets a string attribute from a json object given a path to traverse.\n\n@param record a JSONObject to traverse.\n@param path the json path to follow.\n@return the attribute as a {@link String}, or null if it was not found."
] |
private void logTimeTakenByRuleProvider(GraphContext graphContext, Context context, int ruleIndex, int timeTaken)
{
AbstractRuleProvider ruleProvider = (AbstractRuleProvider) context.get(RuleMetadataType.RULE_PROVIDER);
if (ruleProvider == null)
return;
if (!timeTakenByProvider.containsKey(ruleProvider))
{
RuleProviderExecutionStatisticsModel model = new RuleProviderExecutionStatisticsService(graphContext)
.create();
model.setRuleIndex(ruleIndex);
model.setRuleProviderID(ruleProvider.getMetadata().getID());
model.setTimeTaken(timeTaken);
timeTakenByProvider.put(ruleProvider, model.getElement().id());
}
else
{
RuleProviderExecutionStatisticsService service = new RuleProviderExecutionStatisticsService(graphContext);
RuleProviderExecutionStatisticsModel model = service.getById(timeTakenByProvider.get(ruleProvider));
int prevTimeTaken = model.getTimeTaken();
model.setTimeTaken(prevTimeTaken + timeTaken);
}
logTimeTakenByPhase(graphContext, ruleProvider.getMetadata().getPhase(), timeTaken);
} | [
"Logs the time taken by this rule, and attaches this to the total for the RuleProvider"
] | [
"Assembles an avro format string of single store config from store\nproperties\n\n@param props Store properties\n@return String in avro format that contains single store configs",
"Parses a single query item for the query facet.\n@param item JSON object of the query item.\n@return the parsed query item, or <code>null</code> if parsing failed.",
"A safe wrapper to destroy the given resource request.",
"Sets divider padding for axis. If axis does not match the orientation, it has no effect.\n@param padding\n@param axis {@link Axis}",
"Use this API to expire cachecontentgroup resources.",
"Add resources to the tree.\n\n@param parentNode parent tree node\n@param file resource container",
"Add SQL to handle a unique=true field. THis is not for uniqueCombo=true.",
"Returns the accrued interest of the bond for a given date.\n\n@param date The date of interest.\n@param model The model under which the product is valued.\n@return The accrued interest.",
"Was the CDJ playing a track when this update was sent?\n\n@return true if the play flag was set, or, if this seems to be a non-nexus player, if <em>P<sub>1</sub></em>\nhas a value corresponding to a playing state."
] |
public Set<String> rangeByRankReverse(final long start, final long end) {
return doWithJedis(new JedisCallable<Set<String>>() {
@Override
public Set<String> call(Jedis jedis) {
return jedis.zrevrange(getKey(), start, end);
}
});
} | [
"Returns the specified range of elements in the sorted set.\nThe elements are considered to be ordered from the highest to the lowest score.\nDescending lexicographical order is used for elements with equal score.\nBoth start and stop are zero-based inclusive indexes. They can also be negative numbers indicating offsets from\nthe end of the sorted set, with -1 being the last element of the sorted set.\n@param start\n@param end\n@return the range of elements"
] | [
"Add a new PropertyChangeListener to this node for a specific property.\nThis functionality has\nbeen borrowed from the java.beans package, though this class has\nnothing to do with a bean",
"Joins the individual WBS elements to make the formated value.\n\n@param length number of elements to join\n@return formatted WBS value",
"generate a message for loglevel INFO\n\n@param pObject the message Object",
"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.",
"Updates value of entity in the table.",
"Log original incoming request\n\n@param requestType\n@param request\n@param history",
"Clone layer information considering what may be copied to the client.\n\n@param original layer info\n@return cloned copy including only allowed information",
"Set a knot type.\n@param n the knot index\n@param type the type\n@see #getKnotType",
"Option check, forwards options to the standard doclet, if that one refuses them,\nthey are sent to UmlGraph"
] |
public File getTargetFile(final MiscContentItem item) {
final State state = this.state;
if (state == State.NEW || state == State.ROLLBACK_ONLY) {
return getTargetFile(miscTargetRoot, item);
} else {
throw new IllegalStateException(); // internal wrong usage, no i18n
}
} | [
"Get the target file for misc items.\n\n@param item the misc item\n@return the target location"
] | [
"Set the header names to forward from the request. Should not be defined if all is set to true\n\n@param names the header names.",
"Loads configuration from File. Later loads have lower priority.\n\n@param file File to load from\n@since 1.2.0",
"Parse parameters from this request using HTTP.\n\n@param req The ServletRequest containing all request parameters.\n@param cms The OpenCms object.\n@return CmsSpellcheckingRequest object that contains parsed parameters.",
"Add the declarationBinderRef to the ImportersManager, create the corresponding.\nBinderDescriptor.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder\n@throws InvalidFilterException",
"Multiplies all positions with a factor v\n@param v Multiplication factor",
"Sets the specified range of elements in the specified array to the specified value.\n\n@param from the index of the first element (inclusive) to be filled with the specified value.\n@param to the index of the last element (inclusive) to be filled with the specified value.\n@param val the value to be stored in the specified elements of the receiver.",
"Return a list of photos for a user at a specific latitude, longitude and accuracy.\n\n@param location\n@param extras\n@param perPage\n@param page\n@return The collection of Photo objects\n@throws FlickrException\n@see com.flickr4java.flickr.photos.Extras",
"This method is called to alert project listeners to the fact that\na resource has been written to a project file.\n\n@param resource resource instance",
"Print the class's operations m"
] |
private Number calculatePercentComplete(Row row)
{
Number result;
switch (PercentCompleteType.getInstance(row.getString("complete_pct_type")))
{
case UNITS:
{
result = calculateUnitsPercentComplete(row);
break;
}
case DURATION:
{
result = calculateDurationPercentComplete(row);
break;
}
default:
{
result = calculatePhysicalPercentComplete(row);
break;
}
}
return result;
} | [
"Determine which type of percent complete is used on on this task,\nand calculate the required value.\n\n@param row task data\n@return percent complete value"
] | [
"Delete an object.",
"Returns iterable with all assignments of given type of this retention policy.\n@param type the type of the retention policy assignment to retrieve. Can either be \"folder\" or \"enterprise\".\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 assignments of given type.",
"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",
"Method used to write the name of the scenarios\n\n@param word\n@return the same word starting with capital letter",
"Only call with the read lock held",
"Shows a dialog with user information for given session.\n\n@param session to show information for",
"Use this API to flush cachecontentgroup.",
"Set the model used by the right table.\n\n@param model table model",
"Set the url for the shape file.\n\n@param url shape file url\n@throws LayerException file cannot be accessed\n@since 1.7.1"
] |
@GwtIncompatible("Class.getDeclaredFields")
public ToStringBuilder addAllFields() {
List<Field> fields = getAllDeclaredFields(instance.getClass());
for(Field field : fields) {
addField(field);
}
return this;
} | [
"Adds all fields declared in the object's class and its superclasses to the output.\n@return this"
] | [
"Creates a span that covers an exact row",
"This method determines whether the cost rate table should be written.\nA default cost rate table should not be written to the file.\n\n@param entry cost rate table entry\n@param from from date\n@return boolean flag",
"Creates a pattern choice radio button and adds it where necessary.\n@param pattern the pattern that should be chosen by the button.\n@param messageKey the message key for the button's label.",
"Returns the indices that would sort an array.\n\n@param array Array.\n@param ascending Ascending order.\n@return Array of indices.",
"Join with another query builder. This will add into the SQL something close to \" INNER JOIN other-table ...\".\nEither the object associated with the current QueryBuilder or the argument QueryBuilder must have a foreign field\nof the other one. An exception will be thrown otherwise.\n\n<p>\n<b>NOTE:</b> This will do combine the WHERE statement of the two query builders with a SQL \"AND\". See\n{@link #joinOr(QueryBuilder)}.\n</p>",
"URLEncode a string\n@param s\n@return",
"Populates default settings.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException",
"Sets the bit at the specified index.\n@param index The index of the bit to set (0 is the least-significant bit).\n@param set A boolean indicating whether the bit should be set or not.\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string.",
"Join the Collection of Strings using the specified delimiter.\n\n@param s\nThe String collection\n@param delimiter\nThe delimiter String\n@return The joined String"
] |
public <T extends Widget & Checkable> boolean check(int checkableIndex) {
List<T> children = getCheckableChildren();
T checkableWidget = children.get(checkableIndex);
return checkInternal(checkableWidget, true);
} | [
"Checks the widget by index\n@param checkableIndex The index is in the range from 0 to size -1, where size is the number of\nCheckable widgets in the group. It does not take into account any\nnon-Checkable widgets added to the group widget.\n@return {@code True} if {@code checkableWidget} is a child of this {@code CheckableGroup} and\nwas not already checked; {@code false} otherwise."
] | [
"Frees the temporary LOBs when an exception is raised in the application\nor when the LOBs are no longer needed. If the LOBs are not freed, the\nspace used by these LOBs are not reclaimed.\n@param clob CLOB-wrapper to free or null\n@param blob BLOB-wrapper to free or null",
"Parses the given Reader for PmdRuleSets.\n\n@return The extracted PmdRuleSet - empty in case of problems, never null.",
"Get the permission information for the specified photo.\n\nThis method requires authentication with 'read' permission.\n\n@param photoId\nThe photo id\n@return The Permissions object\n@throws FlickrException",
"Write a Byte Order Mark at the beginning of the file\n\n@param stream the FileOutputStream to write the BOM to\n@param bigEndian true if UTF 16 Big Endian or false if Low Endian\n@throws IOException if an IOException occurs.\n@since 1.0",
"Should be called each frame.",
"Pops the top of the stack of active elements if the current position in the call stack corresponds to the one\nthat pushed the active elements.\n\n<p>This method does not do any type checks, so take care to retrieve the elements with the same types used to push\nto them onto the stack.\n\n@param <T> the type of the elements\n\n@return the active elements or null if the current call stack did not push any active elements onto the stack",
"Sets the fieldConversion.\n@param fieldConversionClassName The fieldConversion to set",
"Writes a list of timephased data to the MSPDI file.\n\n@param assignmentID current assignment ID\n@param list output list of timephased data items\n@param data input list of timephased data\n@param type list type (planned or completed)",
"Returns a diagonal matrix with the specified diagonal elements.\n@param values values of diagonal elements\n@return A diagonal matrix"
] |
public void forAllColumns(String template, Properties attributes) throws XDocletException
{
for (Iterator it = _curTableDef.getColumns(); it.hasNext(); )
{
_curColumnDef = (ColumnDef)it.next();
generate(template);
}
_curColumnDef = null;
} | [
"Processes the template for all column definitions 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\""
] | [
"Reads a combined date and time value expressed in tenths of a minute.\n\n@param data byte array of data\n@param offset location of data as offset into the array\n@return time value",
"Adds a member to this group with the specified role.\n@param user the member to be added to this group.\n@param role the role of the user in this group. Can be null to assign the default role.\n@return info about the new group membership.",
"Exports a single queue to an XML file.",
"Use this API to fetch transformpolicylabel resource of given name .",
"Cut all characters from maxLength and replace it with \"...\"",
"If supported by the WMS server, a parameter \"angle\" can be set on \"customParams\" or \"mergeableParams\".\nIn this case the rotation will be done natively by the WMS.",
"Emit an enum event with parameters and force all listener to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(Enum, Object...)",
"Obtain override ID\n\n@param overrideIdentifier can be the override ID or class name\n@return\n@throws Exception",
"Receive an expected number of bytes from the player, logging a warning if we get a different number of them.\n\n@param is the input stream associated with the player metadata socket.\n@param size the number of bytes we expect to receive.\n@param description the type of response being processed, for use in the warning message.\n@return the bytes read.\n\n@throws IOException if there is a problem reading the response."
] |
public Integer getInteger(String fieldName) {
try {
return hasValue(fieldName) ? Integer.valueOf(String.valueOf(resultMap.get(fieldName))) : null;
} catch (NumberFormatException e) {
throw new FqlException("Field '" + fieldName +"' is not a number.", e);
}
} | [
"Returns the value of the identified field as an Integer.\n@param fieldName the name of the field\n@return the value of the field as an Integer\n@throws FqlException if the field cannot be expressed as an Integer"
] | [
"Method used to write the name of the scenarios\n\n@param word\n@return the same word starting with capital letter",
"Prepares this DAG for node enumeration using getNext method, each call to getNext returns next node\nin the DAG with no dependencies.",
"Returns a geoquery.",
"Use this API to fetch the statistics of all aaa_stats resources that are configured on netscaler.",
"Resets the generator state.",
"Dump the buffer contents to a file\n@param file\n@throws IOException",
"Search for rectangles which have the same width and x position, and\nwhich join together vertically and merge them together to reduce the\nnumber of rectangles needed to describe a symbol.",
"If the belief its a count of some sort his counting its increased by one.\n\n@param bName\n- the name of the belief count.",
"Queries database meta data to check for the existence of\nspecific tables."
] |
public static ObjectModelResolver get(String resolverId) {
List<ObjectModelResolver> resolvers = getResolvers();
for (ObjectModelResolver resolver : resolvers) {
if (resolver.accept(resolverId)) {
return resolver;
}
}
return null;
} | [
"Returns first resolver that accepts the given resolverId.\nIn case none is found null is returned.\n@param resolverId identifier of the resolver\n@return found resolver or null otherwise"
] | [
"Returns the name of the operation.\n\n@param op the operation\n\n@return the name of the operation\n\n@throws IllegalArgumentException if the operation was not defined.",
"Use this API to fetch auditsyslogpolicy_vpnglobal_binding resources of given name .",
"Use this API to apply nspbr6 resources.",
"Merges two lists of references, eliminating duplicates in the process.\n\n@param references1\n@param references2\n@return merged list",
"Deletes an email alias from this user's account.\n\n<p>The IDs of the user's email aliases can be found by calling {@link #getEmailAliases}.</p>\n\n@param emailAliasID the ID of the email alias to delete.",
"Use this API to fetch statistics of nslimitidentifier_stats resource of given name .",
"Returns the cost rate table index for this assignment.\n\n@return cost rate table index",
"Checks the preconditions for creating a new LMinMax processor.\n\n@param min\nthe minimum value (inclusive)\n@param max\nthe maximum value (inclusive)\n@throws IllegalArgumentException\nif {@code max < min}",
"Record the resource request queue length\n\n@param dest Destination of the socket for which resource request is\nenqueued. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param queueLength The number of entries in the \"asynchronous\" resource\nrequest queue."
] |
public void drawText(String text, Font font, Rectangle box, Color fontColor) {
template.saveState();
// get the font
DefaultFontMapper mapper = new DefaultFontMapper();
BaseFont bf = mapper.awtToPdf(font);
template.setFontAndSize(bf, font.getSize());
// calculate descent
float descent = 0;
if (text != null) {
descent = bf.getDescentPoint(text, font.getSize());
}
// calculate the fitting size
Rectangle fit = getTextSize(text, font);
// draw text if necessary
template.setColorFill(fontColor);
template.beginText();
template.showTextAligned(PdfContentByte.ALIGN_LEFT, text, origX + box.getLeft() + 0.5f
* (box.getWidth() - fit.getWidth()), origY + box.getBottom() + 0.5f
* (box.getHeight() - fit.getHeight()) - descent, 0);
template.endText();
template.restoreState();
} | [
"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"
] | [
"Places a new value at the end of the existing value array, increasing the field length accordingly.\n@param newValue - the 2 floats making the new SFVec2f appended to the MFVec2f array list",
"Retrieve the start slack.\n\n@return start slack",
"Checks if the categoryfolder setting needs to be updated.\n\n@return true if the categoryfolder setting needs to be updated",
"Writes the value key to the serialized characteristic\n\n@param builder The JSON builder to add the value to\n@param value The value to add",
"Get random stub matching this user type\n@param userType User type\n@return Random stub",
"Sends all events to the web service. Events will be transformed with mapper before sending.\n\n@param events the events",
"Iterates through the range of prefixes in this range instance using the given prefix length.\n\n@param prefixLength\n@return",
"Generates the body of a toString method that uses a StringBuilder.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\noptional, we have no choice but to track the separators at runtime, but if any of them will\nalways be present, we can actually do the hard work at compile time. Specifically, we can pick\nthe first such and output it without a comma; any property before it will have a comma\n<em>appended</em>, and any property after it will have a comma <em>prepended</em>. This gives\nus the right number of commas in the right places in all circumstances.\n\n<p>As well as keeping track of whether we are <b>prepending commas</b> yet (initially false),\nwe also keep track of whether we have just finished an if-then block for an optional property,\nor if we are in the <b>middle of an append chain</b>, and if so, whether we are in the\n<b>middle of a string literal</b>. This lets us output the fewest literals and statements,\nmuch as a mildly compulsive programmer would when writing the same code.",
"Use this API to fetch all the callhome resources that are configured on netscaler."
] |
@Override
public String getPartialFilterSelector() {
return (def.selector != null) ? def.selector.toString() : null;
} | [
"Get the JSON string representation of the selector configured for this index.\n\n@return selector JSON as string"
] | [
"Writes and reads the XOP attachment using a CXF JAX-RS Proxy\nThe proxy automatically sets the \"mtom-enabled\" property by checking\nthe CXF EndpointProperty set on the XopAttachment interface.\n\n@throws Exception",
"Calculates the bearing, in degrees, of the end LatLong point from this\nLatLong point.\n\n@param end The point that the bearing is calculated for.\n@return The bearing, in degrees, of the supplied point from this point.",
"Print a constraint type.\n\n@param value ConstraintType instance\n@return constraint type value",
"Close and remove expired streams. Package protected to allow unit tests to invoke it.",
"Convert an Object to a Time, without an Exception",
"Check whether vector addition works. This is pure Java code and should work.",
"List details of all calendars in the file.\n\n@param file ProjectFile instance",
"Check that the parameter array has at least as many elements as it\nshould.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param actualLength\nThe actual array length\n@param minimumLength\nThe minimum array length",
"Specify the output format of the image.\n\n@see ImageFormat"
] |
private TreeMap<Integer, Integer> createResourceMap(FieldMap fieldMap, FixedMeta rscFixedMeta, FixedData rscFixedData)
{
TreeMap<Integer, Integer> resourceMap = new TreeMap<Integer, Integer>();
int itemCount = rscFixedMeta.getAdjustedItemCount();
for (int loop = 0; loop < itemCount; loop++)
{
byte[] data = rscFixedData.getByteArrayValue(loop);
if (data == null || data.length < fieldMap.getMaxFixedDataSize(0))
{
continue;
}
Integer uniqueID = Integer.valueOf(MPPUtility.getShort(data, 0));
resourceMap.put(uniqueID, Integer.valueOf(loop));
}
return (resourceMap);
} | [
"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"
] | [
"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",
"Retrieve an activity status.\n\n@param mpxj MPXJ Task instance\n@return activity status",
"With the QR algorithm it is possible for the found singular values to be negative. This\nmakes them all positive by multiplying it by a diagonal matrix that has",
"Establishes a thread that on one second intervals reports the number of remaining WorkBlocks enqueued and the\ntotal number of lines written and reported by consumers",
"Checks if the required option exists.\n\n@param options OptionSet to checked\n@param opt Required option to check\n@throws VoldemortException",
"Add a URL pattern to the routing table.\n\n@param urlPattern A regular expression\n@throws RouteAlreadyMappedException",
"Collect the total times measured by all known named timers of the given\nname. This is useful to add up times that were collected across separate\nthreads.\n\n@param timerName\n@return timer",
"Gets information about a trashed folder that's limited to a list of specified fields.\n@param folderID the ID of the trashed folder.\n@param fields the fields to retrieve.\n@return info about the trashed folder containing only the specified fields.",
"Utility method to register a proxy has a Service in OSGi."
] |
private List<Row> getTable(String name)
{
List<Row> result = m_tables.get(name);
if (result == null)
{
result = Collections.emptyList();
}
return result;
} | [
"Retrieve table data, return an empty result set if no table data is present.\n\n@param name table name\n@return table data"
] | [
"Get the replication partitions list for the given partition.\n\n@param index Partition id for which we are generating the preference list\n@return The List of partitionId where this partition is replicated.",
"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",
"Adds a listener to this collection.\n\n@param listener The listener to add",
"Writes a vInt directly to a byte array\n\n@param dest The destination array for the vInt to be written to\n@param offset The location where to write the vInt to\n@param i The Value being written into byte array\n@return Returns the new offset location",
"Returns list of files matches filters in specified directories\n\n@param directories which will using to find files\n@param fileFilter file filter\n@param dirFilter directory filter\n@return list of files matches filters in specified directories",
"Converts an image in BINARY mode to RGB mode\n\n@param img image\n@return new MarvinImage instance in RGB mode",
"This method is a sync parse to the JSON stream of atlas information.\n\n@return List of atlas information.",
"Mark root of this DAG depends on given DAG's root.\n\n@param dependencyGraph the dependency DAG",
"Dump the buffer contents to a file\n@param file\n@throws IOException"
] |
public static String format(String format) {
if (format == null) {
format = DEFAULT_FORMAT;
} else {
if (format.contains("M")) {
format = format.replace("M", "m");
}
if (format.contains("Y")) {
format = format.replace("Y", "y");
}
if (format.contains("D")) {
format = format.replace("D", "d");
}
}
return format;
} | [
"Will auto format the given string to provide support for pickadate.js formats."
] | [
"Parses chroot section of Zookeeper connection string\n\n@param zookeepers Zookeeper connection string\n@return Returns root path or \"/\" if none found",
"Unchecks the widget by index\n@param checkableIndex The index is in the range from 0 to size -1, where size is the number of\nCheckable widgets in the group. It does not take into account any\nnon-Checkable widgets added to the group widget.\n@return {@code True} if {@code checkableWidget} is a child of this {@code CheckableGroup} and\nwas not already unchecked; {@code false} otherwise.",
"Log long string using verbose tag\n\n@param TAG The tag.\n@param longString The long string.",
"Use this API to fetch all the nsip6 resources that are configured on netscaler.",
"Use this API to unset the properties of clusternodegroup resources.\nProperties that need to be unset are specified in args array.",
"Returns a configured transformer to write XML.\n\n@return the XML configured transformer\n@throws SpinXmlElementException if no new transformer can be created",
"Modify the tranform's current rotation in quaternion terms, around a\npivot other than the origin.\n\n@param w\n'W' component of the quaternion.\n@param x\n'X' component of the quaternion.\n@param y\n'Y' component of the quaternion.\n@param z\n'Z' component of the quaternion.\n@param pivotX\n'X' component of the pivot's location.\n@param pivotY\n'Y' component of the pivot's location.\n@param pivotZ\n'Z' component of the pivot's location.",
"Read a list of fixed size blocks using an instance of the supplied reader class.\n\n@param readerClass reader class\n@return list of blocks",
"Appends the indentation string at the current position of the parent and adds a new composite node, indicating the same indentation for\nsubsequent lines.\n\n@return an indentation node, using the given indentString, appended as a child on the given parent"
] |
public static String digestToFileName(String digest) {
if (StringUtils.startsWith(digest, "sha1")) {
return "manifest.json";
}
return getShaVersion(digest) + "__" + getShaValue(digest);
} | [
"Digest format to layer file name.\n\n@param digest\n@return"
] | [
"Adds an additional alias to the constructed document.\n\n@param text\nthe text of the alias\n@param languageCode\nthe language code of the alias\n@return builder object to continue construction",
"Checks whether a String satisfies the number range selection filter.\nThe test is evaluated based on the rightmost natural number found in\nthe String. Note that this is just evaluated on the String as given.\nIt is not trying to interpret it as a filename and to decide whether\nthe file exists, is a directory or anything like that.\n\n@param str The String to check for a number in\n@return true If the String is within the ranges filtered for",
"Constructs the convex hull of a set of points whose coordinates are given\nby an array of doubles.\n\n@param coords\nx, y, and z coordinates of each input point. The length of\nthis array must be at least three times <code>nump</code>.\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe number of input points is less than four or greater than\n1/3 the length of <code>coords</code>, or the points appear\nto be coincident, colinear, or coplanar.",
"Checks if a given number is in the range of a long.\n\n@param number\na number which should be in the range of a long (positive or negative)\n\n@see java.lang.Long#MIN_VALUE\n@see java.lang.Long#MAX_VALUE\n\n@return number as a long (rounding might occur)",
"Calls the specified function with the specified arguments. This is used for v2 response overrides\n\n@param className name of class\n@param methodName name of method\n@param pluginArgs plugin arguments\n@param args arguments to supply to function\n@throws Exception exception",
"Read an optional string value form a JSON Object.\n@param json the JSON object to read from.\n@param key the key for the string value in the provided JSON object.\n@param defaultValue the default value, to be returned if the string can not be read from the JSON object.\n@return the string or the default value if reading the string fails.",
"Add a single header key-value pair. If one with the name already exists,\nit gets replaced.\n\n@param name the name of the header.\n@param value the value of the header.\n@return the interceptor instance itself.",
"Build a standard-format UDP packet for sending to port 50001 or 50002 in the protocol.\n\n@param type the type of packet to create.\n@param deviceName the 0x14 (twenty) bytes of the device name to send in the packet.\n@param payload the remaining bytes which come after the device name.\n@return the packet to send.",
"Appends the GROUP BY clause for the Query\n@param groupByFields\n@param buf"
] |
private void readResourceAssignments()
{
for (MapRow row : getTable("USGTAB"))
{
Task task = m_projectFile.getTaskByUniqueID(row.getInteger("TASK_ID"));
Resource resource = m_projectFile.getResourceByUniqueID(row.getInteger("RESOURCE_ID"));
if (task != null && resource != null)
{
ResourceAssignment assignment = task.addResourceAssignment(resource);
m_eventManager.fireAssignmentReadEvent(assignment);
}
}
} | [
"Read resource assignment data from a PEP file."
] | [
"Detokenize the input list of words.\n\n@param tokens List of words.\n@return Detokenized string.",
"Update the context session to mark a user logged in\n\n@param userIdentifier\nthe user identifier, could be either userId or username",
"Returns if this maps the specified cell.\n\n@param cell the cell name\n@return {@code true} if this maps the column, {@code false} otherwise",
"Given a BSON document, remove any forbidden fields and return the document. If no changes are\nmade, the original document reference is returned. If changes are made, a cloned copy of the\ndocument with the changes will be returned.\n\n@param document the document from which to remove forbidden fields\n\n@return a BsonDocument without any forbidden fields.",
"Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by the specified comparator.\n\n@param iterable\nthe items to be sorted. May not be <code>null</code>.\n@param comparator\nthe comparator to be used. May be <code>null</code> to indicate that the natural ordering of the\nelements should be used.\n@return a sorted list as a shallow copy of the given iterable.\n@see Collections#sort(List, Comparator)\n@see #sort(Iterable)\n@see #sortBy(Iterable, org.eclipse.xtext.xbase.lib.Functions.Function1)\n@see ListExtensions#sortInplace(List, Comparator)\n@since 2.7",
"Use this API to fetch statistics of scpolicy_stats resource of given name .",
"This method retrieves a Duration instance representing the amount of\nwork between two dates based on this calendar.\n\n@param startDate start date\n@param endDate end date\n@param format required duration format\n@return amount of work",
"Writes a list of timephased data to the MSPDI file.\n\n@param assignmentID current assignment ID\n@param list output list of timephased data items\n@param data input list of timephased data\n@param type list type (planned or completed)",
"Prints associations recovered from the fields of a class. An association is inferred only\nif another relation between the two classes is not already in the graph.\n@param classes"
] |
public double getBearing(LatLong end) {
if (this.equals(end)) {
return 0;
}
double lat1 = latToRadians();
double lon1 = longToRadians();
double lat2 = end.latToRadians();
double lon2 = end.longToRadians();
double angle = -Math.atan2(Math.sin(lon1 - lon2) * Math.cos(lat2),
Math.cos(lat1) * Math.sin(lat2) - Math.sin(lat1)
* Math.cos(lat2) * Math.cos(lon1 - lon2));
if (angle < 0.0) {
angle += Math.PI * 2.0;
}
if (angle > Math.PI) {
angle -= Math.PI * 2.0;
}
return Math.toDegrees(angle);
} | [
"Calculates the bearing, in degrees, of the end LatLong point from this\nLatLong point.\n\n@param end The point that the bearing is calculated for.\n@return The bearing, in degrees, of the supplied point from this point."
] | [
"Create a new thread\n\n@param name The name of the thread\n@param runnable The work for the thread to do\n@param daemon Should the thread block JVM shutdown?\n@return The unstarted thread",
"Expands the cluster to include density-reachable items.\n\n@param cluster Cluster to expand\n@param point Point to add to cluster\n@param neighbors List of neighbors\n@param points the data set\n@param visited the set of already visited points\n@return the expanded cluster",
"Stop listening for beats.",
"Returns the effective batch size. If the dialect is multiget capable and a batch size has been configured, use\nthat one, otherwise the default.",
"Adds special accessors for private constants so that inner classes can retrieve them.",
"Manipulates a string by cutting of a prefix, if present, and adding a new prefix.\n\n@param word the string to be manipulated\n@param oldPrefix the old prefix that should be replaced\n@param newPrefix the new prefix that is added\n@return the manipulated string",
"set ViewPager scroller to change animation duration when sliding",
"Returns an iterator that iterates over all elements greater or equal to key in ascending order\n\n@param key key\n@return iterator",
"Provide array of String results from inputOutput MFString field named url.\n@array saved in valueDestination"
] |
ServerStatus getState() {
final InternalState requiredState = this.requiredState;
final InternalState state = internalState;
if(requiredState == InternalState.FAILED) {
return ServerStatus.FAILED;
}
switch (state) {
case STOPPED:
return ServerStatus.STOPPED;
case SERVER_STARTED:
return ServerStatus.STARTED;
default: {
if(requiredState == InternalState.SERVER_STARTED) {
return ServerStatus.STARTING;
} else {
return ServerStatus.STOPPING;
}
}
}
} | [
"Determine the current state the server is in.\n\n@return the server status"
] | [
"Returns a copy of the given document.\n@param document the document to copy.\n@return a copy of the given document.",
"Logs an error message for unhandled exception thrown from the target method.\n\n@param joinPoint - the joint point cut that contains information about the target\n@param throwable - the cause of the exception from the target method invocation",
"Sets the class loader to be used on serialization operations, for data\nstored in the specified fqn and child nodes. Note that if another class\nloader is set for a specific child node tree, the cache will use instead\nthat class loader.\n\n@param regionFqn\n@param classLoader",
"Attaches the menu drawer to the content view.",
"Returns the Set of entities recognized by this Classifier.\n\n@return The Set of entities recognized by this Classifier.",
"Given the current and final cluster dumps it into the output directory\n\n@param currentCluster Initial cluster metadata\n@param finalCluster Final cluster metadata\n@param outputDirName Output directory where to dump this file\n@throws IOException",
"Calculate start dates for a weekly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Returns the adapter position of the Parent associated with this ParentViewHolder\n\n@return The adapter position of the Parent if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.",
"Utility function that fetches partitions.\n\n@param adminClient An instance of AdminClient points to given cluster\n@return all partitions on cluster"
] |
protected <T1> void dispatchCommand(final BiConsumer<P, T1> action, final T1 routable1) {
routingFor(routable1)
.routees()
.forEach(routee -> routee.receiveCommand(action, routable1));
} | [
"DISPATCHING - COMMANDS"
] | [
"Permanently deletes a trashed folder.\n@param folderID the ID of the trashed folder to permanently delete.",
"Delete a server group by id\n\n@param id server group ID",
"If the Authtoken was already created in a separate program but not saved to file.\n\n@param authToken\n@param tokenSecret\n@param username\n@return\n@throws IOException",
"Provide Jersey client for the targeted Grapes server\n\n@return webResource",
"Get the relative path.\n\n@return the relative path",
"Returns a unique file name\n@param baseFileName the requested base name for the file\n@param extension the requested extension for the file\n@param cleanBaseFileName specify if the <code>baseFileName</code> has to be cleaned before being used (i.e. 'jboss-web' should not be cleaned to avoid '-' to become '_')\n@param ancestorFolders specify the ancestor folders for the file (if there's no ancestor folder, just pass 'null' value)\n@return a String representing the unique file generated",
"Retrieve the number of minutes per day for this calendar.\n\n@return minutes per day",
"Attempts to create a human-readable String representation of the provided rule.",
"Adds a parameter to the argument list if the given integer is non-null.\nIf the value is null, then the argument list remains unchanged."
] |
public String processProcedureArgument(Properties attributes) throws XDocletException
{
String id = attributes.getProperty(ATTRIBUTE_NAME);
ProcedureArgumentDef argDef = _curClassDef.getProcedureArgument(id);
String attrName;
if (argDef == null)
{
argDef = new ProcedureArgumentDef(id);
_curClassDef.addProcedureArgument(argDef);
}
attributes.remove(ATTRIBUTE_NAME);
for (Enumeration attrNames = attributes.propertyNames(); attrNames.hasMoreElements(); )
{
attrName = (String)attrNames.nextElement();
argDef.setProperty(attrName, attributes.getProperty(attrName));
}
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\""
] | [
"Resolve an operation transformer entry.\n\n@param address the address\n@param operationName the operation name\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the transformer entry",
"Starts data synchronization in a background thread.",
"Returns the getter method associated with the object's field.\n\n@param object\nthe object\n@param fieldName\nthe name of the field\n@return the getter method\n@throws NullPointerException\nif object or fieldName is null\n@throws SuperCsvReflectionException\nif the getter doesn't exist or is not visible",
"Used to retrieve all metadata associated with the item.\n@param item item to get metadata for.\n@param fields the optional fields to retrieve.\n@return An iterable of metadata instances associated with the item.",
"Returns an array of all the singular values",
"Returns a set of beans specialized by this bean. An empty set is returned if this bean does not specialize another beans.",
"Returns the currently scheduled job description identified by the given id.\n\n@param id the job id\n\n@return a job or <code>null</code> if not found",
"Get the collection of public contacts for the specified user ID.\n\nThis method does not require authentication.\n\n@param userId\nThe user ID\n@return The Collection of Contact objects\n@throws FlickrException",
"Gets a legend graphic with the specified metadata parameters. All parameters are passed as request parameters.\n\n@param layerId\nthe layer id\n@param styleName\nthe style name\n@param ruleIndex\nthe rule index\n@param format\nthe image format ('png','jpg','gif')\n@param width\nthe graphic's width\n@param height\nthe graphic's height\n@param scale\nthe scale denominator (not supported yet)\n@param allRules\nif true the image will contain all rules stacked vertically\n@param request\nthe servlet request object\n@return the model and view\n@throws GeomajasException\nwhen a style or rule does not exist or is not renderable"
] |
public void setCurrencySymbol(String symbol)
{
if (symbol == null)
{
symbol = DEFAULT_CURRENCY_SYMBOL;
}
set(ProjectField.CURRENCY_SYMBOL, symbol);
} | [
"Sets currency symbol.\n\n@param symbol currency symbol"
] | [
"Changes the index buffer associated with this mesh.\n@param ibuf new index buffer to use\n@see #setIndices(int[])\n@see #getIndexBuffer()\n@see #getIntIndices()",
"Replaces an existing metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value.\n@return this metadata object.",
"This method is used to change the credentials of CleverTap account Id, token and region programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token\n@param region Clever Tap Account Region",
"Use this API to fetch nslimitselector resource of given name .",
"Returns a client model from a ResultSet\n\n@param result resultset containing client information\n@return Client or null\n@throws Exception exception",
"Validates specialization if this bean specializes another bean.",
"Either a single file extension or a comma-separated list of extensions for which the language\nshall be registered.",
"Processes all entities in a Wikidata dump using the given entity\nprocessor. By default, the most recent JSON dump will be used. In offline\nmode, only the most recent previously downloaded file is considered.\n\n@param entityDocumentProcessor\nthe object to use for processing entities in this dump",
"The Total Slack field contains the amount of time a task can be\ndelayed without delaying the project's finish date.\n\n@return string representing duration"
] |
public static <K,V> Map<K,V> minus(Map<K,V> self, Map removeMe) {
final Map<K,V> ansMap = createSimilarMap(self);
ansMap.putAll(self);
if (removeMe != null && removeMe.size() > 0) {
for (Map.Entry<K, V> e1 : self.entrySet()) {
for (Object e2 : removeMe.entrySet()) {
if (DefaultTypeTransformation.compareEqual(e1, e2)) {
ansMap.remove(e1.getKey());
}
}
}
}
return ansMap;
} | [
"Create a Map composed of the entries of the first map minus the\nentries of the given map.\n\n@param self a map object\n@param removeMe the entries to remove from the map\n@return the resulting map\n@since 1.7.4"
] | [
"Use this API to disable nsacl6.",
"Migrate to Jenkins \"Credentials\" plugin from the old credential implementation",
"Parses and adds dictionaries to the Solr index.\n\n@param cms the OpenCms object.\n\n@throws CmsRoleViolationException in case the user does not have the required role ROOT_ADMIN",
"A specific, existing project can be deleted by making a DELETE request\non the URL for that project.\n\nReturns an empty data record.\n\n@param project The project to delete.\n@return Request object",
"Restores a trashed file to a new location with a new name.\n@param fileID the ID of the trashed file.\n@param newName an optional new name to give the file. This can be null to use the file's original name.\n@param newParentID an optional new parent ID for the file. This can be null to use the file's original\nparent.\n@return info about the restored file.",
"Creates a resource key with given id for bundle specified by given class.\n@param clazz the class owning the bundle.\n@param id value identifier\n@return the resource key",
"Apply the matching client UUID for the request\n\n@param httpServletRequest\n@param history",
"Parses values out of the header text.\n\n@param header header text",
"Old REST client uses new REST service"
] |
public void createAssignmentFieldMap(Props props)
{
//System.out.println("ASSIGN");
byte[] fieldMapData = null;
for (Integer key : ASSIGNMENT_KEYS)
{
fieldMapData = props.getByteArray(key);
if (fieldMapData != null)
{
break;
}
}
if (fieldMapData == null)
{
populateDefaultData(getDefaultAssignmentData());
}
else
{
createFieldMap(fieldMapData);
}
} | [
"Creates a field map for assignments.\n\n@param props props data"
] | [
"Computes the null space using SVD. Slowest bust most stable way to find the solution\n\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space",
"Get the current stack trace element, skipping anything from known logging classes.\n@return The current stack trace for this thread",
"Adds OPT_J | OPT_JSON option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Returns the body of the request. This method is used to read posted JSON data.\n\n@param request The request.\n\n@return String representation of the request's body.\n\n@throws IOException in case reading the request fails",
"Process calendar hours.\n\n@param calendar parent calendar\n@param row calendar hours data\n@param dayIndex day index",
"Send a waveform preview update announcement to all registered listeners.\n\n@param player the player whose waveform preview has changed\n@param preview the new waveform preview, if any",
"Polls the next ParsedWord from the stack.\n\n@return next ParsedWord",
"Reconnect to the HC.\n\n@return whether the server is still in sync\n@throws IOException",
"Account for key being fetched.\n\n@param key"
] |
public String getElementId() {
for (Entry<String, String> attribute : attributes.entrySet()) {
if (attribute.getKey().equalsIgnoreCase("id")) {
return attribute.getValue();
}
}
return null;
} | [
"Search for the attribute \"id\" and return the value.\n\n@return the id of this element or null when not found"
] | [
"Get a reader implementation class to perform API calls with while specifying\nan explicit page size for paginated API calls. This gets translated to a per_page=\nparameter on API requests. Note that Canvas does not guarantee it will honor this page size request.\nThere is an explicit maximum page size on the server side which could change. The default page size\nis 10 which can be limiting when, for example, trying to get all users in a 800 person course.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param paginationPageSize Requested pagination page size\n@param <T> The reader type to request an instance of\n@return An instance of the requested reader class",
"Prepares Artifactory server either from serverID or from ArtifactoryServer.\n\n@param artifactoryServerID\n@param pipelineServer\n@return",
"Removes a watermark from the item.\nIf the item did not have a watermark applied to it, a 404 Not Found will be returned by API.\n@param itemUrl url template for the item.",
"Filter events.\n\n@param events the events\n@return the list of filtered events",
"Create a Css Selector Transform",
"Obtains a local date in Pax calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Pax era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Pax local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code PaxEra}",
"Get a compatible constructor\n\n@param type\nClass to look for constructor in\n@param argumentType\nArgument type for constructor\n@return the compatible constructor or null if none found",
"Execute the transactional flow - catch all exceptions\n\n@param input Initial data input\n@return Try that represents either success (with result) or failure (with errors)",
"Returns true if the addon depends on reporting."
] |
private PBKey buildDefaultKey()
{
List descriptors = connectionRepository().getAllDescriptor();
JdbcConnectionDescriptor descriptor;
PBKey result = null;
for (Iterator iterator = descriptors.iterator(); iterator.hasNext();)
{
descriptor = (JdbcConnectionDescriptor) iterator.next();
if (descriptor.isDefaultConnection())
{
if(result != null)
{
log.error("Found additional connection descriptor with enabled 'default-connection' "
+ descriptor.getPBKey() + ". This is NOT allowed. Will use the first found descriptor " + result
+ " as default connection");
}
else
{
result = descriptor.getPBKey();
}
}
}
if(result == null)
{
log.info("No 'default-connection' attribute set in jdbc-connection-descriptors," +
" thus it's currently not possible to use 'defaultPersistenceBroker()' " +
" convenience method to lookup PersistenceBroker instances. But it's possible"+
" to enable this at runtime using 'setDefaultKey' method.");
}
return result;
} | [
"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"
] | [
"Use this API to clear nspbr6.",
"Send message to all connections labeled with tag specified\nwith self connection excluded\n\n@param message the message to be sent\n@param tag the string that tag the connections to be sent\n@return this context",
"Processes text as a FreeMarker template. Usually used to process an inner body of a tag.\n\n@param text text of a template.\n@param params map with parameters for processing.\n@param writer writer to write output to.",
"Registers annotations which will be considered as bean defining annotations.\n\nNOTE - If used along with {@code <trim/>} bean archives and/or with Weld configuration key\n{@code org.jboss.weld.bootstrap.vetoTypesWithoutBeanDefiningAnnotation}, these annotations will be ignored.\n\n@param annotations annotations which will be considered as Bean Defining Annotations.\n@return self",
"backing bootstrap method with all parameters",
"Loads the tag definitions from the files with a \".tags.xml\" suffix from the addons.",
"Append data to JSON response.\n@param param\n@param value",
"Returns the default privacy level preference for the user.\n\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@throws FlickrException\n@return privacyLevel",
"Get Rule\nGet a rule using the Rule ID\n@param ruleId Rule ID. (required)\n@return RuleEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body"
] |
public void alias( double value , String name ) {
if( isReserved(name))
throw new RuntimeException("Reserved word or contains a reserved character. '"+name+"'");
VariableDouble old = (VariableDouble)variables.get(name);
if( old == null ) {
variables.put(name, new VariableDouble(value));
}else {
old.value = value;
}
} | [
"Adds a new floating point variable. If one already has the same name it is written over.\n@param value Value of the number\n@param name Name in code"
] | [
"Searches all descendant folders using a given query and query parameters.\n@param offset is the starting position.\n@param limit the maximum number of items to return. The default is 30 and the maximum is 200.\n@param bsp containing query and advanced search capabilities.\n@return a PartialCollection containing the search results.",
"Add the string representation of the given object to this sequence at the given index. The given indentation will\nbe prepended to each line except the first one if 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>.\n@param index\nthe index in the list of segments.",
"Goes through the first buckets, picking out candidate records and\ntallying up their scores.\n@return the index of the first bucket we did not process",
"returns a sorted array of enum constants",
"Returns the number of rows within this association.\n\n@return the number of rows within this association",
"get the underlying wrapped connection\n@return OTMConnection raw connection to the OTM.",
"Checks whether the folder exists for fileName, and creates it if necessary.\n\n@param fileName folder name.\n@throws IOException an IO exception.",
"Get the Attribute metadata for an MBean by name.\n@return the {@link Map} of {@link String} attribute names to {@link MBeanAttributeInfo} values.",
"Returns true if the string matches the name of a function"
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.