query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public static base_response unset(nitro_service client, ntpserver resource, String[] args) throws Exception{
ntpserver unsetresource = new ntpserver();
unsetresource.serverip = resource.serverip;
unsetresource.servername = resource.servername;
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of ntpserver resource.\nProperties that need to be unset are specified in args array."
] | [
"Sets object for statement at specific index, adhering to platform- and null-rules.\n@param stmt the statement\n@param index the current parameter index\n@param value the value to set\n@param sqlType the JDBC SQL-type of the value\n@throws SQLException on platform error",
"Implement this to do your drawing.\n\n@param canvas the canvas on which the background will be drawn",
"Returns the most likely class for the word at the given position.",
"Gets the Square Euclidean distance between two points.\n\n@param x A point in space.\n@param y A point in space.\n@return The Square Euclidean distance between x and y.",
"Count the statements and property uses of an item or property document.\n\n@param usageStatistics\nstatistics object to store counters in\n@param statementDocument\ndocument to count the statements of",
"Returns width and height that allow the given source width, height to fit inside the target width, height\nwithout losing aspect ratio",
"Join the Collection of Strings using the specified delimiter.\n\n@param s\nThe String collection\n@param delimiter\nThe delimiter String\n@return The joined String",
"Use this API to fetch all the nsrpcnode resources that are configured on netscaler.",
"Provide array of String results from inputOutput MFString field named string.\n@return value of string field"
] |
public String[] init(String[] argv, int min, int max,
Collection<CommandLineParser.Option> options)
throws IOException, SAXException {
// parse command line
parser = new CommandLineParser();
parser.setMinimumArguments(min);
parser.setMaximumArguments(max);
parser.registerOption(new CommandLineParser.BooleanOption("reindex", 'I'));
if (options != null)
for (CommandLineParser.Option option : options)
parser.registerOption(option);
try {
argv = parser.parse(argv);
} catch (CommandLineParser.CommandLineParserException e) {
System.err.println("ERROR: " + e.getMessage());
usage();
System.exit(1);
}
// do we need to reindex?
boolean reindex = parser.getOptionState("reindex");
// load configuration
config = ConfigLoader.load(argv[0]);
database = config.getDatabase(reindex); // overwrite iff reindex
if (database.isInMemory())
reindex = true; // no other way to do it in this case
// reindex, if requested
if (reindex)
reindex(config, database);
return argv;
} | [
"These exact lines are shared between three different tools, so\nthey have been moved here to reduce code duplication.\n@return The parsed command-line, with options removed."
] | [
"Get the element at the index as an integer.\n\n@param i the index of the element to access",
"Generate the body of a toString method that uses plain concatenation.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\nalways present, this can be done with a long block of unconditional code. We could use a\nStringBuilder for this, but in fact the Java compiler will do this for us under the hood\nif we use simple string concatenation, so we use the more readable approach.",
"Set the DPI value for GeoServer if there are already FORMAT_OPTIONS.",
"Notify all shutdown listeners that the shutdown completed.",
"A helper - in Java 9, the extension CL was renamed to platform CL and hosts all the JDK classes. Before 9, it was useless and we used\nbootstrap CL instead.\n\n@return the base CL to use.",
"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.",
"Calculate Mode value.\n@param values Values.\n@return Returns mode value of the histogram array.",
"Removes a named property from the object.\n\nIf the property is not found, no action is taken.\n\n@param name the name of the property",
"Compares two annotated types and returns true if they are the same"
] |
public final void end() {
final Thread thread = threadRef;
if (thread != null) {
thread.interrupt();
try {
thread.join();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
this.threadRef = null;
} | [
"Stops the scavenger."
] | [
"Look-up the results data for a particular test class.",
"Combines adjacent blocks of the same type.",
"Get a list of topics from a group.\n\n@param groupId\nUnique identifier of a group returns a list of topics for a given group {@link Group}.\n@param perPage\nNumber of records per page.\n@param page\nResult-section.\n@return A group topic list\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.topics.getList.html\">API Documentation</a>",
"Answer the SQL-Clause for a FieldCriteria\n\n@param c FieldCriteria\n@param cld ClassDescriptor",
"Starts a background thread which calls the controller every\ncheck_interval milliseconds. Returns immediately, leaving the\nbackground thread running.",
"Use this API to Reboot reboot.",
"Required to close the connection reading on the terminal, otherwise\nit can't be interrupted.\n\n@throws InterruptedException",
"Adds an EJB descriptor to the maps\n\n@param ejbDescriptor The EJB descriptor to add",
"This filter permit to return an image sized exactly as requested wherever is its ratio by\nfilling with chosen color the missing parts. Usually used with \"fit-in\" or \"adaptive-fit-in\"\n\n@param color integer representation of color."
] |
private Server setUpServer() {
Server server = new Server(port);
ResourceHandler handler = new ResourceHandler();
handler.setDirectoriesListed(true);
handler.setWelcomeFiles(new String[]{"index.html"});
handler.setResourceBase(getReportDirectoryPath().toAbsolutePath().toString());
HandlerList handlers = new HandlerList();
handlers.setHandlers(new Handler[]{handler, new DefaultHandler()});
server.setStopAtShutdown(true);
server.setHandler(handlers);
return server;
} | [
"Set up server for report directory."
] | [
"Parse one resource to a shape object and add it to the shapes array\n@param shapes\n@param flatJSON\n@param resourceId\n@throws org.json.JSONException",
"Append Join for SQL92 Syntax",
"private HttpServletResponse headers;",
"Sets the bottom padding for all cells in the table.\n@param paddingBottom new padding, ignored if smaller than 0\n@return this to allow chaining",
"Returns the text value of all of the elements in the collection.\n\n@return the text value of all the elements in the collection or null",
"Creates an Executor that is based on daemon threads.\nThis allows the program to quit without explicitly\ncalling shutdown on the pool\n\n@return the newly created single-threaded Executor",
"Takes a string of the form \"x1=y1,x2=y2,...\" and returns Map\n@param map A string of the form \"x1=y1,x2=y2,...\"\n@return A Map m is returned such that m.get(xn) = yn",
"Generate a placeholder for an unknown type.\n\n@param type expected type\n@param fieldID field ID\n@return placeholder",
"Gets a SerialMessage with the SENSOR_ALARM_SUPPORTED_GET command\n@return the serial message, or null if the supported command is not supported."
] |
public AT_Context setFrameTopBottomMargin(int frameTop, int frameBottom){
if(frameTop>-1 && frameBottom>-1){
this.frameTopMargin = frameTop;
this.frameBottomMargin = frameBottom;
}
return this;
} | [
"Sets the top and bottom frame margin.\n@param frameTop margin\n@param frameBottom margin\n@return this to allow chaining"
] | [
"Deletes the concrete representation of the specified object in the underlying\npersistence system. This method is intended for use in top-level api or\nby internal calls.\n\n@param obj The object to delete.\n@param ignoreReferences With this flag the automatic deletion/unlinking\nof references can be suppressed (independent of the used auto-delete setting in metadata),\nexcept {@link org.apache.ojb.broker.metadata.SuperReferenceDescriptor}\nthese kind of reference (descriptor) will always be performed. If <em>true</em>\nall \"normal\" referenced objects will be ignored, only the specified object is handled.\n@throws PersistenceBrokerException",
"Count the number of queued resource requests for a specific pool.\n\n@param key The key\n@return The count of queued resource requests. Returns 0 if no queue\nexists for given key.",
"Processes an anonymous reference definition.\n\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the reference as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\nreferenced object on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe referenced object\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\nreferenced object\"\[email protected] name=\"class-ref\" optional=\"false\" description=\"The fully qualified name of the class\nowning the referenced field\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the reference\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The fields in the current type used for\nimplementing the reference\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the reference is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the reference\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\nreference\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The fields in the referenced type\ncorresponding to the local fields (is only used for the table definition)\"",
"Performs the actual spell check query using Solr.\n\n@param request the spell check request\n\n@return Results of the Solr spell check of type SpellCheckResponse or null if something goes wrong.",
"Checks the given class descriptor.\n\n@param classDef The class descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"Read a nested table. Instantiates the supplied reader class to\nextract the data.\n\n@param reader table reader class\n@return table rows",
"Read resource assignment baseline values.\n\n@param row result set row",
"Use this API to fetch all the responderpolicy resources that are configured on netscaler.",
"Returns true if the given method has a possibly matching instance method with the given name and arguments.\n\n@param name the name of the method of interest\n@param arguments the arguments to match against\n@return true if a matching method was found"
] |
public static Organization createOrganization(final String name){
final Organization organization = new Organization();
organization.setName(name);
return organization;
} | [
"Generates an organization regarding the parameters.\n\n@param name String\n@return Organization"
] | [
"Check invariant.\n\n@param browser The browser.\n@return Whether the condition is satisfied or <code>false</code> when it it isn't or a\n{@link CrawljaxException} occurs.",
"Get a View that displays the data at the specified\nposition in the data set. In this case, if we are at\nthe end of the list and we are still in append mode, we\nask for a pending view and return it, plus kick off the\nbackground task to append more data to the wrapped\nadapter.\n\n@param position Position of the item whose data we want\n@param convertView View to recycle, if not null\n@param parent ViewGroup containing the returned View",
"Subtract two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the subtract of specified complex numbers.",
"Method used to write the name of the scenarios\n\n@param word\n@return the same word starting with capital letter",
"Converts this address to a prefix length\n\n@return the prefix of the indicated IP type represented by this address or null if this address is valid but cannot be represented by a network prefix length\n@throws AddressStringException if the address is invalid",
"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",
"This method writes task data to an MSPDI file.\n\n@param project Root node of the MSPDI file",
"This method determines whether the given date falls in the range of\ndates covered by this exception. Note that this method assumes that both\nthe start and end date of this exception have been set.\n\n@param date Date to be tested\n@return Boolean value",
"Creates a new tag in a workspace or organization.\n\nEvery tag is required to be created in a specific workspace or\norganization, and this cannot be changed once set. Note that you can use\nthe `workspace` parameter regardless of whether or not it is an\norganization.\n\nReturns the full record of the newly created tag.\n\n@param workspace The workspace or organization to create the tag in.\n@return Request object"
] |
public static final String hexdump(byte[] buffer, int offset, int length, boolean ascii, int columns, String prefix)
{
StringBuilder sb = new StringBuilder();
if (buffer != null)
{
int index = offset;
DecimalFormat df = new DecimalFormat("00000");
while (index < (offset + length))
{
if (index + columns > (offset + length))
{
columns = (offset + length) - index;
}
sb.append(prefix);
sb.append(df.format(index - offset));
sb.append(":");
sb.append(hexdump(buffer, index, columns, ascii));
sb.append('\n');
index += columns;
}
}
return (sb.toString());
} | [
"Dump raw data as hex.\n\n@param buffer buffer\n@param offset offset into buffer\n@param length length of data to dump\n@param ascii true if ASCII should also be printed\n@param columns number of columns\n@param prefix prefix when printing\n@return hex dump"
] | [
"Returns all visble sets and pools the photo belongs to.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo to return information for.\n@return a list of {@link PhotoContext} objects\n@throws FlickrException",
"Adds a metadata classification to the specified file.\n\n@param classificationType the metadata classification type.\n@return the metadata classification type added to the file.",
"Queues a Runnable to be run on the main thread on the next iteration of\nthe messaging loop. This is handy when code running on the main thread\nneeds to run something else on the main thread, but only after the\ncurrent code has finished executing.\n\n@param r\nThe {@link Runnable} to run on the main thread.\n@return Returns {@code true} if the Runnable was successfully placed in\nthe Looper's message queue.",
"Sets the license for a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo to update the license for.\n@param licenseId\nThe license to apply, or 0 (zero) to remove the current license.\n@throws FlickrException",
"Add a comment to a photoset. This method requires authentication with 'write' permission.\n\n@param photosetId\nThe id of the photoset to add a comment to.\n@param commentText\nText of the comment\n@return the comment id\n@throws FlickrException",
"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",
"Retrieve the correct calendar for a resource.\n\n@param calendarID calendar ID\n@return calendar for resource",
"Generates a change event for a local update of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@param update the update specifier.\n@return a change event for a local update of a document in the given namespace referring\nto the given document _id.",
"Returns all found resolvers\n@return"
] |
public List<LogSegment> trunc(int newStart) {
if (newStart < 0) {
throw new IllegalArgumentException("Starting index must be positive.");
}
while (true) {
List<LogSegment> curr = contents.get();
int newLength = Math.max(curr.size() - newStart, 0);
List<LogSegment> updatedList = new ArrayList<LogSegment>(curr.subList(Math.min(newStart, curr.size() - 1),
curr.size()));
if (contents.compareAndSet(curr, updatedList)) {
return curr.subList(0, curr.size() - newLength);
}
}
} | [
"Delete the first n items from the list\n\n@param newStart the logsegment who's index smaller than newStart will be deleted.\n@return the deleted segment"
] | [
"Returns true if all pixels in the array have the same color",
"public because it's used by other packages that use Duke",
"This method writes task data to an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Try Oracle update batching and call setExecuteBatch or revert to\nJDBC update batching. See 12-2 Update Batching in the Oracle9i\nJDBC Developer's Guide and Reference.\n@param stmt the prepared statement to be used for batching\n@throws PlatformException upon JDBC failure",
"Gets the default configuration for Freemarker within Windup.",
"convolution data type",
"Constructs the path from FQCN, validates writability, and creates a writer.",
"Get a writer implementation to push data into Canvas while being able to control the behavior of blank values.\nIf the serializeNulls parameter is set to true, this writer will serialize null fields in the JSON being\nsent to Canvas. This is required if you want to explicitly blank out a value that is currently set to something.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param serializeNulls Whether or not to include null fields in the serialized JSON. Defaults to false if null\n@param <T> A writer implementation\n@return An instantiated instance of the requested writer type",
"Use this API to add dnsaaaarec."
] |
public static String groupFromResourceId(String id) {
return (id != null) ? ResourceId.fromString(id).resourceGroupName() : null;
} | [
"Extract resource group from a resource ID string.\n@param id the resource ID string\n@return the resource group name"
] | [
"Converts an XML file to an object.\n\n@param fileName The filename where to save it to.\n@return The object.\n@throws FileNotFoundException On error.",
"Removes the value from the Collection mapped to by this key, leaving the\nrest of the collection intact.\n\n@param key\nthe key to the Collection to remove the value from\n@param value\nthe value to remove",
"Adds one statement to the list of statements to be kept, possibly merging\nit with other statements to be kept if possible. When two existing\nstatements are merged, one of them will be updated and the other will be\nmarked for deletion.\n\n@param statement\nstatement to add\n@param isNew\nif true, the statement should be marked for writing; if false,\nthe statement already exists in the current data and is only\nadded to remove duplicates and avoid unnecessary writes",
"calculate distance of two points\n\n@param a\n@param b\n@return",
"orientation state factory method",
"Put a new resource description into the index, or remove one if the delta has no new description. A delta for a\nparticular URI may be registered more than once; overwriting any earlier registration.\n\n@param delta\nThe resource change.\n@since 2.9",
"Answer the SQL-Clause for a BetweenCriteria\n\n@param alias\n@param pathInfo\n@param c BetweenCriteria\n@param buf",
"Returns the vertex with given ID framed into given interface.",
"Sets all dates in the list.\n@param dates the dates to set\n@param checked flag, indicating if all should be checked or unchecked."
] |
public Conditionals ifModifiedSince(LocalDateTime time) {
Preconditions.checkArgument(match.isEmpty(), String.format(ERROR_MESSAGE, HeaderConstants.IF_MODIFIED_SINCE, HeaderConstants.IF_MATCH));
Preconditions.checkArgument(!unModifiedSince.isPresent(), String.format(ERROR_MESSAGE, HeaderConstants.IF_MODIFIED_SINCE, HeaderConstants.IF_UNMODIFIED_SINCE));
time = time.withNano(0);
return new Conditionals(empty(), noneMatch, Optional.of(time), Optional.empty());
} | [
"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."
] | [
"joins a collection of objects together as a String using a separator",
"Loads the configuration from file \"OBJ.properties\". If the system\nproperty \"OJB.properties\" is set, then the configuration in that file is\nloaded. Otherwise, the file \"OJB.properties\" is tried. If that is also\nunsuccessful, then the configuration is filled with default values.",
"Creates a new Box Developer Edition connection with App User token.\n@param userId the user ID to use for an App User.\n@param clientId the client ID to use when exchanging the JWT assertion for an access token.\n@param clientSecret the client secret to use when exchanging the JWT assertion for an access token.\n@param encryptionPref the encryption preferences for signing the JWT.\n@param accessTokenCache the cache for storing access token information (to minimize fetching new tokens)\n@return a new instance of BoxAPIConnection.",
"Runs the command session.\nCreate the Shell, then run this method to listen to the user,\nand the Shell will invoke Handler's methods.\n@throws java.io.IOException when can't readLine() from input.",
"Converts to a link-local Ipv6 address. Any MAC prefix length is ignored. Other elements of this address section are incorporated into the conversion.\nThis will provide the latter 4 segments of an IPv6 address, to be paired with the link-local IPv6 prefix of 4 segments.\n\n@return",
"Runs the currently entered query and displays the results.",
"cancels a running assembly.\n\n@param url full url of the Assembly.\n@return {@link AssemblyResponse}\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"Removes trailing and leading whitespace, and also reduces each\nsequence of internal whitespace to a single space.",
"Checks if there is an annotation of the given type on this method or on type level for all interfaces and superclasses\n\n@param method the method to scan\n@param annotation the annotation to search for\n@return <i>true</i> if the given annotation is present on method or type level annotations in the type hierarchy"
] |
@SuppressWarnings("rawtypes")
public static MonetaryAmountFactory getAmountFactory(MonetaryAmountFactoryQuery query) {
return Optional.ofNullable(monetaryAmountsSingletonQuerySpi()).orElseThrow(() -> new MonetaryException(
"No MonetaryAmountsSingletonQuerySpi loaded, query functionality is not available."))
.getAmountFactory(query);
} | [
"Executes the query and returns the factory found, if there is only one factory.\nIf multiple factories match the query, one is selected.\n\n@param query the factory query, not null.\n@return the factory found, or null."
] | [
"Append the path to the StringBuilder.\n\n@param result the string builder to add the path to.",
"Add a forward to this curve.\n\n@param model An analytic model providing a context. The discount curve (if needed) is obtained from this model.\n@param fixingTime The given fixing time.\n@param forward The given forward.\n@param isParameter If true, then this point is server via {@link #getParameter()} and changed via {@link #setParameter(RandomVariable[])} and {@link #getCloneForParameter(RandomVariable[])}, i.e., it can be calibrated.",
"Gets the value of the given header field.\n@param fieldName name of the header field.\n@return value of the header.",
"Remove a PropertyChangeListener for a specific property from this node.\nThis functionality has. Please note that the listener this does not remove\na listener that has been added without specifying the property it is\ninterested in.",
"generate a prepared UPDATE-Statement for the Class\ndescribed by cld\n@param cld the ClassDescriptor",
"Returns all entries in no particular order.",
"Stops the background stream thread.",
"sets the initialization method for this descriptor",
"Finds all lazily-declared classes and methods and adds their definitions to the source."
] |
@Override
public void start(String[] arguments) {
boolean notStarted = !started.getAndSet(true);
if (notStarted) {
start(new MultiInstanceWorkloadStrategy(factory, name, arguments, endpointRegistry, execService));
}
} | [
"Start the operation by instantiating the first job instance in a separate Thread.\n\n@param arguments {@inheritDoc}"
] | [
"Applies the matrices computed from the scene object's\nlinked to the skeleton bones to the current pose.\n@see #applyPose(GVRPose, int)\n@see #setPose(GVRPose)",
"Create a local target.\n\n@param jbossHome the jboss home\n@param moduleRoots the module roots\n@param bundlesRoots the bundle roots\n@return the local target\n@throws IOException",
"add a foreign key field ID",
"Removes a design document using the id and rev from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@param rev the document revision\n@return {@link DesignDocument}",
"Propagates the names of all facets to each single facet.",
"Formats a vertex using it's properties. Debugging purposes.",
"Deploys application reading resources from specified InputStream\n\n@param inputStream where resources are read\n@throws IOException",
"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",
"Polls from the URL provided.\n\n@param url the URL to poll from.\n@return the raw response."
] |
public byte[] getByteArray(int offset)
{
byte[] result = null;
if (offset > 0 && offset < m_data.length)
{
int nextBlockOffset = MPPUtility.getInt(m_data, offset);
offset += 4;
int itemSize = MPPUtility.getInt(m_data, offset);
offset += 4;
if (itemSize > 0 && itemSize < m_data.length)
{
int blockRemainingSize = 28;
if (nextBlockOffset != -1 || itemSize <= blockRemainingSize)
{
int itemRemainingSize = itemSize;
result = new byte[itemSize];
int resultOffset = 0;
while (nextBlockOffset != -1)
{
MPPUtility.getByteArray(m_data, offset, blockRemainingSize, result, resultOffset);
resultOffset += blockRemainingSize;
offset += blockRemainingSize;
itemRemainingSize -= blockRemainingSize;
if (offset != nextBlockOffset)
{
offset = nextBlockOffset;
}
nextBlockOffset = MPPUtility.getInt(m_data, offset);
offset += 4;
blockRemainingSize = 32;
}
MPPUtility.getByteArray(m_data, offset, itemRemainingSize, result, resultOffset);
}
}
}
return (result);
} | [
"Retrieve a byte array of containing the data starting at the supplied\noffset in the FixDeferFix file. Note that this method will return null\nif the requested data is not found for some reason.\n\n@param offset Offset into the file\n@return Byte array containing the requested data"
] | [
"Delivers the correct JSON Object for the stencilId\n\n@param stencilId\n@throws org.json.JSONException",
"Use this API to fetch tmsessionpolicy_binding resource of given name .",
"Produces a new ConditionalCounter.\n\n@return a new ConditionalCounter, where order of indices is reversed",
"Loads the specified class name and stores it in the hash\n\n@param className class name\n@throws Exception exception",
"Resets all override settings for the clientUUID and disables it\n\n@param profileId profile ID of the client\n@param clientUUID UUID of the client\n@throws Exception exception",
"Pretty print a progress update after each batch complete.\n\n@param batchCount current batch\n@param numBatches total number of batches\n@param partitionStoreCount partition stores migrated\n@param numPartitionStores total number of partition stores to migrate\n@param totalTimeMs total time, in milliseconds, of execution thus far.",
"Stops the background data synchronization thread.",
"Use this API to add authenticationradiusaction.",
"Return the key if there is one else return -1"
] |
public Collection<SerialMessage> initialize() {
ArrayList<SerialMessage> result = new ArrayList<SerialMessage>();
if (this.getNode().getManufacturer() == 0x010F && this.getNode().getDeviceType() == 0x0501) {
logger.warn("Detected Fibaro FGBS001 Universal Sensor - this device fails to respond to SENSOR_ALARM_GET and SENSOR_ALARM_SUPPORTED_GET.");
return result;
}
result.add(this.getSupportedMessage());
return result;
} | [
"Initializes the alarm sensor command class. Requests the supported alarm types."
] | [
"get the type signature corresponding to given class\n\n@param clazz\n@return",
"Mojos perform different dependency resolution, so we add dependencies for each mojo.",
"Given a path to a VFS resource, the method removes the OpenCms context,\nin case the path is prefixed by that context.\n@param path the path where the OpenCms context should be removed\n@return the adjusted path",
"This method is called if the data set has been scrolled.",
"Unlock all edited resources.",
"Determine if a CharSequence can be parsed as a Double.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isDouble(String)\n@since 1.8.2",
"Print a time value.\n\n@param value time value\n@return time value",
"Try to unlink the declaration from the importerService referenced by the ServiceReference,.\nreturn true if they have been cleanly unlink, false otherwise.\n\n@param declaration The Declaration\n@param declarationBinderRef The ServiceReference of the ImporterService\n@return true if they have been cleanly unlink, false otherwise.",
"Use this API to update bridgetable resources."
] |
public boolean isObjectsFieldValueDefault(Object object) throws SQLException {
Object fieldValue = extractJavaFieldValue(object);
return isFieldValueDefault(fieldValue);
} | [
"Return whether or not the data object has a default value passed for this field of this type."
] | [
"Create a JavadocComment, by formatting the text of the Javadoc using the given indentation.",
"Start the actual migration. Take the version of the database, get all required migrations and execute them or do\nnothing if the DB is already up to date.\n\nAt the end the underlying database instance is closed.\n\n@throws MigrationException if a migration fails",
"Returns the sentence as a string with a space between words.\nDesigned to work robustly, even if the elements stored in the\n'Sentence' are not of type Label.\n\nThis one uses the default separators for any word type that uses\nseparators, such as TaggedWord.\n\n@param justValue If <code>true</code> and the elements are of type\n<code>Label</code>, return just the\n<code>value()</code> of the <code>Label</code> of each word;\notherwise,\ncall the <code>toString()</code> method on each item.\n@return The sentence in String form",
"Set the locking values\n@param cld\n@param obj\n@param oldLockingValues",
"Prepares transformation interceptors for a client.\n\n@param clientConfig the client configuration\n@param newClient indicates if it is a new/updated client",
"Main entry point to read criteria data.\n\n@param properties project properties\n@param data criteria data block\n@param dataOffset offset of the data start within the larger data block\n@param entryOffset offset of start node for walking the tree\n@param prompts optional list to hold prompts\n@param fields optional list of hold fields\n@param criteriaType optional array representing criteria types\n@return first node of the criteria",
"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)",
"Add information about host and thread to specified test case started event\n\n@param event given event to update\n@return updated event",
"Creates metadata on this folder using a specified scope and template.\n\n@param templateName the name of the metadata template.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").\n@param metadata the new metadata values.\n@return the metadata returned from the server."
] |
@VisibleForTesting
protected static int getBarSize(final ScaleBarRenderSettings settings) {
if (settings.getParams().barSize != null) {
return settings.getParams().barSize;
} else {
if (settings.getParams().getOrientation().isHorizontal()) {
return settings.getMaxSize().height / 4;
} else {
return settings.getMaxSize().width / 4;
}
}
} | [
"Get the bar size.\n\n@param settings Parameters for rendering the scalebar."
] | [
"Adds a port that serves the HTTP requests. If unspecified, cleartext HTTP on port 36462 is used.\n\n@param localAddress the TCP/IP load address to bind\n@param protocol {@link SessionProtocol#HTTP} or {@link SessionProtocol#HTTPS}",
"Groups the current element according to the value\n\n@param answer the map containing the results\n@param element the element to be placed\n@param value the value according to which the element will be placed\n@since 1.5.0",
"This method is called to format a task type.\n\n@param value task type value\n@return formatted task type",
"Use this API to export appfwlearningdata.",
"Build all combinations of graph structures for generic event stubs of a maximum length\n@param length Maximum number of nodes in each to generate\n@return All graph combinations of specified length or less",
"Use this API to fetch all the autoscaleaction resources that are configured on netscaler.",
"Returns true if the given method has a possibly matching instance method with the given name and arguments.\n\n@param name the name of the method of interest\n@param arguments the arguments to match against\n@return true if a matching method was found",
"Drops a driver from the DriverManager's list.",
"Add a method to the enabled response overrides for a path\n\n@param pathName name of path\n@param methodName name of method\n@return true if success, false otherwise"
] |
public static CuratorFramework newAppCurator(FluoConfiguration config) {
return newCurator(config.getAppZookeepers(), config.getZookeeperTimeout(),
config.getZookeeperSecret());
} | [
"Creates a curator built using Application's zookeeper connection string. Root path will start\nat Fluo application chroot."
] | [
"Create and serialize a WorkerStatus for a pause event.\n\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus",
"Moves the elements contained in \"band\" in the Y axis \"yOffset\"\n@param yOffset\n@param band",
"a helper method to enable the keyboardUtil for a specific activity\nor disable it. note this will cause some frame drops because of the\nlistener.\n\n@param activity\n@param enable",
"Sets the default pattern values dependent on the provided start date.\n@param startDate the date, the default values are determined with.",
"Create a Map composed of the entries of the first map minus the\nentries of the given map.\n\n@param self a map object\n@param removeMe the entries to remove from the map\n@return the resulting map\n@since 1.7.4",
"Use this API to fetch all the rnatparam resources that are configured on netscaler.",
"This is a convenience method used to add a default set of calendar\nhours to a calendar.\n\n@param day Day for which to add default hours for",
"Normalizes the name so it can be used as Maven artifactId or groupId.",
"Account for key being fetched.\n\n@param key"
] |
public List<CmsProject> getAllAccessibleProjects(CmsObject cms, String ouFqn, boolean includeSubOus)
throws CmsException {
CmsOrganizationalUnit orgUnit = readOrganizationalUnit(cms, ouFqn);
return (m_securityManager.getAllAccessibleProjects(cms.getRequestContext(), orgUnit, includeSubOus));
} | [
"Returns all accessible projects of the given organizational unit.\n\nThat is all projects which are owned by the current user or which are\naccessible for the group of the user.<p>\n\n@param cms the opencms context\n@param ouFqn the fully qualified name of the organizational unit to get projects for\n@param includeSubOus if all projects of sub-organizational units should be retrieved too\n\n@return all <code>{@link org.opencms.file.CmsProject}</code> objects in the organizational unit\n\n@throws CmsException if operation was not successful"
] | [
"Renames this folder.\n\n@param newName the new name of the folder.",
"Write a new line and indent.",
"Read an optional string value form a JSON value.\n@param val the JSON value that should represent the string.\n@return the string from the JSON or null if reading the string fails.",
"Use this API to fetch statistics of nsacl6_stats resource of given name .",
"Set the name to be used in announcing our presence on the network. The name can be no longer than twenty\nbytes, and should be normal ASCII, no Unicode.\n\n@param name the device name to report in our presence announcement packets.",
"Returns the raw class of the given type.",
"Determines if the queue identified by the given key is used.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key is used, false otherwise",
"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",
"Checks whether a user account can be locked because of inactivity.\n\n@param cms the CMS context\n@param user the user to check\n@return true if the user may be locked after being inactive for too long"
] |
@Nullable
public static String readUTF(@NotNull final InputStream stream) throws IOException {
final DataInputStream dataInput = new DataInputStream(stream);
if (stream instanceof ByteArraySizedInputStream) {
final ByteArraySizedInputStream sizedStream = (ByteArraySizedInputStream) stream;
final int streamSize = sizedStream.size();
if (streamSize >= 2) {
sizedStream.mark(Integer.MAX_VALUE);
final int utfLen = dataInput.readUnsignedShort();
if (utfLen == streamSize - 2) {
boolean isAscii = true;
final byte[] bytes = sizedStream.toByteArray();
for (int i = 0; i < utfLen; ++i) {
if ((bytes[i + 2] & 0xff) > 127) {
isAscii = false;
break;
}
}
if (isAscii) {
return fromAsciiByteArray(bytes, 2, utfLen);
}
}
sizedStream.reset();
}
}
try {
String result = null;
StringBuilder builder = null;
for (; ; ) {
final String temp;
try {
temp = dataInput.readUTF();
if (result != null && result.length() == 0 &&
builder != null && builder.length() == 0 && temp.length() == 0) {
break;
}
} catch (EOFException e) {
break;
}
if (result == null) {
result = temp;
} else {
if (builder == null) {
builder = new StringBuilder();
builder.append(result);
}
builder.append(temp);
}
}
return (builder != null) ? builder.toString() : result;
} finally {
dataInput.close();
}
} | [
"Reads a string from input stream saved as a sequence of UTF chunks.\n\n@param stream stream to read from.\n@return output string\n@throws IOException if something went wrong"
] | [
"Designate the vertex attribute and shader variable for the texture coordinates\nassociated with the named texture.\n\n@param texName name of texture\n@param texCoordAttr name of vertex attribute with texture coordinates.\n@param shaderVarName name of shader variable to get texture coordinates.",
"Use this API to fetch service_dospolicy_binding resources of given name .",
"Helper method for formatting connection establishment 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@return A formatted message in the format:\n\"[<connectionName>] remote host[<host>] <connectionReason>\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG.",
"Handler for month changes.\n@param event change event.",
"Returns the count of total number of unread inbox messages for the user\n@return int - count of all unread messages",
"Increases the maximum size of the data array so that it can store sparse data up to 'length'. The class\nparameter nz_length is not modified by this function call.\n\n@param arrayLength Desired maximum length of sparse data\n@param preserveValue If true the old values will be copied into the new arrays. If false that step will be skipped.",
"Find Flickr Places information by Place URL.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link PlacesInterface#getInfoByUrl(String)} instead.\n@param flickrPlacesUrl\n@return A Location\n@throws FlickrException",
"Assigns a retention policy to all items with a given metadata template, optionally matching on fields.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param templateID the ID of the metadata template to assign the policy to.\n@param filter optional fields to match against in the metadata template.\n@return info about the created assignment.",
"Logs an error message for unhandled exception thrown from the target method.\n\n@param joinPoint - the joint point cut that contains information about the target\n@param throwable - the cause of the exception from the target method invocation"
] |
public StreamReader getTableData(String name) throws IOException
{
InputStream stream = new ByteArrayInputStream(m_tableData.get(name));
if (m_majorVersion > 5)
{
byte[] header = new byte[24];
stream.read(header);
SynchroLogger.log("TABLE HEADER", header);
}
return new StreamReader(m_majorVersion, stream);
} | [
"Return an input stream to read the data from the named table.\n\n@param name table name\n@return InputStream instance\n@throws IOException"
] | [
"There is a race condition that is not handled properly by the DialogFragment class.\nIf we don't check that this onDismiss callback isn't for the old progress dialog from before\nthe device orientation change, then this will cause the newly created dialog after the\norientation change to be dismissed immediately.",
"Transforms a single configuration file using the given transformation source.\n\n@param file the configuration file\n@param transformSource the transform soruce\n\n@throws TransformerConfigurationException -\n@throws IOException -\n@throws SAXException -\n@throws TransformerException -\n@throws ParserConfigurationException -",
"Modify a bundle.\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 gradient at the current point, computed on the given batch of examples.\n@param batch A set of indices indicating the examples over which the gradient should be computed.\n@param gradient The output gradient, a vector of partial derivatives.",
"Use this API to update autoscaleprofile.",
"page breaks should be near the bottom of the band, this method used while adding subreports\nwhich has the \"start on new page\" option.\n@param band",
"Adds a new metadata value of array type.\n@param path the path to the field.\n@param values the collection of values.\n@return the metadata object for chaining.",
"Formats the supplied value using the specified DateTimeFormat.\n\n@return \"\" if the value is null",
"This method retrieves the data at the given offset and returns\nit as a String, assuming the underlying data is composed of\nsingle byte characters.\n\n@param offset offset of required data\n@return string containing required data"
] |
private void setUserFieldValue(UDFAssignmentType udf, DataType dataType, Object value)
{
switch (dataType)
{
case DURATION:
{
udf.setTextValue(((Duration) value).toString());
break;
}
case CURRENCY:
{
if (!(value instanceof Double))
{
value = Double.valueOf(((Number) value).doubleValue());
}
udf.setCostValue((Double) value);
break;
}
case BINARY:
{
udf.setTextValue("");
break;
}
case STRING:
{
udf.setTextValue((String) value);
break;
}
case DATE:
{
udf.setStartDateValue((Date) value);
break;
}
case NUMERIC:
{
if (!(value instanceof Double))
{
value = Double.valueOf(((Number) value).doubleValue());
}
udf.setDoubleValue((Double) value);
break;
}
case BOOLEAN:
{
udf.setIntegerValue(BooleanHelper.getBoolean((Boolean) value) ? Integer.valueOf(1) : Integer.valueOf(0));
break;
}
case INTEGER:
case SHORT:
{
udf.setIntegerValue(NumberHelper.getInteger((Number) value));
break;
}
default:
{
throw new RuntimeException("Unconvertible data type: " + dataType);
}
}
} | [
"Sets the value of a UDF.\n\n@param udf user defined field\n@param dataType MPXJ data type\n@param value field value"
] | [
"Obtains a local date in Ethiopic calendar system from the\nera, year-of-era, month-of-year and day-of-month fields.\n\n@param era the Ethiopic era, not null\n@param yearOfEra the year-of-era\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\n@throws ClassCastException if the {@code era} is not a {@code EthiopicEra}",
"Convert maturity given as offset in months to year fraction.\n\n@param maturityInMonths The maturity as offset in months.\n@return The maturity as year fraction.",
"Retrieve a work field.\n\n@param type field type\n@return Duration instance",
"Draw a rounded rectangular boundary.\n\n@param rect rectangle\n@param color colour\n@param linewidth line width\n@param r radius for rounded corners",
"Indicates if this file represents a directory on the underlying file system.\n\n@param directoryPath\n@return",
"Determines the field via reflection look-up.\n\n@param clazz The java class to search in\n@param fieldName The field's name\n@return The field object or <code>null</code> if no matching field was found",
"Retrieves the project finish date. If an explicit finish date has not been\nset, this method calculates the finish date by looking for\nthe latest task finish date.\n\n@return Finish Date",
"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.",
"Fluent API builder.\n\n@param cronExpression\n@return"
] |
private List<Entry> sortEntries(List<Entry> loadedEntries) {
Collections.sort(loadedEntries, new Comparator<Entry>() {
@Override
public int compare(Entry entry1, Entry entry2) {
int result = (int) (entry1.cuePosition - entry2.cuePosition);
if (result == 0) {
int h1 = (entry1.hotCueNumber != 0) ? 1 : 0;
int h2 = (entry2.hotCueNumber != 0) ? 1 : 0;
result = h1 - h2;
}
return result;
}
});
return Collections.unmodifiableList(loadedEntries);
} | [
"Sorts the entries into the order we want to present them in, which is by position, with hot cues coming after\nordinary memory points if both exist at the same position, which often happens.\n\n@param loadedEntries the unsorted entries we have loaded from a dbserver message, metadata cache, or rekordbox\ndatabase export\n@return an immutable list of the collections in the proper order"
] | [
"Make an individual Datum out of the data list info, focused at position\nloc.\n@param info A List of WordInfo objects\n@param loc The position in the info list to focus feature creation on\n@param featureFactory The factory that constructs features out of the item\n@return A Datum (BasicDatum) representing this data instance",
"return the squared area of the triangle defined by the half edge hedge0\nand the point at the head of hedge1.\n\n@param hedge0\n@param hedge1\n@return",
"Get a property of type java.util.Properties or return the default if\nno such property is defined\n@param props properties\n@param name the key\n@param defaultProperties default property if empty\n@return value from the property",
"Use this API to fetch lbmonbindings_servicegroup_binding resources of given name .",
"All the indexes defined in the database. Type widening means that the returned Index objects\nare limited to the name, design document and type of the index and the names of the fields.\n\n@return a list of defined indexes with name, design document, type and field names.",
"Adds a Statement to a given collection of statement groups.\nIf the statement id is not null and matches that of an existing statement,\nthis statement will be replaced.\n\n@param statement\n@param claims\n@return",
"Creates a directory at the given path if it does not exist yet and if the\ndirectory manager was not configured for read-only access.\n\n@param path\n@throws IOException\nif it was not possible to create a directory at the given\npath",
"Find Flickr Places information by Place ID.\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link #getInfo(String, String)} instead.\n@param placeId\n@return A Location\n@throws FlickrException",
"Decomposes and overwrites the input matrix.\n\n@param A Semi-Positive Definite (SPD) system matrix. Modified. Reference saved.\n@return If the matrix can be decomposed. Will always return false of not SPD."
] |
public static base_response unset(nitro_service client, snmpalarm resource, String[] args) throws Exception{
snmpalarm unsetresource = new snmpalarm();
unsetresource.trapname = resource.trapname;
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of snmpalarm resource.\nProperties that need to be unset are specified in args array."
] | [
"FOR internal use. This method was called after the external transaction was completed.\n\n@see javax.transaction.Synchronization",
"Set RGB input range.\n\n@param inRGB Range.",
"Resets the generator state.",
"Returns the Map value of the field.\n\n@return the Map value of the field. It returns a reference of the value both for <code>MAP</code> and\n<code>LIST_MAP</code>.\n@throws IllegalArgumentException if the value cannot be converted to Map.",
"Read properties from the raw header data.\n\n@param stream input stream",
"Sets the position vector of the keyframe.",
"Is alternative.\n\n@param annotated the annotated\n@param mergedStereotypes merged stereotypes\n@return true if alternative, false otherwise",
"Find and validate manifest.json file in Artifactory for the current image.\nSince provided imageTag differs between reverse-proxy and proxy-less configuration, try to build the correct manifest path.\n@param server\n@param dependenciesClient\n@param listener\n@return\n@throws IOException",
"Use this API to clear nspbr6."
] |
String getUriStringForRank(StatementRank rank) {
switch (rank) {
case NORMAL:
return Vocabulary.WB_NORMAL_RANK;
case PREFERRED:
return Vocabulary.WB_PREFERRED_RANK;
case DEPRECATED:
return Vocabulary.WB_DEPRECATED_RANK;
default:
throw new IllegalArgumentException();
}
} | [
"Returns an URI which represents the statement rank in a triple.\n\n@param rank\n@return"
] | [
"Write the text to the File, using the specified encoding.\n\n@param file a File\n@param text the text to write to the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0",
"Returns true if the given candidate is a group that is filtered due to rule parameters in the current call graph.",
"Retrieves the parent task for a Phoenix activity.\n\n@param activity Phoenix activity\n@return parent task",
"Gets an exception reporting an unexpected XML attribute.\n\n@param reader a reference to the stream reader.\n@param index the attribute index.\n@return the constructed {@link javax.xml.stream.XMLStreamException}.",
"Registers all custom Externalizer implementations that Hibernate OGM needs into a running\nInfinispan CacheManager configuration.\nThis is only safe to do when Caches from this CacheManager haven't been started yet,\nor the ones already started do not contain any data needing these.\n\n@see ExternalizerIds\n@param globalCfg the Serialization section of a GlobalConfiguration builder",
"Construct a Access Token from a Flickr Response.\n\n@param response",
"Unlinks a set of dependencies from this task.\n\n@param task The task to remove dependencies from.\n@return Request object",
"Calculate the screen size of a tile. Normally the screen size is expressed in pixels and should therefore be\nintegers, but for the sake of accuracy we try to keep a double value as long as possible.\n\n@param worldSize\nThe width and height of a tile in the layer's world coordinate system.\n@param scale\nThe current client side scale.\n@return Returns an array of double values where the first value is the tile screen width and the second value is\nthe tile screen height.",
"Generate query parameters for a forward page with the specified start key.\n\n@param initialQueryParameters page 1 query parameters\n@param startkey the startkey for the forward page\n@param startkey_docid the doc id for the startkey (in case of duplicate keys)\n@param <K> the view key type\n@param <V> the view value type\n@return the query parameters for the forward page"
] |
private SortedSet<Date> filterExceptions(SortedSet<Date> dates) {
SortedSet<Date> result = new TreeSet<Date>();
for (Date d : dates) {
if (!m_exceptions.contains(d)) {
result.add(d);
}
}
return result;
} | [
"Filters all exceptions from the provided dates.\n@param dates the dates to filter.\n@return the provided dates, except the ones that match some exception."
] | [
"Returns an array with the width of the longest word per column calculated from the given table.\nDefault padding will be added per column.\nPadding for individual columns will be added if defined.\n@param rows the table rows for calculations\n@param colNumbers number of columns in the table\n@return array with width of longest word for each column, null if input table was null",
"Notification that the process has become unstable.\n\n@return {@code true} if this is a change in status",
"Returns an URI which represents the statement rank in a triple.\n\n@param rank\n@return",
"Initialize the metadata cache with system store list",
"Answer true if an Iterator for a Table is already available\n@param aTable\n@return",
"Ignore some element from the AST\n\n@param element\n@return",
"Checks whether a property can be added to a Properties.\n\n@param typeManager\n@param properties the properties object\n@param typeId the type id\n@param filter the property filter\n@param id the property id\n\n@return true if the property should be added",
"returns a sorted array of properties",
"Gets the first group of a regex\n@param pattern Pattern\n@param str String to find\n@return the matching group"
] |
private void requestBlock() {
next = ByteBuffer.allocate(blockSizeBytes);
long requestTimeout = retryParams.getRequestTimeoutMillisForCurrentAttempt();
pendingFetch = raw.readObjectAsync(next, filename, fetchPosition, requestTimeout);
} | [
"Allocates a new next buffer and pending fetch."
] | [
"Creates the node mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param parentLevel\nthe parent level",
"Sets a new config and clears the previous cache",
"Specify the socket to be used as underlying socket to connect\nto the APN service.\n\nThis assumes that the socket connects to a SOCKS proxy.\n\n@deprecated use {@link ApnsServiceBuilder#withProxy(Proxy)} instead\n@param proxySocket the underlying socket for connections\n@return this",
"Build a String representation of given arguments.",
"Verifies application name. Avoids characters that Zookeeper does not like in nodes & Hadoop\ndoes not like in HDFS paths.\n\n@param name Application name\n@throws IllegalArgumentException If name contains illegal characters",
"Use this API to fetch policydataset_value_binding resources of given name .",
"Encodes the given URI query with the given encoding.\n@param query the query to be encoded\n@param encoding the character encoding to encode to\n@return the encoded query\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Overridden to do only the clean-part of the linking but not\nthe actual linking. This is deferred until someone wants to access\nthe content of the resource.",
"Common mechanism to convert Synchro commentary recorss into notes.\n\n@param rows commentary table rows\n@return note text"
] |
public void performStep() {
// check for zeros
for( int i = helper.x2-1; i >= helper.x1; i-- ) {
if( helper.isZero(i) ) {
helper.splits[helper.numSplits++] = i;
helper.x1 = i+1;
return;
}
}
double lambda;
if( followingScript ) {
if( helper.steps > 10 ) {
followingScript = false;
return;
} else {
// Using the true eigenvalues will in general lead to the fastest convergence
// typically takes 1 or 2 steps
lambda = eigenvalues[helper.x2];
}
} else {
// the current eigenvalue isn't working so try something else
lambda = helper.computeShift();
}
// similar transforms
helper.performImplicitSingleStep(lambda,false);
} | [
"First looks for zeros and then performs the implicit single step in the QR Algorithm."
] | [
"Find out which method to call on the service bean.",
"Enqueues a message for sending on the send thread.\n@param serialMessage the serial message to enqueue.",
"Retrieve the value from the REST request body.\n\nTODO: REST-Server value cannot be null ( null/empty string ?)",
"Use this API to update responderpolicy.",
"Cause the container to be cleaned up, including all registered bean\nmanagers, and all deployment services",
"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",
"The way calendars are stored in an MPP14 file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs\n@param map map of calendar ID values and calendar objects",
"only TOP or Bottom",
"Lists the buildpacks installed on an app\n\n@param appName See {@link #listApps} for a list of apps that can be used."
] |
public static void main(String[] args) throws LoginFailedException,
IOException, MediaWikiApiErrorException {
ExampleHelpers.configureLogging();
printDocumentation();
SetLabelsForNumbersBot bot = new SetLabelsForNumbersBot();
ExampleHelpers.processEntitiesFromWikidataDump(bot);
bot.finish();
System.out.println("*** Done.");
} | [
"Main method to run the bot.\n\n@param args\n@throws LoginFailedException\n@throws IOException\n@throws MediaWikiApiErrorException"
] | [
"Adds an artifact to the module.\n\n<P>\nINFO: If the module is promoted, all added artifacts will be promoted.\n\n@param artifact Artifact",
"Returns a map of URIs to package name, as specified by the packageNames\nparameter.",
"Adds labels to the item\n\n@param labels\nthe labels to add",
"Fetch JSON from RAW resource\n\n@param context Context\n@param resource Resource int of the RAW file\n@return JSON",
"Returns an integer array that contains the default values for all the\ntexture parameters.\n\n@return an integer array that contains the default values for all the\ntexture parameters.",
"Rent a car available in the last serach result\n@param intp - the command interpreter instance",
"Mark unfinished test cases as interrupted for each unfinished test suite, then write\ntest suite result\n@see #createFakeTestcaseWithWarning(ru.yandex.qatools.allure.model.TestSuiteResult)\n@see #markTestcaseAsInterruptedIfNotFinishedYet(ru.yandex.qatools.allure.model.TestCaseResult)",
"Gets the name of the vertex attribute containing the texture\ncoordinates for the named texture.\n\n@param texName name of texture\n@return name of texture coordinate vertex attribute",
"Get a loader that lists the Files in the current path,\nand monitors changes."
] |
private static <T, ID> MappedDeleteCollection<T, ID> build(Dao<T, ID> dao, TableInfo<T, ID> tableInfo, int dataSize)
throws SQLException {
FieldType idField = tableInfo.getIdField();
if (idField == null) {
throw new SQLException(
"Cannot delete " + tableInfo.getDataClass() + " because it doesn't have an id field defined");
}
StringBuilder sb = new StringBuilder(128);
DatabaseType databaseType = dao.getConnectionSource().getDatabaseType();
appendTableName(databaseType, sb, "DELETE FROM ", tableInfo.getTableName());
FieldType[] argFieldTypes = new FieldType[dataSize];
appendWhereIds(databaseType, idField, sb, dataSize, argFieldTypes);
return new MappedDeleteCollection<T, ID>(dao, tableInfo, sb.toString(), argFieldTypes);
} | [
"This is private because the execute is the only method that should be called here."
] | [
"Set the end type as derived from other values.",
"Reads the text files in the given directory and puts their content\nin the given map after compressing it. Note that this method does not\ntraverse recursivly into sub-directories.\n\n@param dir The directory to process\n@param results Map that will receive the contents (indexed by the relative filenames)\n@throws IOException If an error ocurred",
"Returns the name of the class to be instantiated.\n@param rs the Resultset\n@return null if the column is not available",
"Initialize the pattern controllers.",
"Generate the global CSS style for the whole document.\n@return the CSS code used in the generated document header",
"Return true only if the node has any of the named annotations\n@param node - the AST Node to check\n@param names - the names of the annotations\n@return true only if the node has any of the named annotations",
"Generate a results file for each test in each suite.\n@param outputDirectory The target directory for the generated file(s).",
"Use this API to fetch all the sslciphersuite resources that are configured on netscaler.",
"calls _initMH on the method handler and then stores the result in the\nmethodHandler field as then new methodHandler"
] |
String getQueryString(Map<String, String> params) {
StringBuilder builder = new StringBuilder();
try {
boolean first = true;
for (Map.Entry<String,String> entry : params.entrySet()) {
if (first) {
first = false;
} else {
builder.append("&");
}
builder.append(URLEncoder.encode(entry.getKey(), "UTF-8"));
builder.append("=");
builder.append(URLEncoder.encode(entry.getValue(), "UTF-8"));
}
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(
"Your Java version does not support UTF-8 encoding.");
}
return builder.toString();
} | [
"Returns the query string of a URL from a parameter list.\n\n@param params\nMap with parameters\n@return query string"
] | [
"Ensures that generate-table-info is set to false if generate-repository-info is set to false.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)",
"Creates a statement with parameters that should work with most RDBMS.",
"Reads the configuration of a field facet.\n@param pathPrefix The XML Path that leads to the field facet configuration, or <code>null</code> if the XML was not correctly structured.\n@return The read configuration, or <code>null</code> if the XML was not correctly structured.",
"Build all combinations of graph structures for generic event stubs of a maximum length\n@param length Maximum number of nodes in each to generate\n@return All graph combinations of specified length or less",
"Gets a string attribute from a json object given a path to traverse.\n\n@param record a JSONObject to traverse.\n@param path the json path to follow.\n@return the attribute as a {@link String}, or null if it was not found.",
"Retrieve the recurrence type.\n\n@param value integer value\n@return RecurrenceType instance",
"Compute 1-dimensional Perlin noise.\n@param x the x value\n@return noise value at x in the range -1..1",
"Remove attachments matches pattern from step and all step substeps\n\n@param context from which attachments will be removed",
"Return a new instance of the BufferedImage\n\n@return BufferedImage"
] |
@Override
public void visit(FeatureTypeStyle fts) {
FeatureTypeStyle copy = new FeatureTypeStyleImpl(
(FeatureTypeStyleImpl) fts);
Rule[] rules = fts.getRules();
int length = rules.length;
Rule[] rulesCopy = new Rule[length];
for (int i = 0; i < length; i++) {
if (rules[i] != null) {
rules[i].accept(this);
rulesCopy[i] = (Rule) pages.pop();
}
}
copy.setRules(rulesCopy);
if (fts.getTransformation() != null) {
copy.setTransformation(copy(fts.getTransformation()));
}
if (STRICT && !copy.equals(fts)) {
throw new IllegalStateException(
"Was unable to duplicate provided FeatureTypeStyle:" + fts);
}
pages.push(copy);
} | [
"Overridden to add transform."
] | [
"Returns the list of people who have favorited a given photo.\n\nThis method does not require authentication.\n\n@param photoId\n@param perPage\n@param page\n@return List of {@link com.flickr4java.flickr.people.User}",
"Copy the given Collection into a Class array.\nThe Collection must contain Class elements only.\n@param collection the Collection to copy\n@return the Class array ({@code null} if the passed-in\nCollection was {@code null})",
"Checks String to see if the parameter is null.\n@param paramValue Object that will be checked if null.\n@return this.true if the parameter that is being checked is not null",
"Create a discount curve from forwards given by a LIBORMonteCarloModel. If the model uses multiple curves, return its discount curve.\n\n@param forwardCurveName name of the forward curve.\n@param model Monte Carlo model providing the forwards.\n@param startTime time at which the curve starts, i.e. zero time for the curve\n@return a discount curve from forwards given by a LIBORMonteCarloModel.\n@throws CalculationException Thrown if the model failed to provide the forward rates.",
"Get file extension for script language.\n\n@param language the language name\n@return the file extension as string or null if the language is not in the set of languages supported by spin",
"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",
"Use this API to fetch appfwprofile_cookieconsistency_binding resources of given name .",
"Convert a URL Encoded name back to the original form.\n@param name the name to URL urlDecode.\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the name in original form.\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Schedules the task with a fixed delay period and an initialDelay period. This functions\nlike the normal java Timer.\n@param task\n@param initialDelay\n@param fixedDelay"
] |
public static base_response add(nitro_service client, lbroute resource) throws Exception {
lbroute addresource = new lbroute();
addresource.network = resource.network;
addresource.netmask = resource.netmask;
addresource.gatewayname = resource.gatewayname;
return addresource.add_resource(client);
} | [
"Use this API to add lbroute."
] | [
"and class as property",
"Binds a script bundle to scene graph rooted at a scene object.\n@param scriptBundle\nThe {@code GVRScriptBundle} object containing script binding information.\n@param rootSceneObject\nThe root of the scene object tree to which the scripts are bound.\n@throws IOException if script bundle file cannot be read.\n@throws GVRScriptException if a script processing error occurs.",
"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\"",
"Register a new DropPasteWorkerInterface.\n@param worker The new worker",
"Retrieve and validate the zone id value from the REST request.\n\"X-VOLD-Zone-Id\" is the zone id header.\n\n@return valid zone id or -1 if there is no/invalid zone id",
"Introspect the given object.\n\n@param obj object for introspection.\n\n@return a map containing object's field values.\n\n@throws IntrospectionException if an exception occurs during introspection\n@throws InvocationTargetException if property getter throws an exception\n@throws IllegalAccessException if property getter is inaccessible",
"Build the context name.\n\n@param objs the objects\n@return the global context name",
"Make a string with the shader layout for a uniform block\nwith a given descriptor. The format of the descriptor is\nthe same as for a @{link GVRShaderData} - a string of\ntypes and names of each field.\n<p>\nThis function will return a Vulkan shader layout if the\nVulkan renderer is being used. Otherwise, it returns\nan OpenGL layout.\n@param descriptor string with types and names of each field\n@param blockName name of uniform block\n@param useUBO true to output uniform buffer layout, false for push constants\n@return string with shader declaration",
"Validates that we only have allowable filters.\n\n<p>Note that equality and ancestor filters are allowed, however they may result in\ninefficient sharding."
] |
private long getTotalUploadSize() throws IOException {
long size = 0;
for (Map.Entry<String, File> entry : files.entrySet()) {
size += entry.getValue().length();
}
for (Map.Entry<String, InputStream> entry : fileStreams.entrySet()) {
size += entry.getValue().available();
}
return size;
} | [
"used for upload progress"
] | [
"Get the number of views, comments and favorites on a collection for a given date.\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 collectionId\n(Required) The id (from the URL!) of the collection to get stats for.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionStats.htm\"",
"Use this API to clear bridgetable.",
"Write the given long value as a 4 byte unsigned integer. Overflow is\nignored.\n\n@param buffer The buffer to write to\n@param index The position in the buffer at which to begin writing\n@param value The value to write",
"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.",
"Bessel function of order 0.\n\n@param x Value.\n@return J0 value.",
"Checks if a property's type is valid to be included in the report.\n@param _property the property.\n@return true if the property is is of a valid type.",
"Uses current variable assignments and info in an NWiseActionTag to expand on an n wise combinatorial set\n\n@param action an NWiseAction Action\n@param possibleStateList a current list of possible states produced so far from expanding a model state\n@return every input possible state expanded on an n wise combinatorial set defined by that input possible state",
"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",
"Removes a value from the list.\n\n@param list the list\n@param value value to remove"
] |
public static Attachment writeAttachmentWithErrorMessage(Throwable throwable, String title) {
String message = throwable.getMessage();
try {
return writeAttachment(message.getBytes(CONFIG.getAttachmentsEncoding()), title);
} catch (Exception e) {
e.addSuppressed(throwable);
LOGGER.error(String.format("Can't write attachment \"%s\"", title), e);
}
return new Attachment();
} | [
"Write throwable as attachment.\n\n@param throwable to write\n@param title title of attachment\n@return Created {@link ru.yandex.qatools.allure.model.Attachment}"
] | [
"Creates the given directory. Fails if it already exists.",
"Sets the file-pointer offset, measured from the beginning of this file,\nat which the next read or write occurs.",
"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.",
"Read project calendars.",
"don't run on main thread",
"Calculate Euclidean distance between two points.\n\n@param anotherPoint Point to calculate distance to.\n@return Euclidean distance between this point and anotherPoint points.",
"Does not mutate the TestMatrix.\nVerifies that the test matrix contains all the required tests and that\neach required test is valid.\n\n@param testMatrix the {@link TestMatrixArtifact} to be verified.\n@param matrixSource a {@link String} of the source of proctor artifact. For example a path of proctor artifact file.\n@param requiredTests a {@link Map} of required test. The {@link TestSpecification} would be verified\n@param functionMapper a given el {@link FunctionMapper}\n@param providedContext a {@link Map} containing variables describing the context in which the request is executing. These will be supplied to verifying all rules.\n@param dynamicTests a {@link Set} of dynamic tests determined by filters.\n@return a {@link ProctorLoadResult} to describe the result of verification. It contains errors of verification and a list of missing test.",
"Returns the editable columns for the provided edit mode.\n@param mode the edit mode.\n@return the editable columns for the provided edit mode.",
"Retrieve the relative path to the pom of the module"
] |
public static String generateQuery(final String key, final Object value) {
final Map<String, Object> params = new HashMap<>();
params.put(key, value);
return generateQuery(params);
} | [
"Generate a Jongo query with provided the parameter.\n\n@param key\n@param value\n@return String"
] | [
"Determine the consistency level of a key\n\n@param versionNodeSetMap A map that maps version to set of PrefixNodes\n@param replicationFactor Total replication factor for the set of clusters\n@return ConsistencyLevel Enum",
"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",
"Sets the specified date 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",
"Returns the given dialect, narrowed down to the given dialect facet in case it is implemented by the dialect.\n\n@param gridDialect the dialect of interest\n@param facetType the dialect facet type of interest\n@return the given dialect, narrowed down to the given dialect facet or {@code null} in case the given dialect\ndoes not implement the given facet",
"Use this API to Import responderhtmlpage.",
"convert selector used in an upsert statement into a document",
"Stop Redwood, closing all tracks and prohibiting future log messages.",
"Read hints from a file and merge with the given hints map.",
"Examine the given model node, resolving any expressions found within, including within child nodes.\n\n@param node the node\n@return a node with all expressions resolved\n@throws OperationFailedException if an expression cannot be resolved"
] |
private String readHeaderString(BufferedInputStream stream) throws IOException
{
int bufferSize = 100;
stream.mark(bufferSize);
byte[] buffer = new byte[bufferSize];
stream.read(buffer);
Charset charset = CharsetHelper.UTF8;
String header = new String(buffer, charset);
int prefixIndex = header.indexOf("PPX!!!!|");
int suffixIndex = header.indexOf("|!!!!XPP");
if (prefixIndex != 0 || suffixIndex == -1)
{
throw new IOException("File format not recognised");
}
int skip = suffixIndex + 9;
stream.reset();
stream.skip(skip);
return header.substring(prefixIndex + 8, suffixIndex);
} | [
"Read the header from the Phoenix file.\n\n@param stream input stream\n@return raw header data"
] | [
"Read resource assignment baseline values.\n\n@param row result set row",
"Deregister shutdown hook and execute it immediately",
"Add a column to be set to a value for UPDATE statements. This will generate something like 'columnName =\nexpression' where the expression is built by the caller.\n\n<p>\nThe expression should have any strings escaped using the {@link #escapeValue(String)} or\n{@link #escapeValue(StringBuilder, String)} methods and should have any column names escaped using the\n{@link #escapeColumnName(String)} or {@link #escapeColumnName(StringBuilder, String)} methods.\n</p>",
"Get the real Object for already materialized Handler\n\n@param objectOrProxy\n@return Object or null if the Handel is not materialized",
"Use this API to fetch all the nsacl6 resources that are configured on netscaler.",
"Write notes.\n\n@param recordNumber record number\n@param text note text\n@throws IOException",
"Serialize a parameterized object to a JSON String.\n\n@param object The object to serialize.\n@param parameterizedType The ParameterizedType describing the object. Ex: LoganSquare.serialize(object, new ParameterizedType<MyModel<OtherModel>>() { });",
"request token from GCM",
"This method is used to associate a child task with the current\ntask instance. It has package access, and has been designed to\nallow the hierarchical outline structure of tasks in an MPX\nfile to be constructed as the file is read in.\n\n@param child Child task.\n@param childOutlineLevel Outline level of the child task."
] |
public Set<String> getSupportedUriSchemes() {
Set<String> schemes = new HashSet<>();
for (ConfigFileLoaderPlugin loaderPlugin: this.getLoaderPlugins()) {
schemes.add(loaderPlugin.getUriScheme());
}
return schemes;
} | [
"Return all URI schemes that are supported in the system."
] | [
"Specify the method to instantiate objects\nrepresented by this descriptor.\n@see #setFactoryClass",
"Get the script for a given ID\n\n@param id ID of script\n@return Script if found, otherwise null",
"Hide multiple channels. All other channels will be shown.\n@param channels The channels to hide",
"Use this API to fetch appflowpolicy_binding resource of given name .",
"Create a MfClientHttpRequestFactory for adding the specified headers.\n\n@param requestFactory the basic request factory. It should be unmodified and just wrapped with\na proxy class.\n@param matchers The matchers.\n@param headers The headers.\n@return",
"Get the exception message using the requested locale.\n\n@param locale locale for message\n@return exception message",
"Joins the individual WBS elements to make the formated value.\n\n@param length number of elements to join\n@return formatted WBS value",
"Returns the getter method for field on an object.\n\n@param object\nthe object\n@param fieldName\nthe field name\n@return the getter associated with the field on the object\n@throws NullPointerException\nif object or fieldName is null\n@throws SuperCsvReflectionException\nif the getter doesn't exist or is not visible",
"Go over the task list and create a map of stealerId -> Tasks\n\n@param sbTaskList List of all stealer-based rebalancing tasks to be\nscheduled."
] |
public DocumentReaderAndWriter<IN> makeReaderAndWriter() {
DocumentReaderAndWriter<IN> readerAndWriter;
try {
readerAndWriter = ((DocumentReaderAndWriter<IN>)
Class.forName(flags.readerAndWriter).newInstance());
} catch (Exception e) {
throw new RuntimeException(String.format("Error loading flags.readerAndWriter: '%s'", flags.readerAndWriter), e);
}
readerAndWriter.init(flags);
return readerAndWriter;
} | [
"Makes a DocumentReaderAndWriter based on the flags the CRFClassifier\nwas constructed with. Will create the flags.readerAndWriter and\ninitialize it with the CRFClassifier's flags."
] | [
"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.",
"Tells you if the ASTNode is a method node for the given name, arity, and return type.\n@param node\nthe node to inspect\n@param methodNamePattern\nthe expected name of the method\n@param numArguments\nthe expected number of arguments, optional\n@param returnType\nthe expected return type, optional\n@return\ntrue if this node is a MethodNode meeting the parameters. false otherwise",
"Compare the supplied plaintext password to a hashed password.\n\n@param passwd Plaintext password.\n@param hashed scrypt hashed password.\n\n@return true if passwd matches hashed value.",
"Add all headers in a header multimap.\n\n@param headers a multimap of headers.\n@return the interceptor instance itself.",
"Gets the txinfo cache weight\n\n@param conf The FluoConfiguration\n@return The size of the cache value from the property value {@value #TX_INFO_CACHE_WEIGHT} if\nit is set, else the value of the default value {@value #TX_INFO_CACHE_WEIGHT_DEFAULT}",
"Get the group URL for the specified group ID\n\n@param groupId\nThe group ID\n@return The group URL\n@throws FlickrException",
"We have a directory. Determine if this contains a multi-file database we understand, if so\nprocess it. If it does not contain a database, test each file within the directory\nstructure to determine if it contains a file whose format we understand.\n\n@param directory directory to process\n@return ProjectFile instance if we can process anything, or null",
"Perform a security check against OpenCms.\n\n@param cms The OpenCms object.\n\n@throws CmsPermissionViolationException in case of the anonymous guest user",
"Gets the Hamming distance between two strings.\n\n@param first First string.\n@param second Second string.\n@return The Hamming distance between p and q."
] |
private <T> void add(EjbDescriptor<T> ejbDescriptor) {
InternalEjbDescriptor<T> internalEjbDescriptor = InternalEjbDescriptor.of(ejbDescriptor);
ejbByName.put(ejbDescriptor.getEjbName(), internalEjbDescriptor);
ejbByClass.put(ejbDescriptor.getBeanClass(), internalEjbDescriptor.getEjbName());
} | [
"Adds an EJB descriptor to the maps\n\n@param ejbDescriptor The EJB descriptor to add"
] | [
"Create a set containing all the processor at the current node and the entire subgraph.",
"Gets string content from InputStream\n\n@param is InputStream to read\n@return InputStream content",
"Extract where the destination is reshaped to match the extracted region\n@param src The original matrix which is to be copied. Not modified.\n@param srcX0 Start column.\n@param srcX1 Stop column+1.\n@param srcY0 Start row.\n@param srcY1 Stop row+1.\n@param dst Where the submatrix are stored. Modified.",
"Decompiles a single type.\n\n@param metadataSystem\n@param typeName\n@return\n@throws IOException",
"Check if a given string is a template path or template content\n\nIf the string contains anyone the following characters then we assume it\nis content, otherwise it is path:\n\n* space characters\n* non numeric-alphabetic characters except:\n** dot \".\"\n** dollar: \"$\"\n\n@param string\nthe string to be tested\n@return `true` if the string literal is template content or `false` otherwise",
"This method takes a calendar of MPXJ library type, then returns a String of the\ngeneral working days USACE format. For example, the regular 5-day work week is\nNYYYYYN\n\nIf you get Fridays off work, then the String becomes NYYYYNN\n\n@param input ProjectCalendar instance\n@return work days string",
"Obtains a Coptic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Coptic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"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",
"Remove a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@return the builder"
] |
public synchronized void addCertAndPrivateKey(String hostname, final X509Certificate cert, final PrivateKey privKey)
throws KeyStoreException, CertificateException, NoSuchAlgorithmException
{
// String alias = ThumbprintUtil.getThumbprint(cert);
_ks.deleteEntry(hostname);
_ks.setCertificateEntry(hostname, cert);
_ks.setKeyEntry(hostname, privKey, _keypassword, new java.security.cert.Certificate[] {cert});
if(persistImmediately)
{
persist();
}
} | [
"Stores a new certificate and its associated private key in the keystore.\n@param hostname\n@param cert\n@param privKey @throws KeyStoreException\n@throws CertificateException\n@throws NoSuchAlgorithmException"
] | [
"Checks to see if the specified off diagonal element is zero using a relative metric.",
"Expands all tabs into spaces. Assumes the CharSequence represents a single line of text.\n\n@param self A line to expand\n@param tabStop The number of spaces a tab represents\n@return The expanded toString() of this CharSequence\n@see #expandLine(String, int)\n@since 1.8.2",
"Gets the host-ignore data for a slave host running the given version.\n\n@param major the kernel management API major version\n@param minor the kernel management API minor version\n@param micro the kernel management API micro version\n\n@return the host-ignore data, or {@code null} if there is no matching registration",
"Detect new objects.",
"Log a message line to the output.",
"Helper method to load a property file from class path.\n\n@param filesToLoad\nan array of paths (class path paths) designating where the files may be. All files are loaded, in the order\ngiven. Missing files are silently ignored.\n\n@return a Properties object, which may be empty but not null.",
"Reads filter parameters.\n\n@param params the params\n@return the criterias",
"Add the dependencies if the deployment contains a service activator loader entry.\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException",
"Create a new DirectByteBuffer from a given address and size.\nThe returned DirectByteBuffer does not release the memory by itself.\n\n@param addr\n@param size\n@param att object holding the underlying memory to attach to the buffer.\nThis will prevent the garbage collection of the memory area that's\nassociated with the new <code>DirectByteBuffer</code>\n@return"
] |
public static netbridge_vlan_binding[] get(nitro_service service, String name) throws Exception{
netbridge_vlan_binding obj = new netbridge_vlan_binding();
obj.set_name(name);
netbridge_vlan_binding response[] = (netbridge_vlan_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch netbridge_vlan_binding resources of given name ."
] | [
"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()",
"Returns all methods for a specific group\n\n@param groupId group ID to remove methods from\n@param filters array of method types to filter by, null means no filter\n@return Collection of methods found\n@throws Exception exception",
"Retrieves and validates the content type from the REST requests\n\n@return true if has content type.",
"Invoked when an action occurs.",
"Return the list of corporate GroupId prefix configured for an organization.\n\n@param organizationId String Organization name\n@return Response A list of corporate groupId prefix in HTML or JSON",
"Compiles and fills the reports design.\n\n@param dr the DynamicReport\n@param layoutManager the object in charge of doing the layout\n@param ds The datasource\n@param _parameters Map with parameters that the report may need\n@return\n@throws JRException",
"Load the properties from the resource file if one is specified",
"Uploads a new file to this folder while reporting the progress to a ProgressListener.\n\n@param fileContent a stream containing the contents of the file to upload.\n@param name the name to give the uploaded file.\n@param fileSize the size of the file used for determining the progress of the upload.\n@param listener a listener for monitoring the upload's progress.\n@return the uploaded file's info.",
"This method maps the currency symbol position from the\nrepresentation used in the MPP file to the representation\nused by MPX.\n\n@param value MPP symbol position\n@return MPX symbol position"
] |
public ReplicationResult trigger() {
assertNotEmpty(source, "Source");
assertNotEmpty(target, "Target");
InputStream response = null;
try {
JsonObject json = createJson();
if (log.isLoggable(Level.FINE)) {
log.fine(json.toString());
}
final URI uri = new DatabaseURIHelper(client.getBaseUri()).path("_replicate").build();
response = client.post(uri, json.toString());
final InputStreamReader reader = new InputStreamReader(response, "UTF-8");
return client.getGson().fromJson(reader, ReplicationResult.class);
} catch (UnsupportedEncodingException e) {
// This should never happen as every implementation of the java platform is required
// to support UTF-8.
throw new RuntimeException(e);
} finally {
close(response);
}
} | [
"Triggers a replication request."
] | [
"Compute eigenvalues. This is a routine not in ATLAS, but in the original\nLAPACK.",
"Stops the background data synchronization thread and releases the local client.",
"Generate the specified output file by merging the specified\nVelocity template with the supplied context.",
"Removes bean from scope.\n\n@param name bean name\n@return previous value",
"Read a text stream into a single string.\n\n@param inputStream\nStream containing text. Will be closed on exit.\n@return The contents, or null on error.",
"Sets the final transform of the bone during animation.\n\n@param finalTransform The transform matrix representing\nthe bone's pose after computing the skeleton.",
"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",
"Compute the offset for the item in the layout cache\n@return true if the item fits the container, false otherwise",
"Use this API to fetch all the nsrollbackcmd resources that are configured on netscaler."
] |
public String getRealm() {
if (UNDEFINED.equals(realm)) {
Principal principal = securityIdentity.getPrincipal();
String realm = null;
if (principal instanceof RealmPrincipal) {
realm = ((RealmPrincipal)principal).getRealm();
}
this.realm = realm;
}
return this.realm;
} | [
"Obtain the realm used for authentication.\n\nThis realm name applies to both the user and the groups.\n\n@return The name of the realm used for authentication."
] | [
"Returns a date and time string which is formatted as ISO-8601.",
"Look for the specified album art in both the hot cache of loaded tracks and the longer-lived LRU cache.\n\n@param artReference uniquely identifies the desired album art\n\n@return the art, if it was found in one of our caches, or {@code null}",
"Drives the unit test.",
"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.",
"Adds Editor specific UI components to the toolbar.\n@param context The context that provides access to the toolbar.",
"Calculate standart deviation.\n@param values Values.\n@param mean Mean.\n@return Standart deviation.",
"Parses values out of the header text.\n\n@param header header text",
"Add a calendar day node.\n\n@param parentNode parent node\n@param calendar ProjectCalendar instance\n@param day calendar day",
"checking availability of ClassInfo.setFlags method is just workaround for JANDEX-37"
] |
public String processProcedure(Properties attributes) throws XDocletException
{
String type = attributes.getProperty(ATTRIBUTE_TYPE);
ProcedureDef procDef = _curClassDef.getProcedure(type);
String attrName;
if (procDef == null)
{
procDef = new ProcedureDef(type);
_curClassDef.addProcedure(procDef);
}
for (Enumeration attrNames = attributes.propertyNames(); attrNames.hasMoreElements(); )
{
attrName = (String)attrNames.nextElement();
procDef.setProperty(attrName, attributes.getProperty(attrName));
}
return "";
} | [
"Processes a procedure tag.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"arguments\" optional=\"true\" description=\"The arguments of the procedure as a comma-separated\nlist of names of procedure attribute tags\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the procedure as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the procedure\"\[email protected] name=\"include-all-fields\" optional=\"true\" description=\"For insert/update: whether all fields of the current\nclass shall be included (arguments is ignored then)\" values=\"true,false\"\[email protected] name=\"include-pk-only\" optional=\"true\" description=\"For delete: whether all primary key fields\nshall be included (arguments is ignored then)\" values=\"true,false\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the procedure\"\[email protected] name=\"return-field-ref\" optional=\"true\" description=\"Identifies the field that receives the return value\"\[email protected] name=\"type\" optional=\"false\" description=\"The type of the procedure\" values=\"delete,insert,update\""
] | [
"Add tables to the tree.\n\n@param parentNode parent tree node\n@param file tables container",
"Get layer style by name.\n\n@param name layer style name\n@return layer style",
"Sets the left padding character for all cells in the table.\n@param paddingLeftChar new padding character, ignored if null\n@return this to allow chaining",
"FOR internal use. This method was called before the external transaction was completed.\n\nThis method was called by the JTA-TxManager before the JTA-tx prepare call. Within this method\nwe prepare odmg for commit and pass all modified persistent objects to DB and release/close the used\nconnection. We have to close the connection in this method, because the TxManager does prepare for commit\nafter this method and all used DataSource-connections have to be closed before.\n\n@see javax.transaction.Synchronization",
"Combines weighted crf with this crf\n\n@param crf\n@param weight",
"Typically this is transparently handled by using the Protostream codecs but be aware of it when bypassing Protostream.",
"Creates an Executor that is based on daemon threads.\nThis allows the program to quit without explicitly\ncalling shutdown on the pool\n\n@return the newly created single-threaded Executor",
"Use this API to add dnstxtrec resources.",
"Attaches an arbitrary object to this context only if the object was not already attached. If a value has already\nbeen attached with the key provided, the current value associated with the key is returned.\n\n@param key they attachment key used to ensure uniqueness and used for retrieval of the value.\n@param value the value to store.\n@param <V> the value type of the attachment.\n\n@return the previous value associated with the key or {@code null} if there was no previous value."
] |
private static Map<String, Set<String>> expand(Map<String, Set<String>> viewToPropNames) {
Set<String> baseProps = viewToPropNames.get(PropertyView.BASE_VIEW);
if (baseProps == null) {
baseProps = ImmutableSet.of();
}
if (!SquigglyConfig.isFilterImplicitlyIncludeBaseFieldsInView()) {
// make an exception for full view
Set<String> fullView = viewToPropNames.get(PropertyView.FULL_VIEW);
if (fullView != null) {
fullView.addAll(baseProps);
}
return viewToPropNames;
}
for (Map.Entry<String, Set<String>> entry : viewToPropNames.entrySet()) {
String viewName = entry.getKey();
Set<String> propNames = entry.getValue();
if (!PropertyView.BASE_VIEW.equals(viewName)) {
propNames.addAll(baseProps);
}
}
return viewToPropNames;
} | [
"apply the base fields to other views if configured to do so."
] | [
"Create the image elements for the banners tha goes into the\ntitle and header bands depending on the case",
"Count the number of non-zero elements in V",
"Sets up and declares internal data structures.\n\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagonal elements from tridiagonal matrix. Modified.\n@param numCols number of columns (and rows) in the matrix.",
"StartMain passes in the command line args here.\n\n@param args The command line arguments. If null is given then an empty\narray will be used instead.",
"Polls from the URL provided.\n\n@param url the URL to poll from.\n@return the raw response.",
"Build the default transformation description.\n\n@param discardPolicy the discard policy to use\n@param inherited whether the definition is inherited\n@param registry the attribute transformation rules for the resource\n@param discardedOperations the discarded operations\n@return the transformation description",
"Creates a rectangular matrix which is zero except along the diagonals.\n\n@param numRows Number of rows in the matrix.\n@param numCols NUmber of columns in the matrix.\n@return A matrix with diagonal elements equal to one.",
"Sets the replace var map to single target single var.\n\n@param variable\nthe variable\n@param replaceList\n: the list of strings that will replace the variable\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder",
"Create a new photoset.\n\n@param title\nThe photoset title\n@param description\nThe photoset description\n@param primaryPhotoId\nThe primary photo id\n@return The new Photset\n@throws FlickrException"
] |
public String getMessage(Locale locale) {
if (getCause() != null) {
String message = getShortMessage(locale) + ", " + translate("ROOT_CAUSE", locale) + " ";
if (getCause() instanceof GeomajasException) {
return message + ((GeomajasException) getCause()).getMessage(locale);
}
return message + getCause().getMessage();
} else {
return getShortMessage(locale);
}
} | [
"Get the exception message using the requested locale.\n\n@param locale locale for message\n@return exception message"
] | [
"Return the numeraire at a given time.\nThe numeraire is provided for interpolated points. If requested on points which are not\npart of the tenor discretization, the numeraire uses a linear interpolation of the reciprocal\nvalue. See ISBN 0470047224 for details.\n\n@param time Time time <i>t</i> for which the numeraire should be returned <i>N(t)</i>.\n@return The numeraire at the specified time as <code>RandomVariableFromDoubleArray</code>\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Adds all items from the iterator to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed",
"Helper method to set a value in the internal header list.\n\n@param headers the headers to set the value in\n@param name the name to set\n@param value the value to set",
"Returns the query string of a URL from a parameter list.\n\n@param params\nMap with parameters\n@return query string",
"Returns all information related to a single texture.\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture information",
"This creates a new audit log file with default permissions.\n\n@param file File to create",
"List all apps for the current user's account.\n@param range The range of apps provided by {@link Range#getNextRange()}\n@return a list of apps",
"Obtains a Pax local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Pax local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Helper method to copy the contents of a stream to a file.\n@param outputDirectory The directory in which the new file is created.\n@param stream The stream to copy.\n@param targetFileName The file to write the stream contents to.\n@throws IOException If the stream cannot be copied."
] |
protected void sendMessage(DataOutputStream outputStream, Message message) throws IOException {
long startNs = System.nanoTime();
ProtoUtils.writeMessage(outputStream, message);
if(streamStats != null) {
streamStats.reportNetworkTime(operation,
Utils.elapsedTimeNs(startNs, System.nanoTime()));
}
} | [
"Helper method to send message on outputStream and account for network\ntime stats.\n\n@param outputStream\n@param message\n@throws IOException"
] | [
"Computes the null space using SVD. Slowest bust most stable way to find the solution\n\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space",
"Deploys application reading resources from specified InputStream.\n\n@param inputStream where resources are read\n@throws IOException",
"Returns true if the grammar element that is associated with the given param is filtered due to guard conditions\nof parameterized rules in the current call stack.\n\nIf the grammar element is the only element contained in a group, its container is checked, too.\n\n@see #isFiltered(AbstractElement, Param)",
"Gets the listener classes to which dispatching should be prevented while\nthis event is being dispatched.\n\n@return The listener classes marked to prevent.\n@see #preventCascade(Class)",
"This method writes extended attribute data for a task.\n\n@param xml MSPDI task\n@param mpx MPXJ task",
"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",
"Clones the given reference.\n\n@param refDef The reference descriptor\n@param prefix A prefix for the name\n@return The cloned reference",
"Utility method to retrieve the next working date start time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of next work start",
"Converts a JSON patch path to a JSON property name.\nCurrently the metadata API only supports flat maps.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return the JSON property name."
] |
public static double Taneja(double[] p, double[] q) {
double r = 0;
for (int i = 0; i < p.length; i++) {
if (p[i] != 0 && q[i] != 0) {
double pq = p[i] + q[i];
r += (pq / 2) * Math.log(pq / (2 * Math.sqrt(p[i] * q[i])));
}
}
return r;
} | [
"Gets the Taneja divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Taneja divergence between p and q."
] | [
"Attempts to checkout a resource so that one queued request can be\nserviced.\n\n@param key The key for which to process the requestQueue\n@return true iff an item was processed from the Queue.",
"Checks if the DPI value is already set for GeoServer.",
"Use this API to fetch all the responderhtmlpage resources that are configured on netscaler.",
"The documentation for InputStream.skip indicates that it can bail out early, and not skip\nthe requested number of bytes. I've encountered this in practice, hence this helper method.\n\n@param stream InputStream instance\n@param skip number of bytes to skip",
"Generates a download id for the request and adds the download request to the download request queue for the dispatchers pool to act on immediately.\n\n@param request\n@return downloadId",
"Sort and order steps to avoid unwanted generation",
"Create a local target.\n\n@param jbossHome the jboss home\n@param moduleRoots the module roots\n@param bundlesRoots the bundle roots\n@return the local target\n@throws IOException",
"Get the time zone for a specific exchange suffix\n\n@param suffix suffix for the exchange in YahooFinance\n@return time zone of the exchange",
"Sets the position of the currency symbol.\n\n@param posn currency symbol position."
] |
public Integer getEnd() {
if (mtasPositionType.equals(POSITION_RANGE)
|| mtasPositionType.equals(POSITION_SET)) {
return mtasPositionEnd;
} else if (mtasPositionType.equals(POSITION_SINGLE)) {
return mtasPositionStart;
} else {
return null;
}
} | [
"Gets the end.\n\n@return the end"
] | [
"Writes the data collected about classes to a file.",
"Calculates Sine value of the complex number.\n\n@param z1 A Complex Number instance.\n@return Returns new ComplexNumber instance containing the Sine value of the specified complex number.",
"Curries a procedure that takes one argument.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed argument.\n@return a procedure that takes no arguments. Never <code>null</code>.",
"Use this API to fetch the statistics of all gslbdomain_stats resources that are configured on netscaler.",
"Does not mutate the TestMatrix.\nVerifies that the test matrix contains all the required tests and that\neach required test is valid.\n\n@param testMatrix the {@link TestMatrixArtifact} to be verified.\n@param matrixSource a {@link String} of the source of proctor artifact. For example a path of proctor artifact file.\n@param requiredTests a {@link Map} of required test. The {@link TestSpecification} would be verified\n@param functionMapper a given el {@link FunctionMapper}\n@param providedContext a {@link Map} containing variables describing the context in which the request is executing. These will be supplied to verifying all rules.\n@param dynamicTests a {@link Set} of dynamic tests determined by filters.\n@return a {@link ProctorLoadResult} to describe the result of verification. It contains errors of verification and a list of missing test.",
"Performs a HTTP PUT request, saves an attachment.\n\n@return {@link Response}",
"This method determines whether the given date falls in the range of\ndates covered by this exception. Note that this method assumes that both\nthe start and end date of this exception have been set.\n\n@param date Date to be tested\n@return Boolean value",
"Queues a Runnable to be run on the main thread on the next iteration of\nthe messaging loop. This is handy when code running on the main thread\nneeds to run something else on the main thread, but only after the\ncurrent code has finished executing.\n\n@param r\nThe {@link Runnable} to run on the main thread.\n@return Returns {@code true} if the Runnable was successfully placed in\nthe Looper's message queue.",
"Sets the request body to the contents of a String.\n\n<p>If the contents of the body are large, then it may be more efficient to use an {@link InputStream} instead of\na String. Using a String requires that the entire body be in memory before sending the request.</p>\n\n@param body a String containing the contents of the body."
] |
public static BufferedImage cloneImage( BufferedImage image ) {
BufferedImage newImage = new BufferedImage( image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_ARGB );
Graphics2D g = newImage.createGraphics();
g.drawRenderedImage( image, null );
g.dispose();
return newImage;
} | [
"Clones a BufferedImage.\n@param image the image to clone\n@return the cloned image"
] | [
"Use this API to fetch csvserver_appflowpolicy_binding resources of given name .",
"Extract child task data.\n\n@param task MPXJ task\n@param row Synchro task data",
"Specifies the list of enrichers that will be used to enrich the container object.\n\n@param enrichers\nlist of enrichers that will be used to enrich the container object\n\n@return the current builder instance",
"Add the dependencies if the deployment contains a service activator loader entry.\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException",
"Assign to the data object the val corresponding to the fieldType.",
"Check if the given color string can be parsed.\n\n@param colorString The color to parse.",
"Create a new AwsServiceClient instance with a different codec registry.\n\n@param codecRegistry the new {@link CodecRegistry} for the client.\n@return a new AwsServiceClient instance with the different codec registry",
"Create a set containing all the processors in the graph.",
"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"
] |
private void checkDuplicateStdOutOutput(DumpProcessingAction newAction) {
if (newAction.useStdOut()) {
if (this.quiet) {
logger.warn("Multiple actions are using stdout as output destination.");
}
this.quiet = true;
}
} | [
"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"
] | [
"Add new control at the end of control bar with specified touch listener and resource.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener",
"converts a java.net.URI to a decoded string",
"Parses btch api response to create a list of BoxAPIResponse objects.\n@param batchResponse response of a batch api request\n@return list of BoxAPIResponses",
"Handle a simple ping request.\n\n@param channel the channel\n@param header the protocol header\n@throws IOException for any error",
"Returns a raw handle to the SQLite database connection. Do not close!\n@param context A context, which is used to (when needed) set up a connection to the database\n@return The single, unique connection to the database, as is (also) used by our Cupboard instance",
"Create a text message that will be stored in the database. Must be called inside a transaction.",
"Writes the details of a recurring exception.\n\n@param mpxjException source MPXJ calendar exception\n@param xmlException target MSPDI exception",
"Create a Collection Proxy for a given query.\n\n@param brokerKey The key of the persistence broker\n@param query The query\n@param collectionClass The class to build the proxy for\n@return The collection proxy",
"Returns the field with the specified value properly formatted. Multiline\nvalues are automatically indented, and dots are added on the empty lines.\n\n<pre>\nField-Name: value\n</pre>"
] |
private String getBearerToken(HttpConnectionInterceptorContext context) {
final AtomicReference<String> iamTokenResponse = new AtomicReference<String>();
boolean result = super.requestCookie(context, iamServerUrl, iamTokenRequestBody,
"application/x-www-form-urlencoded", "application/json",
new StoreBearerCallable(iamTokenResponse));
if (result) {
return iamTokenResponse.get();
} else {
return null;
}
} | [
"get bearer token returned by IAM in JSON format"
] | [
"If the not a bitmap itself, this will read the file's meta data.\n\n@param resources {@link android.content.Context#getResources()}\n@return Point where x = width and y = height",
"Get siblings of the same type as element from parent.\n\n@param parent parent node.\n@param element element.\n@return List of sibling (from element) under parent",
"Clears the collection and uses the iterator to run through the dao and delete all of the items in the collection\nfrom the associated database table. This is different from removing all of the elements in the table since this\niterator is across just one item's foreign objects.",
"Creates a resource key for given enumeration value. By convention,\nresource bundle for enumerations has the name of enumeration class\nand value identifier is the same as enumeration value name.\n@param value the enumeration value\n@return the resource key",
"Find the current active layout.\n\n@param phoenixProject phoenix project data\n@return current active layout",
"Makes http DELETE request\n@param url url to makes request to\n@param params data to add to params field\n@return {@link okhttp3.Response}\n@throws RequestException\n@throws LocalOperationException",
"Remove a path from a profile\n\n@param path_id path ID to remove\n@param profileId profile ID to remove path from",
"Gets the positions.\n\n@return the positions",
"Gets a Map of attributes from a json object given a path to traverse.\n\n@param record a JSONObject to traverse.\n@param path the json path to follow.\n@return the attributes as a {@link HashMap}, or null if it was not found."
] |
public ItemRequest<Project> findById(String project) {
String path = String.format("/projects/%s", project);
return new ItemRequest<Project>(this, Project.class, path, "GET");
} | [
"Returns the complete project record for a single project.\n\n@param project The project to get.\n@return Request object"
] | [
"Start a print.\n\n@param jobId the job ID\n@param specJson the client json request.\n@param out the stream to write to.",
"Fluent API builder.\n\n@param cronExpression\n@return",
"Create a forward curve from forwards given by a LIBORMonteCarloModel.\n\n@param name name of the forward curve.\n@param model Monte Carlo model providing the forwards.\n@param startTime time at which the curve starts, i.e. zero time for the curve\n@return a forward curve from forwards given by a LIBORMonteCarloModel.\n@throws CalculationException Thrown if the model failed to provide the forward rates.",
"Sends a normal HTTP response containing the serialization information in\na XML format",
"Adds to this set all of the elements in the specified members array\n@param members the members to add\n@return the number of members actually added",
"Adds all items from the iterable to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed",
"Checks the hour, minute and second are equal.",
"Get the names of the currently registered format providers.\n\n@return the provider names, never null.",
"Processes an anonymous reference definition.\n\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the reference as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\nreferenced object on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe referenced object\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\nreferenced object\"\[email protected] name=\"class-ref\" optional=\"false\" description=\"The fully qualified name of the class\nowning the referenced field\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the reference\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The fields in the current type used for\nimplementing the reference\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the reference is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the reference\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\nreference\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The fields in the referenced type\ncorresponding to the local fields (is only used for the table definition)\""
] |
public static Type getArrayComponentType(Type type) {
if (type instanceof GenericArrayType) {
return GenericArrayType.class.cast(type).getGenericComponentType();
}
if (type instanceof Class<?>) {
Class<?> clazz = (Class<?>) type;
if (clazz.isArray()) {
return clazz.getComponentType();
}
}
throw new IllegalArgumentException("Not an array type " + type);
} | [
"Determines the component type for a given array type.\n\n@param type the given array type\n@return the component type of a given array type"
] | [
"Attempts to clear the global log context used for embedded servers.",
"disables the responses for a given pathname and user id\n\n@param model\n@param path_id\n@param clientUUID\n@return\n@throws Exception",
"Returns the y-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the y coordinate",
"Utility method to read a percentage value.\n\n@param data data block\n@param offset offset into data block\n@return percentage value",
"Sets maintenance mode for the given app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param enable true to enable; false to disable",
"Find out the scrollable child view from a ViewGroup.\n\n@param viewGroup",
"Send a get artifacts request\n\n@param hasLicense\n@return list of artifact\n@throws GrapesCommunicationException",
"Returns the configured page size, or the default page size if it is not configured.\n@return The configured page size, or the default page size if it is not configured.",
"Use this API to fetch all the cacheselector resources that are configured on netscaler."
] |
public void setHeader(String header, String value) {
StringValidator.throwIfEmptyOrNull("header", header);
StringValidator.throwIfEmptyOrNull("value", value);
if (headers == null) {
headers = new HashMap<String, String>();
}
headers.put(header, value);
} | [
"Sets a request header with the given name and value. If a header with the\nspecified name has already been set then the new value overwrites the\ncurrent value.\n\n@param header the name of the header\n@param value the value of the header\n\n@throws NullPointerException if header or value are null\n@throws IllegalArgumentException if header or value are the empty string"
] | [
"Uploads chunk of a stream to an open upload session.\n@param stream the stream that is used to read the chunck using the offset and part size.\n@param offset the byte position where the chunk begins in the file.\n@param partSize the part size returned as part of the upload session instance creation.\nOnly the last chunk can have a lesser value.\n@param totalSizeOfFile The total size of the file being uploaded.\n@return the part instance that contains the part id, offset and part size.",
"If the String argument locatorSelectionStrategy is as key in the map representing the locatorSelectionStrategies, the\ncorresponding strategy is selected, else it remains unchanged.\n@param locatorSelectionStrategy",
"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",
"Displays a sample model for the report request.\n@return A string describing the structure of a certain report execution",
"Load the related repositories, plugins and a promotion config associated to the buildId.\nCalled from the UI.\n\n@param buildId - The unique build id.\n@return LoadBuildsResponse e.g. list of repositories, plugins and a promotion config.",
"Adds a class entry to this JAR.\n\n@param clazz the class to add to the JAR.\n@return {@code this}",
"Converts from RGB to Hexadecimal notation.",
"Add a raw statement as part of the where that can be anything that the database supports. Using more structured\nmethods is recommended but this gives more control over the query and allows you to utilize database specific\nfeatures.\n\n@param rawStatement\nThe statement that we should insert into the WHERE.\n\n@param args\nOptional arguments that correspond to any ? specified in the rawStatement. Each of the arguments must\nhave either the corresponding columnName or the sql-type set. <b>WARNING,</b> you cannot use the\n{@code SelectArg(\"columnName\")} constructor since that sets the _value_, not the name. Use\n{@code new SelectArg(\"column-name\", null);}.",
"The primary run loop of the kqueue event processor."
] |
private boolean isDebug(CmsObject cms, CmsSolrQuery query) {
String[] debugSecretValues = query.remove(REQUEST_PARAM_DEBUG_SECRET);
String debugSecret = (debugSecretValues == null) || (debugSecretValues.length < 1)
? null
: debugSecretValues[0];
if ((null != debugSecret) && !debugSecret.trim().isEmpty() && (null != m_handlerDebugSecretFile)) {
try {
CmsFile secretFile = cms.readFile(m_handlerDebugSecretFile);
String secret = new String(secretFile.getContents(), CmsFileUtil.getEncoding(cms, secretFile));
return secret.trim().equals(debugSecret.trim());
} catch (Exception e) {
LOG.info(
"Failed to read secret file for index \""
+ getName()
+ "\" at path \""
+ m_handlerDebugSecretFile
+ "\".");
}
}
return false;
} | [
"Checks if the query should be executed using the debug mode where the security restrictions do not apply.\n@param cms the current context.\n@param query the query to execute.\n@return a flag, indicating, if the query should be performed in debug mode."
] | [
"Log block data.\n\n@param blockIndex current block index\n@param startIndex start index\n@param blockLength length",
"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",
"Parses command-line and gets read-only metadata.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException",
"gets the bytes, sharing the cached array and does not clone it",
"Reset the combination generator.",
"Add views to the tree.\n\n@param parentNode parent tree node\n@param file views container",
"Creates the publish button.\n\n@param updateListener the update listener\n@return the publish button",
"Returns if this has any mapping for the specified cell.\n\n@param cell the cell name\n@return {@code true} if there is any mapping for the cell, {@code false} otherwise",
"Start a managed server.\n\n@param factory the boot command factory"
] |
public void credentialsMigration(T overrider, Class overriderClass) {
try {
deployerMigration(overrider, overriderClass);
resolverMigration(overrider, overriderClass);
} catch (NoSuchFieldException | IllegalAccessException | IOException e) {
converterErrors.add(getConversionErrorMessage(overrider, e));
}
} | [
"Migrate to Jenkins \"Credentials\" plugin from the old credential implementation"
] | [
"Returns the list of colliders attached to scene objects that are\nvisible from the viewpoint of the camera.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is picking against particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n\nThe hit location returned is the world position of the scene object center.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@return A list of {@link org.gearvrf.GVRPicker.GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link org.gearvrf.GVRPicker.GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6",
"Called from the native side\n@param eye",
"Reads data from the SP file.\n\n@return Project File instance",
"Get a property as a json array or default.\n\n@param key the property name\n@param defaultValue default",
"Start the actual migration. Take the version of the database, get all required migrations and execute them or do\nnothing if the DB is already up to date.\n\nAt the end the underlying database instance is closed.\n\n@throws MigrationException if a migration fails",
"Answer the SQL-Clause for a LikeCriteria\n\n@param c\n@param buf",
"Use this API to fetch lbvserver resource of given name .",
"Adds the correct load instruction based on the type descriptor\n\n@param code the bytecode to add the instruction to\n@param type the type of the variable\n@param variable the variable number",
"Use this API to fetch clusterinstance resources of given names ."
] |
public static autoscaleprofile[] get(nitro_service service) throws Exception{
autoscaleprofile obj = new autoscaleprofile();
autoscaleprofile[] response = (autoscaleprofile[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the autoscaleprofile resources that are configured on netscaler."
] | [
"Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.",
"Checks the foreignkeys of all references in the model.\n\n@param modelDef The model\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for foreignkey is invalid",
"Returns the adapter position of the Child associated with this ChildViewHolder\n\n@return The adapter position of the Child 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.",
"Evaluates the body if value for the member tag equals the specified value.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" description=\"The parameter name. If not specified, then the raw\ncontent of the tag is returned.\"\[email protected] name=\"paramNum\" description=\"The zero-based parameter number. It's used if the user\nused the space-separated format for specifying parameters.\"\[email protected] name=\"value\" optional=\"false\" description=\"The expected value.\"",
"Add image in the document.\n\n@param context\nPDF context\n@param imageResult\nimage\n@throws BadElementException\nPDF construction problem\n@throws IOException\nPDF construction problem",
"Sets a request header with the given name and value. If a header with the\nspecified name has already been set then the new value overwrites the\ncurrent value.\n\n@param header the name of the header\n@param value the value of the header\n\n@throws NullPointerException if header or value are null\n@throws IllegalArgumentException if header or value are the empty string",
"Returns the project membership record.\n\n@param projectMembership Globally unique identifier for the project membership.\n@return Request object",
"Gets type from super class's type parameter.",
"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."
] |
protected DirectiveStatement parseDirectiveStatement(DirectiveStContext node)
{
DirectiveStContext stContext = (DirectiveStContext) node;
DirectiveExpContext direExp = stContext.directiveExp();
Token token = direExp.Identifier().getSymbol();
String directive = token.getText().toLowerCase().intern();
TerminalNode value = direExp.StringLiteral();
List<TerminalNode> idNodeList = null;
DirectiveExpIDListContext directExpidLisCtx = direExp.directiveExpIDList();
if (directExpidLisCtx != null)
{
idNodeList = directExpidLisCtx.Identifier();
}
Set<String> idList = null;
DirectiveStatement ds = null;
if (value != null)
{
String idListValue = this.getStringValue(value.getText());
idList = new HashSet(Arrays.asList(idListValue.split(",")));
ds = new DirectiveStatement(directive, idList, this.getBTToken(token));
}
else if (idNodeList != null)
{
idList = new HashSet<String>();
for (TerminalNode t : idNodeList)
{
idList.add(t.getText());
}
ds = new DirectiveStatement(directive, idList, this.getBTToken(token));
}
else
{
ds = new DirectiveStatement(directive, Collections.EMPTY_SET, this.getBTToken(token));
}
if (directive.equals("dynamic"))
{
if (ds.getIdList().size() == 0)
{
data.allDynamic = true;
}
else
{
data.dynamicObjectSet = ds.getIdList();
}
ds = new DirectiveStatement(directive, Collections.EMPTY_SET, this.getBTToken(token));
return ds;
}
else if (directive.equalsIgnoreCase("safe_output_open".intern()))
{
this.pbCtx.isSafeOutput = true;
return ds;
}
else if (directive.equalsIgnoreCase("safe_output_close".intern()))
{
this.pbCtx.isSafeOutput = false;
return ds;
}
else
{
return ds;
}
} | [
"directive dynamic xxx,yy\n@param node\n@return"
] | [
"Handles the response of the SerialApiGetInitData request.\n@param incomingMlivessage the response message to process.",
"Produces a new ConditionalCounter.\n\n@return a new ConditionalCounter, where order of indices is reversed",
"Determine if a task field contains data.\n\n@param task task instance\n@param field target field\n@return true if the field contains data",
"Creates the row key of the given association row; columns present in the given association key will be obtained\nfrom there, all other columns from the given native association row.",
"The normalized string returned by this method is consistent with java.net.Inet6address.\nIPs are not compressed nor mixed in this representation.",
"Use this API to unset the properties of gslbservice resources.\nProperties that need to be unset are specified in args array.",
"Increment the version info associated with the given node\n\n@param node The node",
"Obtains a local date in Symmetry454 calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Symmetry454 local date, not null\n@throws DateTimeException if unable to create the date",
"When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command removes all elements in the sorted set between the lexicographical range specified.\n@param lexRange\n@return the number of elements removed."
] |
private void installFastProcessAnnotatedTypeResolver(ServiceRegistry services) {
ClassFileServices classFileServices = services.get(ClassFileServices.class);
if (classFileServices != null) {
final GlobalObserverNotifierService observers = services.get(GlobalObserverNotifierService.class);
try {
final FastProcessAnnotatedTypeResolver resolver = new FastProcessAnnotatedTypeResolver(observers.getAllObserverMethods());
services.add(FastProcessAnnotatedTypeResolver.class, resolver);
} catch (UnsupportedObserverMethodException e) {
BootstrapLogger.LOG.notUsingFastResolver(e.getObserver());
return;
}
}
} | [
"needs to be resolved once extension beans are deployed"
] | [
"Extracts the column from the matrix a.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column.",
"Recursively add indirect subclasses to a class record.\n\n@param directSuperClass\nthe superclass to add (together with its own superclasses)\n@param subClassRecord\nthe subclass to add to",
"Given a list of partition plans and a set of stores, copies the store\nnames to every individual plan and creates a new list\n\n@param existingPlanList Existing partition plan list\n@param storeDefs List of store names we are rebalancing\n@return List of updated partition plan",
"Returns a list of the rekordbox IDs of the tracks contained in the cache.\n\n@return a list containing the rekordbox ID for each track present in the cache, in the order they appear",
"Updates the information about this weblink with any info fields that have been modified locally.\n\n<p>The only fields that will be updated are the ones that have been modified locally. For example, the following\ncode won't update any information (or even send a network request) since none of the info's fields were\nchanged:</p>\n\n<pre>BoxWebLink webLink = new BoxWebLink(api, id);\nBoxWebLink.Info info = webLink.getInfo();\nwebLink.updateInfo(info);</pre>\n\n@param info the updated info.",
"Find the the qualfied container port of the target service\nUses java annotations first or returns the container port.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved containerPort of '0' as a fallback.",
"Solve the using the lower triangular matrix in LU. Diagonal elements are assumed\nto be 1",
"Updates the template with the specified id.\n\n@param id id of the template to update\n@param options a Map of options to update/add.\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.",
"Sends all events to the web service. Events will be transformed with mapper before sending.\n\n@param events the events"
] |
public static List<QuotaType> getQuotaTypes(List<String> strQuotaTypes) {
if(strQuotaTypes.size() < 1) {
throw new VoldemortException("Quota type not specified.");
}
List<QuotaType> quotaTypes;
if(strQuotaTypes.size() == 1 && strQuotaTypes.get(0).equals(AdminToolUtils.QUOTATYPE_ALL)) {
quotaTypes = Arrays.asList(QuotaType.values());
} else {
quotaTypes = new ArrayList<QuotaType>();
for(String strQuotaType: strQuotaTypes) {
QuotaType type = QuotaType.valueOf(strQuotaType);
quotaTypes.add(type);
}
}
return quotaTypes;
} | [
"Utility function that fetches quota types."
] | [
"Filter unsafe or unnecessary request.\n\n@param nodeDataMapValidSource\nthe node data map valid source\n@param nodeDataMapValidSafe\nthe node data map valid safe",
"Checks whether the given field definition is used as the primary key of a class referenced by\na reference.\n\n@param modelDef The model\n@param fieldDef The current field descriptor def\n@return The reference that uses the field or <code>null</code> if the field is not used in this way",
"Transforms user name and icon size into the rfs image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path",
"Executes a HTTP request and parses the JSON response into a Response instance.\n\n@param connection The HTTP request to execute.\n@return Response object of the deserialized JSON response",
"Extracts a house holder vector from the rows of A and stores it in u\n@param A Complex matrix with householder vectors stored in the upper right triangle\n@param row Row in A\n@param col0 first row in A (implicitly assumed to be r + i0)\n@param col1 last row +1 in A\n@param u Output array storage\n@param offsetU first index in U",
"Delivers the correct JSON Object for the target\n\n@param target\n@throws org.json.JSONException",
"Constructs the convex hull of a set of points whose coordinates are given\nby an array of doubles.\n\n@param coords\nx, y, and z coordinates of each input point. The length of\nthis array must be at least three times <code>nump</code>.\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe number of input points is less than four or greater than\n1/3 the length of <code>coords</code>, or the points appear\nto be coincident, colinear, or coplanar.",
"Processes the template for all reference definitions of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Get minimum gray value in the image.\n\n@param fastBitmap Image to be processed.\n@param startX Initial X axis coordinate.\n@param startY Initial Y axis coordinate.\n@param width Width.\n@param height Height.\n@return Minimum gray."
] |
private static Pod getRandomPod(KubernetesClient client, String name, String namespace) {
Endpoints endpoints = client.endpoints().inNamespace(namespace).withName(name).get();
List<String> pods = new ArrayList<>();
if (endpoints != null) {
for (EndpointSubset subset : endpoints.getSubsets()) {
for (EndpointAddress address : subset.getAddresses()) {
if (address.getTargetRef() != null && POD.equals(address.getTargetRef().getKind())) {
String pod = address.getTargetRef().getName();
if (pod != null && !pod.isEmpty()) {
pods.add(pod);
}
}
}
}
}
if (pods.isEmpty()) {
return null;
} else {
String chosen = pods.get(RANDOM.nextInt(pods.size()));
return client.pods().inNamespace(namespace).withName(chosen).get();
}
} | [
"Get a random pod that provides the specified service in the specified namespace.\n\n@param client\nThe client instance to use.\n@param name\nThe name of the service.\n@param namespace\nThe namespace of the service.\n\n@return The pod or null if no pod matches."
] | [
"This method extracts data for a single calendar from a Planner file.\n\n@param plannerCalendar Calendar data\n@param parentMpxjCalendar parent of derived calendar",
"Calculate the duration percent complete.\n\n@param row task data\n@return percent complete",
"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.",
"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",
"Go through the property name to see if it is a complex one. If it is, aliases must be declared.\n\n@param orgPropertyName\nThe propertyName. Can be complex.\n@param userData\nThe userData object that is passed in each method of the FilterVisitor. Should always be of the info\n\"Criteria\".\n@return property name",
"Get a collection of all of the user's groups.\n\n@return A Collection of Group objects\n@throws FlickrException",
"A fairly basic 5-way classifier, that notes digits, and upper\nand lower case, mixed, and non-alphanumeric.\n\n@param s String to find word shape of\n@return Its word shape: a 5 way classification",
"Turn this profile on or off\n\n@param enabled true or false\n@return true on success, false otherwise",
"Record a prepared operation.\n\n@param identity the server identity\n@param prepared the prepared operation"
] |
public static double huntKennedyCMSOptionValue(
double forwardSwaprate,
double volatility,
double swapAnnuity,
double optionMaturity,
double swapMaturity,
double payoffUnit,
double optionStrike)
{
double a = 1.0/swapMaturity;
double b = (payoffUnit / swapAnnuity - a) / forwardSwaprate;
double convexityAdjustment = Math.exp(volatility*volatility*optionMaturity);
double valueUnadjusted = blackModelSwaptionValue(forwardSwaprate, volatility, optionMaturity, optionStrike, swapAnnuity);
double valueAdjusted = blackModelSwaptionValue(forwardSwaprate * convexityAdjustment, volatility, optionMaturity, optionStrike, swapAnnuity);
return a * valueUnadjusted + b * forwardSwaprate * valueAdjusted;
} | [
"Calculate the value of a CMS option using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option maturity\n@param swapMaturity The swap maturity\n@param payoffUnit The payoff unit, e.g., the discount factor corresponding to the payment date\n@param optionStrike The option strike\n@return Value of the CMS option"
] | [
"Control whether the Virtual CDJ sends status packets to the other players. Most uses of Beat Link will not\nrequire this level of activity. However, if you want to be able to take over the tempo master role, and control\nthe tempo and beat alignment of other players, you will need to turn on this feature, which also requires that\nyou are using one of the standard player numbers, 1-4.\n\n@param send if {@code true} we will send status packets, and can participate in (and control) tempo and beat sync\n\n@throws IllegalStateException if the virtual CDJ is not running, or if it is not using a device number in the\nrange 1 through 4\n@throws IOException if there is a problem starting the {@link BeatFinder}",
"Configure all UI elements in the \"ending\"-options panel.",
"Given a directory, determine if it contains a multi-file database whose format\nwe can process.\n\n@param directory directory to process\n@return ProjectFile instance if we can process anything, or null",
"add some validation to see if this miss anything.\n\n@return true, if successful\n@throws ParallelTaskInvalidException\nthe parallel task invalid exception",
"Register child resources associated with this resource.\n\n@param resourceRegistration a {@link org.jboss.as.controller.registry.ManagementResourceRegistration} created from this definition",
"Count the number of non-zero elements in R",
"Copies the given container page to the provided root path.\n@param originalPage the page to copy\n@param targetPageRootPath the root path of the copy target.\n@throws CmsException thrown if something goes wrong.\n@throws NoCustomReplacementException if a custom replacement is not found for a type which requires it.",
"Overloads the left shift operator to provide an easy way to append multiple\nobjects as string representations to a String.\n\n@param self a String\n@param value an Object\n@return a StringBuffer built from this string\n@since 1.0",
"Checks the preconditions for creating a new Truncate processor.\n\n@param maxSize\nthe maximum size of the String\n@param suffix\nthe String to append if the input is truncated (e.g. \"...\")\n@throws IllegalArgumentException\nif {@code maxSize <= 0}\n@throws NullPointerException\nif suffix is null"
] |
public CredentialsConfig getResolvingCredentialsConfig() {
if (resolverCredentialsConfig != null && resolverCredentialsConfig.isCredentialsProvided()) {
return getResolverCredentialsConfig();
}
if (deployerCredentialsConfig != null) {
return getDeployerCredentialsConfig();
}
return CredentialsConfig.EMPTY_CREDENTIALS_CONFIG;
} | [
"Decides what are the preferred credentials to use for resolving the repo keys of the server\n\n@return Preferred credentials for repo resolving. Never null."
] | [
"Given a json node, find a nested node using given composed key.\n\n@param jsonNode the parent json node\n@param composedKey a key combines multiple keys using flattening dots.\nFlattening dots are dot character '.' those are not preceded by slash '\\'\nEach flattening dot represents a level with following key as field key in that level\n@return nested json node located using given composed key",
"Adds the remaining tokens to the processed tokens list.\n\n@param iter An iterator over the remaining tokens",
"Use this API to fetch sslfipskey resource of given name .",
"Retrieve all Collection attributes of a given instance\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true, loading is forced even if cld differs",
"Returns Task field name of supplied code no.\n\n@param key - the code no of required Task field\n@return - field name",
"convert Date to XMLGregorianCalendar.\n\n@param date the date\n@return the xML gregorian calendar",
"Checks the given class descriptor for correct procedure settings.\n\n@param classDef The class 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",
"Writes a resource assignment to a PM XML file.\n\n@param mpxj MPXJ ResourceAssignment instance",
"Sets the value for the API's \"sitefilter\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters"
] |
public double getValue(ForwardCurveInterface forwardCurve, double swaprateVolatility) {
double swaprate = swaprates[0];
for (double swaprate1 : swaprates) {
if (swaprate1 != swaprate) {
throw new RuntimeException("Uneven swaprates not allows for analytical pricing.");
}
}
double[] swapTenor = new double[fixingDates.length+1];
System.arraycopy(fixingDates, 0, swapTenor, 0, fixingDates.length);
swapTenor[swapTenor.length-1] = paymentDates[paymentDates.length-1];
double forwardSwapRate = Swap.getForwardSwapRate(new TimeDiscretization(swapTenor), new TimeDiscretization(swapTenor), forwardCurve);
double swapAnnuity = SwapAnnuity.getSwapAnnuity(new TimeDiscretization(swapTenor), forwardCurve);
return AnalyticFormulas.blackModelSwaptionValue(forwardSwapRate, swaprateVolatility, exerciseDate, swaprate, swapAnnuity);
} | [
"This method returns the value of the product using a Black-Scholes model for the swap rate\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve on which to value the swap.\n@param swaprateVolatility The Black volatility.\n@return Value of this product"
] | [
"Indicate to the RecyclerView the type of Renderer used to one position using a numeric value.\n\n@param position to analyze.\n@return the id associated to the Renderer used to render the content given a position.",
"Build control archive of the deb\n\n@param packageControlFile the package control file\n@param controlFiles the other control information files (maintainer scripts, etc)\n@param dataSize the size of the installed package\n@param checksums the md5 checksums of the files in the data archive\n@param output\n@return\n@throws java.io.FileNotFoundException\n@throws java.io.IOException\n@throws java.text.ParseException",
"Returns the default shared instance of the CleverTap SDK.\n\n@param context The Android context\n@return The {@link CleverTapAPI} object",
"A helper - in Java 9, the extension CL was renamed to platform CL and hosts all the JDK classes. Before 9, it was useless and we used\nbootstrap CL instead.\n\n@return the base CL to use.",
"Compiles and performs the provided equation.\n\n@param equation String in simple equation format",
"Use this API to fetch a appflowglobal_binding resource .",
"Get all components of a specific class from this scene object and its descendants.\n@param type component type (as returned from getComponentType())\n@return ArrayList of components with the specified class.",
"Gets all Checkable widgets in the group\n@return list of Checkable widgets",
"Get a list of destinations and the values matching templated parameter for the given path.\nReturns an empty list when there are no destinations that are matched.\n\n@param path path to be routed.\n@return List of Destinations matching the given route."
] |
private void readCostRateTables(Resource resource, Rates rates)
{
if (rates == null)
{
CostRateTable table = new CostRateTable();
table.add(CostRateTableEntry.DEFAULT_ENTRY);
resource.setCostRateTable(0, table);
table = new CostRateTable();
table.add(CostRateTableEntry.DEFAULT_ENTRY);
resource.setCostRateTable(1, table);
table = new CostRateTable();
table.add(CostRateTableEntry.DEFAULT_ENTRY);
resource.setCostRateTable(2, table);
table = new CostRateTable();
table.add(CostRateTableEntry.DEFAULT_ENTRY);
resource.setCostRateTable(3, table);
table = new CostRateTable();
table.add(CostRateTableEntry.DEFAULT_ENTRY);
resource.setCostRateTable(4, table);
}
else
{
Set<CostRateTable> tables = new HashSet<CostRateTable>();
for (net.sf.mpxj.mspdi.schema.Project.Resources.Resource.Rates.Rate rate : rates.getRate())
{
Rate standardRate = DatatypeConverter.parseRate(rate.getStandardRate());
TimeUnit standardRateFormat = DatatypeConverter.parseTimeUnit(rate.getStandardRateFormat());
Rate overtimeRate = DatatypeConverter.parseRate(rate.getOvertimeRate());
TimeUnit overtimeRateFormat = DatatypeConverter.parseTimeUnit(rate.getOvertimeRateFormat());
Double costPerUse = DatatypeConverter.parseCurrency(rate.getCostPerUse());
Date endDate = rate.getRatesTo();
CostRateTableEntry entry = new CostRateTableEntry(standardRate, standardRateFormat, overtimeRate, overtimeRateFormat, costPerUse, endDate);
int tableIndex = rate.getRateTable().intValue();
CostRateTable table = resource.getCostRateTable(tableIndex);
if (table == null)
{
table = new CostRateTable();
resource.setCostRateTable(tableIndex, table);
}
table.add(entry);
tables.add(table);
}
for (CostRateTable table : tables)
{
Collections.sort(table);
}
}
} | [
"Reads the cost rate tables from the file.\n\n@param resource parent resource\n@param rates XML cot rate tables"
] | [
"Create an Product delivery\n\n@throws AuthenticationException, GrapesCommunicationException, IOException",
"Gets the value for the key.\n\n@param key the key to check for the value\n\n@return the value or an empty collection if no values were set",
"Write a short to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The short to write\n@param offset The offset to begin writing at",
"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",
"Update environment variables to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param config Key/Value pairs of environment variables.",
"Print the common class node's properties",
"Assembles the exception message when the value received by a CellProcessor isn't of the correct type.\n\n@param expectedType\nthe expected type\n@param actualValue\nthe value received by the CellProcessor\n@return the message\n@throws NullPointerException\nif expectedType is null",
"Gets the URL of the first service that have been created during the current session.\n\n@return URL of the first service.",
"Apply all attributes on the given context, hereby existing entries are preserved.\n\n@param context the context to be applied, not null.\n@return this Builder, for chaining\n@see #importContext(AbstractContext, boolean)"
] |
protected boolean hasTimeOutHeader() {
boolean result = false;
String timeoutValStr = this.request.getHeader(RestMessageHeaders.X_VOLD_REQUEST_TIMEOUT_MS);
if(timeoutValStr != null) {
try {
this.parsedTimeoutInMs = Long.parseLong(timeoutValStr);
if(this.parsedTimeoutInMs < 0) {
RestErrorHandler.writeErrorResponse(messageEvent,
HttpResponseStatus.BAD_REQUEST,
"Time out cannot be negative ");
} else {
result = true;
}
} catch(NumberFormatException nfe) {
logger.error("Exception when validating request. Incorrect timeout parameter. Cannot parse this to long: "
+ timeoutValStr,
nfe);
RestErrorHandler.writeErrorResponse(this.messageEvent,
HttpResponseStatus.BAD_REQUEST,
"Incorrect timeout parameter. Cannot parse this to long: "
+ timeoutValStr);
}
} else {
logger.error("Error when validating request. Missing timeout parameter.");
RestErrorHandler.writeErrorResponse(this.messageEvent,
HttpResponseStatus.BAD_REQUEST,
"Missing timeout parameter.");
}
return result;
} | [
"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"
] | [
"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.",
"Returns a new analysis context builder that extracts the information about the available extensions from\nthe provided Revapi instance.\n\n<p>The extensions have to be known so that both old and new style of configuration can be usefully worked with.\n\n@param revapi the revapi instance to read the available extensions from\n@return a new analysis context builder",
"This method takes the textual version of an accrue type name\nand populates the class instance appropriately. Note that unrecognised\nvalues are treated as \"Prorated\".\n\n@param type text version of the accrue type\n@param locale target locale\n@return AccrueType class instance",
"Prepares the CmsObject for jumping to this favorite location, and returns the appropriate URL.\n\n@param cms the CmsObject to initialize for jumping to the favorite\n@return the link for the favorite location\n\n@throws CmsException if something goes wrong",
"Delete an object from the database.",
"Removes the specified type from the frame.",
"Convenience method which locates the first P3 database in a directory\nand opens it.\n\n@param directory directory containing a P3 database\n@return ProjectFile instance",
"Determine the X coordinate within the component at which the specified beat begins.\n\n@param beat the beat number whose position is desired\n@return the horizontal position within the component coordinate space where that beat begins\n@throws IllegalArgumentException if the beat number exceeds the number of beats in the track.",
"Returns all categories that are direct children of the current main category.\n\n@return all categories that are direct children of the current main category."
] |
public boolean decompose(DMatrixRMaj mat , int indexStart , int n ) {
double m[] = mat.data;
double el_ii;
double div_el_ii=0;
for( int i = 0; i < n; i++ ) {
for( int j = i; j < n; j++ ) {
double sum = m[indexStart+i*mat.numCols+j];
int iEl = i*n;
int jEl = j*n;
int end = iEl+i;
// k = 0:i-1
for( ; iEl<end; iEl++,jEl++ ) {
// sum -= el[i*n+k]*el[j*n+k];
sum -= el[iEl]*el[jEl];
}
if( i == j ) {
// is it positive-definate?
if( sum <= 0.0 )
return false;
el_ii = Math.sqrt(sum);
el[i*n+i] = el_ii;
m[indexStart+i*mat.numCols+i] = el_ii;
div_el_ii = 1.0/el_ii;
} else {
double v = sum*div_el_ii;
el[j*n+i] = v;
m[indexStart+j*mat.numCols+i] = v;
}
}
}
return true;
} | [
"Decomposes a submatrix. The results are written to the submatrix\nand to its internal matrix L.\n\n@param mat A matrix which has a submatrix that needs to be inverted\n@param indexStart the first index of the submatrix\n@param n The width of the submatrix that is to be inverted.\n@return True if it was able to finish the decomposition."
] | [
"Adds to this set all of the elements in the specified members array\n@param members the members to add\n@return the number of members actually added",
"Modies the matrix to make sure that at least one element in each column has a value",
"Use this API to update rnatparam.",
"Utility method to retrieve the next working date start time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of next work start",
"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.",
"Show multiple channels. All other channels will be unaffected.\n@param channels The channels to show",
"Returns an java object read from the specified ResultSet column.",
"Checks if a Zip is valid navigating through the entries\n\n@param file File to validate\n@throws IOException I/O Error",
"Parse the json string to the diagram model, assumes that the json is\nhierarchical ordered\n@param json\n@return Model with all shapes defined in JSON\n@throws org.json.JSONException"
] |
public void printInferredRelations(ClassDoc c) {
// check if the source is excluded from inference
if (hidden(c))
return;
Options opt = optionProvider.getOptionsFor(c);
for (FieldDoc field : c.fields(false)) {
if(hidden(field))
continue;
// skip statics
if(field.isStatic())
continue;
// skip primitives
FieldRelationInfo fri = getFieldRelationInfo(field);
if (fri == null)
continue;
// check if the destination is excluded from inference
if (hidden(fri.cd))
continue;
// if source and dest are not already linked, add a dependency
RelationPattern rp = getClassInfo(c, true).getRelation(fri.cd.toString());
if (rp == null) {
String destAdornment = fri.multiple ? "*" : "";
relation(opt, opt.inferRelationshipType, c, fri.cd, "", "", destAdornment);
}
}
} | [
"Prints associations recovered from the fields of a class. An association is inferred only\nif another relation between the two classes is not already in the graph.\n@param classes"
] | [
"Use this API to fetch tunneltrafficpolicy resource of given name .",
"Add a dependency to the graph\n\n@param dependency\n@param graph\n@param depth\n@param parentId",
"Get result of one of the task that belongs to this task's task group.\n\n@param key the task key\n@param <T> the actual type of the task result\n@return the task result, null will be returned if task has not produced a result yet",
"add trace information for received frame",
"Moves a calendar to the last named day of the month.\n\n@param calendar current date",
"Send a request that expects a single message as its response, then read and return that response.\n\n@param requestType identifies what kind of request to send\n@param responseType identifies the type of response we expect, or {@code null} if we’ll accept anything\n@param arguments The argument fields to send in the request\n\n@return the response from the player\n\n@throws IOException if there is a communication problem, or if the response does not have the same transaction\nID as the request.",
"Create an executable jar to generate the report. Created jar contains only\nallure configuration file.",
"In the 2.0 xsd the vault is in an external file, which has no namespace, using the output of the vault tool.\n\n@param f the file containing the external vault configuration as generated by the vault tool\n@return the vault config",
"Registers add operation\n\n@param registration resource on which to register\n@param handler operation handler to register\n@param flags with flags\n@deprecated use {@link #registerAddOperation(org.jboss.as.controller.registry.ManagementResourceRegistration, AbstractAddStepHandler, org.jboss.as.controller.registry.OperationEntry.Flag...)}"
] |
public static <X> ServiceTypeLoader<X> load(Class<X> serviceType) {
return load(serviceType, Thread.currentThread().getContextClassLoader());
} | [
"Locates the services in the context classloader of the current thread.\n\n@param serviceType the type of the services to locate\n@param <X> the type of the service\n@return the service type loader"
] | [
"Process a relationship between two tasks.\n\n@param row relationship data",
"Support the range subscript operator for String with IntRange\n\n@param text a String\n@param range an IntRange\n@return the resulting String\n@since 1.0",
"Assemble the configuration section of the URL.",
"Use this API to fetch lbvserver_auditnslogpolicy_binding resources of given name .",
"Clear all beans and call the destruction callback.",
"Wrap Statement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a statement.",
"check if MessageID exists in the message, if not, only generate new MessageID for outbound message.\n@param message",
"Use this API to fetch all the linkset resources that are configured on netscaler.",
"Gets the time warp.\n\n@return the time warp"
] |
static JobContext copy() {
JobContext current = current_.get();
//JobContext ctxt = new JobContext(keepParent ? current : null);
JobContext ctxt = new JobContext(null);
if (null != current) {
ctxt.bag_.putAll(current.bag_);
}
return ctxt;
} | [
"Make a copy of JobContext of current thread\n@return the copy of current job context or an empty job context"
] | [
"Returns the designer version from the manifest.\n@param context\n@return version",
"Test whether the operation has a defined criteria attribute.\n\n@param operation the operation\n@return",
"Retrieve an instance of the TaskField class based on the data read from an\nMPX file.\n\n@param value value from an MS Project file\n@return TaskField instance",
"Active inverter colors",
"Creates the actual path to the xml file of the module.",
"Convert from a DTO to an internal Spring bean definition.\n\n@param beanDefinitionDto The DTO object.\n@return Returns a Spring bean definition.",
"set the textColor of the ColorHolder to an drawable\n\n@param ctx\n@param drawable",
"Use this API to unset the properties of snmpmanager resource.\nProperties that need to be unset are specified in args array.",
"Run through the map and remove any references that have been null'd out by the GC."
] |
public void printMinors(int matrix[], int N, PrintStream stream) {
this.N = N;
this.stream = stream;
// compute all the minors
int index = 0;
for( int i = 1; i <= N; i++ ) {
for( int j = 1; j <= N; j++ , index++) {
stream.print(" double m"+i+""+j+" = ");
if( (i+j) % 2 == 1 )
stream.print("-( ");
printTopMinor(matrix,i-1,j-1,N);
if( (i+j) % 2 == 1 )
stream.print(")");
stream.print(";\n");
}
}
stream.println();
// compute the determinant
stream.print(" double det = (a11*m11");
for( int i = 2; i <= N; i++ ) {
stream.print(" + "+a(i-1)+"*m"+1+""+i);
}
stream.println(")/scale;");
} | [
"Put the core auto-code algorithm here so an external class can call it"
] | [
"Converts the bytes that make up an internet address into the corresponding integer value to make\nit easier to perform bit-masking operations on them.\n\n@param address an address whose integer equivalent is desired\n\n@return the integer corresponding to that address",
"Obtains a Symmetry010 zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry010 zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Shuffle an array.\n\n@param array Array.\n@param seed Random seed.",
"Use this API to add sslcertkey.",
"Delete an index with the specified name and type in the given design document.\n\n@param indexName name of the index\n@param designDocId ID of the design doc (the _design prefix will be added if not present)\n@param type type of the index, valid values or \"text\" or \"json\"",
"Use this API to add authenticationradiusaction.",
"Deploys application reading resources from specified classpath location\n\n@param applicationName to configure in cluster\n@param classpathLocations where resources are read\n@throws IOException",
"Remove specified override id from enabled overrides for path\n\n@param overrideId ID of override to remove\n@param pathId ID of path containing override\n@param ordinal index to the instance of the enabled override\n@param clientUUID UUID of client",
"Converts a string representation of an integer into an Integer object.\nSilently ignores any parse exceptions and returns null.\n\n@param value String representation of an integer\n@return Integer instance"
] |
public void addChannel(String boneName, GVRAnimationChannel channel)
{
int boneId = mSkeleton.getBoneIndex(boneName);
if (boneId >= 0)
{
mBoneChannels[boneId] = channel;
mSkeleton.setBoneOptions(boneId, GVRSkeleton.BONE_ANIMATE);
Log.d("BONE", "Adding animation channel %d %s ", boneId, boneName);
}
} | [
"Add a channel to the animation to animate the named bone.\n@param boneName name of bone to animate.\n@param channel The animation channel."
] | [
"gets the first non annotation line number of a node, taking into account annotations.",
"returns a dynamic Proxy that implements all interfaces of the\nclass described by this ClassDescriptor.\n\n@return Class the dynamically created proxy class",
"Use this API to clear nssimpleacl.",
"Use this API to fetch lbmonitor_binding resource of given name .",
"Uploads a new file to this folder with custom upload parameters.\n\n@param uploadParams the custom upload parameters.\n@return the uploaded file's info.",
"Send a media details response to all registered listeners.\n\n@param details the response that has just arrived",
"Creates a simple, annotation defined Web Bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return A Web Bean",
"Generates a set of excluded method names.\n\n@param methodNames method names\n@return set of method names",
"Sets the specified many-to-one 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"
] |
public RedwoodConfiguration printChannels(final int width){
tasks.add(new Runnable() { public void run() { Redwood.Util.printChannels(width);} });
return this;
} | [
"Print channels to the left of log messages\n@param width The width (in characters) to print the channels\n@return this"
] | [
"Add a 'IS NULL' clause so the column must be null. '=' NULL does not work.",
"In-place scaling of a column in A\n\n@param alpha scale factor\n@param A matrix\n@param col which row in A",
"Attempt to detect the current platform.\n\n@return The current platform.\n\n@throws UnsupportedPlatformException if the platform cannot be detected.",
"Sorts the given array into sorted order using the given comparator.\n\n@param self the array to be sorted\n@param comparator a Comparator used for the comparison\n@return the sorted array\n@since 1.5.5",
"Unescape and unquote the path. Ready for translation.",
"Use this API to fetch all the bridgetable resources that are configured on netscaler.",
"Removes the specified list of members from the project. Returns the updated project record.\n\n@param project The project to remove members from.\n@return Request object",
"Adds all rows from the file specified, using the provided parser.\n\n@param file File to read the data from.\n@param fileParser Parser to be used to parse the file.\n@return {@code this}",
"Merge another AbstractTransition's states into this object, such that the other AbstractTransition\ncan be discarded.\n\n@param another\n@return true if the merge is successful."
] |
public void writeBasicDeclarations() throws RDFHandlerException {
for (Map.Entry<String, String> uriType : Vocabulary
.getKnownVocabularyTypes().entrySet()) {
this.rdfWriter.writeTripleUriObject(uriType.getKey(),
RdfWriter.RDF_TYPE, uriType.getValue());
}
} | [
"Writes OWL declarations for all basic vocabulary elements used in the\ndump.\n\n@throws RDFHandlerException"
] | [
"Retrieve list of assignment extended attributes.\n\n@return list of extended attributes",
"Use this API to fetch dbdbprofile resource of given name .",
"Performs spellchecking using Solr and returns the spellchecking results using JSON.\n\n@param res The HttpServletResponse object.\n@param servletRequest The ServletRequest object.\n@param cms The CmsObject object.\n\n@throws CmsPermissionViolationException in case of the anonymous guest user\n@throws IOException if writing the response fails",
"Escape text to ensure valid JSON.\n\n@param value value\n@return escaped value",
"Creates a unique name, suitable for use with Resque.\n\n@return a unique name for this worker",
"Get a misc file.\n\n@param root the root\n@param item the misc content item\n@return the misc file",
"Remove a DAO from the cache. This is necessary if we've registered it already but it throws an exception during\nconfiguration.",
"Return a new instance of the BufferedImage\n\n@return BufferedImage",
"Starts all streams."
] |
@Override
public <E> DynamicType.Builder<E> processMethod(final DynamicType.Builder<E> builder, final Method method, final Annotation annotation)
{
String methodName = method.getName();
if (ReflectionUtility.isGetMethod(method))
return createInterceptor(builder, method);
else if (ReflectionUtility.isSetMethod(method))
return createInterceptor(builder, method);
else if (methodName.startsWith("addAll"))
return createInterceptor(builder, method);
else if (methodName.startsWith("add"))
return createInterceptor(builder, method);
else
throw new WindupException("Only get*, set*, add*, and addAll* method names are supported for @"
+ SetInProperties.class.getSimpleName() + ", found at: " + method.getName());
} | [
"The handling method."
] | [
"Create a clone of this LevenbergMarquardt optimizer with a new vector for the\ntarget values and weights.\n\nThe clone will use the same objective function than this implementation,\ni.e., the implementation of {@link #setValues(RandomVariable[], RandomVariable[])} and\nthat of {@link #setDerivatives(RandomVariable[], RandomVariable[][])} is reused.\n\nThe initial values of the cloned optimizer will either be the original\ninitial values of this object or the best parameters obtained by this\noptimizer, the latter is used only if this optimized signals a {@link #done()}.\n\n@param newTargetVaues New list of target values.\n@param newWeights New list of weights.\n@param isUseBestParametersAsInitialParameters If true and this optimizer is done(), then the clone will use this.{@link #getBestFitParameters()} as initial parameters.\n@return A new LevenbergMarquardt optimizer, cloning this one except modified target values and weights.\n@throws CloneNotSupportedException Thrown if this optimizer cannot be cloned.",
"List all apps for the current user's account.\n@param range The range of apps provided by {@link Range#getNextRange()}\n@return a list of apps",
"Is the user password reset?\n\n@param user User to check\n@return boolean",
"Emits a sentence fragment combining all the merge actions.",
"Creates the button for converting an XML bundle in a property bundle.\n@return the created button.",
"Create a new GP entry in the database. No commit performed.",
"Cretae a BufferedImage from an ImageProducer.\n@param producer the ImageProducer\n@return a new TYPE_INT_ARGB BufferedImage",
"Read a text file into a single string\n\n@param file\nThe file to read\n@return The contents, or null on error.",
"Abort an active extern transaction associated with the given PB."
] |
public BoxGroupMembership.Info addMembership(BoxUser user, Role role) {
BoxAPIConnection api = this.getAPI();
JsonObject requestJSON = new JsonObject();
requestJSON.add("user", new JsonObject().add("id", user.getID()));
requestJSON.add("group", new JsonObject().add("id", this.getID()));
if (role != null) {
requestJSON.add("role", role.toJSONString());
}
URL url = ADD_MEMBERSHIP_URL_TEMPLATE.build(api.getBaseURL());
BoxJSONRequest request = new BoxJSONRequest(api, url, "POST");
request.setBody(requestJSON.toString());
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON = JsonObject.readFrom(response.getJSON());
BoxGroupMembership membership = new BoxGroupMembership(api, responseJSON.get("id").asString());
return membership.new Info(responseJSON);
} | [
"Adds a member to this group with the specified role.\n@param user the member to be added to this group.\n@param role the role of the user in this group. Can be null to assign the default role.\n@return info about the new group membership."
] | [
"The transform method for this DataTransformer\n@param cr a reference to DataPipe from which to read the current map",
"Returns this bar code's pattern, converted into a set of corresponding codewords.\nUseful for bar codes that encode their content as a pattern.\n\n@param size the number of digits in each codeword\n@return this bar code's pattern, converted into a set of corresponding codewords",
"Reads a nested table. Uses the supplied reader class instance.\n\n@param readerClass reader class instance\n@return table rows",
"check max size of each message\n@param maxMessageSize the max size for each message",
"Finds \"Y\" coordinate value in which more elements could be added in the band\n@param band\n@return",
"Given a layer ID, search for the WMS layer.\n\n@param layerId layer id\n@return WMS layer or null if layer is not a WMS layer",
"Add a new PropertyChangeListener to this node for a specific property.\nThis functionality has\nbeen borrowed from the java.beans package, though this class has\nnothing to do with a bean",
"After obtaining a connection, perform additional tasks.\n@param handle\n@param statsObtainTime",
"Adds the specified list of objects at the end of the array.\n\n@param collection The objects to add at the end of the array."
] |
private void merge(Integer cid1, Integer cid2) {
Collection<String> klass1 = classix.get(cid1);
Collection<String> klass2 = classix.get(cid2);
// if klass1 is the smaller, swap the two
if (klass1.size() < klass2.size()) {
Collection<String> tmp = klass2;
klass2 = klass1;
klass1 = tmp;
Integer itmp = cid2;
cid2 = cid1;
cid1 = itmp;
}
// now perform the actual merge
for (String id : klass2) {
klass1.add(id);
recordix.put(id, cid1);
}
// delete the smaller class, and we're done
classix.remove(cid2);
} | [
"Merges the two classes into a single class. The smaller class is\nremoved, while the largest class is kept."
] | [
"Performs the BFS and gives the results to a distributor to distribute\n\n@param distributor the distributor",
"Use this API to fetch all the authenticationradiusaction resources that are configured on netscaler.",
"Saves a screenshot of every new state.",
"Emit information about all of suite's tests.",
"Return the next word of the string, in other words it stops when a space is encountered.",
"Remove a tag from a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param tagId\nThe tag ID\n@throws FlickrException",
"Resizes the array that represents this bit vector.\n\n@param newArraySize\nnew array size",
"Get the context for a photo in the group pool.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@param groupId\nThe group ID\n@return The PhotoContext\n@throws FlickrException",
"Get the time zone for a specific exchange suffix\n\n@param suffix suffix for the exchange in YahooFinance\n@return time zone of the exchange"
] |
public void setRightTableModel(TableModel model)
{
TableModel old = m_rightTable.getModel();
m_rightTable.setModel(model);
firePropertyChange("rightTableModel", old, model);
} | [
"Set the model used by the right table.\n\n@param model table model"
] | [
"Get a store definition from the given list of store definitions\n\n@param list A list of store definitions\n@param name The name of the store\n@return The store definition",
"Uploads bytes to an open upload session.\n@param data data\n@param offset the byte position where the chunk begins in the file.\n@param partSize the part size returned as part of the upload session instance creation.\nOnly the last chunk can have a lesser value.\n@param totalSizeOfFile The total size of the file being uploaded.\n@return the part instance that contains the part id, offset and part size.",
"Returns the field definition with the specified name.\n\n@param name The name of the desired field\n@return The field definition or <code>null</code> if there is no such field",
"Counts the number of elements in A which are not zero.\n@param A A matrix\n@return number of non-zero elements",
"Producers returned from this method are not validated. Internal use only.",
"Scan all the class path and look for all classes that have the Format\nAnnotations.",
"Executes a given SPARQL query and returns a stream with the result in\nJSON format.\n\n@param query\n@return\n@throws IOException",
"Retuns the Windows UNC style path with backslashs intead of forward slashes.\n\n@return The UNC path.",
"Compares the StoreVersionManager's internal state with the content on the file-system\nof the rootDir provided at construction time.\n\nTODO: If the StoreVersionManager supports non-RO stores in the future,\nwe should move some of the ReadOnlyUtils functions below to another Utils class."
] |
public static cachepolicylabel get(nitro_service service, String labelname) throws Exception{
cachepolicylabel obj = new cachepolicylabel();
obj.set_labelname(labelname);
cachepolicylabel response = (cachepolicylabel) obj.get_resource(service);
return response;
} | [
"Use this API to fetch cachepolicylabel resource of given name ."
] | [
"adds a TTL index to the given collection. The TTL must be a positive integer.\n\n@param collection the collection to use for the TTL index\n@param field the field to use for the TTL index\n@param ttl the TTL to set on the given field\n@throws IllegalArgumentException if the TTL is less or equal 0",
"Processes the most recent dump of the given type using the given dump\nprocessor.\n\n@see DumpProcessingController#processMostRecentMainDump()\n@see DumpProcessingController#processAllRecentRevisionDumps()\n\n@param dumpContentType\nthe type of dump to process\n@param dumpFileProcessor\nthe processor to use\n@deprecated Use {@link #getMostRecentDump(DumpContentType)} and\n{@link #processDump(MwDumpFile)} instead; method will vanish\nin WDTK 0.5",
"Handles the deletion of a key.\n@param key the deleted key.\n@return <code>true</code> if the deletion was successful, <code>false</code> otherwise.",
"Implements the instanceof operator.\n\n@param instance The value that appeared on the LHS of the instanceof\noperator\n@return true if \"this\" appears in value's prototype chain",
"Store the given data and return a uuid for later retrieval of the data\n\n@param data\n@return unique id for the stored data",
"Removes the given entity from the inverse associations it manages.",
"Open the given url in default system browser.",
"Determine if a key version is invalid by comparing the version's\nexistence and required writes configuration\n\n@param keyVersionNodeSetMap A map that contains keys mapping to a map\nthat maps versions to set of PrefixNodes\n@param requiredWrite Required Write configuration",
"this method is not intended to be called by clients\n@since 2.12"
] |
public static final String printExtendedAttributeCurrency(Number value)
{
return (value == null ? null : NUMBER_FORMAT.get().format(value.doubleValue() * 100));
} | [
"Print an extended attribute currency value.\n\n@param value currency value\n@return string representation"
] | [
"Records that there is no media mounted in a particular media player slot, updating listeners if this is a change,\nand clearing any affected items from our in-memory caches.\n\n@param slot the slot in which no media is mounted",
"Processes the template for all index descriptors of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Retrieves a CodePage instance. Defaults to ANSI.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field",
"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",
"Retrieves the project finish date. If an explicit finish date has not been\nset, this method calculates the finish date by looking for\nthe latest task finish date.\n\n@return Finish Date",
"Sets the text alignment for all cells in the row.\n@param textAlignment new text alignment\n@throws NullPointerException if the argument was null\n@return this to allow chaining\n@throws {@link NullPointerException} if the argument was null",
"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",
"Use this API to update nsdiameter.",
"Sets the specified float 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 renameReadOnlyV2Files(int masterPartitionId, int correctReplicaType) {
for (int replica = 0; replica < routingStrategy.getNumReplicas(); replica++) {
if (replica != correctReplicaType) {
int chunkId = 0;
while (true) {
String fileName = Integer.toString(masterPartitionId) + "_"
+ Integer.toString(replica) + "_"
+ Integer.toString(chunkId);
File index = getIndexFile(fileName);
File data = getDataFile(fileName);
if(index.exists() && data.exists()) {
// We found files with the "wrong" replica type, so let's rename them
String correctFileName = Integer.toString(masterPartitionId) + "_"
+ Integer.toString(correctReplicaType) + "_"
+ Integer.toString(chunkId);
File indexWithCorrectReplicaType = getIndexFile(correctFileName);
File dataWithCorrectReplicaType = getDataFile(correctFileName);
Utils.move(index, indexWithCorrectReplicaType);
Utils.move(data, dataWithCorrectReplicaType);
// Maybe change this to DEBUG?
logger.info("Renamed files with wrong replica type: "
+ index.getAbsolutePath() + "|data -> "
+ indexWithCorrectReplicaType.getName() + "|data");
} else if(index.exists() ^ data.exists()) {
throw new VoldemortException("One of the following does not exist: "
+ index.toString()
+ " or "
+ data.toString() + ".");
} else {
// The files don't exist, or we've gone over all available chunks,
// so let's move on.
break;
}
chunkId++;
}
}
}
} | [
"This function looks for files with the \"wrong\" replica type in their name, and\nif it finds any, renames them.\n\nThose files may have ended up on this server either because:\n- 1. We restored them from another server, where they were named according to\nanother replica type. Or,\n- 2. The {@link voldemort.store.readonly.mr.azkaban.VoldemortBuildAndPushJob}\nand the {@link voldemort.store.readonly.fetcher.HdfsFetcher} are\noperating in 'build.primary.replicas.only' mode, so they only ever built\nand fetched replica 0 of any given file.\n\nNote: This is an implementation detail of the READONLY_V2 naming scheme, and should\nnot be used outside of that scope.\n\n@param masterPartitionId partition ID of the \"primary replica\"\n@param correctReplicaType replica number which should be found on the current\nnode for the provided masterPartitionId."
] | [
"Checks whether the compilation has been canceled and reports the given work increment to the compiler progress.",
"Randomize the gradient.",
"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",
"Looks up and returns the value of the given key in the properties file of\nthe currently-selected theme.\n\n@param code Key to look up in the theme properties file.\n@return The value of the code in the current theme properties file, or an\nempty string if the code could not be resolved.",
"Main method of RendererAdapter. This method has the responsibility of update the\nRendererBuilder values and create or recycle a new Renderer. Once the renderer has been\nobtained the RendereBuilder will call the render method in the renderer and will return the\nRenderer root view to the ListView.\n\nIf rRendererBuilder returns a null Renderer this method will throw a\nNullRendererBuiltException.\n\n@param position to render.\n@param convertView to use to recycle.\n@param parent used to inflate views.\n@return view rendered.",
"Returns a copy of this year-week with the new year and week, 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 newWeek the week to represent, validated from 1 to 53\n@return the year-week, not null",
"Uses the iterator to run through the dao and retain only the items that are in the passed in collection. This\nwill remove the items from the associated database table as well.\n\n@return Returns true of the collection was changed at all otherwise false.",
"Use this API to fetch systemsession resources of given names .",
"provides a safe toString"
] |
public synchronized void reset() {
this.authorizerDescription = StandardRBACAuthorizer.AUTHORIZER_DESCRIPTION;
this.useIdentityRoles = this.nonFacadeMBeansSensitive = false;
this.roleMappings = new HashMap<String, RoleMappingImpl>();
RoleMaps oldRoleMaps = this.roleMaps;
this.roleMaps = new RoleMaps(authorizerDescription.getStandardRoles(), Collections.<String, ScopedRole>emptyMap());
for (ScopedRole role : oldRoleMaps.scopedRoles.values()) {
for (ScopedRoleListener listener : scopedRoleListeners) {
try {
listener.scopedRoleRemoved(role);
} catch (Exception ignored) {
// TODO log an ERROR
}
}
}
} | [
"Reset the internal state of this object back to what it originally was.\n\nUsed then reloading a server or in a slave host controller following a post-boot reconnect\nto the master."
] | [
"Returns the Java command to use.\n\n@param javaHome the Java Home, if {@code null} an attempt to determine the command will be done\n\n@return the Java executable command",
"adds a CmsJspImageBean as hi-DPI variant to this image\n@param factor the variant multiplier, e.g. \"2x\" (the common retina multiplier)\n@param image the image to be used for this variant",
"Inserts a Parcelable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Parcelable object, or null\n@return this bundler instance to chain method calls",
"Expensive. Creates the plan for the specific settings.",
"Get the replication partitions list for the given partition.\n\n@param index Partition id for which we are generating the preference list\n@return The List of partitionId where this partition is replicated.",
"This method maps the task unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param taskFixedMeta Fixed meta data for this task\n@param taskFixedData Fixed data for this task\n@param taskVarData Variable task data\n@return Mapping between task identifiers and block position",
"Converts an Accumulo Range to a Fluo Span\n\n@param range Range\n@return Span",
"Find the style filter that must be applied to this feature.\n\n@param feature\nfeature to find the style for\n@param styles\nstyle filters to select from\n@return a style filter",
"Stops all servers linked with the current camel context\n\n@param camelContext"
] |
public Replication queryParams(Map<String, Object> queryParams) {
this.replication = replication.queryParams(queryParams);
return this;
} | [
"Specify additional query parameters to be passed to the filter function.\n\n@param queryParams map of key-value parameters\n@return this Replication instance to set more options or trigger the replication"
] | [
"Send a beat announcement to all registered master listeners.\n\n@param beat the beat sent by the tempo master",
"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",
"Check whether we have diverged from what we would predict from the last update that was sent to a particular\ntrack position listener.\n\n@param lastUpdate the last update that was sent to the listener\n@param currentUpdate the latest update available for the same player\n\n@return {@code true }if the listener will have diverged by more than our permitted amount of slack, and so\nshould be updated",
"Converts any string into a string that is safe to use as a file name.\nThe result will only include ascii characters and numbers, and the \"-\",\"_\", and \".\" characters.",
"Get the directory where the compiled jasper reports should be put.\n\n@param configuration the configuration for the current app.",
"Checks if we can see any players that are on a different network than the one we chose for the Virtual CDJ.\nIf so, we are not going to be able to communicate with them, and they should all be moved onto a single\nnetwork.\n\n@return the device announcements of any players which are on unreachable networks, or hopefully an empty list\n@throws IllegalStateException if we are not running",
"Used to parse the dividend dates. Returns null if the date cannot be\nparsed.\n\n@param date String received that represents the date\n@return Calendar object representing the parsed date",
"Replies to this comment with another message.\n@param message the message for the reply.\n@return info about the newly created reply comment.",
"Sends a normal HTTP response containing the serialization information in\na XML format"
] |
private static CallSite realBootstrap(Lookup caller, String name, int callID, MethodType type, boolean safe, boolean thisCall, boolean spreadCall) {
// since indy does not give us the runtime types
// we produce first a dummy call site, which then changes the target to one,
// that does the method selection including the the direct call to the
// real method.
MutableCallSite mc = new MutableCallSite(type);
MethodHandle mh = makeFallBack(mc,caller.lookupClass(),name,callID,type,safe,thisCall,spreadCall);
mc.setTarget(mh);
return mc;
} | [
"backing bootstrap method with all parameters"
] | [
"All the sub-level attributes.\n\n@param name the attribute name.\n@param attribute the attribute.",
"Calculates the squared curvature of the LIBOR instantaneous variance.\n\n@param evaluationTime Time at which the product is evaluated.\n@param model A model implementing the LIBORModelMonteCarloSimulationModel\n@return The squared curvature of the LIBOR instantaneous variance (reduced a possible tolerance). The return value is ≥ 0.",
"Get an Iterator based on the ReportQuery\n\n@param query\n@return Iterator",
"Sets the value for the API's \"languages\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters",
"Gets the uuid from response.\n\n@param myResponse\nthe my response\n@return the uuid from response",
"Retrieve the value from the REST request body.\n\nTODO: REST-Server value cannot be null ( null/empty string ?)",
"Perform the entire sort operation",
"What is the maximum bounds in screen space? Needed for correct clipping calculation.\n\n@param tile\ntile\n@param panOrigin\npan origin\n@return max screen bbox",
"Backup the current version of the configuration to the versioned configuration history"
] |
public Date getStart()
{
Date result = (Date) getCachedValue(AssignmentField.START);
if (result == null)
{
result = getTask().getStart();
}
return result;
} | [
"Returns the start of this resource assignment.\n\n@return start date"
] | [
"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",
"Checks for duplicate elements. A is sorted\n@param A Matrix to be tested.\n@return true if duplicates or false if false duplicates",
"Determine the length of a nul terminated UTF16LE string in bytes.\n\n@param data string data\n@param offset offset into string data\n@return length in bytes",
"Mbeans for UPDATE_ENTRIES",
"Parse the json string to the diagram model, assumes that the json is\nhierarchical ordered\n@param json\n@return Model with all shapes defined in JSON\n@throws org.json.JSONException",
"Read a single field alias from an extended attribute.\n\n@param attribute extended attribute",
"Registers a new user with the given email and password.\n\n@param email the email to register with. This will be the username used during log in.\n@param password the password to associated with the email. The password must be between\n6 and 128 characters long.\n@return A {@link Task} that completes when registration completes/fails.",
"Retrieve the value of a field using its alias.\n\n@param alias field alias\n@return field value",
"Writes the results of the processing to a CSV file."
] |
public static Properties loadProps(String filename) {
Properties props = new Properties();
FileInputStream fis = null;
try {
fis = new FileInputStream(filename);
props.load(fis);
return props;
} catch (IOException ex) {
throw new RuntimeException(ex);
} finally {
Closer.closeQuietly(fis);
}
} | [
"loading Properties from files\n\n@param filename file path\n@return properties\n@throws RuntimeException while file not exist or loading fail"
] | [
"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",
"Use this API to fetch the statistics of all audit_stats resources that are configured on netscaler.",
"Gets the a singleton reference to the SPIProvider returned by the SPIProviderResolver\nretrieved using the default server integration classloader.\n\n@return this class instance",
"remove an objects entry from the object registry",
"Return the basis functions for the regression suitable for this product.\n\n@param fixingDate The condition time.\n@param model The model\n@return The basis functions for the regression suitable for this product.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Convert an object to a list of maps.\n\n@param mapper the object mapper\n@param source the source object\n@return list",
"Runs a query that returns a single int.",
"Gets a SerialMessage with the WAKE_UP_NO_MORE_INFORMATION command.\n@return the serial message",
"Make a sort order for use in a query."
] |
public void setIntVec(int[] data)
{
if (data == null)
{
throw new IllegalArgumentException("Input data for indices cannot be null");
}
if (getIndexSize() != 4)
{
throw new UnsupportedOperationException("Cannot update short indices with int array");
}
if (!NativeIndexBuffer.setIntArray(getNative(), data))
{
throw new UnsupportedOperationException("Input array is wrong size");
}
} | [
"Updates the indices in the index buffer from a Java int array.\nAll of the entries of the input int array are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if int array is wrong size"
] | [
"Check that the parameter string is not null or empty\n\n@param value\nString value to be checked.\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@throws IllegalArgumentException\nIf the key is null or empty.",
"Create a temporary directory with the same attributes as its parent directory.\n@param dir\nthe path to directory in which to create the directory\n@param prefix\nthe prefix string to be used in generating the directory's name;\nmay be {@code null}\n@return the path to the newly created directory that did not exist before\nthis method was invoked\n@throws IOException",
"Retrieve all addresses of a host by it's address. NetBIOS hosts can\nhave many names for a given IP address. The name and IP address make the\nNetBIOS address. This provides a way to retrieve the other names for a\nhost with the same IP address.\n\n@param addr the address to query\n@throws UnknownHostException if address cannot be resolved",
"Post the specified photo to a blog.\n\n@param photo\nThe photo metadata\n@param blogId\nThe blog ID\n@throws FlickrException",
"Use this API to fetch csvserver_copolicy_binding resources of given name .",
"Serialize specified object to directory with specified name. Given output stream will be closed.\n\n@param obj object to serialize\n@return number of bytes written to directory",
"We have identified that we have a zip file. Extract the contents into\na temporary directory and process.\n\n@param stream schedule data\n@return ProjectFile instance",
"todo remove, here only for binary compatibility of elytron subsystem, drop once it is in.",
"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."
] |
private void sendOneAsyncHint(final ByteArray slopKey,
final Versioned<byte[]> slopVersioned,
final List<Node> nodesToTry) {
Node nodeToHostHint = null;
boolean foundNode = false;
while(nodesToTry.size() > 0) {
nodeToHostHint = nodesToTry.remove(0);
if(!failedNodes.contains(nodeToHostHint) && failureDetector.isAvailable(nodeToHostHint)) {
foundNode = true;
break;
}
}
if(!foundNode) {
Slop slop = slopSerializer.toObject(slopVersioned.getValue());
logger.error("Trying to send an async hint but used up all nodes. key: "
+ slop.getKey() + " version: " + slopVersioned.getVersion().toString());
return;
}
final Node node = nodeToHostHint;
int nodeId = node.getId();
NonblockingStore nonblockingStore = nonblockingSlopStores.get(nodeId);
Utils.notNull(nonblockingStore);
final Long startNs = System.nanoTime();
NonblockingStoreCallback callback = new NonblockingStoreCallback() {
@Override
public void requestComplete(Object result, long requestTime) {
Slop slop = null;
boolean loggerDebugEnabled = logger.isDebugEnabled();
if(loggerDebugEnabled) {
slop = slopSerializer.toObject(slopVersioned.getValue());
}
Response<ByteArray, Object> response = new Response<ByteArray, Object>(node,
slopKey,
result,
requestTime);
if(response.getValue() instanceof Exception
&& !(response.getValue() instanceof ObsoleteVersionException)) {
if(!failedNodes.contains(node))
failedNodes.add(node);
if(response.getValue() instanceof UnreachableStoreException) {
UnreachableStoreException use = (UnreachableStoreException) response.getValue();
if(loggerDebugEnabled) {
logger.debug("Write of key " + slop.getKey() + " for "
+ slop.getNodeId() + " to node " + node
+ " failed due to unreachable: " + use.getMessage());
}
failureDetector.recordException(node, (System.nanoTime() - startNs)
/ Time.NS_PER_MS, use);
}
sendOneAsyncHint(slopKey, slopVersioned, nodesToTry);
}
if(loggerDebugEnabled)
logger.debug("Slop write of key " + slop.getKey() + " for node "
+ slop.getNodeId() + " to node " + node + " succeeded in "
+ (System.nanoTime() - startNs) + " ns");
failureDetector.recordSuccess(node, (System.nanoTime() - startNs) / Time.NS_PER_MS);
}
};
nonblockingStore.submitPutRequest(slopKey, slopVersioned, null, callback, timeoutMs);
} | [
"A callback that handles requestComplete event from NIO selector manager\nWill try any possible nodes and pass itself as callback util all nodes\nare exhausted\n\n@param slopKey\n@param slopVersioned\n@param nodesToTry List of nodes to try to contact. Will become shorter\nafter each callback"
] | [
"Return the command line argument\n\n@return \" --server-groups=\" plus a comma-separated list\nof selected server groups. Return empty String if none selected.",
"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",
"Fetch the outermost Hashmap as a TwoDHashMap.\n\n@param firstKey\nfirst key\n@return the the innermost hashmap",
"Set a bean in the context.\n\n@param name bean name\n@param object bean value",
"Print a class's relations",
"Deletes an individual alias\n\n@param alias\nthe alias to delete",
"generate a message for loglevel WARN\n\n@param pObject the message Object",
"public because it's used by other packages that use Duke",
"region Override Methods"
] |
public void set(int index, T object) {
synchronized (mLock) {
if (mOriginalValues != null) {
mOriginalValues.set(index, object);
} else {
mObjects.set(index, object);
}
}
if (mNotifyOnChange) notifyDataSetChanged();
} | [
"set the specified object at index\n\n@param object The object to add at the end of the array."
] | [
"Straight conversion from an ObjectName to a PathAddress.\n\nThere may not necessarily be a Resource at this path address (if that correspond to a pattern) but it must\nmatch a model in the registry.\n\n@param domain the name of the caller's JMX domain\n@param registry the root resource for the management model\n@param name the ObjectName to convert\n\n@return the PathAddress, or {@code null} if no address matches the object name",
"GENERIC!!! HELPER FUNCION FOR REPLACEMENT\n\nupdate the var: DYNAMIC REPLACEMENT of VAR.\n\nEvery task must have matching command data and task result\n\n@param task\nthe task\n@param replaceVarKey\nthe replace var key\n@param replaceVarValue\nthe replace var value",
"Use this API to add inat.",
"Send a request for a menu that we will retrieve items from in subsequent requests, when the request must reflect\nthe actual type of track being asked about.\n\n@param requestType identifies what kind of menu request to send\n@param targetMenu the destination for the response to this query\n@param slot the media library of interest for this query\n@param trackType the type of track for which metadata is being requested, since this affects the request format\n@param arguments the additional arguments needed, if any, to complete the request\n\n@return the {@link Message.KnownType#MENU_AVAILABLE} response reporting how many items are available in the menu\n\n@throws IOException if there is a problem communicating, or if the requested menu is not available\n@throws IllegalStateException if {@link #tryLockingForMenuOperations(long, TimeUnit)} was not called successfully\nbefore attempting this call",
"This will create a line in the SDEF file for each calendar\nif there are more than 9 calendars, you'll have a big error,\nas USACE numbers them 0-9.\n\n@param records list of ProjectCalendar instances",
"We have obtained a waveform preview for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this waveform preview\n@param preview the waveform preview which we retrieved",
"Whether the specified JavaBeans property exists on the given type or not.\n\n@param clazz the type of interest\n@param property the JavaBeans property name\n@param elementType the element type to check, must be either {@link ElementType#FIELD} or\n{@link ElementType#METHOD}.\n@return {@code true} if the specified property exists, {@code false} otherwise",
"Sets the bottom padding for all cells in the row.\n@param paddingBottom new padding, ignored if smaller than 0\n@return this to allow chaining",
"Sets the SCXML model with a string\n\n@param model the model text"
] |
public void postLicense(final License license, final String user, final String password) throws GrapesCommunicationException, AuthenticationException {
final Client client = getClient(user, password);
final WebResource resource = client.resource(serverURL).path(RequestUtils.licenseResourcePath());
final ClientResponse response = resource.type(MediaType.APPLICATION_JSON).post(ClientResponse.class, license);
client.destroy();
if(ClientResponse.Status.CREATED.getStatusCode() != response.getStatus()){
final String message = "Failed to POST license";
if(LOG.isErrorEnabled()) {
LOG.error(String.format(HTTP_STATUS_TEMPLATE_MSG, message, response.getStatus()));
}
throw new GrapesCommunicationException(message, response.getStatus());
}
} | [
"Post a license to the server\n\n@param license\n@param user\n@param password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException"
] | [
"Use this API to fetch all the nsspparams resources that are configured on netscaler.",
"Retrieve the number of minutes per week for this calendar.\n\n@return minutes per week",
"Write correlation id.\n\n@param message the message\n@param correlationId the correlation id",
"Convert the continuous values into discrete values by chopping up\nthe distribution into several equally-sized intervals.",
"Handles a key change.\n\n@param event the key change event.\n@param allLanguages <code>true</code> for changing the key for all languages, <code>false</code> if the key should be changed only for the current language.\n@return result, indicating if the key change was successful.",
"Handles the change of a value in the current translation.\n@param propertyId the property id of the column where the value has changed.",
"Provides an object that can build SQL clauses to match this string representation.\n\nThis method can be overridden for other IP address types to match in their own ways.\n\n@param isEntireAddress\n@param translator\n@return",
"if |a11-a22| >> |a12+a21| there might be a better way. see pg371",
"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\""
] |
public static servicegroup_lbmonitor_binding[] get(nitro_service service, String servicegroupname) throws Exception{
servicegroup_lbmonitor_binding obj = new servicegroup_lbmonitor_binding();
obj.set_servicegroupname(servicegroupname);
servicegroup_lbmonitor_binding response[] = (servicegroup_lbmonitor_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch servicegroup_lbmonitor_binding resources of given name ."
] | [
"Perform the module promotion\n\n@param moduleId String",
"Use this API to create sslfipskey resources.",
"Determines whether a project has the specified publisher type, wrapped by the \"Flexible Publish\" publisher.\n@param project The project\n@param type The type of the publisher\n@return true if the project contains a publisher of the specified type wrapped by the \"Flexible Publish\" publisher.",
"Construct new path by replacing file directory part. No\nfiles are actually modified.\n@param file path to move\n@param target new path directory",
"Reports a given exception as a RuntimeException, since the interface does\nnot allow us to throw checked exceptions directly.\n\n@param e\nthe exception to report\n@throws RuntimeException\nin all cases",
"Gets the health memory.\n\n@return the health memory",
"Prepare the options by adding additional information to them.\n@see <a href=\"https://docs.mongodb.com/manual/core/index-ttl/\">TTL Indexes</a>",
"Check if values in the column \"property\" are written to the bundle descriptor.\n@param property the property id of the table column.\n@return a flag, indicating if values of the table column are stored to the bundle descriptor.",
"Split string content into list, ignoring matches of the pattern\n@param content String content\n@param ignorePattern Pattern to ignore\n@return list"
] |
public static Thumbor create(String host, String key) {
if (key == null || key.length() == 0) {
throw new IllegalArgumentException("Key must not be blank.");
}
return new Thumbor(host, key);
} | [
"Create a new instance for the specified host and encryption key.\n\n@see #create(String)"
] | [
"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",
"Returns an interval representing the addition of the\ngiven interval with this one.\n@param other interval to add to this one\n@return interval sum",
"Returns the red color component of a color from a vertex color set.\n\n@param vertex the vertex index\n@param colorset the color set\n@return the red color component",
"Change the value that is returned by this generator.\n@param value The new value to return.",
"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",
"Loads all localizations not already loaded.\n@throws CmsException thrown if locking a file fails.\n@throws UnsupportedEncodingException thrown if reading a file fails.\n@throws IOException thrown if reading a file fails.",
"Returns the specified range of elements in the sorted set.\nThe elements are considered to be ordered from the lowest to the highest score.\nLexicographical order is used for elements with equal score.\nBoth start and stop are zero-based inclusive indexes. They can also be negative numbers indicating offsets from\nthe end of the sorted set, with -1 being the last element of the sorted set.\n@param start\n@param end\n@return the range of elements",
"Use this API to fetch cacheselector resources of given names .",
"Use this API to reset appfwlearningdata resources."
] |
public static String[] randomResourceNames(String prefix, int maxLen, int count) {
String[] names = new String[count];
ResourceNamer resourceNamer = SdkContext.getResourceNamerFactory().createResourceNamer("");
for (int i = 0; i < count; i++) {
names[i] = resourceNamer.randomName(prefix, maxLen);
}
return names;
} | [
"Generates the specified number of random resource names with the same prefix.\n@param prefix the prefix to be used if possible\n@param maxLen the maximum length for the random generated name\n@param count the number of names to generate\n@return random names"
] | [
"Treats the object as iterable, iterating through the values it represents and returns the first non-null result obtained from calling the closure, otherwise returns the defaultResult.\n\n@param self an Object with an iterator returning its values\n@param defaultResult an Object that should be returned if all closure results are null\n@param closure a closure that returns a non-null value when processing should stop\n@return the first non-null result of the closure, otherwise the default value\n@since 1.7.5",
"Make a copy of this Area of Interest.",
"Adjust the visible columns.",
"Creates a non-binary text media type with the given subtype and a specified encoding",
"Verify that the given channels are all valid.\n\n@param channels\nthe given channels",
"Validations specific to GET and GET ALL",
"Gets an iterator to the EJB descriptors for an EJB implementation class\n\n@param beanClass The EJB class\n@return An iterator",
"Use this API to fetch the statistics of all scpolicy_stats resources that are configured on netscaler.",
"There appear to be two ways of representing task notes in an MPP8 file.\nThis method tries to determine which has been used.\n\n@param task task\n@param data task data\n@param taskExtData extended task data\n@param taskVarData task var data"
] |
private static Iterator<String> splitIntoDocs(Reader r) {
if (TREAT_FILE_AS_ONE_DOCUMENT) {
return Collections.singleton(IOUtils.slurpReader(r)).iterator();
} else {
Collection<String> docs = new ArrayList<String>();
ObjectBank<String> ob = ObjectBank.getLineIterator(r);
StringBuilder current = new StringBuilder();
for (String line : ob) {
if (docPattern.matcher(line).lookingAt()) {
// Start new doc, store old one if non-empty
if (current.length() > 0) {
docs.add(current.toString());
current = new StringBuilder();
}
}
current.append(line);
current.append('\n');
}
if (current.length() > 0) {
docs.add(current.toString());
}
return docs.iterator();
}
} | [
"end class CoNLLIterator"
] | [
"Set a range of the colormap, interpolating between two colors.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color1 the first color\n@param color2 the second color",
"Merge two ExecutionStatistics into one. This method is private in order not to be synchronized (merging.\n@param otherStatistics",
"Use this API to fetch sslpolicylabel resource of given name .",
"Get random geographical location\n@return 2-Tuple of ints (latitude, longitude)",
"Log a message at the provided level.",
"Gets the node meta data.\n\n@param key - the meta data key\n@return the node meta data value for this key",
"Logout the current session. After calling this method,\nthe session will be cleared",
"Returns the decoded string, in case it contains non us-ascii characters.\nReturns the same string if it doesn't or the passed value in case\nof an UnsupportedEncodingException.\n\n@param str string to be decoded\n@return the decoded string, in case it contains non us-ascii characters;\nor the same string if it doesn't or the passed value in case\nof an UnsupportedEncodingException.",
"Generates the context diagram for a single class"
] |
public Collection<Method> getAllMethods(String name) {
final Map<ParamList, Map<Class<?>, Method>> nameMap = methods.get(name);
if (nameMap == null) {
return Collections.emptySet();
}
final Collection<Method> methods = new ArrayList<Method>();
for (Map<Class<?>, Method> map : nameMap.values()) {
methods.addAll(map.values());
}
return methods;
} | [
"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"
] | [
"We have received an update that invalidates the waveform detail for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no waveform preview for the associated player",
"Returns the remote collection representing the given namespace.\n\n@param namespace the namespace referring to the remote collection.\n@param resultClass the {@link Class} that represents documents in the collection.\n@param <T> the type documents in the collection.\n@return the remote collection representing the given namespace.",
"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",
"Removes the given entity from the inverse associations it manages.",
"Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\n\n@param object\n@param outIdentifier\n@return",
"Gets information about all of the group memberships for this user.\nDoes not support paging.\n\n<p>Note: This method is only available to enterprise admins.</p>\n\n@return a collection of information about the group memberships for this user.",
"Patch provided by Avril Kotzen ([email protected])\nDB2 handles TINYINT (for mapping a byte).",
"You should call this method from your activity onRequestPermissionsResult.\n\n@param requestCode The request code passed in requestPermissions(android.app.Activity, String[], int)\n@param permissions The requested permissions. Never null.\n@param grantResults The grant results for the corresponding permissions which is either\nPERMISSION_GRANTED or PERMISSION_DENIED. Never null.",
"Calculate delta with another vector\n@param v another vector\n@return delta vector"
] |
protected I_CmsFacetQueryItem parseFacetQueryItem(JSONObject item) {
String query;
try {
query = item.getString(JSON_KEY_QUERY_FACET_QUERY_QUERY);
} catch (JSONException e) {
// TODO: Log
return null;
}
String label = parseOptionalStringValue(item, JSON_KEY_QUERY_FACET_QUERY_LABEL);
return new CmsFacetQueryItem(query, label);
} | [
"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."
] | [
"Add filters to the tree.\n\n@param parentNode parent tree node\n@param filters list of filters",
"Sets the current switch index based on object name.\nThis function finds the child of the scene object\nthis component is attached to and sets the switch\nindex to reference it so this is the object that\nwill be displayed.\n\nIf it is out of range, none of the children will be shown.\n@param childName name of child to select\n@see GVRSceneObject#getChildByIndex(int)",
"Cancel a particular download in progress. Returns 1 if the download Id is found else returns 0.\n\n@param downloadId\n@return int",
"Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for",
"Set the position of the given Matcher to the given index.\n\n@param matcher a Matcher\n@param idx the index number\n@since 1.0",
"Request a scoped transactional token for a particular resource.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@param resource resource transactional token has access to.\n@return a BoxAPIConnection which can be used to perform transactional requests.",
"Starts the Okapi Barcode UI.\n\n@param args the command line arguments",
"Use this API to fetch aaagroup_aaauser_binding resources of given name .",
"Adapt the size of the tiles so that we have the same amount of tiles as we would have had with maxWidth\nand maxHeight, but with the smallest tiles as possible."
] |
public boolean isActive(int profileId) {
boolean active = false;
PreparedStatement queryStatement = null;
try (Connection sqlConnection = sqlService.getConnection()) {
queryStatement = sqlConnection.prepareStatement(
"SELECT " + Constants.CLIENT_IS_ACTIVE + " FROM " + Constants.DB_TABLE_CLIENT +
" WHERE " + Constants.GENERIC_CLIENT_UUID + "= '-1' " +
" AND " + Constants.GENERIC_PROFILE_ID + "= ? "
);
queryStatement.setInt(1, profileId);
logger.info(queryStatement.toString());
ResultSet results = queryStatement.executeQuery();
if (results.next()) {
active = results.getBoolean(Constants.CLIENT_IS_ACTIVE);
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
if (queryStatement != null) {
queryStatement.close();
}
} catch (Exception e) {
}
}
return active;
} | [
"Returns true if the default profile for the specified uuid is active\n\n@return true if active, otherwise false"
] | [
"Method to send Request messages to a specific df_service\n\n@param df_service\nThe name of the df_service\n@param msgContent\nThe content of the message to be sent\n@return Message sent to + the name of the df_service",
"Retrieve any resource field aliases defined in the MPP file.\n\n@param map index to field map\n@param data resource field name alias data",
"Sets in-place the right child with the same first byte.\n\n@param b next byte of child suffix.\n@param child child node.",
"Removes an existing metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return this metadata object.",
"Commit all changes if there are uncommitted changes.\n\n@param msg the commit message.\n@throws GitAPIException",
"Save the changes.",
"Returns all scripts\n\n@param model\n@param type - optional to specify type of script to return\n@return\n@throws Exception",
"Sets the node meta data but allows overwriting values.\n\n@param key - the meta data key\n@param value - the meta data value\n@return the old node meta data value for this key\n@throws GroovyBugError if key is null",
"Gets the current version of the database schema. This version is taken\nfrom the migration table and represent the latest successful entry.\n\n@return the current schema version"
] |
private static String formatDirName(final String prefix, final String suffix) {
// Replace all invalid characters with '-'
final CharMatcher invalidCharacters = VALID_SUFFIX_CHARS.negate();
return String.format("%s-%s", prefix, invalidCharacters.trimAndCollapseFrom(suffix.toLowerCase(), '-'));
} | [
"Returns the expected name of a workspace for a given suffix\n@param suffix\n@return"
] | [
"Return the \"common\" configuration set name. By default it is \"common\"\n@return the \"common\" conf set name",
"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.",
"Check if zone count policy is satisfied\n\n@return whether zone is satisfied",
"At the moment we only support the case where one entity type is returned",
"Inject external stylesheets.",
"Determine if a CharSequence can be parsed as an Integer.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isInteger(String)\n@since 1.8.2",
"Get a property as a double or null.\n\n@param key the property name",
"Add a clause where the ID is from an existing object.",
"Gets the URL of the service with the given name that has been created during the current session.\n\n@param name to return its URL\n@return URL of the service."
] |
private void parseLdapAuthorization_1_5(final XMLExtendedStreamReader reader,
final ModelNode realmAddress, final List<ModelNode> list) throws XMLStreamException {
ModelNode addr = realmAddress.clone().add(AUTHORIZATION, LDAP);
ModelNode ldapAuthorization = Util.getEmptyOperation(ADD, addr);
list.add(ldapAuthorization);
Set<Attribute> required = EnumSet.of(Attribute.CONNECTION);
final int count = reader.getAttributeCount();
for (int i = 0; i < count; i++) {
final String value = reader.getAttributeValue(i);
if (!isNoNamespaceAttribute(reader, i)) {
throw unexpectedAttribute(reader, i);
} else {
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
required.remove(attribute);
switch (attribute) {
case CONNECTION: {
LdapAuthorizationResourceDefinition.CONNECTION.parseAndSetParameter(value, ldapAuthorization, reader);
break;
}
default: {
throw unexpectedAttribute(reader, i);
}
}
}
}
if (required.isEmpty() == false) {
throw missingRequired(reader, required);
}
Set<Element> foundElements = new HashSet<Element>();
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, namespace);
final Element element = Element.forName(reader.getLocalName());
if (foundElements.add(element) == false) {
throw unexpectedElement(reader); // Only one of each allowed.
}
switch (element) {
case USERNAME_TO_DN: {
switch (namespace.getMajorVersion()) {
case 1: // 1.5 up to but not including 2.0
parseUsernameToDn_1_5(reader, addr, list);
break;
default: // 2.0 and onwards
parseUsernameToDn_2_0(reader, addr, list);
break;
}
break;
}
case GROUP_SEARCH: {
switch (namespace) {
case DOMAIN_1_5:
case DOMAIN_1_6:
parseGroupSearch_1_5(reader, addr, list);
break;
default:
parseGroupSearch_1_7_and_2_0(reader, addr, list);
break;
}
break;
}
default: {
throw unexpectedElement(reader);
}
}
}
} | [
"1.5 and on, 2.0 and on, 3.0 and on."
] | [
"Returns the texture magnification filter\n\nIf missing, defaults to {@link GL_LINEAR }\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture magnification filter",
"Flat the map of list of string to map of strings, with theoriginal values, seperated by comma",
"Inject external stylesheets.",
"Returns the total count of partitions across all stores.\n\n@return returns the total count of partitions across all stores.",
"Check if information model entity referenced by archetype\nhas right name or type",
"Gets a JsonObject containing any pending changes to this object that can be sent back to the Box API.\n@return a JsonObject containing the pending changes.",
"Features are only cacheable when not converted lazily as lazy features are incomplete, it would put detached\nobjects in the cache.\n\n@return true when features are not converted lazily",
"Use this API to fetch all the linkset resources that are configured on netscaler.",
"Use this API to change responderhtmlpage."
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.