query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public Stamp allocateTimestamp() {
synchronized (this) {
Preconditions.checkState(!closed, "tracker closed ");
if (node == null) {
Preconditions.checkState(allocationsInProgress == 0,
"expected allocationsInProgress == 0 when node == null");
Preconditions.checkState(!updatingZk, "unexpected concurrent ZK update");
createZkNode(getTimestamp().getTxTimestamp());
}
allocationsInProgress++;
}
try {
Stamp ts = getTimestamp();
synchronized (this) {
timestamps.add(ts.getTxTimestamp());
}
return ts;
} catch (RuntimeException re) {
synchronized (this) {
allocationsInProgress--;
}
throw re;
}
} | [
"Allocate a timestamp"
] | [
"Checks the preconditions for creating a new StrRegExReplace processor.\n\n@param regex\nthe supplied regular expression\n@param replacement\nthe supplied replacement text\n@throws IllegalArgumentException\nif regex is empty\n@throws NullPointerException\nif regex or replacement is null",
"Print priority.\n\n@param priority Priority instance\n@return priority value",
"Use this API to Import appfwsignatures.",
"Adds a new step to the list of steps.\n\n@param name Name of the step to add.\n@param robot The name of the robot ot use with the step.\n@param options extra options required for the step.",
"Checks if a document exist in the database.\n\n@param id The document _id field.\n@return true If the document is found, false otherwise.",
"Gets the string describing the uniforms used by shaders of this type.\n@param ctx GVFContext shader is associated with\n@return uniform descriptor string\n@see #getTemplate(GVRContext) GVRShader#getUniformDescriptor()",
"True if deleted, false if not found.",
"Create a mapping from entity names to entity ID values.",
"Set the value for a floating point 4x4 matrix.\n@param key name of uniform to set.\n@see #getFloatVec(String)"
] |
public List<String> filterAddonResources(Addon addon, Predicate<String> filter)
{
List<String> discoveredFileNames = new ArrayList<>();
List<File> addonResources = addon.getRepository().getAddonResources(addon.getId());
for (File addonFile : addonResources)
{
if (addonFile.isDirectory())
handleDirectory(filter, addonFile, discoveredFileNames);
else
handleArchiveByFile(filter, addonFile, discoveredFileNames);
}
return discoveredFileNames;
} | [
"Returns a list of files in given addon passing given filter."
] | [
"Detect numbers using comma as a decimal separator and replace with period.\n\n@param value original numeric value\n@return corrected numeric value",
"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.",
"Sets the submatrix of W up give Y is already configured and if it is being cached or not.",
"Filter on a search term. Can be course name, code or full ID. Must be at least 3 characters\n@param searchTerm Search term to filter by\n@return This object to allow adding more options",
"Iterates through the given CharSequence line by line, splitting each line using\nthe given regex delimiter. The list of tokens for each line is then passed to\nthe given closure.\n\n@param self a CharSequence\n@param regex the delimiting regular expression\n@param closure a closure\n@return the last value returned by the closure\n@throws java.io.IOException if an error occurs\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see #splitEachLine(CharSequence, java.util.regex.Pattern, groovy.lang.Closure)\n@since 1.8.2",
"Check if the print has not been asked to stop taking new jobs.\n\n@return true if it's OK to take new jobs.",
"Builds the resource.\n\n@return the cms resource",
"This method takes an integer enumeration of a priority\nand returns an appropriate instance of this class. Note that unrecognised\nvalues are treated as medium priority.\n\n@param priority int version of the priority\n@return Priority class instance",
"Returns the locale specified by the named scoped attribute or context\nconfiguration parameter.\n\n<p> The named scoped attribute is searched in the page, request,\nsession (if valid), and application scope(s) (in this order). If no such\nattribute exists in any of the scopes, the locale is taken from the\nnamed context configuration parameter.\n\n@param pageContext the page in which to search for the named scoped\nattribute or context configuration parameter\n@param name the name of the scoped attribute or context configuration\nparameter\n\n@return the locale specified by the named scoped attribute or context\nconfiguration parameter, or <tt>null</tt> if no scoped attribute or\nconfiguration parameter with the given name exists"
] |
private String fixSpecials(final String inString) {
StringBuilder tmp = new StringBuilder();
for (int i = 0; i < inString.length(); i++) {
char chr = inString.charAt(i);
if (isSpecial(chr)) {
tmp.append(this.escape);
tmp.append(chr);
} else {
tmp.append(chr);
}
}
return tmp.toString();
} | [
"Convenience method to escape any character that is special to the regex system.\n\n@param inString\nthe string to fix\n\n@return the fixed string"
] | [
"Tests if this partition has hit a threshold and signal to the pool watch thread to create new connections\n@param connectionPartition to test for.",
"Read FTS file data from the configured source and return a populated ProjectFile instance.\n\n@return ProjectFile instance",
"Loads a CRF classifier from an InputStream, and returns it. This method\ndoes not buffer the InputStream, so you should have buffered it before\ncalling this method.\n\n@param in\nInputStream to load classifier from\n@return The CRF classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data",
"This configuration requires that all your tasks you submit to the system implement\nthe Groupable interface. By default, it will round robin tasks from each group\n\nTasks will be tracked internally in the system by randomly generated UUIDs\n\n@return",
"Process the host info and determine which configuration elements are required on the slave host.\n\n@param hostInfo the host info\n@param root the model root\n@param extensionRegistry the extension registry\n@return",
"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",
"Add the given query parameters.\n@param params the params\n@return this UriComponentsBuilder",
"Convert a Java date into a Planner time.\n\n0800\n\n@param value Java Date instance\n@return Planner time value",
"Disable all overrides for a specified path\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client"
] |
public List<WebSocketConnection> get(String key) {
final List<WebSocketConnection> retList = new ArrayList<>();
accept(key, C.F.addTo(retList));
return retList;
} | [
"Return a list of websocket connection by key\n\n@param key\nthe key to find the websocket connection list\n@return a list of websocket connection or an empty list if no websocket connection found by key"
] | [
"Converts a Fluo Span to Accumulo Range\n\n@param span Span\n@return Range",
"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.",
"Sets the specified starting partition key.\n\n@param paging a paging state",
"We have obtained metadata for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this metadata\n@param data the metadata which we received",
"Creates an IndexableTaskItem from provided FunctionalTaskItem.\n\n@param taskItem functional TaskItem\n@return IndexableTaskItem",
"Populates a resource.\n\n@param resource resource instance\n@param record MPX record\n@throws MPXJException",
"Main method to run the bot.\n\n@param args\n@throws LoginFailedException\n@throws IOException\n@throws MediaWikiApiErrorException",
"Sets the frame pointer to a specific frame\n\n@return boolean true if the move was successful",
"Returns all the Artifacts of the module\n\n@param module Module\n@return List<Artifact>"
] |
public static String getString(Properties props, String name, String defaultValue) {
return props.containsKey(name) ? props.getProperty(name) : defaultValue;
} | [
"Get a string property, or, if no such property is defined, return\nthe given default value\n\n@param props the properties\n@param name the key in the properties\n@param defaultValue the default value if the key not exists\n@return value in the props or defaultValue while name not exist"
] | [
"Returns the RPC service for serial dates.\n@return the RPC service for serial dates.",
"Insert entity object. The caller must first initialize the primary key\nfield.",
"Use this API to update ntpserver.",
"This method allows a pre-existing resource calendar to be attached to a\nresource.\n\n@param calendar resource calendar",
"Finds the most recent dump of the given type that is actually available.\n\n@param dumpContentType\nthe type of the dump to look for\n@return most recent main dump or null if no such dump exists",
"Remove all the existing links of the Declaration.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration",
"get the type erasure signature",
"Handle http worker response.\n\n@param respOnSingleReq\nthe my response\n@throws Exception\nthe exception",
"Convert the Phoenix representation of a duration into a Duration instance.\n\n@param value Phoenix duration\n@return Duration instance"
] |
public ConnectionRepository readConnectionRepository(InputStream inst)
{
try
{
RepositoryPersistor persistor = new RepositoryPersistor();
return persistor.readConnectionRepository(inst);
}
catch (Exception e)
{
throw new MetadataException("Can not read repository from " + inst, e);
}
} | [
"Read JdbcConnectionDescriptors from this InputStream.\n\n@see #mergeConnectionRepository"
] | [
"Quits server by closing server socket and closing client socket handlers.",
"Returns the latest change events for a given namespace.\n\n@param namespace the namespace to get events for.\n@return the latest change events for a given namespace.",
"Set the TableAlias for ClassDescriptor",
"Adopts an xml dom element to the owner document of this element if necessary.\n\n@param elementToAdopt the element to adopt",
"Use this API to update rsskeytype.",
"Writes the torque schemata to files in the given directory and returns\na comma-separated list of the filenames.\n\n@param dir The directory to write the files to\n@return The list of filenames\n@throws IOException If an error occurred",
"Use this API to fetch filtered set of appqoepolicy resources.\nset the filter parameter values in filtervalue object.",
"Performs the closure within a transaction using a cached connection.\nIf the closure takes a single argument, it will be called\nwith the connection, otherwise it will be called with no arguments.\n\n@param closure the given closure\n@throws SQLException if a database error occurs",
"Return the authorization URL which is used to perform the authorization_code based OAuth2 flow.\n@param clientID the client ID to use with the connection.\n@param redirectUri the URL to which Box redirects the browser when authentication completes.\n@param state the text string that you choose.\nBox sends the same string to your redirect URL when authentication is complete.\n@param scopes this optional parameter identifies the Box scopes available\nto the application once it's authenticated.\n@return the authorization URL"
] |
public static RgbaColor fromRgb(String rgb) {
if (rgb.length() == 0) return getDefaultColor();
String[] parts = getRgbParts(rgb).split(",");
if (parts.length == 3) {
return new RgbaColor(parseInt(parts[0]),
parseInt(parts[1]),
parseInt(parts[2]));
}
else {
return getDefaultColor();
}
} | [
"Parses an RgbaColor from an rgb value.\n\n@return the parsed color"
] | [
"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",
"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 scene will 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 event listener on the context.\n\n@param scene scene to add the model to, null is permissible\n@return always true",
"Show or hide the options column dependent on the provided edit mode.\n@param oldMode the old edit mode\n@param newMode the edit mode for which the options column's visibility should be adjusted.",
"Add a misc file.\n\n@param name the file name\n@param path the relative path\n@param newHash the new hash of the added content\n@param isDirectory whether the file is a directory or not\n@return the builder",
"Concatenates of list of Bytes objects to create a byte array\n\n@param listOfBytes Bytes objects to concatenate\n@return Bytes",
"Get a list of referring domains for 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 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.getPhotoDomains.html\"",
"Sets the last operation response.\n\n@param response the last operation response.",
"Returns the screen height in pixels\n\n@param context is the context to get the resources\n@return the screen height in pixels",
"Returns the probability that the records v1 and v2 came from\nrepresent the same entity, based on high and low probability\nsettings etc."
] |
public static String getDatatypeIriFromJsonDatatype(String jsonDatatype) {
switch (jsonDatatype) {
case JSON_DT_ITEM:
return DT_ITEM;
case JSON_DT_PROPERTY:
return DT_PROPERTY;
case JSON_DT_GLOBE_COORDINATES:
return DT_GLOBE_COORDINATES;
case JSON_DT_URL:
return DT_URL;
case JSON_DT_COMMONS_MEDIA:
return DT_COMMONS_MEDIA;
case JSON_DT_TIME:
return DT_TIME;
case JSON_DT_QUANTITY:
return DT_QUANTITY;
case JSON_DT_STRING:
return DT_STRING;
case JSON_DT_MONOLINGUAL_TEXT:
return DT_MONOLINGUAL_TEXT;
default:
if(!JSON_DATATYPE_PATTERN.matcher(jsonDatatype).matches()) {
throw new IllegalArgumentException("Invalid JSON datatype \"" + jsonDatatype + "\"");
}
String[] parts = jsonDatatype.split("-");
for(int i = 0; i < parts.length; i++) {
parts[i] = StringUtils.capitalize(parts[i]);
}
return "http://wikiba.se/ontology#" + StringUtils.join(parts);
}
} | [
"Returns the WDTK datatype IRI for the property datatype as represented by\nthe given JSON datatype string.\n\n@param jsonDatatype\nthe JSON datatype string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known"
] | [
"Parses the dictionary from an InputStream.\n\n@param client The SolrClient instance object.\n@param lang The language of the dictionary.\n@param is The InputStream object.\n@param documents List to put the assembled SolrInputObjects into.\n@param closeStream boolean flag that determines whether to close the inputstream\nor not.",
"Visits an annotation on a local variable type.\n\n@param typeRef\na reference to the annotated type. The sort of this type\nreference must be {@link TypeReference#LOCAL_VARIABLE\nLOCAL_VARIABLE} or {@link TypeReference#RESOURCE_VARIABLE\nRESOURCE_VARIABLE}. See {@link TypeReference}.\n@param typePath\nthe path to the annotated type argument, wildcard bound, array\nelement type, or static inner type within 'typeRef'. May be\n<tt>null</tt> if the annotation targets 'typeRef' as a whole.\n@param start\nthe fist instructions corresponding to the continuous ranges\nthat make the scope of this local variable (inclusive).\n@param end\nthe last instructions corresponding to the continuous ranges\nthat make the scope of this local variable (exclusive). This\narray must have the same size as the 'start' array.\n@param index\nthe local variable's index in each range. This array must have\nthe same size as the 'start' array.\n@param desc\nthe class descriptor of the annotation class.\n@param visible\n<tt>true</tt> if the annotation is visible at runtime.\n@return a visitor to visit the annotation values, or <tt>null</tt> if\nthis visitor is not interested in visiting this annotation.",
"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",
"Prepare a batch api request using list of individual reuests.\n@param requests list of api requests that has to be executed in batch.",
"For use on a slave HC to get all the server groups used by the host\n\n@param hostResource the host resource\n@return the server configs on this host",
"Adds the provided map of key-value pairs as a new row in the table represented by this DataSet.\n\n@param map the key (column-name), value pairs to add as a new row\n@throws SQLException if a database error occurs",
"Checks the initialization-method of given class descriptor.\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",
"Compute the key to use.\n\n@param ref The reference number.\n@param filename The filename.\n@param extension The file extension.",
"Checks the given reference descriptor.\n\n@param refDef The reference descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated"
] |
public void processSplitData(Task task, List<TimephasedWork> timephasedComplete, List<TimephasedWork> timephasedPlanned)
{
Date splitsComplete = null;
TimephasedWork lastComplete = null;
TimephasedWork firstPlanned = null;
if (!timephasedComplete.isEmpty())
{
lastComplete = timephasedComplete.get(timephasedComplete.size() - 1);
splitsComplete = lastComplete.getFinish();
}
if (!timephasedPlanned.isEmpty())
{
firstPlanned = timephasedPlanned.get(0);
}
LinkedList<DateRange> splits = new LinkedList<DateRange>();
TimephasedWork lastAssignment = null;
DateRange lastRange = null;
for (TimephasedWork assignment : timephasedComplete)
{
if (lastAssignment != null && lastRange != null && lastAssignment.getTotalAmount().getDuration() != 0 && assignment.getTotalAmount().getDuration() != 0)
{
splits.removeLast();
lastRange = new DateRange(lastRange.getStart(), assignment.getFinish());
}
else
{
lastRange = new DateRange(assignment.getStart(), assignment.getFinish());
}
splits.add(lastRange);
lastAssignment = assignment;
}
//
// We may not have a split, we may just have a partially
// complete split.
//
Date splitStart = null;
if (lastComplete != null && firstPlanned != null && lastComplete.getTotalAmount().getDuration() != 0 && firstPlanned.getTotalAmount().getDuration() != 0)
{
lastRange = splits.removeLast();
splitStart = lastRange.getStart();
}
lastAssignment = null;
lastRange = null;
for (TimephasedWork assignment : timephasedPlanned)
{
if (splitStart == null)
{
if (lastAssignment != null && lastRange != null && lastAssignment.getTotalAmount().getDuration() != 0 && assignment.getTotalAmount().getDuration() != 0)
{
splits.removeLast();
lastRange = new DateRange(lastRange.getStart(), assignment.getFinish());
}
else
{
lastRange = new DateRange(assignment.getStart(), assignment.getFinish());
}
}
else
{
lastRange = new DateRange(splitStart, assignment.getFinish());
}
splits.add(lastRange);
splitStart = null;
lastAssignment = assignment;
}
//
// We must have a minimum of 3 entries for this to be a valid split task
//
if (splits.size() > 2)
{
task.getSplits().addAll(splits);
task.setSplitCompleteDuration(splitsComplete);
}
else
{
task.setSplits(null);
task.setSplitCompleteDuration(null);
}
} | [
"Process the timephased resource assignment data to work out the\nsplit structure of the task.\n\n@param task parent task\n@param timephasedComplete completed resource assignment work\n@param timephasedPlanned planned resource assignment work"
] | [
"Pseudo-Inverse of a matrix calculated in the least square sense.\n\n@param matrix The given matrix A.\n@return pseudoInverse The pseudo-inverse matrix P, such that A*P*A = A and P*A*P = P",
"Create a new queued pool using the defaults for key of type K, request of\ntype R, and value of Type V.\n\n@param factory The factory that creates objects\n@return The created pool",
"Get a new token.\n\n@return 14 character String",
"Count some stats on what occurs in a file.",
"Performs a null edit on an item. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param itemId\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection",
"Removes all events from table\n\n@param table the table to remove events",
"Computes the eigenvalues of a 2 by 2 matrix using a faster but more prone to errors method. This\nis the typical method.",
"Fills the Boyer Moore \"bad character array\" for the given pattern",
"Obtain collection of headers to remove\n\n@return\n@throws Exception"
] |
private static DumpContentType guessDumpContentType(String fileName) {
String lcDumpName = fileName.toLowerCase();
if (lcDumpName.contains(".json.gz")) {
return DumpContentType.JSON;
} else if (lcDumpName.contains(".json.bz2")) {
return DumpContentType.JSON;
} else if (lcDumpName.contains(".sql.gz")) {
return DumpContentType.SITES;
} else if (lcDumpName.contains(".xml.bz2")) {
if (lcDumpName.contains("daily")) {
return DumpContentType.DAILY;
} else if (lcDumpName.contains("current")) {
return DumpContentType.CURRENT;
} else {
return DumpContentType.FULL;
}
} else {
logger.warn("Could not guess type of the dump file \"" + fileName
+ "\". Defaulting to json.gz.");
return DumpContentType.JSON;
}
} | [
"Guess the type of the given dump from its filename.\n\n@param fileName\n@return dump type, defaulting to JSON if no type was found"
] | [
"Creates a triangular matrix where the amount of fill is randomly selected too.\n\n@param upper true for upper triangular and false for lower\n@param N number of rows and columns\ner * @param minFill minimum fill fraction\n@param maxFill maximum fill fraction\n@param rand random number generator\n@return Random matrix",
"Append the bounding volume particle positions, times and velocities to the existing mesh\nbefore creating a new scene object with this mesh attached to it.\nAlso, append every created scene object and its creation time to corresponding array lists.\n\n@param particlePositions\n@param particleVelocities\n@param particleTimeStamps",
"Resolve the subsystem versions.\n\n@param extensions the extensions to install\n@return the subsystem versions",
"Is alternative.\n\n@param annotated the annotated\n@param mergedStereotypes merged stereotypes\n@return true if alternative, false otherwise",
"Use this API to fetch ipset_nsip_binding resources of given name .",
"Creates typed parser\n@param contentType class of parsed object\n@param <T> type of parsed object\n@return parser of objects of given type",
"Returns whether this host should ignore operations from the master domain controller that target\nthe given address.\n\n@param address the resource address. Cannot be {@code null}\n\n@return {@code true} if the operation should be ignored; {@code false} otherwise",
"Clone a widget info map considering what may be copied to the client.\n\n@param widgetInfo widget info map\n@return cloned copy including only records which are not {@link ServerSideOnlyInfo}",
"Convert an ObjectBank to corresponding collection of data features and\nlabels.\n\n@return A List of pairs, one for each document, where the first element is\nan int[][][] representing the data and the second element is an\nint[] representing the labels."
] |
@Deprecated
public Category browse(String catId) throws FlickrException {
List<Subcategory> subcategories = new ArrayList<Subcategory>();
List<Group> groups = new ArrayList<Group>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_BROWSE);
if (catId != null) {
parameters.put("cat_id", catId);
}
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element categoryElement = response.getPayload();
Category category = new Category();
category.setName(categoryElement.getAttribute("name"));
category.setPath(categoryElement.getAttribute("path"));
category.setPathIds(categoryElement.getAttribute("pathids"));
NodeList subcatNodes = categoryElement.getElementsByTagName("subcat");
for (int i = 0; i < subcatNodes.getLength(); i++) {
Element node = (Element) subcatNodes.item(i);
Subcategory subcategory = new Subcategory();
subcategory.setId(Integer.parseInt(node.getAttribute("id")));
subcategory.setName(node.getAttribute("name"));
subcategory.setCount(Integer.parseInt(node.getAttribute("count")));
subcategories.add(subcategory);
}
NodeList groupNodes = categoryElement.getElementsByTagName("group");
for (int i = 0; i < groupNodes.getLength(); i++) {
Element node = (Element) groupNodes.item(i);
Group group = new Group();
group.setId(node.getAttribute("nsid"));
group.setName(node.getAttribute("name"));
group.setMembers(node.getAttribute("members"));
groups.add(group);
}
category.setGroups(groups);
category.setSubcategories(subcategories);
return category;
} | [
"Browse groups for the given category ID. If a null value is passed for the category then the root category is used.\n\n@param catId\nThe optional category id. Null value will be ignored.\n@return The Collection of Photo objects\n@throws FlickrException\n@deprecated Flickr returns just empty results"
] | [
"Gets the name of the shader variable to get the texture\ncoordinates for the named texture.\n\n@param texName name of texture\n@return name of shader variable",
"Construct a Libor index for a given curve and schedule.\n\n@param forwardCurveName\n@param schedule\n@return The Libor index or null, if forwardCurveName is null.",
"This method is used to recreate the hierarchical structure of the\nproject file from scratch. The method sorts the list of all tasks,\nthen iterates through it creating the parent-child structure defined\nby the outline level field.",
"Notification that a connection was closed.\n\n@param closed the closed connection",
"Schedule at most one task.\n\nThe scheduled task *must* invoke 'doneTask()' upon\ncompletion/termination.\n\n@param executeService flag to control execution of the service, some tests pass\nin value 'false'\n@return The task scheduled or null if not possible to schedule a task at\nthis time.",
"Delete rows that match the prepared statement.",
"This is a method to stream slops to \"slop\" store when a node is detected\nfaulty in a streaming session\n\n@param key -- original key\n@param value -- original value\n@param storeName -- the store for which we are registering the slop\n@param failedNodeId -- the faulty node ID for which we register a slop\n@throws IOException",
"Returns a set of beans specialized by this bean. An empty set is returned if this bean does not specialize another beans.",
"Process the deployment root for the manifest.\n\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException"
] |
protected ManageableCollection createCollection(CollectionDescriptor desc, Class collectionClass)
{
Class fieldType = desc.getPersistentField().getType();
ManageableCollection col;
if (collectionClass == null)
{
if (ManageableCollection.class.isAssignableFrom(fieldType))
{
try
{
col = (ManageableCollection)fieldType.newInstance();
}
catch (Exception e)
{
throw new OJBRuntimeException("Cannot instantiate the default collection type "+fieldType.getName()+" of collection "+desc.getAttributeName()+" in type "+desc.getClassDescriptor().getClassNameOfObject());
}
}
else if (fieldType.isAssignableFrom(RemovalAwareCollection.class))
{
col = new RemovalAwareCollection();
}
else if (fieldType.isAssignableFrom(RemovalAwareList.class))
{
col = new RemovalAwareList();
}
else if (fieldType.isAssignableFrom(RemovalAwareSet.class))
{
col = new RemovalAwareSet();
}
else
{
throw new MetadataException("Cannot determine a default collection type for collection "+desc.getAttributeName()+" in type "+desc.getClassDescriptor().getClassNameOfObject());
}
}
else
{
try
{
col = (ManageableCollection)collectionClass.newInstance();
}
catch (Exception e)
{
throw new OJBRuntimeException("Cannot instantiate the collection class "+collectionClass.getName()+" of collection "+desc.getAttributeName()+" in type "+desc.getClassDescriptor().getClassNameOfObject());
}
}
return col;
} | [
"Create a collection object of the given collection type. If none has been given,\nOJB uses RemovalAwareList, RemovalAwareSet, or RemovalAwareCollection depending\non the field type.\n\n@param desc The collection descriptor\n@param collectionClass The collection class specified in the collection-descriptor\n@return The collection object"
] | [
"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",
"Synchronize the required files to a slave HC from the master DC if this is required.\n@param fileRepository the HostFileRepository of the HC.\n@param contentRepository the ContentRepository of the HC.\n@param backup inidcates if this is a DC backup HC.\n@param oldHash the hash of the deployment to be replaced.\n@return true if the content should be pulled by the slave HC - false otherwise.",
"Handles Multi Instance Report message. Handles Report on\nthe number of instances for the command class.\n@param serialMessage the serial message to process.\n@param offset the offset at which to start procesing.",
"Create an `AppDescriptor` with appName and package name specified\n\nIf `appName` is `null` or blank, it will try the following\napproach to get app name:\n\n1. check the {@link Version#getArtifactId() artifact id} and use it unless\n2. if artifact id is null or empty, then infer app name using {@link AppNameInferer}\n\n@param appName\nthe app name\n@param packageName\nthe package name of the app\n@return\nan `AppDescriptor` instance",
"Issue the database statements to drop the table associated with a table configuration.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so.",
"Use this API to delete sslcertkey.",
"Returns the name 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\"",
"Use this API to add inat.",
"Sends the error to responder."
] |
public static boolean reconnectContext(RedirectException re, CommandContext ctx) {
boolean reconnected = false;
try {
ConnectionInfo info = ctx.getConnectionInfo();
ControllerAddress address = null;
if (info != null) {
address = info.getControllerAddress();
}
if (address != null && isHttpsRedirect(re, address.getProtocol())) {
LOG.debug("Trying to reconnect an http to http upgrade");
try {
ctx.connectController();
reconnected = true;
} catch (Exception ex) {
LOG.warn("Exception reconnecting", ex);
// Proper https redirect but error.
// Ignoring it.
}
}
} catch (URISyntaxException ex) {
LOG.warn("Invalid URI: ", ex);
// OK, invalid redirect.
}
return reconnected;
} | [
"Reconnect the context if the RedirectException is valid."
] | [
"Formats a date or a time according to the local conventions.\n\nSince ReadablePartials don't support all fields, we fill in any blanks\nneeded for formatting by using the epoch (1970-01-01T00:00:00Z).\n\nSee {@link android.text.format.DateUtils#formatDateTime} for full docs.\n\n@param context the context is required only if the time is shown\n@param time a point in time\n@param flags a bit mask of formatting options\n@return a string containing the formatted date/time.",
"Set the depth of the cursor.\nThis is the length of the ray from the origin\nto the cursor.\n@param depth default cursor depth",
"Use this API to delete dnssuffix of given name.",
"Writes the JavaScript code describing the tags as Tag classes to given writer.",
"Add an addon to the app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param addonName Addon name. See {@link #listAllAddons} to get a list of addons that can be used.\n@return The request object",
"Retrieve a child that matches the given absolute path, starting from the current node.\n\n@param nodePath The path from the object root to the requested child node.\n@return The requested child node or <code>null</code>.",
"Iterate through a set of bit field flags and set the value for each one\nin the supplied container.\n\n@param flags bit field flags\n@param container field container\n@param data source data",
"callers of doLogin should be serialized before calling in.",
"Facade method for operating the Unix-like terminal supporting line editing and command\nhistory.\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Main command handler\n@param input Input stream.\n@param output Output stream.\n@return Shell that can be either further customized or run directly by calling commandLoop()."
] |
public static <T> List<T> copyOf(T[] elements) {
Preconditions.checkNotNull(elements);
return ofInternal(elements.clone());
} | [
"Creates an immutable list that consists of the elements in the given array. A copy of the given array is used which means\nthat any modifications to the given array will not affect the immutable list.\n\n@param elements the given array of elements\n@return an immutable list"
] | [
"We have received an update that invalidates any previous metadata for that player, so clear it out, and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we can have no metadata for the associated player",
"Suite prologue.",
"Rewrites the file passed to 'this' constructor so that the actual line numbers match the recipe passed to 'this'\nconstructor.",
"Insert an entity into the datastore.\n\nThe entity must have no ids.\n\n@return The key for the inserted entity.\n@throws DatastoreException on error",
"Perform the entire sort operation",
"Returns an URI which represents the statement rank in a triple.\n\n@param rank\n@return",
"Initialises JMX stuff.\n@param doRegister if true, perform registration, if false unregister",
"if you have a default, it's automatically optional",
"converts a java.net.URI into a string representation with empty authority, if absent and has file scheme."
] |
public static base_responses add(nitro_service client, cachepolicylabel resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
cachepolicylabel addresources[] = new cachepolicylabel[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new cachepolicylabel();
addresources[i].labelname = resources[i].labelname;
addresources[i].evaluates = resources[i].evaluates;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"Use this API to add cachepolicylabel resources."
] | [
"returns the values of the orientation tag",
"The third method to write caseManager. Its task is to write the call to\nthe story to be run.\n\n@param caseManager\nthe file where the test must be written\n@param storyName\nthe name of the story\n@param test_path\nthe path where the story can be found\n@param user\nthe user requesting the story\n@param feature\nthe feature requested by the user\n@param benefit\nthe benefit provided by the feature\n@throws BeastException",
"Update the lastCheckTime of the given record.\n\n@param id the id\n@param lastCheckTime the new value",
"Converts a class into a signature token.\n\n@param c class\n@return signature token text",
"a small static helper to set a multi state drawable on a view\n\n@param icon\n@param iconColor\n@param selectedIcon\n@param selectedIconColor\n@param tinted\n@param imageView",
"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",
"Get a signature for a list of parameters using the given shared secret.\n\n@param sharedSecret\nThe shared secret\n@param params\nThe parameters\n@return The signature String",
"Convert weekly recurrence days into a bit field.\n\n@param task recurring task\n@return bit field as a string",
"Handles Multi Channel Encapsulation message. Decapsulates\nan Application Command message and handles it using the right\nendpoint.\n@param serialMessage the serial message to process.\n@param offset the offset at which to start procesing."
] |
public static vpntrafficpolicy_vpnglobal_binding[] get(nitro_service service, String name) throws Exception{
vpntrafficpolicy_vpnglobal_binding obj = new vpntrafficpolicy_vpnglobal_binding();
obj.set_name(name);
vpntrafficpolicy_vpnglobal_binding response[] = (vpntrafficpolicy_vpnglobal_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch vpntrafficpolicy_vpnglobal_binding resources of given name ."
] | [
"Create the index file that sets up the frameset.\n@param outputDirectory The target directory for the generated file(s).",
"This method writes resource data to a Planner file.",
"Sets the ProjectCalendar instance from which this calendar is derived.\n\n@param calendar base calendar instance",
"Returns the key value in the given array.\n\n@param keyIndex the index of the scale key",
"Finishes the current box - empties the text line buffer and creates a DOM element from it.",
"Convert a Java date into a Planner date-time string.\n\n20070222T080000Z\n\n@param value Java date\n@return Planner date-time string",
"Build filter for the request.\n\n@param layerFilter layer filter\n@param featureIds features to include in report (null for all)\n@return filter\n@throws GeomajasException filter could not be parsed/created",
"Checks the orderby attribute.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for orderby is invalid (unknown field or ordering)",
"Use this API to add appfwjsoncontenttype resources."
] |
private ModelNode createCPUNode() throws OperationFailedException {
ModelNode cpu = new ModelNode().setEmptyObject();
cpu.get(ARCH).set(getProperty("os.arch"));
cpu.get(AVAILABLE_PROCESSORS).set(ProcessorInfo.availableProcessors());
return cpu;
} | [
"Create a ModelNode representing the CPU the instance is running on.\n\n@return a ModelNode representing the CPU the instance is running on.\n@throws OperationFailedException"
] | [
"Gets whether this registration has an alternative wildcard registration",
"Orders first by word, then by tag.\n\n@param wordTag object to compare to\n@return result (positive if <code>this</code> is greater than\n<code>obj</code>, 0 if equal, negative otherwise)",
"Sets the current field definition derived from the current member, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"access\" optional=\"true\" description=\"The accessibility of the column\" values=\"readonly,readwrite\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the field as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"autoincrement\" optional=\"true\" description=\"Whether the field is\nauto-incremented\" values=\"none,ojb,database\"\[email protected] name=\"column\" optional=\"true\" description=\"The column for the field\"\[email protected] name=\"column-documentation\" optional=\"true\" description=\"Documentation on the column\"\[email protected] name=\"conversion\" optional=\"true\" description=\"The fully qualified name of the\nconversion for the field\"\[email protected] name=\"default-fetch\" optional=\"true\" description=\"The default-fetch setting\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the field\"\[email protected] name=\"id\" optional=\"true\" description=\"The position of the field in the class\ndescriptor\"\[email protected] name=\"indexed\" optional=\"true\" description=\"Whether the field is indexed\"\nvalues=\"true,false\"\[email protected] name=\"jdbc-type\" optional=\"true\" description=\"The jdbc type of the column\"\[email protected] name=\"length\" optional=\"true\" description=\"The length of the column\"\[email protected] name=\"locking\" optional=\"true\" description=\"Whether the field supports locking\"\nvalues=\"true,false\"\[email protected] name=\"nullable\" optional=\"true\" description=\"Whether the field is nullable\"\nvalues=\"true,false\"\[email protected] name=\"precision\" optional=\"true\" description=\"The precision of the column\"\[email protected] name=\"primarykey\" optional=\"true\" description=\"Whether the field is a primarykey\"\nvalues=\"true,false\"\[email protected] name=\"scale\" optional=\"true\" description=\"The scale of the column\"\[email protected] name=\"sequence-name\" optional=\"true\" description=\"The name of the sequence for\nincrementing the field\"\[email protected] name=\"table\" optional=\"true\" description=\"The table of the field (not implemented\nyet)\"\[email protected] name=\"update-lock\" optional=\"true\" description=\"Can be set to false if the persistent attribute is\nused for optimistic locking AND the dbms should update the lock column itself (default is true). Can only be set for\nTIMESTAMP and INTEGER columns\" values=\"true,false\"",
"Populate the model with the object's properties.\n\n@param object object whose properties we're displaying\n@param excludedMethods method names to exclude",
"Map Synchro constraints to MPXJ constraints.\n\n@param task task\n@param row Synchro constraint data",
"Confirms a user with the given token and token id.\n\n@param token the confirmation token.\n@param tokenId the id of the confirmation token.\n@return A {@link Task} that completes when confirmation completes/fails.",
"Transforms each character from this reader by passing it to the given\nclosure. The Closure should return each transformed character, which\nwill be passed to the Writer. The reader and writer will be both be\nclosed before this method returns.\n\n@param self a Reader object\n@param writer a Writer to receive the transformed characters\n@param closure a closure that performs the required transformation\n@throws IOException if an IOException occurs.\n@since 1.5.0",
"Return the equivalence class of the argument. If the argument is not contained in\nand equivalence class, then an empty string is returned.\n\n@param punc\n@return The class name if found. Otherwise, an empty string.",
"Call the appropriate handler for handling the httprequest. 404 if path is not found. 405 if path is found but\nhttpMethod does not match what's configured.\n\n@param request instance of {@code HttpRequest}\n@param responder instance of {@code HttpResponder} to handle the request."
] |
public void loadClassifier(String loadPath, Properties props) throws ClassCastException, IOException, ClassNotFoundException {
InputStream is;
// ms, 10-04-2010: check first is this path exists in our CLASSPATH. This
// takes priority over the file system.
if ((is = loadStreamFromClasspath(loadPath)) != null) {
Timing.startDoing("Loading classifier from " + loadPath);
loadClassifier(is);
is.close();
Timing.endDoing();
} else {
loadClassifier(new File(loadPath), props);
}
} | [
"Loads a classifier from the file specified by loadPath. If loadPath ends in\n.gz, uses a GZIPInputStream, else uses a regular FileInputStream."
] | [
"Get the element at the index as a json object.\n\n@param i the index of the object to access",
"Retrieves and validates the content type from the REST requests\n\n@return true if has content type.",
"Use this API to fetch all the cacheobject resources that are configured on netscaler.",
"Compute the proportional padding for all items in the cache\n@param cache Cache data set\n@return the uniform padding amount",
"Pre API 11, this does an alpha animation.\n\n@param progress",
"Execute a HTTP request and handle common error cases.\n\n@param connection the HttpConnection request to execute\n@return the executed HttpConnection\n@throws CouchDbException for HTTP error codes or if an IOException was thrown",
"Checks whether the property of the given name is allowed for the model element.\n\n@param defClass The class of the model element\n@param propertyName The name of the property\n@return <code>true</code> if the property is allowed for this type of model elements",
"visibility increased for testing",
"This method takes an integer enumeration of a priority\nand returns an appropriate instance of this class. Note that unrecognised\nvalues are treated as medium priority.\n\n@param priority int version of the priority\n@return Priority class instance"
] |
private static <T> Set<Type> getSessionBeanTypes(EnhancedAnnotated<T, ?> annotated, EjbDescriptor<T> ejbDescriptor) {
ImmutableSet.Builder<Type> types = ImmutableSet.builder();
// session beans
Map<Class<?>, Type> typeMap = new LinkedHashMap<Class<?>, Type>();
HierarchyDiscovery beanClassDiscovery = HierarchyDiscovery.forNormalizedType(ejbDescriptor.getBeanClass());
for (BusinessInterfaceDescriptor<?> businessInterfaceDescriptor : ejbDescriptor.getLocalBusinessInterfaces()) {
// first we need to resolve the local interface
Type resolvedLocalInterface = beanClassDiscovery.resolveType(Types.getCanonicalType(businessInterfaceDescriptor.getInterface()));
SessionBeanHierarchyDiscovery interfaceDiscovery = new SessionBeanHierarchyDiscovery(resolvedLocalInterface);
if (beanClassDiscovery.getTypeMap().containsKey(businessInterfaceDescriptor.getInterface())) {
// WELD-1675 Only add types also included in Annotated.getTypeClosure()
for (Entry<Class<?>, Type> entry : interfaceDiscovery.getTypeMap().entrySet()) {
if (annotated.getTypeClosure().contains(entry.getValue())) {
typeMap.put(entry.getKey(), entry.getValue());
}
}
} else {
// Session bean class does not implement the business interface and @javax.ejb.Local applied to the session bean class
typeMap.putAll(interfaceDiscovery.getTypeMap());
}
}
if (annotated.isAnnotationPresent(Typed.class)) {
types.addAll(Beans.getTypedTypes(typeMap, annotated.getJavaClass(), annotated.getAnnotation(Typed.class)));
} else {
typeMap.put(Object.class, Object.class);
types.addAll(typeMap.values());
}
return Beans.getLegalBeanTypes(types.build(), annotated);
} | [
"Bean types of a session bean."
] | [
"Performs backward pass of Batch Normalization layer. Returns x gradient,\nbnScale gradient and bnBias gradient",
"Send ourselves \"updates\" about any tracks that were loaded before we started, or before we were requesting\ndetails, since we missed them.",
"Call rollback on the underlying connection.",
"Set the options based on the tag elements of the ClassDoc parameter",
"Stop offering shared dbserver sessions.",
"Function to add a new Store to the Metadata store. This involves\n\n1. Create a new entry in the ConfigurationStorageEngine for STORES.\n\n2. Update the metadata cache.\n\n3. Re-create the 'stores.xml' key\n\n@param storeDef defines the new store to be created",
"Part of the endOfRun process that needs the database. May be deferred if the database is not available.",
"Returns timezone offset from a session instance. The offset is\nin minutes to UTC time\n\n@param session\nthe session instance\n@return the offset to UTC time in minutes",
"Disables all the overrides for a specific profile\n\n@param model\n@param profileID\n@param clientUUID\n@return"
] |
public static Cluster dropZone(Cluster intermediateCluster, int dropZoneId) {
// Filter out nodes that don't belong to the zone being dropped
Set<Node> survivingNodes = new HashSet<Node>();
for(int nodeId: intermediateCluster.getNodeIds()) {
if(intermediateCluster.getNodeById(nodeId).getZoneId() != dropZoneId) {
survivingNodes.add(intermediateCluster.getNodeById(nodeId));
}
}
// Filter out dropZoneId from all zones
Set<Zone> zones = new HashSet<Zone>();
for(int zoneId: intermediateCluster.getZoneIds()) {
if(zoneId == dropZoneId) {
continue;
}
List<Integer> proximityList = intermediateCluster.getZoneById(zoneId)
.getProximityList();
proximityList.remove(new Integer(dropZoneId));
zones.add(new Zone(zoneId, proximityList));
}
return new Cluster(intermediateCluster.getName(),
Utils.asSortedList(survivingNodes),
Utils.asSortedList(zones));
} | [
"Given a interim cluster with a previously vacated zone, constructs a new\ncluster object with the drop zone completely removed\n\n@param intermediateCluster\n@param dropZoneId\n@return adjusted cluster with the zone dropped"
] | [
"Merges two lists of references, eliminating duplicates in the process.\n\n@param references1\n@param references2\n@return merged list",
"Gets the progress.\n\n@return the progress",
"Log original incoming request\n\n@param requestType\n@param request\n@param history",
"The length of the region left to the completion offset that is part of the\nreplace region.",
"Returns an MBeanServer with the specified name\n\n@param name\n@return",
"create a new instance of the class represented by the no-argument constructor provided\n@param constructor the zero argument constructor for the class\n@return a new instance of the class\n@throws InstantiationException\n@throws ClassNotPersistenceCapableException if the constructor is null or there is an\nexception while trying to create a new instance",
"Gets the Taneja divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Taneja divergence between p and q.",
"Signal that this thread will not log any more messages in the multithreaded\nenvironment",
"Register the given Converter objects with the given target ConverterRegistry.\n@param converters the converter objects: implementing {@link Converter},\n{@link ConverterFactory}, or {@link GenericConverter}\n@param registry the target registry"
] |
private void
executeSubBatch(final int batchId,
RebalanceBatchPlanProgressBar progressBar,
final Cluster batchRollbackCluster,
final List<StoreDefinition> batchRollbackStoreDefs,
final List<RebalanceTaskInfo> rebalanceTaskPlanList,
boolean hasReadOnlyStores,
boolean hasReadWriteStores,
boolean finishedReadOnlyStores) {
RebalanceUtils.printBatchLog(batchId,
logger,
"Submitting rebalance tasks ");
// Get an ExecutorService in place used for submitting our tasks
ExecutorService service = RebalanceUtils.createExecutors(maxParallelRebalancing);
// Sub-list of the above list
final List<RebalanceTask> failedTasks = Lists.newArrayList();
final List<RebalanceTask> incompleteTasks = Lists.newArrayList();
// Semaphores for donor nodes - To avoid multiple disk sweeps
Map<Integer, Semaphore> donorPermits = new HashMap<Integer, Semaphore>();
for(Node node: batchRollbackCluster.getNodes()) {
donorPermits.put(node.getId(), new Semaphore(1));
}
try {
// List of tasks which will run asynchronously
List<RebalanceTask> allTasks = executeTasks(batchId,
progressBar,
service,
rebalanceTaskPlanList,
donorPermits);
RebalanceUtils.printBatchLog(batchId,
logger,
"All rebalance tasks submitted");
// Wait and shutdown after (infinite) timeout
RebalanceUtils.executorShutDown(service, Long.MAX_VALUE);
RebalanceUtils.printBatchLog(batchId,
logger,
"Finished waiting for executors");
// Collects all failures + incomplete tasks from the rebalance
// tasks.
List<Exception> failures = Lists.newArrayList();
for(RebalanceTask task: allTasks) {
if(task.hasException()) {
failedTasks.add(task);
failures.add(task.getError());
} else if(!task.isComplete()) {
incompleteTasks.add(task);
}
}
if(failedTasks.size() > 0) {
throw new VoldemortRebalancingException("Rebalance task terminated unsuccessfully on tasks "
+ failedTasks,
failures);
}
// If there were no failures, then we could have had a genuine
// timeout ( Rebalancing took longer than the operator expected ).
// We should throw a VoldemortException and not a
// VoldemortRebalancingException ( which will start reverting
// metadata ). The operator may want to manually then resume the
// process.
if(incompleteTasks.size() > 0) {
throw new VoldemortException("Rebalance tasks are still incomplete / running "
+ incompleteTasks);
}
} catch(VoldemortRebalancingException e) {
logger.error("Failure while migrating partitions for rebalance task "
+ batchId);
if(hasReadOnlyStores && hasReadWriteStores
&& finishedReadOnlyStores) {
// Case 0
adminClient.rebalanceOps.rebalanceStateChange(null,
batchRollbackCluster,
null,
batchRollbackStoreDefs,
null,
true,
true,
false,
false,
false);
} else if(hasReadWriteStores && finishedReadOnlyStores) {
// Case 4
adminClient.rebalanceOps.rebalanceStateChange(null,
batchRollbackCluster,
null,
batchRollbackStoreDefs,
null,
false,
true,
false,
false,
false);
}
throw e;
} finally {
if(!service.isShutdown()) {
RebalanceUtils.printErrorLog(batchId,
logger,
"Could not shutdown service cleanly for rebalance task "
+ batchId,
null);
service.shutdownNow();
}
}
} | [
"The smallest granularity of rebalancing where-in we move partitions for a\nsub-set of stores. Finally at the end of the movement, the node is\nremoved out of rebalance state\n\n<br>\n\nAlso any errors + rollback procedures are performed at this level itself.\n\n<pre>\n| Case | hasRO | hasRW | finishedRO | Action |\n| 0 | t | t | t | rollback cluster change + swap |\n| 1 | t | t | f | nothing to do since \"rebalance state change\" should have removed everything |\n| 2 | t | f | t | won't be triggered since hasRW is false |\n| 3 | t | f | f | nothing to do since \"rebalance state change\" should have removed everything |\n| 4 | f | t | t | rollback cluster change |\n| 5 | f | t | f | won't be triggered |\n| 6 | f | f | t | won't be triggered |\n| 7 | f | f | f | won't be triggered |\n</pre>\n\n@param batchId Rebalance batch id\n@param batchRollbackCluster Cluster to rollback to if we have a problem\n@param rebalanceTaskPlanList The list of rebalance partition plans\n@param hasReadOnlyStores Are we rebalancing any read-only stores?\n@param hasReadWriteStores Are we rebalancing any read-write stores?\n@param finishedReadOnlyStores Have we finished rebalancing of read-only\nstores?"
] | [
"Converts a class into a signature token.\n\n@param c class\n@return signature token text",
"Seeks forward or backwards to a particular season based on the current date\n\n@param seasonString The season to seek to\n@param direction The direction to seek\n@param seekAmount The number of years to seek",
"Calculates the bounds of the non-transparent parts of the given image.\n@param p the image\n@return the bounds of the non-transparent area",
"Creates the full sentence.\n\n@return the mtas CQL parser sentence condition\n@throws ParseException the parse exception",
"Read a block of data from the FastTrack file and determine if\nit contains a table definition, or columns.\n\n@param blockIndex index of the current block\n@param startIndex start index of the block in the file\n@param blockLength block length",
"lookup current maximum value for a single field in\ntable the given class descriptor was associated.",
"Factory method to do the setup and transformation of inputs\n\n@param matrix a {@link TestMatrixArtifact} loaded by ProctorLoader\n@param loadResult a {@link ProctorLoadResult} which contains result of validation of test definition\n@param functionMapper a given el {@link FunctionMapper}\n@return constructed Proctor object",
"Sends the error to responder.",
"Gets a collection of photo counts for the given date ranges for the calling user.\n\nThis method requires authentication with 'read' permission.\n\n@param dates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@param takenDates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@return A Collection of Photocount objects"
] |
private void deliverDeviceUpdate(final DeviceUpdate update) {
for (DeviceUpdateListener listener : getUpdateListeners()) {
try {
listener.received(update);
} catch (Throwable t) {
logger.warn("Problem delivering device update to listener", t);
}
}
} | [
"Send a device update to all registered update listeners.\n\n@param update the device update that has just arrived"
] | [
"Convert one project file format to another.\n\n@param inputFile input file\n@param outputFile output file\n@throws Exception",
"Tell a device to become tempo master.\n\n@param deviceNumber the device we want to take over the role of tempo master\n\n@throws IOException if there is a problem sending the command to the device\n@throws IllegalStateException if the {@code VirtualCdj} is not active\n@throws IllegalArgumentException if {@code deviceNumber} is not found on the network",
"determinates if this triangle contains the point p.\n@param p the query point\n@return true iff p is not null and is inside this triangle (Note: on boundary is considered inside!!).",
"Copy all of the mappings from the specified map to this one, replacing\nany mappings with the same keys.\n\n@param in the map whose mappings are to be copied",
"Tests if this partition has hit a threshold and signal to the pool watch thread to create new connections\n@param connectionPartition to test for.",
"For use on a slave HC to get all the server groups used by the host\n\n@param hostResource the host resource\n@return the server configs on this host",
"Read relationship data from a PEP file.",
"Returns the resolution of resolving the conflict between a local and remote event using\nthe given conflict resolver.\n\n@param conflictResolver the conflict resolver to use.\n@param documentId the document id related to the conflicted events.\n@param localEvent the conflicted local event.\n@param remoteEvent the conflicted remote event.\n@return the resolution to the conflict.",
"Use this API to create ssldhparam."
] |
public static base_response change(nitro_service client, responderhtmlpage resource) throws Exception {
responderhtmlpage updateresource = new responderhtmlpage();
updateresource.name = resource.name;
return updateresource.perform_operation(client,"update");
} | [
"Use this API to change responderhtmlpage."
] | [
"Roll back to the previous configuration.\n\n@throws GeomajasException\nindicates an unlikely problem with the rollback (see cause)",
"Binds a script bundle to a scene.\n@param scriptBundle\nThe {@code GVRScriptBundle} object containing script binding information.\n@param scene\nThe scene to bind to.\n@throws IOException if script bundle file cannot be read.\n@throws GVRScriptException if script processing error occurs.",
"Format the date for the status messages.\n\n@param date the date to format.\n\n@return the formatted date.",
"Switches DB type.\n\n@param dbName the database type\n@param webapp the webapp name",
"returns an Array with an Objects PK VALUES, with any java-to-sql\nFieldConversion applied. If the Object is a Proxy or a VirtualProxy NO\nconversion is necessary.\n\n@param objectOrProxy\n@return Object[]\n@throws PersistenceBrokerException",
"Sets all padding to the same value.\n@param padding new padding for top, bottom, left, and right, ignored if smaller than 0\n@return this to allow chaining",
"Resolves line alpha based on distance comparing to max distance.\nWhere alpha is close to 0 for maxDistance, and close to 1 to 0 distance.\n\n@param distance line length\n@param maxDistance max line length\n@return line alpha",
"Get the title and read the Title property according the provided locale.\n@return The map from locales to the locale specific titles.",
"Get a property as a object or throw exception.\n\n@param key the property name"
] |
@Override
public String getFirst(String headerName) {
List<String> headerValues = headers.get(headerName);
return headerValues != null ? headerValues.get(0) : null;
} | [
"Return the first header value for the given header name, if any.\n@param headerName the header name\n@return the first header value, or {@code null} if none"
] | [
"Prepares a Jetty server for communicating with consumers.",
"See convertToSQL92.\n\n@return SQL like sub-expression\n@throws IllegalArgumentException oops",
"Gets the argument names of a method call. If the arguments are not VariableExpressions then a null\nwill be returned.\n@param methodCall\nthe method call to search\n@return\na list of strings, never null, but some elements may be null",
"This method is called to format a task type.\n\n@param value task type value\n@return formatted task type",
"Creates all propertyvfsbundle files for the currently loaded translations.\nThe method is used to convert xmlvfsbundle files into propertyvfsbundle files.\n\n@throws CmsIllegalArgumentException thrown if resource creation fails.\n@throws CmsLoaderException thrown if the propertyvfsbundle type can't be read from the resource manager.\n@throws CmsException thrown if creation, type retrieval or locking fails.",
"Check if zone count policy is satisfied\n\n@return whether zone is satisfied",
"Determines if a point is inside a box.",
"Removes the row with the specified key from this association.\n\n@param key the key of the association row to remove",
"Writes task predecessor links to a PM XML file.\n\n@param task MPXJ Task instance"
] |
public Task<Long> count() {
return dispatcher.dispatchTask(new Callable<Long>() {
@Override
public Long call() {
return proxy.count();
}
});
} | [
"Counts the number of documents in the collection.\n\n@return a task containing the number of documents in the collection"
] | [
"Return true if the processor of the node has previously been executed.\n\n@param processorGraphNode the node to test.",
"Create a new custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object",
"Creates the container for a bundle descriptor.\n@return the container for a bundle descriptor.",
"Reads primary key information from current RS row and generates a\n\ncorresponding Identity, and returns a proxy from the Identity.\n\n@throws PersistenceBrokerException\nif there was an error creating the proxy class",
"Used internally to find the solution to a single column vector.",
"Writes a resource assignment to a PM XML file.\n\n@param mpxj MPXJ ResourceAssignment instance",
"Adds search fields from elements on a container page to a container page's document.\n@param document The document for the container page\n@param cms The current CmsObject\n@param resource The resource of the container page\n@param systemFields The list of field names for fields where mappings to should be discarded, since these fields are used system internally.\n@return the manipulated document",
"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",
"Build a request URL using a given scheme.\n\n@param scheme the scheme, either {@code http} or {@code https}\n@param host\nThe host\n@param port\nThe port\n@param path\nThe path\n@param parameters\nThe parameters\n@return The URL\n@throws MalformedURLException"
] |
public synchronized void shutdown(){
if (!this.poolShuttingDown){
logger.info("Shutting down connection pool...");
this.poolShuttingDown = true;
this.shutdownStackTrace = captureStackTrace(SHUTDOWN_LOCATION_TRACE);
this.keepAliveScheduler.shutdownNow(); // stop threads from firing.
this.maxAliveScheduler.shutdownNow(); // stop threads from firing.
this.connectionsScheduler.shutdownNow(); // stop threads from firing.
this.asyncExecutor.shutdownNow();
try {
this.connectionsScheduler.awaitTermination(5, TimeUnit.SECONDS);
this.maxAliveScheduler.awaitTermination(5, TimeUnit.SECONDS);
this.keepAliveScheduler.awaitTermination(5, TimeUnit.SECONDS);
this.asyncExecutor.awaitTermination(5, TimeUnit.SECONDS);
if (this.closeConnectionExecutor != null){
this.closeConnectionExecutor.shutdownNow();
this.closeConnectionExecutor.awaitTermination(5, TimeUnit.SECONDS);
}
} catch (InterruptedException e) {
// do nothing
}
this.connectionStrategy.terminateAllConnections();
unregisterDriver();
registerUnregisterJMX(false);
if (finalizableRefQueue != null) {
finalizableRefQueue.close();
}
logger.info("Connection pool has been shutdown.");
}
} | [
"Closes off this connection pool."
] | [
"A smoothed step function. A cubic function is used to smooth the step between two thresholds.\n@param a the lower threshold position\n@param b the upper threshold position\n@param x the input parameter\n@return the output value",
"Gets the string representation of the path to the current JSON element.\n\n@param key the leaf key",
"Checks if a given number is in the range of an integer.\n\n@param number\na number which should be in the range of an integer (positive or negative)\n\n@see java.lang.Integer#MIN_VALUE\n@see java.lang.Integer#MAX_VALUE\n\n@return number as an integer (rounding might occur)",
"Create a new server group for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception",
"Return a copy of the new fragment and set the variable above.",
"Read general project properties.",
"Determine how many forked JVMs to use.",
"Gets the current instance of plugin manager\n\n@return PluginManager",
"Sets the hostname and port to connect to.\n\n@param hostname the host name\n@param port the port\n\n@return the builder"
] |
public static void closeScope(Object name) {
//we remove the scope first, so that other threads don't see it, and see the next snapshot of the tree
ScopeNode scope = (ScopeNode) MAP_KEY_TO_SCOPE.remove(name);
if (scope != null) {
ScopeNode parentScope = scope.getParentScope();
if (parentScope != null) {
parentScope.removeChild(scope);
} else {
ConfigurationHolder.configuration.onScopeForestReset();
}
removeScopeAndChildrenFromMap(scope);
}
} | [
"Detach a scope from its parent, this will trigger the garbage collection of this scope and it's\nsub-scopes\nif they are not referenced outside of Toothpick.\n\n@param name the name of the scope to close."
] | [
"Compute 2-dimensional Perlin noise.\n@param x the x coordinate\n@param y the y coordinate\n@return noise value at (x,y)",
"Method to close the file caseManager. It is called just one time, by the\nMASReader, once every test and stroy have been added.\n\n@param caseManager",
"Throw IllegalArgumentException if the value is null.\n\n@param name the parameter name.\n@param value the value that should not be null.\n@param <T> the value type.\n@throws IllegalArgumentException if value is null.",
"Register custom filter types especially for serializer of specification json file",
"Determine the enum value corresponding to the third play state found in the packet.\n\n@return the proper value",
"Used by FreeStyle Maven jobs only",
"Add a creatable \"post-run\" dependent for this task item.\n\n@param creatable the creatable \"post-run\" dependent.\n@return the key to be used as parameter to taskResult(string) method to retrieve created \"post-run\" dependent",
"Checks the query-customizer setting of the given collection descriptor.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated",
"This is the main entry point used to convert the internal representation\nof timephased cost into an external form which can\nbe displayed to the user.\n\n@param projectCalendar calendar used by the resource assignment\n@param cost timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range"
] |
public static Filter.Builder makeAncestorFilter(Key ancestor) {
return makeFilter(
DatastoreHelper.KEY_PROPERTY_NAME, PropertyFilter.Operator.HAS_ANCESTOR,
makeValue(ancestor));
} | [
"Makes an ancestor filter."
] | [
"Assign based on execution time history. The algorithm is a greedy heuristic\nassigning the longest remaining test to the slave with the\nshortest-completion time so far. This is not optimal but fast and provides\na decent average assignment.",
"Generates a schedule based on some meta data. The schedule generation\nconsiders short periods.\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@param dateRollConvention Adjustment to be applied to the all dates.\n@param businessdayCalendar Businessday calendar (holiday calendar) to be used for date roll adjustment.\n@param fixingOffsetDays Number of business days to be added to period start to get the fixing date.\n@param paymentOffsetDays Number of business days to be added to period end to get the payment date.\n@return The corresponding schedule\n@deprecated Will be removed in version 2.3",
"Helper method for formatting connection termination messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@param terminationReason\nThe reason for terminating the connection\n@return A formatted message in the format:\n\"[<connectionName>] remote host[<host>] <connectionReason> - <terminationReason>\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG -\nterminated by remote host.",
"Appends a String to the string representation of this number.\n\n@param value a Number\n@param right a String\n@return a String\n@since 1.0",
"Sets the ssh password.\n\n@param password\nthe password\n@return the parallel task builder",
"Add this service to the given service target.\n@param serviceTarget the service target\n@param configuration the bootstrap configuration",
"Use this API to fetch all the ntpserver resources that are configured on netscaler.",
"Record the duration of a put operation, along with the size of the values\nreturned.",
"This is more expensive.\n\n@param key key whose presence in this map is to be tested.\n@return <tt>true</tt> if this map contains a mapping for the specified\nkey."
] |
private static void listTasks(ProjectFile file)
{
SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy HH:mm z");
for (Task task : file.getTasks())
{
Date date = task.getStart();
String text = task.getStartText();
String startDate = text != null ? text : (date != null ? df.format(date) : "(no start date supplied)");
date = task.getFinish();
text = task.getFinishText();
String finishDate = text != null ? text : (date != null ? df.format(date) : "(no finish date supplied)");
Duration dur = task.getDuration();
text = task.getDurationText();
String duration = text != null ? text : (dur != null ? dur.toString() : "(no duration supplied)");
dur = task.getActualDuration();
String actualDuration = dur != null ? dur.toString() : "(no actual duration supplied)";
String baselineDuration = task.getBaselineDurationText();
if (baselineDuration == null)
{
dur = task.getBaselineDuration();
if (dur != null)
{
baselineDuration = dur.toString();
}
else
{
baselineDuration = "(no duration supplied)";
}
}
System.out.println("Task: " + task.getName() + " ID=" + task.getID() + " Unique ID=" + task.getUniqueID() + " (Start Date=" + startDate + " Finish Date=" + finishDate + " Duration=" + duration + " Actual Duration" + actualDuration + " Baseline Duration=" + baselineDuration + " Outline Level=" + task.getOutlineLevel() + " Outline Number=" + task.getOutlineNumber() + " Recurring=" + task.getRecurring() + ")");
}
System.out.println();
} | [
"This method lists all tasks defined in the file.\n\n@param file MPX file"
] | [
"Enables or disabled shadow casting for a direct light.\nEnabling shadows attaches a GVRShadowMap component to the\nGVRSceneObject which owns the light and provides the\ncomponent with an orthographic camera for shadow casting.\n@param enableFlag true to enable shadow casting, false to disable",
"Configure column aliases.",
"Set default value with\n\n@param iso ISO2 of country",
"Reads an argument of type \"number\" from the request.",
"Main entry point used to determine the format used to write\ncalendar exceptions.\n\n@param calendar parent calendar\n@param dayList list of calendar days\n@param exceptions list of exceptions",
"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.",
"Removes all commas from the token list",
"Gets the Searcher for a given variant.\n\n@param variant an identifier to differentiate this Searcher from eventual others.\n@return the corresponding Searcher instance.\n@throws IllegalStateException if no searcher was {@link #create(Searchable) created} before for this {@code variant}.",
"Finds the maximum abs in each column of A and stores it into values\n@param A (Input) Matrix\n@param values (Output) storage for column max abs"
] |
public final void save(final PrintJobStatusExtImpl entry) {
getSession().merge(entry);
getSession().flush();
getSession().evict(entry);
} | [
"Save Job Record.\n\n@param entry the entry"
] | [
"Use this API to fetch vpnvserver_vpnnexthopserver_binding resources of given name .",
"Determines whether this table has a foreignkey of the given name.\n\n@param name The name of the foreignkey\n@return <code>true</code> if there is a foreignkey of that name",
"Await a state.\n\n@param expected the expected state\n@return {@code true} if the state was reached, {@code false} otherwise",
"Get the last modified time for a set of files.",
"Read calendar data from a PEP file.",
"Return the value from the field in the object that is defined by this FieldType.",
"Add the dependencies if the deployment contains a service activator loader entry.\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException",
"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",
"Whether this association contains no rows.\n\n@return {@code true} if this association contains no rows, {@code false} otherwise"
] |
public T withAlias(String text, String languageCode) {
withAlias(factory.getMonolingualTextValue(text, languageCode));
return getThis();
} | [
"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"
] | [
"gets the bytes, sharing the cached array and does not clone it",
"Abort the daemon\n\n@param error the error causing the abortion",
"Mutate the gradient.\n@param amount the amount in the range zero to one",
"Use this API to fetch all the ci resources that are configured on netscaler.",
"Convenience method to set the underlying bean instance for a proxy.\n\n@param proxy the proxy instance\n@param beanInstance the instance of the bean",
"Transform the root bone of the pose by the given matrix.\n@param trans matrix to transform the pose by.",
"Safe write error response.\n\n@param channel the channel\n@param header the request header\n@param error the exception",
"Stop finding signatures for all active players.",
"Turns a series of strings into their corresponding license entities\nby using regular expressions\n\n@param licStrings The list of license strings\n@return A set of license entities"
] |
@Override public Integer[] getUniqueIdentifierArray()
{
Integer[] result = new Integer[m_table.size()];
int index = 0;
for (Integer value : m_table.keySet())
{
result[index] = value;
++index;
}
return (result);
} | [
"This method returns an array containing all of the unique identifiers\nfor which data has been stored in the Var2Data block.\n\n@return array of unique identifiers"
] | [
"make it public for CLI interaction to reuse JobContext",
"Return the available format ids.",
"Load in a number of database configuration entries from a buffered reader.",
"Adds a data set to IIM file.\n\n@param ds\ndata set id (see constants in IIM class)\n@param value\ndata set value. Null values are silently ignored.\n@throws SerializationException\nif value can't be serialized by data set's serializer\n@throws InvalidDataSetException\nif data set isn't defined",
"Use this API to disable snmpalarm resources of given names.",
"Returns current selenium version from JAR set in classpath.\n\n@return Version of Selenium.",
"Method used to write the name of the scenarios methods\n\n@param word\n@return the same word starting with lower case",
"Returns the compact task records for all tasks within the given project,\nordered by their priority within the project. Tasks can exist in more than one project at a time.\n\n@param project The project in which to search for tasks.\n@return Request object",
"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."
] |
public float conditionalLogProb(int[] given, int of) {
if (given.length != windowSize - 1) {
System.err.println("error computing conditional log prob");
System.exit(0);
}
int[] label = indicesFront(given);
float[] masses = new float[label.length];
for (int i = 0; i < masses.length; i++) {
masses[i] = table[label[i]];
}
float z = ArrayMath.logSum(masses);
return table[indexOf(given, of)] - z;
} | [
"given is at the begining, of is at the end"
] | [
"Writes the results of the processing to a CSV file.",
"Returns a spread of integers in a range [0,max) that includes\ncount. The spread is sorted from largest to smallest.",
"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",
"Show or hide the options column dependent on the provided edit mode.\n@param oldMode the old edit mode\n@param newMode the edit mode for which the options column's visibility should be adjusted.",
"Use this API to count dnszone_domain_binding resources configued on NetScaler.",
"Writes the given configuration to the given file.",
"Read task data from a Gantt Designer file.\n\n@param gantt Gantt Designer file",
"This method is used to launch mock agents. First it creates them, with\nthe generic df_service_name \\\"mock_agent\\\", and then the method sends to\nthe agent a message with the new df_service_name and its behaviour.\n\n@param agent_name\nThe name of the mock agent\n@param agent_path\nThe path of the agent, described in\nmocks/jadex/common/Definitions file\n@param configuration\nWhere the new df_service_name and the agents behaviour is\nsaved\n@param scenario\nThe Scenario of the Test",
"Notification that a state transition failed.\n\n@param state the failed transition"
] |
public List<Dependency> getModuleAncestors(final String moduleName, final String moduleVersion) throws GrapesCommunicationException {
final Client client = getClient();
final WebResource resource = client.resource(serverURL).path(RequestUtils.getArtifactAncestors(moduleName, moduleVersion));
final ClientResponse response = resource.queryParam(ServerAPI.SCOPE_COMPILE_PARAM, "true")
.queryParam(ServerAPI.SCOPE_PROVIDED_PARAM, "true")
.queryParam(ServerAPI.SCOPE_RUNTIME_PARAM, "true")
.queryParam(ServerAPI.SCOPE_TEST_PARAM, "true")
.accept(MediaType.APPLICATION_JSON).get(ClientResponse.class);
client.destroy();
if(ClientResponse.Status.OK.getStatusCode() != response.getStatus()){
final String message = String.format(FAILED_TO_GET_MODULE, "get module ancestors", moduleName, moduleVersion);
if(LOG.isErrorEnabled()) {
LOG.error(String.format(HTTP_STATUS_TEMPLATE_MSG, message, response.getStatus()));
}
throw new GrapesCommunicationException(message, response.getStatus());
}
return response.getEntity(new GenericType<List<Dependency>>(){});
} | [
"Return the list of module ancestors\n\n@param moduleName\n@param moduleVersion\n@return List<Dependency>\n@throws GrapesCommunicationException"
] | [
"Replace default values will null, allowing them to be ignored.\n\n@param value value to test\n@return filtered value",
"Seeks to the given season within the given year\n\n@param seasonString\n@param yearString",
"Extracts the zip file to the output folder\n\n@param zipFile ZIP File to extract\n@param outputFolder Output Folder\n@return A Collection with the extracted files\n@throws IOException I/O Error",
"Provide array of String results from inputOutput MFString field named url.\n@array saved in valueDestination",
"Answer the SQL-Clause for a SelectionCriteria\nIf the Criteria references a class with extents an OR-Clause is\nadded for each extent\n@param c SelectionCriteria",
"Writes the torque schemata to files in the given directory and returns\na comma-separated list of the filenames.\n\n@param dir The directory to write the files to\n@return The list of filenames\n@throws IOException If an error occurred",
"Create User Application Properties\nCreate application properties for a user\n@param userId User Id (required)\n@param properties Properties to be updated (required)\n@param aid Application ID (optional)\n@return PropertiesEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Sets the max min.\n\n@param n the new max min",
"Convenience routine to move to the next iterator if needed.\n@return true if the iterator is changed, false if no changes."
] |
public static void generateOutputFile(Random rng,
File outputFile) throws IOException
{
DataOutputStream dataOutput = null;
try
{
dataOutput = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(outputFile)));
for (int i = 0; i < INT_COUNT; i++)
{
dataOutput.writeInt(rng.nextInt());
}
dataOutput.flush();
}
finally
{
if (dataOutput != null)
{
dataOutput.close();
}
}
} | [
"Generates a file of random data in a format suitable for the DIEHARD test.\nDIEHARD requires 3 million 32-bit integers.\n@param rng The random number generator to use to generate the data.\n@param outputFile The file that the random data is written to.\n@throws IOException If there is a problem writing to the file."
] | [
"This method writes resource data to a JSON file.",
"Returns the compact task records for all tasks within the given project,\nordered by their priority within the project.\n\n@param projectId The project in which to search for tasks.\n@return Request object",
"Gets string content from InputStream\n\n@param is InputStream to read\n@return InputStream content",
"Use this API to link sslcertkey.",
"Adds a logical operator block.\n\n@param list parent criteria list\n@param block current block\n@param operator logical operator represented by this block",
"Replaces the model used to depict the controller in the scene.\n\n@param controllerModel root of hierarchy to use for controller model\n@see #getControllerModel()\n@see #showControllerModel(boolean)",
"Cancel request and worker on host.\n\n@param targetHosts\nthe target hosts",
"Extracts baseline work from the MPP file for a specific baseline.\nReturns null if no baseline work is present, otherwise returns\na list of timephased work items.\n\n@param assignment parent assignment\n@param calendar baseline calendar\n@param normaliser normaliser associated with this data\n@param data timephased baseline work data block\n@param raw flag indicating if this data is to be treated as raw\n@return timephased work",
"Prepare a parallel UDP Task.\n\n@param command\nthe command\n@return the parallel task builder"
] |
public static Day getDay(Integer day)
{
Day result = null;
if (day != null)
{
result = DAY_ARRAY[day.intValue()];
}
return (result);
} | [
"Convert MPX day index to Day instance.\n\n@param day day index\n@return Day instance"
] | [
"Ensure that the nodeList is either null or empty.\n\n@param nodeList the nodeList to ensure to be either null or empty\n@param expression the expression was used to fine the nodeList\n@throws SpinXPathException if the nodeList is either null or empty",
"Start a task. The id is needed to end the task\n\n@param id\n@param taskName",
"Called by spring when application context is being destroyed.",
"Initialization that parses the String to a JSON object.\n@param configString The JSON as string.\n@param baseConfig The optional basic search configuration to overwrite (partly) by the JSON configuration.\n@throws JSONException thrown if parsing fails.",
"Adds an option to the Jvm options\n\n@param value the option to add",
"Add a column to be set to a value for UPDATE statements. This will generate something like columnName = 'value'\nwith the value escaped if necessary.",
"return a new managed connection. This connection is wrapped around the real connection and delegates to it\nto get work done.\n@param subject\n@param info\n@return",
"Parse an extended attribute value.\n\n@param file parent file\n@param mpx parent entity\n@param value string value\n@param mpxFieldID field ID\n@param durationFormat duration format associated with the extended attribute",
"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."
] |
public String stripUnnecessaryComments(String javaContent, AntlrOptions options) {
if (!options.isOptimizeCodeQuality()) {
return javaContent;
}
javaContent = stripMachineDependentPaths(javaContent);
if (options.isStripAllComments()) {
javaContent = stripAllComments(javaContent);
}
return javaContent;
} | [
"Remove all unnecessary comments from a lexer or parser file"
] | [
"Creates an attachment from a binary input stream.\nThe content of the stream will be transformed into a Base64 encoded string\n@throws IOException if an I/O error occurs\n@throws java.lang.IllegalArgumentException if mediaType is not binary",
"Given the lambda value perform an implicit QR step on the matrix.\n\nB^T*B-lambda*I\n\n@param lambda Stepping factor.",
"Creates a new HTML-formatted label with the given content.\n\n@param html the label content",
"Build query string.\n@return Query string or null if query string contains no parameters at all.",
"Converts a time represented as an integer to a Date instance.\n\n@param time integer time\n@return Date instance",
"This one picks up on Dan2 ideas, but seeks to make less distinctions\nmid sequence by sorting for long words, but to maintain extra\ndistinctions for short words, by always recording the class of the\nfirst and last two characters of the word.\nCompared to chris2 on which it is based,\nit uses more Unicode classes, and so collapses things like\npunctuation more, and might work better with real unicode.\n\n@param s The String to find the word shape of\n@param omitIfInBoundary If true, character classes present in the\nfirst or last two (i.e., BOUNDARY_SIZE) letters\nof the word are not also registered\nas classes that appear in the middle of the word.\n@param knownLCWords If non-null and non-empty, tag with a \"k\" suffix words\nthat are in this list when lowercased (representing\nthat the word is \"known\" as a lowercase word).\n@return A word shape for the word.",
"Fling the content\n\n@param velocityX The initial velocity in the X direction. Positive numbers mean that the\nfinger/cursor is moving to the left on the screen, which means we want to\nscroll towards the beginning.\n@param velocityY The initial velocity in the Y direction. Positive numbers mean that the\nfinger/cursor is moving down the screen, which means we want to scroll\ntowards the top.\n@param velocityZ TODO: Z-scrolling is currently not supported\n@return",
"Adds the scroll position CSS extension to the given component\n\n@param componentContainer the component to extend\n@param scrollBarrier the scroll barrier\n@param barrierMargin the margin\n@param styleName the style name to set beyond the scroll barrier",
"Create User Application Properties\nCreate application properties for a user\n@param userId User Id (required)\n@param properties Properties to be updated (required)\n@param aid Application ID (optional)\n@return PropertiesEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body"
] |
public void deleteEmailAlias(String emailAliasID) {
URL url = EMAIL_ALIAS_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID(), emailAliasID);
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "DELETE");
BoxAPIResponse response = request.send();
response.disconnect();
} | [
"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."
] | [
"Find a Constructor on the given type that matches the given arguments.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@return a Constructor from the given type that matches the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments",
"Sets the value if the date only should be shown.\n@param dateOnly if the date only should be shown",
"Returns all keys of all rows contained within this association.\n\n@return all keys of all rows contained within this association",
"Show or hide the options column dependent on the provided edit mode.\n@param oldMode the old edit mode\n@param newMode the edit mode for which the options column's visibility should be adjusted.",
"Provides the scrollableList implementation for page scrolling\n@return {@link LayoutScroller.ScrollableList} implementation, passed to {@link LayoutScroller}\nfor the processing the scrolling",
"Return overall per token accuracy",
"Return the parent outline number, or an empty string if\nwe have a root task.\n\n@param outlineNumber child outline number\n@return parent outline number",
"Computes the power of a complex number in polar notation\n\n@param a Complex number\n@param N Power it is to be multiplied by\n@param result Result",
"Returns the count of all inbox messages for the user\n@return int - count of all inbox messages"
] |
public static callhome get(nitro_service service) throws Exception{
callhome obj = new callhome();
callhome[] response = (callhome[])obj.get_resources(service);
return response[0];
} | [
"Use this API to fetch all the callhome resources that are configured on netscaler."
] | [
"OJB can handle only classes that declare at least one primary key attribute,\nthis method checks this condition.\n\n@param realObject The real object to check\n@throws ClassNotPersistenceCapableException thrown if no primary key is specified for the objects class",
"Detects if the current device is a Nintendo game device.\n@return detection of Nintendo",
"Get the property name of a method name. For example the property name of\nsetSomeValue would be someValue. Names not beginning with set or get are\nnot changed.\n\n@param name The name to process\n@return The property name",
"Add a dependency to the module.\n\n@param dependency Dependency",
"Retrieves the members of the given type.\n\n@param memberNames Will receive the names of the members (for sorting)\n@param members Will receive the members\n@param type The type to process\n@param tagName An optional tag for filtering the types\n@param paramName The feature to be added to the Members attribute\n@param paramValue The feature to be added to the Members attribute\n@throws XDocletException If an error occurs",
"Cleans the object key.\n\n@param name Name of the object key\n@return The {@link ValidationResult} object containing the object,\nand the error code(if any)",
"Add an exact path to the routing table.\n\n@throws RouteAlreadyMappedException",
"Runs a Story with the given configuration and steps, applying the given\nmeta filter.\n\n@param configuration the Configuration used to run story\n@param candidateSteps the List of CandidateSteps containing the candidate\nsteps methods\n@param story the Story to run\n@param filter the Filter to apply to the story Meta\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.",
"Button onClick listener.\n\n@param v"
] |
public static void directoryCheck(String dir) throws IOException {
final File file = new File(dir);
if (!file.exists()) {
FileUtils.forceMkdir(file);
}
} | [
"Checks the existence of the directory. If it does not exist, the method creates it.\n\n@param dir the directory to check.\n@throws IOException if fails."
] | [
"EAP 7.0",
"Returns the coordinates of the vertex points of this hull.\n\n@param coords\nreturns the x, y, z coordinates of each vertex. This length of\nthis array must be at least three times the number of\nvertices.\n@return the number of vertices\n@see QuickHull3D#getVertices()\n@see QuickHull3D#getFaces()",
"Read a text file into a single string\n\n@param file\nThe file to read\n@return The contents, or null on error.",
"Returns whether this represents a valid host name or address format.\n@return",
"Singleton of MetaClassRegistry.\n\n@param includeExtension\n@return the registry",
"Gets the string describing the uniforms used by shaders of this type.\n@param ctx GVFContext shader is associated with\n@return uniform descriptor string\n@see #getTemplate(GVRContext) GVRShader#getUniformDescriptor()",
"Print a resource UID.\n\n@param value resource UID value\n@return resource UID string",
"Return the list of module ancestors\n\n@param moduleName\n@param moduleVersion\n@return List<Dependency>\n@throws GrapesCommunicationException",
"Overrides the superclass implementation to allow the AttributeDefinition for each field in the\nobject to in turn resolve that field.\n\n{@inheritDoc}"
] |
public static JRDesignExpression getReportConnectionExpression() {
JRDesignExpression connectionExpression = new JRDesignExpression();
connectionExpression.setText("$P{" + JRDesignParameter.REPORT_CONNECTION + "}");
connectionExpression.setValueClass(Connection.class);
return connectionExpression;
} | [
"Returns a JRDesignExpression that points to the main report connection\n\n@return"
] | [
"Get the value of a primitive type from the request data.\n\n@param fieldName the name of the attribute to get from the request data.\n@param pAtt the primitive attribute.\n@param requestData the data to retrieve the value from.",
"If there is a zero on the diagonal element, the off diagonal element needs pushed\noff so that all the algorithms assumptions are two and so that it can split the matrix.",
"Converts the search results from CmsSearchResource to CmsSearchResourceBean.\n@param searchResults The collection of search results to transform.",
"Search for the attribute \"id\" and return the value.\n\n@return the id of this element or null when not found",
"Write the config to the writer.",
"Serialize a parameterized object to an OutputStream.\n\n@param object The object to serialize.\n@param parameterizedType The ParameterizedType describing the object. Ex: LoganSquare.serialize(object, new ParameterizedType<MyModel<OtherModel>>() { }, os);\n@param os The OutputStream being written to.",
"Use this API to fetch all the tmsessionparameter resources that are configured on netscaler.",
"Backup the current configuration as part of the patch history.\n\n@throws IOException for any error",
"Returns the number of consecutive leading one or zero bits.\nIf network is true, returns the number of consecutive leading one bits.\nOtherwise, returns the number of consecutive leading zero bits.\n\n@param network\n@return"
] |
public static String entityToString(HttpEntity entity) throws IOException {
if (entity != null) {
InputStream is = entity.getContent();
return IOUtils.toString(is, "UTF-8");
}
return "";
} | [
"Converts the http entity to string. If entity is null, returns empty string.\n@param entity\n@return\n@throws IOException"
] | [
"Adjust the date according to the whole day options.\n\n@param date the date to adjust.\n@param isEnd flag, indicating if the date is the end of the event (in contrast to the beginning)\n\n@return the adjusted date, which will be exactly the beginning or the end of the provide date's day.",
"Use this API to fetch all the autoscaleprofile resources that are configured on netscaler.",
"Sets the header of the collection component.",
"Check the given JWT\n\n@param jwtString the JSON Web Token\n@return the parsed and verified token or null if token is invalid\n@throws ParseException if the token cannot be parsed",
"Adds a free connection.\n\n@param connectionHandle\n@throws SQLException on error",
"Generate an ordered set of column definitions from an ordered set of column names.\n\n@param columns column definitions\n@param order column names\n@return ordered set of column definitions",
"Start with specifying the groupId",
"performs an INSERT operation against RDBMS.\n@param obj The Object to be inserted as a row of the underlying table.\n@param cld ClassDescriptor providing mapping information.",
"parse when there are two date-times"
] |
void stop() {
try {
dm.stop(getBundleContext());
} catch (DirectoryMonitoringException e) {
LOG.error("Failed to stop " + DirectoryMonitor.class.getName() + " for the directory " + monitoredDirectory, e);
}
declarationsFiles.clear();
declarationRegistrationManager.unregisterAll();
} | [
"This method must be called on the stop of the component. Stop the directory monitor and unregister all the\ndeclarations."
] | [
"Runs the given xpath and returns a boolean result.",
"Create all the links possible between the DeclarationBinder and all the ImportDeclaration matching the.\nImportDeclarationFilter of the Linker.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder",
"Digest format to layer file name.\n\n@param digest\n@return",
"If task completed success or failure from response.\n\n@param myResponse\nthe my response\n@return true, if successful",
"Gets as many of the requested bytes as available from this buffer.\n\n@return number of bytes actually got from this buffer (0 if no bytes are available)",
"Reads the next chunk for the intermediate work buffer.",
"Create a random permutation of the numbers 0, ..., size - 1.\n\nsee Algorithm P, D.E. Knuth: The Art of Computer Programming, Vol. 2, p. 145",
"Set OAuth 1 authentication credentials for the replication target\n\n@param consumerSecret client secret\n@param consumerKey client identifier\n@param tokenSecret OAuth server token secret\n@param token OAuth server issued token\n@return this Replication instance to set more options or trigger the replication",
"Decide which donor node to steal from. This is a policy implementation.\nI.e., in the future, additional policies could be considered. At that\ntime, this method should be overridden in a sub-class, or a policy object\nought to implement this algorithm.\n\nCurrent policy:\n\n1) If possible, a stealer node that is the zone n-ary in the finalCluster\nsteals from the zone n-ary in the currentCluster in the same zone.\n\n2) If there are no partition-stores to steal in the same zone (i.e., this\nis the \"zone expansion\" use case), then a differnt policy must be used.\nThe stealer node that is the zone n-ary in the finalCluster determines\nwhich pre-existing zone in the currentCluster hosts the primary partition\nid for the partition-store. The stealer then steals the zone n-ary from\nthat pre-existing zone.\n\nThis policy avoids unnecessary cross-zone moves and distributes the load\nof cross-zone moves approximately-uniformly across pre-existing zones.\n\nOther policies to consider:\n\n- For zone expansion, steal all partition-stores from one specific\npre-existing zone.\n\n- Replace heuristic to approximately uniformly distribute load among\nexisting zones to something more concrete (i.e. track steals from each\npre-existing zone and forcibly balance them).\n\n- Select a single donor for all replicas in a new zone. This will require\ndonor-based rebalancing to be run (at least for this specific part of the\nplan). This would reduce the number of donor-side scans of data. (But\nstill send replication factor copies over the WAN.) This would require\napparatus in the RebalanceController to work.\n\n- Set up some sort of chain-replication in which a single stealer in the\nnew zone steals some replica from a pre-exising zone, and then other\nn-aries in the new zone steal from the single cross-zone stealer in the\nzone. This would require apparatus in the RebalanceController to work.\n\n@param currentSRP\n@param finalSRP\n@param stealerZoneId\n@param stealerNodeId\n@param stealerPartitionId\n@return the node id of the donor for this partition Id."
] |
@UiThread
public int getParentAdapterPosition() {
int flatPosition = getAdapterPosition();
if (flatPosition == RecyclerView.NO_POSITION) {
return flatPosition;
}
return mExpandableAdapter.getNearestParentPosition(flatPosition);
} | [
"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."
] | [
"Merges information from the resource root into this resource root\n\n@param additionalResourceRoot The root to merge",
"Use this API to fetch csvserver_cmppolicy_binding resources of given name .",
"Returns the vertex with given ID framed into given interface.",
"Configs created by this ConfigBuilder will use the given Redis master name.\n\n@param masterName the Redis set of sentinels\n@return this ConfigBuilder",
"Retrieve and validate the timeout value from the REST request.\n\"X_VOLD_REQUEST_TIMEOUT_MS\" is the timeout header.\n\n@return true if present, false if missing",
"Computes the p=1 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm.",
"Utility function that fetches user defined store definitions\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch store definitions from\n@return The map container that maps store names to store definitions",
"Checks if the given operator code is a valid one.\n\n@param operatorCode an operator code to evaluate\n@throws IllegalStateException if operatorCode is not a known operator code.",
"Returns a list of the compact representation of all of the custom fields in a workspace.\n\n@param workspace The workspace or organization to find custom field definitions in.\n@return Request object"
] |
public static void createDirectory(Path dir, String dirDesc)
{
try
{
Files.createDirectories(dir);
}
catch (IOException ex)
{
throw new WindupException("Error creating " + dirDesc + " folder: " + dir.toString() + " due to: " + ex.getMessage(), ex);
}
} | [
"Creates the given directory. Fails if it already exists."
] | [
"Return the numeric distance value in degrees.\n\n@return the degrees",
"Returns a list that contains all the entries of the given iterator in the same order.\n\n@param iterator\nthe iterator. May not be <code>null</code>.\n@return a list with the same entries as the given iterator. Never <code>null</code>.",
"Use this API to update dospolicy.",
"Determines whether there is an element of the collection that evaluates to true\nfor the predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tTrue if there is an element of the collection that evaluates to true\nfor the predicate, otherwise false.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.",
"Returns the index of the eigenvalue which has the smallest magnitude.\n\n@return index of the smallest magnitude eigen value.",
"Recursively descend through the hierarchy creating tasks.\n\n@param parent parent task\n@param parentName parent name\n@param rows rows to add as tasks to this parent",
"Use this API to fetch ipset_nsip6_binding resources of given name .",
"Polls from the location header and updates the polling state with the\npolling response for a PUT operation.\n\n@param pollingState the polling state for the current operation.\n@param <T> the return type of the caller.",
"Reads Phoenix resource assignments.\n\n@param mpxjResource MPXJ resource\n@param res Phoenix resource"
] |
public String getProperty(String key, String defaultValue) {
return mProperties.getProperty(key, defaultValue);
} | [
"Gets a property with a default value.\n@param key\nThe key string.\n@param defaultValue\nThe default value.\n@return The property string."
] | [
"Ensure that all logs are replayed, any other logs can not be added before end of this function.",
"Get list of asynchronous operations on this node. By default, only the\npending operations are returned.\n\n@param showCompleted Show completed operations\n@return A list of operation ids.",
"Post-configure retreival of server engine.",
"Returns the item at the specified position.\n\n@param position index of the item to return\n@return the item at the specified position or {@code null} when not found",
"end class CoNLLIterator",
"Read resource data.",
"By the time we reach this method, we should be looking at the SQLite\ndatabase file itself.\n\n@param file SQLite database file\n@return ProjectFile instance",
"Parses a PDF document and serializes the resulting DOM tree to an output. This requires\na DOM Level 3 capable implementation to be available.",
"Private helper method which decodes the Stitch error from the body of an HTTP `Response`\nobject. If the error is successfully decoded, this function will throw the error for the end\nuser to eventually consume. If the error cannot be decoded, this is likely not an error from\nthe Stitch server, and this function will return an error message that the calling function\nshould use as the message of a StitchServiceException with an unknown code."
] |
public static void setFilterBoxStyle(TextField searchBox) {
searchBox.setIcon(FontOpenCms.FILTER);
searchBox.setPlaceholder(
org.opencms.ui.apps.Messages.get().getBundle(UI.getCurrent().getLocale()).key(
org.opencms.ui.apps.Messages.GUI_EXPLORER_FILTER_0));
searchBox.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
} | [
"Configures a text field to look like a filter box for a table.\n\n@param searchBox the text field to configure"
] | [
"Get the available sizes of a Photo.\n\nThe boolean toggle allows to (api-)sign the call.\n\nThis way the calling user can retrieve sizes for <b>his own</b> private photos.\n\n@param photoId\nThe photo ID\n@param sign\ntoggle to allow optionally signing the call (Authenticate)\n@return A collection of {@link Size}\n@throws FlickrException",
"Tries to load a class using the specified ResourceLoader. Returns null if the class is not found.\n@param className\n@param resourceLoader\n@return the loaded class or null if the given class cannot be loaded",
"Recursively update parent task dates.\n\n@param parentTask parent task",
"Record the resource request wait time in us\n\n@param dest Destination of the socket for which the resource was\nrequested. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param resourceRequestTimeUs The number of us to wait before getting a\nsocket",
"This method is called to format a priority.\n\n@param value priority instance\n@return formatted priority value",
"converts a java.net.URI into a string representation with empty authority, if absent and has file scheme.",
"This method performs a series of permissions checks given a directory and properties file path.\n\n1 - Check whether the parent directory dirPath has proper execute and read permissions\n2 - Check whether properties file path is readable and writable\n\nIf either of the permissions checks fail, update validFilePermissions and filePermissionsProblemPath\nappropriately.",
"Creates the main component of the editor with all sub-components.\n@return the completely filled main component of the editor.\n@throws IOException thrown if setting the table's content data source fails.\n@throws CmsException thrown if setting the table's content data source fails.",
"Writes the torque schemata to files in the given directory and returns\na comma-separated list of the filenames.\n\n@param dir The directory to write the files to\n@return The list of filenames\n@throws IOException If an error occurred"
] |
public RuntimeParameter addParameter(String key, String value)
{
RuntimeParameter jp = new RuntimeParameter();
jp.setJi(this.getId());
jp.setKey(key);
jp.setValue(value);
return jp;
} | [
"Helper method to add a parameter without having to create it explicitely. The created parameter should be persisted afterwards.\n\n@param key\nname of the parameter to add\n@param value\nvalue of the parameter to create\n@return the newly created parameter"
] | [
"Performs the transformation.\n\n@return True if the file was modified.",
"Set all unknown fields\n@param unknownFields the new unknown fields",
"Read project calendars.",
"Get logs for an app by specifying additional parameters.\n@param logRequest See {LogRequestBuilder}\n@return log stream response",
"Generates the points for an arc based on two bearings from a centre point\nand a radius.\n\n@param center The LatLong point of the center.\n@param startBearing North is 0 degrees, East is 90 degrees, etc.\n@param endBearing North is 0 degrees, East is 90 degrees, etc.\n@param radius In metres\n@return An array of LatLong points in an MVC array representing the arc.\nUsing this method directly you will need to push the centre point onto\nthe array in order to close it, if desired.",
"Write a message to the console.\n\n@param pattern\nA {@link String#format(String, Object...)} pattern\n@param parameters\nOptional parameters to plug into the pattern",
"Call the no-arg constructor for the given class\n\n@param <T> The type of the thing to construct\n@param klass The class\n@return The constructed thing",
"Use this API to fetch sslservice resource of given name .",
"Create the close button UI Component.\n@return the close button."
] |
public static dnsnsecrec get(nitro_service service, String hostname) throws Exception{
dnsnsecrec obj = new dnsnsecrec();
obj.set_hostname(hostname);
dnsnsecrec response = (dnsnsecrec) obj.get_resource(service);
return response;
} | [
"Use this API to fetch dnsnsecrec resource of given name ."
] | [
"Adds main report query.\n\n@param text\n@param language use constants from {@link DJConstants}\n@return",
"Support the range subscript operator for CharSequence\n\n@param text a CharSequence\n@param range a Range\n@return the subsequence CharSequence\n@since 1.0",
"Little helper function that recursivly deletes a directory.\n\n@param dir The directory",
"Cut all characters from maxLength and replace it with \"...\"",
"Initializes communication with the Z-Wave controller stick.",
"Sets the permissions associated with this shared link.\n@param permissions the new permissions for this shared link.",
"Upload a photo from a byte-array.\n\n@param data\nThe photo data as a byte array\n@param metaData\nThe meta data\n@return photoId or ticketId\n@throws FlickrException",
"Call the no-arg constructor for the given class\n\n@param <T> The type of the thing to construct\n@param klass The class\n@return The constructed thing",
"Returns whether this address contains the non-zero host addresses in other.\n@param other\n@return"
] |
public static ServiceFuture<Void> fromBody(final Completable completable, final ServiceCallback<Void> callback) {
final ServiceFuture<Void> serviceFuture = new ServiceFuture<>();
completable.subscribe(new Action0() {
Void value = null;
@Override
public void call() {
if (callback != null) {
callback.success(value);
}
serviceFuture.set(value);
}
}, new Action1<Throwable>() {
@Override
public void call(Throwable throwable) {
if (callback != null) {
callback.failure(throwable);
}
serviceFuture.setException(throwable);
}
});
return serviceFuture;
} | [
"Creates a ServiceFuture from an Completable object and a callback.\n\n@param completable the completable to create from\n@param callback the callback to call when event happen\n@return the created ServiceFuture"
] | [
"Return true if the expression is a constructor call on a class that matches the supplied.\n@param expression - the expression\n@param classNamePattern - the possible List of class names\n@return as described",
"Reads an HTML snippet with the given name.\n\n@return the HTML data",
"Starts recursive delete on all delete objects object graph",
"The nullity of the decomposed matrix.\n\n@see SingularOps_DDRM#nullity(SingularValueDecomposition_F64, double)\n\n@return The matrix's nullity",
"Computes the rank of a matrix using the specified tolerance.\n\n@param A Matrix whose rank is to be calculated. Not modified.\n@param threshold The numerical threshold used to determine a singular value.\n@return The matrix's rank.",
"Scans a single class for Swagger annotations - does not invoke ReaderListeners",
"Modify a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder",
"Gets the first value for the key.\n\n@param key the key to check for the value\n\n@return the value or {@code null} if the key is not found or the value was {@code null}",
"Sets the bytecode compatibility mode\n\n@param version the bytecode compatibility mode"
] |
public static appfwjsoncontenttype get(nitro_service service, String jsoncontenttypevalue) throws Exception{
appfwjsoncontenttype obj = new appfwjsoncontenttype();
obj.set_jsoncontenttypevalue(jsoncontenttypevalue);
appfwjsoncontenttype response = (appfwjsoncontenttype) obj.get_resource(service);
return response;
} | [
"Use this API to fetch appfwjsoncontenttype resource of given name ."
] | [
"1-D Gaussian function.\n\n@param x value.\n@return Function's value at point x.",
"Returns true if string starts and ends with double-quote\n@param str\n@return",
"Sets the target hosts from line by line text.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the parallel task builder\n@throws TargetHostsLoadException\nthe target hosts load exception",
"Check if there is an attribute which tells us which concrete class is to be instantiated.",
"Reads and sets the next feed in the stream.",
"Static factory method.\n\n@param targetVariable\nthe variable to find the effective {@code putfield} or\n{@code putstatic} instruction for.\n@param controlFlowBlocks\nall control flow blocks of an initialising constructor or\nmethod.\n@return a new instance of this class.",
"Checks if a given number is in the range of a double.\n\n@param number\na number which should be in the range of a double (positive or negative)\n\n@see java.lang.Double#MIN_VALUE\n@see java.lang.Double#MAX_VALUE\n\n@return number as a double",
"Iterates through the given CharSequence line by line, splitting each line using\nthe given regex delimiter. The list of tokens for each line is then passed to\nthe given closure.\n\n@param self a CharSequence\n@param regex the delimiting regular expression\n@param closure a closure\n@return the last value returned by the closure\n@throws java.io.IOException if an error occurs\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see #splitEachLine(CharSequence, java.util.regex.Pattern, groovy.lang.Closure)\n@since 1.8.2",
"Returns the perma link for the given resource and optional detail content.<p<\n\n@param cms the CMS context to use\n@param resourceName the page to generate the perma link for\n@param detailContentId the structure id of the detail content (may be null)\n\n@return the perma link"
] |
public Set<String> rangeByLex(final LexRange lexRange) {
return doWithJedis(new JedisCallable<Set<String>>() {
@Override
public Set<String> call(Jedis jedis) {
if (lexRange.hasLimit()) {
return jedis.zrangeByLex(getKey(), lexRange.from(), lexRange.to(), lexRange.offset(), lexRange.count());
} else {
return jedis.zrangeByLex(getKey(), lexRange.from(), lexRange.to());
}
}
});
} | [
"When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command returns all the elements in the sorted set with a value in the given range.\nIf the elements in the sorted set have different scores, the returned elements are unspecified.\n@param lexRange\n@return the range of elements"
] | [
"Reads characters into a portion of an array, then replace invalid XML characters\n\n@throws IOException If an I/O error occurs\n@see ru.yandex.qatools.allure.config.AllureNamingUtils#isBadXmlCharacter(char) by space",
"Gets a SerialMessage with the MULTI INSTANCE GET command.\nReturns the number of instances for this command class.\n@param the command class to return the number of instances for.\n@return the serial message.",
"Function to serialize the given list of Vector clocks into a string. If\nsomething goes wrong, it returns an empty string.\n\n@param vectorClocks The Vector clock list to serialize\n@return The string (JSON) version of the specified Vector clock",
"Starts the transition",
"Method used to update fields with values received from API.\n@param jsonObject JSON-encoded info about File Version object.",
"Write a project file in SDEF format to an output stream.\n\n@param projectFile ProjectFile instance\n@param out output stream",
"Return the discount factor within a given model context for a given maturity.\n@param model The model used as a context (not required for this class).\n@param maturity The maturity in terms of ACT/365 daycount form this curve reference date. Note that this parameter might get rescaled to a different time parameter.\n@see net.finmath.marketdata.model.curves.DiscountCurveInterface#getDiscountFactor(net.finmath.marketdata.model.AnalyticModelInterface, double)",
"flush all messages to disk\n\n@param force flush anyway(ignore flush interval)",
"Gets the SerialMessage as a byte array.\n@return the message"
] |
static ItemIdValueImpl fromIri(String iri) {
int separator = iri.lastIndexOf('/') + 1;
try {
return new ItemIdValueImpl(iri.substring(separator), iri.substring(0, separator));
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("Invalid Wikibase entity IRI: " + iri, e);
}
} | [
"Parses an item IRI\n\n@param iri\nthe item IRI like http://www.wikidata.org/entity/Q42\n@throws IllegalArgumentException\nif the IRI is invalid or does not ends with an item id"
] | [
"Determine if a CharSequence can be parsed as a BigDecimal.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isBigDecimal(String)\n@since 1.8.2",
"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",
"Migrate to Jenkins \"Credentials\" plugin from the old credential implementation",
"Add a new script\n\n@param model\n@param name\n@param script\n@return\n@throws Exception",
"Specify the class represented by this `ClassNode` extends\na class with the name specified\n@param name the name of the parent class\n@return this `ClassNode` instance",
"Complete timing the operation with the given identifier. If you had not previously started a timing operation with this identifier, then this\nwill effectively be a noop.",
"Read all task relationships from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file",
"Add tasks to the tree.\n\n@param parentNode parent tree node\n@param parent parent task container",
"Populates a ProjectCalendarWeek instance from Asta work pattern data.\n\n@param week target ProjectCalendarWeek instance\n@param workPatternID target work pattern ID\n@param workPatternMap work pattern data\n@param timeEntryMap time entry map\n@param exceptionTypeMap exception type map"
] |
public static base_response unset(nitro_service client, inatparam resource, String[] args) throws Exception{
inatparam unsetresource = new inatparam();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of inatparam resource.\nProperties that need to be unset are specified in args array."
] | [
"Add statistics about a created map.\n\n@param mapContext the\n@param mapValues the",
"Configs created by this ConfigBuilder will have the given Redis hostname.\n\n@param host the Redis hostname\n@return this ConfigBuilder",
"Get layer style by name.\n\n@param name layer style name\n@return layer style",
"Gets Widget bounds height\n@return height",
"Use this API to fetch all the cacheobject resources that are configured on netscaler.",
"Return configuration tweaks in a format appropriate for ness-jdbc DatabaseModule.",
"binds the objects primary key and locking values to the statement, BRJ",
"Sets the highlight strength for the InnerPaddingOutline.\n\n@param _highlightStrength The highlighting value for the outline.",
"Given a method node, checks if we are calling a private method from an inner class."
] |
static void checkUpgradeConditions(final UpgradeCondition condition, final InstallationManager.MutablePatchingTarget target) throws PatchingException {
// See if the prerequisites are met
for (final String required : condition.getRequires()) {
if (!target.isApplied(required)) {
throw PatchLogger.ROOT_LOGGER.requiresPatch(required);
}
}
// Check for incompatibilities
for (final String incompatible : condition.getIncompatibleWith()) {
if (target.isApplied(incompatible)) {
throw PatchLogger.ROOT_LOGGER.incompatiblePatch(incompatible);
}
}
} | [
"Check whether the patch can be applied to a given target.\n\n@param condition the conditions\n@param target the target\n@throws PatchingException"
] | [
"Cut the message content to the configured length.\n\n@param event the event",
"Normalizes elements in 'u' by dividing by max and computes the norm2 of the normalized\narray u. Adjust the sign of the returned value depending on the size of the first\nelement in 'u'. Normalization is done to avoid overflow.\n\n<pre>\nfor i=j:numRows\nu[i] = u[i] / max\ntau = tau + u[i]*u[i]\nend\ntau = sqrt(tau)\nif( u[j] < 0 )\ntau = -tau;\n</pre>\n\n@param j Element in 'u' that it starts at.\n@param numRows Element in 'u' that it stops at.\n@param u Array\n@param max Max value in 'u' that is used to normalize it.\n@return norm2 of 'u'",
"calculate and set position to menu items",
"Internal method that adds a metadata provider to the set associated with a particular hash key, creating the\nset if needed.\n\n@param key the hashKey identifying the media for which this provider can offer metadata (or the empty string if\nit can offer metadata for all media)\n@param provider the metadata provider to be added to the active set",
"Use this API to fetch snmpalarm resources of given names .",
"Use this API to fetch the statistics of all vpath_stats resources that are configured on netscaler.",
"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.",
"Returns all program element docs that have a visibility greater or\nequal than the specified level",
"Use this API to fetch all the systemeventhistory resources that are configured on netscaler.\nThis uses systemeventhistory_args which is a way to provide additional arguments while fetching the resources."
] |
private void writeImages() {
for (ValueMap gv : this.valueMaps) {
gv.writeImage();
}
try (PrintStream out = new PrintStream(
ExampleHelpers.openExampleFileOuputStream("map-site-count.csv"))) {
out.println("Site key,Number of geo items");
out.println("wikidata total," + this.count);
for (Entry<String, Integer> entry : this.siteCounts.entrySet()) {
out.println(entry.getKey() + "," + entry.getValue());
}
} catch (IOException e) {
e.printStackTrace();
}
} | [
"Writes image files for all data that was collected and the statistics\nfile for all sites."
] | [
"Adds to this set all of the elements in the specified map of members and their score.\n@param scoredMember the members to add together with their scores\n@return the number of members actually added",
"Append the text at the end of the File, using a specified encoding.\n\n@param file a File\n@param text the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0",
"Use this API to fetch ipset resource of given name .",
"Check, if the current user has permissions on the document's resource.\n@param cms the context\n@param doc the solr document (from the search result)\n@param filter the resource filter to use for checking permissions\n@return <code>true</code> iff the resource mirrored by the search result can be read by the current user.",
"Use this API to enable nsacl6 resources of given names.",
"Put features in a tile. This will assure all features are only added in one tile. When a feature's unique tile\nis different from this one a link is added in the tile.\n\n@param tile\ntile to put features in\n@param maxTileExtent\nthe maximum tile extent\n@throws GeomajasException oops",
"Use this API to fetch all the csparameter resources that are configured on netscaler.",
"Return the IP address as text such as \"192.168.1.15\".",
"Invoked by subclasses; performs actual file roll. Tests to see whether roll\nis necessary have already been performed, so just do it."
] |
public void rememberAndDisableQuota() {
for(Integer nodeId: nodeIds) {
boolean quotaEnforcement = Boolean.parseBoolean(adminClient.metadataMgmtOps.getRemoteMetadata(nodeId,
MetadataStore.QUOTA_ENFORCEMENT_ENABLED_KEY)
.getValue());
mapNodeToQuotaEnforcingEnabled.put(nodeId, quotaEnforcement);
}
adminClient.metadataMgmtOps.updateRemoteMetadata(nodeIds,
MetadataStore.QUOTA_ENFORCEMENT_ENABLED_KEY,
Boolean.toString(false));
} | [
"Before cluster management operations, i.e. remember and disable quota\nenforcement settings"
] | [
"Get the active operation.\n\n@param id the active operation id\n@return the active operation, {@code null} if if there is no registered operation",
"Returns values aggregated from all the delegates, without overriding\nvalues that already exist.\n\n@return The Map of aggregated values",
"Factory method, validates the given triplet year, month and dayOfMonth.\n\n@param prolepticYear the International fixed proleptic-year\n@param month the International fixed month, from 1 to 13\n@param dayOfMonth the International fixed day-of-month, from 1 to 28 (29 for Leap Day or Year Day)\n@return the International fixed date\n@throws DateTimeException if the date is invalid",
"interceptors, decorators and observers go first",
"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",
"Write a list of custom field attributes.",
"Links the given widget to InstantSearch according to the interfaces it implements.\n\n@param widget a widget implementing ({@link AlgoliaResultsListener} || {@link AlgoliaErrorListener} || {@link AlgoliaSearcherListener}).",
"Populates a calendar instance.\n\n@param record MPX record\n@param calendar calendar instance\n@param isBaseCalendar true if this is a base calendar",
"Returns true if the default profile for the specified uuid is active\n\n@return true if active, otherwise false"
] |
@SuppressWarnings("unchecked")
public final FluentModelImplT withoutTag(String key) {
if (this.inner().getTags() != null) {
this.inner().getTags().remove(key);
}
return (FluentModelImplT) this;
} | [
"Removes a tag from the resource.\n@param key the key of the tag to remove\n@return the next stage of the definition/update"
] | [
"Add a 'IS NULL' clause so the column must be null. '=' NULL does not work.",
"Trade the request token for an access token, this is step three of authorization.\n@param oAuthRequestToken\nthis is the token returned by the {@link AuthInterface#getRequestToken} call.\n@param verifier",
"Construct a pretty string documenting progress for this batch plan thus\nfar.\n\n@return pretty string documenting progress",
"Adds all pairs from 'fromMap' to 'toMap' excluding once that matching the pattern",
"Append the given path segments to the existing path of this builder.\nEach given path segment may contain URI template variables.\n@param pathSegments the URI path segments\n@return this UriComponentsBuilder",
"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.",
"Returns the master mode's editor state for editing a bundle with descriptor.\n@return the master mode's editor state for editing a bundle with descriptor.",
"Returns a copy of this year-quarter with the new year and quarter, checking\nto see if a new object is in fact required.\n\n@param newYear the year to represent, validated from MIN_YEAR to MAX_YEAR\n@param newQuarter the quarter-of-year to represent, validated not null\n@return the year-quarter, not null",
"Update the context session to mark a user logged in\n\n@param userIdentifier\nthe user identifier, could be either userId or username"
] |
@Api
public void setNamedRoles(Map<String, List<NamedRoleInfo>> namedRoles) {
this.namedRoles = namedRoles;
ldapRoleMapping = new HashMap<String, Set<String>>();
for (String roleName : namedRoles.keySet()) {
if (!ldapRoleMapping.containsKey(roleName)) {
ldapRoleMapping.put(roleName, new HashSet<String>());
}
for (NamedRoleInfo role : namedRoles.get(roleName)) {
ldapRoleMapping.get(roleName).add(role.getName());
}
}
} | [
"Set the named roles which may be defined.\n\n@param roles map with roles, keys are the values for {@link #rolesAttribute}, probably DN values\n@since 1.10.0"
] | [
"Initialize the local plugins registry\n@param context the servlet context necessary to grab\nthe files inside the servlet.\n@return the set of local plugins organized by name",
"Set dates where the event should not take place, even if they are part of the series.\n@param dates dates to set.",
"Recycles the Renderer getting it from the tag associated to the renderer root view. This view\nis not used with RecyclerView widget.\n\n@param convertView that contains the tag.\n@param content to be updated in the recycled renderer.\n@return a recycled renderer.",
"Calls the httpHandler method.",
"Add a \"post-run\" dependent task item for this task item.\n\n@param dependent the \"post-run\" dependent task item.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependent task group",
"Utility method to register a proxy has a Service in OSGi.",
"Clears the dest ColumnBuffer and inserts all entries in dest where the timestamp passes the\ntimestampTest.\n\n@param dest Destination ColumnBuffer\n@param timestampTest Test to determine which timestamps get added to dest",
"Calculate start dates for a monthly absolute recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Read a task from a ConceptDraw PROJECT file.\n\n@param projectIdentifier parent project identifier\n@param map outline number to task map\n@param task ConceptDraw PROJECT task"
] |
public static int restrictRange(int value, int min, int max)
{
return Math.min((Math.max(value, min)), max);
} | [
"If the specified value is not greater than or equal to the specified minimum and\nless than or equal to the specified maximum, adjust it so that it is.\n@param value The value to check.\n@param min The minimum permitted value.\n@param max The maximum permitted value.\n@return {@code value} if it is between the specified limits, {@code min} if the value\nis too low, or {@code max} if the value is too high.\n@since 1.2"
] | [
"Get the current attribute type.\n@param key the entry's key, not null\n@return the current attribute type, or null, if no such attribute exists.",
"Use this API to fetch statistics of nsacl6_stats resource of given name .",
"Returns an Object array of all FK field values of the specified object.\nIf the specified object is an unmaterialized Proxy, it will be materialized\nto read the FK values.\n\n@throws MetadataException if an error occours while accessing ForeingKey values on obj",
"Cancel on target hosts.\n\n@param targetHosts\nthe target hosts\n@return true, if successful",
"Locates a task within a child task container which matches the supplied UUID.\n\n@param parent child task container\n@param uuid required UUID\n@return Task instance or null if the task is not found",
"Finds all nWise combinations of a set of variables, each with a given domain of values\n\n@param nWise the number of variables in each combination\n@param coVariables the varisbles\n@param variableDomains the domains\n@return all nWise combinations of the set of variables",
"Gets validation errors either as a JSON string, or null if there are no validation errors.\n\n@return the validation error JSON",
"Retrieve the next available field.\n\n@return FieldType instance for the next available field",
"Merges individual days together into time spans where the\nsame work is undertaken each day.\n\n@param list assignment data"
] |
public static inat[] get(nitro_service service) throws Exception{
inat obj = new inat();
inat[] response = (inat[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the inat resources that are configured on netscaler."
] | [
"A find query only given as criterion. Leave it to MongoDB's own parser to handle it.\n\n@return the {@link Rule} to identify a find query only",
"Adopts an xml dom element to the owner document of this element if necessary.\n\n@param elementToAdopt the element to adopt",
"Initializes communication with the Z-Wave controller stick.",
"Determine if a CharSequence can be parsed as a BigDecimal.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isBigDecimal(String)\n@since 1.8.2",
"read data from channel to buffer\n\n@param channel readable channel\n@param buffer bytebuffer\n@return read size\n@throws IOException any io exception",
"Creates a descriptor for the currently edited message bundle.\n@return <code>true</code> if the descriptor could be created, <code>false</code> otherwise.",
"Use this API to add dnsview.",
"Get the FieldDescriptor for the PathInfo\n\n@param aTableAlias\n@param aPathInfo\n@return FieldDescriptor",
"Counts one entity. Every once in a while, the current time is checked so\nas to print an intermediate report roughly every ten seconds."
] |
private boolean readNextRow() {
while (!stop) {
String row = getLineWrapped();
// end of stream - null indicates end of stream before we see last_seq which shouldn't
// be possible but we should handle it
if (row == null || row.startsWith("{\"last_seq\":")) {
terminate();
return false;
} else if (row.isEmpty()) {
// heartbeat
continue;
}
setNextRow(gson.fromJson(row, ChangesResult.Row.class));
return true;
}
// we were stopped, end of changes feed
terminate();
return false;
} | [
"Reads and sets the next feed in the stream."
] | [
"Scan all the class path and look for all classes that have the Format\nAnnotations.",
"Builds sql clause to load data into a database.\n\n@param config Load configuration.\n@param prefix Prefix for temporary resources.\n@return the load DDL",
"Takes a list of Strings and combines them into a single comma-separated\nString.\n@param strings The Strings to combine.\n@return The combined, comma-separated, String.",
"Add a listener to be invoked when the checked button changes in this group.\n@param listener\n@param <T>\n@return",
"Remove a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param isDirectory whether the file is a directory or not\n@return the builder",
"Converts plan text into anonymous text. Preserves upper case, lower case,\npunctuation, whitespace and digits while making the text unreadable.\n\n@param oldText text to replace\n@param replacements map of find/replace pairs",
"Checks whether a built of the indices is necessary.\n@param cms The appropriate CmsObject instance.\n@return true, if the spellcheck indices have to be rebuilt, otherwise false",
"judge if an point in the area or not\n\n@param point\n@param area\n@param offsetRatio\n@return",
"Sets the specified long 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"
] |
private void emit(float[] particlePositions, float[] particleVelocities,
float[] particleTimeStamps)
{
float[] allParticlePositions = new float[particlePositions.length + particleBoundingVolume.length];
System.arraycopy(particlePositions, 0, allParticlePositions, 0, particlePositions.length);
System.arraycopy(particleBoundingVolume, 0, allParticlePositions,
particlePositions.length, particleBoundingVolume.length);
float[] allSpawnTimes = new float[particleTimeStamps.length + BVSpawnTimes.length];
System.arraycopy(particleTimeStamps, 0, allSpawnTimes, 0, particleTimeStamps.length);
System.arraycopy(BVSpawnTimes, 0, allSpawnTimes, particleTimeStamps.length, BVSpawnTimes.length);
float[] allParticleVelocities = new float[particleVelocities.length + BVVelocities.length];
System.arraycopy(particleVelocities, 0, allParticleVelocities, 0, particleVelocities.length);
System.arraycopy(BVVelocities, 0, allParticleVelocities, particleVelocities.length, BVVelocities.length);
Particles particleMesh = new Particles(mGVRContext, mMaxAge,
mParticleSize, mEnvironmentAcceleration, mParticleSizeRate, mFadeWithAge,
mParticleTexture, mColor, mNoiseFactor);
GVRSceneObject particleObject = particleMesh.makeParticleMesh(allParticlePositions,
allParticleVelocities, allSpawnTimes);
this.addChildObject(particleObject);
meshInfo.add(Pair.create(particleObject, currTime));
} | [
"Append the bounding volume particle positions, times and velocities to the existing mesh\nbefore creating a new scene object with this mesh attached to it.\nAlso, append every created scene object and its creation time to corresponding array lists.\n\n@param particlePositions\n@param particleVelocities\n@param particleTimeStamps"
] | [
"returns an Array with an Objects CURRENT locking VALUES , BRJ\n@throws PersistenceBrokerException if there is an erros accessing o field values",
"Builds the radio input to set the export and secure property.\n\n@param propName the name of the property to build the radio input for\n\n@return html for the radio input\n\n@throws CmsException if the reading of a property fails",
"Forceful cleanup the logs",
"Gets id of a link and creates the new one if necessary.\n\n@param linkName name of the link.\n@param allowCreate if set to true and if there is no link named as linkName,\ncreate the new id for the linkName.\n@return < 0 if there is no such link and create=false, else id of the link",
"Adds a foreignkey to this table.\n\n@param relationName The name of the relation represented by the foreignkey\n@param remoteTable The referenced table\n@param localColumns The local columns\n@param remoteColumns The remote columns",
"The derivative of the objective function. You may override this method\nif you like to implement your own derivative.\n\n@param parameters Input value. The parameter vector.\n@param derivatives Output value, where derivatives[i][j] is d(value(j)) / d(parameters(i)\n@throws SolverException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Removes the observation that fits the model the worst and recomputes the coefficients.\nThis is done efficiently by using an adjustable solver. Often times the elements with\nthe largest errors are outliers and not part of the system being modeled. By removing them\na more accurate set of coefficients can be computed.",
"Parser for forecast\n\n@param feed\n@return",
"Mojos perform different dependency resolution, so we add dependencies for each mojo."
] |
private void processRemarks(GanttDesignerRemark remark)
{
for (GanttDesignerRemark.Task remarkTask : remark.getTask())
{
Integer id = remarkTask.getRow();
Task task = m_projectFile.getTaskByID(id);
String notes = task.getNotes();
if (notes.isEmpty())
{
notes = remarkTask.getContent();
}
else
{
notes = notes + '\n' + remarkTask.getContent();
}
task.setNotes(notes);
}
} | [
"Read an individual remark type from a Gantt Designer file.\n\n@param remark remark type"
] | [
"Stops all servers.\n\n{@inheritDoc}",
"Create a structured Record instance from the flat text data.\nNull is returned if errors are encountered during parse.\n\n@param text flat text data\n@return Record instance",
"Use this API to change appfwsignatures.",
"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",
"Determine the raw type for the given generic parameter type.\n@param genericType the generic type to resolve\n@param typeVariableMap the TypeVariable Map to resolved against\n@return the resolved raw type",
"Installs a path service.\n\n@param name the name to use for the service\n@param path the relative portion of the path\n@param possiblyAbsolute {@code true} if {@code path} may be an {@link #isAbsoluteUnixOrWindowsPath(String) absolute path}\nand should be {@link AbsolutePathService installed as such} if it is, with any\n{@code relativeTo} parameter ignored\n@param relativeTo the name of the path that {@code path} may be relative to\n@param serviceTarget the {@link ServiceTarget} to use to install the service\n@return the ServiceController for the path service",
"Read all top level tasks.",
"Sets an Integer attribute.\n\n@param key the key, non null.\n@param value the value\n@return the Builder, for chaining.",
"Use this API to fetch the statistics of all protocolip_stats resources that are configured on netscaler."
] |
private ProductDescriptor getSwapProductDescriptor(Element trade) {
InterestRateSwapLegProductDescriptor legReceiver = null;
InterestRateSwapLegProductDescriptor legPayer = null;
NodeList legs = trade.getElementsByTagName("swapStream");
for(int legIndex = 0; legIndex < legs.getLength(); legIndex++) {
Element leg = (Element) legs.item(legIndex);
boolean isPayer = leg.getElementsByTagName("payerPartyReference").item(0).getAttributes().getNamedItem("href").getNodeValue().equals(homePartyId);
if(isPayer) {
legPayer = getSwapLegProductDescriptor(leg);
} else {
legReceiver = getSwapLegProductDescriptor(leg);
}
}
return new InterestRateSwapProductDescriptor(legReceiver, legPayer);
} | [
"Construct an InterestRateSwapProductDescriptor from a node in a FpML file.\n\n@param trade The node containing the swap.\n@return Descriptor of the swap."
] | [
"Upgrades a read transaction to a write transaction, executes the work then downgrades to a read transaction\nagain.\n\n@since 2.4\n@noreference",
"get the type signature corresponding to given class\n\n@param clazz\n@return",
"Add the list with given bundles to the \"Require-Bundle\" main attribute.\n\n@param requiredBundles The list of all bundles to add.",
"Retrieves all file version retentions matching given filters as an Iterable.\n@param api the API connection to be used by the resource.\n@param filter filters for the query stored in QueryFilter object.\n@param fields the fields to retrieve.\n@return an iterable contains information about all file version retentions matching given filter.",
"Sets the first occurence.\n\n@param min the min\n@param max the max\n@throws ParseException the parse exception",
"Appends a formatted line of code to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).\n<li> {@link Class}, {@link TypeElement}, {@link DeclaredType} and {@link QualifiedName}\ninstances use their qualified names where necessary, or shorter versions if a suitable\nimport line can be added.\n<li> {@link Excerpt} instances have {@link Excerpt#addTo(SourceBuilder)} called.\n</ul>",
"Turn json string into map\n\n@param json\n@return",
"Use this API to fetch all the appflowpolicylabel resources that are configured on netscaler.",
"Checks that sequence-name is only used with autoincrement='ojb'\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated"
] |
public static List<Integer> checkKeyBelongsToPartition(byte[] key,
Set<Pair<Integer, HashMap<Integer, List<Integer>>>> stealerNodeToMappingTuples,
Cluster cluster,
StoreDefinition storeDef) {
List<Integer> keyPartitions = new RoutingStrategyFactory().updateRoutingStrategy(storeDef,
cluster)
.getPartitionList(key);
List<Integer> nodesToPush = Lists.newArrayList();
for(Pair<Integer, HashMap<Integer, List<Integer>>> stealNodeToMap: stealerNodeToMappingTuples) {
List<Integer> nodePartitions = cluster.getNodeById(stealNodeToMap.getFirst())
.getPartitionIds();
if(StoreRoutingPlan.checkKeyBelongsToPartition(keyPartitions,
nodePartitions,
stealNodeToMap.getSecond())) {
nodesToPush.add(stealNodeToMap.getFirst());
}
}
return nodesToPush;
} | [
"Given a key and a list of steal infos give back a list of stealer node\nids which will steal this.\n\n@param key Byte array of key\n@param stealerNodeToMappingTuples Pairs of stealer node id to their\ncorresponding [ partition - replica ] tuples\n@param cluster Cluster metadata\n@param storeDef Store definitions\n@return List of node ids"
] | [
"Adds a row to the internal storage, indexed by primary key.\n\n@param uniqueID unique ID of the row\n@param map row data as a simpe map",
"Makes sure that there is a class definition for the given qualified name, and returns it.\n\n@param original The XDoclet class object\n@return The class definition",
"Finishes the current box - empties the text line buffer and creates a DOM element from it.",
"Read resource data from a PEP file.",
"Handles the response of the SerialAPIGetCapabilities request.\n@param incomingMessage the response message to process.",
"Obtains a local date in Ethiopic calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Ethiopic local date, not null\n@throws DateTimeException if unable to create the date",
"Indicates whether or not an event ID is a duplicate.\n\n<p>This method can be overridden by a subclass in order to provide custom de-duping logic.</p>\n\n@param eventID the event ID.\n@return true if the event is a duplicate; otherwise false.",
"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.",
"Get the text value for the specified element. If the element is null, or the element's body is empty then this method will return null.\n\n@param element\nThe Element\n@return The value String or null"
] |
public B importContext(AbstractContext context, boolean overwriteDuplicates){
for (Map.Entry<String, Object> en : context.data.entrySet()) {
if (overwriteDuplicates) {
this.data.put(en.getKey(), en.getValue());
}else{
this.data.putIfAbsent(en.getKey(), en.getValue());
}
}
return (B) this;
} | [
"Apply all attributes on the given context.\n\n@param context the context to be applied, not null.\n@param overwriteDuplicates flag, if existing entries should be overwritten.\n@return this Builder, for chaining"
] | [
"Reads any exceptions present in the file. This is only used in MSPDI\nfile versions saved by Project 2007 and later.\n\n@param calendar XML calendar\n@param bc MPXJ calendar",
"Finish initialization of the configuration.",
"Recursively construct a LblTree from DOM tree\n\n@param walker tree walker for DOM tree traversal\n@return tree represented by DOM tree",
"Finds the parent group of the given one and returns it\n\n@param group Group for which the parent is needed\n@return The parent group of the given one. If the given one is the first one, it returns the same group",
"Generates timephased costs from timephased work where multiple cost rates\napply to the assignment.\n\n@param standardWorkList timephased work\n@param overtimeWorkList timephased work\n@return timephased cost",
"Returns a builder that is initialized with the given path.\n@param path the path to initialize with\n@return the new {@code UriComponentsBuilder}",
"Returns the value of an option, or the default if the value is null or the key is not part of the map.\n@param configOptions the map with the config options.\n@param optionKey the option to get the value of\n@param defaultValue the default value to return if the option is not set.\n@return the value of an option, or the default if the value is null or the key is not part of the map.",
"Create a new entry in the database from an object.",
"This method retrieves the UID for a calendar associated with a task.\n\n@param mpx MPX Task instance\n@return calendar UID"
] |
public static void checkEigenvalues() {
DoubleMatrix A = new DoubleMatrix(new double[][]{
{3.0, 2.0, 0.0},
{2.0, 3.0, 2.0},
{0.0, 2.0, 3.0}
});
DoubleMatrix E = new DoubleMatrix(3, 1);
NativeBlas.dsyev('N', 'U', 3, A.data, 0, 3, E.data, 0);
check("checking existence of dsyev...", true);
} | [
"Compute eigenvalues. This is a routine not in ATLAS, but in the original\nLAPACK."
] | [
"A convenience method for creating an immutable map.\n\n@param self a Map\n@return an immutable Map\n@see java.util.Collections#unmodifiableMap(java.util.Map)\n@since 1.0",
"Connect sync.\n\n@param configuration the protocol configuration\n@return the connection\n@throws IOException",
"Process the next event in a given stream.\n@return the fully processed event\n@throws IOException if a stream is in the wrong state, IO errors can be thrown",
"Use this API to fetch filterpolicy_binding resource of given name .",
"Parses the given XML doc to extract the properties and return them into a java.util.Properties.\n@param doc to parse\n@param sectionName which section to extract\n@return Properties map",
"Used to create a new indefinite retention policy.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@return the created retention policy's info.",
"Each string item rendering requires the border and a space on both sides.\n\n12 3 12 3 12 34\n+----- +-------- +------+\nabc venkat last\n\n@param colCount\n@param colMaxLenList\n@param data\n@return",
"Sets the value of the given variable\n\n@param name the name of the variable to set\n@param value the new value for the given variable",
"Convert custom info.\n\n@param customInfo the custom info map\n@return the custom info type"
] |
public static void count() {
long duration = SystemClock.uptimeMillis() - startTime;
float avgFPS = sumFrames / (duration / 1000f);
Log.v("FPSCounter",
"total frames = %d, total elapsed time = %d ms, average fps = %f",
sumFrames, duration, avgFPS);
} | [
"Computes FPS average"
] | [
"Template method for verification of lazy initialisation.",
"Use this API to fetch filtered set of gslbservice resources.\nset the filter parameter values in filtervalue object.",
"This method is used to quote any special characters that appear in\nliteral text that is required as part of the currency format.\n\n@param literal Literal text\n@return literal text with special characters in quotes",
"We have reason to believe we might have enough information to calculate a signature for the track loaded on a\nplayer. Verify that, and if so, perform the computation and record and report the new signature.",
"Initialize dates panel elements.",
"This method allows a predecessor relationship to be added to this\ntask instance.\n\n@param targetTask the predecessor task\n@param type relation type\n@param lag relation lag\n@return relationship",
"Additional objects to include with the requested group.\nNote that all the optional includes depend on \"assignments\" also being included.\n@param includes List of included objects to return\n@return this object to continue building options",
"Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve\nprevious versions of their files.\n\n@return a list of previous file versions.",
"Performs a streaming request against a Stitch app server determined by the deployment model\nof the underlying app. Throws a Stitch specific exception if the request fails.\n\n@param stitchReq the request to perform.\n@return an {@link EventStream} that will provide response events."
] |
public Metadata add(String path, String value) {
this.values.add(this.pathToProperty(path), value);
this.addOp("add", path, value);
return this;
} | [
"Adds a new 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."
] | [
"Select this tab item.",
"Delete an object.",
"Handle value change event on the individual dates list.\n@param event the change event.",
"Helper for reading a mandatory String value list - throwing an Exception if parsing fails.\n@param json The JSON object where the list should be read from.\n@param key The key of the value to read.\n@return The value from the JSON.\n@throws JSONException thrown when parsing fails.",
"Finds the last entry of the address list and returns it as a property.\n\n@param address the address to get the last part of\n\n@return the last part of the address\n\n@throws IllegalArgumentException if the address is not of type {@link ModelType#LIST} or is empty",
"common utility method for adding a statement to a record",
"Get a value from a multiselect metadata field.\n@param path the key path in the metadata object. Must be prefixed with a \"/\".\n@return the list of values set in the field.",
"Count some stats on what occurs in a file.",
"Verify that all OGM custom externalizers are present.\nN.B. even if some Externalizer is only needed in specific configuration,\nit is not safe to start a CacheManager without one as the same CacheManager\nmight be used, or have been used in the past, to store data using a different\nconfiguration.\n\n@see ExternalizerIds\n@see AdvancedExternalizer\n@param externalCacheManager the provided CacheManager to validate"
] |
public static <K, V> void operator_remove(Map<K, V> map, Iterable<? super K> keysToRemove) {
for (final Object key : keysToRemove) {
map.remove(key);
}
} | [
"Remove pairs with the given keys from the map.\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param keysToRemove the keys of the pairs to remove.\n@since 2.15"
] | [
"Go through all nodes and determine how many partition Ids each node\nhosts.\n\n@param cluster\n@return map of nodeId to number of primary partitions hosted on node.",
"Returns a the list of available version of an artifact\n\n@param gavc String\n@return List<String>",
"Build the crosstab. Throws LayoutException if anything is wrong\n@return",
"Support the subscript operator for GString.\n\n@param text a GString\n@param index the index of the Character to get\n@return the Character at the given index\n@since 2.3.7",
"Start the chain of execution running.\n\n@throws IllegalStateException\nif the chain of execution has already been started.",
"Creates a cube with each face as a separate mesh using a different texture.\nThe meshes will share a common vertex array but will have separate index buffers.\n@param gvrContext context to use for creating cube\n@param facingOut true for outward normals, false for inward normals\n@param vertexDesc string describing which vertex components are desired\n@param textureList list of 6 textures, one for each face",
"Utility function that gives list of values from list of value-pair\nstrings.\n\n@param valuePairs List of value-pair strings\n@param delim Delimiter that separates the value pair\n@returns The list of values; empty if no value-pair is present, The even\nelements are the first ones of the value pair, and the odd\nelements are the second ones. For example, if the list of\nvalue-pair is [\"cluster.xml=file1\", \"stores.xml=file2\"], and the\npair delimiter is '=', we will then have the list of values in\nreturn: [\"cluster.xml\", \"file1\", \"stores.xml\", \"file2\"].",
"I promise that this is always a collection of HazeltaskTasks",
"Add the line to the content\n\n@param bufferedFileReader The file reader\n@param content The content of the file\n@param line The current read line\n@throws IOException"
] |
public static void setTranslucentNavigationFlag(Activity activity, boolean on) {
if (Build.VERSION.SDK_INT >= 19) {
setFlag(activity, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, on);
}
} | [
"helper method to set the TranslucentNavigationFlag\n\n@param on"
] | [
"Adds an array of groupby fieldNames for ReportQueries.\n@param fieldNames The groupby to set\n@deprecated use QueryByCriteria#addGroupBy",
"Split a span into two by adding a knot in the middle.\n@param n the span index",
"Use this API to update dbdbprofile.",
"Release a connection by placing the connection back in the pool.\n@param connectionHandle Connection being released.\n@throws SQLException",
"Get path ID for a given profileId and pathName\n\n@param pathName Name of path\n@param profileId ID of profile\n@return ID of path",
"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",
"Swap the current version folder for a new one\n\n@param newStoreDirectory The path to the new version directory",
"commit all envelopes against the current broker",
"Applies the given codec registry to be used alongside the default codec registry.\n\n@param codecRegistry the codec registry to merge in.\n@return an {@link StitchObjectMapper} with the merged codec registries."
] |
public static Cluster swapPartitions(final Cluster nextCandidateCluster,
final int nodeIdA,
final int partitionIdA,
final int nodeIdB,
final int partitionIdB) {
Cluster returnCluster = Cluster.cloneCluster(nextCandidateCluster);
// Swap partitions between nodes!
returnCluster = UpdateClusterUtils.createUpdatedCluster(returnCluster,
nodeIdA,
Lists.newArrayList(partitionIdB));
returnCluster = UpdateClusterUtils.createUpdatedCluster(returnCluster,
nodeIdB,
Lists.newArrayList(partitionIdA));
return returnCluster;
} | [
"Swaps two specified partitions.\n\nPair-wase partition swapping may be more prone to local minima than\nlarger perturbations. Could consider \"swapping\" a list of\n<nodeId/partitionId>. This would allow a few nodes to be identified\n(random # btw 2-5?) and then \"swapped\" (shuffled? rotated?).\n\n@return modified cluster metadata."
] | [
"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.",
"Initializes the metadataCache for MetadataStore",
"Returns true if the addon depends on reporting.",
"Extracts a numeric id from a string, which can be either a Wikidata\nentity URI or a short entity or property id.\n\n@param idString\n@param isUri\n@return numeric id, or 0 if there was an error",
"Use this API to unset the properties of clusterinstance resources.\nProperties that need to be unset are specified in args array.",
"Creates the node corresponding to an entity.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values in {@link org.hibernate.ogm.model.key.spi.EntityKey#getColumnValues()}\n@return the corresponding node",
"Sets the search scope.\n\n@param cms The current CmsObject object.",
"Creates a converter function that converts value using a constructor that accepts a single String argument.\n\n@return A converter function or {@code null} if the given type doesn't have a public constructor that accepts\na single String argument.",
"Check whether the patch can be applied to a given target.\n\n@param condition the conditions\n@param target the target\n@throws PatchingException"
] |
private boolean costRateTableWriteRequired(CostRateTableEntry entry, Date from)
{
boolean fromDate = (DateHelper.compare(from, DateHelper.FIRST_DATE) > 0);
boolean toDate = (DateHelper.compare(entry.getEndDate(), DateHelper.LAST_DATE) > 0);
boolean costPerUse = (NumberHelper.getDouble(entry.getCostPerUse()) != 0);
boolean overtimeRate = (entry.getOvertimeRate() != null && entry.getOvertimeRate().getAmount() != 0);
boolean standardRate = (entry.getStandardRate() != null && entry.getStandardRate().getAmount() != 0);
return (fromDate || toDate || costPerUse || overtimeRate || standardRate);
} | [
"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"
] | [
"Configure high fps settings in the camera for VR mode\n\n@param fpsMode integer indicating the desired fps: 0 means 30 fps, 1 means 60\nfps, and 2 means 120 fps. Any other value is invalid.\n@return A boolean indicating the status of the method call. It may be false due\nto multiple reasons including: 1) supplying invalid fpsMode as the input\nparameter, 2) VR mode not supported.",
"Use this API to add dnsaaaarec.",
"Add a '<' clause so the column must be less-than the value.",
"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.",
"Sets the quaternion of the keyframe.",
"Executes the API action \"wbsearchentity\" for the given parameters.\nSearches for entities using labels and aliases. Returns a label and\ndescription for the entity in the user language if possible. Returns\ndetails of the matched term. The matched term text is also present in the\naliases key if different from the display label.\n\n<p>\nSee the <a href=\n\"https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentity\"\n>online API documentation</a> for further information.\n<p>\n\n@param search\n(required) search for this text\n@param language\n(required) search in this language\n@param strictLanguage\n(optional) whether to disable language fallback\n@param type\n(optional) search for this type of entity\nOne of the following values: item, property\nDefault: item\n@param limit\n(optional) maximal number of results\nno more than 50 (500 for bots) allowed\nDefault: 7\n@param offset\n(optional) offset where to continue a search\nDefault: 0\nthis parameter is called \"continue\" in the API (which is a Java keyword)\n\n@return list of matching entities retrieved via the API URL\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IllegalArgumentException\nif the given combination of parameters does not make sense",
"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",
"Creates a simple deployment description.\n\n@param name the name for the deployment\n@param serverGroups the server groups\n\n@return the deployment description",
"ten less than Cube Q"
] |
public void addProperty(String name, String... values) {
List<String> valueList = new ArrayList<String>();
for (String value : values) {
valueList.add(value.trim());
}
properties.put(name.trim(), valueList);
} | [
"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>"
] | [
"Callback for constant meta class update change",
"Attempts to insert a colon so that a value without a colon can\nbe parsed.",
"Removes all pending broadcasts\n\n@param sessionIds to remove broadcast for (or null for all sessions)",
"we have only one implementation on classpath.",
"Returns a non-validating XML parser. The parser ignores both DTDs and XSDs.\n\n@return An XML parser in the form of a DocumentBuilder",
"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.",
"Deletes a product from the database\n\n@param name String",
"Adds a filter definition to this project file.\n\n@param filter filter definition",
"Get the best guess we have for the current track position on the specified player.\n\n@param player the player number whose position is desired\n\n@return the milliseconds into the track that we believe playback has reached, or -1 if we don't know\n\n@throws IllegalStateException if the TimeFinder is not running"
] |
public static void removeColumns( DMatrixRMaj A , int col0 , int col1 )
{
if( col1 < col0 ) {
throw new IllegalArgumentException("col1 must be >= col0");
} else if( col0 >= A.numCols || col1 >= A.numCols ) {
throw new IllegalArgumentException("Columns which are to be removed must be in bounds");
}
int step = col1-col0+1;
int offset = 0;
for (int row = 0, idx=0; row < A.numRows; row++) {
for (int i = 0; i < col0; i++,idx++) {
A.data[idx] = A.data[idx+offset];
}
offset += step;
for (int i = col1+1; i < A.numCols; i++,idx++) {
A.data[idx] = A.data[idx+offset];
}
}
A.numCols -= step;
} | [
"Removes columns from the matrix.\n\n@param A Matrix. Modified\n@param col0 First column\n@param col1 Last column, inclusive."
] | [
"Read a two byte integer.\n\n@param data byte array\n@param offset offset into array\n@return integer value",
"Called when a previously created loader has finished its load.\n\n@param loader The Loader that has finished.\n@param data The data generated by the Loader.",
"Returns true if the lattice contains an entry at the specified location.\n\n@param maturityInMonths The maturity in months to check.\n@param tenorInMonths The tenor in months to check.\n@param moneynessBP The moneyness in bp to check.\n@return True iff there is an entry at the specified location.",
"Gets any app users that has an exact match with the externalAppUserId term.\n@param api the API connection to be used when retrieving the users.\n@param externalAppUserId the external app user id that has been set for app user\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return an iterable containing users matching the given email",
"Get a collection of all of the user's groups.\n\n@return A Collection of Group objects\n@throws FlickrException",
"Use this API to fetch authenticationradiuspolicy_vpnglobal_binding resources of given name .",
"Add a column to be set to a value for UPDATE statements. This will generate something like columnName = 'value'\nwith the value escaped if necessary.",
"Use this API to add snmpuser.",
"Return all valid maturities for a given moneyness.\nUses the fixing times of the fix schedule to determine fractions.\n\n@param moneyness The moneyness as actual offset from par swap rate for which to get the maturities.\n@return The maturities as year fraction from reference date."
] |
protected static void appendHandler(Class<? extends LogRecordHandler> parent, LogRecordHandler child){
List<LogRecordHandler> toAdd = new LinkedList<LogRecordHandler>();
//--Find Parents
for(LogRecordHandler term : handlers){
if(parent.isAssignableFrom(term.getClass())){
toAdd.add(term);
}
}
//--Add Handler
for(LogRecordHandler p : toAdd){
appendHandler(p, child);
}
} | [
"Append a Handler to every parent of the given class\n@param parent The class of the parents to add the child to\n@param child The Handler to add."
] | [
"Cancel old waiting jobs.\n\n@param starttimeThreshold threshold for start time\n@param checkTimeThreshold threshold for last check time\n@param message the error message",
"Use this API to fetch all the appfwwsdl resources that are configured on netscaler.",
"Deletes a template.\n\n@param id id of the template to delete.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"calculate arc angle between point a and point b\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return",
"Set value for given object field.\n\n@param object object to be updated\n@param field field name\n@param value field value\n\n@throws NoSuchMethodException if property writer is not available\n@throws InvocationTargetException if property writer throws an exception\n@throws IllegalAccessException if property writer is inaccessible",
"Sets the current class definition derived from the current class, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"accept-locks\" optional=\"true\" description=\"The accept locks setting\" values=\"true,false\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the class as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"determine-extents\" optional=\"true\" description=\"Whether to determine\npersistent direct sub types automatically\" values=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the class\"\[email protected] name=\"factory-method\" optional=\"true\" description=\"Specifies a no-argument factory method that is\nused to create instances (not yet implemented !)\"\[email protected] name=\"factory-class\" optional=\"true\" description=\"Specifies a factory class to be used for creating\nobjects of this class\"\[email protected] name=\"factory-method\" optional=\"true\" description=\"Specifies a static no-argument method in the factory class\"\[email protected] name=\"generate-repository-info\" optional=\"true\" description=\"Whether repository data should be\ngenerated for the class\" values=\"true,false\"\[email protected] name=\"generate-table-info\" optional=\"true\" description=\"Whether table data should be\ngenerated for the class\" values=\"true,false\"\[email protected] name=\"include-inherited\" optional=\"true\" description=\"Whether to include\nfields/references/collections of supertypes\" values=\"true,false\"\[email protected] name=\"initialization-method\" optional=\"true\" description=\"Specifies a no-argument instance method that is\ncalled right after an instance has been read from the database\"\[email protected] name=\"isolation-level\" optional=\"true\" description=\"The isolation level setting\"\[email protected] name=\"proxy\" optional=\"true\" description=\"The proxy setting for this class\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects of\nobjects of this class to prefetch in collections\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Can be set to force OJB to refresh instances when\nloaded from the cache\" values=\"true,false\"\[email protected] name=\"row-reader\" optional=\"true\" description=\"The row reader for the class\"\[email protected] name=\"schema\" optional=\"true\" description=\"The schema for the type\"\[email protected] name=\"table\" optional=\"true\" description=\"The table for the class\"\[email protected] name=\"table-documentation\" optional=\"true\" description=\"Documentation on the table\"",
"Exceptions specific to each operation is handled in the corresponding\nsubclass. At this point we don't know the reason behind this exception.\n\n@param exception",
"Returns the current download state for a download request.\n\n@param downloadId\n@return",
"Given the byte buffer containing album art, build an actual image from it for easy rendering.\n\n@return the newly-created image, ready to be drawn"
] |
private static void registerImage(String imageId, String imageTag, String targetRepo,
ArrayListMultimap<String, String> artifactsProps, int buildInfoId) throws IOException {
DockerImage image = new DockerImage(imageId, imageTag, targetRepo, buildInfoId, artifactsProps);
images.add(image);
} | [
"Registers an image to the images cache, so that it can be captured by the build-info proxy.\n\n@param imageId\n@param imageTag\n@param targetRepo\n@param buildInfoId\n@throws IOException"
] | [
"Adds an item to the list box, specifying an initial value for the item.\n\n@param value the item's value, to be submitted if it is part of a\n{@link FormPanel}; cannot be <code>null</code>\n@param text the text of the item to be added\n@param reload perform a 'material select' reload to update the DOM.",
"Convert from an internal Spring bean definition to a DTO.\n\n@param beanDefinition The internal Spring bean definition.\n@return Returns a DTO representation.",
"Sets the appropriate OpenCms context.\n@param cms The OpenCms instance object.",
"Sets the segment reject as a string. This method is for convenience\nto be able to set percent reject type just by calling with '3%' and\notherwise it uses rows. All this assuming that parsing finds '%' characher\nand is able to parse a raw reject number.\n\n@param reject the new segment reject",
"Gets the top of thread-local shell stack, or null if it is empty.\n\n@return the top of the shell stack",
"Returns the currently set filters in a map column -> filter.\n\n@return the currently set filters in a map column -> filter.",
"Determines whether the given array only contains unbounded type variables or Object.class.\n\n@param types the given array of types\n@return true if and only if the given array only contains unbounded type variables or Object.class",
"Transits a float property from the start value to the end value.\n\n@param propertyId\n@param vals\n@return self",
"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"
] |
public void delete(Vertex vtx1, Vertex vtx2) {
if (vtx1.prev == null) {
head = vtx2.next;
} else {
vtx1.prev.next = vtx2.next;
}
if (vtx2.next == null) {
tail = vtx1.prev;
} else {
vtx2.next.prev = vtx1.prev;
}
} | [
"Deletes a chain of vertices from this list."
] | [
"Find the path.\n\n@param start key of first node in the path\n@param end key of last node in the path\n@return string containing the nodes keys in the path separated by arrow symbol",
"Throws one RendererException if the content parent or layoutInflater are null.",
"Read an individual remark type from a Gantt Designer file.\n\n@param remark remark type",
"Retrieves the amount of working time represented by\na calendar exception.\n\n@param exception calendar exception\n@return length of time in milliseconds",
"Given a field node, checks if we are calling a private field from an inner class.",
"Registers the transformers for JBoss EAP 7.0.0.\n\n@param subsystemRegistration contains data about the subsystem registration",
"Take a string and make it an iterable ContentStream",
"Calculate Mode value.\n@param values Values.\n@return Returns mode value of the histogram array.",
"Generate a results file for each test in each suite.\n@param outputDirectory The target directory for the generated file(s)."
] |
public static final Double getDouble(InputStream is) throws IOException
{
double result = Double.longBitsToDouble(getLong(is));
if (Double.isNaN(result))
{
result = 0;
}
return Double.valueOf(result);
} | [
"Retrieve a Double from an input stream.\n\n@param is input stream\n@return Double instance"
] | [
"This method is used to automatically generate a value\nfor the Outline Number field of this task.\n\n@param parent Parent Task",
"Read the file header data.\n\n@param is input stream",
"Use this API to fetch transformpolicy resource of given name .",
"Delivers the correct JSON Object for the Bounds\n\n@param bounds\n@throws org.json.JSONException",
"Return the name of the current conf set\n@return the conf set name",
"Fetch JSON from RAW resource\n\n@param context Context\n@param resource Resource int of the RAW file\n@return JSON",
"Look up the playback state that has reached furthest in the track, but give playing players priority over stopped players.\nThis is used to choose the scroll center when auto-scrolling is active.\n\n@return the playback state, if any, with the highest playing {@link PlaybackState#position} value",
"Calls the httpHandler method.",
"All the attributes needed either by the processors for each datasource row or by the jasper template.\n\n@param attributes the attributes."
] |
public static String resolveSvnMigratedRevision(final Revision revision, final String branch) {
if (revision == null) {
return null;
}
final Pattern pattern = Pattern.compile("^git-svn-id: .*" + branch + "@([0-9]+) ", Pattern.MULTILINE);
final Matcher matcher = pattern.matcher(revision.getMessage());
if (matcher.find()) {
return matcher.group(1);
} else {
return revision.getRevision();
}
} | [
"Helper method to retrieve a canonical revision for git commits migrated from SVN. Migrated commits are\ndetected by the presence of 'git-svn-id' in the commit message.\n\n@param revision the commit/revision to inspect\n@param branch the name of the branch it came from\n@return the original SVN revision if it was a migrated commit from the branch specified, otherwise the git revision"
] | [
"Use this API to fetch aaagroup_aaauser_binding resources of given name .",
"Gets the Jensen Shannon divergence.\n\n@param p U vector.\n@param q V vector.\n@return The Jensen Shannon divergence between u and v.",
"Handle bind service event.\n@param service Service instance\n@param props Service reference properties",
"Make sure we don't attempt to recover inline; if the parser\nsuccessfully recovers, it won't throw an exception.",
"This method is called to alert project listeners to the fact that\na resource has been read from a project file.\n\n@param resource resource instance",
"Finishes the process of attaching a metadata cache file once it has been opened and validated.\n\n@param slot the slot to which the cache should be attached\n@param cache the opened, validated metadata cache file",
"Returns the inverse of a given matrix.\n\n@param matrix A matrix given as double[n][n].\n@return The inverse of the given matrix.",
"Gathers information, that couldn't be collected while tree traversal.",
"Replaces each substring of this CharSequence that matches the given\nregular expression with the given replacement.\n\n@param self a CharSequence\n@param regex the capturing regex\n@param replacement the string to be substituted for each match\n@return the toString() of the CharSequence with content replaced\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see String#replaceAll(String, String)\n@since 1.8.2"
] |
public void close() {
boolean isPreviouslyClosed = isClosed.getAndSet(true);
if (isPreviouslyClosed) {
return;
}
AdminClient client;
while ((client = clientCache.poll()) != null) {
client.close();
}
} | [
"close the AdminPool, if no long required.\nAfter closed, all public methods will throw IllegalStateException"
] | [
"Runs the print.\n\n@param args the cli arguments\n@throws Exception",
"Called when is removed the parent of the scene object.\n\n@param parent Old parent of this scene object.",
"Add the given query parameters.\n@param params the params\n@return this UriComponentsBuilder",
"Computes the square root of the complex number.\n\n@param input Input complex number.\n@param root Output. The square root of the input",
"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",
"Return SELECT clause for object existence call",
"Returns the compression type of this kind of dump file using file suffixes\n\n@param fileName the name of the file\n@return compression type\n@throws IllegalArgumentException\nif the given dump file type is not known",
"Split a span into two by adding a knot in the middle.\n@param n the span index",
"Load the installation state based on the identity\n\n@param installedIdentity the installed identity\n@return the installation state\n@throws IOException"
] |
public static boolean ensureJedisConnection(final Jedis jedis) {
final boolean jedisOK = testJedisConnection(jedis);
if (!jedisOK) {
try {
jedis.quit();
} catch (Exception e) {
} // Ignore
try {
jedis.disconnect();
} catch (Exception e) {
} // Ignore
jedis.connect();
}
return jedisOK;
} | [
"Ensure that the given connection is established.\n\n@param jedis\na connection to Redis\n@return true if the supplied connection was already connected"
] | [
"Get an CollectionDescriptor by name BRJ\n@param name\n@return CollectionDescriptor or null",
"This method is called to try to catch any invalid tasks that may have sneaked past all our other checks.\nThis is done by validating the tasks by task ID.",
"Retrieve the number of minutes per day for this calendar.\n\n@return minutes per day",
"Adds a security property to be passed to the server.\n\n@param key the property key\n@param value the property value\n\n@return the builder",
"Obtains a Julian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Julian local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Send a lifecycle announcement to all registered listeners.\n\n@param logger the logger to use, so the log entry shows as belonging to the proper subclass.\n@param starting will be {@code true} if the DeviceFinder is starting, {@code false} if it is stopping.",
"Parses a single query facet item with query and label.\n@param prefix path to the query facet item (with trailing '/').\n@return the query facet item.",
"Analyses the content of the general section of an ini configuration file\nand fills out the class arguments with this data.\n\n@param section\n{@link Section} with name \"general\"",
"Helper method that encapsulates the minimum logic for publishing a job to\na channel.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param channel\nthe channel name\n@param jobJson\nthe job serialized as JSON"
] |
private void processDestructionQueue(HttpServletRequest request) {
Object contextsAttribute = request.getAttribute(DESTRUCTION_QUEUE_ATTRIBUTE_NAME);
if (contextsAttribute instanceof Map) {
Map<String, List<ContextualInstance<?>>> contexts = cast(contextsAttribute);
synchronized (contexts) {
FastEvent<String> beforeDestroyedEvent = FastEvent.of(String.class, beanManager, BeforeDestroyed.Literal.CONVERSATION);
FastEvent<String> destroyedEvent = FastEvent.of(String.class, beanManager, Destroyed.Literal.CONVERSATION);
for (Iterator<Entry<String, List<ContextualInstance<?>>>> iterator = contexts.entrySet().iterator(); iterator.hasNext();) {
Entry<String, List<ContextualInstance<?>>> entry = iterator.next();
beforeDestroyedEvent.fire(entry.getKey());
for (ContextualInstance<?> contextualInstance : entry.getValue()) {
destroyContextualInstance(contextualInstance);
}
// Note that for the attached/current conversation we fire the destroyed event twice because we can't reliably identify such a conversation
destroyedEvent.fire(entry.getKey());
iterator.remove();
}
}
}
} | [
"If needed, destroy the remaining conversation contexts after an HTTP session was invalidated within the current request.\n\n@param request"
] | [
"Generates a comment regarding the parameters.\n\n@param entityId - id of the commented entity\n@param entityType - type of the entity\n@param action - the action performed by the user\n@param commentedText - comment text\n@param user - comment left by\n@param date - date comment was created\n@return - comment entity",
"Get the default provider used.\n\n@return the default provider, never {@code null}.",
"Adds each required length, ensuring it isn't negative.\n\n@param requiredLengths\none or more required lengths\n@throws IllegalArgumentException\nif a supplied length is negative",
"Use this API to fetch nstrafficdomain_binding resources of given names .",
"Delegates file rolling to composed objects.\n\n@see FileRollable#roll(org.apache.log4j.spi.LoggingEvent)",
"Open the given url in default system browser.",
"Pauses the file upload. This is a blocking function that would try to wait till the assembly file uploads\nhave actually been paused if possible.\n\n@throws LocalOperationException if the method is called while no upload is going on.",
"You should use the server's time here. Otherwise you might get unexpected results.\n\nThe typical use case is:\n\n\n<pre>\nHTTPResponse response = ....\nHTTPRequest request = createRequest();\nrequest = request.conditionals(new Conditionals().ifModifiedSince(response.getLastModified());\n</pre>\n\n@param time the time to check.\n@return the conditionals with the If-Modified-Since date set.",
"Checks whether the given class maps to a different table but also has the given collection.\n\n@param origCollDef The original collection to search for\n@param origTableDef The original table\n@param classDef The class descriptor to test\n@return <code>true</code> if the class maps to a different table and has the collection"
] |
public List<Throwable> getCauses(Throwable t)
{
List<Throwable> causes = new LinkedList<Throwable>();
Throwable next = t;
while (next.getCause() != null)
{
next = next.getCause();
causes.add(next);
}
return causes;
} | [
"Convert a Throwable into a list containing all of its causes.\n@param t The throwable for which the causes are to be returned.\n@return A (possibly empty) list of {@link Throwable}s."
] | [
"Updates the image information.",
"Use this API to add appfwjsoncontenttype resources.",
"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.",
"Returns the list of module dependencies regarding the provided filters\n\n@param moduleId String\n@param filters FiltersHolder\n@return List<Dependency>",
"Write a date field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Exports a single queue to an XML file.",
"Returns the y-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the y coordinate",
"Use this API to fetch statistics of scpolicy_stats resource of given name .",
"If an error is thrown while loading zone data, the exception is logged\nto system error and null is returned for this and all future requests.\n\n@param id the id to load\n@return the loaded zone"
] |
public static base_responses unset(nitro_service client, String ipaddress[], String args[]) throws Exception {
base_responses result = null;
if (ipaddress != null && ipaddress.length > 0) {
nsrpcnode unsetresources[] = new nsrpcnode[ipaddress.length];
for (int i=0;i<ipaddress.length;i++){
unsetresources[i] = new nsrpcnode();
unsetresources[i].ipaddress = ipaddress[i];
}
result = unset_bulk_request(client, unsetresources,args);
}
return result;
} | [
"Use this API to unset the properties of nsrpcnode resources.\nProperties that need to be unset are specified in args array."
] | [
"Checks to see if the two matrices have the same shape and same pattern of non-zero elements\n\n@param a Matrix\n@param b Matrix\n@return true if the structure is the same",
"Checks if the given String is null or contains only whitespaces.\nThe String is trimmed before the empty check.\n\n@param argument the String to check for null or emptiness\n@param argumentName the name of the argument to check.\nThis is used in the exception message.\n@return the String that was given as argument\n@throws IllegalArgumentException in case argument is null or empty",
"This implementation does not support the 'offset' and 'maxResultSize' parameters.",
"Creates the .story file necessary for every Beast Test Case.\n\n@param scenarioName\n- The name of the scenario, with spaces\n@param srcTestRootFolder\n- The test root folder\n@param packagePath\n- The package of the BeastTestCase\n@param scenarioDescription\n- the scenario name\n@param givenDescription\n- The given description\n@param whenDescription\n- The when description\n@param thenDescription\n- The then description\n@throws BeastException",
"This method attempts to locate a suitable directory by checking a number of different configuration sources.\n\n1 - serverConfigUserDirPropertyName - This value is used to check it a matching system property has been set. 2 -\nsuppliedConfigDir - If a path was specified on the command line it is expected to be passed in as this parameter. 3 -\nserverConfigDirPropertyName - This is a second system property to check.\n\nAnd finally if none of these match defaultBaseDir specifies the configuration being searched and is appended to the JBoss\nHome value discovered when the utility started.",
"Add raw SQL \"ORDER BY\" clause to the SQL query statement.\n\n@param rawSql\nThe raw SQL order by clause. This should not include the \"ORDER BY\".",
"Counts the packages prefixes appearing in this project and if some of them make more than half of the total of existing packages, this prefix\nis returned. Otherwise, returns null.\n\nThis is just a helper, it isn't something really hard-setting the package. It's something to use if the user didn't specify using\n--mavenize.groupId, and the archive or project name is something insane, like few sencences paragraph (a description) or a number or such.",
"Adds all direct subtypes to the given list.\n\n@param type The type for which to determine the direct subtypes\n@param subTypes The list to receive the subtypes",
"Use this API to convert sslpkcs12."
] |
public static ModelNode createLocalHostHostInfo(final LocalHostControllerInfo hostInfo, final ProductConfig productConfig,
final IgnoredDomainResourceRegistry ignoredResourceRegistry, final Resource hostModelResource) {
final ModelNode info = new ModelNode();
info.get(NAME).set(hostInfo.getLocalHostName());
info.get(RELEASE_VERSION).set(Version.AS_VERSION);
info.get(RELEASE_CODENAME).set(Version.AS_RELEASE_CODENAME);
info.get(MANAGEMENT_MAJOR_VERSION).set(Version.MANAGEMENT_MAJOR_VERSION);
info.get(MANAGEMENT_MINOR_VERSION).set(Version.MANAGEMENT_MINOR_VERSION);
info.get(MANAGEMENT_MICRO_VERSION).set(Version.MANAGEMENT_MICRO_VERSION);
final String productName = productConfig.getProductName();
final String productVersion = productConfig.getProductVersion();
if(productName != null) {
info.get(PRODUCT_NAME).set(productName);
}
if(productVersion != null) {
info.get(PRODUCT_VERSION).set(productVersion);
}
ModelNode ignoredModel = ignoredResourceRegistry.getIgnoredResourcesAsModel();
if (ignoredModel.hasDefined(IGNORED_RESOURCE_TYPE)) {
info.get(IGNORED_RESOURCES).set(ignoredModel.require(IGNORED_RESOURCE_TYPE));
}
boolean ignoreUnaffectedServerGroups = hostInfo.isRemoteDomainControllerIgnoreUnaffectedConfiguration();
IgnoredNonAffectedServerGroupsUtil.addCurrentServerGroupsToHostInfoModel(ignoreUnaffectedServerGroups, hostModelResource, info);
return info;
} | [
"Create the metadata which gets send to the DC when registering.\n\n\n@param hostInfo the local host info\n@param productConfig the product config\n@param ignoredResourceRegistry registry of ignored resources\n@return the host info"
] | [
"Use this API to fetch snmpuser resource of given name .",
"Alternative entry point allowing an MPP file to be read from\na user-supplied POI file stream.\n\n@param fs POI file stream\n@return ProjectFile instance\n@throws MPXJException",
"Gets the Json Array representation of the given list of strings.\n@param keys List of strings\n@return the JsonArray represents the list of keys",
"process all messages in this batch, provided there is plenty of output space.",
"Gets the boxed type of a class\n\n@param type The type\n@return The boxed type",
"Returns the current definition on the indicated level.\n\n@param level The level\n@return The definition",
"Returns all the elements in the sorted set with a score in the given range.\nIn contrary to the default ordering of sorted sets, for this command the elements are considered to be ordered\nfrom high to low scores.\nThe elements having the same score are returned in reverse lexicographical order.\n@param scoreRange\n@return elements in the specified score range",
"Add an object into cache by key. The key will be used in conjunction with session id if\nthere is a session instance\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached",
"Combines two trajectories by adding the corresponding positions. The trajectories have to have the same length.\n@param a The first trajectory\n@param b The second trajectory\n@return The combined trajectory"
] |
public void populateFromAttributes(
@Nonnull final Template template,
@Nonnull final Map<String, Attribute> attributes,
@Nonnull final PObject requestJsonAttributes) {
if (requestJsonAttributes.has(JSON_REQUEST_HEADERS) &&
requestJsonAttributes.getObject(JSON_REQUEST_HEADERS).has(JSON_REQUEST_HEADERS) &&
!attributes.containsKey(JSON_REQUEST_HEADERS)) {
attributes.put(JSON_REQUEST_HEADERS, new HttpRequestHeadersAttribute());
}
for (Map.Entry<String, Attribute> attribute: attributes.entrySet()) {
try {
put(attribute.getKey(),
attribute.getValue().getValue(template, attribute.getKey(), requestJsonAttributes));
} catch (ObjectMissingException | IllegalArgumentException e) {
throw e;
} catch (Throwable e) {
String templateName = "unknown";
for (Map.Entry<String, Template> entry: template.getConfiguration().getTemplates()
.entrySet()) {
if (entry.getValue() == template) {
templateName = entry.getKey();
break;
}
}
String defaults = "";
if (attribute instanceof ReflectiveAttribute<?>) {
ReflectiveAttribute<?> reflectiveAttribute = (ReflectiveAttribute<?>) attribute;
defaults = "\n\n The attribute defaults are: " + reflectiveAttribute.getDefaultValue();
}
String errorMsg = "An error occurred when creating a value from the '" + attribute.getKey() +
"' attribute for the '" +
templateName + "' template.\n\nThe JSON is: \n" + requestJsonAttributes + defaults +
"\n" +
e.toString();
throw new AttributeParsingException(errorMsg, e);
}
}
if (template.getConfiguration().isThrowErrorOnExtraParameters()) {
final List<String> extraProperties = new ArrayList<>();
for (Iterator<String> it = requestJsonAttributes.keys(); it.hasNext(); ) {
final String attributeName = it.next();
if (!attributes.containsKey(attributeName)) {
extraProperties.add(attributeName);
}
}
if (!extraProperties.isEmpty()) {
throw new ExtraPropertyException("Extra properties found in the request attributes",
extraProperties, attributes.keySet());
}
}
} | [
"Process the requestJsonAttributes using the attributes and the MapfishParser and add all resulting\nvalues to this values object.\n\n@param template the template of the current request.\n@param attributes the attributes that will be used to add values to this values object\n@param requestJsonAttributes the json data for populating the attribute values"
] | [
"Commits the writes to the remote collection.",
"Add an additional compilation unit into the loop\n-> build compilation unit declarations, their bindings and record their results.",
"Writes the data collected about properties to a file.",
"Creates a Profile object from a SQL resultset\n\n@param result resultset containing the profile\n@return Profile\n@throws Exception exception",
"Append the html-code to finish a html mail message to the given buffer.\n\n@param buffer The StringBuffer to add the html code to.",
"Print a a basic type t",
"See page 385 of Fundamentals of Matrix Computations 2nd",
"Computes the product of the diagonal elements. For a diagonal or triangular\nmatrix this is the determinant.\n\n@param T A matrix.\n@return product of the diagonal elements.",
"Use this API to fetch rewritepolicy_csvserver_binding resources of given name ."
] |
public static String post(String url, Map<String, String> customHeaders, Map<String, String> params) throws IOException, HTTPException {
LOGGER.log(Level.INFO, "Sending POST request to the url {0}", url);
HttpPost httpPost = new HttpPost(url);
populateHeaders(httpPost, customHeaders);
if (params != null && params.size() > 0) {
List<NameValuePair> nameValuePairs = new ArrayList<>();
for (Map.Entry<String, String> param : params.entrySet()) {
nameValuePairs.add(new BasicNameValuePair(param.getKey(), param.getValue()));
}
httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
}
HttpClient httpClient = HttpClientBuilder.create().build();
HttpResponse httpResponse = httpClient.execute(httpPost);
int statusCode = httpResponse.getStatusLine().getStatusCode();
if (isErrorStatus(statusCode)) {
String jsonErrorResponse = EntityUtils.toString(httpResponse.getEntity(), StandardCharsets.UTF_8);
throw new HTTPException(statusCode, httpResponse.getStatusLine().getReasonPhrase(), jsonErrorResponse);
}
return EntityUtils.toString(httpResponse.getEntity(), StandardCharsets.UTF_8);
} | [
"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"
] | [
"Writes all auxiliary triples that have been buffered recently. This\nincludes OWL property restrictions but it also includes any auxiliary\ntriples required by complex values that were used in snaks.\n\n@throws RDFHandlerException\nif there was a problem writing the RDF triples",
"Generates and writes the sql for inserting the currently contained data objects.\n\n@param model The database model\n@param platform The platform\n@param writer The output stream",
"Computes the householder vector used in QR decomposition.\n\nu = x / max(x)\nu(0) = u(0) + |u|\nu = u / u(0)\n\n@param x Input vector. Unmodified.\n@return The found householder reflector vector",
"Create a new collaboration object.\n@param api the API connection used to make the request.\n@param accessibleBy the JSON object describing who should be collaborated.\n@param item the JSON object describing which item to collaborate.\n@param role the role to give the collaborators.\n@param notify the user/group should receive email notification of the collaboration or not.\n@param canViewPath the view path collaboration feature is enabled or not.\n@return info about the new collaboration.",
"Remove a license from an artifact\n\n@param gavc String The artifact GAVC\n@param licenseId String The license id to be removed.",
"Gets the date time str concise.\n\n@param d\nthe d\n@return the date time str concise",
"Use this API to add sslaction.",
"Fill the attributes in the processor.\n\n@param processors The processors\n@param initialAttributes The attributes\n@see RequireAttributes\n@see ProvideAttributes",
"Returns the number of consecutive leading one or zero bits.\nIf network is true, returns the number of consecutive leading one bits.\nOtherwise, returns the number of consecutive leading zero bits.\n\n@param network\n@return"
] |
public BUILDER setAttributeGroup(String attributeGroup) {
assert attributeGroup == null || attributeGroup.length() > 0;
//noinspection deprecation
this.attributeGroup = attributeGroup;
return (BUILDER) this;
} | [
"Sets the name of the attribute group with which this attribute is associated.\n\n@param attributeGroup the attribute group name. Cannot be an empty string but can be {@code null}\nif the attribute is not associated with a group.\n@return a builder that can be used to continue building the attribute definition"
] | [
"Add a marker so we can recognize this as a metadata archive. I would use the ZipFile comment, but\nthat is not available until Java 7, and Beat Link is supposed to be backwards compatible with Java 6.\nSince we are doing this anyway, we can also provide information about the nature of the cache, and\nhow many metadata entries it contains, which is useful for auto-attachment.\n\n@param trackListEntries the tracks contained in the cache, so we can record the number\n@param playlistId the playlist contained in the cache, or 0 if it is all tracks from the media\n@param zos the stream to which the ZipFile is being written\n\n@throws IOException if there is a problem creating the format entry",
"Determines if a token stream contains only numeric tokens\n@param stream\n@return true if all tokens in the given stream can be parsed as an integer",
"Generate a groupId tree regarding the filters\n\n@param moduleId\n@return TreeNode",
"Get points after extract boundary.\n\n@param fastBitmap Image to be processed.\n@return List of points.",
"See convertToSQL92.\n\n@return SQL like sub-expression\n@throws IllegalArgumentException oops",
"Returns the shared prefix of these columns. Null otherwise.\n\n@param associationKeyColumns the columns sharing a prefix\n@return the shared prefix of these columns. {@code null} otherwise.",
"Handle interval change.\n@param event the change event.",
"This method extracts project properties from a Phoenix file.\n\n@param phoenixSettings Phoenix settings\n@param storepoint Current storepoint",
"Convert an array of bytes into an array of ints. 4 bytes from the\ninput data map to a single int in the output data.\n@param bytes The data to read from.\n@return An array of 32-bit integers constructed from the data.\n@since 1.1"
] |
public float getPositionZ(int vertex) {
if (!hasPositions()) {
throw new IllegalStateException("mesh has no positions");
}
checkVertexIndexBounds(vertex);
return m_vertices.getFloat((vertex * 3 + 2) * SIZEOF_FLOAT);
} | [
"Returns the z-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the z coordinate"
] | [
"This method extracts calendar data from a Planner file.\n\n@param project Root node of the Planner file",
"Gets the SerialMessage as a byte array.\n@return the message",
"Adds an HTTP header to this request.\n@param key the header key.\n@param value the header value.",
"Close tracks when the JVM shuts down.\n@return this",
"binds the objects primary key and locking values to the statement, BRJ",
"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}",
"Add a IN clause so the column must be equal-to one of the objects from the list passed in.",
"Generates the path to an output file for a given source URL. Creates\nall necessary parent directories for the destination file.\n@param src the source\n@return the path to the output file",
"Use this API to fetch the statistics of all dos_stats resources that are configured on netscaler."
] |
public static appfwpolicylabel_binding get(nitro_service service, String labelname) throws Exception{
appfwpolicylabel_binding obj = new appfwpolicylabel_binding();
obj.set_labelname(labelname);
appfwpolicylabel_binding response = (appfwpolicylabel_binding) obj.get_resource(service);
return response;
} | [
"Use this API to fetch appfwpolicylabel_binding resource of given name ."
] | [
"This filter uses a 9-patch to overlay the image.\n\n@param imageUrl Watermark image URL. It is very important to understand that the same image\nloader that Thumbor uses will be used here.",
"Looks for sequences of integer lists and combine them into one big sequence",
"Create all the links possible between the Declaration and all the ImporterService matching the.\nImporterServiceFilter of the Linker.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration",
"Not implemented.\n@param point1 Point1\n@param point2 Point2\n@return Throws an exception.",
"Moves the request line reader to end of the line, checking that no non-space\ncharacter are found.\n\n@throws ProtocolException If more non-space tokens are found in this line,\nor the end-of-file is reached.",
"Checks the id value.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated",
"Indicates whether or not an event ID is a duplicate.\n\n<p>This method can be overridden by a subclass in order to provide custom de-duping logic.</p>\n\n@param eventID the event ID.\n@return true if the event is a duplicate; otherwise false.",
"Generate heroku-like random names\n\n@return String",
"Create a Count-Query for ReportQueryByCriteria"
] |
private JSONValue dateToJson(Date d) {
return null != d ? new JSONString(Long.toString(d.getTime())) : null;
} | [
"Convert a date to the String representation we use in the JSON.\n@param d the date to convert\n@return the String representation we use in the JSON."
] | [
"scans right to left until max to maintain latest max values for the multi-value property specified by key.\n\n@param key the property key\n@param left original list\n@param right new list\n@param remove if remove new list from original\n@param vr ValidationResult for error and merged list return",
"return a new managed connection. This connection is wrapped around the real connection and delegates to it\nto get work done.\n@param subject\n@param info\n@return",
"gets the bytes, sharing the cached array and does not clone it",
"This method reads an eight byte integer from the input array.\n\n@param data the input array\n@param offset offset of integer data in the array\n@return integer value",
"Concatenates the trajectory a and b\n@param a The end of this trajectory will be connected to the start of trajectory b\n@param b The start of this trajectory will be connected to the end of trajectory a\n@return Concatenated trajectory",
"Set the degrees of rotation. Value will be set to -1, if not available.\n\n@param rotation",
"Creates a template node for the given templateString and appends it to the given parent node.\n\nTemplates are translated to generator node trees and expressions in templates can be of type IGeneratorNode.\n\n@return the given parent node",
"Map message info.\n\n@param messageInfoType the message info type\n@return the message info",
"Updates the existing cluster such that we remove partitions mentioned\nfrom the stealer node and add them to the donor node\n\n@param currentCluster Existing cluster metadata. Both stealer and donor\nnode should already exist in this metadata\n@param stealerNodeId Id of node for which we are stealing the partitions\n@param donatedPartitions List of partitions we are moving\n@return Updated cluster metadata"
] |
@Override
protected URL getDefinitionsURL() {
try {
URL url = CustomEPSGCodes.class.getResource(CUSTOM_EPSG_CODES_FILE);
// quickly test url
try (InputStream stream = url.openStream()) {
//noinspection ResultOfMethodCallIgnored
stream.read();
}
return url;
} catch (Throwable e) {
throw new AssertionError("Unable to load /epsg.properties file from root of classpath.");
}
} | [
"Returns the URL to the property file that contains CRS definitions.\n\n@return The URL to the epsg file containing custom EPSG codes"
] | [
"Checks that excess arguments match the vararg signature parameter.\n@param params\n@param args\n@return -1 if no match, 0 if all arguments matches the vararg type and >0 if one or more vararg argument is\nassignable to the vararg type, but still not an exact match",
"Prints the data for a single class to the given stream. This will be a\nsingle line in CSV.\n\n@param out\nthe output to write to\n@param classRecord\nthe class record to write\n@param entityIdValue\nthe item id that this class record belongs to",
"Re-reads the given entity, refreshing any properties updated on the server-side during insert or update.",
"Removes a parameter from this configuration.\n\n@param key the parameter to remove",
"Use this API to fetch sslcertkey_sslvserver_binding resources of given name .",
"Returns true if the predicate is true for all pixels in the image.\n\n@param predicate a predicate function that accepts 3 parameters - the x,y coordinate and the pixel at that coordinate\n@return true if f holds for at least one pixel",
"Sends out the SQL as defined in the config upon first init of the connection.\n@param connection\n@param initSQL\n@throws SQLException",
"Triggers a new search with the given text.\n\n@param query the text to search for.",
"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\""
] |
protected StreamRequestHandlerState determineRequestHandlerState(String itemTag) {
if (keyIterator.hasNext() && !fetchedEnoughForAllPartitions()) {
return StreamRequestHandlerState.WRITING;
} else {
logger.info("Finished fetch " + itemTag + " for store '" + storageEngine.getName()
+ "' with partitions " + partitionIds);
progressInfoMessage("Fetch " + itemTag + " (end of scan)");
return StreamRequestHandlerState.COMPLETE;
}
} | [
"Determines if still WRITING or COMPLETE.\n\n@param itemTag mad libs style string to insert into progress message.\n@return state of stream request handler"
] | [
"Before cluster management operations, i.e. remember and disable quota\nenforcement settings",
"Gets the first row for a query\n\n@param query query to execute\n@return result or NULL",
"Add a range to this LOD group. Specify the scene object that should be displayed in this\nrange. Add the LOG group as a component to the parent scene object. The scene objects\nassociated with each range will automatically be added as children to the parent.\n@param range show the scene object if the camera distance is greater than this value\n@param sceneObject scene object that should be rendered when in this range\n@throws IllegalArgumentException if range is negative or sceneObject null",
"Returns the text content to any HTML.\n\n@param html the HTML\n\n@return the text content",
"Used to map from a var data key to a field type. Note this\nis designed for diagnostic use only, and uses an inefficient search.\n\n@param key var data key\n@return field type",
"Purges the JSP repository.<p<\n\n@param afterPurgeAction the action to execute after purging",
"Determine the current state the server is in.\n\n@return the server status",
"Use this API to change responderhtmlpage.",
"Adds the given some-value restriction to the list of restrictions that\nshould still be serialized. The given resource will be used as a subject.\n\n@param subject\n@param propertyUri\n@param rangeUri"
] |
private void readProjectProperties(Document cdp)
{
WorkspaceProperties props = cdp.getWorkspaceProperties();
ProjectProperties mpxjProps = m_projectFile.getProjectProperties();
mpxjProps.setSymbolPosition(props.getCurrencyPosition());
mpxjProps.setCurrencyDigits(props.getCurrencyDigits());
mpxjProps.setCurrencySymbol(props.getCurrencySymbol());
mpxjProps.setDaysPerMonth(props.getDaysPerMonth());
mpxjProps.setMinutesPerDay(props.getHoursPerDay());
mpxjProps.setMinutesPerWeek(props.getHoursPerWeek());
m_workHoursPerDay = mpxjProps.getMinutesPerDay().doubleValue() / 60.0;
} | [
"Extracts project properties from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file"
] | [
"Mbeans for FETCH_ENTRIES",
"Use this API to fetch vpnvserver_rewritepolicy_binding resources of given name .",
"Operations to do after all subthreads finished their work on index\n\n@param backend",
"Creates a random Hermitian matrix with elements from min to max value.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symmetric matrix.",
"Pops resource requests off the queue until queue is empty or an unexpired\nresource request is found. Invokes .handleTimeout on all expired resource\nrequests popped off the queue.\n\n@return null or a valid ResourceRequest",
"Generates a License regarding the parameters.\n\n@param name String\n@param longName String\n@param comments String\n@param regexp String\n@param url String\n@return License",
"Get the default providers list to be used.\n\n@return the default provider list and ordering, not null.",
"Update rows in the database.",
"Use this API to fetch vrid6 resource of given name ."
] |
public void setRequestType(int pathId, Integer requestType) {
if (requestType == null) {
requestType = Constants.REQUEST_TYPE_GET;
}
PreparedStatement statement = null;
try (Connection sqlConnection = sqlService.getConnection()) {
statement = sqlConnection.prepareStatement(
"UPDATE " + Constants.DB_TABLE_PATH +
" SET " + Constants.PATH_PROFILE_REQUEST_TYPE + " = ?" +
" WHERE " + Constants.GENERIC_ID + " = ?"
);
statement.setInt(1, requestType);
statement.setInt(2, pathId);
statement.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
if (statement != null) {
statement.close();
}
} catch (Exception e) {
}
}
} | [
"Sets the request type for this ID. Defaults to GET\n\n@param pathId ID of path\n@param requestType type of request to service"
] | [
"Extract assignment hyperlink data.\n\n@param assignment assignment instance\n@param data hyperlink data",
"Clears the proxy. A cleared proxy is defined as loaded\n\n@see Collection#clear()",
"Unilaterally merge an update description into this update description.\n@param otherDescription the update description to merge into this\n@return this merged update description",
"Create a buffered image with the correct image bands etc... for the tiles being loaded.\n\n@param imageWidth width of the image to create\n@param imageHeight height of the image to create.",
"Retains only beans which are enabled.\n\n@param beans The mutable set of beans to filter\n@param beanManager The bean manager\n@return a mutable set of enabled beans",
"Call the appropriate handler for handling the httprequest. 404 if path is not found. 405 if path is found but\nhttpMethod does not match what's configured.\n\n@param request instance of {@code HttpRequest}\n@param responder instance of {@code HttpResponder} to handle the request.",
"Get stream for URL only\n\n@param stringUrl URL to get content\n@return the input stream\n@throws IOException I/O error happened",
"Checks to see if all the diagonal elements in the matrix are positive.\n\n@param a A matrix. Not modified.\n@return true if all the diagonal elements are positive, false otherwise.",
"Sets the ssh password.\n\n@param password\nthe password\n@return the parallel task builder"
] |
public Reply getReplyInfo(String topicId, String replyId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_REPLIES_GET_INFO);
parameters.put("topic_id", topicId);
parameters.put("reply_id", replyId);
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element replyElement = response.getPayload();
return parseReply(replyElement);
} | [
"Get info for a given topic reply\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@param replyId\nUnique identifier of a reply for a given topic {@link Reply}.\n@return A group topic\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getInfo.html\">API Documentation</a>"
] | [
"Add a path to a profile, returns the id\n\n@param id ID of profile\n@param pathname name of path\n@param actualPath value of path\n@return ID of path created\n@throws Exception exception",
"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",
"replace the counter for K1-index o by new counter c",
"Adjust the date according to the whole day options.\n\n@param date the date to adjust.\n@param isEnd flag, indicating if the date is the end of the event (in contrast to the beginning)\n\n@return the adjusted date, which will be exactly the beginning or the end of the provide date's day.",
"This is the probability density function for the Gaussian\ndistribution.",
"Provisions a new user in an enterprise.\n@param api the API connection to be used by the created user.\n@param login the email address the user will use to login.\n@param name the name of the user.\n@return the created user's info.",
"Use this API to fetch filtered set of sslcipher_individualcipher_binding resources.\nset the filter parameter values in filtervalue object.",
"Extracts the nullity of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The nullity of the decomposed matrix.",
"Returns the simplified name of the type of the specified object."
] |
synchronized long storeUserProfile(String id, JSONObject obj) {
if (id == null) return DB_UPDATE_ERROR;
if (!this.belowMemThreshold()) {
getConfigLogger().verbose("There is not enough space left on the device to store data, data discarded");
return DB_OUT_OF_MEMORY_ERROR;
}
final String tableName = Table.USER_PROFILES.getName();
long ret = DB_UPDATE_ERROR;
try {
final SQLiteDatabase db = dbHelper.getWritableDatabase();
final ContentValues cv = new ContentValues();
cv.put(KEY_DATA, obj.toString());
cv.put("_id", id);
ret = db.insertWithOnConflict(tableName, null, cv, SQLiteDatabase.CONFLICT_REPLACE);
} catch (final SQLiteException e) {
getConfigLogger().verbose("Error adding data to table " + tableName + " Recreating DB");
dbHelper.deleteDatabase();
} finally {
dbHelper.close();
}
return ret;
} | [
"Adds a JSON string representing to the DB.\n\n@param obj the JSON to record\n@return the number of rows in the table, or DB_OUT_OF_MEMORY_ERROR/DB_UPDATE_ERROR"
] | [
"Retrieve the routing type value from the REST request.\n\"X_VOLD_ROUTING_TYPE_CODE\" is the routing type header.\n\nBy default, the routing code is set to NORMAL\n\nTODO REST-Server 1. Change the header name to a better name. 2. Assumes\nthat integer is passed in the header",
"Returns all model classes registered on this datasource\n\n@return model classes talk to this datasource",
"Use this API to fetch dnstxtrec resources of given names .",
"Delivers the correct JSON Object for the stencilId\n\n@param stencilId\n@throws org.json.JSONException",
"Remove an existing Corporate GroupId from an organization.\n\n@return Response",
"The specified interface must not contain methods, that changes the state of this object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@param settings\nsettings to generate code\n@return generated source code as string in a result wrapper",
"Process a file.\n\n@param file the file to be processed\n@param mode the patching mode\n@throws IOException",
"Process UDFs for a specific object.\n\n@param mpxj field container\n@param udfs UDF values",
"Use this API to unset the properties of nsacl6 resources.\nProperties that need to be unset are specified in args array."
] |
private void processCalendarException(ProjectCalendar calendar, Row row)
{
Date fromDate = row.getDate("CD_FROM_DATE");
Date toDate = row.getDate("CD_TO_DATE");
boolean working = row.getInt("CD_WORKING") != 0;
ProjectCalendarException exception = calendar.addCalendarException(fromDate, toDate);
if (working)
{
exception.addRange(new DateRange(row.getDate("CD_FROM_TIME1"), row.getDate("CD_TO_TIME1")));
exception.addRange(new DateRange(row.getDate("CD_FROM_TIME2"), row.getDate("CD_TO_TIME2")));
exception.addRange(new DateRange(row.getDate("CD_FROM_TIME3"), row.getDate("CD_TO_TIME3")));
exception.addRange(new DateRange(row.getDate("CD_FROM_TIME4"), row.getDate("CD_TO_TIME4")));
exception.addRange(new DateRange(row.getDate("CD_FROM_TIME5"), row.getDate("CD_TO_TIME5")));
}
} | [
"Process a calendar exception.\n\n@param calendar parent calendar\n@param row calendar exception data"
] | [
"This returns all profiles associated with a server name\n\n@param serverName server Name\n@return profile UUID\n@throws Exception exception",
"Set some initial values.",
"Retrieves the configured message by property key\n@param key The key in the file\n@return The associated value in case the key is found in the message bundle file. If\nno such key is defined, the returned value would be the key itself.",
"build an Authentication.\n\nTypes:\n<ul>\n<li>plain:jafka</li>\n<li>md5:77be29f6d71ec4e310766ddf881ae6a0</li>\n<li>crc32:1725717671</li>\n</ul>\n@param crypt password style\n@return an authentication\n@throws IllegalArgumentException password error",
"Start ssh session and obtain session.\n\n@return the session",
"Specify the output format of the image.\n\n@see ImageFormat",
"Create the required services according to the server setup\n\n@param config Service configuration\n@return Services map",
"Read an int from the byte array starting at the given offset\n\n@param bytes The byte array to read from\n@param offset The offset to start reading at\n@return The int read",
"Use this API to fetch authenticationlocalpolicy_authenticationvserver_binding resources of given name ."
] |
Subsets and Splits